Skip to content

ValueSet code case-sensitivity #7394

@fil512

Description

@fil512

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

  1. Spin up recent version of Smile CDR (e.g. 2025.08.R01 or 2025.11.PRE) with default configuration.
  2. 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.content properly so it matches what it is set to in http://terminology.hl7.org/CodeSystem/insurance-plan-type--this is critical to reproducing the bug.
  3. 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.
  4. 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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions