Live data from Hacker News

Simulated Hospital

github.com

71–80 of 108 posts

Re: Simulated Hospital

#71

Are there any decent parsers in Python/Java/Ruby that someone can recommend?

https://hapifhir.io/ for open source.

Mirth is the commercial offering many people use - it is nice because it handles the MLLP protocol, gives you a mapping system, lets you transform and call your own endpoints. That’s also why it sucks: it’s a big heavy system.

Re: Simulated Hospital

#72
post #24
post #22

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||||51…

no shot anyone actually types this out, right? surely this must be generated by machines for machine ingestion.

No, not any more than anyone types out XML anyway.

Re: Simulated Hospital

#74

Earlier quoted context omitted.

I'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.

You 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 happe…

Add 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.

Re: Simulated Hospital

#75
post #33

I am frequently asked about why systems in institutional healthcare are so hard to modernize, this has come up a lot related to pricing transparency. While HL7 is in theory a standard, in practice it is a semi-parseable "email" between two parties that know each other. Widely used systems like EPIC have bugs and quirks that have existed so long that the bugs themselves have become their own standard. Because HL7 rela…

I don't have enough fingers to count the times I was doing automation in healthcare, implemented the process to spec, and then had a bunch of test cases flagged as failing.

Turns out, for large known counterparties, there are indeed de facto processes that incorporate each party's eccentricities and are "known" on the floor (processors typically have long tenures in their jobs) but unknown above a certain level of management.

E.g. a large children's hospital that reliably spit out misformatted requests to the local payer, but which the payer papered over on their side by converting them to payable requests (naughty, but kept them from bouncing back and requiring resubmission)... and had been doing so for 10+ years.

Re: Simulated Hospital

#76
post #49

Earlier quoted context omitted.

This 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?

HL7v2 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.

It's normal to not encrypt it, in my experience.

Re: Simulated Hospital

#77
post #28
post #22

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||||51…

I 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.

Mirth is so useful for debugging, though.

Re: Simulated Hospital

#78
post #49

Earlier quoted context omitted.

This 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?

HL7v2 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.

[deleted]

Re: Simulated Hospital

#79
post #33

I am frequently asked about why systems in institutional healthcare are so hard to modernize, this has come up a lot related to pricing transparency. While HL7 is in theory a standard, in practice it is a semi-parseable "email" between two parties that know each other. Widely used systems like EPIC have bugs and quirks that have existed so long that the bugs themselves have become their own standard. Because HL7 rela…

It's worse than this. EPIC will have its own conventions, but then each hospital system will have its as well. It is the least rigorous data environment I've ever worked in.

Re: Simulated Hospital

#80
post #49
post #22

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||||51…

This 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?

Typically these messages are not encrypted. This is a late 80's spec based on a 70's era EDI spec.

IMHO, when these messages are transmitted outside the hospital typically a VPN used. There is a spec for posting these messages to an web service over HTTPS but I haven't seen it in use.

Post reply on HN