<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Flag" />
  <meta>
    <lastUpdated value="2021-01-02T08:58:31.578+11:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Base.Management" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="1" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="patient" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="pc" />
  </extension>
  <extension url="http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status">
    <valueCode value=".status = entered-in-error" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/Flag" />
  <version value="4.6.0" />
  <name value="Flag" />
  <status value="draft" />
  <date value="2021-01-02T08:58:31+11:00" />
  <publisher value="Health Level Seven International (Patient Care)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/patientcare/index.cfm" />
    </telecom>
  </contact>
  <description value="Prospective warnings of potential issues when providing care to the patient." />
  <fhirVersion value="4.6.0" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Flag" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="Flag">
      <path value="Flag" />
      <short value="Key information to flag to healthcare providers" />
      <definition value="Prospective warnings of potential issues when providing care to the patient." />
      <alias value="Barriers to Care" />
      <alias value="Alert" />
      <alias value="Warning" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="rim" />
        <map value="Observation[classCode=ISSUE, moodCode=EVN]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="workflow.encounter" />
      </mapping>
    </element>
    <element id="Flag.identifier">
      <path value="Flag.identifier" />
      <short value="Business identifier" />
      <definition value="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." />
      <comment value="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number." />
      <requirements value="Allows identification of the flag as it is known by various participating systems and in a way that remains consistent across servers." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.identifier" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
    </element>
    <element id="Flag.status">
      <path value="Flag.status" />
      <short value="active | inactive | entered-in-error" />
      <definition value="Supports basic workflow." />
      <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FlagStatus" />
        </extension>
        <strength value="required" />
        <description value="Indicates whether this flag is active and needs to be displayed to a user, or whether it is no longer needed or was entered in error." />
        <valueSet value="http://hl7.org/fhir/ValueSet/flag-status" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".status" />
      </mapping>
    </element>
    <element id="Flag.category">
      <path value="Flag.category" />
      <short value="Clinical, administrative, etc." />
      <definition value="Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context." />
      <comment value="The value set will often need to be adjusted based on local business rules and usage context." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FlagCategory" />
        </extension>
        <strength value="example" />
        <description value="A general category for flags for filtering/display purposes." />
        <valueSet value="http://hl7.org/fhir/ValueSet/flag-category" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".code" />
      </mapping>
    </element>
    <element id="Flag.code">
      <path value="Flag.code" />
      <short value="Coded or textual message to display to user" />
      <definition value="The coded value or textual component of the flag to display to the user." />
      <comment value="If non-coded, use CodeableConcept.text.  This element should always be included in the narrative." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FlagCode" />
        </extension>
        <strength value="example" />
        <description value="Detail codes identifying specific flagged issues." />
        <valueSet value="http://hl7.org/fhir/ValueSet/flag-code" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.what[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".value" />
      </mapping>
    </element>
    <element id="Flag.subject">
      <extension url="http://hl7.org/fhir/build/StructureDefinition/committee-notes">
        <valueString value="GF#20380." />
      </extension>
      <path value="Flag.subject" />
      <short value="Who/What is flag about?" />
      <definition value="The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PlanDefinition" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=SBJ].role[classCode=PAT | LOCE | ASSIGNED]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject" />
      </mapping>
    </element>
    <element id="Flag.period">
      <path value="Flag.period" />
      <short value="Time period when flag is active" />
      <definition value="The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.context" />
      </mapping>
    </element>
    <element id="Flag.encounter">
      <path value="Flag.encounter" />
      <short value="Alert relevant during encounter" />
      <definition value="This alert is only relevant during the encounter." />
      <comment value="If both Flag.encounter and Flag.period are valued, then Flag.period.start shall not be before Encounter.period.start and Flag.period.end shall not be after Encounter.period.end." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.context" />
      </mapping>
    </element>
    <element id="Flag.author">
      <path value="Flag.author" />
      <short value="Flag creator" />
      <definition value="The person, organization or device that created the flag." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.author" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=AUT].role" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>