Question
· Mar 27, 2018

How to convert FHIR(HTTP GET) Query into HL7

Hi, 

We have a PAS that accepts HL7v2 QBP^Q21 requests, and returns patient details in an RSP^K21.

We have a clinical system that wants to sent an http GET request of the form http://server/getpatientbyid?pid=M1234567

So I think I need to convert the query url into a QBP^Q21 (HL7) message, then take the response in HL7v2, convert to SDA, convert to FHIR, and put that in the response to the  original GET.

Does anyone have any experience doing this? is there an approach you would recomend?

Discussion (7)1
Log in or sign up to continue

Hi Stephen,

To confirm, does the clinical system expect the response data to be a FHIR resource (Patient resource in this case)?

I ask because the HTTP GET request format you specified (http://server/getpatientbyid?pid=M1234567) does not conform to FHIR's RESTful Search specification; it appears to be a custom REST call, which may have a different set of expectations in terms what response data/format is required, etc. Based on your description, it sounds like you are seeking to implement a message transformation interface that enables a PDQ (Patient Demographics Query)-type transaction.

For message conversion and processing, I think you should take a look at our existing support for IHE PDQ (v2) and PDQm (FHIR-based) profiles and see what existing components and internal calls may be used to achieve the data transformation required by your specific scenario. If the client system could be made to conform to the FHIR RESTful Search standard, then it may be easier to make direct use of our existing PDQm capabilities.

Thanks for responding. My apologies for the delayed response. >does not conform to FHIR's RESTful Search specification; > it appears to be a custom REST call you are right! >it sounds like you are seeking to implement a message transformation interface >that enables a PDQ (Patient Demographics Query)-type transaction. yes. > I think you should take a look at our existing support for IHE PDQ (v2) and PDQm (FHIR-based) profiles Can you provide a link? >If the client system could be made to conform to the FHIR RESTful Search standard, > then it may be easier to make direct use of our existing PDQm capabilities. Can you provide a link? Thank you for taking the time to respond. Stephen

Thanks for responding. My apologies for the delayed response.

does not conform to FHIR's RESTful Search specification;
it appears to be a custom REST call

you are right!

it sounds like you are seeking to implement a message transformation interface
that enables a PDQ (Patient Demographics Query)-type transaction.

yes.

I think you should take a look at our existing support for IHE PDQ (v2) and PDQm (FHIR-based) profiles

Can you provide a link?

If the client system could be made to conform to the FHIR RESTful Search standard,
then it may be easier to make direct use of our existing PDQm capabilities.

Can you provide a link?

Thank you for taking the time to respond.

Stephen

(formatting corrected)

Hi Stephen,

I second Craig's comments re the format of your GET request.  Additionally, a little more detail about your use case would be helpful.

  • Is the QBP^Q21 actually an IHE PIX or PDQ query request or just a plain HL7 V2 QBP^Q21?
  • What is the workflow? If they are both queries, how are you translating one to another? What is the triggering event for this workflow?

A few extra things to consider:

  • You don't have to use SDA as an intermediary to translate HL7 V2 <--> FHIR. You can also do this directly using DTL which will likely perform faster (but may require some additional work to implement)
  • If the QBP is being sent to you instead of being sent by you, consider using the HS IHE PIX Supplier to transform the QBP into a HS.Message.PatientSearch Request message.

Hi,

My apologies for the delay getting back to you.

Is the QBP^Q21 actually an IHE PIX or PDQ query request or just a plain HL7 V2 QBP^Q21?

it is just a ' just a plain HL7 V2 QBP^Q21'

What is the workflow?

  1. Client system sends a FHIR PDQ using a patient identifier.
  2. Healthshare FHIR server web application receives from the client system
  3. FHIR PDQ converted to HL7v2 Q21 ans sent to PAS
  4. PAS responds with patient demographics (or fails)
  5. response converted to FHIR response
  6. FHIR response containing patient demographics sent to client system in FHIR response.

What is the triggering event for this workflow?

A user searching for a patient in the client system. (standard clinical workflow app)

You don't have to use SDA as an intermediary to translate HL7 V2 FHIR. You can also do this directly using DTL

Can you provide more details about how this should work?

If the QBP is being sent to you instead of being sent by you

No, we are making the QBP^Q21 HL7v2.4 message to the PAS as it is the only way to query our PAS in real time.

Thanks again for taking the time to respond.

Stephen

Thanks for the clarifications!

I would suggest experimenting with a few things first:

  1. On your inbound FHIR Patient Query message, first try to see if the PDQm Services can successfully transform it into a HS.Message.Patient Search Request. If not, then I suggest using Ensemble DTL and transforming the HS.Message.FHIR.Request into a HS.Message.PatientSearchRequest
  2. Once you get #1 sorted, I suggest feeding your HS.Message.PatientSearchRequest message into the HS.IHE.PDQ2.Consumer.Operation and see if the vanilla operation is able to successfully negotiate the QBP-RSP interaction. If not, then you may need to either look at extending the operation or writing other additional code to pipeline the V2 message until the PAS can handle the query.

In both these cases, you shouldn't need to transform to SDA.

Hi,

  1. On your inbound FHIR Patient Query message, first try to see if the PDQm Services can successfully transform it into a HS.Message.Patient Search Request.

Using the HealthShare Test Utility, PIX and PDQ (FHIR), Patient Search (PDQm), with the supplier set to 'PDQm.Supplier' I did a simple search, but got a 'No production is running' error.

have I missed something in setting up PDQm?  It looks like I need to have a HSREGISTRY namespace/production/web application  running at /csp/healthshare/hsregistry/services/HS.Hub.HSWS.WebServices.cls  ? 

Is that right?


'No production is running' error: 

HTTP Status = 500 Internal Server Error
ERROR #5001: ERROR #6248: SOAP response is a SOAP fault: faultcode=Server faultstring=Server Application Error faultactor=HS.Hub.HSWS.WebServices detail= <error xmlns="http://www.intersystems.com/hs/hub/hsws"> <text>ERROR &lt;Ens&gt;ErrProductionNotRunning: No production is running</text> </error>

[2018-04-19 17:15:55] Service:nn-tie2v:57772

HS.Test.UI.PDQm Run: 2018-04-19 17:15:55 Test Id: 7

PS I added PDQm to the production as per the instructions in HealthShare Health Connect  >  IHE Use Cases in Health Connect  >  Using FHIR® IHE Profiles  >  Setting Up and Using PDQm 

do ##class(HS.Util.Installer.Kit.FHIR.ServerPDQm).Add(, "namespace")

I had created the FHIR production/namespace earlier:

do ##class(HS.Util.Installer).InstallFHIRServer("namespace")