1.0.0 - release

CambioOpenServicesIG - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: EncounterLite

Official URL: https://fhir.cambio.se/StructureDefinition/EncounterLite/v1 Version: 1.0.0
Active as of 2025-10-27 Computable Name: EncounterLite

Introduction

The EncounterLite profile is created from the FHIR resource Encounter.

Intended Use

EncounterLite profile is created to fetch inpatient encounters at a given location.

The intended use for reading data with this API is in first hand that the API is applied for direct access and should not be used to transfer data between caregivers. If it should be used for "data copying" between care providers, patient consent must be handled outside the API. Note that the security rules (i.e. PDL block) are not applied in particularly in this API and Consumer must handle the data carefully and with the awareness.

Specific Rules and Limitations

Type Description
Limitation Encounter status: It is only possible to request encounters that are in status "In-progress" and "Onleave".
Limitation Encounter class: It is only possible to request encounters that belong to inpatient class (IMP).
Rule The consumer of the API is responsible for making sure data retrieved is filtered in compliance with laws and regulations prior to presenting it to any end-users.
Rule For reading encounters, the external system needs to be able to evaluate PDL. This means whether the information can be displayed for a healthcare professional with a specific assignment. PDL data needed (HSA care unit and HSA care provider) is retrieved by including the organization referenced from Encounter.serviceProvider.OrganizationSEVendorLite.

Versions

COS version Profile version Required COSMIC version Date Description
4.3.0 1.0.0 COSMIC 3.12.0 July 2024 Initial version, support for GET and search.

Mapping for Payment Types

FHIR status Status in COSMIC
Planned New, Planned (Applicable for all contact types in COSMIC).
Arrived Arrived (Applicable only for outpatient contact types in COSMIC).
In-progress Ongoing (Applicable for all outpatient contact types. Applicable for inpatient contacts which do not have absence in status "Ongoing").
Onleave Ongoing (Applicable for inpatient contacts with absence that are in status "Ongoing").
Finished Dishcarged (Applicable for all contact types in COSMIC).
Canceled Missed (Applicable for all contact types in COSMIC).
Entered in error Canceled (Applicable for all contact types in COSMIC).

Supported Operations

HTTP Method Description
GET Fetch inpatient encounters that are in statuses "In-progress" and "Onleave" from COSMIC.

Search Parameters

Parameter Format Mandatory/Optional Description
location Identifier Mandatory The identifier of the location which encounters should be fetched.
statuses Code Mandatory The encounter statuses to be considered when fetching. Supported statuses: "In-progress" and "Onleave".
classes Code Mandatory The encounter classes to be considered when fetching. Supported classes: IMP
_profile String Mandatory Supported profile: https://fhir.cambio.se/StructureDefinition/EncounterLite/
_include String Optional Supported _include operations: Encounter:subject, Encounter:location, Encounter:serviceProvider

Supported Queries

  1. Search [baseURL]/Encounter

Supported _include params

  • Encounter:subject
  • Encounter:location
  • Encounter:serviceProvider

Supported _revinclude params

N/A

Error Codes

For common codes, refer to Error handling section.

Code Description
400 Invalid search parameter:Status is mandatory: Supported status are ( In Progress, On Leave )
400 Invalid search parameter:Class is mandatory: Supported classes are (IMP)
400 Invalid search parameter:location is mandatory
403 Restricted access for the user to view the encounter information

Usages:

  • CapabilityStatements using this Profile: Cambio Open Services
  • 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.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Encounter 0..* Encounter An interaction during which services are provided to the patient
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... status ?!Σ 1..1 code planned | arrived | triaged | in-progress | onleave | finished | cancelled +
Binding: EncounterStatus (required): Current state of the encounter.
.... system Σ 1..1 uri Identity of the terminology system
.... version Σ 1..1 string Version of the system - if relevant
.... code Σ 1..1 code Symbol in syntax defined by the system
.... display Σ 1..1 string Representation defined by the system
... subject Σ 1..1 Reference(PatientLiteSe) The patient or group present at the encounter
... period 1..1 Period The start and end time of the encounter
.... start ΣC 1..1 dateTime Starting time with inclusive boundary
... location 1..* BackboneElement List of locations where the patient has been
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... location 1..1 Reference(LocationUnitSe) Location the encounter takes place
.... status 1..1 code planned | active | reserved | completed
Binding: EncounterLocationStatus (required): The status of the location.
.... physicalType 1..1 CodeableConcept The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
Binding: LocationType (example): Physical form of the location.
... serviceProvider 1..1 Reference(OrganizationSEVendorLite) The organization (facility) responsible for this encounter

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Encounter.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.statusHistory.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.classHistory.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.location.statusrequiredEncounterLocationStatus
http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1
From the FHIR Standard
Encounter.location.physicalTypeexampleLocationType
http://hl7.org/fhir/ValueSet/location-physical-type
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorEncounterIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorEncounterIf 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorEncounterIf 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-5errorEncounterIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceEncounterA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

