hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.02k stars 1.32k forks source link

Add support for the CPGExecutableValueSet profile. #2376

Closed JPercival closed 1 year ago

JPercival commented 3 years ago

Describe the issue The FHIR Clinical Practice Guidelines IG defines the CPGExecutableValueSet profile to allow the use of pre-expanded ValueSets (i.e. they already have the "expansion" element defined) in scenarios where that's advantageous. A few use cases:

Several IGs use this profile to define test cases for their content: Connectathon Opioid CDS R4

Currently if a ValueSet is loaded into HAPI the with the "expansion" element already defined that value is ignored and the expansion is computed based on the available CodeSystems and will either return empty or fail if the appropriate CodeSystem is not loaded.

Concretely, this change means making HAPI "trust" ValueSets which already have the "expansion" element defined and use the element directly when doing expansions.

Considerations:

Environment (please complete the following information):

JPercival commented 1 year ago

The "trust" behavior was implemented and is currently not configurable. If a ValueSet is loaded with a pre-expanded set of codes, that pre-expansion will be used for CQL/Measure evaluation.

Resolved by #4347