-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
We have this ValueSet (id: insuranceplan-type) and it was pre-expanded on this CodeSystem (id: insurance-plan-type), the problem is that the CodeSystem is having a code (code: “Drug“, display: “DRUG“) which is retired but upon invalidating the pre-expansion and then expansion it still includes the retired code.
We also updated the CodeSystem to version 3 by removing the retired code (code: “Drug”, display: “Drug“) and then tried the same method which is invalidating the pre-expansion and then expansion again but still it is including the code (code: “Drug“, display: “Drug“).
Note: The CodeSystem has updated version of the code (code: “drug“, display: “Drug“) but it is not getting picked up by expansion.
Steps to Reproduce
- Spin up recent version of Smile CDR (e.g. 2025.08.R01 or 2025.11.PRE) with default configuration.
- Create "http://terminology.hl7.org/CodeSystem/insurance-plan-type" CodeSystem from the definition provided by HL7 Terminology v6.5.0 using a PUT request to the default FHIR endpoint, e.g. "PUT http://localhost:8000/CodeSystem/insurance-plan-type" with the body set to the JSON resource defined here https://terminology.hl7.org/6.5.0/CodeSystem-insurance-plan-type.json. When creating this CodeSystem, be very careful to set the
CodeSystem.contentproperly so it matches what it is set to inhttp://terminology.hl7.org/CodeSystem/insurance-plan-type--this is critical to reproducing the bug. - Create "http://terminology.hl7.org/ValueSet/insuranceplan-type" ValueSet resource from the definition provided by HL7 Terminology v6.5.0 using a PUT request to the FHIR endpoint, e.g. "PUT http://localhost:8000/ValueSet/insuranceplan-type" with the body set to the JSON resource defined here https://terminology.hl7.org/6.5.0/ValueSet-insuranceplan-type.json.
- Expand the "http://terminology.hl7.org/ValueSet/insuranceplan-type" ValueSet resource using the FHIR endpoint, e.g. "GET http://localhost:8000/ValueSet/insuranceplan-type/$expand".
Expected Result: The ValueSet.expansion should both "Drug" and "drug".
Actual Result: The ValueSet.expansion only includes "Drug".