Support for search parameters that target CodeableReference elements
Is your feature request related to a problem? Please describe. In R4B, ClinicalUseDefinition includes a number of search parameters that reference an element of type CodeableReference:
- contraindication
- contraindication-reference
- effect
- effect-reference
- indication
- indication-reference
Because of this, we skip extraction for these search parameters. With FINE logging you can see messages like this:
[08/08/2022, 12:17:19:640 UTC] 00000036 FHIRPersisten 1 Processing SearchParameter resource: ClinicalUseDefinition, code: indication-reference, type: reference, expression: ClinicalUseDefinition.indication.diseaseSymptomProcedure
[08/08/2022, 12:17:19:640 UTC] 00000036 JDBCParameter 1 The processing of com.ibm.fhir.model.type.CodeableReference is unsupported
Describe the solution you'd like This data type allows for either a reference or a concept, or both. If both are present, they are expected to be consistent with each other. When the concept is present, we should extract that like a normal CodeableConcept (e.g. for the 'token' search parameters). When the reference is present, we should extract that like a normal Reference (e.g. for 'reference' search parameters).
Describe alternatives you've considered we briefly considered using a composite for it, but because the two parts are expected to be consistent, this would be redundant
Acceptance Criteria
-
GIVEN a ClinicalUseDefinition with a contraindication AND that contraindication has a concept but no reference WHEN you search using
contraindicationTHEN the resource is returned -
GIVEN a ClinicalUseDefinition with a contraindication AND that contraindication has a concept but no reference WHEN you search using
contraindication-referenceTHEN the resource is not returned -
GIVEN a ClinicalUseDefinition with an effect AND that effect has a reference but no concept WHEN you search using
effectTHEN the resource is not returned -
GIVEN a ClinicalUseDefinition with an effect AND that effect has a reference but no concept WHEN you search using
effect-referenceTHEN the resource is returned -
GIVEN a ClinicalUseDefinition with an indication AND that indication has both a concept and a reference WHEN you search using
indicationTHEN the resource is returned -
GIVEN a ClinicalUseDefinition with an indication AND that indication has both a concept and a reference WHEN you search using
indication-referenceTHEN the resource is returned
Additional context Unfortunately, the spec was never updated with how to index this element type either. I've opened the following spec issue for that part of it: https://jira.hl7.org/browse/FHIR-37867