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.
Profile meta.profile uri 0..1 The URI of the FHIR profile that the resource conforms to.
Version meta.versionId string 0..1 Assigned by the NRL at creation or update time. Used to track the current version of a Pointer.
Pointer last updated datetime meta.lastUpdated datetime 0..1 Assigned by the NRL at creation and update time. The date and time that the pointer was last updated.
Pointer indexed datetime indexed datetime 0..1 Assigned by the NRL at creation time. The date and time that the pointer was created.
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
Patient subject Reference 1..1 The NHS number of the patient that the record referenced by this Pointer relates to. Supports Pointer retrieval scenarios.
Pointer owner custodian Reference 1..1 ODS code for the pointer owner organization.
Record owner author Reference 1..1 ODS code for the record owner organization.
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
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 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
Pointer referenced content BackboneElement 1..* Record referenced
Record creation datetime content.attachment.creation dateTime 0..1 The date and time (on the Provider’s system) that the record was created, for static records.
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 format content.format Coding 1..1 Describes the technical structure and rules of the record such that the Consumer can pick an appropriate mechanism to handle the record.
  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 mime type content.attachment.contentType code 1..1 Describes the type of data such that the Consumer can pick an appropriate mechanism to handle the record.
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
Related documents relatesTo BackboneElement 0..1 Relationship to another pointer
  relatesTo.code Code 1..1 The type of relationship between the documents. This element is mandatory if the relatesTo element is sent and the value MUST be replaces.
  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.

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 NHS Number
Organisation https://directory.spineservices.nhs.uk/STU3/Organization/[ODS Code] Record author or record owner ODS code
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"
      }
    ]
  },
  "class": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "734163000",
        "display": "Care plan"
      }
    ]
  },
  "subject": {
    "reference": "https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210"
  },
  "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/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport.pdf",
        "creation": "2016-03-08T15:26:00+01:00"
      },
      "format": {
        "system": "https://fhir.nhs.uk/STU3/CodeSystem/NRL-FormatCode-1",
        "code": "urn:nhs-ic:unstructured",
        "display": "Unstructured Document"
      },
      "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": "708168004",
          "display": "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"/>
        </coding>
    </type>
    <class>
        <coding>
            <system value="http://snomed.info/sct"/>
            <code value="734163000"/>
            <display value="Care plan"/>
        </coding>
    </class>
    <subject>
        <reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/9876543210"/>
    </subject>
    <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/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport.pdf"/>
            <creation value="2016-03-08T15:26:00+01:00"/>
        </attachment>
        <format>
            <system value="https://fhir.nhs.uk/STU3/CodeSystem/NRL-FormatCode-1"/>
            <code value="urn:nhs-ic:unstructured"/>
            <display value="Unstructured Document"/>
        </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="708168004"/>
                <display value="Mental health service"/>
            </coding>
        </practiceSetting>
    </context>
</DocumentReference>

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