HL7 FHIR Implementation Guide: Sri Lanka
0.1.0 - STU1

HL7 FHIR Implementation Guide: Sri Lanka, published by Jembi Health Systems. This is not an authorized publication; it is the continuous build for version 0.1.0. This version is based on the current content of https://github.com/jembi/Sri-Lanka and changes regularly. See the Directory of published versions

## Resource Profile: HIMS Composition

Official URL: http://openhie.org/fhir/sri-lanka/StructureDefinition/hims-composition | Version: 0.1.0
Active as of 2023-11-10 | Computable Name: HIMSComposition

Logically groups all resources into a single document structure.

Usage:

- Examples for this Resource Profile: Composition/HIMSCompositionExample

### Formal Views of Profile Content

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

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

This structure is derived from Composition

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Composition |  | 0..* | Composition | A set of resources composed into a single coherent clinical statement with clinical attestation
subject |  | 1..1 | Reference(Resource) | Who and/or what the composition is about
encounter |  | 1..1 | Reference(Encounter) | Context of the Composition
section |  | 1..* | BackboneElement | Composition is broken into sections
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Composition |  | 0..* | Composition | A set of resources composed into a single coherent clinical statement with clinical attestation
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 | preliminary | final | amended | entered-in-error Binding: CompositionStatus (required): The workflow/clinical status of the composition.
type | Σ | 1..1 | CodeableConcept | Kind of composition (LOINC if possible) Binding: FHIRDocumentTypeCodes (preferred): Type of a composition.
subject | Σ | 1..1 | Reference(Resource) | Who and/or what the composition is about
encounter | Σ | 1..1 | Reference(Encounter) | Context of the Composition
date | Σ | 1..1 | dateTime | Composition editing time
author | Σ | 1..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the composition
title | Σ | 1..1 | string | Human Readable name/title
section | C | 1..* | BackboneElement | Composition is broken into sections
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet
Composition.status | required | CompositionStatus
Composition.type | preferred | FHIRDocumentTypeCodes

#### Constraints

Id | Grade | Path(s) | Details | Requirements
cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections : text.exists() or entry.exists() or section.exists() |
cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty : emptyReason.empty() or entry.empty() |
dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Composition | 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 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-4 | error | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Composition | 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() |

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Composition |  | 0..* | Composition | A set of resources composed into a single coherent clinical statement with clinical attestation
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
language |  | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
identifier | Σ | 0..1 | Identifier | Version-independent identifier for the Composition
status | ?!Σ | 1..1 | code | preliminary | final | amended | entered-in-error Binding: CompositionStatus (required): The workflow/clinical status of the composition.
type | Σ | 1..1 | CodeableConcept | Kind of composition (LOINC if possible) Binding: FHIRDocumentTypeCodes (preferred): Type of a composition.
category | Σ | 0..* | CodeableConcept | Categorization of Composition Binding: DocumentClassValueSet (example): High-level kind of a clinical document at a macro level.
subject | Σ | 1..1 | Reference(Resource) | Who and/or what the composition is about
encounter | Σ | 1..1 | Reference(Encounter) | Context of the Composition
date | Σ | 1..1 | dateTime | Composition editing time
author | Σ | 1..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the composition
title | Σ | 1..1 | string | Human Readable name/title
confidentiality | Σ | 0..1 | code | As defined by affinity domain Binding: v3.ConfidentialityClassification (2014-03-26) (required): Codes specifying the level of confidentiality of the composition.
attester |  | 0..* | BackboneElement | Attests to accuracy of composition
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
mode |  | 1..1 | code | personal | professional | legal | official Binding: CompositionAttestationMode (required): The way in which a person authenticated a composition.
time |  | 0..1 | dateTime | When the composition was attested
party |  | 0..1 | Reference(Patient | RelatedPerson | Practitioner | PractitionerRole | Organization) | Who attested the composition
custodian | Σ | 0..1 | Reference(Organization) | Organization which maintains the composition
relatesTo |  | 0..* | BackboneElement | Relationships to other compositions/documents
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
code |  | 1..1 | code | replaces | transforms | signs | appends Binding: DocumentRelationshipType (required): The type of relationship between documents.
target[x] |  | 1..1 |  | Target of the relationship
targetIdentifier |  |  | Identifier |
targetReference |  |  | Reference(Composition) |
event | Σ | 0..* | BackboneElement | The clinical service(s) being documented
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
code | Σ | 0..* | CodeableConcept | Code(s) that apply to the event being documented Binding: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.
period | Σ | 0..1 | Period | The period covered by the documentation
detail | Σ | 0..* | Reference(Resource) | The event(s) being documented
section | C | 1..* | BackboneElement | Composition is broken into sections
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
title |  | 0..1 | string | Label for section (e.g. for ToC)
code |  | 0..1 | CodeableConcept | Classification of section (recommended) Binding: DocumentSectionCodes (example): Classification of a section of a composition/document.
author |  | 0..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the section
focus |  | 0..1 | Reference(Resource) | Who/what the section is about, when it is not about the subject of composition
text | C | 0..1 | Narrative | Text summary of the section, for human interpretation
mode |  | 0..1 | code | working | snapshot | changes Binding: ListMode (required): The processing mode that applies to this section.
orderedBy |  | 0..1 | CodeableConcept | Order of section entries Binding: ListOrderCodes (preferred): What order applies to the items in the entry.
entry | C | 0..* | Reference(Resource) | A reference to data that supports this section
emptyReason | C | 0..1 | CodeableConcept | Why the section is empty Binding: ListEmptyReasons (preferred): If a section is empty, why it is empty.
section | C | 0..* | See section (Composition) | Nested Section
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet
Composition.language | preferred | CommonLanguages
Additional Bindings | Purpose
AllLanguages | Max Binding
Composition.status | required | CompositionStatus
Composition.type | preferred | FHIRDocumentTypeCodes
Composition.category | example | DocumentClassValueSet
Composition.confidentiality | required | v3.ConfidentialityClassification
Composition.attester.mode | required | CompositionAttestationMode
Composition.relatesTo.code | required | DocumentRelationshipType
Composition.event.code | example | ActCode
Composition.section.code | example | DocumentSectionCodes
Composition.section.mode | required | ListMode
Composition.section.orderedBy | preferred | ListOrderCodes
Composition.section.emptyReason | preferred | ListEmptyReasons

