Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

NRL | FHIR® Resources & References

Developer Cheat Sheet shortcuts for the
technical build of NRL API.

1. Profiles:

Links to the NRL FHIR profiles on the NHS FHIR Reference Server.

Profile Description
NRL-DocumentReference-1 A DocumentReference resource is used to describe a record that is made available to a healthcare system.
Spine-OperationOutcome-1 Operation Outcome resource that supports a collection of error, warning or information messages that result from a NRL Service Spine interaction.
Spine-OperationOutcome-1-0 The default Spine OperationOutcome profile resource that supports exceptions raised by the Spine common requesthandler and not the NRL Service.

2. NRL Data Model to FHIR Profile Mapping

The table maps the ‘lean alpha’ Solution Data Model to NRL-DocumentReference-1 profile elements.

Data Item FHIR Element Data Type Card Description
Identifier id string 0..1 Assigned by the NRL at creation time. Uniquely identifies this record within the NRL. Used by Providers to update or delete.
Version meta.versionId string 0..1 Assigned by the NRL at creation or update time. Used to track the current version of a Pointer.
Master Identifier masterIdentifier Identifier 0..1 The masterIdentifier is the identifier of the document as assigned by the source of the document. It is version specific – i.e. a new one is required if the document is updated. It is an optional field, providers do not have to supply a value.
  masterIdentifier.system Uri 1..1 The namespace for the identifier. This element must be completed if the masterIdentifier is to be included.
  masterIdentifier.value String 1..1 The unique value of the identifier. This element must be completed if the masterIdentifier is to be included.
Pointer Status status Code 1..1 The status of the pointer
Record type type CodeableConcept 1..1 The clinical type of the record. Used to support searching to allow Consumers to make sense of large result sets of Pointers.
  type.coding.system Uri 1..1 Example Value: http://snomed.info/sct.
  type.coding.code Code 1..1 Symbol in syntax defined by the system. Example Value: 736253002
  type.coding.display String 1..1 Representation defined by the system.
Record Class class CodeableConcept 1..1 A high-level category of the record. The category will be one of a controlled set. It will not be possible to create a pointer with a category that does not exist within this controlled set
  class.coding.system Uri 1..1 Identity of the terminology system
  class.coding.code Code 1..1 Symbol in syntax defined by the system
  class.coding.display String 1..1 Representation defined by the system
Patient subject Reference 1..1 The Patient that the record referenced by this Pointer relates to. Supports Pointer retrieval scenarios.
Record owner author Reference 1..1 ODS code for the record owner organization.
Pointer owner custodian Reference 1..1 ODS code for the pointer owner organization.
Related documents relatesTo BackboneElement 0..1 Relationships to other documents
  relatesTo.code Code 1..1 The type of relationship between the documents. This element is mandatory if the relatesTo element is sent. Possible values are replaces, transforms, signs, appends.
  relatesTo.target Reference 1..1 The Target of the relationship. This should contain the logical reference to the target DocumentReference held within the NRL using the identifier property of this Reference Data Type.
Pointer referenced content BackboneElement 1..* Record referenced
Record mime type content.attachment.contentType code 1..1 Describes the format of the record such that the Consumer can pick an appropriate mechanism to handle the record. Without it the Consumer would be in the dark as to how to deal with the Record
Record URL content.attachment.url uri 1..1 The location of the record on the Provider’s system and/ or a service that allows you to look up information based on the provider url e.g. web page with service contact details
Record creation datetime content.attachment.creation dateTime 0..1 The date and time (on the Provider’s system) that the record was created. Note that this is an optional field and is meant to convey the concept of a static record.
Record format content.format Coding 1..1 Describes the technical structure and rules of the record and it’s retrieval route
  content.format.system Uri 1..1 Identity of the terminology system
  content.format.code Code 1..1 Symbol in syntax defined by the system
  content.format.display String 1..1 Representation defined by the system
Record Stability content.extension:contentStability Extension 1..1 Record content extension
  content.extension:contentStability.url Uri 1..1 identifies the meaning of the extension
  content.extension:contentStability.
valueCodeableConcept
CodeableConcept 1..1 Describes whether the record content at the time of the request is dynamically generated or is static
  content.extension:contentStability.
valueCodableConcept.coding.system
Uri 1..1 Identity of the terminology system
  content.extension:contentStability.
valueCodableConcept.coding.code
Code 1..1 Symbol in syntax defined by the system
  content.extension:contentStability.
valueCodableConcept.coding.display
String 1..1 Representation defined by the system
Record creation clinical setting context.practiceSetting CodeableConcept 1..1 Describes where the content was created, in what clinical setting
  context.practiceSetting.coding.system Uri 1..1 Identity of the terminology system
  context.practiceSetting.coding.code Code 1..1 Symbol in syntax defined by the system
  context.practiceSetting.coding.display String 1..1 Representation defined by the system
Period of care context.period Period 0..1 Details the time at which the documented care is relevant
  context.period.start dateTime 1..1 Starting time with inclusive boundary
  context.period.end dateTime 0..1 End time with inclusive boundary, if not ongoing

3. ValueSets

Links to the NRL FHIR value sets on the NHS FHIR Reference Server.

Valueset Description
NRL-RecordType-1 A ValueSet that identifies the NRL record type.
NRL-FormatCode-1 A ValueSet that identifies the NRL record format.
NRL-PracticeSetting-1 A ValueSet that identifies the NRL record practice setting.
NRL-RecordClass-1 A ValueSet that identifies the NRL record class.
NRL-ContentStability-1 A ValueSet that identifies the NRL record stability.
Spine-ErrorOrWarningCode-1 A ValueSet that identifies the Spine error or warning code in response to a request.
Spine-Response-Code-1-0 A set of codes to indicate low level error information about a Spine 2 error response to a request for patient record details. Exceptions raised by the Spine common requesthandler and not the NRL Service will be returned using the Spine default spine-operationoutcome-1-0 profile which binds to this default valueSet.

