Is your feature request related to a problem? Please describe.
I am having trouble debugging an issue with the converter where only the OBR segment of the HL7 gets encoded despite the MSH and PID segments being present.
Describe the solution you'd like
It would be nice to have at least 1 reference FHIR bundle in the repository that has been verified to work with the converter.
Describe alternatives you've considered
Currently have a test FHIR bundle pieced together but it is difficult to tell whether the above issue I'm seeing is an issue with my input or a bug within the converter. Also, synthea is a great tool but doesn't seem to be well-suited for such a small scope.
Additional context
Just to be clear, I'm not asserting that my input is correct, I will be continuing to iterate on it and check it against spec, just would be nice to have something to reference--it's difficult to find suitable test FHIR data to work with.
If I happen to come up with a working bundle, I'd be happy to PR it in so that there is something to work with if you'd be interested!
Thanks a bunch :)
Here's the output from message.encode():
OBR|1|||45033-8^Blood pressure report^LN||||||||||||||||||20240312184813.4276+0000|||F
output from message.printStructure():
ORU_R01 (start)
MSH - MSH|^~\&|SourceSystem^https://source.example.com||||20240312184813.4266+0000||ORU^R01^ORU_R01|foobar||2.5.1
[ { SFT } ] - SFT
PATIENT_RESULT (start)
{
PATIENT (start)
[
PID - PID|1||123456^^^^MR||Doe^John^^^^^L||19800101|M||^^HL70005|||||||||||||||||||||||||^^SCT
[ PD1 ] - Not populated
[ { NTE } ] - Not populated
[ { NK1 } ] - Not populated
VISIT (start)
[
PV1 - Not populated
[ PV2 ] - Not populated
]
VISIT (end)
]
PATIENT (end)
ORDER_OBSERVATION (start)
{
[ ORC ] - ORC
OBR - OBR|1|||45033-8^Blood pressure report^LN||||||||||||||||||20240312184813.4276+0000|||F
[ { NTE } ] - Not populated
TIMING_QTY (start)
[{
TQ1 - Not populated
[ { TQ2 } ] - Not populated
}]
TIMING_QTY (end)
[ CTD ] - Not populated
OBSERVATION (start)
[{
OBX - Not populated
[ { NTE } ] - Not populated
}]
OBSERVATION (end)
[ { FT1 } ] - Not populated
[ { CTI } ] - Not populated
SPECIMEN (start)
[{
SPM - Not populated
[ { OBX } ] - Not populated
}]
SPECIMEN (end)
}
ORDER_OBSERVATION (end)
}
PATIENT_RESULT (end)
[ DSC ] - Not populated
ORU_R01 (end)
and here's the test bundle I'm using at time of writing:
{
"resourceType": "Bundle",
"id": "7418c05b-3d2b-4b0b-8124-56a3ab3db6df",
"type": "message",
"timestamp": "2024-03-12T18:48:13.426174Z",
"identifier": {
"value": "foobar"
},
"entry": [
{
"resource": {
"resourceType": "MessageHeader",
"id": "4e7a93a5-cb92-4a7a-a0df-7d9eb3dfe039",
"eventCoding": {
"system": "http://example.org/fhir/message-events",
"code": "ORU_R01"
},
"source": {
"name": "SourceSystem",
"endpoint": "https://source.example.com"
},
"destination": [
{
"name": "DestinationSystem",
"endpoint": "https://destination.example.com"
}
]
}
},
{
"resource": {
"resourceType": "Provenance",
"id": "0896ecfa-adfc-417c-85af-83d74b575748",
"target": [
{
"reference": "MessageHeader/4e7a93a5-cb92-4a7a-a0df-7d9eb3dfe039"
}
],
"recorded": "2024-03-12T18:48:13.426588Z",
"agent": [
{
"who": {
"reference": "Practitioner/example",
"display": "Dr. Example"
},
"onBehalfOf": {
"reference": "Organization/example",
"display": "Example Organization"
},
"role": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/provenance-participant-role",
"code": "author"
}
]
}
]
}
],
"activity": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
"code": "R01",
"display": "Order Review"
}
]
}
}
},
{
"resource": {
"resourceType": "Patient",
"id": "0afb9ab6-e35c-4e0a-81ac-fee3a0d6077d",
"identifier": [
{
"use": "official",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "http://hospital.example.org",
"value": "123456"
}
],
"name": [
{
"use": "official",
"family": "Doe",
"given": [
"John"
]
}
],
"gender": "male",
"birthDate": "1980-01-01"
}
},
{
"resource": {
"resourceType": "Observation",
"id": "6022053f-97f4-4717-841b-76f2c2438502",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "85354-9",
"display": "Blood pressure systolic & diastolic"
}
]
},
"subject": {
"reference": "Patient/0afb9ab6-e35c-4e0a-81ac-fee3a0d6077d"
},
"valueQuantity": [
{
"value": 120,
"unit": "mmHg",
"system": "http://unitsofmeasure.org",
"code": "mm[Hg]"
},
{
"value": 80,
"unit": "mmHg",
"system": "http://unitsofmeasure.org",
"code": "mm[Hg]"
}
],
"interpretation": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
"code": "N",
"display": "Normal"
}
]
}
],
"issued": "2024-03-12T18:48:13.427394Z"
}
},
{
"resource": {
"resourceType": "DiagnosticReport",
"id": "c34ee1c8-17db-452f-ac45-7f79f557cf0a",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "45033-8",
"display": "Blood pressure report"
}
]
},
"subject": {
"reference": "Patient/0afb9ab6-e35c-4e0a-81ac-fee3a0d6077d"
},
"result": [
{
"reference": "Observation/6022053f-97f4-4717-841b-76f2c2438502"
}
],
"issued": "2024-03-12T18:48:13.427564Z"
}
},
{
"resource": {
"resourceType": "Practitioner",
"id": "example",
"identifier": [
{
"system": "http://hospital.example.org/practitioners",
"value": "example-practitioner"
}
],
"name": [
{
"use": "official",
"family": "Example",
"given": [
"Practitioner"
]
}
]
}
},
{
"resource": {
"resourceType": "Organization",
"id": "example",
"identifier": [
{
"system": "http://hospital.example.org",
"value": "example-organization"
}
],
"name": "Example Organization"
}
}
]
}
Is your feature request related to a problem? Please describe.
I am having trouble debugging an issue with the converter where only the OBR segment of the HL7 gets encoded despite the MSH and PID segments being present.
Describe the solution you'd like
It would be nice to have at least 1 reference FHIR bundle in the repository that has been verified to work with the converter.
Describe alternatives you've considered
Currently have a test FHIR bundle pieced together but it is difficult to tell whether the above issue I'm seeing is an issue with my input or a bug within the converter. Also, synthea is a great tool but doesn't seem to be well-suited for such a small scope.
Additional context
Just to be clear, I'm not asserting that my input is correct, I will be continuing to iterate on it and check it against spec, just would be nice to have something to reference--it's difficult to find suitable test FHIR data to work with.
If I happen to come up with a working bundle, I'd be happy to PR it in so that there is something to work with if you'd be interested!
Thanks a bunch :)
Here's the output from
message.encode():output from
message.printStructure():and here's the test bundle I'm using at time of writing:
{ "resourceType": "Bundle", "id": "7418c05b-3d2b-4b0b-8124-56a3ab3db6df", "type": "message", "timestamp": "2024-03-12T18:48:13.426174Z", "identifier": { "value": "foobar" }, "entry": [ { "resource": { "resourceType": "MessageHeader", "id": "4e7a93a5-cb92-4a7a-a0df-7d9eb3dfe039", "eventCoding": { "system": "http://example.org/fhir/message-events", "code": "ORU_R01" }, "source": { "name": "SourceSystem", "endpoint": "https://source.example.com" }, "destination": [ { "name": "DestinationSystem", "endpoint": "https://destination.example.com" } ] } }, { "resource": { "resourceType": "Provenance", "id": "0896ecfa-adfc-417c-85af-83d74b575748", "target": [ { "reference": "MessageHeader/4e7a93a5-cb92-4a7a-a0df-7d9eb3dfe039" } ], "recorded": "2024-03-12T18:48:13.426588Z", "agent": [ { "who": { "reference": "Practitioner/example", "display": "Dr. Example" }, "onBehalfOf": { "reference": "Organization/example", "display": "Example Organization" }, "role": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-role", "code": "author" } ] } ] } ], "activity": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason", "code": "R01", "display": "Order Review" } ] } } }, { "resource": { "resourceType": "Patient", "id": "0afb9ab6-e35c-4e0a-81ac-fee3a0d6077d", "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "http://hospital.example.org", "value": "123456" } ], "name": [ { "use": "official", "family": "Doe", "given": [ "John" ] } ], "gender": "male", "birthDate": "1980-01-01" } }, { "resource": { "resourceType": "Observation", "id": "6022053f-97f4-4717-841b-76f2c2438502", "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "85354-9", "display": "Blood pressure systolic & diastolic" } ] }, "subject": { "reference": "Patient/0afb9ab6-e35c-4e0a-81ac-fee3a0d6077d" }, "valueQuantity": [ { "value": 120, "unit": "mmHg", "system": "http://unitsofmeasure.org", "code": "mm[Hg]" }, { "value": 80, "unit": "mmHg", "system": "http://unitsofmeasure.org", "code": "mm[Hg]" } ], "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "N", "display": "Normal" } ] } ], "issued": "2024-03-12T18:48:13.427394Z" } }, { "resource": { "resourceType": "DiagnosticReport", "id": "c34ee1c8-17db-452f-ac45-7f79f557cf0a", "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "45033-8", "display": "Blood pressure report" } ] }, "subject": { "reference": "Patient/0afb9ab6-e35c-4e0a-81ac-fee3a0d6077d" }, "result": [ { "reference": "Observation/6022053f-97f4-4717-841b-76f2c2438502" } ], "issued": "2024-03-12T18:48:13.427564Z" } }, { "resource": { "resourceType": "Practitioner", "id": "example", "identifier": [ { "system": "http://hospital.example.org/practitioners", "value": "example-practitioner" } ], "name": [ { "use": "official", "family": "Example", "given": [ "Practitioner" ] } ] } }, { "resource": { "resourceType": "Organization", "id": "example", "identifier": [ { "system": "http://hospital.example.org", "value": "example-organization" } ], "name": "Example Organization" } } ] }