NHS Notify DocumentReference Schema

2025-01-01 | 📑 1217 words | ⏱ 13 mins | 🧾 History | ✍ NHS Notify | 🔑 NHS Notify

A reference to a document for submission to NHS Notify. Provides metadata about the document so that it can be discovered and managed.

Known Issues / Todo

  • This page is draft and is subject to rapid change, and may not be fully accurate or complete

NHS Notify DocumentReference Schema

A reference to a document for submission to NHS Notify. Provides metadata about the document so that it can be discovered and managed.

Schema Information

  • Schema ID: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.json
  • Schema Version: https://notify.nhs.uk/fhir/schemas/common/2025-11-draft/nhs-notify-document-reference.schema.json
  • Source File: digital-letters/2025-10-draft/nhs-notify-document-reference.schema.yaml

Properties

resourceType

Type: string

The type of the resource (always ‘DocumentReference’)”

Constant value: DocumentReference

id

Type: string

Logical id of this artifact”

status

Type: string

The status of the document reference (current superseded entered-in-error)

Constant value: current

docStatus

Type: string

The workflow/clinical status of the composition (registered partial preliminary final amended corrected appended cancelled entered-in-error deprecated unknown)

type

Type: object

Kind of document (LOINC if possible)

Properties of type

coding

Type: array

Code defined by a terminology system

subject

Type: object

Who/what is the subject of the document

Properties of subject

identifier

Type: object

An identifier for the target resource

author

Type: array

Who and/or what authored the document

custodian

Type: object

Organization which maintains the document

Properties of custodian

identifier

Type: object

Logical reference, when literal reference is not known

date

Type: string

When this document reference was created

Format: date-time

description

Type: string

Human-readable description of the document

content

Type: array

Document referenced

Required Fields

  • resourceType
  • id
  • status
  • docStatus
  • subject
  • content
  • custodian
  • author
  • date

Type

object

Raw Schema

$id: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/nhs-notify-document-reference.schema.json
$schema: https://notify.nhs.uk/fhir/schemas/common/2025-11-draft/nhs-notify-document-reference.schema.json
title: NHS Notify DocumentReference Schema
description: A reference to a document for submission to NHS Notify. Provides metadata
  about the document so that it can be discovered and managed.
type: object
required:
- resourceType
- id
- status
- docStatus
- subject
- content
- custodian
- author
- date
properties:
  resourceType:
    type: string
    description: The type of the resource (always 'DocumentReference')"
    const: DocumentReference
  id:
    type: string
    description: Logical id of this artifact"
  status:
    type: string
    description: The status of the document reference (current | superseded | entered-in-error)
    const: current
  docStatus:
    type: string
    description: The workflow/clinical status of the composition (registered | partial
      | preliminary | final | amended | corrected | appended | cancelled | entered-in-error
      | deprecated | unknown)
  type:
    type: object
    description: Kind of document (LOINC if possible)
    properties:
      coding:
        type: array
        description: Code defined by a terminology system
        items:
          type: object
          properties:
            system:
              type: string
              description: Identity of the terminology system
            code:
              type: string
              description: Symbol in syntax defined by the system
            display:
              type: string
              description: Representation defined by the system
  subject:
    type: object
    description: Who/what is the subject of the document
    required:
    - identifier
    properties:
      identifier:
        type: object
        description: An identifier for the target resource
        required:
        - system
        - value
        properties:
          system:
            type: string
            description: The namespace for the identifier value
            const: https://fhir.nhs.uk/Id/nhs-number
          value:
            type: string
            description: NHS number - a 10 digit identifier for patients in the NHS
            pattern: ^[0-9]{10}$
  author:
    type: array
    description: Who and/or what authored the document
    items:
      type: object
      required:
      - identifier
      properties:
        identifier:
          type: object
          description: Logical reference, when literal reference is not known
          required:
          - system
          - value
          properties:
            system:
              type: string
              description: The namespace for the identifier value
              const: https://fhir.nhs.uk/Id/ods-organization-code
            value:
              type: string
              description: The value that is unique within the system
        display:
          type: string
          description: Text alternative for the resource
  custodian:
    type: object
    description: Organization which maintains the document
    required:
    - identifier
    properties:
      identifier:
        type: object
        description: Logical reference, when literal reference is not known
        required:
        - system
        - value
        properties:
          system:
            type: string
            description: The namespace for the identifier value
            const: https://fhir.nhs.uk/Id/ods-organization-code
          value:
            type: string
            description: The value that is unique within the system
            const: C4L8E
            $comment: 'C4L8E is NHS ENGLAND: NHS NOTIFY'
  date:
    type: string
    description: When this document reference was created
    format: date-time
  description:
    type: string
    description: Human-readable description of the document
  content:
    type: array
    description: Document referenced
    minItems: 1
    maxItems: 1
    items:
      type: object
      required:
      - attachment
      properties:
        attachment:
          type: object
          description: Where to access the document
          required:
          - contentType
          - title
          - data
          properties:
            contentType:
              type: string
              description: Mime type of the content, with charset etc.
              const: application/pdf
            title:
              type: string
              description: Label to display in place of the data
            data:
              type: string
              description: Data inline, base64ed - a stream of bytes, base64 encoded
                (RFC 4648)
              pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$