Open abhijitjanardantiwari opened 2 weeks ago
Can you please provide a complete unit test code example which demonstrates the issue you are having?
I am providing you json request here. We have properties field, inside that type and value code is there. If we provide some other device type and value code its not getting validated. I am also providing our FHIR profiles for your reference. Thease are .fsh files. if we provide some other valuecode other than mask like "cushion.size.l" then its not validating. If we provide out side value code which is not defined in codes system file like "mask.size.abc" then its getting validated like "code is not defined"
Profile : Profile: AmpmMaskAccessory Parent: AmpmDeviceAccessory Id: AmpmMaskAccessory Description: "This profile covers the Mask accessory accepted by Ampm."
meta obeys meta.profile.AmpmMaskAccessory
^status = #draft
^experimental = false
property.valueCode from AmpmMaskPropertiesValueSet
Invariant: meta.profile.AmpmMaskAccessory Description: "SHOULD claim meta.profile conformance to https://www.fhir.philips.com/4.0/uv/ampm/StructureDefinition/meta.profile.AmpmMaskAccessory ." Severity: #warning Expression: "profile.where($this='https://www.fhir.philips.com/4.0/uv/ampm/StructureDefinition/AmpmMaskAccessory').exists()"
AmpmMaskPropertiesValueSet ValueSet: AmpmMaskPropertiesValueSet Id: AmpmMaskPropertiesValueSet Description: "Valueset containing the allowed porperties"
^meta.profile = "http://hl7.org/fhir/StructureDefinition/shareablevalueset"
^status = #draft
^experimental = false
include codes from system AmpmDeviceAccessoryPropertiesValuesCodeSystem where concept descendent-of #mask.size
AmpmDeviceAccessoryPropertiesValuesCodeSystem
CodeSystem: AmpmDeviceAccessoryPropertiesValuesCodeSystem Id: AmpmDeviceAccessoryPropertiesValuesCodeSystem Title: "AmpmDeviceAccessoryPropertiesValuesCodeSystem" Description: "AmpmDeviceAccessoryPropertiesValuesCodeSystem"
^meta.profile = "http://hl7.org/fhir/StructureDefinition/shareablecodesystem"
^status = #active
^experimental = false
^date = "2023-04-09"
^caseSensitive = false
^compositional = false
^hierarchyMeaning = #grouped-by
^property[+].code = #concept-type
^property[=].type = #string
JSON Request:
{ "resourceType": "Device", "meta": { "profile": [ "https://www.fhir.philips.com/4.0/uv/ampm/StructureDefinition/AmpmMaskAccessory" ] }, "identifier": [ { "system": "http://hl7.org/fhir/sid/imei", "value": "986278381748783" }, { "system": "http://www.philips.com/myvirtualcare/deviceMaster", "value": "D117929" } ], "status": "active", "manufacturer": "Philips", "manufactureDate": "2000-04-03", "expirationDate": "2022-04-05", "serialNumber": "dsn-22", "deviceName": [ { "name": "Mask", "type": "user-friendly-name" }, { "name": "Mask1", "type": "model-name" }, { "name": "261382003", "type": "other" } ], "modelNumber": "A1-FXAC1193", "type": { "coding": [ { "system": "http://snomed.info/sct", "code": "277973009", "display": "Respiratory Equipment" } ] }, "property": [ { "type": { "coding": [ { "code": "mask.size", "system": "https://www.fhir.philips.com/4.0/uv/ampm/CodeSystem/AmpmDeviceAccessoryPropertiesValuesCodeSystem", "display": "Size" } ] }, "valueCode": [ { "coding": [ { "code": "mask.size.l", "system": "https://www.fhir.philips.com/4.0/uv/ampm/CodeSystem/AmpmDeviceAccessoryPropertiesValuesCodeSystem", "display": "Large" } ] } ] } ], "extension": [ { "url": "https://www.fhir.philips.com/4.0/uv/ampm/StructureDefinition/AmpmAccessoryResupplyEligibilityDateExtension", "valueDateTime": "2022-08-08T02:01:40+00:00" } ] }
NOTE: Before filing a ticket, please see the following URL: https://github.com/hapifhir/hapi-fhir/wiki/Getting-Help
Describe the bug Different value code system has been defined for different accessory in ILS FHIR profiles. When we run ILS FHIR profile test cases, Its getting validated correctly but not validated with library.
Value code system example:
cushion "Cushion"
cushion.size "Size"
cushion.size.l "Large"
cushion.size.xl "Extra Large"
headgear "HeadGear"
headgear.size "Size"
headgear.size.ones "One size"
headgear.size.l "Large"
headgear.size.std "Standard"
Here, we can see code has been defined seperatly for Cushion and Headgear Headgear code should not be allowed in Cushion and vice versa and this validation happening correctly with ILS FHIR profile test cases. But with library it allowing to pass code from one accessory to other.
To Reproduce Steps to reproduce the behavior:
Expected behavior One accessory code should not be allowed for other accessory.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context Add any other context about the problem here.