NHS Digital FHIR Implementation Guide (Retired - 2.1.50)

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.

NHSDigital-Patient

Profile url
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient

This profile is designed around Patient Demographics Services and PDS may be used as the source of this data. From a technical perspective PDS data can be accessed:

Use of PDS is not mandatory for Patient resources, Patient Administration Systems (PAS) and Master Patient Index (MPI) may be used instead. Only traced NHS Number SHOULD be used with this resource unless explicitly stated. Within NHS Trusts the inclusion of MRN (Medical Record Numbers) identifiers is highly recommended.



UK Core Patient

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueAddressAddress
birthSexI0..1Extension(code)
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueBooleanboolean
contactPreferenceI0..1Extension(Complex)
deathNotificationStatusI0..1Extension(Complex)
ethnicCategoryI0..1Extension(CodeableConcept)
residentialStatusI0..1Extension(CodeableConcept)
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueCodeableConceptCodeableConcept
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueBooleanboolean
modifierExtension?! I0..*Extension
id0..1string
nhsNumberVerificationStatusI1..1Extension(CodeableConcept)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemS Σ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
activeΣ ?!0..1boolean
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
textΣ0..1string
familyS Σ0..1string
givenS Σ0..*string
prefixΣ0..*string
suffixΣ0..*string
periodΣ I0..1Period
id0..1string
extensionI0..*Extension
id0..1string
otherContactSystemI0..1Extension(Coding)
value0..1System.String
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
genderΣ1..1codeBinding
id0..1string
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueDateTimedateTime
value0..1System.Date
deceasedBooleanboolean
deceasedDateTimedateTime
id0..1string
addressKeyI0..1Extension(Complex)
useΣ ?!0..1codeBinding
typeΣ0..1codeBinding
textΣ0..1string
lineΣ0..*string
cityΣ0..1string
districtΣ0..1string
stateΣ0..1string
postalCodeΣ0..1string
countryΣ0..1string
periodΣ I0..1Period
maritalStatus0..1CodeableConceptBinding
multipleBirthBooleanboolean
multipleBirthIntegerinteger
photoI0..*Attachment
id0..1string
contactRankI0..1Extension(positiveInt)
copyCorrespondenceIndicatorI0..1Extension(boolean)
modifierExtensionΣ ?! I0..*Extension
relationship0..*CodeableConceptBinding
name0..1HumanName
id0..1string
extensionI0..*Extension
id0..1string
otherContactSystemI0..1Extension(Coding)
value0..1System.String
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
address0..1Address
gender0..1codeBinding
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
periodI0..1Period
id0..1string
id0..1string
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueCodingCoding
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueCodingCoding
url1..1uriFixed Value
modifierExtensionΣ ?! I0..*Extension
language1..1CodeableConceptBinding
preferred0..1boolean
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uri
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uriFixed Value
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uriFixed Value
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
typeΣ1..1codeBinding

from UK Core Patient

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueAddressAddress
birthSexI0..1Extension(code)
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueBooleanboolean
contactPreferenceI0..1Extension(Complex)
deathNotificationStatusI0..1Extension(Complex)
ethnicCategoryI0..1Extension(CodeableConcept)
residentialStatusI0..1Extension(CodeableConcept)
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueCodeableConceptCodeableConcept
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueBooleanboolean
modifierExtension?! I0..*Extension
id0..1string
nhsNumberVerificationStatusI1..1Extension(CodeableConcept)
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemS Σ1..1uriFixed Value
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
activeΣ ?!0..1boolean
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
textΣ0..1string
familyS Σ0..1string
givenS Σ0..*string
prefixΣ0..*string
suffixΣ0..*string
periodΣ I0..1Period
id0..1string
extensionI0..*Extension
id0..1string
otherContactSystemI0..1Extension(Coding)
value0..1System.String
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
genderΣ1..1codeBinding
id0..1string
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueDateTimedateTime
value0..1System.Date
deceasedBooleanboolean
deceasedDateTimedateTime
id0..1string
addressKeyI0..1Extension(Complex)
useΣ ?!0..1codeBinding
typeΣ0..1codeBinding
textΣ0..1string
lineΣ0..*string
cityΣ0..1string
districtΣ0..1string
stateΣ0..1string
postalCodeΣ0..1string
countryΣ0..1string
periodΣ I0..1Period
maritalStatus0..1CodeableConceptBinding
multipleBirthBooleanboolean
multipleBirthIntegerinteger
photoI0..*Attachment
id0..1string
contactRankI0..1Extension(positiveInt)
copyCorrespondenceIndicatorI0..1Extension(boolean)
modifierExtensionΣ ?! I0..*Extension
relationship0..*CodeableConceptBinding
name0..1HumanName
id0..1string
extensionI0..*Extension
id0..1string
otherContactSystemI0..1Extension(Coding)
value0..1System.String
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..1positiveInt
periodΣ I0..1Period
address0..1Address
gender0..1codeBinding
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
periodI0..1Period
id0..1string
id0..1string
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueCodingCoding
id0..1string
extensionI0..0Extension
url1..1uriFixed Value
valueCodingCoding
url1..1uriFixed Value
modifierExtensionΣ ?! I0..*Extension
language1..1CodeableConceptBinding
preferred0..1boolean
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ1..1uri
valueΣ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uriFixed Value
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uriFixed Value
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
id0..1string
extensionI0..*Extension
referenceΣ I0..1string
typeΣ0..1uriBinding
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemΣ0..1uri
valueΣ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(UK Core Organization)
displayΣ0..1string
typeΣ1..1codeBinding

