<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abigail Watson on Medium]]></title>
        <description><![CDATA[Stories by Abigail Watson on Medium]]></description>
        <link>https://medium.com/@awatson1978?source=rss-44ca1da87ffd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4BIc9JKM0KUZZGpp.</url>
            <title>Stories by Abigail Watson on Medium</title>
            <link>https://medium.com/@awatson1978?source=rss-44ca1da87ffd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 13:35:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@awatson1978/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How Tiny Acquisition of Meteor Affects Clinical Meteor]]></title>
            <link>https://medium.com/@awatson1978/how-tiny-acquisition-of-meteor-affects-clinical-meteor-75ddc3f96d0e?source=rss-44ca1da87ffd------2</link>
            <guid isPermaLink="false">https://medium.com/p/75ddc3f96d0e</guid>
            <category><![CDATA[clinical-meteor]]></category>
            <category><![CDATA[tiny]]></category>
            <category><![CDATA[fhir]]></category>
            <category><![CDATA[meteor]]></category>
            <dc:creator><![CDATA[Abigail Watson]]></dc:creator>
            <pubDate>Tue, 08 Oct 2019 22:50:38 GMT</pubDate>
            <atom:updated>2019-10-11T01:23:21.934Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How Tiny Acquisition of Meteor Affects Clinical Meteor</strong></p><p>Preface: I have had some coworkers and clients reach out asking my thoughts on <a href="https://medium.com/@sachagreif/an-open-letter-to-the-new-owners-of-meteor-353d64780b20">Sacha Grief’s recent Open Letter.</a> I disagree with some of his analysis, and am generally optimistic about the state of Meteor. The following article is meant to address concerns for healthcare stakeholders who may have investments in Meteor or are considering it for upcoming projects.</p><p><strong>History and Background</strong></p><p>Meteor.js was first unveiled publicly in April 2012. A few months after it’s release, I began using v0.5.6 as one of the early adopters, because a team of MIT alumni engineers had managed to wire up a full stack of Javascript between the D3 data visualization library from Stanford and a document oriented database called Mongo. Having already had a ~15 year career in healthcare IT, I was drawn to Meteor because it offered a 21st century version of the M/MUMPS framework that was used by the very first Electronic Medical Record (VistA, Maxifile, Intersystems Cache, Epic, etc)</p><p>Over the years, I’ve been both an active and inactive community member, and have watched as the Discover Meteor book was written, the Atmosphere Package Manager was introduced, the Velocity debacle, NPM support was added, and more.</p><p>During that time, I created 50+ Meteor prototypes or pilot projects, eventually created a soft-fork (called a release track) and put 80+ packages under quality control. After getting our strategy for FDA validation and verification testing in place, I turned my attention to adding support for the Fast Healthcare Interoperability Resource (FHIR) standard, which defines common data types to transmit over RESTful HTTP interfaces.</p><p>Eventually, we successfully published a HealthRecord app into the Apple AppStore using Fast Healthcare Interoperability Resources, which can connect to and fetch medical records from 500+ hospitals and 6500 office locations. It’s compatible with MACRA and 21st Century Cures laws. Rock on. Meteor has a future within the healthcare ecosystem.</p><p>I’m providing this background as context, because I wish to respond to <a href="https://medium.com/@sachagreif/an-open-letter-to-the-new-owners-of-meteor-353d64780b20">Sachs Greif’s article</a> and share some additional thoughts from somebody who has spent the better part of 5 years hardening Meteor in preparation for Enterprise use.</p><p><strong>Why Apollo Succeeded (And Meteor Didn’t)</strong></p><p>I’m going to disagree somewhat with Sacha’s assessment that Apollo has succeeded where Meteor has failed.</p><p>First off, we need to recognize that Meteor has successfully found a buyer in Tiny and therefore an exit for its initial investors. We don’t know if they’re recouping their initial $30M, but by many measures, this purchase is a a business success. MDG built a product and sold it. A failure would have been the forums drying up and nobody downloading and using Meteor anymore. We’re far from a collapse or bankruptcy. So, a sale is simply business as usual and a realignment of investors and stakeholders.</p><p>3 years in, it’s also very early to call Apollo/GraphQL a success. There is a rising tide of anti-trust sentiment going on right now, with talk in Congress of breaking up the big tech companies. And if Facebook is targeted, it could cause a bumpy road for GraphQL, no matter how good the underlying technology is.</p><p>Additionally, while Facebook commands a huge amount of user attention, and a giant portion of consumer Internet activity may cross GraphQL interfaces, it’s simply not the case that everybody uses it. The healthcare industry, for example, is only just now migrating to REST interfaces, representing trillions of dollars of economic activity each year. Internationally, it’s not clear that China and others are adopting GraphQL. So, suffice it to say that these things are still evolving.</p><p><strong>The Enterprise Market Actually Likes Cathedrals</strong></p><p>Second, if we look at .NET or Java/Oracle, it’s quite obvious that the enterprise market is more than happy to invest in monolithic systems if they’re well maintained. One of the early value propositions of Meteor, in fact, was that it was “.NET for Javascript”. And that drew quite a lot of early interest from enterprise minded developers like myself. So I don’t buy that the “Monolith Problem” was even a problem.</p><p>If anything, I would refer people to the classic text <a href="https://monoskop.org/images/e/e0/Raymond_Eric_S_The_Cathedral_and_the_Bazaar_rev_ed.pdf">The Cathedral and the Bazaar</a>, and suggest that the 7 Principles of Meteor specifically include ‘Embrace the Ecosystem’. In the context of Javascript, this principle was basically was interpreted as ‘Embrace the Bazaar’ — and led to the NPM revolt against Atmosphere. So, the principle of embracing the ecosystem was detrimental to building a monolithic Cathedral, and MDG’s architecture was second guessed by every hobbyist and student and beginner who wanted to use their favorite idiosyncratic library. Hence, in following their principle of Embracing the Ecosystem, MDG was never able to deliver the .NET for Javascript value proposition that they advertised in 0.5.x days.</p><p><strong>Clinical Meteor Release Track</strong></p><p>Enter the Clinical Meteor release track, and our not-so-secret sauce… using U.S. federal laws and international standards to define which packages go into the release track.</p><p>Contrary to popular opinion, FDA regulatory processes and laws such as HIPAA actually provide much guidance and a roadmap to what needs to be implemented for enterprise adoption. For instance, HIPAA tells us that we must have user account systems and an audit log and encrypted data at rest. So, adding packages to address those needs prepares Clinical Meteor to be HIPAA compliant and adopted by hospitals.</p><p>Likewise, the FDA specifies that medical devices with electronic interfaces undergo validation (user) and verification testing. So, it’s not sufficient to merely have unit testing. We must have two or more testing approaches to prevent systemic bias, one of which includes end-user acceptance testing.</p><p>There are even groups like HL7 who are devoted to defining commonly used data models and REST endpoint syntax that congress has adopted and is now requiring hospitals and EHR vendors to support. These efforts are known as Fast Healthcare Interoperability Resources.</p><p>To date, we’ve managed to fetch records from nearly all the major EHR vendors (Epic, Cerner, AllScripts, etc), the Centers for Medicare and Medicaid, and a long-tail of medical device vendors, ranging from microbiome sequencing laboratories to consumer medical device to radiology image archives. And the jewel of the project is our Longitudinal Timeline that’s in the App Store using HealthKit/HealthRecords, and which can connect to &gt;87% of hospitals in the US on a direct per-contract basis.</p><p>(Presumably, following federal regulations in other industries, such as implementing SOX or PCCI compliance, would also help drive enterprise adoption. My hypothesis is that the lack of adoption is not due to a monolithic infrastructure; its due to the unseriousness of hobbyists and students to dive into the minutia of regulatory requirements and to hack core infrastructure so its compliant with regulations.)</p><p><strong>Clinical Meteor Architecture</strong></p><p>To achieve these successes, we have had to heavily modify the Meteor stack. While we haven’t entirely gotten rid of DDP, we have greatly scaled back its use, and it’s now mostly only used for audit logs and worklists. Everything else we’ve swapped out for REST+OAuth.</p><p>To give you an idea of how far we’ve modified things, this is a basic breakdown of what our flavor of Meteor looks like nowadays:</p><ul><li>Build Pipeline</li><li>Atmosphere Package Manager</li><li>Mongo</li><li>Most DDP is disabled</li><li>REST interfaces via JsonRoutes</li><li>OAuth2 Server</li><li>Minimongo</li><li>React</li><li>SimpleSchema</li><li>Basic Apollo Support</li><li>Material UI</li><li>Cordova / Electron</li></ul><p><strong>What We Like About Meteor</strong></p><p>There’s a lot to like about Meteor, and I feel it’s worth highlighting the value propositions that continue to make Meteor a winner compared to other frameworks like .NET or Java/Oracle.</p><ul><li><em>Build Tool &amp; Pipelines:</em> The build tool is a work of art and a workhorse. I had it continuously compiling code nearly non-stop for 6 months in the lead up to our release to the Apple App Store. It should be promoted as being in the same category as XCode and Visual Studio, as being an industrial grade compiler for Javascript. What’s more, the V8 Javascript interpreter is the only code interpreter that I know of that runs on clients, servers, databases, testing frameworks, and hardware microcontrollers. The build tool handles all those environments with a network-ready expressive language.</li><li><em>Clinical Informaticist Productivity:</em> Healthcare is fuzzy and messy and complicated, and Clinical Informaticist don’t have time or interest in wrestling with syntax or translate languages between the server and client and database. Isomorphic Javascript to the rescue! Being able to mock up an algorithm on the client, and effortlessly refactor it to the server, and then into an optimized database script… it’s heaven. It allows us to spend more time focusing on clinical problems than focusing on the technology.</li><li><em>Worklists</em>: The data distribution protocol (DDP) continues to be an almost perfect implementation for any usecase involving a clinician worklists. Worklists tend to have hundreds of entries, not many millions or billions of entries. Worklists require push notifications and real time updates. We see the major EHR players currently trying to implement with REST and websockets what DDP has been handling for nearly 5 years now.</li><li><em>Distributed Mongo: </em>10 years ago people discovered NoSQL and thought it was the newest greatest thing. In reality, NoSQL predates SQL, and goes back 50 years to document oriented databases. Healthcare was actually an early adopter of IT, and has been happily using document oriented databases for decades. But pity the poor admin responsible for maintaining a MUMPS or Cache system. So we love Mongo as a 21st century version of MUMPS, and we particularly love how minimongo works as a client-side replica set. We see huge opportunity with IPFS, BigChain, and various advanced mesh topologies and blockchain using the minimongo library.</li><li><em>Real-time Data Visualizations</em>: Before Meteor, our stack used Mongo + PHP + D3. The value proposition was in saving the state of a client side data visualizations to a database as-is without any destructive normalization and preserving the tree-like hierarchical data structure. Swapping out PHP for Javascript remains one of the best architecture decisions ever. And the user interfaces we are able to conceive nowadays is miles ahead of what others in the healthcare space can accomplish with the same size team.</li><li><em>Cordova / Electron Device Integration </em>— After we switched to React, we’ve come close to achieving a write-once, run-anywhere architecture. The nature of interpreted Javascript means we have a much narrower millisecond response window to work with before the user notices lag compared to native applications. But with a QA infrastructure and careful auditing of code, it’s possible to write perform at Javascript apps that are effectively indistinguishable from native. That being said, we would welcome a wider millisecond response window, and are looking forward to WebAssembly and ReactNative converging with vanilla React.</li></ul><p><strong>Atmosphere Seemed Like A Good Idea At The Time:</strong></p><p>Hindsight always has 20/20 vision, and there was a time when NPM didn’t support client side libraries and imports. Atmosphere was a path to heck taken one step at a time. Using two package managers, mediocre offline access, refetching packages on any and every Meteor command, network and disk thrashing, gigabytes of package caches, and numerous other things leave us worried about the package management system.</p><p>Increasingly, we’ve been relying on METEOR_PACKAGE_DIRS and METEOR_OFFLINE_CATALOG to bypass Atmosphere altogether. We hope that Tiny will explore the possibility of adding support for GitHub Package Repository API, and thereby reduce the number of server dependencies it requires to run Meteor, which should also improve offline support, disk usage, disk/network thrashing, and similar concerns.</p><p>Along the same lines, there are numerous groups who have developed WordPress style base templates that they reuse between client projects. This is greatly facilitated with the meteor run —extra-packages option, but is missing in meteor build when preparing for a production deployment.</p><p><strong>The Velocity Debacle</strong></p><p>Velocity ranks as one of the worst experiences I’ve had in the open-source community, and one that was entirely preventable had there been more structured governance. What happened with Velocity would never have happened in an Enterprise environment that had a Human Resources department and any sort of diversity training or consequences for bad behavior.</p><p>Suffice it to say that the self-appointed leads of the Velocity project had little to no understanding of validation and verification testing as used by federal agencies such as NASA or the FDA. Meteor <em>still</em> lacks a proper validation test harness (aka user acceptance testing utility).</p><p>To that end, we hope that Tiny will consider providing integration support and documentation for Nightwatch and/or WebDriver.io in the next iteration of documentation.</p><p>The Velocity debacle set back the Meteor community by nearly 4 or 5 years with acceptance testing; but it’s not too late to right the ship and set it back on the right course. We also encourage any stakeholders who want to see broader adoption of Meteor within enterprise to speak out on this issue.</p><p>We also hope that governance structure is more carefully considered, regarding who gets to participate in community Meteor development. There is a tendency for women’s contributions to be deleted or downvoted while in-crowd cliques tag-team their preferences.</p><p><strong>Enterprise Market Expectations</strong></p><p>If I had to list a few of the critical must-haves that our enterprise clients look for when making decisions on tech stack, I’d have a short list like the following:</p><ul><li><em>Security</em>: Most all of our clients are obligated by HIPAA. This means we need encrypted data at rest and on the wire (SSL) and user account systems, which Galaxy actually mostly provides. A quickly growing portion of our clients are also obligated by MACRA and 21st Century Cures, in which case they also need OAuth2 and OpenID.</li><li><em>REST Interfaces</em>: As amazing as DDP and Apollo are, our clients by and large are still working on setting up REST interfaces. Moreover, MACRA and 21st Century Cures both require ‘interoperability protocols’, of which the HHS Office of the National Coordinator has determined that FHIR qualifies as. In turn, FHIR is primarily architected around RESTful HTTP. The takeaway for the Meteor community is that hospitals and healthcare enterprises get reimbursed and paid for installing REST interfaces, not DDP or GraphQL.</li><li><em>Quality Control and Testing: </em>Until you’ve sat in on a post-mortem to figure out how to respond to the death of a patient or customer due to your equipment installation or service failure, and how your business is going to respond to the subpoena and lawsuits, it’s hard to put quality control in the appropriate context. Suffice it to say that enterprises take quality control as mission critical endeavors. Furthermore, “validation and verification testing” as defined by many federal regulatory clauses requires two or more testing frameworks to address systemic testing biases. Validation in particular is understood as end-user acceptance testing. Even though they’re damn difficult to set up and maintain, Meteor isn’t being considered without a user acceptance testing framework strategy.</li></ul><p><strong>Go-Forward Risks — Release Track Discontinuation</strong></p><p>Going forward, there’s a real question of whether Tiny will continue supporting the Meteor release track functionality. They’re a great feature, but not heavily used. As such, they could be dropped. If Tiny removes support for release tracks, Clinical Meteor will need to do a hard fork (which we’d rather not) and assume responsibility for maintaining the build tool ourselves. We’re prepared to do that, if necessary. But we’d much rather focus on clinical informatics, and let Tiny focus on the infrastructure.</p><p><strong>Go-Forward Risks — Hosting</strong></p><p>Going forward, there’s also some questions about hosting. Clinical Meteor is moderately invested in Galaxy hosting, as it is suitable for 21st Century Cures apps, but lacks features necessary for HIPAA apps. We are also concerned about Amazon’s growing monopolies in supply chain management and web-hosting. AWS has been a great platform for he past decade, but it’s also starting to feel like the same kind of lock-in as Microsoft and Apple have enjoyed in the past. So, we’re interested in seeing more support of Meteor apps running on Azure and other platforms.</p><p><strong>Next Steps</strong></p><p>In general, I mostly agree with Sacha’s recommendations for next steps. Except I tend to lean towards REST and OAuth instead of Apollo/GraphQL.</p><ul><li>Rerelease a Statement of Principles</li><li>Embrace REST and OAuth</li><li>Rebrand</li></ul><p><strong>Clinical Meteor Architecture — Go Forward Roadmap</strong></p><p>For those using the Clinical Meteor track or wanting to align efforts, I’d like to provide the following wishlist of core infrastructure that we need help advocating for and aligning efforts around. I’ve tried to provide rational elsewhere in this article, so here are our top half-dozen or so roadmap items. Any help on these items is appreciated!</p><ul><li>Typescript</li><li>JsonSchema</li><li>GitHub Package Manager</li><li>WebAssembly</li><li>Deeper Nightwatch.js integration</li><li>Azure ActiveDirectory/Kerberos</li><li>Refactoring Tools / Build Tool GUI</li><li>Docker Build Pipelines</li></ul><p><strong>Branding</strong></p><p>I do happen to agree with Sacha that some re-branding may be worthwhile. Tiny will need to decide what it wants to do with the Meteor intellectual property, and whether it goes for a 2.0 version, or rebrands, or something else.</p><p>I should announce now that Clinical Meteor itself is considering rebranding now that we’ve published into the Apple App Store and have a v1.0 release. It’s always been more pragmatic than anything else, and I’m aware that it’s a bit clunky.</p><p>It’s probably worthwhile soliciting some suggestions, even if it’s just a forum thread. And perhaps brainstorming some branding guidelines for the community. I would hazard to say that we’re going to be doing some market surveys before long, and doing some polling on what people think of some alternative brand names.</p><p>A few ideas I’ve come up with while sitting here on the tarmac waiting for this plane to take off include:</p><ul><li>IsomorphicHealth</li><li>SimHealth</li><li>SimClinic</li><li>FhirCore</li><li>IsomorphicFhir</li><li>FhirMesh</li><li>MeshHealth</li><li>HealthGrid</li><li>FhirGrid</li></ul><p><strong>Conclusion</strong></p><p>In conclusion, I want to assure the various stakeholders who use Meteor, Clinical Meteor, and Symptomatic that the Clinical Meteor track is monitoring the Tiny acquisition closely and isn’t overly concerned right now. Our quality assurance framework and continuous integration servers are running on every commit, and Nightwatch has helped us navigated refractors from PHP to Backbone to Spark to Blaze to React. We’ll be able to handle whichever direction Tiny chooses.</p><p>With that said, the Tiny acquisition actually represents a great opportunity to address some outstanding issues with core infrastructure. We will have to see what they prioritize, but I’m cautiously hopeful that this will inject some needed governance and prioritize features that we’ve been asking for.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75ddc3f96d0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apollo on FHIR Architecture]]></title>
            <link>https://medium.com/@awatson1978/apollo-on-fhir-architecture-3d5bf4d0fc97?source=rss-44ca1da87ffd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d5bf4d0fc97</guid>
            <category><![CDATA[healthcare]]></category>
            <category><![CDATA[fhir]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[interoperability]]></category>
            <category><![CDATA[meteor]]></category>
            <dc:creator><![CDATA[Abigail Watson]]></dc:creator>
            <pubDate>Tue, 29 Aug 2017 22:33:18 GMT</pubDate>
            <atom:updated>2017-08-29T22:33:18.768Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I’ve been answering a lot of questions about integrating Meteor on FHIR and the Clinical Meteor project with different back-end technologies. The questions are somewhat all over the place, and generally include the following:</p><p><em>Q: Can Meteor apps connect to our SQL database? <br>Q: Can Meteor on FHIR work with our Hadoop datalake? <br>Q: Our iOS client is written with React Native; how can we integrate Meteor on FHIR into our stack and contribute to the project?<br>Q: W’ve been moving away from Meteor towards React/.NET. How can we use the Meteor on FHIR webservices? <br>Q: We have an existing Python based genomics pipeline. How would you integrate with us? <br>Q: Do you support R, Python, and SAS bioinformatics pipelines?<br>Q: Do you support graph databases?<br>Q: How can we integrate the _____ web API? <br>Q: Do you support Internet of Things and other smart devices?<br>Q: Blockchain!</em></p><p>And so on and so forth.</p><p>These questions have been kicking about in one form or another for years, and today I’d like to introduce to you the outlines of the next-generation architecture for Meteor on FHIR, Clinical Meteor, and Symptomatic Apps. Today, we’re going to introduce a <strong>database proxy</strong>. Specifically, we’re going to start outlining how the <strong>Apollo GraphQL</strong> server integrates with Meteor on FHIR.</p><p>Before diving into the Apollo on FHIR architecture, let’s review a couple ideas about how we prepare and send data from servers to clients. We’ve spent much of past two decades sending data on the internet through REST endpoints. REST endpoints are server-oriented, in that they general represent an underlying database, data query, or collection. It is up to the client to contact multiple REST endpoints, gather the data necessary, and do something with it in the web page or webapp.</p><p>GraphQL is a newer client-oriented technology. With GraphQL, data is assembled on the server, and sent to the client in a format as close as possible to what the client needs for final page rendering. Each GraphQL endpoint is designed for a specific client; and often a specific client component or user interface. In this sense, it’s similar to a mainframe terminal or thin-client, in that page layout and data parsing is done on the server as much as possible.</p><p>The Apollo server builds upon GraphQL by fetching external endpoints, bundling them up into GraphQL queries, and exposing them as publication/subscriptions so apps can have real-time responsive interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ZhemotoNJxqK4RUzWfYCcg.png" /></figure><blockquote>Credit to:</blockquote><p>Fantastic. We can consolidate our client side queries into single lines of communication with the server; which reduces network bandwidth, and simplifies client side development. So, how does this relate to Meteor on FHIR?</p><p>Well, to answer that question, we need to step back, and take a look at what the Meteor architecture looks like. Extending the above network diagram, the Meteor stack can be roughly described as a MongoDB database, connected to a Node.j server, which instantiates the Meteor object. The Meteor object sets up publication/subscriptions via the Data Distribution Protocol to the client, which is running React. And in the case of Clinical Meteor and Symptomatic Apps, is also running Material UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IKAE509QW0AADOQzvt2JtQ.png" /></figure><p>So what does Meteor on FHIR bring to the table? First and foremost, it brings the FHIR standard, which is essentially a REST API. But it also brings <em>data schemas</em>. And what’s really fantastic about Meteor, is that it uses <em>isomorphic javascript</em>. Between these two things, we can use the FHIR schemas as our database schemas, server validation schemas, client schemas, and via our REST endpoints. This is phenomenally useful; and creates what we refer to as our <em>data layer.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a8dKTqhgQaKmw57h0VeMyg.png" /></figure><p>So, what does Apollo provide, then? Having a FHIR compliant data layer seems really great. Why would we need Apollo?</p><p>Backwards compatibility. As much as we may want to focus on next-gen interfaces and protocols; the fact of the matter is that the bulk of healthcare is squirreled away behind firewalls and in proprietary data-stores. So, what Apollo provides is a <em>database proxy</em>, which can connect to multiple database backends…. SQL, Oracle, Cassandra, Hadoop, BigTable, etc. The Apollo database proxy is designed to manage database queries, and map them onto a GraphQL data query.</p><p>What’s of particular interest, however, is that this database proxy isn’t just limited to static databases. It can also handle web APIs, twitter feeds, RSS feeds, and other forms of streaming data. And <em>that</em> means it can connect to the Meteor on FHIR endpoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKSz1H_veb3QfNyIuPvZkw.png" /></figure><p>So, bringing it all together; what we want to do is layer the Apollo database proxy so it queries the Meteor on FHIR rest endpoints. With such an architecture, our GraphQL queries can proxy to SQL, Oracle, and Apache databases, as well as connect to FHIR databases, FHIR caches, FHIR proxies, and FHIR enabled apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nYe72aQpFY3BTK23B2g-IQ.png" /></figure><p>Pretty exciting, right? A FHIR enabled healthcare interoperability data layer. There’s a few refinements we’re still working out, but this is the general idea. Apollo proxies to web services, database, and Meteor on FHIR; and Meteor on FHIR is providing schemas between our FHIR database, server, client, and REST endpoints.</p><p>Thanks for reading through.</p><p><strong>References</strong></p><p><a href="https://medium.com/google-developer-experts/graphql-and-the-amazing-apollo-client-fe57e162a70c">GraphQL and the Amazing Apollo Client</a><br><a href="https://www.hl7.org/fhir/resourcelist.html">Fast Healthcare Interoperability Resources</a><br><a href="http://clinical.meteorapp.com/">Clinical Meteor Track</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d5bf4d0fc97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HL7 v2 to FHIR Interface Mapping]]></title>
            <link>https://medium.com/@awatson1978/hl7-v2-to-fhir-interface-mapping-f83c6ecf6bee?source=rss-44ca1da87ffd------2</link>
            <guid isPermaLink="false">https://medium.com/p/f83c6ecf6bee</guid>
            <category><![CDATA[ehr]]></category>
            <category><![CDATA[hl7]]></category>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[fhir]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Abigail Watson]]></dc:creator>
            <pubDate>Fri, 03 Feb 2017 05:29:15 GMT</pubDate>
            <atom:updated>2017-02-04T00:00:55.479Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, we’re going to explain how to send data from an electronic health record (EHR) to a full-stack javascript webapp using an HL7 interface engine. We will be mapping data from the 1980s era HL7 v2 standard to the modern Fast Healthcare Interoperability Resources web standards.</p><h4>Architecture Overview</h4><p>The most basic HL7 interface between two electronic health records is an Admit/Discharge/Transfer (ADT) interface. An ADT interface may be either <em>unidirection</em> or <em>bidirectional</em>, depending on whether a return message is sent. <br>For the purpose of this tutorial, we are interested in passing data from an older EHR that uses the HL7 v2 standard to a newer EHR that uses Fast Healthcare Interoperability Resources (FHIR). Assuming that EHR A only speaks v2, and EHR B only speaks FHIR, it’s necessary to have an <em>interface engine</em> between the two, which is responsible for transforming messages from v2 to FHIR.</p><p>As such, we have a interface comprised of two <em>channels</em>, which includes four <em>links</em>, and eight <em>endpoints</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1TzPt-wQrODkxczk9r-_w.png" /></figure><p>However, in a production setting, the originating EMR may only have live data, which is inappropriate to use for building up an interface. So, for the purposes of building an app and this tutorial, we want to use a testing utilities to simulate the EHR interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5frESz4H_eFjlWt7hdBFBg.png" /></figure><p><strong>Install the Tools</strong></p><p>You’ll need to install the following tools and utilities. This tutorial assumes that you have a vanilla installation, and haven’t configured them yet.</p><p><a href="https://www.mirth.com/">Mirth Connect HL7 Interface Engine</a> <br><a href="http://www.mirthcorp.com/community/wiki/display/mirth/FHIR+Technology+Preview+2">Mirth FHIR Technology Preview 2</a><br><a href="https://www.google.com/chrome/">Google Chrome Web Browser</a> <br><a href="https://www.meteor.com/">Meteor Javascript Platform</a><br><a href="https://github.com/clinical-meteor/meteor-on-fhir">Meteor on FHIR Interface Engine</a><br><a href="https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en">Postman HTTP Endpoint Utility</a><br><a href="http://hl7api.sourceforge.net/">HAPI HL7 Endpoint Utility</a></p><blockquote>Note: Due to the number of components involved in this tutorial, we recommend using multiple monitors. This is a task that is facilitated with screen real estate. Dual HDMI or Thunderbolt monitors will make this tutorial much easier.</blockquote><p><strong>Meteor on FHIR Configuration</strong></p><p>For running this tutorial, you will want to use thesettings.tutorial.json settings file, and turn on debugging.</p><pre>git clone <a href="http://github.com/clinical-meteor/meteor-on-fhir">http://github.com/clinical-meteor/meteor-on-fhir</a><br>cd meteor-on-fhir/webapp</pre><pre>NODE_ENV=test DEBUG=true meteor --settings settings.tutorial.json</pre><p>This tutorial relies on the default outbound interface being active; so be sure to set the status and endpoint if you decide to experiment.</p><pre>{<br>  &quot;public&quot;:{<br>    &quot;interfaces&quot;: {<br>      &quot;default&quot;: {<br>        &quot;status&quot;: &quot;active&quot;,<br>        &quot;channel&quot;: {<br>          &quot;endpoint&quot;: &quot;<a href="http://localhost:3000/">http://localhost:3000</a>&quot;<br>        }<br>      }<br>    }<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRr10qJsYd73bigyea2osg.jpeg" /></figure><h3><strong>Part 1 — Admitting a Patient from the EHR</strong></h3><p>The case sample begins with a patient Jane Doe who is registering at a walk-in clinic for the first time for an X-Ray of a broken arm. The front-desk receptionist is responsible for taking her information, Name, Age, Date of Birth, and adding it into the electronic health record, which will assign Jane a medical record number. When this happens, the EHR system will notify the Radiology system that Jane has arrived.</p><p><strong>The Admit Discharge Transfer (ADT) Message</strong></p><p>Before we begin setting up our interface, we should take a look at the v2 message we’re going to send. The cannonical HL7 v2 message is an ER7 (Pipe and hat) message sent over Dual Port MLLP (Minimum Link Layer Protocol). It looks like this:</p><pre>MSH|^~\&amp;|EPICADT|DH|RADADT|DH|201701010915||ADT^A01|MSG000001|P|2.3<br>PID|||MRN12345^5^M11||Doe^Jane||19780101|F||C|||||||||123456789|</pre><p>Unless you’ve been in the industry for a long time, this probably looks like gibberish to you. And you’re not the only one. There’s a reason we don’t use this format anymore. Yet somehow it’s still widely used, so it’s important to be able to parse it.</p><p>The important things to remember are that this format was invented when RAM in computers was measured in kilobytes and modem speeds were 2,400 bit/s. It may seem terse, but all you need to remember is that the pipe character | is a field separator, which makes the entire message basically like a comma or tab separated file. The carrots ^ denote subfields.</p><p>If you’re not familiar with modems, they’re point-to-point communication devices used in the 70s and 80s. When we talk about Dual Port MLLP, we’re talking about an Ethernet technology to simulate a modem link. It’s a minimalist bare-bones TCP/IP connection. As simple as you can get.</p><p>Each HL7 v2 message has a segment header. In this case MSH which stands for Message Header. You’ll also see that it’s of type ADT A01. By using an HL7 <a href="https://catalyze.io/learn/hl7-201-the-admission-discharge-transfer-adt-message">Segment ID Lookup Table</a>, you’ll see the following segment corresponds to an Admit/visit notification.</p><pre>MSH|^~\&amp;|EPICADT|DH|RADADT|DH|201701010915||ADT^A01|MSG000001|P|2.3</pre><p>The second segment is a Patient Identification segment, which contains basic demographics for a patient, including medical record number, name, and date of birth.</p><pre>PID|||MRN12345^5^M11||Doe^Jane||19780101|F||C|||||||||123456789|</pre><p><strong>Configuring the Outbound v2 Endpoint</strong></p><p>The first thing we need to do is set up our V2 endpoint. We’ll configure it with Dual Port MLLP (Minimum Link Layer Protocol) using the ER7 (Pipe and hat) encoding. We’ll want to take note of the inbound and outbound ports, which we’ll use later when setting up Mirth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hvlJTtm8Bb4OsrIBxux9hw.png" /></figure><p>Click the ‘Start’ button, and you should see the localhost:61839 light up green, and be routed to a new page where we can specify an ER7 message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xiFvmmLkC_nQfg7cvqYYfw.png" /></figure><p><strong>Configuring the Inbound v2 Endpoint</strong></p><p>Before we can send the message, we need somewhere to send it <em>to</em>. We begin configuring the destination endpoint by logging into Mirth, and setting up a new channel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ktJns8PBq0M-o3FVnDFUKw.png" /></figure><p>Most of the default channel settings are fine to use. These settings become more important when the interface is in production, and lots of data is flowing through the interface engine. That’s when things like pruning metadata, caping storage, and encrypting the database become important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhnJMR38yg3E6KL3mbi0kw.png" /></figure><p>Click on the <strong>Source</strong> tab to begin configuring the other endpoint of our first link. Remember that port 61839 from the other endpoint? We want to set up a TCP listener on that port. Add an auto-generated response (which we call an <em>ACK</em> or <em>acknowledgement</em>), and set the transmission mode to MLLP. And we should be good to go. There are many more options available to fine-tune the interface in a production environment. But for now, simply Deploy Channel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v12uxi7xtKfkMR0BOgR3bQ.png" /></figure><p><strong>Creating the v2 to FHIR Channel</strong></p><p>The idea behind an <em>interface engine</em> is that it connects inbound interfaces to outbound interfaces. Each of these connections is called a channel. And we begin defining a channel by specifying it’s inbound and outbound datatypes.</p><p>For the purposes of this tutorial, we’re interested in mapping legacy v2 messages to modern FHIR messages. And since FHIR is based on modern web standards, the format we’re interested in is the Javascript Object Notation (JSON). So lets begin creating the channel by going back to the Data Types tab, and specifying an inbound datatype of HL7 v2.x, and an outbound datatype of JSON.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*xStOcKEqRCeWCuVHZtisNQ.png" /></figure><p>We’re now ready to set up the outbound FHIR endpoint. Go to the <strong>Destination</strong> tab, and giving the destination a custom name and specifying an HTTP Sender connector type. We’re interested in sending a POST message to the /fhir/MessageHeader route. Since HTTP doesn’t support ED7 encoding, we’ll also need to transform our message. So we’ll need to specify the content as $(message.transformedData).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tjmAoPp9RiBoyTzkNsns1w.png" /></figure><p><strong>Mapping the ADT Message to a FHIR Patient Resource</strong></p><p>To transform the data, click on <strong>Edit Transformer</strong>, which will take you to a scripting page. We need to create a MessageHeader object to map the MSH segment to, and a Patient object to map the PID segment to. Specific fields in the v2 message (delimited by the | character) can be accessed using array notation using a dot syntax. This mapping will be most easily done by simply looking at the mapping sample below for guidance. When done, <strong>Validate Script</strong> and <strong>Deploy Channel</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vy5j9Pe-vLr74vZpR9i5cw.png" /></figure><blockquote>See the entire <a href="https://github.com/clinical-meteor/meteor-on-fhir/blob/master/mirth-channels/v2.to.fhir.patient.channel.js">v2 to FHIR Patient Channel Mapping File</a></blockquote><p><strong>Sending an ADT Message from one App to Another</strong></p><p>We’re now ready to log into the Meteor on FHIR app, and receive an message. Open up Meteor on FHIR and log in as a System Administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DrmkaoTYgfvBlArPP0si8A.png" /></figure><p>Confirm that there are no messages or patients in the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DKq-K2SvZ1w3aUqGEdFB5A.png" /></figure><p>Now go to the HL7 v2 endpoint utility, make sure our ED7 message is correct, that the connection is started on localhost, and then click <strong>Send</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4b85AzIz1TbfdXrXG7vwSw.png" /></figure><p>If everything works correctly, the interface engine dashboard should auto-increment, indicating that a message was both Received and Sent. You may need to refresh the app to get the latest metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bOJmQxys8n58fwlif0zy-Q.png" /></figure><p>If you drill down on the channel, you’ll see a message log where you can see the status of each message. Click on <strong>Transformed</strong> to see FHIR message that the transfomer script generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rcM0_CcLe8w1DcJWlvmlOg.png" /></figure><p>If the message was sent successfully, we should now be able to go to the Meteor on FHIR app, and see a message in the Inbound HL7 Message log.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pFJOVjPzHbt4pMPwN6H2fg.png" /></figure><p>We should also have a patient registered in the Patient index.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RIjz0t5uj_HuuUIWtdt6jg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wyav7wl88dpmmVBhN1b_Tw.jpeg" /></figure><h3>Part 2 — Returning A Patient to the EHR</h3><p>Now it’s time for the return trip. Our case sample is that of sending the patient back to the original system with some edits to the demographic information.</p><p><strong>The FHIR Patient Resources</strong></p><p>On the return trip, we will be sending the same information; but with modern web-standards and using the Javascript Object Notation (JSON). As you can see, this format is more verbose and structurally formatted. JSON is comprised of a hierarchical data structure, so most JSON objects can be represented as a branching tree of some sort. This makes it very convenient for representing healthcare data; as the science of biology is fundamentally comprised of tree, graph, and web datatypes.</p><pre>{<br>  &quot;resourceType&quot; : &quot;Patient&quot;,<br>  &quot;identifier&quot; : [{<br>    &quot;use&quot; : &quot;usual&quot;,<br>    &quot;type&quot; : {<br>      &quot;coding&quot; : [{<br>        &quot;system&quot; : &quot;<a href="http://hl7.org/fhir/v2/0203">http://hl7.org/fhir/v2/0203</a>&quot;,<br>        &quot;code&quot; : &quot;MR&quot;<br>      }]<br>    },<br>    &quot;value&quot; : &quot;MRN12345&quot;<br>  }],<br>  &quot;name&quot; : [{<br>    &quot;family&quot; : [<br>     &quot;Doe&quot;<br>    ],<br>    &quot;given&quot; : [<br>      &quot;Jane&quot;<br>    ],<br>    &quot;text&quot; : &quot;Jane Doe&quot;<br>  }],<br>  &quot;gender&quot; : &quot;F&quot;<br>}</pre><p><strong>Configuring the Inbound v2 Endpoint</strong></p><p>Setting up the inbound v2 endpoint is fairly straight forward. We simply need to configure a Receiving Connection with a new port number and start it. In this example, we will use Single Port MLLP, as the Mirth interface engine’s outbound TCP Sender is a ‘fire-and-forget’ setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*pWsv33ijk5Qxbz5THhvhNw.png" /></figure><p>Once started, the interface will display an activity monitor, where we can watch for incoming messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*-mi7GPDNbktSLKUWIRWVVA.png" /></figure><p>We start configuring the interface engine for the return trip by creating a second channel named <strong>Return Trip</strong>. In practice, this will usually be named with the receiving EHR system’s info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWumG-kgrQAqBGWnkDyEQQ.png" /></figure><p>For the next step, it’s important that you’ve installed the <a href="http://www.mirthcorp.com/community/wiki/display/mirth/FHIR+Technology+Preview+2">Mirth FHIR Technology Preview 2</a>, as we want to install a <strong>FHIR Listener</strong> as our Source connector type. We will also want to specify the JSON format, and enable the Patient Resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ewAqoqIcdUVy7HxGtHQ3QQ.png" /></figure><p>Next, configure the Destination connector type to be a <strong>TCP Sender </strong>with <strong>MLLP Transmission Mode</strong>. Use the address and port number from the v2 endpoint utility. Lastly, specify ${message.transformedData} for the message content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9lNeNqQzc2PDO9dDJ5aFNQ.png" /></figure><p>Now it’s time for the return mapping. In this script, we’re starting with a JSON object, and using it to build a string. The pattern used here is a stitching or decorator pattern; where we continuously decorate the string with one field after another. Be aware that we need to <em>escape</em> certain characters using the \ character; that the date string has to be broken up into its component parts, segments are separated by the \r character, and the JSON object isn’t guaranteed to have all of it’s fields filled out, so we have to use defensive programming and check each value is present before assigning it into the string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UER00HJCpm-UUNwOse2KTA.png" /></figure><blockquote>See the entire <a href="https://github.com/clinical-meteor/meteor-on-fhir/blob/master/mirth-channels/fhir.patient.to.v2.channel.js">FHIR Patient to V2 Channel Mapping File</a>.</blockquote><p>Once this is all completed, we can go back to our application, and send a Patient through the interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0n1noFpm40MPCN3_kHlXEg.png" /></figure><blockquote>You can install default patient data with Meteor on FHIR by specifying the Patients environment variable, like so: <em>Patients=true meteor</em></blockquote><p>If everything works, we should see a message Received over the channel, and Sent to the v2 endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fqJ8j25NcDH0ZBZglSdtBw.png" /></figure><p>Inspecting the message should show us the raw Patient object that was sent from the Meteor on FHIR server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQabLUkAXjMHmI4cQlEMTQ.png" /></figure><p>And the transformed ED7 message that was sent to the v2 endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ncTFCanGAQyU-lGcAznuNg.png" /></figure><p>Which, if everything worked correctly, should have arrived in our activity monitor. Success! It works!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*McrhH_hhrvKHyDWYrcRFwg.png" /></figure><p><strong>The Received HL7 v2 Message in ED7 Format</strong></p><p>If everything worked correctly, you should have received the following message.</p><pre>MSH|^~\&amp;|MeteorOnFHIR||HAPI||201722238||ADT^A01|20338|P|2.6|<br>PID|MRN12345|cTtAcSGnhE2cqApnQ||John Doe||1975-02-03T00:00:00.000Z|M|||||||||||||||||||||||</pre><h3>Conclusion</h3><p>Congratulations. If you’ve made it through the tutorial, and sent a patient through each system and completed the round-trip, you can say that you’ve built both a v2 and FHIR interface.</p><h3>References</h3><p><a href="http://hl7api.sourceforge.net/">HAPI HL7 Endpoint Utility</a><br><a href="https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en">Postman HTTP Endpoint Utility</a><br><a href="https://www.google.com/chrome/">Google Chrome Web Browser</a> <br><a href="https://www.mirth.com/">Mirth Connect HL7 Interface Engine</a> <br><a href="http://www.mirthcorp.com/community/wiki/display/mirth/FHIR+Technology+Preview+2">Mirth FHIR Technology Preview 2</a><br><a href="https://www.meteor.com/">Meteor Javascript Platform</a><br><a href="https://github.com/clinical-meteor/meteor-on-fhir">Meteor on FHIR Interface Engine</a></p><p><a href="https://catalyze.io/learn/hl7-203-the-hl7-orm-order-entry-message">Catalyze.io — The HL7 ORM Order Entry Message</a><br><a href="https://catalyze.io/learn/how-to-integrate-with-epic-or-any-ehr">Catalyze.io — How to Integrate with Epic or any EHR</a><br><a href="https://catalyze.io/learn/hl7-201-the-admission-discharge-transfer-adt-message">Catalyze.io — The Admission/Discharge/Transfer ADT Message</a><br><a href="https://corepointhealth.com/resource-center/hl7-resources/hl7-obx-segment">CorePointHealth — HL7 OBX Segment</a><br><a href="https://corepointhealth.com/resource-center/hl7-resources/hl7-oru-message">CorePointHealth — HL7 ORU Segment</a><br><a href="https://corepointhealth.com/resource-center/hl7-resources/hl7-orm-message">CorePointHealth — HL7 ORM Segment</a><br><a href="http://hl7-definition.caristix.com:9010/HL7%20v2.3.1/segment/OBX">Caristix — OBX Segment</a></p><p><a href="https://www.hl7.org/fhir/overview.html">Fast Healthcare Interoperability Resources — Overview</a><br><a href="https://www.hl7.org/fhir/resourcelist.html">FHIR Resourcelist — DTSU2</a><br><a href="https://www.hl7.org/fhir/patient.html">FHIR Patient Resource</a><br><a href="https://www.hl7.org/fhir/messageheader.html">FHIR Message Header Resource</a></p><p><a href="https://www.youtube.com/watch?v=Muv3R_6AXls">Day Made of Glass 2 (Medical Edit)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f83c6ecf6bee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>