Overview

This describes the resources that make up Cerner’s implementation of the HL7® FHIR® standard. If you have any problems or requests, please post to our developer group.

Current Version

Cerner’s implementation currently supports the DSTU 2 Final (1.0.2) version of the FHIR® standard. Cerner is adding support for the R4 First Normative Content (4.0.0) version of the FHIR® standard.

Schema

All API access is over HTTPS. See Service Root URL for more information on URL format. All data is sent and received as JSON.

$ curl -i -H "Accept: application/fhir+json" https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/metadata
HTTP/1.1 200 OK
Date: Tue, 26 Mar 2019 15:50:49 GMT
Cache-Control: no-cache
Vary: Origin
Server-Response-Time: 216.449165
X-Request-Id: ecd13b72-4fde-11e9-8674-8b0a57a130fd
X-Runtime: 0.216357
Status: 200 OK
Content-Type: application/json+fhir

{
  "resourceType": "CapabilityStatement",
  "url": "https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/metadata",
  "name": "CernerCapabilityStatement",
  "title": "Cerner Capability Statement",
  "status": "active",
  "publisher": "Cerner",
  "date": "2019-03-25",
  "description": "Cerner implementation of FHIR on top of Millennium",
  "kind": "instance",
  "implementation": {
    "description": "Cerner implementation of FHIR on top of Millennium",
    "url": "https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca"
  },
  "fhirVersion": "4.0.0",
  "format": [
    "json"
  ],
  "patchFormat": [
    "application/json-patch+json"
  ],
  "rest": [
    {
      "mode": "server",
      "documentation": "Cerner implementation of FHIR on top of Millennium",
      "security": {
        "cors": true
      },
      "resource": [
        {
          "type": "CapabilityStatement",
          "interaction": [
            {
              "code": "read"
            }
          ]
        },
        {
          "type": "Encounter",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "_id",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Resource-id",
              "type": "token",
              "documentation": "A single or comma separated list of Encounter ids. It is a required field if the patient or subject fields are not given."
            },
            {
              "name": "_count",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Resource-count",
              "type": "number",
              "documentation": "The maximum number of results to return. Not honored when '_id' is set."
            },
            {
              "name": "patient",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/clinical-patient",
              "type": "reference",
              "documentation": "The patient present at the encounter. It is a required field if the _id or subject fields are not given."
            },
            {
              "name": "subject",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Encounter-subject",
              "type": "reference",
              "documentation": "The patient present at the encounter. It is a required field if the _id or patient fields are not given."
            }
          ]
        },
        {
          "type": "OperationDefinition",
          "interaction": [
            {
              "code": "read"
            }
          ]
        },
        {
          "type": "Patient",
          "interaction": [
            {
              "code": "read"
            },
            {
              "code": "search-type"
            }
          ],
          "searchParam": [
            {
              "name": "_id",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Resource-id",
              "type": "token",
              "documentation": "A single or comma separated list of Patient ids. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "identifier",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Patient-identifier",
              "type": "token",
              "documentation": "A patient identifier. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "name",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Patient-name",
              "type": "string",
              "documentation": "The beginning of any name of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "given",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-given",
              "type": "string",
              "documentation": "The beginning of the given name of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "family",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-family",
              "type": "string",
              "documentation": "The beginning of the family name of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "address-postalcode",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-address-postalcode",
              "type": "string",
              "documentation": "The postal code of the address of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "birthdate",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-birthdate",
              "type": "date",
              "documentation": "The date of birth of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "phone",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-phone",
              "type": "token",
              "documentation": "The value of the phone number of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "email",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-email",
              "type": "token",
              "documentation": "The value of the email address of the patient. Either the '_id' parameter, or a combination of 'identifier', 'birthdate', 'name', 'given', 'family', 'address-postalcode', 'phone', or 'email' parameters must be provided."
            },
            {
              "name": "gender",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/individual-gender",
              "type": "token",
              "documentation": "The administrative gender of the patient. Gender may only be provided if another parameter other than '_id' is provided"
            },
            {
              "name": "_count",
              "definition": "http://hl7.org/fhir/R4/SearchParameter/Resource-count",
              "type": "number",
              "documentation": "The maximum number of results to return. Not honoured when '_id' or 'identifier' are set."
            }
          ]
        },
        {
          "type": "StructureDefinition",
          "interaction": [
            {
              "code": "read"
            }
          ]
        }
      ]
    }
  ]
}

Blank fields are omitted.