4. Extensions

Links to the NRL FHIR Extensions on the NHS FHIR Reference Server.

Extension Description
Extension-NRL-ContentStability-1 NRL Record Content Stability.

5. CodeSystems

Links to the NRL FHIR CodeSystems on the NHS FHIR Reference Server.

CodeSystem Description
Spine-ErrorOrWarningCode-1 Spine error codes and descriptions.
NRL-ContentStability-1 NRL record stability codes and descriptions.
NRL-FormatCode-1 NRL record format codes and descriptions.

6. Identifiers

NRL supported URI’s:

identifier URI Comment
Logical ID [baseurl]/DocumentReference/[id] Pointer identifier
Patient https://demographics.spineservices.nhs.uk/STU3/Patient/[NHS Number] Patient
Organization https://directory.spineservices.nhs.uk/STU3/Organization/[ODS Code] Record author or record owner
Master Identifier Identifier=[system]%7C[value] Pointer local/business indentifier

7. Examples

JSON Example

A JSON example of a DocumentReference resource is displayed below.

{
  "resourceType": "DocumentReference",
  "id": "c037a0cb-0c77-4976-83a1-a5d2703e6aa3-23325861873450086113",
  "meta": {
    "profile": [
      "https://fhir.nhs.uk/STU3/StructureDefinition/NRL-DocumentReference-1"
    ]
  },
  "status": "current",
  "type": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "736253002",
        "display": "Mental health crisis plan (record artifact)"
      }
    ]
  },
  "class": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "734163000",
        "display": "Care plan (record artifact)"
      }
    ]
  },
  "subject": {
    "reference": "https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210"
  },
  "created": "2016-03-08T15:26:00+01:00",
  "indexed": "2016-03-08T15:26:01+01:00",
  "author": [
    {
      "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/RGD"
    }
  ],
  "custodian": {
    "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/RR8"
  },
  "content": [
    {
      "attachment": {
        "contentType": "application/pdf",
        "url": "https://spine-proxy.national.ncrs.nhs.uk/p1.nhs.uk/MentalhealthCrisisPlanReport.pdf",
        "title": "Mental health Crisis Plan Report",
        "creation": "2016-03-08T15:26:00+01:00"
      },
      "format": {
        "system": "https://fhir.nhs.uk/STU3/CodeSystem/NRL-Format-1",
        "code": "direct:https://www.iso.org/standard/63534.html",
        "display": "PDF (Publicly accessible)"
      },
      "extension": [
        {
          "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-NRL-ContentStability-1",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "https://fhir.nhs.uk/STU3/CodeSystem/NRL-ContentStability-1",
                "code": "static",
                "display": "Static"
              }
            ]
          }
        }
      ]
    }
  ],
  "context": {
    "period": {
      "start": "2016-03-07T13:34:00+01:00"
    },
    "practiceSetting": {
      "coding": [
        {
          "system": "http://snomed.info/sct",
          "code": "892811000000109",
          "display": "Adult mental health service"
        }
      ]
    }
  }
}

XML Example

An XML example of a DocumentReference resource is displayed below.

<DocumentReference
    xmlns="http://hl7.org/fhir">
    <id value="c037a0cb-0c77-4976-83a1-a5d2703e6aa3-23325861873450086113"/>
    <meta>
        <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/NRL-DocumentReference-1"/>
    </meta>
    <status value="current"/>
    <type>
        <coding>
            <system value="http://snomed.info/sct"/>
            <code value="736253002"/>
            <display value="Mental health crisis plan (record artifact)"/>
        </coding>
    </type>
    <class>
        <coding>
            <system value="http://snomed.info/sct"/>
            <code value="734163000"/>
            <display value="Care plan (record artifact)"/>
        </coding>
    </class>
    <subject>
        <reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210"/>
    </subject>
    <created value="2016-03-08T15:26:00+01:00"/>
    <indexed value="2016-03-08T15:26:01+01:00"/>
    <author>
        <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/RGD"/>
    </author>
    <custodian>
        <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/RR8"/>
    </custodian>
    <content>
        <attachment>
            <contentType value="application/pdf"/>
            <url value="https://spine-proxy.national.ncrs.nhs.uk/p1.nhs.uk/MentalHealthCrisisPlanReport.pdf"/>
            <title value="Mental health Crisis Plan Report"/>
            <creation value="2016-03-08T15:26:00+01:00"/>
        </attachment>
        <format>
            <system value="https://fhir.nhs.uk/STU3/CodeSystem/NRL-Format-1"/>
            <code value="direct:https://www.iso.org/standard/63534.html"/>
            <display value="PDF (Publicly accessible)"/>
        </format>
        <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-NRL-ContentStability-1">
            <valueCodeableConcept>
                <coding>
                    <system value="https://fhir.nhs.uk/STU3/CodeSystem/NRL-ContentStability-1"/>
                    <code value="static"/>
                    <display value="Static"/>
                </coding>
            </valueCodeableConcept>
        </extension>
    </content>
    <context>
        <period>
            <start value="2016-03-07T13:34:00+01:00"/>
        </period>
        <practiceSetting>
            <coding>
                <system value="http://snomed.info/sct"/>
                <code value="892811000000109"/>
                <display value="Adult mental health service"/>
            </coding>
        </practiceSetting>
    </context>
</DocumentReference>

All content is available under the Open Government Licence v3.0, except where otherwise stated