7 ms·
When they say "Most EHRs use a message format called HL7v2, which is ugly and tedious to type." they aren't kidding, here's an example of it: MSH|^~\&|FROM_APP
by ape4 3y ago
When they say "Most EHRs use a message format called HL7v2, which is ugly and tedious to type." they aren't kidding, here's an example of it:
MSH|^~\&|FROM_APP|FROM_FACILITY|TO_APP|TO_FACILITY|20180101000000||ADT^A01|20180101000000|P|2.5|
EVN|A01|20110613083617|
PID|1|843125^^^^MRN|21004053^^^^MRN~2269030303^^^^ORGNMBR||SULLY^BRIAN||19611209|M|||123 MAIN ST^^CITY^STATE^12345|
PV1||I|H73 RM1^1^^HIGHWAY 01 CLINIC||||5148^MARY QUINN|||||||||Y||||||||||||||||||||||||||||20180101000000|
- QuercusMax 3y agoI've worked a lot with DICOM which has plenty of warts (as expected with a 30 year old living standard), but HL7 is a bit much for me. At least FHIR and DICOMweb are considerably saner.
- lostlogin 3y agoYou haven't lived until you've tried to debug it. The array isn't zero based. The line breaks have different characters for breaking the lines, and you get to guess which ones are doing it. Certain characters are ok (ASKII) but when a Mac gets a nice ' into the field, all hell breaks loose. Things like "lesion at 9 o'clock" then break the system, as does Mr O'Leary. The hours spent chasing down how some failure happened are countless. Pity those working with HL7.
- ethbr0 3y agoHealthcare is the perfect storm of layered, ossified systems created across decades + input data that's normal just often enough... that everyone thinks bounds are actually handled. And then Mr. O'Leary checks in. Fuzz testing tools would be great, but I haven't seen many institutions that have functional 1:1 lower environments (i.e. including all system-system integrations working in test).
- viraptor 3y agoAdd to that the fun bits like "let's attach a whole base64 encoded PDF as a field of the hl7 message". Which honestly is not a terrible solution given you want to keep it all together, but still... It would be nice if you could attach binaries after the ASCII content.
- nradov 3y agoIt is possible to include multiple binary attachments and text content in certain HL7 V2 message structures. Just use multiple OBX segments.
- warent 3y agono shot anyone actually types this out, right? surely this must be generated by machines for machine ingestion.
- deleted 3y ago[deleted]
- lipschitz 3y agoyeah
- TeMPOraL 3y agoThey probably do, and if NOTAMs are any indication, it's probably also read by people too.
- riceart 3y agoNot comparable. HL7 is a machine interchange format - virtually no docs or healthcare personnel except those involved in informatics (and then generally only superficially) are familiar with HL7. These NOTAMs were designed for human consumption and brevity, they date back to the 40s (debate about their ergonomics nonwithstanding).
- viraptor 3y agoNo, not any more than anyone types out XML anyway.
- jbrogers63 3y agoGenerally, it's machine generated. I've only ever typed it out manually if I needed something specific for a unit test and that only for small messages. It's tedious to do by hand.
- nradov 3y agoThe wire format is a bit messy and hard to read. But developers mostly work through libraries like HAPI which have a decent API. https://hapifhir.github.io/hapi-hl7v2/ https://hapifhir.github.io/hapi-hl7v2/
- eclipxe 3y agoI designed HL7v2 and v3 (xml based) parsers in Mirth. It was horrible, but boy did I learn a ton. Subtle bugs could lead to scary outcomes like drug doses being way off. Seeing the string “PID” still causes nightmares.
- lostlogin 3y agoPelvis Inflammatory Disease as a data format - a perfect description for HL7.
- robertlagrant 3y agoMirth is so useful for debugging, though.
- vntok 3y agoYou can ask GPT to expand it for you without any context and it will fill in the headers and explain each field.
- duckmysick 3y agoGood learning tool if you use it on generated data. Don't paste actual patient data.
- vntok 3y agoWhy not? Can you articulate what could go wrong?
- duckmysick 3y agoYou're sharing someone's sensitive data without permission. On top of that, patient data has additional protections in many countries. You can get into legal troubles because of that. Major providers like Azure or AWS have programs in place to handle sensitive patient data. I'm not sure if OpenAI has one too. Either way, you would have to enter into a special agreement to do so. Bonus point: ask ChatGPT if it's ok to paste private patient data there.
- djfobbz 3y agoThis message object seems to be missing the HIPAA^ENCRYPTED field (pun intended)...I am assuming the encryption is implemented above this layer? Is there a standard for HL7v2 encryption?
- pskinner 3y agoHL7v2 is just the schema - the mechanism for sending these messages is normally something called MLLP which is just a simple framing protocol and has no built in security. It is possible to send/receive HL7v2 over other protocols, MLLP is the most common. Its normal to secure the endpoints via network level security - ipsec etc. HL7v3 transformed into FHIR which is done over HTTPS instead.
- kckljssyckyc 3y agoor, hear me out, you also blast it unencrypted to the flex pagers your employees don't even use anymore
- robertlagrant 3y agoIt's normal to not encrypt it, in my experience.
- nradov 3y agoIt's really not normal to not encrypt HL7 V2 messages. Every interface that I've seen uses a VPN.
- robertlagrant 3y agoI'm in the UK in the NHS. Perhaps that's the difference. They just do network lockdowns inside the hospital.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- Eumenes 3y agoSeems readable to me
- MichaelZuo 3y agoWhat does HL7v3 look like?
- friendzis 3y agohttps://en.wikipedia.org/wiki/Health_Level_7#Version_3_messaging https://en.wikipedia.org/wiki/Health_Level_7#Version_3_messa...
- owenmarshall 3y agoR4 is where things get a bit kinder and gentler. https://www.hl7.org/fhir/us/core/Condition-condition-duodenal-ulcer.json.html https://www.hl7.org/fhir/us/core/Condition-condition-duodena...
- MichaelZuo 3y agoAh that makes more sense.
- nradov 3y agoI think you're kind of mixing up version or release numbers there. HL7 has several major standards: V2 Messaging, V3 (including CDA), and FHIR. And each of those has gone through multiple releases. FHIR was on R4 for a couple years and R5 was recently published.
- owenmarshall 3y agoYeah, I’m doing that thing where I speak sloppily. HL7 is the standards organization, so talking about “HL7 messages” is like talking about “ISO messages”. It’s a misnomer. But as someone at the sharp end of the stick wrt integrations? If I hear someone talk to me about HL7 I’m thinking HL7v2, and if someone says FHIR I’m thinking US Core v2 + FHIR R4. That just seems to be lingua franca.
- nradov 3y agoThe HL7 V3 standard is mostly dead. Only the Clinical Document Architecture (CDA) offshoot of V3 still survives in widespread use. You can find examples here. https://hl7-c-cda-examples.herokuapp.com/ https://hl7-c-cda-examples.herokuapp.com/ Most new HL7 work has moved on to FHIR which is essentially "HL7 V4".
- HillRat 3y agoDon't forget the most ridiculous part of EDI-style protocols (X12, HL7, etc.), which is that they don't have an explicit looping construct; you have to look at each implementation spec and your trading partner's specific companion guide and determine where repeated or looped sequences area through context. Makes for some exciting issues in implementing parsers.
- specialist 3y agoAgreed. On the positive side, being domain specific and well known, Hl7v2 "interface" specs are more simple and predictable than other IDLs I've used. (Just vibes. I haven't done a formal comparison.) We had a stock human-readable "interface" template to use. It's basically literate programming. Paragraphs of descriptive text and well-formed tables. I wrote a simple parser which turned those well-formed tables into actual code. Our HL7 tools made it trivial to subclass generated classes whenever a special case (difficult to describe in the spec's tables) had to be hard-coded. Our HL7 tool stack allowed our "business analysts" (domain experts talking with customers) to do most of the implementation themselves, with speedy deploys, low cost of change, and super easy to verify. For instance, our team could make changes and deploy and verify while on the phone with customers / partners. What could be easier? Our customers loved us. So of course the mega-corp which acquired our startup had to strangle our effort in the crib, dumping our corpse in a land fill. Mostly out of spite.