hapifhir / hapi-fhir

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

Customize concept display in value set expansion #2280

Closed HananAwwad closed 3 years ago

HananAwwad commented 3 years ago

Specific concepts for value set expansion dose not have specific display defined in ValueSet.compose.include.concept.display node.

I created the following value set which include specific code system (claim-type) with some fixed concepts; however the value set contains concept with different display other than that in code system as following

http://hapi.fhir.org/baseR4/ValueSet/claim-type-hanan { "resourceType": "ValueSet", "id": "claim-type-hanan", "meta": { "versionId": "1", "lastUpdated": "2021-01-07T15:03:03.761+00:00", "source": "#wPBdpTmIQ459VzHp", "profile": [ "http://hl7.org/fhir/StructureDefinition/shareablevalueset" ] }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "fm" }, { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", "valueCode": "trial-use" }, { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", "valueInteger": 2 } ], "url": "http://hl7.org/fhir/ValueSet/claim-type-hanan", "identifier": [ { "system": "urn:ietf:rfc:3986", "value": "urn:oid:2.16.840.1.113883.4.642.3.558" } ], "version": "4.0.1", "name": "ClaimTypeCodes", "title": "Claim Type Codes", "status": "draft", "experimental": false, "date": "2019-11-01T09:29:23+11:00", "publisher": "Financial Management", "contact": [ { "telecom": [ { "system": "url", "value": "http://hl7.org/fhir" } ] } ], "description": "This value set includes Claim Type codes.", "immutable": true, "copyright": "HL7 Inc.", "compose": { "include": [ { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "concept": [ { "code": "institutional", "display": "InPatient" }, { "code": "oral", "display": "Dental" }, { "code": "pharmacy", "display": "Pharmacy" }, { "code": "professional", "display": "OutPatient" }, { "code": "vision", "display": "Optical" } ] } ] } }

however in expansion result I got the display as it was in code system; it should be the one specified in value set declaration ? the expansion result: { "resourceType": "ValueSet", "status": "active", "compose": { "include": [ { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "concept": [ { "code": "institutional", "display": "InPatient" }, { "code": "oral", "display": "Dental" }, { "code": "pharmacy", "display": "Pharmacy" }, { "code": "professional", "display": "OutPatient" }, { "code": "vision", "display": "Optical" } ] } ] }, "expansion": { "identifier": "19614ac1-e151-4dcc-ab94-c927be3f25ea", "timestamp": "2021-01-07T15:07:22+00:00", "total": 5, "offset": 0, "parameter": [ { "name": "offset", "valueInteger": 0 }, { "name": "count", "valueInteger": 1000 } ], "contains": [ { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "institutional", "display": "Institutional" }, { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "oral", "display": "Oral" }, { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "pharmacy", "display": "Pharmacy" }, { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "vision", "display": "Vision" }, { "system": "http://terminology.hl7.org/CodeSystem/claim-type", "code": "professional", "display": "Professional" } ] } }

Expected behavior

As mentioned in Fhir website the following node have the provided meaning ValueSet.compose.include.concept.display: The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.

Environment:

HananAwwad commented 3 years ago

@jamesagnew In case no one is working on this; I would like to work on it.

HananAwwad commented 3 years ago

This issue has been resolved in Hapi Fhir version 5.3