DocumentReference

Overview

For the DocumentReference resource query, the API returns one or more links to Summary of Episode Note (SOEN) consolidated clinical document architecture (C-CDA) documents stored in the Soarian Clinicals C-CDA archive for the subject patient. If more than one C-CDA link is returned, they are sequenced in reverse chronological order by C-CDA creation date for user selection and display. Note that each instance of a C-CDA is a unique document. Therefore, if multiple C-CDAs are created for a patient during an encounter where the creation date qualifies them for the query response, all qualified records are returned. The C-CDA document archive may contain documents created by Soarian or by external systems; all qualifying (SOEN type by create date) records are returned regardless of their source.

Terminology Bindings

DocumentReference.type
  • Description
    • Precise type of clinical document.
  • Details: LOINC
    System: http://loinc.org

    • Supported Values
      • 34133 - Summary of episode note

Custom Extensions

The bundle extension can be returned, see possible codes in the errors section below.

GET /DocumentReference?:parameters

Implementation Notes

Parameters

Name Required? Type Description
patientId Y reference The patient identifier provided in a pre-requisite authorization step.
date N date as adjusted per implementation notes Null or specific date or a date range.
attachment N URL encoded String Attachment is the value that is returned in the element “content.attachment.url” as part of the response to the initial “DocumentReference” request.

Notes:

Headers

Accept: application/json+fhir
Authorization: <OAuth2 Bearer Token>

Example

Request without attachment

GET https://fhir-myrecord.sandboxcerner.com/dstu2/123abc/DocumentReference?patientId=FCC941D7-60B9-491D-BEED-27629E47CD4E

Response without attachment

Status: 200 OK
{
  "resourceType": "Bundle",
  "id": "3def23df-44bf-4006-ab1c-72d0c176b1b0",
  "meta": {
    "lastUpdated": "2017-06-05T14:18:31.429-04:00"
  },
  "extension": [
    {
      "url": "http://cerner.hs.fhir.com/StructureDefinition/bundle-result-messages",
      "valueExtension": {
        "url": "http://cerner.hs.fhir.com/StructureDefinition/bundle-result-messages",
        "extension": [
          {
            "url": "Severity",
            "valueString": "info"
          },
          {
            "url": "Code",
            "valueString": "papi022"
          },
          {
            "url": "Message",
            "valueString": "Information provided is for documents created from 2016-03-01 through 2016-03-29 inclusive."
          }
        ]
      }
    },
    {
      "url": "http://cerner.hs.fhir.com/StructureDefinition/bundle-result-messages",
      "valueExtension": {
        "url": "http://cerner.hs.fhir.com/StructureDefinition/bundle-result-messages",
        "extension": [
          {
            "url": "Severity",
            "valueString": "info"
          },
          {
            "url": "Code",
            "valueString": "fsp001"
          },
          {
            "url": "Message",
            "valueString": "Date parameter values passed with request were: date=>=2016-03-01T14:15:00&date=<2016-03-30T14:15:00"
          }
        ]
      }
    }
  ],
  "type": "searchset",
  "link": [
    {
      "relation": "self",
      "url": "base-url/bf615549-44cc-4899-bfa9-2cfd86bf358c/DocumentReference?date=%3E%3D2016-03-01T14%3A15%3A00&date=%3C2016-03-30T14%3A15%3A00&_format=json&patientId=FCC941D7-60B9-491D-BEED-27629E47CD4E"
    }
  ],
  "entry": [
    {
      "resource": {
        "resourceType": "DocumentReference",
        "masterIdentifier": {
          "system": "urn:ietf:rfc:3986",
          "value": "urn:oid:2.16.840.1.113883.10.20.22.1.2"
        },
        "subject": {
          "reference": "Patient/FCC941D7-60B9-491D-BEED-27629E47CD4E"
        },
        "type": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "34133-9",
              "display": "Summary of episode note"
            }
          ]
        },
        "author": [
          {
            "display": " Admin Admin"
          }
        ],
        "created": "2016-03-18T00:00:00-04:00",
        "indexed": "2016-03-18T00:00:00-04:00",
        "status": "current",
        "docStatus": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/composition-status",
              "code": "preliminary",
              "display": "PRELIMINARY"
            }
          ],
          "text": "PRELIMINARY"
        },
        "description": "Summarization of Episode Note",
        "securityLabel": [
          {
            "coding": [
              {
                "system": "http://hl7.org/fhir/v3/Confidentiality",
                "code": "N",
                "display": "normal"
              }
            ],
            "text": "normal"
          }
        ],
        "content": [
          {
            "attachment": {
              "contentType": "application/hl7-v3+xml",
              "language": "en-US",
              "data": "Rm91ciBzY29yZSBhbmQgc2V2ZW4geWVhcnMgYWdvIG91ciBmYXRoZXJzIGJyb3VnaHQgZm9ydGggb24gdGhpcyBjb250aW5lbnQsIGEgbmV3IG5hdGlvbiwgY29uY2VpdmVkIGluIExpYmVydHksIGFuZCBkZWRpY2F0ZWQgdG8gdGhlIHByb3Bvc2l0aW9uIHRoYXQgYWxsIG1lbiBhcmUgY3JlYXRlZCBlcXVhbC4="
            }
          }
        ]
      }
    },
    {
      "resource": {
        "resourceType": "DocumentReference",
        "masterIdentifier": {
          "system": "urn:ietf:rfc:3986",
          "value": "urn:oid:2.16.840.1.113883.10.20.22.1.2"
        },
        "subject": {
          "reference": "Patient/FCC941D7-60B9-491D-BEED-27629E47CD4E"
        },
        "type": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "34133-9",
              "display": "Summary of episode note"
            }
          ]
        },
        "created": "2016-03-01T00:00:00-05:00",
        "indexed": "2016-03-01T00:00:00-05:00",
        "status": "current",
        "docStatus": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/composition-status",
              "code": "preliminary",
              "display": "PRELIMINARY"
            }
          ],
          "text": "PRELIMINARY"
        },
        "description": "Summarization of Episode Note",
        "content": [
          {
            "attachment": {
              "contentType": "application/hl7-v3+xml",
              "language": "en-US",
              "url": "base-url/bf615549-44cc-4899-bfa9-2cfd86bf358c/DocumentRefernce?patientId=FCC941D7-60B9-491D-BEED-27629E47CD4E&attachment=docKey%3D101607B8CE55A4F20111E5B4F8D4AE526B7A48%26objNum%3D1%26created%3D20160301%26indexed%3D20160301"
            }
          }
        ]
      }
    }
  ]
}

