by lostlogin · 8y ago · 0 comments
Edit: for the uninitiated. Excuse the readable line breaks, this isn’t defined in the spec (or at least is done differently by all vendors). You won’t have to suffer long though as you’ll go blind reading the ||| and ^^ when debugging.
MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|
PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M||B|254 MYSTREET AVE^^MYTOWN^OH^44123^USA||(216)123-4567|||M|NON|400003403~1129086|
NK1||ROE^MARIE^^^^|SPO||(216)123-4567||EC|||||||||||||||||||||||||||
PV1||O|168 ~219~C~PMA^^^^^^^^^||||277^ALLEN MYLASTNAME^BONNIE^^^^|||||||||| ||2688684|||||||||||||||||||||||||199912271408||||||002376853FHIR, which is what Apple is using, is its own standard, (created/managed through the HL7 organization) and is based on more modern representations of data (JSON, etc). (https://www.hl7.org/fhir/)
I've had to work with the spec, specifically to integrate different products, and it was an ongoing battle with the vendors and their consultants at every step. It's uncharitable to say that they would deliberately mis-interpret what little specification was in place solely to make integration expensive, but that was my feeling. In fact, I believe that one purpose of the specification is to keep competition out of the field.
Looking around, I'm having trouble finding an EHR that implements both importing and exporting data in the FHIR format. Instead I'm seeing products that take the FHIR data and then (presumably) emit HL7 messages aimed at an organizations interface engine (i.e. Cloverleaf or something similar).[0] If none of the big EHR support it, then it will remain an expensive "custom" add-on that will be challenging (and expensive) to support and it will end up another dead initiative like the "Blue Button".[1] With every upgrade to systems in the organization, the FHIR translator app will need to be updated as well. Will it support every vendor? Likely not, and now you may also have to foot some portion of the bill to add support for that vendor.
My fear is that people will see FHIR and Apple and assume that some progress is being made. This is a battle we've been fighting for years and even now, people walk from one office to another with a CD or DVD of data in the hopes that it can be read.
[0]: http://www.intersystems.com/au/our-products/healthshare/hl7-...
Most of the major EHR vendors do now support a significant subset of FHIR resources through read-only APIs. And several of them have publicly committed to start offering limited write APIs by the end of 2018. We have to be a little bit patient.
As for purchasing memberships, well HL7 needs some revenue to keep the lights on. A small company can purchase an annual membership for as little as $1450, and individuals can join for even less.
FHIR is definitely a step in the right direction but it is plagued with the same issues as their other "standards" so I'm not holding my breath.
Are you referring to the data model as the problem? How exactly?
Beyond that, a lot of the most important information is encoded in free text fields, and so isn't directly analyzable. And even when information is mapped to codes from standard medical ontologies, there's no guarantee that when that information is transferred in HL7 formats it includes the code from the ontology.
It's not at all clear what the optimal way to structure medical information should be, so it's no surprise that there's a huge amount of variance out in the world. HL7 is quite old (v2 was made in 1989), and every new variant has to support the existing variants. EHRs were originally designed around billing and administrative workflows, so it's also not surprising that the data structures aren't great for analyzing data or treating patients.
The problem is that HL7 is ostensibly a standardized interchange format, but there's enough ambiguity in the spec that literally every vendor implements things differently which leads to... my job existing.
Vendors implement the spec selectively. They may or may not support any given message trigger. They may have a different idea of what exactly constitutes something as basic as a patient account number and choose to send it in an unexpected field. Or send a piece of data you weren't expecting at all there. There may be a business case for capturing data that wasn't in the spec for a version of HL7 being used -- email addresses are common one today -- that lead to user-defined fields being added ad-hoc.
Honestly, working with HL7 v2 messages like posted above isn't really any substantially harder than working with CSVs. The real headache comes from actually integrating the underlying data.
As a practical matter we can't rely on low-level standards to achieve real interoperability. Since there is often more than one way to model the same clinical information we also need high-level implementation guides with comprehensive examples to show everyone exactly what to do, along with automated conformance testing tools.
"What date did this event occur?", can be assertedDate or effectiveDateTime or performedDateTime or any number of things based on resources.
In the old versions it was even hard to know "What's the patient ID associated with this resource?", sometimes it was "patient" sometimes it was "subject". This has gotten better in STU3, and improvements have also been made to the way practitioners are identified as well.
I think there's a ton of irreducible complexity, but there are also common themes and common parts of medicine that should form the foundation of the API. It seems that instead of thinking, "What are the real commonalities here? Lets make them flexible enough to handle 90% of cases, but with a standard interface for extension." HL7 started from a current cumbersome standard and shoehorned it in.
I really am optimistic though, it's getting better all the time and FHIR is actually remarkably extensible to handle corner cases. I really hope it becomes the standard moving forward, especially as it smooths out the rough edges.
HL7 and ICD-9/10 have two purposes. First, more billable hours for consultants and make work for admins.
Second, expanding the confusopoly, enabling insurers to deny coverage, payment.
The Utopia of Rules: On Technology, Stupidity, and the Secret Joys of Bureaucracy http://a.co/5ux1yrK
I don't know your country's system. Single payer? That'd be nice.
In the Freedom Markets™ loving USA, most everyone exchanging medical data are antagonists. So all the incentives encourage hoarding and obfuscation.
It’s not beautiful, but definitely easier to debug - https://www.hl7.org/fhir/patient-example.json.html
I strongly prefer HL7 2.x, that nasty EDI mutant spawn you show, over HL7 v3 XML XSD SOAP WSDL FHIR CDA what-what insanity every time.
The trick is abandon any thoughts of "schema", "semantics", "meaning" and just treat all these ETL-esque tasks as screen scrapping.
Meanwhile, XML is always the wrong answer. Full stop.
I'd be curious to know why Apple went with HL7. Was it a limitation of the EHRs they're integrating with? A demand of the hospitals?
Implementation costs for a primary EMR are in the millions and most ancillary systems still cost hundreds of thousands of dollars to put in place. There's a lot of financial incentive for healthcare organizations to keep using what "works", even if it is ugly as hell.
HL7 FHIR here is JSON and XML based.
The various work groups aren't really controlled by vendors at all. Provider and payer organizations are also heavily represented.
A sample:
HD|||D8ED6E0E771AA22B|KA2036||TP||||||N|N|N|N|N|N|N|N||||Y|N|Y|N|N|N|N||||||||||||||||||||
AD|||D8ED6E0E771AA22B|||N|N||||||Y|||N||N|||||N|||N|N||
EN|||D8ED6E0E771AA22B||L||KTVI LICENSE, LLC|||||2028953088|||2250 BALL DRIVE|ST. LOUIS|MO|63146||||0017790890|C|||HL7 V2.x messaging is a bit of a monstrosity since the most common ER7 encoding is based loosely on old EDI standards. There is also a standardized XML encoding for V2.x messages which is a little easier to parse, although it's poorly supported in the industry and the schema doesn't really follow XML best practices.
The HL7 standards body has developed many other standards including V3 and FHIR (which is effectively "V4", it just didn't get a new version number in the same series). Most vendors and provider organizations are now moving toward FHIR since it's based on modern open Internet standards and somewhat easier to implement.