#### Constraints

Id | Grade | Path(s) | Details | Requirements
cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections : text.exists() or entry.exists() or section.exists() |
cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty : emptyReason.empty() or entry.empty() |
dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Composition | 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 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-4 | error | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Composition | 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 Composition

Summary

Mandatory: 3 elements

Differential View

This structure is derived from Composition

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Composition |  | 0..* | Composition | A set of resources composed into a single coherent clinical statement with clinical attestation
subject |  | 1..1 | Reference(Resource) | Who and/or what the composition is about
encounter |  | 1..1 | Reference(Encounter) | Context of the Composition
section |  | 1..* | BackboneElement | Composition is broken into sections
Documentation for this format

Key Elements View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Composition |  | 0..* | Composition | A set of resources composed into a single coherent clinical statement with clinical attestation
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 | preliminary | final | amended | entered-in-error Binding: CompositionStatus (required): The workflow/clinical status of the composition.
type | Σ | 1..1 | CodeableConcept | Kind of composition (LOINC if possible) Binding: FHIRDocumentTypeCodes (preferred): Type of a composition.
subject | Σ | 1..1 | Reference(Resource) | Who and/or what the composition is about
encounter | Σ | 1..1 | Reference(Encounter) | Context of the Composition
date | Σ | 1..1 | dateTime | Composition editing time
author | Σ | 1..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the composition
title | Σ | 1..1 | string | Human Readable name/title
section | C | 1..* | BackboneElement | Composition is broken into sections
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet
Composition.status | required | CompositionStatus
Composition.type | preferred | FHIRDocumentTypeCodes

#### Constraints

Id | Grade | Path(s) | Details | Requirements
cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections : text.exists() or entry.exists() or section.exists() |
cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty : emptyReason.empty() or entry.empty() |
dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Composition | 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 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-4 | error | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Composition | 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() |

