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",
  "_filename": "profile-Composition-base.json",
  "package_name": "synapxe.hsar",
  "date": "2019-11-01T09:29:23+11:00",
  "derivation": "constraint",
  "publisher": "IHIS",
  "fhirVersion": "4.3.0",
  "name": "profile-Composition-put-base",
  "abstract": false,
  "type": "Composition",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "1.0.0",
  "status": "active",
  "id": "35d3103f-25e5-4aaa-b7ce-30523ef11b8c",
  "kind": "resource",
  "url": "http://ihis.sg/StructureDefinition/Composition-put-base",
  "version": null,
  "differential": {
    "element": [ {
      "id": "Composition.implicitRules",
      "max": "0",
      "path": "Composition.implicitRules"
    }, {
      "id": "Composition.language",
      "max": "0",
      "path": "Composition.language"
    }, {
      "id": "Composition.text",
      "max": "0",
      "path": "Composition.text"
    }, {
      "constraint": [ {
        "key": "dom-2",
        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        "xpath": "not(parent::f:contained and f:contained)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.contained.empty()"
      }, {
        "key": "dom-4",
        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"
      }, {
        "key": "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",
        "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))",
        "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()"
      }, {
        "key": "dom-6",
        "human": "A resource should have narrative for robust management",
        "xpath": "exists(f:text/h:div)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "warning",
        "expression": "text.`div`.exists()"
      }, {
        "key": "dom-5",
        "human": "If a resource is contained in another resource, it SHALL NOT have a security label",
        "xpath": "not(exists(f:contained/*/f:meta/f:security))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.security.empty()"
      }, {
        "key": "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",
        "xpath": "not(f:*[starts-with(local-name(.), 'value')] and (for $coding in f:code/f:coding return f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value] [f:system/@value=$coding/f:system/@value]))",
        "source": "http://hl7.org/fhir/StructureDefinition/Observation",
        "severity": "error",
        "expression": "value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()"
      }, {
        "key": "obs-6",
        "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
        "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
        "source": "http://hl7.org/fhir/StructureDefinition/Observation",
        "severity": "error",
        "expression": "dataAbsentReason.empty() or value.empty()"
      } ],
      "path": "Composition.contained",
      "definition": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.",
      "short": "Information about an individual or animal receiving health care services",
      "mapping": [ {
        "map": "Event",
        "identity": "workflow"
      }, {
        "map": "< 363787002 |Observable entity|",
        "identity": "sct-concept"
      }, {
        "map": "OBX",
        "identity": "v2"
      }, {
        "map": "Observation[classCode=OBS, moodCode=EVN]",
        "identity": "rim"
      }, {
        "map": "clinical.diagnostics",
        "identity": "w5"
      }, {
        "map": "Patient[classCode=PAT]",
        "identity": "rim"
      }, {
        "map": "ClinicalDocument.recordTarget.patientRole",
        "identity": "cda"
      }, {
        "map": "administrative.individual",
        "identity": "w5"
      } ],
      "slicing": {
        "rules": "closed",
        "discriminator": [ {
          "path": "$this",
          "type": "type"
        } ]
      },
      "alias": [ "Vital Signs", "Measurement", "Results", "Tests", "SubjectOfCare Client Resident" ],
      "id": "Composition.contained",
      "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as laboratory reports, etc."
    }, {
      "id": "Composition.contained:Patient",
      "max": "1",
      "min": 1,
      "path": "Composition.contained",
      "type": [ {
        "code": "Patient",
        "profile": [ "http://ihis.sg/StructureDefinition/CareReport-Patient" ]
      } ],
      "short": "Contained, inline Resources",
      "sliceName": "Patient",
      "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."
    }, {
      "id": "Composition.contained:Observation",
      "min": 1,
      "path": "Composition.contained",
      "type": [ {
        "code": "Observation",
        "profile": [ "http://ihis.sg/StructureDefinition/CareReportObservation" ]
      } ],
      "short": "Contained, inline Resources",
      "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
      "sliceName": "Observation",
      "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."
    }, {
      "id": "Composition.extension",
      "max": "1",
      "min": 1,
      "path": "Composition.extension",
      "slicing": {
        "rules": "closed"
      }
    }, {
      "id": "Composition.extension:extensionCompositionCareReportYear",
      "path": "Composition.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "http://ihis.sg/extension/care-report-year" ]
      } ],
      "sliceName": "extensionCompositionCareReportYear"
    }, {
      "id": "Composition.modifierExtension",
      "max": "0",
      "path": "Composition.modifierExtension"
    }, {
      "id": "Composition.identifier",
      "max": "0",
      "path": "Composition.identifier"
    }, {
      "id": "Composition.status",
      "path": "Composition.status",
      "fixedCode": "final"
    }, {
      "id": "Composition.type",
      "path": "Composition.type",
      "binding": {
        "strength": "required",
        "valueSet": "http://ihis.sg/ValueSet/hsg-document-type"
      }
    }, {
      "id": "Composition.type.coding",
      "min": 1,
      "path": "Composition.type.coding"
    }, {
      "id": "Composition.type.coding.system",
      "min": 1,
      "path": "Composition.type.coding.system"
    }, {
      "id": "Composition.type.coding.code",
      "min": 1,
      "path": "Composition.type.coding.code",
      "fixedCode": "care-report"
    }, {
      "id": "Composition.category",
      "max": "0",
      "path": "Composition.category"
    }, {
      "id": "Composition.subject",
      "min": 1,
      "path": "Composition.subject",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "http://ihis.sg/StructureDefinition/CareReport-Patient" ]
      } ]
    }, {
      "id": "Composition.subject.id",
      "max": "0",
      "path": "Composition.subject.id"
    }, {
      "id": "Composition.subject.extension",
      "max": "0",
      "path": "Composition.subject.extension"
    }, {
      "id": "Composition.subject.reference",
      "min": 1,
      "path": "Composition.subject.reference"
    }, {
      "id": "Composition.subject.type",
      "max": "0",
      "path": "Composition.subject.type"
    }, {
      "id": "Composition.subject.identifier",
      "max": "0",
      "path": "Composition.subject.identifier"
    }, {
      "id": "Composition.subject.display",
      "max": "0",
      "path": "Composition.subject.display"
    }, {
      "id": "Composition.encounter",
      "max": "0",
      "path": "Composition.encounter"
    }, {
      "id": "Composition.author",
      "max": "1",
      "path": "Composition.author"
    }, {
      "id": "Composition.author.identifier",
      "min": 1,
      "path": "Composition.author.identifier"
    }, {
      "id": "Composition.author.identifier.system",
      "min": 1,
      "path": "Composition.author.identifier.system",
      "fixedUri": "http://ihis.sg/identifier/mcr"
    }, {
      "id": "Composition.author.identifier.value",
      "min": 1,
      "path": "Composition.author.identifier.value",
      "condition": [ "empty-value-validation" ],
      "constraint": [ {
        "key": "empty-value-validation",
        "human": "Author identifier value should not be empty",
        "severity": "error",
        "expression": "$this.length() > 0"
      } ]
    }, {
      "id": "Composition.title",
      "path": "Composition.title",
      "condition": [ "empty-value-validation" ],
      "constraint": [ {
        "key": "empty-value-validation",
        "human": "Title should not be empty",
        "severity": "error",
        "expression": "$this.length() > 0"
      } ]
    }, {
      "id": "Composition.attester",
      "max": "0",
      "path": "Composition.attester"
    }, {
      "id": "Composition.custodian",
      "min": 1,
      "path": "Composition.custodian"
    }, {
      "id": "Composition.custodian.type",
      "min": 1,
      "path": "Composition.custodian.type",
      "fixedUri": "Organization"
    }, {
      "id": "Composition.custodian.identifier",
      "min": 1,
      "path": "Composition.custodian.identifier"
    }, {
      "id": "Composition.custodian.identifier.system",
      "min": 1,
      "path": "Composition.custodian.identifier.system",
      "fixedUri": "http://ihis.sg/identifier/hci-code"
    }, {
      "id": "Composition.custodian.identifier.value",
      "min": 1,
      "path": "Composition.custodian.identifier.value",
      "condition": [ "empty-value-validation" ],
      "constraint": [ {
        "key": "empty-value-validation",
        "human": "Organization identifier value should not be empty",
        "severity": "error",
        "expression": "$this.length() > 0"
      } ]
    }, {
      "id": "Composition.relatesTo",
      "max": "0",
      "path": "Composition.relatesTo"
    }, {
      "id": "Composition.event",
      "max": "0",
      "path": "Composition.event"
    }, {
      "id": "Composition.section",
      "min": 1,
      "path": "Composition.section"
    }, {
      "id": "Composition.section.code.coding",
      "max": "1",
      "path": "Composition.section.code.coding"
    } ]
  },
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Composition"
}