All timestamps are returned in FHIR® standard date/dateTime formats.

Media Types

Cerner supports the R4 FHIR® standard defined media type for JSON content:

application/fhir+json

We encourage you to explicitly request this accept type via the Accept header.

Service Root URL

URLs for the FHIR server vary by the tenant (datasource or client) being accessed, as well as other factors. If the application is a SMART application, the service root url is provided at launch time. For standalone applications, the URL can be requested (or configured) when the application is set up to run against a specific tenant. FHIR calls will be made against URLs of the following format:

:serviceRootURL/:resource[?:parameters]

Open Sandbox

The open sandbox instance allows developers to experiment with the service without requiring authentication. We recommend using this endpoint for initial proof of concepts and integration. The service root URL for this instance is: https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/:resource[?:parameters]

Note: The open endpoint exposes read-only resources. No writes are available in sandbox without using authentication.

Secure Sandbox

The secure sandbox instance can be used for testing an application with authorization. The service root URL for this instance is different if the patient or a patient’s proxy is logging in.

Non-Patient: https://fhir-ehr.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/:resource[?:parameters] Patient Access: https://fhir-myrecord.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/:resource[?:parameters]

Resource

:resource represents the FHIR® standard resource to access. Example: Patient

Parameters

Many API methods take optional parameters. For GET requests, any parameters not specified as a segment in the path can be passed as an HTTP query string parameter:

$ curl -i -H "Accept: application/json+fhir" "https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/MedicationOrder?patient=2744010&status=active"

In this example, MedicationOrder is the FHIR® standard resource being accessed, while patient and status are passed in the query string.

Resource Identity

Please note that no ids or identifiers in the Millennium EHR are intended to be used outside of the context of their complete URL. A complete URL is comprised of the service root url, the resource, and the parameters (if any).

For example, one must take into account the entire url and not simply the id or resource + id:

https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Patient/1316024

In another context the id “Patient/1316024” may identify another person entirely. In the following example a different resource may be returned because the context (service root url) has changed.

https://fhir-open.sandboxcerner.com/r4/d075cf8b-3261-481d-97e5-ba6c48d3b41f/Patient/1316024

Similarly when considering an identifier one must consider it only in its full context. Even though some identifiers may exist across multiple systems (ex: MRN) it is not guaranteed that they will refer to the same resource.

https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Patient?identifier=urn:oid:1.1.1.1.1.1|10002700

For example, when using the above MRN in a different system, we are not guaranteed that the same Patient resource is returned in the response bundle:

https://fhir-open.sandboxcerner.com/r4/d075cf8b-3261-481d-97e5-ba6c48d3b41f/Patient?identifier=urn:oid:1.1.1.1.1.1|10002700

Common Application Errors

Please visit our list of common issues on our FAQ page to be aware of the common issues we’ve identified when validating apps to run on our platform.

Client Errors

There are seven possible types of client errors on API calls that receive request bodies:

  1. Failing to send a required query parameter will result in a 400 Bad Request response.

     HTTP/1.1 400 Bad Request
    
     no supported search parameters provided
    
  2. Requesting the secure endpoint (non-open) without valid credentials will result in a 401 Unauthorized response.

     HTTP/1.1 401 Unauthorized
    
  3. Requesting data from an unknown instance or an instance where the application is not authorized will result in a 403 Forbidden response.

     HTTP/1.1 403 Forbidden
    
     Tenant not valid or accessible
    
  4. Requesting a resource which does not exist will result in a 404 Not Found response.

     HTTP/1.1 404 Not Found
    
  5. Requested a media type other than JSON will result in a 406 Not Acceptable response.

     HTTP/1.1 406 Not Acceptable
    
     Content-Length: 0
    
  6. Performing an update with an out-of-date version id will result in a 409 Conflict Error response.

     HTTP/1.1 409 Conflict Error
    
  7. Performing an add or update with syntactically correct JSON body which is invalid according to business rules will result in a 422 Unprocessable Entity response.

     HTTP/1.1 422 Unprocessable Entity
    

Operation Outcomes

An OperationOutcome may be returned to provide additional context to an error. The tables below describes common OperationOutcomes and their causes.

Retrieve/Search

HTTP Status Cause Severity Code
500 Response is missing a required field fatal required

Create/Update

HTTP Status Cause Severity Code
422 Body contained unsupported fields error business-rule
422 Body contained modifier extensions error extension
422 Body contained implicit rules error not-supported

