-1

I am very new to FHIR JSON and I am not even sure I ask the right question. But here is my scenario.

I have a BizTalk solution that receives a FHIR ImagingStudy message as JSON. Using this post (http://soapfault.com/blog/2016/08/hl7-fhir-json-decoding-in-biztalk/) I successfully convert the FHIR JSON message to an XML message in my receive location. Then in my send port this message is mapped to an ORU HL7 and dumped into a folder through a pass-thru send pipeline. Except that my map doesn't get executed for some reason.

If I play a little bit around with my pipelines, to receive a FHIR XML message through an XML Receive pipeline, I get the following exception:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=#########" Source: "XML disassembler" Receive Port: "RP_MyProject_Test_FILE" URI: "D:\Projects\MyProject\In*.xml" Reason: Cannot locate document specification because multiple schemas matched the message type "http://hl7.org/fhir#ImagingStudy".

How did I get to this situation, well I don't know. I downloaded the fhir-all-xsd.zip from hl7.org and added all the .xsd files to may project in Visual Studio. I ended up with 100 schemas, I tried to add only the ImagingStudy specific schemas but it didn't work until I added all schemas. After deployment to BizTalk, I can see even more schemas in my BizTalk Admin Console and several have the above message type.

What am I doing wrong? Is there a way to include in my project only the ImagingStudy FHIR schemas? In my suspended message I see that MessageType is not promoted, I guess the map wouldn't know when to execute then, but then I have several messages with the same MessageType in BizTalk.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54

2 Answers2

0

To resolved the multiple schemas matched the message type you either have to

  1. Make sure that each schema has a unique namespace + rootname. This is either making sure that you don't deploy the same schema more than once, if you need the schema in more than one project then create a Common Application that both other Applications can reference.
  2. If you can't achieve the above, make sure you create a custom receive pipeline with a XML dissembler in which you specify which schema to use

To resolve the map not being executed, you have to look at what the message type that is on the message before the map (via BizTalk Admin Console), and compare it to the message type that the map is expecting to map. You will find that the two do not match and that is why the map does not execute.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
0

Your fundamental problem is "because multiple schemas matched the message type "http://hl7.org/fhir#ImagingStudy".

The best way to resolve this, and my advice in nearly all situations, is to create custom Pipelines with the Document Spec explicitly set in the XmlDisassembler and XmlAssembler components.

This Wiki Article describes the process and benefits: BizTalk: Improve Deployment and Tracking by Always Creating Custom Pipelines

Johns-305
  • 10,908
  • 12
  • 21