### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/AppointmentResponse.json
### ----------------------------------------------------
### -- Chunk 3 of 3
  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "AppointmentResponse.identifier",
      "path" : "AppointmentResponse.identifier",
      "short" : "External Ids for this item",
      "definition" : "This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "AppointmentResponse.identifier",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Identifier"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.identifier"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      },
      {
        "identity" : "rim",
        "map" : ".id"
      },
      {
        "identity" : "ical",
        "map" : "UID"
      }]
    },
    {
      "id" : "AppointmentResponse.appointment",
      "path" : "AppointmentResponse.appointment",
      "short" : "Appointment this response relates to",
      "definition" : "Appointment that this response is replying to.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "AppointmentResponse.appointment",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Appointment"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.basedOn"
      },
      {
        "identity" : "rim",
        "map" : "scheduleRequest.ActAppointmentRequest[@moodCode &lt;= 'ARQ']"
      }]
    },
    {
      "id" : "AppointmentResponse.start",
      "path" : "AppointmentResponse.start",
      "short" : "Time from appointment, or requested new start time",
      "definition" : "Date/Time that the appointment is to take place, or requested new start time.",
      "comment" : "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "AppointmentResponse.start",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "instant"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.init"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime.low"
      }]
    },
    {
      "id" : "AppointmentResponse.end",
      "path" : "AppointmentResponse.end",
      "short" : "Time from appointment, or requested new end time",
      "definition" : "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "AppointmentResponse.end",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "instant"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.done[x]"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime.high"
      }]
    },
    {
      "id" : "AppointmentResponse.participantType",
      "path" : "AppointmentResponse.participantType",
      "short" : "Role of participant in the appointment",
      "definition" : "Role of participant in the appointment.",
      "comment" : "The role of the participant can be used to declare what the actor will be doing in the scope of the referenced appointment.\r\rIf the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.\r\rThis value SHALL be the same as specified on the referenced Appointment so that they can be matched, and subsequently updated.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "AppointmentResponse.participantType",
        "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" : "Request.performerType"
      },
      {
        "identity" : "rim",
        "map" : "(performer | reusableDevice | subject | location).@typeCode"
      },
      {
        "identity" : "ical",
        "map" : "n/a"
      }]
    },
    {
      "id" : "AppointmentResponse.actor",
      "path" : "AppointmentResponse.actor",
      "short" : "Person, Location, HealthcareService, or Device",
      "definition" : "A Person, Location, HealthcareService, or Device that is participating in the appointment.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "AppointmentResponse.actor",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Device",
        "http://hl7.org/fhir/StructureDefinition/HealthcareService",
        "http://hl7.org/fhir/StructureDefinition/Location"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.performer"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.who"
      },
      {
        "identity" : "v2",
        "map" : "PID-3-Patient ID List"
      },
      {
        "identity" : "rim",
        "map" : "performer.person | reusableDevice.manufacturedDevice | subject.patient | location.serviceDeliveryLocation"
      },
      {
        "identity" : "ical",
        "map" : "ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource)"
      }]
    },
    {
      "id" : "AppointmentResponse.participantStatus",
      "path" : "AppointmentResponse.participantStatus",
      "short" : "accepted | declined | tentative | in-process | completed | needs-action | entered-in-error",
      "definition" : "Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.",
      "comment" : "This element is labeled as a modifier because the status contains the code entered-in-error that marks the participant as not currently valid.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "AppointmentResponse.participantStatus",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : true,
      "isModifierReason" : "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ParticipantStatus"
        }],
        "strength" : "required",
        "description" : "The Participation status of an appointment.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/participationstatus|4.0.0"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.status"
      },
      {
        "identity" : "rim",
        "map" : "(performer | reusableDevice | subject | location).statusCode"
      },
      {
        "identity" : "ical",
        "map" : "ATTENDEE;CN=\"Brian Postlethwaite\";RSVP=TRUE:mailto:BPostlethwaite@data.com (rsvpparam | partstatparam)"
      }]
    },
    {
      "id" : "AppointmentResponse.comment",
      "path" : "AppointmentResponse.comment",
      "short" : "Additional comments",
      "definition" : "Additional comments about the appointment.",
      "comment" : "This comment is particularly important when the responder is declining, tentatively accepting or requesting another time to indicate the reasons why.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "AppointmentResponse.comment",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.note"
      },
      {
        "identity" : "rim",
        "map" : ".subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value"
      },
      {
        "identity" : "ical",
        "map" : "COMMENT"
      }]
    }]
  },
  "differential" : {
    "element" : [{
      "id" : "AppointmentResponse",
      "path" : "AppointmentResponse",
      "short" : "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection",
      "definition" : "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.",
      "min" : 0,
      "max" : "*",
      "constraint" : [{
        "key" : "apr-1",
        "severity" : "error",
        "human" : "Either the participantType or actor must be specified",
        "expression" : "participantType.exists() or actor.exists()",
        "xpath" : "(exists(f:participantType) or exists(f:actor))"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request"
      },
      {
        "identity" : "rim",
        "map" : "Appointment[@moodCode &lt;= 'PRMS']"
      },
      {
        "identity" : "ical",
        "map" : "VEVENT"
      }]
    },
    {
      "id" : "AppointmentResponse.identifier",
      "path" : "AppointmentResponse.identifier",
      "short" : "External Ids for this item",
      "definition" : "This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Identifier"
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.identifier"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      },
      {
        "identity" : "rim",
        "map" : ".id"
      },
      {
        "identity" : "ical",
        "map" : "UID"
      }]
    },
    {
      "id" : "AppointmentResponse.appointment",
      "path" : "AppointmentResponse.appointment",
      "short" : "Appointment this response relates to",
      "definition" : "Appointment that this response is replying to.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Appointment"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.basedOn"
      },
      {
        "identity" : "rim",
        "map" : "scheduleRequest.ActAppointmentRequest[@moodCode &lt;= 'ARQ']"
      }]
    },
    {
      "id" : "AppointmentResponse.start",
      "path" : "AppointmentResponse.start",
      "short" : "Time from appointment, or requested new start time",
      "definition" : "Date/Time that the appointment is to take place, or requested new start time.",
      "comment" : "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "instant"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.init"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime.low"
      }]
    },
    {
      "id" : "AppointmentResponse.end",
      "path" : "AppointmentResponse.end",
      "short" : "Time from appointment, or requested new end time",
      "definition" : "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "instant"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.occurrence[x]"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.done[x]"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime.high"
      }]
    },
    {
      "id" : "AppointmentResponse.participantType",
      "path" : "AppointmentResponse.participantType",
      "short" : "Role of participant in the appointment",
      "definition" : "Role of participant in the appointment.",
      "comment" : "The role of the participant can be used to declare what the actor will be doing in the scope of the referenced appointment.\r\rIf the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.\r\rThis value SHALL be the same as specified on the referenced Appointment so that they can be matched, and subsequently updated.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "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" : "Request.performerType"
      },
      {
        "identity" : "rim",
        "map" : "(performer | reusableDevice | subject | location).@typeCode"
      },
      {
        "identity" : "ical",
        "map" : "n/a"
      }]
    },
    {
      "id" : "AppointmentResponse.actor",
      "path" : "AppointmentResponse.actor",
      "short" : "Person, Location, HealthcareService, or Device",
      "definition" : "A Person, Location, HealthcareService, or Device that is participating in the appointment.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Practitioner",
        "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
        "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
        "http://hl7.org/fhir/StructureDefinition/Device",
        "http://hl7.org/fhir/StructureDefinition/HealthcareService",
        "http://hl7.org/fhir/StructureDefinition/Location"]
      }],
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.performer"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.who"
      },
      {
        "identity" : "v2",
        "map" : "PID-3-Patient ID List"
      },
      {
        "identity" : "rim",
        "map" : "performer.person | reusableDevice.manufacturedDevice | subject.patient | location.serviceDeliveryLocation"
      },
      {
        "identity" : "ical",
        "map" : "ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource)"
      }]
    },
    {
      "id" : "AppointmentResponse.participantStatus",
      "path" : "AppointmentResponse.participantStatus",
      "short" : "accepted | declined | tentative | in-process | completed | needs-action | entered-in-error",
      "definition" : "Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.",
      "comment" : "This element is labeled as a modifier because the status contains the code entered-in-error that marks the participant as not currently valid.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : true,
      "isModifierReason" : "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ParticipantStatus"
        }],
        "strength" : "required",
        "description" : "The Participation status of an appointment.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/participationstatus|4.0.0"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.status"
      },
      {
        "identity" : "rim",
        "map" : "(performer | reusableDevice | subject | location).statusCode"
      },
      {
        "identity" : "ical",
        "map" : "ATTENDEE;CN=\"Brian Postlethwaite\";RSVP=TRUE:mailto:BPostlethwaite@data.com (rsvpparam | partstatparam)"
      }]
    },
    {
      "id" : "AppointmentResponse.comment",
      "path" : "AppointmentResponse.comment",
      "short" : "Additional comments",
      "definition" : "Additional comments about the appointment.",
      "comment" : "This comment is particularly important when the responder is declining, tentatively accepting or requesting another time to indicate the reasons why.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Request.note"
      },
      {
        "identity" : "rim",
        "map" : ".subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value"
      },
      {
        "identity" : "ical",
        "map" : "COMMENT"
      }]
    }]
  }
}