Snapshot View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Composition |  | 0..* | Composition | A set of resources composed into a single coherent clinical statement with clinical attestation
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
language |  | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
identifier | Σ | 0..1 | Identifier | Version-independent identifier for the Composition
status | ?!Σ | 1..1 | code | preliminary | final | amended | entered-in-error Binding: CompositionStatus (required): The workflow/clinical status of the composition.
type | Σ | 1..1 | CodeableConcept | Kind of composition (LOINC if possible) Binding: FHIRDocumentTypeCodes (preferred): Type of a composition.
category | Σ | 0..* | CodeableConcept | Categorization of Composition Binding: DocumentClassValueSet (example): High-level kind of a clinical document at a macro level.
subject | Σ | 1..1 | Reference(Resource) | Who and/or what the composition is about
encounter | Σ | 1..1 | Reference(Encounter) | Context of the Composition
date | Σ | 1..1 | dateTime | Composition editing time
author | Σ | 1..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the composition
title | Σ | 1..1 | string | Human Readable name/title
confidentiality | Σ | 0..1 | code | As defined by affinity domain Binding: v3.ConfidentialityClassification (2014-03-26) (required): Codes specifying the level of confidentiality of the composition.
attester |  | 0..* | BackboneElement | Attests to accuracy of composition
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
mode |  | 1..1 | code | personal | professional | legal | official Binding: CompositionAttestationMode (required): The way in which a person authenticated a composition.
time |  | 0..1 | dateTime | When the composition was attested
party |  | 0..1 | Reference(Patient | RelatedPerson | Practitioner | PractitionerRole | Organization) | Who attested the composition
custodian | Σ | 0..1 | Reference(Organization) | Organization which maintains the composition
relatesTo |  | 0..* | BackboneElement | Relationships to other compositions/documents
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
code |  | 1..1 | code | replaces | transforms | signs | appends Binding: DocumentRelationshipType (required): The type of relationship between documents.
target[x] |  | 1..1 |  | Target of the relationship
targetIdentifier |  |  | Identifier |
targetReference |  |  | Reference(Composition) |
event | Σ | 0..* | BackboneElement | The clinical service(s) being documented
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
code | Σ | 0..* | CodeableConcept | Code(s) that apply to the event being documented Binding: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.
period | Σ | 0..1 | Period | The period covered by the documentation
detail | Σ | 0..* | Reference(Resource) | The event(s) being documented
section | C | 1..* | BackboneElement | Composition is broken into sections
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
title |  | 0..1 | string | Label for section (e.g. for ToC)
code |  | 0..1 | CodeableConcept | Classification of section (recommended) Binding: DocumentSectionCodes (example): Classification of a section of a composition/document.
author |  | 0..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the section
focus |  | 0..1 | Reference(Resource) | Who/what the section is about, when it is not about the subject of composition
text | C | 0..1 | Narrative | Text summary of the section, for human interpretation
mode |  | 0..1 | code | working | snapshot | changes Binding: ListMode (required): The processing mode that applies to this section.
orderedBy |  | 0..1 | CodeableConcept | Order of section entries Binding: ListOrderCodes (preferred): What order applies to the items in the entry.
entry | C | 0..* | Reference(Resource) | A reference to data that supports this section
emptyReason | C | 0..1 | CodeableConcept | Why the section is empty Binding: ListEmptyReasons (preferred): If a section is empty, why it is empty.
section | C | 0..* | See section (Composition) | Nested Section
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet
Composition.language | preferred | CommonLanguages
Additional Bindings | Purpose
AllLanguages | Max Binding
Composition.status | required | CompositionStatus
Composition.type | preferred | FHIRDocumentTypeCodes
Composition.category | example | DocumentClassValueSet
Composition.confidentiality | required | v3.ConfidentialityClassification
Composition.attester.mode | required | CompositionAttestationMode
Composition.relatesTo.code | required | DocumentRelationshipType
Composition.event.code | example | ActCode
Composition.section.code | example | DocumentSectionCodes
Composition.section.mode | required | ListMode
Composition.section.orderedBy | preferred | ListOrderCodes
Composition.section.emptyReason | preferred | ListEmptyReasons

#### Constraints

Id | Grade | Path(s) | Details | Requirements
cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections : text.exists() or entry.exists() or section.exists() |
cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty : emptyReason.empty() or entry.empty() |
dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Composition | 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 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-4 | error | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Composition | 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 Composition

Summary

Mandatory: 3 elements

Other representations of profile: CSV, Excel, Schematron