FHIR Chat · BUG: Json to Bundle Conversion issue · hapi

Stream: hapi

Topic: BUG: Json to Bundle Conversion issue


view this post on Zulip Zak Guler (Jul 17 2020 at 19:35):

I have a json FHIR Bundle document and when I convert it to a Bundle class, the 'part' element is always null even though I have values in it:

all three 'part' fields come as null ???
Example of the file is below.

Can anyone help please.
thanx
Zak

EX:
bundle = (Bundle) ctx.newJsonParser().parseResource(Bundle.class, reqBody);

the reqBody:
{
"resourceType": "Bundle",
"id": "e1d15daa-af09-46fd-8f16-15a9b1318f6e",
"type": "message",
"timestamp": "2020-07-08T11:01:15.125631-04:00",
"entry": [
{
"fullUrl": "urn:uuid:8d19c9bc-dbd6-484a-abb1-ee6182ca79ea",
"resource": {
"resourceType": "MessageHeader",
"id": "8d19c9bc-dbd6-484a-abb1-ee6182ca79ea",
"eventUri": "http://nchs.cdc.gov/vrdr_coding",
"destination": [
{
"endpoint": "https://UTAH.example.com/jurisdiction/message/endpoint"
}
],
"source": {
"endpoint": "http://nchs.cdc.gov/vrdr_submission"
},
"focus": [
{
"reference": "urn:uuid:d770590e-7968-4c1c-a1d9-82444db282c2"
}
]
}
},
{
"fullUrl": "urn:uuid:d770590e-7968-4c1c-a1d9-82444db282c2",
"resource": {
"resourceType": "Parameters",
"id": "d770590e-7968-4c1c-a1d9-82444db282c2",
"parameter": [
{
"name": "cert_no",
"valueString": "021520"
},
{
"name": "nchs_id",
"valueString": "2019UT021520"
},
{
"name": "underlying_cause_of_death",
"valueCoding": {
"system": "http://hl7.org/fhir/ValueSet/icd-10",
"code": "C509"
}
},
{
"name": "record_cause_of_death",
"part": [
{
"name": "coding",
"valueCoding": {
"system": "http://hl7.org/fhir/ValueSet/icd-10",
"code": "C509"
}
},
{
"name": "coding",
"valueCoding": {
"system": "http://hl7.org/fhir/ValueSet/icd-10",
"code": "I500"
}
}
]
},
{
"name": "entity_axis_code",
"part": [
{
"name": "lineNumber",
"valueId": "1"
},
{
"name": "coding",
"valueCoding": {
"system": "http://hl7.org/fhir/ValueSet/icd-10",
"code": "I500"
}
}
]
},
{
"name": "entity_axis_code",
"part": [
{
"name": "lineNumber",
"valueId": "2"
},
{
"name": "coding",
"valueCoding": {
"system": "http://hl7.org/fhir/ValueSet/icd-10",
"code": "C509"
}
}
]
}
]
}
}
]
}

view this post on Zulip Zak Guler (Jul 25 2020 at 23:25):

problem solved. I was looking at the wrong 'part' element.
thanks to GTRI for helping debug this issue.
Zak


Last updated: Apr 12 2022 at 19:14 UTC