FHIR® is the registered trademark of HL7 and is used with the permission of HL7. The Flame Design mark is the registered trademark of HL7 and is used with the permission of HL7. Amsterdam, 15-17 November | @fhir_furore | #fhirdevdays17 | www.fhirdevdays.com Building Bridges: Mapping HL7 V2 to FHIR Simone Heckmann, Gefyra GmbH / HL7 Germany
39
Embed
Building Bridges: Mapping HL7 V2 to FHIR - FHIR DevDays · •Create two Patient resource from the A40‘s PID, one with the good, one with the bad identifier. •Create the conditional
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
FHIR® is the registered trademark of HL7 and is used with the permission of HL7. The Flame Design mark is the registered trademark of HL7 and is used with the permission of HL7.
Amsterdam, 15-17 November | @fhir_furore | #fhirdevdays17 | www.fhirdevdays.com
Building Bridges: Mapping HL7 V2 to FHIR
Simone Heckmann, Gefyra GmbH / HL7 Germany
Who we are
„gefyra“ is the Greek word for „bridge“
We offer• FHIR training, • consultancy for FHIR projects• professional tooling• integration services (j/w Health-Comm,
• First, we need to DELETE all previously submittedAllergyIntolerances, then POST thenew ones. But wait! We need tomake sure, we only delete theones we (the integration engine) created!
So, in our case:GET [base]/AllergyIntolerance?patient.identifier=[?]&_has:Provenance:agent:device=[?]
We also need to create a Device resource! Advantage: the Provenance Resource also gives us an chance to store the original message for traceability as an Attachment. (…yes, we need to create that resource, too…)
Does that really work?
• Well, we made it work (at least, with tags)after changing the processingorder for Transactions toDELETE > POST > PUT > GET
How do I reference a resource that doesn‘t have a url(yet)?• Assign a UUID to every
Bundle.entry.fullUrlThen reference the associatedresource by this uri. The server must replace UUIDs with the actual urls whenprocessing the Transaction
But what if I don‘t want to touch the resource I need toreference?• Conditional Update will update the
matching resource,Conditional Create will create a new resource if none matches. Both can get us into trouble, if wedon‘t have permission tocreate/update specific resources.
• V2 Source will overwrite all changes and additions to Resources on the Server (-> Patch)
• There is no „trigger“ to invoke additional actions on the server (-> Message/Operations)
• „Merge“ is tricky (-> Operations)
• Doesn‘t work in the absence of REST Protocol (-> Message)
• Is it PV1 actually an Encounter or rather an EpisodeOfCare?
The MERGE hack
• Create two Patient resource from the A40‘s PID, one with the good, onewith the bad identifier.
• Create the conditional update URLs accordingly
• Add a link (type=„replaces“) from the good to the bad Patient
• Add a link (type=„replaced-by“) from the bad to the good Patient
• Set the bad Patient to „inactive“
• Downside: we‘re losing the NK1 information when updating the goodpatient! -> try to PATCH the link into the good Patient instead
What if the server doesn‘t support Transactions?
• Basically, the Transaction Bundle constitutes a list ofindividual, atomic REST interactions. We can run themthrough „post processing“ and split them up.
• But remember: we have to handle the replacing of theUUIDs with the actual URLs ourselves!
• We can even split the Conditional interactions up into a GET and PUT/POST/DELETE interaction,But then we have to deal with the errors on our side.
You can move complexity around, but you can‘t make it go away
(Grahame Grieve)
Client Server
Message
Transaction
Plain REST
Co
mp
lexityC
om
ple
xity
Client Server
V2-based EHR
Integration Engine
FHIR-Server
FHIR-Clients
ADT-Messages
Transaction-Bundles
V2-based EHR
Integration Engine
FHIR-Server
FHIR-Clients
ORU-Messages
/Observation/_history
Searchset Bundle?
_history Subscription
+ reliability
+ simple to implement
+ repeatable (if something wentwrong)
- not selective/high traffic
- delay
- second interaction for includes
+ realtime
+ selective
+ low bandwidth
- no queueing
- no trigger if a resource drops out of your selection
What next?
• Tell us about your use case and join the Hands On
• Give feedback at https://chat.fhir.org/#narrow/stream/v2.20to.20FHIR
• Join the discussion on how to handle merge
• Join the next connectathon in San Antonio and help us toevaluate Subscription and _history interactions to transferResources from a FHIR server back to a V2 systemhttp://wiki.hl7.org/index.php?title=201701_Resource_Subscription_Track