Profile Design

The HL7 FHIR® standard

The HL7 FHIR® standard creates a common foundation on which a variety of different solutions are implemented. The resources contained in the specification usually require further adaptation to particular health or social care use cases; this adaptation is referred to as "profiling" and the resulting artefacts as "profiles".

General profiling approach

The checklist below was adhered to when developing a draft UK Core profile suitable for progression to Clinical and Technical Assurance.

  • Use any corresponding CareConnect profile as a starting point For each profile, where a CareConnect STU3 profile exists, refer to it as a starting point for the UK Core FHIR R4 profiling exercise
  • Consider the resource changes between FHIR STU3 and R4 versions Analyse the changes in the FHIR standard between FHIR STU3 version and FHIR R4,for example the addition or deletion of any elements and the introduction of new or updated terminology assets in the R4 version.
- Create the Profile using Firely Forge
- Profile file to show only the differential

Approach to StructureDefinition elements

  • Identifiers - Where existing CareConnect STU3 profiles have applied slicing and profiling to identifiers, this will be recreated in the UK Core profiles, then evaluated during Clinical and Technical assurance.
  • Removal of elements - No elements will be removed from the FHIR assets for the UK Core profiles during initial profiling prior to Clinical and Technical Assurance.
  • Experimental element - The FHIR specification defines the 'StructureDefinition.experimental' element as the following, when set to ‘true’: 'This structure was authored for testing purposes (or education/evaluation/marketing), and is not intended for genuine usage.' (Source: http://hl7.org/fhir/r4/structuredefinition.html). Currently there is no requirement in the UK Core to set the experimental element as ‘true’ or ‘false’, so this field should remain in the default view (undefined).

Naming convention for profiles

The UK Core profile name SHALL follow an agreed format. The name of a profile consists of a number of name segments, and will be in the form:-

[Base][FHIRAssetName][Specialism]


The segments are defined as follows:-

  • Base: (Mandatory) - The base for a profile this will always be UKCore.
  • FHIRAssetName: (Mandatory) - The name of the base FHIR Resource.
  • Specialism: (Required) - This is only used where there are multiple UK Core profiles for a given base resource type.

Note: "Mandatory" means that a segment SHALL be present. "Required" means that a segment SHOULD be present, in this case in the event of there being multiple profiles for one base resource.

The physical file name SHALL be in the format [Base]-[FHIRAssetName][Specialism] and SHALL be created in the file XML format.

Metadata usage

The list below contains the element differences between the UKcore and HL7.

Element name Base Cardinality UK Core Cardinality Type Definition, Constraints and Notes
id 0..1 1..1 id Logical id of this artifact.

In the UK Core the format in the following, with the FHIRAssetName and Specialism in PascalCase:

UKCore-[FHIRAssetName][Specialism].
url 0..1 1..1 uri Canonical identifier for this Profile, represented as a URI (globally unique).

In the UK Core the format is the following, with the FHIRAssetName and Specialism in PascalCase:

https://fhir.hl7.org.uk/StructureDefinition/UKCore-[FHIRAssetName][Specialism].
identifier 0..* 0..* Identifier Additional identifier for the Profile, for example an OID.

If this is an OID, this should be in the following format:

    <identifier>
        <system value="urn:ietf:rfc:3986"/>
        <value value="urn:oid:2.16.840.1.113883.2.1.3.2.4.16.21"/>
    </identifier>


Further guidance may be needed in due course.
Would we ever use this?
version 0..1 1..1 string Business version of the Profile.

This will follow the Semantic Versioning standard [major.minor.patch].
Further details about internal versioning for UK Core assets are available.
name 0..1 1..1 string Computer readable name, this should reflect the name in the url element.

In the UK Core the format is PascalCase:

UKCore[FHIRAssetName][Specialism] .
title 0..1 1..1 string Human readable name, this should reflect the name in the url element.

In the UK Core the format is Proper Case:

UK Core [FHIRAssetName] [Specialism].
status 1..1 1..1 code The publication status as defined in value set publication-status.

For the UKCore these are defined as:
  • draft - Profiles in development
  • active - Profiles that have been approved via Clinical and Technical Assurance
  • retired - Profiles that are no longer required
date 0..1 1..1 dateTime The date (and optionally time) when the Profile was published or last changed. The date must change when the business version or status changes.

Only the date, without time, is populated in the UK Core.
publisher 0..1 1..1 string Name of the publisher (organization or individual).

For all UK Core Profiles, where the base URL is https://fhir.hl7.org.uk, this will be HL7 UK.
contact 0..* 1..* ContactDetail Contact details for the publisher.

See the Metadata Design for details of how this SHALL be populated for all UK Core Profiles, where the base URL is https://fhir.hl7.org.uk/.
description 0..1 1..1 markdown A free text natural language description of the of the Profile from a consumer's perspective. This SHALL be in the following format:

This profile defines the UK constraints and extensions on the International FHIR resource [FHIRAssetName]([link to HL7 Resource]).
purpose 0..1 1..1 markdown This provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.
copyright 0..1 1..1 markdown A copyright statement relating to the Profile and/or its contents.

All UK Core Profiles SHALL contain the the copright as listed in Metadata Design
fhirVersion 0..1 0..1 code The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor].

The UKCore uses Simplifer Forge which mandates the use of this element.
Added - Is the mandatory correct?



Further information about resource is available.

Example of a Profile

Snapshot View

Command 'tree' could not render: File was not found for 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule'

Differential View

Command 'tree' could not render: File was not found for 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule'

Hybrid View

Command 'tree' could not render: File was not found for 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule'

Table View

Command 'table' could not render: File was not found for 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule'

XML View

Command 'xml' could not render: File was not found for 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule'

JSON View

Command 'json' could not render: File was not found for 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-Schedule'