### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/Procedure.json
### ----------------------------------------------------
### -- Chunk 10 of 10
targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.context"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.context"
      },
      {
        "identity" : "v2",
        "map" : "PV1-19"
      },
      {
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"
      }]
    },
    {
      "id" : "Procedure.performed[x]",
      "path" : "Procedure.performed[x]",
      "short" : "When the procedure was performed",
      "definition" : "Estimated or actual date, date-time, period, or age when the procedure was performed.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.",
      "comment" : "Age is generally used when the patient reports an age at which the procedure was performed. Range is generally used when the patient reports an age range when the procedure was performed, such as sometime between 20-25 years old.  dateTime supports a range of precision due to some procedures being reported as past procedures that might not have millisecond precision while other procedures performed and documented during the encounter might have more precise UTC timestamps with timezone.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      },
      {
        "code" : "Period"
      },
      {
        "code" : "string"
      },
      {
        "code" : "Age"
      },
      {
        "code" : "Range"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.done[x]"
      },
      {
        "identity" : "v2",
        "map" : "OBR-7"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime"
      }]
    },
    {
      "id" : "Procedure.recorder",
      "path" : "Procedure.recorder",
      "short" : "Who recorded the procedure",
      "definition" : "Individual who recorded the record and takes responsibility for its content.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "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"
      }]
    },
    {
      "id" : "Procedure.asserter",
      "path" : "Procedure.asserter",
      "short" : "Person who asserts this procedure",
      "definition" : "Individual who is making the procedure statement.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.source"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=INF].role"
      }]
    },
    {
      "id" : "Procedure.performer",
      "path" : "Procedure.performer",
      "short" : "The people who performed the procedure",
      "definition" : "Limited to \"real\" people rather than equipment.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=PRF]"
      }]
    },
    {
      "id" : "Procedure.performer.function",
      "path" : "Procedure.performer.function",
      "short" : "Type of performance",
      "definition" : "Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist.",
      "requirements" : "Allows disambiguation of the types of involvement of different performers.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProcedurePerformerRole"
        }],
        "strength" : "example",
        "description" : "A code that identifies the role of a performer of the procedure.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/performer-role"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.performer.function"
      },
      {
        "identity" : "v2",
        "map" : "Some combination of STF-18 / PRA-3 / PRT-4 / ROL-3 / ORC-12 / OBR-16 / PV1-7 / PV1-8 / PV1-9 / PV1-17 / OBX-25"
      },
      {
        "identity" : "rim",
        "map" : ".functionCode"
      }]
    },
    {
      "id" : "Procedure.performer.actor",
      "path" : "Procedure.performer.actor",
      "short" : "The reference to the practitioner",
      "definition" : "The practitioner who was involved in the procedure.",
      "requirements" : "A reference to Device supports use cases, such as pacemakers.",
      "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/Organization",
        "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" : "w5",
        "map" : "FiveWs.actor"
      },
      {
        "identity" : "v2",
        "map" : "ORC-19/PRT-5"
      },
      {
        "identity" : "rim",
        "map" : ".role"
      }]
    },
    {
      "id" : "Procedure.performer.onBehalfOf",
      "path" : "Procedure.performer.onBehalfOf",
      "short" : "Organization the device or practitioner was acting for",
      "definition" : "The organization the device or practitioner was acting on behalf of.",
      "requirements" : "Practitioners and Devices can be associated with multiple organizations.  This element indicates which organization they were acting on behalf of when performing the action.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".scoper"
      }]
    },
    {
      "id" : "Procedure.location",
      "path" : "Procedure.location",
      "short" : "Where the procedure happened",
      "definition" : "The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant.",
      "requirements" : "Ties a procedure to where the records are likely kept.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Location"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "w5",
        "map" : "FiveWs.where[x]"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=LOC].role[classCode=SDLOC]"
      }]
    },
    {
      "id" : "Procedure.reasonCode",
      "path" : "Procedure.reasonCode",
      "short" : "Coded reason procedure performed",
      "definition" : "The coded reason why the procedure was performed. This may be a coded entity of some type, or may simply be present as text.",
      "comment" : "Use Procedure.reasonCode when a code sufficiently describes the reason.  Use Procedure.reasonReference when referencing a resource, which allows more information to be conveyed, such as onset date. Procedure.reasonCode and Procedure.reasonReference are not meant to be duplicative.  For a single reason, either Procedure.reasonCode or Procedure.reasonReference can be used.  Procedure.reasonCode may be a summary code, or Procedure.reasonReference may be used to reference a very precise definition of the reason using Condition | Observation | Procedure | DiagnosticReport | DocumentReference.  Both Procedure.reasonCode and Procedure.reasonReference can be used if they are describing different reasons for the procedure.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProcedureReason"
        }],
        "strength" : "example",
        "description" : "A code that identifies the reason a procedure is  required.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/procedure-reason"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.reasonCode"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "rim",
        "map" : ".reasonCode"
      }]
    },
    {
      "id" : "Procedure.reasonReference",
      "path" : "Procedure.reasonReference",
      "short" : "The justification that the procedure was performed",
      "definition" : "The justification of why the procedure was performed.",
      "comment" : "It is possible for a procedure to be a reason (such as C-Section) for another procedure (such as an epidural). Other examples include endoscopy for dilatation and biopsy (a combination of diagnostic and therapeutic use). \nUse Procedure.reasonCode when a code sufficiently describes the reason.  Use Procedure.reasonReference when referencing a resource, which allows more information to be conveyed, such as onset date. Procedure.reasonCode and Procedure.reasonReference are not meant to be duplicative.  For a single reason, either Procedure.reasonCode or Procedure.reasonReference can be used.  Procedure.reasonCode may be a summary code, or Procedure.reasonReference may be used to reference a very precise definition of the reason using Condition | Observation | Procedure | DiagnosticReport | DocumentReference.  Both Procedure.reasonCode and Procedure.reasonReference can be used if they are describing different reasons for the procedure.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition",
        "http://hl7.org/fhir/StructureDefinition/Observation",
        "http://hl7.org/fhir/StructureDefinition/Procedure",
        "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
        "http://hl7.org/fhir/StructureDefinition/DocumentReference"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.reasonReference"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "rim",
        "map" : ".reasonCode"
      }]
    },
    {
      "id" : "Procedure.bodySite",
      "path" : "Procedure.bodySite",
      "short" : "Target body sites",
      "definition" : "Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.",
      "comment" : "If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [procedure-targetbodystructure](extension-procedure-targetbodystructure.html).",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "BodySite"
        }],
        "strength" : "example",
        "description" : "Codes describing anatomical locations. May include laterality.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/body-site"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "OBX-20"
      },
      {
        "identity" : "rim",
        "map" : ".targetSiteCode"
      }]
    },
    {
      "id" : "Procedure.outcome",
      "path" : "Procedure.outcome",
      "short" : "The result of procedure",
      "definition" : "The outcome of the procedure - did it resolve the reasons for the procedure being performed?",
      "comment" : "If outcome contains narrative text only, it can be captured using the CodeableConcept.text.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProcedureOutcome"
        }],
        "strength" : "example",
        "description" : "An outcome of a procedure - whether it was resolved or otherwise.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/procedure-outcome"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=OUT].target.text"
      }]
    },
    {
      "id" : "Procedure.report",
      "path" : "Procedure.report",
      "short" : "Any report resulting from the procedure",
      "definition" : "This could be a histology result, pathology report, surgical report, etc.",
      "comment" : "There could potentially be multiple reports - e.g. if this was a procedure which took multiple biopsies resulting in a number of anatomical pathology reports.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
        "http://hl7.org/fhir/StructureDefinition/DocumentReference",
        "http://hl7.org/fhir/StructureDefinition/Composition"]
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN]"
      }]
    },
    {
      "id" : "Procedure.complication",
      "path" : "Procedure.complication",
      "short" : "Complication following the procedure",
      "definition" : "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.",
      "comment" : "If complications are only expressed by the narrative text, they can be captured using the CodeableConcept.text.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProcedureComplication"
        }],
        "strength" : "example",
        "description" : "Codes describing complications that resulted from a procedure.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/condition-code"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=OUTC].target[classCode=OBS, code=\"complication\", moodCode=EVN].value"
      }]
    },
    {
      "id" : "Procedure.complicationDetail",
      "path" : "Procedure.complicationDetail",
      "short" : "A condition that is a result of the procedure",
      "definition" : "Any complications that occurred during the procedure, or in the immediate post-performance period.",
      "requirements" : "This is used to document a condition that is a result of the procedure, not the condition that was the reason for the procedure.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Condition"]
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=OUTC].target[classCode=OBS, code=\"complication\", moodCode=EVN].value"
      }]
    },
    {
      "id" : "Procedure.followUp",
      "path" : "Procedure.followUp",
      "short" : "Instructions for follow up",
      "definition" : "If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProcedureFollowUp"
        }],
        "strength" : "example",
        "description" : "Specific follow up required for a procedure e.g. removal of sutures.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/procedure-followup"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=COMP].target[classCode=ACT, moodCode=INT].code"
      }]
    },
    {
      "id" : "Procedure.note",
      "path" : "Procedure.note",
      "short" : "Additional information about the procedure",
      "definition" : "Any other notes and comments about the procedure.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Annotation"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.note"
      },
      {
        "identity" : "v2",
        "map" : "NTE"
      },
      {
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=\"annotation\"].value"
      }]
    },
    {
      "id" : "Procedure.focalDevice",
      "path" : "Procedure.focalDevice",
      "short" : "Manipulated, implanted, or removed device",
      "definition" : "A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".participation[typeCode=DEV].role[classCode=MANU]"
      }]
    },
    {
      "id" : "Procedure.focalDevice.action",
      "path" : "Procedure.focalDevice.action",
      "short" : "Kind of change to device",
      "definition" : "The kind of change that happened to the device during the procedure.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DeviceActionKind"
        }],
        "strength" : "preferred",
        "description" : "A kind of change that happened to the device during the procedure.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/device-action"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : ".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=\"procedure device action\"].value=:procedure device action codes"
      }]
    },
    {
      "id" : "Procedure.focalDevice.manipulated",
      "path" : "Procedure.focalDevice.manipulated",
      "short" : "Device that was changed",
      "definition" : "The device that was manipulated (changed) during the procedure.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Device"]
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".participation[typeCode=DEV].role[classCode=SDLOC]"
      }]
    },
    {
      "id" : "Procedure.usedReference",
      "path" : "Procedure.usedReference",
      "short" : "Items used during procedure",
      "definition" : "Identifies medications, devices and any other substance used as part of the procedure.",
      "comment" : "For devices actually implanted or removed, use Procedure.device.",
      "requirements" : "Used for tracking contamination, etc.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Device",
        "http://hl7.org/fhir/StructureDefinition/Medication",
        "http://hl7.org/fhir/StructureDefinition/Substance"]
      }],
      "mapping" : [{
        "identity" : "rim",
        "map" : ".participation[typeCode=DEV].role[classCode=MANU] or\n.participation[typeCode=CSM].role[classCode=ADMM] (for Medication or Substance)"
      }]
    },
    {
      "id" : "Procedure.usedCode",
      "path" : "Procedure.usedCode",
      "short" : "Coded items used during the procedure",
      "definition" : "Identifies coded items that were used as part of the procedure.",
      "comment" : "For devices actually implanted or removed, use Procedure.device.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProcedureUsed"
        }],
        "strength" : "example",
        "description" : "Codes describing items used during a procedure.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/device-kind"
      },
      "mapping" : [{
        "identity" : "rim",
        "map" : "participation[typeCode=Dev].role[classCode=MANU]"
      }]
    }]
  }
}


