PackagesCanonicalsLogsProblems
    Packages
    synapxe.hsar@1.0.0
    http://ihis.sg/StructureDefinition/Composition-put-base
description: Base profile for get-care-report and put-care-report API
package_name: synapxe.hsar
derivation: constraint
name: profile-Composition-put-base
type: Composition
elements:
  category: {index: 15}
  encounter: {index: 23}
  section:
    index: 37
    elements:
      code:
        elements:
          coding: {index: 38}
  implicitRules: {index: 0}
  attester: {index: 29}
  type:
    binding: {strength: required, valueSet: 'http://ihis.sg/ValueSet/hsg-document-type'}
    index: 11
    elements:
      coding:
        index: 12
        elements:
          system: {index: 13}
          code:
            pattern: {type: Code, value: care-report}
            index: 14
        required: [system, code]
    required: [coding]
  title:
    constraint:
      empty-value-validation: {human: Title should not be empty, severity: error, expression: $this.length() > 0}
    index: 28
  author:
    index: 24
    elements:
      identifier:
        index: 25
        elements:
          system:
            pattern: {type: Uri, value: 'http://ihis.sg/identifier/mcr'}
            index: 26
          value:
            constraint:
              empty-value-validation: {human: Author identifier value should not be empty, severity: error, expression: $this.length() > 0}
            index: 27
        required: [value, system]
    required: [identifier]
  extension:
    index: 6
    slicing:
      rules: closed
      min: 1
      max: 1
      slices:
        extensionCompositionCareReportYear:
          match: {}
          schema: {type: Extension, url: 'http://ihis.sg/extension/care-report-year', index: 7}
  contained:
    constraint:
      dom-2: {human: 'If the resource is contained in another resource, it SHALL NOT contain nested Resources', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: contained.contained.empty()}
      dom-4: {human: 'If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()}
      dom-3: {human: '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', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: '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-6: {human: A resource should have narrative for robust management, source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: warning, expression: text.`div`.exists()}
      dom-5: {human: 'If a resource is contained in another resource, it SHALL NOT have a security label', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: contained.meta.security.empty()}
      obs-7: {human: If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present, source: 'http://hl7.org/fhir/StructureDefinition/Observation', severity: error, expression: value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()}
      obs-6: {human: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present', source: 'http://hl7.org/fhir/StructureDefinition/Observation', severity: error, expression: dataAbsentReason.empty() or value.empty()}
    short: Information about an individual or animal receiving health care services
    index: 3
    slicing:
      rules: closed
      discriminator:
      - {path: $this, type: type}
      min: null
      slices:
        Patient:
          match: {}
          schema: {type: Patient, short: 'Contained, inline Resources', _required: true, index: 4}
          min: 1
          max: 1
        Observation:
          match: {}
          schema: {type: Observation, short: 'Contained, inline Resources', _required: true, index: 5}
          min: 1
  event: {index: 36}
  custodian:
    index: 30
    elements:
      type:
        pattern: {type: Uri, value: Organization}
        index: 31
      identifier:
        index: 32
        elements:
          system:
            pattern: {type: Uri, value: 'http://ihis.sg/identifier/hci-code'}
            index: 33
          value:
            constraint:
              empty-value-validation: {human: Organization identifier value should not be empty, severity: error, expression: $this.length() > 0}
            index: 34
        required: [value, system]
    required: [identifier, type]
  status:
    pattern: {type: Code, value: final}
    index: 10
  language: {index: 1}
  identifier: {index: 9}
  relatesTo: {index: 35}
  subject:
    type: Reference
    refers: ['http://ihis.sg/StructureDefinition/CareReport-Patient']
    index: 16
    elements:
      id: {index: 17}
      extension: {index: 18}
      reference: {index: 19}
      type: {index: 20}
      identifier: {index: 21}
      display: {index: 22}
    extensions: {}
    required: [reference]
  modifierExtension: {index: 8}
  text: {index: 2}
package_version: 1.0.0
extensions:
  extensionCompositionCareReportYear: {url: 'http://ihis.sg/extension/care-report-year', type: Extension, index: 7}
class: profile
kind: resource
url: http://ihis.sg/StructureDefinition/Composition-put-base
base: http://hl7.org/fhir/StructureDefinition/Composition
version: null
required: [extension, section, subject, custodian]