keyhumanseverityexpression
patient-nhsSupplied NHS Number is outside the English and Welsh NHS Number range or length of the number is wrong.warningidentifier.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})$'))
nhsd-5generalPractitioner - a display name should be providedwarning(display.exists())


Must Support, Optional and Not Supported

Elements marked with a S MUST be supported by both producing and receiving systems. They should be populated if the data exists or the profile has made them mandatory.

The following elements SHOULD NOT are not expected to be supported by consuming or receiving systems.

  • photo
  • link
  • multipleBirth
  • managingOrganization

Elements that are neither marked as Must Support or listed as unsupported, are optional.


Patient Nomination of Dispensing Contractor

A patient can choose up to three nominated dispensers to cover different contractor types:

  • Community Pharmacy
  • Appliance Contractor
  • Dispensing Doctor

Each of those nominations is held in an Extension.

All require a ODS/ANANA code from Organisation Data Services. This contains download CSV files for these organisations, for API access please see Organisation Data Service - FHIR API

nominatedPharmacy (extension nominatedPharmacy)

Extension UK Core Nominated Pharmacy

"extension":  [
        {
            "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NominatedPharmacy",
            "valueReference": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "Y12345"
                }
            }
        },

medicalApplianceSupplier (extension medicalApplianceSupplier)

Extension UK Core Medical Appliance Supplier

{
            "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-PreferredDispenserOrganization",
            "valueReference": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "Y23456"
                }
            }
        }

preferredDispenserOrganization (extension preferredDispenserOrganization)

Extension UK Core Preferred Dispenser Organization

{
            "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicalApplianceSupplier",
            "valueReference": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "Y34567"
                }
            }
        }

identifier

At least one patient identifier, MUST be provided. Where a traced NHS number is available for a patient this MUST be included.

Name FHIR identifier OID/HL7v3 HL7v2 ITK Format Description
NHS Number https://fhir.nhs.uk/Id/nhs-number 2.16.840.1.113883.2.1.4.1 NHS NNNNNNNNNN NHS Number allocated to the patient in England and Wales
CHI Number 2.16.840.1.113883.2.1.3.2.4.16.53 NNNNNNNNNN CHI Number allocated to the patient in Scotland
NHS Logon ID https://fhir.nhs.uk/Id/nhs-login-sub uuid NHS Login unique identifer which is referred to as sub in NHS Login (OpenID)

Local identifiers such as MRN MUST include a system which identifies NHS provider/assigning authority.

"identifier":  [
        {
            "extension":  [
                {
                    "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus",
                    "valueCodeableConcept": {
                        "coding":  [
                            {
                                "code": "01",
                                "display": "Number present and verified",
                                "system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus"
                            }
                        ]
                    }
                }
            ],
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9000000009"
        },
        {
            "system": "https://fhir.elmet.nhs.uk/Id/MRN",
            "value": "X54321"
        }
    ],

name

At least one patient name must be provided. It is recommended a use is provided. Name use mappings from previous NHS Digital standards can be found here:

