web stats
Mirth FHIR Technology Preview 1 Released! - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 07-22-2015, 01:55 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default Mirth FHIR Technology Preview 1 Released!

We just released a new technology preview that will help you kick-start FHIR® support within Mirth Connect!

If you're familiar with the Fast Healthcare Interoperability Resources (FHIR) standards by HL7, you will probably have already realized that technically speaking, Mirth Connect has always been able to host and send to FHIR endpoints. The standards are based on RESTful HTTP, using either XML or JSON for the data format. Since we support all of those things, creating a FHIR-compliant channel has always been relatively easy.

However, what this technology preview provides is an even easier way of doing this. The included FHIR Listener connector allows you to quickly host a FHIR server that auto-generates a conformance profile. In addition to that, built-in utility classes are included for handling FHIR responses.

Try it out, it's being released for free! All you need is Mirth Connect 3.2.2. Go here to download the preview: https://info.mirth.com/Fast-Healthca...rces-FHIR.html

We also have a section of the public wiki dedicated to this, with a user guide and sample channel to get you started: http://www.mirthcorp.com/community/w...logy+Preview+1

Please leave any feedback you might have! We're really interested in how people are going to be using this new standard.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #2  
Old 07-22-2015, 03:12 PM
Shamil Shamil is offline
OBX.3 Kenobi
 
Join Date: May 2013
Posts: 158
Shamil is on a distinguished road
Default

So it's based on HAPI FHIR DSTU1. What if I replace HAPI library in the lib folder with DSTU2 version, will it accept that? (Some resources in DSTU2, such as AdverseReaction, are withdrawn.)

Any thoughts about supporting messages and documents paradigms? I've only checked the Conformance resource by the HTTP Sender connector, so I may missed that.

Good start anyway!
Reply With Quote
  #3  
Old 07-22-2015, 04:16 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

DSTU 2 isn't actually officially released yet, but when it is, we're definitely planning on supporting that as well!

You can update the HAPI libraries and most things should still work fine, but the conformance statement that is generated will still be the DSTU 1 version for now. We do use FhirContext to convert the conformance statement from XML to JSON though, so that's the one place where you may run into trouble (if you're serving up a JSON conformance statement).

Since the main power really comes from the source map variables made available in channels, technically speaking there should be nothing stopping you from implementing the Documents and Messaging portions of the standard. We'll definitely look into making improvements there in the next technology preview though.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #4  
Old 07-23-2015, 09:00 AM
vpnath vpnath is offline
OBX.1 Kenobi
 
Join Date: Jun 2010
Posts: 36
vpnath is on a distinguished road
Default

Very excited to see Mirth supporting FHIR! I was able to get the test channel set up with minimal effort. I was able to successfully post a new patient record but when I try to query back for the record, the response shows something like:

javax.sql.rowset.serial.SerialClob@26e384c3

I tried to follow the example provided. The only difference is that I am using SQL server. When I query the DB from Management Studio, I am able to see the XML message in the data column. The datatype of the data column is currently set to nvarchar(MAX).

I was using Postman Chrome app for testing with Mirth Connect 3.2.2.7694.

Thanks!
Reply With Quote
  #5  
Old 07-23-2015, 09:34 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

Quote:
Originally Posted by vpnath View Post
Very excited to see Mirth supporting FHIR! I was able to get the test channel set up with minimal effort. I was able to successfully post a new patient record but when I try to query back for the record, the response shows something like:

javax.sql.rowset.serial.SerialClob@26e384c3

I tried to follow the example provided. The only difference is that I am using SQL server. When I query the DB from Management Studio, I am able to see the XML message in the data column. The datatype of the data column is currently set to nvarchar(MAX).

I was using Postman Chrome app for testing with Mirth Connect 3.2.2.7694.

Thanks!
The column you're selecting is a CLOB, so you'll have to convert that to a string first in your code. For example like this:

Code:
var value = org.apache.commons.io.IOUtils.toString(yourClob.getCharacterStream());
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #6  
Old 07-23-2015, 10:34 AM
Shamil Shamil is offline
OBX.3 Kenobi
 
Join Date: May 2013
Posts: 158
Shamil is on a distinguished road
Default

Is there any plan to build a corresponding FHIR Sender connector?

It would be nice to have a better way to control HTTP methods (is there any way to do that with HTTP Sender without creating four separate destinations?) or, even better, to determine a FHIR interaction (operation, such as “history”) and let the connector decide which of HTTP methods suites best for that.

Also it might be a need to better handle response codes in cases such as "it may be appropriate for a server to return either only a status code, or also return the entire resource that is the outcome of the create or update (which may be different to that provided by the client)." And so on …

Last edited by Shamil; 07-23-2015 at 10:47 AM.
Reply With Quote
  #7  
Old 07-23-2015, 12:19 PM
vpnath vpnath is offline
OBX.1 Kenobi
 
Join Date: Jun 2010
Posts: 36
vpnath is on a distinguished road
Default

Thanks! That did the trick. I just had to use result.getClob('data') instead of result.getString('data').

Now I need to figure out how to translate XML to JSON and vice-versa. I may just stick with JSON data for my testing as I find it easier to work with.
Reply With Quote
  #8  
Old 07-23-2015, 12:34 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

The HAPI-FHIR libraries are bundled with it, so you can use them to convert between XML and JSON if needed. FhirContext is the class you may want to use.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #9  
Old 07-23-2015, 12:45 PM
vpnath vpnath is offline
OBX.1 Kenobi
 
Join Date: Jun 2010
Posts: 36
vpnath is on a distinguished road
Default

Quote:
Originally Posted by narupley View Post
The HAPI-FHIR libraries are bundled with it, so you can use them to convert between XML and JSON if needed. FhirContext is the class you may want to use.
Perfect! I will check out the API.
Reply With Quote
  #10  
Old 07-27-2015, 09:59 AM
vpnath vpnath is offline
OBX.1 Kenobi
 
Join Date: Jun 2010
Posts: 36
vpnath is on a distinguished road
Default

Quote:
Originally Posted by narupley View Post
The HAPI-FHIR libraries are bundled with it, so you can use them to convert between XML and JSON if needed. FhirContext is the class you may want to use.
I'm having trouble instantiating the FhirContext class. I am trying to convert my XML data to JSON.

Here is what I've tried:

Code:
var ctx = new ca.uhn.fhir.context.FhirContext();
var value org.apache.commons.io.IOUtils.toString(data.getCharacterStream());
var encoded = ctx.newJsonParser().encodeResourceToString(value);
The error message I get is that "ca is not defined".

Also tried:

Code:
var ctx = new FhirContext();
This gives an error saying FhirContext is not defined.

What am I missing?

Last edited by vpnath; 07-27-2015 at 10:10 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:59 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation