fhir-data-pipes
fhir-data-pipes copied to clipboard
`text` field is lost when the Hapi object is converted to `Avro`
During conversion from HAPI to Avro, the text
field is lost in the converted Avro
object. This needs to be debugged. In general, all the fields should be copied to Avro
object, so that when the Avro
object is converted back to Hapi
, it is equavalient to the original HAPI object.
Original Hapi object
{
"resourceType": "Patient",
"id": "example",
"meta": {
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: example</p><p><b>meta</b>: </p><p><b>identifier</b>: Medical Record Number: 1032702 (USUAL)</p><p><b>active</b>: true</p><p><b>name</b>: Amy V. Shaw , Amy V. Baxter </p><p><b>telecom</b>: ph: 555-555-5555(HOME), [email protected]</p><p><b>gender</b>: female</p><p><b>birthDate</b>: 1987-02-20</p><p><b>address</b>: </p><ul><li>49 Meadow St Mounds OK 74047 US </li><li>183 Mountain View St Mounds OK 74048 US </li></ul></div>"
}
}
when the above hapi object is converted to Avro and then reconverted back to HAPI again, the div
field under the text
is lost.
Reconverted HAPI object from Avro
{
"resourceType": "Patient",
"id": "example",
"meta": {
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
]
},
"text": {
"status": "generated"
}
}
I debugged this and the root cause seems to be in the core HAPI code. I have filed this issue to follow-up with that team.
The filed issue is fixed and a new release has been done; we should probably just update a dependency.
The filed issue is fixed and a new release has been done; we should probably just update a dependency.
We get the updated artifacts (e.g., ca.uhn.hapi.fhir:org.hl7.fhir.r4
) through hapi-fhir-structures-*
artifact dependencies. The core issues seems to be fixed on org.hl7.fhir.r4:6.3.19
(and later) according to release notes. The current latest hapi-fhir-structures-*
releases (7.4.0) are not caught up to 6.3.19 yet.