### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/Flag.json
### ----------------------------------------------------
### -- Chunk 3 of 3
rim",
        "map" : "Act.text?"
      }]
    },
    {
      "id" : "Flag.contained",
      "path" : "Flag.contained",
      "short" : "Contained, inline Resources",
      "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.",
      "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.",
      "alias" : ["inline resources",
      "anonymous resources",
      "contained resources"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.contained",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Resource"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "Flag.extension",
      "path" : "Flag.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "Flag.modifierExtension",
      "path" : "Flag.modifierExtension",
      "short" : "Extensions that cannot be ignored",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "Flag.identifier",
      "path" : "Flag.identifier",
      "short" : "Business identifier",
      "definition" : "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" : "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" : "Allows identification of the flag as it is known by various participating systems and in a way that remains consistent across servers.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Flag.identifier",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Identifier"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      },
      {
        "identity" : "rim",
        "map" : ".id"
      }]
    },
    {
      "id" : "Flag.status",
      "path" : "Flag.status",
      "short" : "active | inactive | entered-in-error",
      "definition" : "Supports basic workflow.",
      "comment" : "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Flag.status",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : true,
      "isModifierReason" : "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" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "FlagStatus"
        }],
        "strength" : "required",
        "description" : "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" : "http://hl7.org/fhir/ValueSet/flag-status|4.0.0"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.status"
      },
      {
        "identity" : "rim",
        "map" : ".status"
      }]
    },
    {
      "id" : "Flag.category",
      "path" : "Flag.category",
      "short" : "Clinical, administrative, etc.",
      "definition" : "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" : "The value set will often need to be adjusted based on local business rules and usage context.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Flag.category",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "FlagCategory"
        }],
        "strength" : "example",
        "description" : "A general category for flags for filtering/display purposes.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/flag-category"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.class"
      },
      {
        "identity" : "rim",
        "map" : ".code"
      }]
    },
    {
      "id" : "Flag.code",
      "path" : "Flag.code",
      "short" : "Coded or textual message to display to user",
      "definition" : "The coded value or textual component of the flag to display to the user.",
      "comment" : "If non-coded, use CodeableConcept.text.  This element should always be included in the narrative.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Flag.code",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "FlagCode"
        }],
        "strength" : "example",
        "description" : "Detail codes identifying specific flagged issues.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/flag-code"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.what[x]"
      },
      {
        "identity" : "rim",
        "map" : ".value"
      }]
    },
    {
      "id" : "Flag.subject",
      "path" : "Flag.subject",
      "short" : "Who/What is flag about?",
      "definition" : "The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Flag.subject",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Location",
        "http://hl7.org/fhir/StructureDefinition/Group",
        "http://hl7.org/fhir/StructureDefinition/Organization",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PlanDefinition",
        "http://hl7.org/fhir/StructureDefinition/Medication",
        "http://hl7.org/fhir/StructureDefinition/Procedure"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.subject[x]"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=SBJ].role[classCode=PAT | LOCE | ASSIGNED]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject"
      }]
    },
    {
      "id" : "Flag.period",
      "path" : "Flag.period",
      "short" : "Time period when flag is active",
      "definition" : "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" : 0,
      "max" : "1",
      "base" : {
        "path" : "Flag.period",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      }]
    },
    {
      "id" : "Flag.encounter",
      "path" : "Flag.encounter",
      "short" : "Alert relevant during encounter",
      "definition" : "This alert is only relevant during the encounter.",
      "comment" : "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" : 0,
      "max" : "1",
      "base" : {
        "path" : "Flag.encounter",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      }]
    },
    {
      "id" : "Flag.author",
      "path" : "Flag.author",
      "short" : "Flag creator",
      "definition" : "The person, organization or device that created the flag.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Flag.author",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Device",
        "http://hl7.org/fhir/StructureDefinition/Organization",
        "http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.author"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=AUT].role"
      }]
    }]
  },
  "differential" : {
    "element" : [{
      "id" : "Flag",
      "path" : "Flag",
      "short" : "Key information to flag to healthcare providers",
      "definition" : "Prospective warnings of potential issues when providing care to the patient.",
      "alias" : ["Barriers to Care",
      "Alert",
      "Warning"],
      "min" : 0,
      "max" : "*",
      "mapping" : [{
        "identity" : "rim",
        "map" : "Observation[classCode=ISSUE, moodCode=EVN]"
      }]
    },
    {
      "id" : "Flag.identifier",
      "path" : "Flag.identifier",
      "short" : "Business identifier",
      "definition" : "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" : "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" : "Allows identification of the flag as it is known by various participating systems and in a way that remains consistent across servers.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Identifier"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      },
      {
        "identity" : "rim",
        "map" : ".id"
      }]
    },
    {
      "id" : "Flag.status",
      "path" : "Flag.status",
      "short" : "active | inactive | entered-in-error",
      "definition" : "Supports basic workflow.",
      "comment" : "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : true,
      "isModifierReason" : "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" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "FlagStatus"
        }],
        "strength" : "required",
        "description" : "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" : "http://hl7.org/fhir/ValueSet/flag-status|4.0.0"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.status"
      },
      {
        "identity" : "rim",
        "map" : ".status"
      }]
    },
    {
      "id" : "Flag.category",
      "path" : "Flag.category",
      "short" : "Clinical, administrative, etc.",
      "definition" : "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" : "The value set will often need to be adjusted based on local business rules and usage context.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "FlagCategory"
        }],
        "strength" : "example",
        "description" : "A general category for flags for filtering/display purposes.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/flag-category"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.class"
      },
      {
        "identity" : "rim",
        "map" : ".code"
      }]
    },
    {
      "id" : "Flag.code",
      "path" : "Flag.code",
      "short" : "Coded or textual message to display to user",
      "definition" : "The coded value or textual component of the flag to display to the user.",
      "comment" : "If non-coded, use CodeableConcept.text.  This element should always be included in the narrative.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "FlagCode"
        }],
        "strength" : "example",
        "description" : "Detail codes identifying specific flagged issues.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/flag-code"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.what[x]"
      },
      {
        "identity" : "rim",
        "map" : ".value"
      }]
    },
    {
      "id" : "Flag.subject",
      "path" : "Flag.subject",
      "short" : "Who/What is flag about?",
      "definition" : "The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Location",
        "http://hl7.org/fhir/StructureDefinition/Group",
        "http://hl7.org/fhir/StructureDefinition/Organization",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PlanDefinition",
        "http://hl7.org/fhir/StructureDefinition/Medication",
        "http://hl7.org/fhir/StructureDefinition/Procedure"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.subject[x]"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=SBJ].role[classCode=PAT | LOCE | ASSIGNED]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject"
      }]
    },
    {
      "id" : "Flag.period",
      "path" : "Flag.period",
      "short" : "Time period when flag is active",
      "definition" : "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" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Period"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      }]
    },
    {
      "id" : "Flag.encounter",
      "path" : "Flag.encounter",
      "short" : "Alert relevant during encounter",
      "definition" : "This alert is only relevant during the encounter.",
      "comment" : "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" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      }]
    },
    {
      "id" : "Flag.author",
      "path" : "Flag.author",
      "short" : "Flag creator",
      "definition" : "The person, organization or device that created the flag.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Device",
        "http://hl7.org/fhir/StructureDefinition/Organization",
        "http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.author"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=AUT].role"
      }]
    }]
  }
}


