PackagesCanonicalsLogsProblems
    Packages
    synapxe.hsar@1.0.0
    http://ihis.sg/StructureDefinition/Composition-pophealth
description: Base profile for get-care-report and put-care-report API
package_name: synapxe.hsar
derivation: constraint
name: profile-Composition-put-care-report
type: Composition
elements:
  category: {index: 24}
  date: {short: Care report submission date, index: 33}
  encounter: {index: 32}
  section:
    short: Care report section
    index: 69
    elements:
      orderedBy: {index: 90}
      section: {index: 99}
      mode: {index: 89}
      title: {index: 73}
      emptyReason: {index: 98}
      author: {index: 86}
      extension: {index: 71}
      id: {index: 70}
      code:
        short: Type of section
        index: 74
        elements:
          id: {index: 75}
          extension: {index: 76}
          coding:
            index: 77
            elements:
              id: {index: 78}
              extension: {index: 79}
              system:
                pattern: {type: Uri, value: 'http://ihis.sg/extension/enrollment-status'}
                index: 80
              version: {index: 81}
              code: {short: Terminology code., index: 82}
              display: {short: Display name of the code., index: 83}
              userSelected: {index: 84}
            extensions: {}
            required: [system, code]
          text: {index: 85}
        extensions: {}
        required: [coding]
      focus: {index: 87}
      entry:
        index: 91
        elements:
          id: {index: 92}
          extension: {index: 93}
          reference: {short: A reference from one resource to another. Actual data element under the respective section, index: 94}
          type: {index: 95}
          identifier: {index: 96}
          display: {index: 97}
        extensions: {}
        required: [reference]
      modifierExtension: {index: 72}
      text: {index: 88}
    extensions: {}
    required: [entry, code]
  implicitRules: {index: 1}
  attester: {index: 51}
  type:
    binding: {strength: required, valueSet: 'http://ihis.sg/ValueSet/hsg-document-type'}
    index: 12
    elements:
      id: {index: 13}
      extension: {index: 14}
      coding:
        index: 15
        elements:
          id: {index: 16}
          extension: {index: 17}
          system: {index: 18}
          version: {index: 19}
          code:
            pattern: {type: Code, value: care-report}
            index: 20
          display: {index: 21}
          userSelected: {index: 22}
        extensions: {}
        required: [system, code]
      text: {index: 23}
    extensions: {}
    required: [coding]
  title:
    constraint:
      empty-value-validation: {human: Title should not be empty, severity: error, expression: $this.length() > 0}
    index: 49
  author:
    short: Who submitted the care report
    index: 34
    elements:
      id: {index: 35}
      extension: {index: 36}
      reference: {index: 37}
      type: {index: 38}
      identifier:
        short: Grouping of identifier
        index: 39
        elements:
          id: {index: 40}
          extension: {index: 41}
          use: {index: 42}
          type: {index: 43}
          system:
            pattern: {type: Uri, value: 'http://ihis.sg/identifier/nric'}
            index: 44
          value:
            constraint:
              empty-value-validation: {human: Author identifier value should not be empty, severity: error, expression: $this.length() > 0}
            short: The MCR number.
            index: 45
          period: {index: 46}
          assigner: {index: 47}
        extensions: {}
        required: [value, system]
      display: {short: The name of the submitter, index: 48}
    extensions: {}
    required: [identifier]
  extension:
    short: NA
    index: 7
    slicing:
      rules: closed
      min: 1
      max: 1
      slices:
        extensionCompositionCareReportYear:
          match: {}
          schema: {type: Extension, short: 'The calendar year of the care report data, such as 2023,2024,etc.', url: 'http://ihis.sg/extension/care-report-year', index: 8}
  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: 4
    slicing:
      rules: closed
      discriminator:
      - {path: $this, type: type}
      min: 1
      slices:
        Patient:
          match: {}
          schema: {type: Patient, short: 'Contained, inline Resources', _required: true, index: 5}
          min: 1
          max: 1
        Observation:
          match: {}
          schema: {type: Observation, short: 'Contained, inline Resources', _required: true, index: 6}
          min: 1
  event: {index: 68}
  custodian:
    short: The organization who submitted the care report
    index: 52
    elements:
      id: {index: 53}
      extension: {index: 54}
      reference: {index: 55}
      type:
        short: Resurce type
        pattern: {type: Uri, value: Organization}
        index: 56
      identifier:
        short: Grouping of identifier
        index: 57
        elements:
          id: {index: 58}
          extension: {index: 59}
          use: {index: 60}
          type: {index: 61}
          system:
            pattern: {type: Uri, value: 'http://ihis.sg/identifier/mcr'}
            index: 62
          value:
            constraint:
              empty-value-validation: {human: Organization identifier value should not be empty, severity: error, expression: $this.length() > 0}
            short: HCI code.
            index: 63
          period: {index: 64}
          assigner: {index: 65}
        extensions: {}
        required: [value, system]
      display: {index: 66}
    extensions: {}
    required: [identifier, type]
  status:
    pattern: {type: Code, value: final}
    short: The workflw/clinical status of this composition. The status is a marker for clinical standing of the document
    isModifierReason: NA
    index: 11
  language: {index: 2}
  id: {index: 0}
  identifier: {index: 10}
  relatesTo: {index: 67}
  subject:
    type: Reference
    short: Reference to the patient in patient master to link this care report data
    refers: ['http://ihis.sg/StructureDefinition/CareReport-Patient']
    index: 25
    elements:
      id: {index: 26}
      extension: {index: 27}
      reference: {short: 'Literal reference, relative, internal or absolute URL', index: 28}
      type: {index: 29}
      identifier: {index: 30}
      display: {index: 31}
    extensions: {}
    required: [reference]
  modifierExtension: {index: 9}
  confidentiality: {index: 50}
  text: {index: 3}
package_version: 1.0.0
extensions:
  extensionCompositionCareReportYear: {url: 'http://ihis.sg/extension/care-report-year', type: Extension, short: 'The calendar year of the care report data, such as 2023,2024,etc.', index: 8}
class: profile
kind: resource
url: http://ihis.sg/StructureDefinition/Composition-pophealth
base: http://hl7.org/fhir/StructureDefinition/Composition
version: null
required: [extension, section, subject, custodian, contained]