Handling Required Fields

  1. Missing fields required by the HL7 FHIR® specification or any missing status field will result in a 500 Internal Server Error and an OperationOutcome.

     {
       "resourceType": "OperationOutcome",
       "issue": [
         {
           "severity": "fatal",
           "code": "required",
           "location": [
             "/f:AllergyIntolerance/f:status"
           ]
         }
       ]
     }    
    
  2. Missing fields required by HL7 profiles such as Argonaut (DSTU 2) or US Core (STU 3) will result in a DataAbsentReason.

     {
       "coding": [
         {
           "extension": [
             {
               "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
               "valueCode": "unknown"
             }
           ]
         }
       ]
     }
    
  3. Patient consumers requesting a resource with a status of entered-in-error may result in a DataAbsentReason.

     {
       "coding": [
         {
           "extension": [
             {
               "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
               "valueCode": "masked"
             }
           ]
         }
       ]
     }
    
  4. Missing Coding or CodeableConcept fields with a required value set binding will result in a DataAbsentReason, though it may return a text component.

     {
       "coding": [
         {
           "extension": [
             {
               "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
               "valueCode": "unknown"
             }
           ]
         }
       ],
       "text": "Auth (Verified)"
     }
    

Filtered Data for Patient or Proxy Access

When accessing data with a patient persona, some data may be filtered as compared to system or provider access. Resources with a status of “entered-in-error” will result in either some fields being filtered or returned with a data absent reason with a valueCode of masked. Fields that may contain sensitive information will be filtered such as non-instructional notes. For proxy users, regulatory laws or policies may restrict parental or guardian access to adolescent health records and these regulations vary from state to state.

General Security Filtering

Not all data can be accessed by all applications or users. Encounter or organization security, privileges, and preference may filter data based on the build in the domain.

HTTP Verbs

Where possible, the FHIR® standard strives to use appropriate HTTP verbs for each action.

Verb Description
GET Used for retrieving resources.
POST Used for creating resources.
PUT Used for updating resources.

HTTP Method Override

If there is no support for HTTP methods such as PUT or PATCH, the request can be made through POST using one of the following:

_method parameter

$ curl -i -X POST  "https://fhir-ehr.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Encounter?_method=patch"

X-HTTP-Method-Override header

$ curl -i -X POST -H "X-HTTP-Method-Override: patch" "https://fhir-ehr.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Encounter"

Note: When making the override request, appropriate data and headers related to the method you are trying to switch to should be provided.

Authorization

We have an endpoint secured with OAuth 2.0 with support for SMART Applications. Refer to the extensions on the Conformance.rest.security element in our server metadata.

Each resource interaction documents the type of authentication acceptable (patient, provider, and/or system). While an interaction may list system authentication, this is currently available only in sandbox for beta testing and is not available in production yet.

Please reference the authorization documentation for details on how to authorize with our server.

Pagination

The pagination links are included in the Bundle when a resource returns multiple items. It is important to follow these Link header values instead of constructing your own URLs.

{
  "resourceType": "Bundle",
  "id": "f22ca456-19a7-45ce-8586-0079495783ef",
  "type": "searchset",
  "link": [
    {
      "relation": "self",
      "url": "https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?subject%3APatient=1316024&_count=50"
    },
    {
      "relation": "next",
      "url": "https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?subject%3APatient=1316024&pageContext=35d95fe0-03bf-426c-bc35-2533f7fde4eb&direction=NEXT"
    }
  ],
  ...
}  

The possible relation values are:

Name Description
self Shows the URL of the current page of results.
next Shows the URL of the immediate next page of results.

Cross Origin Resource Sharing

The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. You can read the CORS W3C Recommendation, or this intro from the HTML 5 Security Guide.

Here’s a sample request sent from the origin http://example.com:

$ curl -i -H "Origin: http://example.com" -H "Accept: application/json+fhir" https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/metadata
HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://example.com
Access-Control-Allow-Methods: DELETE, GET, POST, PUT, OPTIONS, HEAD
Access-Control-Max-Age: 0
Access-Control-Allow-Credentials: true

This is what a CORS preflight request looks like:

$ curl -X OPTIONS -i -H "Origin: http://example.com" https://fhir-open.sandboxcerner.com/r4/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/metadata
HTTP/1.1 204 No Content
Access-Control-Allow-Origin: http://example.com
Access-Control-Allow-Methods: DELETE, GET, POST, PUT, OPTIONS, HEAD
Access-Control-Max-Age: 0
Access-Control-Allow-Credentials: true