Fast Healthcare Interoperability Resources (FHIR) Integration

Okay everyone. I have spent some time looking into this and it appears that the FHIR JavaScript libraries that have been discussed are mainly clients. In other words, if you are Foobar Hospital and wish to consume data from your Acme EHR’s FHIR endpoints, you will want to use one of the clients. If you look at the HL7 site, they reference “Publicly Available FHIR Servers for testing”… I will take this as a sign that most folks are focused on getting clients hooked up rather than implementing the servers themselves.

As for our needs, I believe we need to take a step-by-step approach. To start, it is best to create a C_FastHealthcareInteroperabilityResources.class.php controller to accept queries and CRUD operations. If the base Controller class doesn’t allow for complex variable URI paths (i.e.: /Patient/32/_history/4), I suppose we can use a query string for that as a workaround. Getting this code in place will put pressure on the existing codebase modernization work because the controller layer should really be “talking” with various service classes to get at the data, all while following known OpenEMR domain rules. We definitely don’t want duplicate code!

Once a request comes in, we can use a FHIR parser that PHP calls. We may need to be clever here… the PHP FHIR parser doesn’t appear to be very mature so we may need to think of a way for PHP to make a call to a Node.js script. Like Brady mentioned, the Java solution will most likely have an impact on user installs so it’s best to stick with something simple like PHP/Python/Node from a dependencies perspective.

Once we get a good amount of the FHIR spec covered, the final step will be a good time to look into SMART-compliance and, perhaps, move away from the basic C_FastHealthcareInteroperabilityResources.class.php controller (may need to use a separate Node server) to ensure we are fully compliant with SMART. I don’t think it is a good idea to do this right out of the gate because this is very complex and I have a feeling the auth piece will be difficult.


As far as my GitHub - MatthewVita/fake-patient-web: FakePatientWeb shows a realistic fake patient record in a nice UI as well as in JSON form. 300,000 NAMCS records are used as the data source. TODO: FHIR integration project goes. I am very interested in pivoting the solution so that it’s essentially a fork of GitHub - smart-on-fhir/sample-patients: Utilities to generate sample data as FHIR Resources but uses NAMCS data. As a bonus, I’d like to incorporate it all with the existing GitHub - smart-on-fhir/smart-stub: Node / Express server to stub SMART Auth server. Elements from this dataset can then be used for the CRUD operations of our FHIR server for proper testing.

-m

1 Like