### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/MedicationAdministration.json
### ----------------------------------------------------
### -- Chunk 9 of 9
" : ["http://hl7.org/fhir/StructureDefinition/Encounter",
        "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"]
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.context"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.context"
      },
      {
        "identity" : "v2",
        "map" : "PV1-19-Visit Number"
      },
      {
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=\"type of encounter or episode\"]"
      }]
    },
    {
      "id" : "MedicationAdministration.supportingInformation",
      "path" : "MedicationAdministration.supportingInformation",
      "short" : "Additional information to support administration",
      "definition" : "Additional information (for example, patient height and weight) that supports the administration of the medication.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Resource"]
      }],
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.context"
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]"
      }]
    },
    {
      "id" : "MedicationAdministration.effective[x]",
      "path" : "MedicationAdministration.effective[x]",
      "short" : "Start and end time of administration",
      "definition" : "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      },
      {
        "code" : "Period"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.done[x]"
      },
      {
        "identity" : "v2",
        "map" : "RXA-3-Date/Time Start of Administration / RXA-4-Date/Time End of Administration"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime"
      }]
    },
    {
      "id" : "MedicationAdministration.performer",
      "path" : "MedicationAdministration.performer",
      "short" : "Who performed the medication administration and what they did",
      "definition" : "Indicates who or what performed the medication administration and how they were involved.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.actor"
      },
      {
        "identity" : "v2",
        "map" : "RXA-10-Administering Provider / PRT-5-Participation Person: PRT-4-Participation='AP' (RXA-10 is deprecated)"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=PRF]"
      }]
    },
    {
      "id" : "MedicationAdministration.performer.function",
      "path" : "MedicationAdministration.performer.function",
      "short" : "Type of performance",
      "definition" : "Distinguishes the type of involvement of the performer in the medication administration.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MedicationAdministrationPerformerFunction"
        }],
        "strength" : "example",
        "description" : "A code describing the role an individual played in administering the medication.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/med-admin-perform-function"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer.function"
      },
      {
        "identity" : "rim",
        "map" : "participation[typeCode=PRF].functionCode"
      }]
    },
    {
      "id" : "MedicationAdministration.performer.actor",
      "path" : "MedicationAdministration.performer.actor",
      "short" : "Who performed the medication administration",
      "definition" : "Indicates who or what performed the medication administration.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Device"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer.actor"
      },
      {
        "identity" : "rim",
        "map" : ".role"
      }]
    },
    {
      "id" : "MedicationAdministration.reasonCode",
      "path" : "MedicationAdministration.reasonCode",
      "short" : "Reason administration performed",
      "definition" : "A code indicating why the medication was given.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MedicationAdministrationReason"
        }],
        "strength" : "example",
        "description" : "A set of codes indicating the reason why the MedicationAdministration was made.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/reason-medication-given-codes"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.reasonCode"
      },
      {
        "identity" : "v2",
        "map" : "RXE-27 Give Indication"
      },
      {
        "identity" : "rim",
        "map" : ".reasonCode"
      }]
    },
    {
      "id" : "MedicationAdministration.reasonReference",
      "path" : "MedicationAdministration.reasonReference",
      "short" : "Condition or observation that supports why the medication was administered",
      "definition" : "Condition or observation that supports why the medication was administered.",
      "comment" : "This is a reference to a condition that is the reason for the medication request.  If only a code exists, use reasonCode.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition",
        "http://hl7.org/fhir/StructureDefinition/Observation",
        "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"]
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.reasonReference"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=\"reason for use ASSERTION\"].value"
      },
      {
        "identity" : "w3c.prov",
        "map" : "no mapping"
      }]
    },
    {
      "id" : "MedicationAdministration.request",
      "path" : "MedicationAdministration.request",
      "short" : "Request administration performed against",
      "definition" : "The original request, instruction or authority to perform the administration.",
      "comment" : "This is a reference to the MedicationRequest  where the intent is either order or instance-order.  It should not reference MedicationRequests where the intent is any other value.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"]
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.basedOn"
      },
      {
        "identity" : "v2",
        "map" : "ORC-2-Placer Order Number / ORC-3-Filler Order Number"
      },
      {
        "identity" : "rim",
        "map" : "InFullfillmentOf->SubstanceAdministration"
      }]
    },
    {
      "id" : "MedicationAdministration.device",
      "path" : "MedicationAdministration.device",
      "short" : "Device used to administer",
      "definition" : "The device used in administering the medication to the patient.  For example, a particular infusion pump.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Device"]
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "PRT-10 Participation Device / RXR-3 Administrative Device"
      },
      {
        "identity" : "rim",
        "map" : "device->Access  OR device->AssignedDevice"
      }]
    },
    {
      "id" : "MedicationAdministration.note",
      "path" : "MedicationAdministration.note",
      "short" : "Information about the administration",
      "definition" : "Extra information about the medication administration that is not conveyed by the other attributes.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Annotation"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.note"
      },
      {
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=\"annotation\"].value"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage",
      "path" : "MedicationAdministration.dosage",
      "short" : "Details of how medication was taken",
      "definition" : "Describes the medication dosage information details e.g. dose, rate, site, route, etc.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "mad-1",
        "severity" : "error",
        "human" : "SHALL have at least one of dosage.dose or dosage.rate[x]",
        "expression" : "dose.exists() or rate.exists()",
        "xpath" : "exists(f:dose) or exists(f:*[starts-with(local-name(.), 'rate')])"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : "component->SubstanceAdministrationEvent"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage.text",
      "path" : "MedicationAdministration.dosage.text",
      "short" : "Free text dosage instructions e.g. SIG",
      "definition" : "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".text"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage.site",
      "path" : "MedicationAdministration.dosage.site",
      "short" : "Body site administered to",
      "definition" : "A coded specification of the anatomic site where the medication first entered the body.  For example, \"left arm\".",
      "comment" : "If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](extension-bodysite.html).  May be a summary code, or a reference to a very precise definition of the location, or both.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MedicationAdministrationSite"
        }],
        "strength" : "example",
        "description" : "A coded concept describing the site location the medicine enters into or onto the body.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/approach-site-codes"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "RXR-2 Administration Site / RXR-6 Administration Site Modifier"
      },
      {
        "identity" : "rim",
        "map" : ".approachSiteCode"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage.route",
      "path" : "MedicationAdministration.dosage.route",
      "short" : "Path of substance into body",
      "definition" : "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient.  For example, topical, intravenous, etc.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "RouteOfAdministration"
        }],
        "strength" : "example",
        "description" : "A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/route-codes"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "RXR-1-Route"
      },
      {
        "identity" : "rim",
        "map" : ".routeCode"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage.method",
      "path" : "MedicationAdministration.dosage.method",
      "short" : "How drug was administered",
      "definition" : "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.  This attribute will most often NOT be populated.  It is most commonly used for injections.  For example, Slow Push, Deep IV.",
      "comment" : "One of the reasons this attribute is not used often, is that the method is often pre-coordinated with the route and/or form of administration.  This means the codes used in route or form may pre-coordinate the method in the route code or the form code.  The implementation decision about what coding system to use for route or form code will determine how frequently the method code will be populated e.g. if route or form code pre-coordinate method code, then this attribute will not be populated often; if there is no pre-coordination then method code may  be used frequently.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "MedicationAdministrationMethod"
        }],
        "strength" : "example",
        "description" : "A coded concept describing the technique by which the medicine is administered.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/administration-method-codes"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "RXR-4-Administration Method"
      },
      {
        "identity" : "rim",
        "map" : ".methodCode"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage.dose",
      "path" : "MedicationAdministration.dosage.dose",
      "short" : "Amount of medication per dose",
      "definition" : "The amount of the medication given at one administration event.   Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.",
      "comment" : "If the administration is not instantaneous (rate is present), this can be specified to convey the total amount administered over period of time of a single administration.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Quantity",
        "profile" : ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "RXA-6 Administered Amount / RXA-7 Administered Units"
      },
      {
        "identity" : "rim",
        "map" : ".doseQuantity"
      }]
    },
    {
      "id" : "MedicationAdministration.dosage.rate[x]",
      "path" : "MedicationAdministration.dosage.rate[x]",
      "short" : "Dose quantity per unit of time",
      "definition" : "Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.",
      "comment" : "If the rate changes over time, and you want to capture this in MedicationAdministration, then each change should be captured as a distinct MedicationAdministration, with a specific MedicationAdministration.dosage.rate, and the date time when the rate change occurred. Typically, the MedicationAdministration.dosage.rate element is not used to convey an average rate.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Ratio"
      },
      {
        "code" : "Quantity",
        "profile" : ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]
      }],
      "mapping" : [{
        "identity" : "v2",
        "map" : "RXA-12-Administered Per (Time Unit)"
      },
      {
        "identity" : "rim",
        "map" : ".rateQuantity"
      }]
    },
    {
      "id" : "MedicationAdministration.eventHistory",
      "path" : "MedicationAdministration.eventHistory",
      "short" : "A list of events of interest in the lifecycle",
      "definition" : "A summary of the events of interest that have occurred, such as when the administration was verified.",
      "comment" : "This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the Provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the Provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Provenance"]
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"
      }]
    }]
  }
}


