v1

latestOpenAPI 3.0.0Apache 2.02026-07-143533191.6 KB
DocumentReference

Create new or update existing document pointer

Create new pointers.

To create a document pointer you must ensure:

  • the body must be a valid FHIR R4 DocumentReference
  • subject MUST be a Patient reference using a valid NHS number. e.g.
    "subject": {
      "identifier": {
        "system": "https://fhir.nhs.uk/Id/nhs-number",
        "value": "3495456481"
      }
    },
    
  • custodian MUST contain an Organization reference using a valid ODS code, agreed during onboarding. e.g.
    "custodian": {
      "identifier": {
        "system": "https://fhir.nhs.uk/Id/ods-organization-code",
        "value": "Y05868"
      }
    }
    
  • type MUST match one of the Document Types defined for BaRS, this is either a Appointment (booking) or a Patient referral.
    "type": {
      "coding": [
        {
          "system": "http://snomed.info/sct",
          "code": "749001000000101",
          "display": "Appointment (record artifact)"
        }
      ]
    }
    
  • category MUST indicate the broader class of the Document Type as agreed during onboarding, e.g.
    "category": [
      {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/document-reference-category",
            "code": "clinical",
            "display": "Clinical"
          }
        ]
      }
    ]
    
  • content MUST have at least one entry.
  • content[].format[] SHOULD indicate the document is structured or not, e.g.
    "format": [
      {
        "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
        "code": "urn:nhs-ic:structured",
        "display": "Structured Document"
      }
    ]
    
  • content[].attachment.url MUST contain the direct URL, e.g.
    "attachment": 
      {
        "url": "https://server.fire.ly/r4/Appointment/GL0-DZOqD39"
      }
    
  • author SHOULD contain an Organization reference using a valid ODS code, agreed during onboarding. e.g.
    "author": [
      {
        "identifier": {
          "system": "https://fhir.nhs.uk/Id/ods-organization-code",
          "value": "Y05868"
        }
      }
    ]
    
  • context.period SHOULD indicate Appointment date and time, e.g.
    "context": {
      "period": {
        "start": "2025-02-01T06:45:00+00:00",
        "end": "2025-02-01T07:00:00+00:00"
      },
    
  • identifier.[] MUST contain the correct identifiers for BaRS including service-id AND product-id, e.g.
    {
      "system": "https://fhir.nhs.uk/Id/BaRS-Identifier",
      "value": "GL0-DZOqD39"
    },
    {
      "system": "https://fhir.nhs.uk/Id/dos-service-id",
      "value": "2000072491"
    },
    {
      "system": "https://fhir.nhs.uk/id/product-id",
      "value": "P.GH7-4TY"
    }
    
post/DocumentReference

Headers

X-Request-Idstring uuid required
Example:c1ab3fba-6bae-4ba4-b257-5a87c44d4a91

The X-Request-Id for the request header, when supplied, mirrored back by the receiver.

X-Correlation-Idstring uuid required
Example:9562466f-c982-4bd5-bb0e-255e9f5e6689

The X-Correlation-Id for the request header, when supplied, mirrored back by the receiver.

Acceptstring required
Example:application/fhir+json; version=1.4.0

The Accept header must also contain version of BaRS Core the Sender is expecting to interoperate on.

use-contextstring required
Example:a4t2|validation|servicerequest-response|new

This header is for usage statistics for the BaRS Proxy for NHS England.

Response

Create / Supersede successful response