Counseling has expressed an interest in adding support for license number searching in the public search fields. Currently the JCC public search implementation relies on the original DynamoDB partition which only allows searching by name.
There are two ways to support this:
We have recently added a GSI for license numbers by state, in order to support uploading licenses without an SSN after the initial upload. We can reuse this GSI for the public search, but it requires that the user specify the compact and state in addition to the license number in order to search for matches. This is the lighter weight option, but is more restrictive to future search features, so it is not recommended.
Alternatively, we would need to port over the JCC public search lambda to query the OpenSearch Domain, similar to what we are doing for both Cosmetology and Social Work in their public search implementations. This would not only support searching by license number, but also any other field available on provider records which we want to allow the public to search by.
This would involve adding a public search lambda to the search persistent stack in CDK, and referencing that lambda in the public_lookup_api.py under the api_stack directory (just as we do in Cosmetology and Social Work). Much of the code used in the other compacts for public search can be leveraged here (Cosmetology will be a much close match to JCC than Social Work, since Cosmetology does not have the CUID complexities).
Note that today, the JCC OpenSearch index creates one document record per provider, whereas Cosmetology documents one record per license. We should not need to recreate the index to support license number searching, but it is a complexity that we will need to be aware of. Also note that today the JCC public search only returns matches if the user has purchased any privileges, which is not a constraint shared by the other compacts. We also don't display license information in the public search detail view, so we either need to change that if we want to display license number information, or we will accept that the license number will return a matching provider but the license number will not be displayed.
Notes
Questions
- Should the public search still return a matching provider even if they have not purchased privileges?
- Should the public search now return license information in the public detail view page for practitioners?
Assumptions
Estimate
Tasks
Implementation Notes
Counseling has expressed an interest in adding support for license number searching in the public search fields. Currently the JCC public search implementation relies on the original DynamoDB partition which only allows searching by name.
There are two ways to support this:
We have recently added a GSI for license numbers by state, in order to support uploading licenses without an SSN after the initial upload. We can reuse this GSI for the public search, but it requires that the user specify the compact and state in addition to the license number in order to search for matches. This is the lighter weight option, but is more restrictive to future search features, so it is not recommended.
Alternatively, we would need to port over the JCC public search lambda to query the OpenSearch Domain, similar to what we are doing for both Cosmetology and Social Work in their public search implementations. This would not only support searching by license number, but also any other field available on provider records which we want to allow the public to search by.
This would involve adding a public search lambda to the search persistent stack in CDK, and referencing that lambda in the public_lookup_api.py under the api_stack directory (just as we do in Cosmetology and Social Work). Much of the code used in the other compacts for public search can be leveraged here (Cosmetology will be a much close match to JCC than Social Work, since Cosmetology does not have the CUID complexities).
Note that today, the JCC OpenSearch index creates one document record per provider, whereas Cosmetology documents one record per license. We should not need to recreate the index to support license number searching, but it is a complexity that we will need to be aware of. Also note that today the JCC public search only returns matches if the user has purchased any privileges, which is not a constraint shared by the other compacts. We also don't display license information in the public search detail view, so we either need to change that if we want to display license number information, or we will accept that the license number will return a matching provider but the license number will not be displayed.
Notes
Questions
Assumptions
Estimate
Tasks
Implementation Notes