HL7 PT FHIR Implementation Guide: Example IG Release 1 | STU1
1.0.0 - STU1

HL7 PT FHIR Implementation Guide: Example IG Release 1 | STU1, published by HL7 Portugal. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/hl7-pt/patient-admin-ig/ and changes regularly. See the Directory of published versions

## Resource Profile: PTMessageHeader

Official URL: http://example.com/fhir/example/StructureDefinition/MessageHeader-Pt | Version: 1.0.0
Active as of 2025-10-09 | Computable Name: PTMessageHeader

Usages:

- This Profile is not used by any profiles in this Implementation Guide

You can also check for usages in the FHIR IG Statistics

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
MessageHeader |  | 0..* | MessageHeader | A resource that describes a message that is exchanged between systems
id | Σ | 1..1 | id | Logical id of this artifact
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
event[x] | Σ | 1..1 | Coding | Code for the event this message represents or link to event definition Binding: Eventos FHIR para Gestão de Identidade de Utentes (extensible)
source | Σ | 1..1 | BackboneElement | Message source application
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
endpoint | Σ | 1..1 | url | Actual message source address or id
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
MessageHeader.event[x] | Base | extensible | Eventos FHIR para Gestão de Identidade de Utentes | 📦1.0.0 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | MessageHeader | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | MessageHeader | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where(((id.exists() and ('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(uri) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | MessageHeader | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

This structure is derived from MessageHeader

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
MessageHeader |  | 0..* | MessageHeader | A resource that describes a message that is exchanged between systems
id |  | 1..1 | id | Logical id of this artifact
meta |  | 0..0 |  |
implicitRules |  | 0..0 |  |
language |  | 0..0 |  |
text |  | 0..0 |  |
contained |  | 0..0 |  |
event[x] |  | 1..1 | Coding | Code for the event this message represents or link to event definition Binding: Eventos FHIR para Gestão de Identidade de Utentes (extensible)
destination |  |  |  |
target |  | 0..0 |  |
receiver |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
sender |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
enterer |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
author |  | 0..0 |  |
source |  |  |  |
software |  | 0..0 |  |
version |  | 0..0 |  |
contact |  | 0..0 |  |
responsible |  | 0..0 |  |
reason |  | 0..0 |  |
focus |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
definition |  | 0..0 |  |
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
MessageHeader.event[x] | Base | extensible | Eventos FHIR para Gestão de Identidade de Utentes | 📦1.0.0 | This IG

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
MessageHeader |  | 0..* | MessageHeader | A resource that describes a message that is exchanged between systems
id | Σ | 1..1 | id | Logical id of this artifact
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
event[x] | Σ | 1..1 | Coding | Code for the event this message represents or link to event definition Binding: Eventos FHIR para Gestão de Identidade de Utentes (extensible)
destination | Σ | 0..* | BackboneElement | Message destination application(s)
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
name | Σ | 0..1 | string | Name of system
endpoint | Σ | 1..1 | url | Actual destination address or id
receiver | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization) | Intended "real-world" recipient for the data
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
sender | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization) | Real world sender of the message
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
enterer | Σ | 0..1 | Reference(Practitioner | PractitionerRole) | The source of the data entry
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
source | Σ | 1..1 | BackboneElement | Message source application
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
name | Σ | 0..1 | string | Name of system
endpoint | Σ | 1..1 | url | Actual message source address or id
response | Σ | 0..1 | BackboneElement | If this is a reply to prior message
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
identifier | Σ | 1..1 | id | Id of original message
code | Σ | 1..1 | code | ok | transient-error | fatal-error Binding: ResponseType (required): The kind of response to a message.
details | Σ | 0..1 | Reference(OperationOutcome) | Specific list of hints/warnings/errors
focus | Σ | 0..* | Reference(Resource) | The actual content of the message
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
MessageHeader.event[x] | Base | extensible | Eventos FHIR para Gestão de Identidade de Utentes | 📦1.0.0 | This IG
MessageHeader.response.​code | Base | required | ResponseType | 📍4.3.0 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | MessageHeader | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | MessageHeader | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where(((id.exists() and ('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(uri) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | MessageHeader | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

This structure is derived from MessageHeader

Summary

Mandatory: 1 element
Prohibited: 25 elements

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
MessageHeader |  | 0..* | MessageHeader | A resource that describes a message that is exchanged between systems
id | Σ | 1..1 | id | Logical id of this artifact
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
event[x] | Σ | 1..1 | Coding | Code for the event this message represents or link to event definition Binding: Eventos FHIR para Gestão de Identidade de Utentes (extensible)
source | Σ | 1..1 | BackboneElement | Message source application
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
endpoint | Σ | 1..1 | url | Actual message source address or id
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
MessageHeader.event[x] | Base | extensible | Eventos FHIR para Gestão de Identidade de Utentes | 📦1.0.0 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | MessageHeader | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | MessageHeader | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where(((id.exists() and ('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(uri) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | MessageHeader | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

Differential View

This structure is derived from MessageHeader

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
MessageHeader |  | 0..* | MessageHeader | A resource that describes a message that is exchanged between systems
id |  | 1..1 | id | Logical id of this artifact
meta |  | 0..0 |  |
implicitRules |  | 0..0 |  |
language |  | 0..0 |  |
text |  | 0..0 |  |
contained |  | 0..0 |  |
event[x] |  | 1..1 | Coding | Code for the event this message represents or link to event definition Binding: Eventos FHIR para Gestão de Identidade de Utentes (extensible)
destination |  |  |  |
target |  | 0..0 |  |
receiver |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
sender |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
enterer |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
author |  | 0..0 |  |
source |  |  |  |
software |  | 0..0 |  |
version |  | 0..0 |  |
contact |  | 0..0 |  |
responsible |  | 0..0 |  |
reason |  | 0..0 |  |
focus |  |  |  |
type |  | 0..0 |  |
identifier |  | 0..0 |  |
display |  | 0..0 |  |
definition |  | 0..0 |  |
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
MessageHeader.event[x] | Base | extensible | Eventos FHIR para Gestão de Identidade de Utentes | 📦1.0.0 | This IG

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
MessageHeader |  | 0..* | MessageHeader | A resource that describes a message that is exchanged between systems
id | Σ | 1..1 | id | Logical id of this artifact
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
event[x] | Σ | 1..1 | Coding | Code for the event this message represents or link to event definition Binding: Eventos FHIR para Gestão de Identidade de Utentes (extensible)
destination | Σ | 0..* | BackboneElement | Message destination application(s)
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
name | Σ | 0..1 | string | Name of system
endpoint | Σ | 1..1 | url | Actual destination address or id
receiver | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization) | Intended "real-world" recipient for the data
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
sender | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization) | Real world sender of the message
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
enterer | Σ | 0..1 | Reference(Practitioner | PractitionerRole) | The source of the data entry
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
source | Σ | 1..1 | BackboneElement | Message source application
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
name | Σ | 0..1 | string | Name of system
endpoint | Σ | 1..1 | url | Actual message source address or id
response | Σ | 0..1 | BackboneElement | If this is a reply to prior message
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
identifier | Σ | 1..1 | id | Id of original message
code | Σ | 1..1 | code | ok | transient-error | fatal-error Binding: ResponseType (required): The kind of response to a message.
details | Σ | 0..1 | Reference(OperationOutcome) | Specific list of hints/warnings/errors
focus | Σ | 0..* | Reference(Resource) | The actual content of the message
id |  | 0..1 | id | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | Σ C | 0..1 | string | Literal reference, Relative, internal or absolute URL
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
MessageHeader.event[x] | Base | extensible | Eventos FHIR para Gestão de Identidade de Utentes | 📦1.0.0 | This IG
MessageHeader.response.​code | Base | required | ResponseType | 📍4.3.0 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
dom-2 | error | MessageHeader | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | MessageHeader | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where(((id.exists() and ('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(uri) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | MessageHeader | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | MessageHeader | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`

This structure is derived from MessageHeader

Summary

Mandatory: 1 element
Prohibited: 25 elements

Other representations of profile: CSV, Excel, Schematron