This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R3 R2
A Resource Profile - a statement of use of one or more FHIR Resources. It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions.
This specification describes a set of base resources that are used in many different contexts in healthcare. In order to make this manageable, applications and specifications need to be able to describe restrictions on how one or more resource(s) are used, including defining extensions, and controlling how terminology is used. These descriptions need to be able to be shared through repositories of profile definitions, and need to allow for these usage statements to be published, compared, and used as the basis for code, report and UI generation. All these things are done using a "Profile", which itself is represented as a resource.
Profile resources have three main parts:
This page defines the profile resource, and describes how it is used. Note that as part of the specification itself, a full set of profiles for all resources and data types is published.
A FHIR RESTful server serving the profile resource is also a profile repository. HL7 hosts one for public registration of FHIR profiles at (yet to be done).
A profile specifies a set of rules that the content of a resource must adhere to. In addition, a resource is allowed to describe required behavior for applications that conform to the profile. However the ability of the profile to define this behavior is limited in some respects:
The consequence of this is that if a profile mandates behavior that cannot be ignored, it must also mandate an extension with isModifier=true in the instance. Another way of saying this is that knowledge must be explicit in the instance, not implicit in the profile.
As an example, if a profile wished to describe that any Allergy/Intolerance resource was deemed extremely unlikely, it could not simply say that this is so; instead, it must say that the resource must have an extension that represents this knowledge.
The profile resource has a set of metadata that is mostly shared with the Value Set and Conformance resources. The metadata describes the profile, and helps find the profile when registered in profile repositories.
identifier | The identifier that is used to identify this profile when it is referenced in a specification, model, design or an instance (should be globally unique URI, OID, or UUID) |
version |
The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. Note that there may be multiple resource versions of the profile that have this same identifier. The resource will have updates that create new versions for technical reasons, whereas the stated version number needs to be under the author's control |
name | A free text natural language name identifying the Profile |
publisher | Details of the individual or organization who accepts responsibility for publishing the profile. This helps establish the "authority/credibility" of the profile. |
telecom | Contact details to assist a user in finding and communicating with the publisher |
description | A free text natural language description of the profile and its use |
requirements | The Scope and Usage that this profile was created to meet |
code | A set of terms from external terminologies that may be used to assist with indexing and searching of profiles |
status | The status of the profile allows filtering of profiles that are appropriate for use vs. not. See the Status Codes |
experimental | This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage |
date | The date that this version of the profile was published |
fhirVersion | The version of the FHIR specification on which this profile is based. It is not necessary to specify the version, as most profiles are valid across multiple versions, and the validity of a profile against a particular version of FHIR can easily be checked by tooling. |
Notes:
This section specifies restrictions on the content of a resource or a data type. Each structure has a name, which as an internal name unique in the scope of the profile that is used to reuse the structure, and the type that it restricts, which is either a resource or data type defined in the FHIR specification. The following kinds of statements can be made about how a resource or data type is used:
All of these changed definitions SHALL be restrictions that are consistent with the rules defined in the base resource in the FHIR Specification. Note that some of these restrictions can be enforced by tooling (and are by the FHIR tooling), but others cannot be automatically enforced.
A structure definition consists of a linear list of element declarations. The inherent nested structure of the elements is derived from the path value of each element. For instance, a sequence of the element paths like this:
defines the following structure:
<Root> <childA> <grandChild/> </childA> <childB/> </Root>
or its JSON equivalent. The structure SHALL be coherent - children are never implied, and the path statements SHALL always be in order. The element list is a linear list rather than being explicitly nested because profile structures are frequently used in multiple places within a single profile, and this re-use is easier in a flat structure.
Profiles are always complete and static. This means that there is never a need to consult any additional profiles to fully understand the element structure that is defined, and there is no need to perform comparison between any profiles to determine the meaning of any profile.
One common feature of profiles is to take an element that may occur more than once (e.g. in a list), and describe a series of different restrictions on the elements in the list with associated additional meaning with each element, so that the list is split into a series of individual elements or sub-lists. In FHIR, this operation is known as "Slicing" a collection.
Here is an example to illustrate the process:
In this example, the base resource defines the "related" element which may occur multiple times. Each related element has a "type" element, and a "target" element which identifies another observation. In this diagram, the contents of the target element are shown in the inner box instead of the showing the target reference explicitly. Note that to avoid adding clutter to this simplified example, the "name" attribute of Observation is shown as (code) not a full CodeableConcept.
The profile for Blood Pressure constrains the related element list into 2 different elements: a systolic element, and a diastolic element. Each of these elements has a fixed value for the type element, and a the profile also fixes the contents of the target observation as well, specifying a fixed LOINC code for the name, and specifying that both have a value of type Quantity. This process is known as "slicing" and the Systolic and Diastolic elements are called "slices".
Note that when the resource is exchanged, the wire format that is exchanged is not altered by the profile. This means that the item profile names defined in the profile ("systolic", etc. in this example) are never exchanged. A resource instance looks like this:
<Observation> ... <related> <type value="component"/> <target ...> </related> <related> <type value="component"/> <target ...> </related> </Observation>
The only way to determine that the first related item corresponds to "Systolic" in the profile is to check the values of the elements - in this case, the name element in the target resource.
In order to make slicing easy to use, particularly in the context of code generation tools that work with profiles, any time slicing is performed in a profile, the profile SHALL nominate a "discriminator" - a contained element that is used to discriminate among the different slices. The profile SHALL fix the value of the contained element for each slice, or if the contained element has a terminology binding, it SHALL be associated with a complete binding with a version specific Value Set reference that enumerates the possible codes in the value set, and where there is no overlap between the codes in the value sets between slices.
Within a profile, a slice is defined using multiple element entries that share a path but have distinct names. These entries together form a "slice group" that is:
The value of the discriminator is either a path name that identifies the child element using a dotted notation, or a URI, which identifies an extension that serves as the discriminator (and which must be found on the element at which the slicing occurs). In the case above, the discriminator is "target.name" (the fact that there is a resource boundary between "target" and "name" is implied, not represented directly).
A profile can also define extensions. Some profiles only define extensions, and others define extensions as part of defining one or more structures. For an extension definition, the profile defines the code that identifies the extension. The full URI that refers to the extension when it is used in a resource is the identifier (from the metadata above) and then # + the code.
The extension definition also defines the context where the extension can be used (usually a particular path or a data type), and then defines it using the same details used to profile the structural elements.
Note that in the case of a profile that defines an extension, and then uses it, the extension will appear both in the extension definition section, and in one or more places in the structure defined by the profile.
For further discussion of defining and using extensions, along with some examples, see Extensibility.
Defining a extension means that it can be used in a resource somewhere. To actually use a resource, the extension list on the resource needs to be sliced. This is shown in the extensibility examples
Note that the minimum cardinality of an extension SHALL be a valid restriction on the minimum cardinality in the definition of the extension. if the minimum cardinality of the extension is 1 when it is defined, it can only be mandatory when it is added to a profile. This is not recommended - the minimum cardinality of an extension should be 0.
Coded elements have bindings that link from the element to a definition of the set of possible codes the element may contain. The binding identifies the definition of the set of possible codes, and controls how tightly the set of the possible codes is interpreted.
The set of possible codes is either a formal reference to a value set resource, which may be version specific, or a general reference to some web content that defines a set of codes. The second is most appropriate where set of values is defined by some external standard (such as mime types). Alternatively, where the binding is incomplete (e.g. under development) just a text description of the possible codes can be provided.
Bindings have two properties that define how the set of codes is used: isExtensible and conformance.
isExtensible indicates whether additional codes are allowed beyond those in the defined set of codes.
false | No additional codes are to be used beyond the list provided |
true | Supplemental codes or plain text may be needed (this is common because it is reasonable to think that concepts will need to be used which won't be in the defined set of codes) |
Conformance indicates the expectations for implementers of the specification. There are three possible values:
required |
Only codes in the specified set are allowed. If the strength is 'extensible', other codes may be used for concepts not covered by the value set but cannot be used for concepts covered by the bound code list, even if a profile constrains out some of those codes). |
preferred | For greater interoperability, implementers are strongly encouraged to use the bound set of codes, however alternate codes may be used in profiles if necessary without being considered non-conformant. |
example | The codes in the set are an example to illustrate the meaning of the field. There is no particular preference for its use. |
The interplay between the meaning of these is subtle but sometimes important. The following table helps define the meanings:
Conformance | isExtensible=false | isExtensible=true |
Required | Implementers SHALL use a code from the defined set | Implementers SHALL use a code from the defined set if one is applicable, but otherwise may provide their own code or use text |
Preferred | Implementers SHOULD use a code from the defined set | Implementers SHOULD use a code from the defined set if one is applicable, but MAY provide their own code or use text |
Example | Implementers MAY use a code from the defined set | Implementers MAY use a code from the defined set or provide their own code or use text |
A profile can define a set of bindings that it uses directly, or it can define a set of bindings for re-use in other profiles. To use bindings in other profiles, just provide an absolute reference. This is a reference to a binding in the same profile:
<binding value="te:OperationOutcomeSource"/>
This is a reference to a binding in some other profile:
<binding value="http://hl7.org/fhir/tooling/extensions#OperationOutcomeSource"/>
Bindings can reference value sets by version or independent of version. Value sets may themselves reference other value sets as well as code systems by version or independent of version. Unless all references are version-specific, it is possible that the set of codes permitted in the value set could change over time.
This resource is referenced by [Conformance]
<Profile xmlns="http://hl7.org/fhir"> <!-- from Resource: extension, modifierExtension, language, text, and contained --> <identifier value="[string]"/><!-- 0..1 Logical id to reference this profile § --> <version value="[string]"/><!-- 0..1 Logical id for this version of the profile § --> <name value="[string]"/><!-- 1..1 Informal name for this profile § --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) § --> <telecom><!-- 0..* Contact Contact information of the publisher § --></telecom> <description value="[string]"/><!-- 0..1 Natural language description of the profile § --> <code><!-- 0..* Coding Assist with indexing and finding § --></code> <status value="[code]"/><!-- 1..1 draft | active | retired § --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage § --> <date value="[dateTime]"/><!-- 0..1 Date for this version of the profile § --> <requirements value="[string]"/><!-- 0..1 Scope and Usage this profile is for --> <fhirVersion value="[id]"/><!-- 0..1 FHIR Version this profile targets § --> <mapping> <!-- 0..* External specification that the content is mapped to --> <identity value="[id]"/><!-- 1..1 Internal id when this mapping is used --> <uri value="[uri]"/><!-- 0..1 Identifies what this mapping refers to --> <name value="[string]"/><!-- 0..1 Names what this mapping refers to --> <comments value="[string]"/><!-- 0..1 Versions, Issues, Scope limitations etc --> </mapping> <structure> <!-- 0..* A constraint on a resource or a data type --> <type value="[code]"/><!-- 1..1 The Resource or Data Type being described --> <name value="[string]"/><!-- 0..1 Name for this particular structure (reference target) --> <publish value="[boolean]"/><!-- 0..1 This definition is published (i.e. for validation) --> <purpose value="[string]"/><!-- 0..1 Human summary: why describe this resource? --> <element> <!-- 0..* Definition of elements in the resource (if no profile) --> <path value="[string]"/><!-- 1..1 The path of the element (see the formal definitions) --> <representation value="[code]"/><!-- 0..* How this element is represented in instances --> <name value="[string]"/><!-- 0..1 Name for this particular element definition (reference target) --> <slicing> <!-- 0..1 This element is sliced - slices follow --> <discriminator value="[id]"/><!-- 1..1 Element that used to distinguish the slices --> <ordered value="[boolean]"/><!-- 1..1 If elements must be in same order as slices --> <rules value="[code]"/><!-- 1..1 closed | open | openAtEnd --> </slicing> <definition> <!-- 0..1 More specific definition of the element --> <short value="[string]"/><!-- 1..1 Concise definition for xml presentation --> <formal value="[string]"/><!-- 1..1 Full formal definition in human language --> <comments value="[string]"/><!-- 0..1 Comments about the use of this element --> <requirements value="[string]"/><!-- 0..1 Why is this needed? --> <synonym value="[string]"/><!-- 0..* Other names --> <min value="[integer]"/><!-- 1..1 Minimum Cardinality --> <max value="[string]"/><!-- 1..1 Maximum Cardinality (a number or *) --> <type> <!-- 0..* Data type and Profile for this element --> <code value="[code]"/><!-- 1..1 Name of Data type or Resource --> <profile value="[uri]"/><!-- 0..1 Profile.structure to apply --> <aggregation value="[code]"/><!-- 0..* contained | referenced | bundled - how aggregated --> </type> <nameReference value="[string]"/><!-- 0..1 To another element constraint (by element.name) --> <value[x]><!-- 0..1 * Fixed value: [as defined for a primitive type] --></value[x]> <example[x]><!-- 0..1 * Example value: [as defined for type] --></example[x]> <maxLength value="[integer]"/><!-- 0..1 Length for strings --> <condition value="[id]"/><!-- 0..* Reference to invariant about presence --> <constraint> <!-- 0..* Condition that must evaluate to true --> <key value="[id]"/><!-- 1..1 Target of 'condition' reference above --> <name value="[string]"/><!-- 0..1 Short human label --> <severity value="[code]"/><!-- 1..1 error | warning --> <human value="[string]"/><!-- 1..1 Human description of constraint --> <xpath value="[string]"/><!-- 1..1 XPath expression of constraint --> </constraint> <mustSupport value="[boolean]"/><!-- 0..1 If the element must supported --> <isModifier value="[boolean]"/><!-- 1..1 If this modifies the meaning of other elements --> <binding> <!-- 0..1 ValueSet details if this is coded --> <name value="[string]"/><!-- 1..1 Descriptive Name --> <isExtensible value="[boolean]"/><!-- 1..1 Can additional codes be used? --> <conformance value="[code]"/><!-- 0..1 required | preferred | example --> <description value="[string]"/><!-- 0..1 Human explanation of the value set --> <reference[x]><!-- 0..1 uri|Resource(ValueSet) Source of value set --></reference[x]> </binding> <mapping> <!-- 0..* Map element to another set of definitions --> <identity value="[id]"/><!-- 1..1 Reference to mapping declaration --> <map value="[string]"/><!-- 1..1 Details of the mapping --> </mapping> </definition> </element> <searchParam> <!-- 0..* Search params defined --> <name value="[string]"/><!-- 1..1 Name of search parameter --> <type value="[code]"/><!-- 1..1 number | date | string | token | reference | composite | quantity --> <documentation value="[string]"/><!-- 1..1 Contents and meaning of search parameter --> <xpath value="[string]"/><!-- 0..1 XPath that extracts the parameter set --> <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) --> </searchParam> </structure> <extensionDefn> <!-- 0..* Definition of an extension --> <code value="[code]"/><!-- 1..1 Identifies the extension in this profile --> <display value="[string]"/><!-- 0..1 Use this name when displaying the value --> <contextType value="[code]"/><!-- 1..1 resource | datatype | mapping | extension --> <context value="[string]"/><!-- 1..* Where the extension can be used in instances --> <definition><!-- 1..1 Content as for Profile.structure.element.definition Definition of the extension and its content --></definition> </extensionDefn> <query> <!-- 0..* Definition of a named query --> <name value="[string]"/><!-- 1..1 Special named queries (_query=) --> <documentation value="[string]"/><!-- 1..1 Describes the named query --> <parameter><!-- 0..* Content as for Profile.structure.searchParam Parameter for the named query --></parameter> </query> </Profile>
Alternate definitions: Schema/Schematron, Resource Profile
Path | Definition | Type | Reference |
---|---|---|---|
Profile.status | The lifecycle status of a Resource Profile | Fixed | http://hl7.org/fhir/resource-profile-status |
Profile.structure.type | Either a resource or a data type | Incomplete | http://hl7.org/fhir/defined-types |
Profile.structure.element.representation | How a property is represented on the wire | Fixed | http://hl7.org/fhir/property-representation |
Profile.structure.element.slicing.rules | How slices are interpreted when evaluating an instance | Fixed | http://hl7.org/fhir/resource-slicing-rules |
Profile.structure.element.definition.type.code | The type of an element - one of the FHIR data types | Incomplete | http://hl7.org/fhir/data-types |
Profile.structure.element.definition.type.aggregation | How resource references can be aggregated | Fixed | http://hl7.org/fhir/resource-aggregation-mode |
Profile.structure.element.definition.constraint.severity | SHALL applications comply with this constraint? | Fixed | http://hl7.org/fhir/constraint-severity |
Profile.structure.element.definition.binding.conformance | Binding conformance for applications | Fixed | http://hl7.org/fhir/binding-conformance |
Profile.structure.searchParam.type | Data types allowed to be used for search parameters | Fixed | http://hl7.org/fhir/search-param-type |
Profile.structure.searchParam.target | One of the resource types defined as part of FHIR | Incomplete | http://hl7.org/fhir/resource-types |
Profile.extensionDefn.contextType | How an extension context is interpreted | Fixed | http://hl7.org/fhir/extension-context |
http://loinc.org | LOINC code for the element |
http://snomed.info | SNOMED CT code for the element |
http://hl7.org/v3 | RIM mappin g |
http://hl7.org/v2 | v2 mapping |
http://nema.org/dicom | DICOM tag mapping |
http://w3.org/vcard | vCard equivalent field |
http://ihe.net/xds | XDS metadata equivalent |
If a profile is unambiguous, then the FHIR profile tooling (ref to be provided when the tooling exists) is able to generate reference implementation based object models that express the profiled model natively, where the object interface does not include prohibited elements, treats declared extensions as primary properties and slices lists according to the profile. This eases the burden on an implementer, though this object model can only be used with a sub-set of the possible resources.
The tooling is also able to generate bi-directional transforms between the normal XML format and an XML representation of this profiled object model and schema for this profiled XML representation. This XML form has extensions promoted into the primary XML form by using the extension code as the XML name and sliced lists are renamed to use the Profile.resource.element.name as the XML element name. Profiles are only suitable for this use if they ensure that there are no clashing extension names when the extension definition spaces are ignored and that the sliced list names are appropriate.
Implementations are allowed to exchange this profiled XML format. Implementations that do so are not fully conformant to FHIR; instead they can claim to be conformant to "Profiled FHIR". Implementations should consider carefully before adopting this approach; while it will reduce the amount of work required to initially implement particular profiles, it will increase the amount of work required to exchange this data with other communities or to re-use tooling and applications that are also used in other contexts. This cost should particularly be considered in light of the fact that the previously discussed tooling allows applications to be written as though they are dealing with "Profiled FHIR" instances when they are in fact sending and receiving fully conformant FHIR instances.
Search parameters for this resource. The standard parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Paths |
_id | token | The logical resource id associated with the resource (must be supported by all servers) | |
_language | token | The language of the resource | |
code | token | A code for the profile in the format uri::code (server may choose to do subsumption) | Profile.code |
date | date | The profile publication date | Profile.date |
description | string | Text search in the description of the profile | Profile.description |
extension | token | An extension code (use or definition) | Profile.extensionDefn.code |
identifier | token | The identifier of the profile | Profile.identifier |
name | string | Name of the profile | Profile.name |
publisher | string | Name of the publisher of the profile | Profile.publisher |
status | token | The current status of the profile | Profile.status |
type | token | Type of resource that is constrained in the profile | Profile.structure.type |
valueset | reference | A vocabulary binding code | Profile.structure.element.definition.binding.reference[x] (ValueSet) |
version | token | The version identifier of the profile | Profile.version |