FHIR icon indicating copy to clipboard operation
FHIR copied to clipboard

Support for search parameters that target CodeableReference elements

Open lmsurpre opened this issue 3 years ago • 0 comments

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

  1. GIVEN a ClinicalUseDefinition with a contraindication AND that contraindication has a concept but no reference WHEN you search using contraindication THEN the resource is returned

  2. GIVEN a ClinicalUseDefinition with a contraindication AND that contraindication has a concept but no reference WHEN you search using contraindication-reference THEN the resource is not returned

  3. GIVEN a ClinicalUseDefinition with an effect AND that effect has a reference but no concept WHEN you search using effect THEN the resource is not returned

  4. GIVEN a ClinicalUseDefinition with an effect AND that effect has a reference but no concept WHEN you search using effect-reference THEN the resource is returned

  5. GIVEN a ClinicalUseDefinition with an indication AND that indication has both a concept and a reference WHEN you search using indication THEN the resource is returned

  6. GIVEN a ClinicalUseDefinition with an indication AND that indication has both a concept and a reference WHEN you search using indication-reference THEN 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

lmsurpre avatar Aug 08 '22 15:08 lmsurpre