### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/Encounter.json
### ----------------------------------------------------
### -- Chunk 10 of 13
#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "Encounter.statusHistory.status",
      "path" : "Encounter.statusHistory.status",
      "short" : "planned | arrived | triaged | in-progress | onleave | finished | cancelled +",
      "definition" : "planned | arrived | triaged | in-progress | onleave | finished | cancelled +.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.statusHistory.status",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "EncounterStatus"
        }],
        "strength" : "required",
        "description" : "Current state of the encounter.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-status|4.0.0"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.statusHistory.period",
      "path" : "Encounter.statusHistory.period",
      "short" : "The time that the episode was in the specified status",
      "definition" : "The time that the episode was in the specified status.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.statusHistory.period",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.class",
      "path" : "Encounter.class",
      "short" : "Classification of patient encounter",
      "definition" : "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.class",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Coding"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "EncounterClass"
        }],
        "strength" : "extensible",
        "description" : "Classification of the encounter.",
        "valueSet" : "http://terminology.hl7.org/ValueSet/v3-ActEncounterCode"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.class"
      },
      {
        "identity" : "v2",
        "map" : "PV1-2"
      },
      {
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=SUBJ].source[classCode=LIST].code"
      }]
    },
    {
      "id" : "Encounter.classHistory",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
        "valueString" : "ClassHistory"
      }],
      "path" : "Encounter.classHistory",
      "short" : "List of past encounter classes",
      "definition" : "The class history permits the tracking of the encounters transitions without needing to go  through the resource history.  This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.classHistory",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.classHistory.id",
      "path" : "Encounter.classHistory.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.classHistory.extension",
      "path" : "Encounter.classHistory.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 element. 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" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.classHistory.modifierExtension",
      "path" : "Encounter.classHistory.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained 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 can 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",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "Encounter.classHistory.class",
      "path" : "Encounter.classHistory.class",
      "short" : "inpatient | outpatient | ambulatory | emergency +",
      "definition" : "inpatient | outpatient | ambulatory | emergency +.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.classHistory.class",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Coding"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "EncounterClass"
        }],
        "strength" : "extensible",
        "description" : "Classification of the encounter.",
        "valueSet" : "http://terminology.hl7.org/ValueSet/v3-ActEncounterCode"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.classHistory.period",
      "path" : "Encounter.classHistory.period",
      "short" : "The time that the episode was in the specified class",
      "definition" : "The time that the episode was in the specified class.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.classHistory.period",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.type",
      "path" : "Encounter.type",
      "short" : "Specific type of encounter",
      "definition" : "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).",
      "comment" : "Since there are many ways to further classify encounters, this element is 0..*.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.type",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "EncounterType"
        }],
        "strength" : "example",
        "description" : "The type of encounter.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-type"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.code"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.class"
      },
      {
        "identity" : "v2",
        "map" : "PV1-4 / PV1-18"
      },
      {
        "identity" : "rim",
        "map" : ".code"
      }]
    },
    {
      "id" : "Encounter.serviceType",
      "path" : "Encounter.serviceType",
      "short" : "Specific type of service",
      "definition" : "Broad categorization of the service that is to be provided (e.g. cardiology).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.serviceType",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "EncounterServiceType"
        }],
        "strength" : "example",
        "description" : "Broad categorization of the service that is to be provided.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/service-type"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.code"
      },
      {
        "identity" : "v2",
        "map" : "PV1-10"
      },
      {
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.priority",
      "path" : "Encounter.priority",
      "short" : "Indicates the urgency of the encounter",
      "definition" : "Indicates the urgency of the encounter.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.priority",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Priority"
        }],
        "strength" : "example",
        "description" : "Indicates the urgency of the encounter.",
        "valueSet" : "http://terminology.hl7.org/ValueSet/v3-ActPriority"
      },
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.grade"
      },
      {
        "identity" : "v2",
        "map" : "PV2-25"
      },
      {
        "identity" : "rim",
        "map" : ".priorityCode"
      }]
    },
    {
      "id" : "Encounter.subject",
      "path" : "Encounter.subject",
      "short" : "The patient or group present at the encounter",
      "definition" : "The patient or group present at the encounter.",
      "comment" : "While the encounter is always about the patient, the patient might not actually be known in all contexts of use, and there may be a group of patients that could be anonymous (such as in a group therapy for Alcoholics Anonymous - where the recording of the encounter could be used for billing on the number of people/staff and not important to the context of the specific patients) or alternately in veterinary care a herd of sheep receiving treatment (where the animals are not individually tracked).",
      "alias" : ["patient"],
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.subject",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Group"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.subject"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject[x]"
      },
      {
        "identity" : "v2",
        "map" : "PID-3"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=SBJ]/role[classCode=PAT]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject"
      }]
    },
    {
      "id" : "Encounter.episodeOfCare",
      "path" : "Encounter.episodeOfCare",
      "short" : "Episode(s) of care that this encounter should be recorded against",
      "definition" : "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem.  The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.episodeOfCare",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.context"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.context"
      },
      {
        "identity" : "v2",
        "map" : "PV1-54, PV1-53"
      },
      {
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.basedOn",
      "path" : "Encounter.basedOn",
      "short" : "The ServiceRequest that initiated this encounter",
      "definition" : "The request this encounter satisfies (e.g. incoming referral or procedure request).",
      "alias" : ["incomingReferral"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.basedOn",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/ServiceRequest"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.basedOn"
      },
      {
        "identity" : "rim",
        "map" : ".reason.ClinicalDocument"
      }]
    },
    {
      "id" : "Encounter.participant",
      "path" : "Encounter.participant",
      "short" : "List of participants involved in the encounter",
      "definition" : "The list of people responsible for providing the service.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.participant",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer"
      },
      {
        "identity" : "v2",
        "map" : "ROL"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=PFM]"
      }]
    },
    {
      "id" : "Encounter.participant.id",
      "path" : "Encounter.participant.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.participant.extension",
      "path" : "Encounter.participant.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 element. 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" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.participant.modifierExtension",
      "path" : "Encounter.participant.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained 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 can 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",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "Encounter.participant.type",
      "path" : "Encounter.participant.type",
      "short" : "Role of participant in encounter",
      "definition" : "Role of participant in encounter.",
      "comment" : "The participant type indicates how an individual participates in an encounter. It includes non-practitioner participants, and for practitioners this is to describe the action type in the context of this encounter (e.g. Admitting Dr, Attending Dr, Translator, Consulting Dr). This is different to the practitioner roles which are functional roles, derived from terms of employment, education, licensing, etc.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.participant.type",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ParticipantType"
        }],
        "strength" : "extensible",
        "description" : "Role of participant in encounter.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-participant-type"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer.function"
      },
      {
        "identity" : "v2",
        "map" : "ROL-3 (or maybe PRT-4)"
      },
      {
        "identity" : "rim",
        "map" : ".functionCode"
      }]
    },
    {
      "id" : "Encounter.participant.period",
      "path" : "Encounter.participant.period",
      "short" : "Period of time during the encounter that the participant participated",
      "definition" : "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.participant.period",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "v2",
        "map" : "ROL-5, ROL-6 (or maybe PRT-5)"
      },
      {
        "identity" : "rim",
        "map" : ".time"
      }]
    },
    {
      "id" : "Encounter.participant.individual",
      "path" : "Encounter.participant.individual",
      "short" : "Persons involved in the encounter other than the patient",
      "definition" : "Persons involved in the encounter other than the patient.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.participant.individual",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer.actor"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.who"
      },
      {
        "identity" : "v2",
        "map" : "ROL-4"
      },
      {
        "identity" : "rim",
        "map" : ".role"
      }]
    },
    {
      "id" : "Encounter.appointment",
      "path" : "Encounter.appointment",
      "short" : "The appointment that scheduled this encounter",
      "definition" : "The appointment that scheduled this encounter.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.appointment",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Appointment"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.basedOn"
      },
      {
        "identity" : "v2",
        "map" : "SCH-1 / SCH-2"
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=FLFS].target[classCode=ENC, moodCode=APT]"
      }]
    },
    {
      "id" : "Encounter.period",
      "path" : "Encounter.period",
      "short" : "The start and end time of the encounter",
      "definition" : "The start and end time of the encounter.",
      "comment" : "If not (yet) known, the end of the Period may be omitted.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.period",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.done[x]"
      },
      {
        "identity" : "v2",
        "map" : "PV1-44, PV1-45"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime (low & high)"
      }]
    },
    {
      "id" : "Encounter.length",
      "path" : "Encounter.length",
      "short" : "Quantity of time the encounter lasted (less time absent)",
      "definition" : "Quantity of time the encounter lasted. This excludes the time during leaves of absence.",
      "comment" : "May differ from the time the Encounter.period lasted because of leave of absence.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.length",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Duration"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.occurrence[x]"
      },
      {
        "identity" : "v2",
        "map" : "(PV1-45 less PV1-44) iff ( (PV1-44 not empty) and (PV1-45 not empty) ); units in minutes"
      },
      {
        "identity" : "rim",
        "map" : ".lengthOfStayQuantity"
      }]
    },
    {
      "id" : "Encounter.reasonCode",
      "path" : "Encounter.reasonCode",
      "short" : "Coded reason the encounter takes place",
      "definition" : "Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.",
      "comment" : "For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis).",
      "alias" : ["Indication",
      "Admission diagnosis"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.reasonCode",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "EncounterReason"
        }],
        "strength" : "preferred",
        "description" : "Reason why the encounter takes place.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-reason"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.reasonCode"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "v2",
        "map" : "EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )"
      },
      {
        "identity" : "rim",
        "map" : ".reasonCode"
      }]
    },
    {
      "id" : "Encounter.reasonReference",
      "path" : "Encounter.reasonReference",
      "short" : "