### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/Encounter.json
### ----------------------------------------------------
### -- Chunk 11 of 13
Reason the encounter takes place (reference)",
      "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.reasonReference",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition",
        "http://hl7.org/fhir/StructureDefinition/Procedure",
        "http://hl7.org/fhir/StructureDefinition/Observation",
        "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "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.diagnosis",
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
        "valueString" : "Diagnosis"
      }],
      "path" : "Encounter.diagnosis",
      "short" : "The list of diagnosis relevant to this encounter",
      "definition" : "The list of diagnosis relevant to this encounter.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.diagnosis",
        "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" : "rim",
        "map" : ".outboundRelationship[typeCode=RSON]"
      }]
    },
    {
      "id" : "Encounter.diagnosis.id",
      "path" : "Encounter.diagnosis.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.diagnosis.extension",
      "path" : "Encounter.diagnosis.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.diagnosis.modifierExtension",
      "path" : "Encounter.diagnosis.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.diagnosis.condition",
      "path" : "Encounter.diagnosis.condition",
      "short" : "The diagnosis or procedure relevant to the encounter",
      "definition" : "Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.",
      "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" : ["Admission diagnosis",
      "discharge diagnosis",
      "indication"],
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.diagnosis.condition",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition",
        "http://hl7.org/fhir/StructureDefinition/Procedure"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.reasonReference"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "v2",
        "map" : "Resources that would commonly referenced at Encounter.indication would be Condition and/or Procedure. These most closely align with DG1/PRB and PR1 respectively."
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=RSON].target"
      }]
    },
    {
      "id" : "Encounter.diagnosis.use",
      "path" : "Encounter.diagnosis.use",
      "short" : "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)",
      "definition" : "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.diagnosis.use",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DiagnosisRole"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "preferred",
        "description" : "The type of diagnosis this condition represents.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/diagnosis-role"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.diagnosis.rank",
      "path" : "Encounter.diagnosis.rank",
      "short" : "Ranking of the diagnosis (for each role type)",
      "definition" : "Ranking of the diagnosis (for each role type).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.diagnosis.rank",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "positiveInt"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=RSON].priority"
      }]
    },
    {
      "id" : "Encounter.account",
      "path" : "Encounter.account",
      "short" : "The set of accounts that may be used for billing for this Encounter",
      "definition" : "The set of accounts that may be used for billing for this Encounter.",
      "comment" : "The billing system may choose to allocate billable items associated with the Encounter to different referenced Accounts based on internal business rules.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.account",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Account"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".pertains.A_Account"
      }]
    },
    {
      "id" : "Encounter.hospitalization",
      "path" : "Encounter.hospitalization",
      "short" : "Details about the admission to a healthcare service",
      "definition" : "Details about the admission to a healthcare service.",
      "comment" : "An Encounter may cover more than just the inpatient stay. Contexts such as outpatients, community clinics, and aged care facilities are also included.\r\rThe duration recorded in the period of this encounter covers the entire scope of this hospitalization record.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization",
        "min" : 0,
        "max" : "1"
      },
      "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" : ".outboundRelationship[typeCode=COMP].target[classCode=ENC, moodCode=EVN]"
      }]
    },
    {
      "id" : "Encounter.hospitalization.id",
      "path" : "Encounter.hospitalization.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.hospitalization.extension",
      "path" : "Encounter.hospitalization.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.hospitalization.modifierExtension",
      "path" : "Encounter.hospitalization.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.hospitalization.preAdmissionIdentifier",
      "path" : "Encounter.hospitalization.preAdmissionIdentifier",
      "short" : "Pre-admission identifier",
      "definition" : "Pre-admission identifier.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization.preAdmissionIdentifier",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Identifier"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-5"
      },
      {
        "identity" : "rim",
        "map" : ".id"
      }]
    },
    {
      "id" : "Encounter.hospitalization.origin",
      "path" : "Encounter.hospitalization.origin",
      "short" : "The location/organization from which the patient came before admission",
      "definition" : "The location/organization from which the patient came before admission.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization.origin",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Location",
        "http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : ".participation[typeCode=ORG].role"
      }]
    },
    {
      "id" : "Encounter.hospitalization.admitSource",
      "path" : "Encounter.hospitalization.admitSource",
      "short" : "From where patient was admitted (physician referral, transfer)",
      "definition" : "From where patient was admitted (physician referral, transfer).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization.admitSource",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "AdmitSource"
        }],
        "strength" : "preferred",
        "description" : "From where the patient was admitted.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-admit-source"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-14"
      },
      {
        "identity" : "rim",
        "map" : ".admissionReferralSourceCode"
      }]
    },
    {
      "id" : "Encounter.hospitalization.reAdmission",
      "path" : "Encounter.hospitalization.reAdmission",
      "short" : "The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission",
      "definition" : "Whether this hospitalization is a readmission and why if known.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization.reAdmission",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ReAdmissionType"
        }],
        "strength" : "example",
        "description" : "The reason for re-admission of this hospitalization encounter.",
        "valueSet" : "http://terminology.hl7.org/ValueSet/v2-0092"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-13"
      },
      {
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "Encounter.hospitalization.dietPreference",
      "path" : "Encounter.hospitalization.dietPreference",
      "short" : "Diet preferences reported by the patient",
      "definition" : "Diet preferences reported by the patient.",
      "comment" : "For example, a patient may request both a dairy-free and nut-free diet preference (not mutually exclusive).",
      "requirements" : "Used to track patient's diet restrictions and/or preference. For a complete description of the nutrition needs of a patient during their stay, one should use the nutritionOrder resource which links to Encounter.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.hospitalization.dietPreference",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "PatientDiet"
        }],
        "strength" : "example",
        "description" : "Medical, cultural or ethical food preferences to help with catering requirements.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-diet"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-38"
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=EVN, code=\"diet\"]"
      }]
    },
    {
      "id" : "Encounter.hospitalization.specialCourtesy",
      "path" : "Encounter.hospitalization.specialCourtesy",
      "short" : "Special courtesies (VIP, board member)",
      "definition" : "Special courtesies (VIP, board member).",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.hospitalization.specialCourtesy",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Courtesies"
        }],
        "strength" : "preferred",
        "description" : "Special courtesies.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-special-courtesy"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-16"
      },
      {
        "identity" : "rim",
        "map" : ".specialCourtesiesCode"
      }]
    },
    {
      "id" : "Encounter.hospitalization.specialArrangement",
      "path" : "Encounter.hospitalization.specialArrangement",
      "short" : "Wheelchair, translator, stretcher, etc.",
      "definition" : "Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.hospitalization.specialArrangement",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Arrangements"
        }],
        "strength" : "preferred",
        "description" : "Special arrangements.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-special-arrangements"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-15 / OBR-30 / OBR-43"
      },
      {
        "identity" : "rim",
        "map" : ".specialArrangementCode"
      }]
    },
    {
      "id" : "Encounter.hospitalization.destination",
      "path" : "Encounter.hospitalization.destination",
      "short" : "Location/organization to which the patient is discharged",
      "definition" : "Location/organization to which the patient is discharged.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization.destination",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Location",
        "http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-37"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=DST]"
      }]
    },
    {
      "id" : "Encounter.hospitalization.dischargeDisposition",
      "path" : "Encounter.hospitalization.dischargeDisposition",
      "short" : "Category or kind of location after discharge",
      "definition" : "Category or kind of location after discharge.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Encounter.hospitalization.dischargeDisposition",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DischargeDisp"
        }],
        "strength" : "example",
        "description" : "Discharge Disposition.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/encounter-discharge-disposition"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "PV1-36"
      },
      {
        "identity" : "rim",
        "map" : ".dischargeDispositionCode"
      }]
    },
    {
      "id" : "Encounter.location",
      "path" : "Encounter.location",
      "short" : "List of locations where the patient has been",
      "definition" : "List of locations where  the patient has been during this encounter.",
      "comment" : "Virtual encounters can be recorded in the Encounter by specifying a location reference to a location of type \"kind\" such as \"client's home\" and an encounter.class = \"virtual\".",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Encounter.location",
        "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" : ".participation[typeCode=LOC]"
      }]
    },
    {
      "id" : "Encounter.location.id",
      "path" : "Encounter.location.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.location.extension",
      "path" : "Encounter.location.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.location.modifierExtension",
      "path" : "Encounter.location.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.location.location",
      "path" : "Encounter.location.location",
      "short" : "Location the encounter takes place",
      "definition" : "The location where the encounter takes place.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Encounter.location.location",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Location"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.location"
      },
     