This structure is derived from Encounter

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Encounter 0..* Encounter An interaction during which services are provided to the patient
... identifier
.... use 0..0
.... type 0..0
.... system 1..1 uri The namespace for the identifier value
.... value 1..1 string The value that is unique
.... period 0..0
.... assigner 0..0
... statusHistory 0..0
... class 1..1 Coding Classification of patient encounter
.... system 1..1 uri Identity of the terminology system
.... version 1..1 string Version of the system - if relevant
.... code 1..1 code Symbol in syntax defined by the system
.... display 1..1 string Representation defined by the system
.... userSelected 0..0
... type 0..0
... serviceType 0..0
... priority 0..0
... subject 1..1 Reference(PatientLiteSe) The patient or group present at the encounter
... episodeOfCare 0..0
... basedOn 0..0
... participant 0..0
... appointment 0..0
... period 1..1 Period The start and end time of the encounter
.... start 1..1 dateTime Starting time with inclusive boundary
... length 0..0
... reasonCode 0..0
... reasonReference 0..0
... diagnosis 0..0
... account 0..0
... hospitalization 0..0
... location 1..* BackboneElement List of locations where the patient has been
.... location 1..1 Reference(LocationUnitSe) Location the encounter takes place
.... status 1..1 code planned | active | reserved | completed
.... physicalType 1..1 CodeableConcept The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
.... period 0..0
... serviceProvider 1..1 Reference(OrganizationSEVendorLite) The organization (facility) responsible for this encounter
... partOf 0..0

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Encounter 0..* Encounter An interaction during which services are provided to the patient
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier Σ 0..* Identifier Identifier(s) by which this encounter is known
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... system Σ 1..1 uri The namespace for the identifier value
Example General: http://www.acme.com/identifiers/patient
.... value Σ 1..1 string The value that is unique
Example General: 123456
... status ?!Σ 1..1 code planned | arrived | triaged | in-progress | onleave | finished | cancelled +
Binding: EncounterStatus (required): Current state of the encounter.
... class Σ 1..1 Coding Classification of patient encounter
Binding: ActEncounterCode (extensible): Classification of the encounter.
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... system Σ 1..1 uri Identity of the terminology system
.... version Σ 1..1 string Version of the system - if relevant
.... code Σ 1..1 code Symbol in syntax defined by the system
.... display Σ 1..1 string Representation defined by the system
... subject Σ 1..1 Reference(PatientLiteSe) The patient or group present at the encounter
... period 1..1 Period The start and end time of the encounter
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... start ΣC 1..1 dateTime Starting time with inclusive boundary
.... end ΣC 0..1 dateTime End time with inclusive boundary, if not ongoing
... location 1..* BackboneElement List of locations where the patient has been
.... 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
.... location 1..1 Reference(LocationUnitSe) Location the encounter takes place
.... status 1..1 code planned | active | reserved | completed
Binding: EncounterLocationStatus (required): The status of the location.
.... physicalType 1..1 CodeableConcept The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
Binding: LocationType (example): Physical form of the location.
... serviceProvider 1..1 Reference(OrganizationSEVendorLite) The organization (facility) responsible for this encounter

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Encounter.languagepreferredCommonLanguages
http://hl7.org/fhir/ValueSet/languages
From the FHIR Standard
Additional Bindings Purpose
AllLanguages Max Binding
Encounter.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.statusHistory.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.classHistory.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.participant.typeextensibleParticipantType
http://hl7.org/fhir/ValueSet/encounter-participant-type
From the FHIR Standard
Encounter.diagnosis.usepreferredDiagnosisRole
http://hl7.org/fhir/ValueSet/diagnosis-role
From the FHIR Standard
Encounter.hospitalization.dischargeDispositionexampleDischargeDisposition
http://hl7.org/fhir/ValueSet/encounter-discharge-disposition
From the FHIR Standard
Encounter.location.statusrequiredEncounterLocationStatus
http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1
From the FHIR Standard
Encounter.location.physicalTypeexampleLocationType
http://hl7.org/fhir/ValueSet/location-physical-type
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorEncounterIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorEncounterIf 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorEncounterIf 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-5errorEncounterIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceEncounterA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

This structure is derived from Encounter

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Encounter 0..* Encounter An interaction during which services are provided to the patient
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... status ?!Σ 1..1 code planned | arrived | triaged | in-progress | onleave | finished | cancelled +
Binding: EncounterStatus (required): Current state of the encounter.
.... system Σ 1..1 uri Identity of the terminology system
.... version Σ 1..1 string Version of the system - if relevant
.... code Σ 1..1 code Symbol in syntax defined by the system
.... display Σ 1..1 string Representation defined by the system
... subject Σ 1..1 Reference(PatientLiteSe) The patient or group present at the encounter
... period 1..1 Period The start and end time of the encounter
.... start ΣC 1..1 dateTime Starting time with inclusive boundary
... location 1..* BackboneElement List of locations where the patient has been
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... location 1..1 Reference(LocationUnitSe) Location the encounter takes place
.... status 1..1 code planned | active | reserved | completed
Binding: EncounterLocationStatus (required): The status of the location.
.... physicalType 1..1 CodeableConcept The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
Binding: LocationType (example): Physical form of the location.
... serviceProvider 1..1 Reference(OrganizationSEVendorLite) The organization (facility) responsible for this encounter

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Encounter.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.statusHistory.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.classHistory.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.location.statusrequiredEncounterLocationStatus
http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1
From the FHIR Standard
Encounter.location.physicalTypeexampleLocationType
http://hl7.org/fhir/ValueSet/location-physical-type
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorEncounterIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorEncounterIf 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorEncounterIf 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-5errorEncounterIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceEncounterA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

