FHIR Chat · Transaction - reference to locally identified references · implementers

Stream: implementers

Topic: Transaction - reference to locally identified references


view this post on Zulip Bob Milius (May 10 2016 at 02:44):

I've been learning about transactions and references to locally identified resources.

I noticed that the Health Intersections open server (http://fhir3.healthintersections.com.au/open) and an instance of HAPI by cerner (http://cerner-genomics.herokuapp.com/baseDstu3) processes them differently. Here's a toy example where I create a Patient and then a Specimen that points to that Patient in a single transaction.

<Bundle xmlns="http://hl7.org/fhir">
  <type value="transaction"/>
  <entry>
    <fullUrl value="urn:uuid:9e928bfa-f811-4af5-97c5-1ede3d84afc3"/>
    <resource>
      <Patient>
        <name>
          <family value="Doe"/>
          <given value="John"/>
        </name>
      </Patient>
    </resource>
    <request>
      <method value="POST"/>
      <url value="Patient"/>
    </request>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:c92d42e9-3468-416a-9d03-de586f3c7c4b"/>
    <resource>
        <Specimen xmlns="http://hl7.org/fhir">
            <subject>
                <reference value="urn:uuid:9e928bfa-f811-4af5-97c5-1ede3d84afc3"/>
            </subject>
        </Specimen>
    </resource>
    <request>
      <method value="POST"/>
      <url value="Specimen"/>
    </request>
  </entry>
</Bundle>

When send this to http://fhir3.healthintersections.com.au/open it creates both resources, but in the specimen resource, the subject is pointing to the guid.

<?xml version="1.0" encoding="UTF-8"?>
<Specimen xmlns="http://hl7.org/fhir">
    <id value="125"/>
    <meta>
        <versionId value="1"/>
        <lastUpdated value="2016-05-10T02:24:36Z"/>
    </meta>
    <subject>
        <reference value="urn:uuid:9e928bfa-f811-4af5-97c5-1ede3d84afc3"/>
    </subject>
</Specimen>

But when I send it to the HAPI server at http://cerner-genomics.herokuapp.com/baseDstu3, the Specimen resource it creates has a subect reference pointing to the patient resource it create.

{
  "resourceType": "Specimen",
  "id": "405",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2016-05-10T02:36:20.712+00:00"
  },
  "subject": {
    "reference": "Patient/404"
  }
}

I'm trying to understand which should be the expected behavior from my toy example. Naturally, I prefer the cerner (HAPI) server.

view this post on Zulip Jason Walonoski (May 10 2016 at 12:02):

The HAPI server is the correct behavior.

view this post on Zulip Grahame Grieve (May 10 2016 at 12:41):

yes, I need to fix this

view this post on Zulip Bob Milius (May 10 2016 at 14:27):

thanks!


Last updated: Apr 12 2022 at 19:14 UTC