<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://example.org/fhir/StructureDefinition/MyFlag" />
  <name value="Flag" />
  <status value="draft" />
  <date value="2023-01-12T04:44:15.9579632+00:00" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Flag" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Flag" />
  <derivation value="constraint" />
  <differential>
    <element id="Flag.identifier">
      <path value="Flag.identifier" />
      <definition value="NOT USED. Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server." />
    </element>
    <element id="Flag.status">
      <path value="Flag.status" />
      <definition value="Supports basic workflow.&#xD;&#xA;The value from the Flag.status will be ignored while processing and inserting/updating the alert details into i.PM.&#xD;&#xA;The value from the Flag.period element will be processed and inserted/updated as the alert start and end date in i.PM." />
      <fixedCode value="active" />
    </element>
    <element id="Flag.category">
      <path value="Flag.category" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Flag.category.coding.code">
      <path value="Flag.category.coding.code" />
      <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). ***Alert category received in the Flag.category element must be matched to an existing reference value identifier in reference value domain CCSXT in i.PM where RITYP_CODE = FHIR or PIMS.***" />
      <min value="1" />
    </element>
    <element id="Flag.code.coding.code">
      <path value="Flag.code.coding.code" />
      <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). ***Alert code received in the Flag.code.coding.code element must be matched to an existing alert code in i.PM in ODPCD_CODES.CODE and belonging to the alert category provided in Flag.category***" />
      <min value="1" />
    </element>
    <element id="Flag.subject.reference">
      <path value="Flag.subject.reference" />
      <short value="/Patient/?identifier=[PASID]" />
      <min value="1" />
    </element>
    <element id="Flag.subject.identifier.value">
      <path value="Flag.subject.identifier.value" />
      <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system. ***PASID from the patients t" />
    </element>
    <element id="Flag.period.start">
      <path value="Flag.period.start" />
      <short value="DIAGNOSIS_PROCEDURES.START_DTTM" />
      <definition value="The start of the period. The boundary is inclusive. ***The patient alert’s start date.***" />
      <min value="1" />
    </element>
    <element id="Flag.period.end">
      <path value="Flag.period.end" />
      <label value="alert end date" />
      <definition value="The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time..***The patient alert’s end date ***" />
    </element>
    <element id="Flag.encounter">
      <path value="Flag.encounter" />
      <definition value="This alert is only relevant during the encounter. ***Not used**" />
    </element>
  </differential>
</StructureDefinition>