{
  "resourceType": "StructureDefinition",
  "url": "http://fhir.synapxe.sg/StructureDefinition/profile-composition",
  "name": "Composition",
  "status": "draft",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Composition",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Composition",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Composition.implicitRules",
        "path": "Composition.implicitRules",
        "max": "0"
      },
      {
        "id": "Composition.language",
        "path": "Composition.language",
        "max": "0"
      },
      {
        "id": "Composition.text",
        "path": "Composition.text",
        "max": "0"
      },
      {
        "id": "Composition.contained",
        "path": "Composition.contained",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://fhir.synapxe.sg/StructureDefinition/profile-observation"
            ]
          }
        ]
      },
      {
        "id": "Composition.identifier",
        "path": "Composition.identifier",
        "max": "0"
      },
      {
        "id": "Composition.version",
        "path": "Composition.version",
        "max": "0"
      },
      {
        "id": "Composition.status",
        "path": "Composition.status",
        "fixedCode": "final"
      },
      {
        "id": "Composition.type.coding",
        "path": "Composition.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Composition.type.coding.system",
        "path": "Composition.type.coding.system",
        "min": 1,
        "fixedUri": "http://ihis.sg/ValueSet/document-type"
      },
      {
        "id": "Composition.type.coding.version",
        "path": "Composition.type.coding.version",
        "max": "0"
      },
      {
        "id": "Composition.type.coding.code",
        "path": "Composition.type.coding.code",
        "min": 1,
        "fixedCode": "ccda"
      },
      {
        "id": "Composition.type.coding.display",
        "path": "Composition.type.coding.display",
        "max": "0"
      },
      {
        "id": "Composition.type.coding.userSelected",
        "path": "Composition.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Composition.type.text",
        "path": "Composition.type.text",
        "max": "0"
      },
      {
        "id": "Composition.category",
        "path": "Composition.category",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Composition.category.coding",
        "path": "Composition.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Composition.category.coding.system",
        "path": "Composition.category.coding.system",
        "min": 1,
        "fixedUri": "http://ihis.sg/ValueSet/ccda-data-group"
      },
      {
        "id": "Composition.category.coding.version",
        "path": "Composition.category.coding.version",
        "max": "0"
      },
      {
        "id": "Composition.category.coding.code",
        "path": "Composition.category.coding.code",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://ihis.sg/ValueSet/ccda-data-group"
        }
      },
      {
        "id": "Composition.category.coding.display",
        "path": "Composition.category.coding.display",
        "max": "0"
      },
      {
        "id": "Composition.category.coding.userSelected",
        "path": "Composition.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Composition.category.text",
        "path": "Composition.category.text",
        "max": "0"
      },
      {
        "id": "Composition.subject",
        "path": "Composition.subject",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Composition.subject.reference",
        "path": "Composition.subject.reference",
        "max": "0"
      },
      {
        "id": "Composition.subject.type",
        "path": "Composition.subject.type",
        "max": "0"
      },
      {
        "id": "Composition.subject.identifier",
        "path": "Composition.subject.identifier",
        "max": "0"
      },
      {
        "id": "Composition.subject.display",
        "path": "Composition.subject.display",
        "definition": "the detail patient details is stored as encrypted and encoded in base64 format",
        "min": 1
      },
      {
        "id": "Composition.encounter",
        "path": "Composition.encounter",
        "max": "0"
      },
      {
        "id": "Composition.useContext",
        "path": "Composition.useContext",
        "max": "0"
      },
      {
        "id": "Composition.author",
        "path": "Composition.author",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "Composition.author.reference",
        "path": "Composition.author.reference",
        "max": "0"
      },
      {
        "id": "Composition.author.type",
        "path": "Composition.author.type",
        "fixedUri": "Organization"
      },
      {
        "id": "Composition.author.identifier",
        "path": "Composition.author.identifier",
        "min": 1
      },
      {
        "id": "Composition.author.identifier.use",
        "path": "Composition.author.identifier.use",
        "max": "0"
      },
      {
        "id": "Composition.author.identifier.type",
        "path": "Composition.author.identifier.type",
        "max": "0"
      },
      {
        "id": "Composition.author.identifier.system",
        "path": "Composition.author.identifier.system",
        "min": 1,
        "fixedUri": "http://ihis.sg/identifier/institution-code"
      },
      {
        "id": "Composition.author.identifier.value",
        "path": "Composition.author.identifier.value",
        "short": "institution short code in lowercase",
        "definition": "institution short code in lowercase",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://ihis.sg/identifier/institution-code"
        }
      },
      {
        "id": "Composition.author.identifier.period",
        "path": "Composition.author.identifier.period",
        "max": "0"
      },
      {
        "id": "Composition.author.identifier.assigner",
        "path": "Composition.author.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Composition.author.display",
        "path": "Composition.author.display",
        "max": "0"
      },
      {
        "id": "Composition.name",
        "path": "Composition.name",
        "max": "0"
      },
      {
        "id": "Composition.note",
        "path": "Composition.note",
        "max": "0"
      },
      {
        "id": "Composition.attester",
        "path": "Composition.attester",
        "max": "0"
      },
      {
        "id": "Composition.custodian",
        "path": "Composition.custodian",
        "max": "0"
      },
      {
        "id": "Composition.relatesTo",
        "path": "Composition.relatesTo",
        "max": "0"
      },
      {
        "id": "Composition.event",
        "path": "Composition.event",
        "max": "0"
      },
      {
        "id": "Composition.section.code",
        "path": "Composition.section.code",
        "min": 1
      },
      {
        "id": "Composition.section.code.coding",
        "path": "Composition.section.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Composition.section.code.coding.system",
        "path": "Composition.section.code.coding.system",
        "min": 1,
        "fixedUri": "http://ihis.sg/ValueSet/ccda-data-section"
      },
      {
        "id": "Composition.section.code.coding.version",
        "path": "Composition.section.code.coding.version",
        "max": "0"
      },
      {
        "id": "Composition.section.code.coding.code",
        "path": "Composition.section.code.coding.code",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://ihis.sg/ValueSet/ccda-data-section"
        }
      },
      {
        "id": "Composition.section.code.coding.display",
        "path": "Composition.section.code.coding.display",
        "max": "0"
      },
      {
        "id": "Composition.section.code.coding.userSelected",
        "path": "Composition.section.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Composition.section.code.text",
        "path": "Composition.section.code.text",
        "max": "0"
      },
      {
        "id": "Composition.section.author",
        "path": "Composition.section.author",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "Composition.section.author.reference",
        "path": "Composition.section.author.reference",
        "max": "0"
      },
      {
        "id": "Composition.section.author.type",
        "path": "Composition.section.author.type",
        "min": 1,
        "fixedUri": "Organization"
      },
      {
        "id": "Composition.section.author.identifier",
        "path": "Composition.section.author.identifier",
        "min": 1
      },
      {
        "id": "Composition.section.author.identifier.use",
        "path": "Composition.section.author.identifier.use",
        "max": "0"
      },
      {
        "id": "Composition.section.author.identifier.type",
        "path": "Composition.section.author.identifier.type",
        "max": "0"
      },
      {
        "id": "Composition.section.author.identifier.system",
        "path": "Composition.section.author.identifier.system",
        "min": 1,
        "fixedUri": "http://ihis.sg/identifier/institution-code"
      },
      {
        "id": "Composition.section.author.identifier.value",
        "path": "Composition.section.author.identifier.value",
        "short": "Institution short code",
        "definition": "Institution short code",
        "min": 1
      },
      {
        "id": "Composition.section.author.identifier.period",
        "path": "Composition.section.author.identifier.period",
        "max": "0"
      },
      {
        "id": "Composition.section.author.identifier.assigner",
        "path": "Composition.section.author.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Composition.section.author.display",
        "path": "Composition.section.author.display",
        "max": "0"
      },
      {
        "id": "Composition.section.focus",
        "path": "Composition.section.focus",
        "max": "0"
      },
      {
        "id": "Composition.section.text",
        "path": "Composition.section.text",
        "max": "0"
      },
      {
        "id": "Composition.section.orderedBy",
        "path": "Composition.section.orderedBy",
        "max": "0"
      },
      {
        "id": "Composition.section.entry",
        "path": "Composition.section.entry",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Observation"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Composition.section.entry.reference",
        "path": "Composition.section.entry.reference",
        "max": "0"
      },
      {
        "id": "Composition.section.entry.type",
        "path": "Composition.section.entry.type",
        "fixedUri": "Observation"
      },
      {
        "id": "Composition.section.entry.identifier",
        "path": "Composition.section.entry.identifier",
        "max": "0"
      },
      {
        "id": "Composition.section.entry.display",
        "path": "Composition.section.entry.display",
        "max": "0"
      },
      {
        "id": "Composition.section.emptyReason",
        "path": "Composition.section.emptyReason",
        "max": "0"
      },
      {
        "id": "Composition.section.section",
        "path": "Composition.section.section",
        "max": "0"
      }
    ]
  }
}