Open shabanlushaj opened 10 months ago
Thank you for creating this issue. We are looking into it and I can update you in the next few days.
@shabanlushaj thanks for reporting this. agree - the templates seem to return a value which is not valid per the FHIR spec. The spec seems to indicate that HH:mm:ss should be used https://build.fhir.org/datatypes.html#time, so I have created a PR that adds a filter to format the time with a colon and adds the zero'd out seconds if they are not present. After the filter is available the templates can be updated
@wi-y Thanks for pushing this forward. I've added a comment since I've encountered same issue when trying to parse ORU segments which contain OBX segment with time type. OBX|1|TE|X^Time Observation^L||12210000|||||F|||20240117100100|
thanks for the feedback - that makes sense. I've updated the linked pull request to handle other HL7v2 time formats
Issue:
For any segment that contains Quantity/Timing -> Explicit Time Interval subfield when time is represented in HHMM format, FhirJsonParser fails to parse to HL7 Fhir Bundle.
Is there any standard that current implementation is based on for Quantity/Timing? https://hl7-definition.caristix.com/v2/HL7v2.5.1/Fields/ORC.7.2.2 based on this and some EHR providers time format is represented in HHMM format.
How to reproduce:
POST azure-server/$convert-data
Body
```json { "resourceType": "Parameters", "parameter": [ { "name": "rootTemplate", "valueString": "ORM_O01" }, { "name": "templateCollectionReference", "valueString": "microsofthealth/fhirconverter:default" }, { "name": "inputData", "valueString": "MSH|^~\\&|X||Y|Z|20240107111232|123|ORM^O01|1234|T|2.5.1||||||||||| PID|1||ID||TEST^TEST1| PV1||I|A^A0^A01^AA^A^^^^^^||||||| ORC|CA|01^X|||| OBR|1|01^X||^XC^^^XCDE||20240107111210|||||||||||||||||||||^Daily&0730^^20240107111215^^^^|||||||||20240107111215|||||||||" }, { "name": "inputDataType", "valueString": "Hl7v2" } ] } ```Response:
When trying to parse it throws exception:
Possible fix:
Converting to HH:MM format (which I believe should be done with a liquid filter when dealing with time).