PackagesCanonicalsLogsProblems
    Packages
    uk.nhsdigital.r4@2.4.6
    https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference
description: null
package_name: uk.nhsdigital.r4
derivation: constraint
name: NHSDigitalDocumentReference
type: DocumentReference
elements:
  category: {mustSupport: true, index: 7}
  date: {mustSupport: true, index: 11}
  content:
    mustSupport: true
    index: 14
    elements:
      attachment:
        mustSupport: true
        index: 15
        elements:
          contentType: {index: 16}
          data: {mustSupport: true, index: 17}
          url: {mustSupport: true, index: 18}
  type:
    binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-DocumentType'}
    mustSupport: true
    index: 2
    elements:
      coding:
        index: 3
        elements:
          system: {index: 4}
          code: {index: 5}
          display: {index: 6}
        required: [display, system, code]
    required: [coding]
  author:
    type: Reference
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Device', 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole']
    index: 12
  custodian:
    type: Reference
    mustSupport: true
    refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization']
    index: 13
  status: {mustSupport: true, index: 1}
  identifier: {mustSupport: true, index: 0}
  context:
    mustSupport: true
    index: 19
    elements:
      practiceSetting:
        binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-CareSettingType'}
        mustSupport: true
        index: 20
      related:
        type: Reference
        mustSupport: true
        refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task']
        index: 21
  subject:
    type: Reference
    constraint:
      patient-reference: {human: subject - An identifier reference plus a display name or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference', severity: warning, expression: (reference.exists() or (identifier.exists() and display.exists()))}
      patient-nhs: {human: Supplied NHS Number is outside the English and Welsh NHS Number range or length of the number is wrong., source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference', severity: error, expression: 'identifier.where(system=''https://fhir.nhs.uk/Id/nhs-number'').exists().not() or (identifier.where(system=''https://fhir.nhs.uk/Id/nhs-number'').exists()  and identifier.where(system=''https://fhir.nhs.uk/Id/nhs-number'').value.matches(''^([456789]{1}[0-9]{9})$''))'}
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Group', 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient']
    index: 8
    elements:
      identifier:
        elements:
          system: {index: 9}
          value: {index: 10}
        required: [value, system]
package_version: 2.4.6
class: profile
kind: resource
url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference
base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference
version: null