{
  "resourceType": "StructureDefinition",
  "id": "Flag",
  "url": "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/Flag/v1",
  "version": "2.0",
  "name": "Flag",
  "status": "active",
  "date": "2024-04-30T12:12:41.7225116+00:00",
  "description": "This profile contains information regarding alerts, central outgoing flags, and general flags, including environmental flags. central outgoing flags are messages from the central site that will inform specific dispatch units about flags they need to be aware of.\r\nThe profile is based on the Flag Resource.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Flag",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Flag",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Flag.id",
        "path": "Flag.id",
        "max": "0"
      },
      {
        "id": "Flag.meta",
        "path": "Flag.meta"
      },
      {
        "id": "Flag.meta.id",
        "path": "Flag.meta.id",
        "max": "0"
      },
      {
        "id": "Flag.meta.versionId",
        "path": "Flag.meta.versionId",
        "min": 1
      },
      {
        "id": "Flag.meta.lastUpdated",
        "path": "Flag.meta.lastUpdated",
        "min": 1
      },
      {
        "id": "Flag.meta.source",
        "path": "Flag.meta.source",
        "max": "0"
      },
      {
        "id": "Flag.meta.profile",
        "path": "Flag.meta.profile",
        "max": "0"
      },
      {
        "id": "Flag.meta.security",
        "path": "Flag.meta.security",
        "max": "0"
      },
      {
        "id": "Flag.meta.tag",
        "path": "Flag.meta.tag",
        "max": "0"
      },
      {
        "id": "Flag.implicitRules",
        "path": "Flag.implicitRules",
        "max": "0"
      },
      {
        "id": "Flag.language",
        "path": "Flag.language",
        "max": "0"
      },
      {
        "id": "Flag.text",
        "path": "Flag.text",
        "max": "0"
      },
      {
        "id": "Flag.contained",
        "path": "Flag.contained",
        "max": "0"
      },
      {
        "id": "Flag.extension:detailOfFlag",
        "path": "Flag.extension",
        "sliceName": "detailOfFlag",
        "definition": "This element refers to detail of flag.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/flag-detail"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Flag.extension:detailOfFlag.value[x]",
        "path": "Flag.extension.value[x]",
        "definition": "Reference to the flags associated with the patient.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/Condition/v1",
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/Procedure/v1",
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/AllergyIntolerance/v1",
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/MedicationStatement/v1"
            ],
            "aggregation": [
              "referenced",
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "Flag.extension:detailOfFlag.value[x].reference",
        "path": "Flag.extension.value[x].reference",
        "definition": "Literal reference to various resources. Relative URL is being used.",
        "min": 1
      },
      {
        "id": "Flag.extension:detailOfFlag.value[x].type",
        "path": "Flag.extension.value[x].type",
        "max": "0"
      },
      {
        "id": "Flag.extension:detailOfFlag.value[x].identifier",
        "path": "Flag.extension.value[x].identifier",
        "max": "0"
      },
      {
        "id": "Flag.extension:detailOfFlag.value[x].display",
        "path": "Flag.extension.value[x].display",
        "max": "0"
      },
      {
        "id": "Flag.identifier",
        "path": "Flag.identifier",
        "definition": "Identifier of the flag associated with patient.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Flag.identifier.use",
        "path": "Flag.identifier.use",
        "max": "0"
      },
      {
        "id": "Flag.identifier.type",
        "path": "Flag.identifier.type",
        "max": "0"
      },
      {
        "id": "Flag.identifier.system",
        "path": "Flag.identifier.system",
        "definition": "Establishes the namespace for the identifier of the flag.",
        "min": 1,
        "fixedUri": "http://amphisystems.com/amphi/journaldatasystemid"
      },
      {
        "id": "Flag.identifier.value",
        "path": "Flag.identifier.value",
        "definition": "A unique identifier of the flag.",
        "min": 1
      },
      {
        "id": "Flag.identifier.period",
        "path": "Flag.identifier.period",
        "max": "0"
      },
      {
        "id": "Flag.identifier.assigner",
        "path": "Flag.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Flag.status",
        "path": "Flag.status",
        "definition": "Supports basic workflow. Displays the status of the flag."
      },
      {
        "id": "Flag.category",
        "path": "Flag.category",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Flag.category.coding",
        "path": "Flag.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Flag.category.coding.system",
        "path": "Flag.category.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/flag-category"
      },
      {
        "id": "Flag.category.coding.version",
        "path": "Flag.category.coding.version",
        "fixedString": "4.0.1"
      },
      {
        "id": "Flag.category.coding.code",
        "path": "Flag.category.coding.code",
        "min": 1
      },
      {
        "id": "Flag.category.coding.userSelected",
        "path": "Flag.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Flag.category.text",
        "path": "Flag.category.text",
        "max": "0"
      },
      {
        "id": "Flag.code.coding",
        "path": "Flag.code.coding",
        "definition": "A code for the flags defined by a terminology system.",
        "max": "1"
      },
      {
        "id": "Flag.code.coding.system",
        "path": "Flag.code.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Flag.code.coding.version",
        "path": "Flag.code.coding.version",
        "max": "0"
      },
      {
        "id": "Flag.code.coding.code",
        "path": "Flag.code.coding.code",
        "definition": "A symbol in syntax defined by the system.",
        "min": 1
      },
      {
        "id": "Flag.code.coding.display",
        "path": "Flag.code.coding.display",
        "definition": "Representation defined by the system."
      },
      {
        "id": "Flag.code.coding.userSelected",
        "path": "Flag.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Flag.code.text",
        "path": "Flag.code.text",
        "definition": "Text representation of the flag."
      },
      {
        "id": "Flag.subject",
        "path": "Flag.subject",
        "definition": "The patient or the EMS Unit of which the flag is associated with. If the flag is sent to the dispatched unit, the subject must be the profile EMS Unit. If the flag is patient related the subject is patient.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/Patient/v1",
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/EMSUnit/v1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Flag.subject.reference",
        "path": "Flag.subject.reference",
        "definition": "Literal reference to the patient resource. Relative URL is being used.",
        "min": 1
      },
      {
        "id": "Flag.subject.type",
        "path": "Flag.subject.type",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier",
        "path": "Flag.subject.identifier",
        "definition": "Identifier of the patient. This will be the social security number.",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier.use",
        "path": "Flag.subject.identifier.use",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier.type",
        "path": "Flag.subject.identifier.type",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier.system",
        "path": "Flag.subject.identifier.system",
        "definition": "Establishes the namespace for the value.",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier.value",
        "path": "Flag.subject.identifier.value",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier.period",
        "path": "Flag.subject.identifier.period",
        "max": "0"
      },
      {
        "id": "Flag.subject.identifier.assigner",
        "path": "Flag.subject.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Flag.subject.display",
        "path": "Flag.subject.display",
        "max": "0"
      },
      {
        "id": "Flag.period.start",
        "path": "Flag.period.start",
        "definition": "The start of the period.",
        "min": 1
      },
      {
        "id": "Flag.encounter",
        "path": "Flag.encounter",
        "definition": "This element contains the reference to the encounter which is associated with the flag if associated.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/Encounter/v1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Flag.encounter.reference",
        "path": "Flag.encounter.reference",
        "definition": "Literal reference to the encounter resource. Relative URL is being used.",
        "min": 1
      },
      {
        "id": "Flag.encounter.type",
        "path": "Flag.encounter.type",
        "max": "0"
      },
      {
        "id": "Flag.encounter.identifier",
        "path": "Flag.encounter.identifier",
        "max": "0"
      },
      {
        "id": "Flag.encounter.display",
        "path": "Flag.encounter.display",
        "max": "0"
      },
      {
        "id": "Flag.author",
        "path": "Flag.author",
        "definition": "The clinician that created the flag.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/Practitioner/v1",
              "http://amphi.eu/fhir/prehospitalsolution/StructureDefinition/OrganizationGeneralPractitioner/v1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Flag.author.reference",
        "path": "Flag.author.reference",
        "definition": "Literal reference to the practitioner resource. Relative URL is being used.",
        "min": 1
      },
      {
        "id": "Flag.author.type",
        "path": "Flag.author.type",
        "max": "0"
      },
      {
        "id": "Flag.author.identifier",
        "path": "Flag.author.identifier",
        "max": "0"
      },
      {
        "id": "Flag.author.display",
        "path": "Flag.author.display",
        "max": "0"
      }
    ]
  }
}