Differential View

This structure is derived from Encounter

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Encounter 0..* Encounter An interaction during which services are provided to the patient
... identifier
.... use 0..0
.... type 0..0
.... system 1..1 uri The namespace for the identifier value
.... value 1..1 string The value that is unique
.... period 0..0
.... assigner 0..0
... statusHistory 0..0
... class 1..1 Coding Classification of patient encounter
.... system 1..1 uri Identity of the terminology system
.... version 1..1 string Version of the system - if relevant
.... code 1..1 code Symbol in syntax defined by the system
.... display 1..1 string Representation defined by the system
.... userSelected 0..0
... type 0..0
... serviceType 0..0
... priority 0..0
... subject 1..1 Reference(PatientLiteSe) The patient or group present at the encounter
... episodeOfCare 0..0
... basedOn 0..0
... participant 0..0
... appointment 0..0
... period 1..1 Period The start and end time of the encounter
.... start 1..1 dateTime Starting time with inclusive boundary
... length 0..0
... reasonCode 0..0
... reasonReference 0..0
... diagnosis 0..0
... account 0..0
... hospitalization 0..0
... location 1..* BackboneElement List of locations where the patient has been
.... location 1..1 Reference(LocationUnitSe) Location the encounter takes place
.... status 1..1 code planned | active | reserved | completed
.... physicalType 1..1 CodeableConcept The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
.... period 0..0
... serviceProvider 1..1 Reference(OrganizationSEVendorLite) The organization (facility) responsible for this encounter
... partOf 0..0

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Encounter 0..* Encounter An interaction during which services are provided to the patient
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier Σ 0..* Identifier Identifier(s) by which this encounter is known
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... system Σ 1..1 uri The namespace for the identifier value
Example General: http://www.acme.com/identifiers/patient
.... value Σ 1..1 string The value that is unique
Example General: 123456
... status ?!Σ 1..1 code planned | arrived | triaged | in-progress | onleave | finished | cancelled +
Binding: EncounterStatus (required): Current state of the encounter.
... class Σ 1..1 Coding Classification of patient encounter
Binding: ActEncounterCode (extensible): Classification of the encounter.
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... system Σ 1..1 uri Identity of the terminology system
.... version Σ 1..1 string Version of the system - if relevant
.... code Σ 1..1 code Symbol in syntax defined by the system
.... display Σ 1..1 string Representation defined by the system
... subject Σ 1..1 Reference(PatientLiteSe) The patient or group present at the encounter
... period 1..1 Period The start and end time of the encounter
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... start ΣC 1..1 dateTime Starting time with inclusive boundary
.... end ΣC 0..1 dateTime End time with inclusive boundary, if not ongoing
... location 1..* BackboneElement List of locations where the patient has been
.... 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
.... location 1..1 Reference(LocationUnitSe) Location the encounter takes place
.... status 1..1 code planned | active | reserved | completed
Binding: EncounterLocationStatus (required): The status of the location.
.... physicalType 1..1 CodeableConcept The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
Binding: LocationType (example): Physical form of the location.
... serviceProvider 1..1 Reference(OrganizationSEVendorLite) The organization (facility) responsible for this encounter

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Encounter.languagepreferredCommonLanguages
http://hl7.org/fhir/ValueSet/languages
From the FHIR Standard
Additional Bindings Purpose
AllLanguages Max Binding
Encounter.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.statusHistory.statusrequiredEncounterStatus
http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
From the FHIR Standard
Encounter.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.classHistory.classextensibleActEncounterCode
http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
Encounter.participant.typeextensibleParticipantType
http://hl7.org/fhir/ValueSet/encounter-participant-type
From the FHIR Standard
Encounter.diagnosis.usepreferredDiagnosisRole
http://hl7.org/fhir/ValueSet/diagnosis-role
From the FHIR Standard
Encounter.hospitalization.dischargeDispositionexampleDischargeDisposition
http://hl7.org/fhir/ValueSet/encounter-discharge-disposition
From the FHIR Standard
Encounter.location.statusrequiredEncounterLocationStatus
http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1
From the FHIR Standard
Encounter.location.physicalTypeexampleLocationType
http://hl7.org/fhir/ValueSet/location-physical-type
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorEncounterIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorEncounterIf 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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorEncounterIf 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-5errorEncounterIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceEncounterA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

This structure is derived from Encounter

 

Other representations of profile: CSV, Excel, Schematron