Request with attachment

GET https://fhir-myrecord.sandboxcerner.com/dstu2/123abc/DocumentReference?_format=json&attachment=docKey%3D101607B8CE55A4F20111E5B4F8D4AE526B7A48%26objNum%3D1%26created%3D20160301%26indexed%3D20160301&patientId=FCC941D7-60B9-491D-BEED-27629E47CD4E

Response with attachment

Status: 200 OK
{
  "resourceType": "Bundle",
  "id": "f74a5b3b-6b9b-4c92-9039-7e7a631e2b78",
  "meta": {
    "lastUpdated": "2017-06-05T14:20:40.691-04:00"
  },
  "type": "searchset",
  "link": [
    {
      "relation": "self",
      "url": "base-url/bf615549-44cc-4899-bfa9-2cfd86bf358c/DocumentReference?_format=json&attachment=docKey%3D101607B8CE55A4F20111E5B4F8D4AE526B7A48%26objNum%3D1%26created%3D20160301%26indexed%3D20160301&patientId=FCC941D7-60B9-491D-BEED-27629E47CD4E "
    }
  ],
  "entry": [
    {
      "resource": {
        "resourceType": "DocumentReference",
        "masterIdentifier": {
          "system": "urn:ietf:rfc:3986",
          "value": "urn:oid:2.16.840.1.113883.10.20.22.1.2"
        },
        "subject": {
          "reference": "Patient/FCC941D7-60B9-491D-BEED-27629E47CD4E "
        },
        "type": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "34133-9",
              "display": "Summary of episode note"
            }
          ]
        },
        "author": [
          {
            "display": " Admin Admin"
          }
        ],
        "created": "2016-03-01T00:00:00-05:00",
        "indexed": "2016-03-01T00:00:00-05:00",
        "status": "current",
        "docStatus": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/composition-status",
              "code": "preliminary",
              "display": "PRELIMINARY"
            }
          ],
          "text": "PRELIMINARY"
        },
        "description": "Summarization of Episode Note",
        "securityLabel": [
          {
            "coding": [
              {
                "system": "http://hl7.org/fhir/v3/Confidentiality",
                "code": "N",
                "display": "normal"
              }
            ],
            "text": "normal"
          }
        ],
        "content": [
          {
            "attachment": {
              "contentType": "application/hl7-v3+xml",
              "language": "en-US",
              "data": "Rm91ciBzY29yZSBhbmQgc2V2ZW4geWVhcnMgYWdvIG91ciBmYXRoZXJzIGJyb3VnaHQgZm9ydGggb24gdGhpcyBjb250aW5lbnQsIGEgbmV3IG5hdGlvbiwgY29uY2VpdmVkIGluIExpYmVydHksIGFuZCBkZWRpY2F0ZWQgdG8gdGhlIHByb3Bvc2l0aW9uIHRoYXQgYWxsIG1lbiBhcmUgY3JlYXRlZCBlcXVhbC4="
            }
          }
        ]
      }
    }
  ]
}

Errors and Informational messages

The common errors and informational messages can be returned.

These additional informational messages may be returned within the bundle extension:

Code Message
papi019 No applicable document is available inclusive of startdate through enddate. Please refine your search.
papi020 Range requested is greater than 30 days, and no applicable document is available inclusive of startdate through enddate. Please refine your search.
papi021 Range requested is greater than 30 days, information provided is for documents created from startdate through enddate inclusive. Please refine your search.
papi022 Information provided is for documents created from startdate through enddate inclusive.
fsp001 Date parameter values passed with request were: <date parameter values>.