How to ingest HL7?
# support
b
Just starting with medplum. What do I need to do to ingest HLv2 messages? We have a load of HL7v2 ADTs, we can do http, MLLP, or file. Can I just send them to medplum and the patients will show up with their ID and their current location? Or is there a dedicated setup for HL7 required? A special setup within medplum to accept the patients, like setting up hospital, departments, etc. ?
r
hello there! So getting this set up requires a few steps. You need to write a bot, and then write the parsing logic to handle the ADTs - here's the guide on it https://www.medplum.com/docs/bots/hl7-into-fhir Then you need to get the ADTs to POST to the bot endpoints as shown in the example
The parsing logic is where you set up the identifiers to map to your location requirements
b
Thanks for the response. I looked at it, it seems like a very basic script to only set the name. That means we need to implement the logic for every single message type of Admit, Discharge & Transfer separately? Further adding extra logic if the message is a historic one, potentially only changing data of the past? At the end of the day, we want to see beds and patients. And if patients are discharged, the bed should be emtpy 🙂
r
Yup - you'll need to write the parsing logic for A, D and T and use it to update the logic specific to your implementation. If you want to conditionally create resources to manage changing historical data you can use the https://www.medplum.com/docs/sdk/core.medplumclient.createresourceifnoneexist method in your script.
b
What's your plan regarding community modules? I see many hospitals in EU still with HL7v2, so a lot will need it, not everyone should reinvent the wheel. Is there a place for community plugins, for potential collaboration of users, a marketplace for paid plugins?
r
Great ideas! Nothing concrete here yet, but we do have integrations page https://www.medplum.com/docs/integration - are you thinking of making an ADT parser?
b
If you don't provide one, then we may look into this. But still evaluating platforms.
r
Got it!