I am developing a middleware system that will connect different EMR/EHR systems. The systems on “either end” do not necessarily implement FHIR interfaces, or even RESTful APIs. We are using FHIR strictly as an internal data format. One system “publishes” FHIR-compliant JSON, and another system “consumes” it.
Clearly, a Bundle is the right structure to represent a set of data. For example, consider the following set of resources that represent a patient record:
Patient
Coverage for primary insurance
RelatedPerson to represent insured party
RelatedPerson to represent emergency contact
Organization to represent insurance company
Is a Message or Transaction is the best type of bundle for this purpose?
@grahamegrieve I was leaning towards a message initially, but then I saw this sentence in the Bundle documentation: “Except for transactions and batches, Each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry.” Since I am building a middleware system that passes messages between two non-FHIR systems, I don’t have a fullUrl to identify the resource on either system. I need to use relative references for all the resources. Can I use relative references in transactions and/or messages?
Thank you, @lloyd. I implemented your suggestion and I was able to get transactions to validate with relative references. Here is a short example, for future reference: