Question
· Sep 5, 2017

Create Patient via FHIR?

Hi,

I've been trying to create a patient using FHIR, but all I seem to get back is:

{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","details":{"text":"FHIR create interaction invalid for this end point"},"diagnostics":"FHIR create interaction invalid for this end point"}]}

I've tried a variety of requests and read operations work, but create doesn't seem to. Has anyone run into this? Any ideas? Thanks.

Discussion (10)0
Log in or sign up to continue

Is it not the same URL as the read? (just different HTTP method)

POST https://healthshare.dev/csp/healthshare/fhiraccess/fhiraccess/Patient?_format=json&iscSessionId=0KbVHOguxHNv9ou7-xQLCxCsdcrcP9vOdxblRGOJ40c

Very empty patient (supposedly minimum required fields according to docs)

{
  "resourceType": "Patient",
  "identifier": [
    {
      "type": {
        "coding": [
          {
            "code": "MR",
            "display": "MR"
          }
        ],
        "text": "MR"
      },
      "system": "urn:oid:2.16.840.1.113883.4.1",
      "value": "200000007"
    }
  ],
  "active": true,
  "name": [
    {
      "use": "usual",
      "family": [
        "Doe"
      ],
      "given": [
        "John"
      ]
    }
  ],
  "gender": "male",
  "birthDate": "2000-09-01",
  "deceasedBoolean": false,
  "address": [
    {
      "use": "home"
    }
  ],
  "multipleBirthBoolean": false,
  "contact": [
    {
      "relationship": [
        {
          "coding": [
            {
              "system": "http://hl7.org/fhir/patient-contact-relationship",
              "code": "friend",
              "display": "Friend"
            }
          ],
          "text": "Friend"
        }
      ],
      "name": {
        "use": "usual",
        "text": "Frouwina Jong",
        "family": [
          "Jong"
        ],
        "given": [
          "Frouwina"
        ]
      },
      "telecom": [
        {
          "system": "phone",
          "value": "289-990-5494",
          "use": "home"
        }
      ],
      "address": {
        "line": [
          "1173 Oak Drive"
        ],
        "city": "Chicago",
        "state": "DE",
        "postalCode": "30732",
        "country": "USA"
      },
      "gender": "female"
    }
  ],
  "communication": [
    {
      "language": {
        "coding": [
          {
            "code": "en",
            "display": "English"
          }
        ],
        "text": "English"
      },
      "preferred": true
    }
  ]
}

Sure, not.

When you read particular patient, your URL is something like (where 1234 is ID of this patient):

/fhir/Patient/1234

But to create new patient, you should use

/fhir/Patient

and method POST 

Full URL, with ID, need when you want to update particular patient, and use method PUT.

This is how it should be by standard FHIR.  But I have not worked with FHIR in HealtShare, and maybe there is some differences.

No, that's just our messed up installation (whoever configured it on our end). I thought that at first too. The application name is "fhiraccess" as well, or service path or whatever its technically called, which makes it very confusing. Again, reads work (and for the sake of being thorough I've already tried it both ways).

Sure, the full version string is: Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.1.1 (Build 111_0_17521U) Wed Jul 26 2017 13:00:54 EDT [HealthShare Modules:Core:15.03.8382 + Linkage Engine:15.03.8382 + Patient Index:15.03.8382 + Clinical Viewer:15.03.8382 + Active Analytics:15.03.8382]

 

What you said seems to make sense about the FHIR Gateway. I can read just fine, but writing seems to be the issue. That's a shame data can't be written that way. There are a variety of mock data generation tools that I'm working with but they all operate with FHIR. So getting this data into HealthShare is problematic. Any ideas on going from FHIR into HealthShare? In Bulk?

Hi Tom, HealthShare provides transforms between FHIR and SDA (the format HealthShare Information Exchange uses to store and transport patient data internally), as well as Ensemble Business Processes that call into these transforms.  So if you wanted to feed FHIR data into Information Exchange, and your FHIR data were in patient-centric bundles, then one thing you could do is, implement a REST handler in a HealthShare Edge Gateway namespace that marshalls the FHIR request into an Ensemble request.  You can look at HS.FHIR.REST.Handler for an example of how to do this, but I would recommend against trying to use this class as your REST handler.  It does things that are specific to a FHIR namespace.  Have the REST handler dispatch the request to a service in the Edge production, which should pass the request on to HS.FHIR.ToSDA.DTL.Transaction.Process.  This will transform the FHIR bundle in an SDA container, which can be processed normally into the HealthShare Edge gateway.  Note that if you decide to do this, you are essentially creating a FHIR endpoint that is write-only.  The original FHIR resource cannot be read from that endpoint.  Though technically, it isn't really even a FHIR endpoint unless it can serve up a conformance statement.

You can read more about transforming between FHIR and SDA here:

http://host:port/csp/docbook/DocBook.UI.Page.cls?KEY=FOVW_fhir#FOVW_fhir...

Hi Tom, can you describe how you created the FHIR namespace? Also, I'm pretty sure the version of HSCore you're using is 15.03, but could you also include the full version string, for future reference?

My guess is that you are trying to interact with a FHIR Gateway namespace, which does not support the create interaction from clients.

Basically, HealthShare currently supports two types of FHIR namespaces.  The first is a regular FHIR reference server, that supports most of the FHIR DSTU2 standard, including create, read, update, delete, search, history, and vread interactions.  However, this server is not a part of the HealthShare federation in any way.  It neither sends data to nor receives data from the rest of HealthShare.

The other type of FHIR namespace is what is known as a FHIR Gateway.  Clients interact with it by first starting a session (there are different ways of doing this), then, within that session, loading a patient's data from the HealthShare Information Exchange into the FHIR Gateway by doing a read on that patient (where ID=the patient's MPIID from Information Exchange).  Then queries that are explicitly scoped to that patient via search parameter may be submitted to the FHIR endpoint.  Clients may not create resources on the FHIR Gateway.  Data can only be loaded into the FHIR Gateway from Information Exchange.  Clients can only see data in their session, and after a session ends, any data in that session is physically deleted.

You can find more information about the FHIR Gateway in the HealthShare documentation:

http://<host>:<port>/csp/docbook/DocBook.UI.Page.cls?KEY=HESUP_fhir

Or, if you have any specific questions, I'd be happy to answer them here.