"name":  [
        {
            "family": "Smith",
            "given":  [
                "Jane"
            ],
            "prefix":  [
                "Mrs"
            ],
            "suffix":  [
                "MBE"
            ],
            "use": "usual"
        }
    ]

address

It is recommended that use provided. Mappings from previous HL7 standards for use:

"address":  [
        {
            "line":  [
                "1 Trevelyan Square",
                "Boar Lane",
                "City Centre",
                "Leeds",
                "West Yorkshire"
            ],
            "postalCode": "LS1 6AE",
            "use": "home"
        }
    ],

telecom

It is recommended that both system and use provided. Mappings from previous HL7 standards for use:

Mappings from previous HL7 standards for use:

"telecom":  [
        {
            "system": "phone",
            "use": "work",
            "value": "01632960587"
        }
    ]

generalPractitioner

GP Surgery SHOULD be provided. It is recommended the patients GP Surgery is the first item in the array and branch surgery is second. It is also suggested type and display (name of practice) is also included.

"generalPractitioner":  [
        {
            "type": "Organization"
            "identifier": {
                "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                "value": "Y12345"
            },
            "display": "Kirkgate Practice"
        }
    ]

Search Parameters

Name Type Description Conformance Path
address-postalcode string A postalCode specified in an address MAY Patient.address.postalCode
birthdate date The patient's date of birth SHALL Patient.birthDate
email token A value in an email contact MAY Patient.telecom (system=email)
family string A portion of the family name of the patient SHALL Patient.name.family
gender token Gender of the patient SHALL Patient.gender
given string A portion of the given name of the patient SHALL Patient.name.given
identifier token A patient identifier (NHS Number, Hospital Number, etc) SHALL Patient.identifier
name string A portion of either family or given name of the patient SHALL Patient.name
phone token A value in a phone contact MAY Patient.telecom(system=phone)

Additional parameters can be on Patient - Search Parameters

Mandatory Search Parameters

identifier (NHS Number, Hospital Number, etc)

SHALL support searching a patient by an identifier such as a MPI/PAS using the identifier search parameter:

GET [baseUrl]/Patient?identifier={system|}[code]

Example:

GET [baseUrl]/Patient?identifier=https://fhir.nhs.uk/Id/nhs-number|9876543210

GET [baseUrl]/Patient?identifier=9876543210

Return all Patient resources with NHS Number of 9876543210.

name

SHALL support searching for a patient by a server defined search that matches any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text using the name search parameter:

GET [baseUrl]/Patient?name=[name]

Example:

GET [baseUrl]/Patient?name=bernie%20kanfeld

Return all Patient resources with name of Bernie Kanfeld.


Optional Search Parameters

address-postalcode

SHOULD support searching using the address-postalcode search parameter:

GET [baseUrl]/Patient?address-postalcode=[address-postalcode]

Example:

GET [baseUrl]/Patient?address-postalcode=NG10%201ZZ

Return all Patient resources with Post Code of NG10 1ZZ.

birthdate

SHOULD support searching using the birthdate search parameter

  • including support for these date comparators: eq
GET [baseUrl]/Patient?birthdate=[date]

Example:

GET [baseUrl]/Patient?birthdate=eq2010-01-01

Return all Patient resources that have a birthdate equal to 1st Jan 2010.

email

SHOULD support searching using the email search parameter:

GET [baseUrl]/Patient?email=[email]

Example:

GET [baseUrl]/Patient?email=bernie.kanfeld@chumhum.com

Return all Patient resources with email address of bernie.kanfeld@chumhum.com.

family

SHOULD support searching using the family search parameter:

GET [baseUrl]/Patient?family=[family]

Example:

GET [baseUrl]/Patient?family=kanfeld

Return all Patient resources with surname of Kanfeld.

gender

SHOULD support searching using the gender search parameter:

GET [baseUrl]/Patient?gender={system|}[code]

Example:

GET [baseUrl]/Patient?gender=female

Return all Patient resources with Administrative Sex of female.

given

SHOULD support searching using the given search parameter:

GET [baseUrl]/Patient?given=[given]

Example:

GET [baseUrl]/Patient?given=bernie

Return all Patient resources with forename of Bernie.

phone

SHOULD support searching using the phone search parameter:

GET [baseUrl]/Patient?phone=[phone]

Example:

GET [baseUrl]/Patient?phone=07999123456

Return all Patient resources with phone number of 07999 123456.


back to top