{
  "resourceType": "StructureDefinition",
  "id": "ac50e901-bc4c-4c86-864f-db3a724f473e",
  "meta": {
    "lastUpdated": "2018-11-12T14:15:09.586+00:00"
  },
  "url": "http://medico-emr.net/stu3/sd/Appointment-CareAppointmentDocumentation-1",
  "name": "Appointment-CareAppointmentDocumentation-1",
  "status": "draft",
  "date": "2018-11-12T14:15:09.4128579+00:00",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Appointment",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Appointment",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Appointment",
        "path": "Appointment",
        "definition": "Represent a documentation of care intervention (map sto n1100mdc)"
      },
      {
        "id": "Appointment.id",
        "path": "Appointment.id",
        "definition": "ID Partern:  CareAppointmentDoc-####\r\n(number maps to n1100mdc.mdc)",
        "min": 1
      },
      {
        "id": "Appointment.meta",
        "path": "Appointment.meta",
        "min": 1
      },
      {
        "id": "Appointment.meta.id",
        "path": "Appointment.meta.id",
        "max": "0"
      },
      {
        "id": "Appointment.meta.versionId",
        "path": "Appointment.meta.versionId",
        "max": "0"
      },
      {
        "id": "Appointment.meta.lastUpdated",
        "path": "Appointment.meta.lastUpdated",
        "min": 1
      },
      {
        "id": "Appointment.meta.profile",
        "path": "Appointment.meta.profile",
        "min": 1,
        "max": "1",
        "fixedUri": "http://medico-emr.net/stu3/sd/Appointment-CareAppointmentDocumentation-1"
      },
      {
        "id": "Appointment.meta.security",
        "path": "Appointment.meta.security",
        "max": "0"
      },
      {
        "id": "Appointment.meta.tag",
        "path": "Appointment.meta.tag",
        "max": "0"
      },
      {
        "id": "Appointment.implicitRules",
        "path": "Appointment.implicitRules",
        "max": "0"
      },
      {
        "id": "Appointment.language",
        "path": "Appointment.language",
        "max": "0"
      },
      {
        "id": "Appointment.text",
        "path": "Appointment.text",
        "max": "0"
      },
      {
        "id": "Appointment.contained",
        "path": "Appointment.contained",
        "max": "0"
      },
      {
        "id": "Appointment.extension",
        "path": "Appointment.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Appointment.extension:quantity",
        "path": "Appointment.extension",
        "sliceName": "quantity",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Appointment-Quantity-1"
          }
        ]
      },
      {
        "id": "Appointment.extension:context",
        "path": "Appointment.extension",
        "sliceName": "context",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Appointment-Context-1"
          }
        ]
      },
      {
        "id": "Appointment.extension:context.id",
        "path": "Appointment.extension.id",
        "max": "0"
      },
      {
        "id": "Appointment.extension:context.valueReference:valueReference",
        "path": "Appointment.extension.valueReference",
        "sliceName": "valueReference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.extension:startEffective",
        "path": "Appointment.extension",
        "sliceName": "startEffective",
        "definition": "medico: Extension bearing the effective start time when a care intervention took place",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Appointment-StartEffective-1"
          }
        ]
      },
      {
        "id": "Appointment.identifier",
        "path": "Appointment.identifier",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "http://medico-emr.net/stu3/sd/Identifier-medicoResourceId-1"
          }
        ]
      },
      {
        "id": "Appointment.identifier.system",
        "path": "Appointment.identifier.system",
        "definition": "Must be a constant underneath http://medico-emr.net/%KUNDE%/sid1/CareAppointmentDoc",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/CareAppointmentDoc"
      },
      {
        "id": "Appointment.status",
        "path": "Appointment.status",
        "definition": "medico uses the following status values:\r\n\"proposed\" - the care action is scheduled but not yet done - even ithe appoint was planned for the past\r\n\"fulfilled\" - care action was done - and should usually be documented here\r\n\"cancelled\" - the care action was cancelled \r\n\"noshow\" -  care action could not take place, because patient was not not present"
      },
      {
        "id": "Appointment.serviceCategory",
        "path": "Appointment.serviceCategory",
        "max": "0"
      },
      {
        "id": "Appointment.serviceType",
        "path": "Appointment.serviceType",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.serviceType.id",
        "path": "Appointment.serviceType.id",
        "max": "0"
      },
      {
        "id": "Appointment.serviceType.coding",
        "path": "Appointment.serviceType.coding",
        "definition": "medico: See comments for .system and .code",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.serviceType.coding.id",
        "path": "Appointment.serviceType.coding.id",
        "max": "0"
      },
      {
        "id": "Appointment.serviceType.coding.system",
        "path": "Appointment.serviceType.coding.system",
        "definition": "medico: System starts with \r\n      http://medico-emr.net/%KUNDE%/cs/CarePlanIntervention-\r\nFollowed by the internal catalog used for care plan interventions (n1100mdc.cat)",
        "min": 1
      },
      {
        "id": "Appointment.serviceType.coding.version",
        "path": "Appointment.serviceType.coding.version",
        "max": "0"
      },
      {
        "id": "Appointment.serviceType.coding.code",
        "path": "Appointment.serviceType.coding.code",
        "definition": "maps to n1100mpc.srv",
        "min": 1
      },
      {
        "id": "Appointment.serviceType.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.serviceType.coding.display",
        "min": 1
      },
      {
        "id": "Appointment.serviceType.coding.userSelected",
        "path": "Appointment.serviceType.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Appointment.serviceType.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.serviceType.text",
        "max": "0"
      },
      {
        "id": "Appointment.specialty",
        "path": "Appointment.specialty",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType",
        "path": "Appointment.appointmentType",
        "definition": "medico: see .system and .code for comments",
        "min": 1
      },
      {
        "id": "Appointment.appointmentType.id",
        "path": "Appointment.appointmentType.id",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType.coding",
        "path": "Appointment.appointmentType.coding",
        "definition": "medico: This reflects only the scheduled time, not the real",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Appointment.appointmentType.coding.id",
        "path": "Appointment.appointmentType.coding.id",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType.coding.system",
        "path": "Appointment.appointmentType.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/v2/0276"
      },
      {
        "id": "Appointment.appointmentType.coding.version",
        "path": "Appointment.appointmentType.coding.version",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType.coding.code",
        "path": "Appointment.appointmentType.coding.code",
        "definition": "Either \"ROUTINE\" or \"EMERGENCY\"\r\nRoutine is a pre-scheduled care action appointment\r\nEMERGENCY means that the care action was done ad-hoc - forced by neccessities - it does not neccessarily mean that the patient was in the state of emergency",
        "min": 1
      },
      {
        "id": "Appointment.appointmentType.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.appointmentType.coding.display",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType.coding.userSelected",
        "path": "Appointment.appointmentType.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Appointment.appointmentType.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.appointmentType.text",
        "max": "0"
      },
      {
        "id": "Appointment.reason",
        "path": "Appointment.reason",
        "definition": "medico: This could later be used for Problem-Codes",
        "max": "0"
      },
      {
        "id": "Appointment.indication",
        "path": "Appointment.indication",
        "max": "0"
      },
      {
        "id": "Appointment.priority",
        "path": "Appointment.priority",
        "max": "0"
      },
      {
        "id": "Appointment.description",
        "path": "Appointment.description",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation",
        "path": "Appointment.supportingInformation",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://medico-emr.net/stu3/sd/CarePlan-CarePlanSchedules-1"
          }
        ]
      },
      {
        "id": "Appointment.supportingInformation.id",
        "path": "Appointment.supportingInformation.id",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation.reference",
        "path": "Appointment.supportingInformation.reference",
        "min": 1
      },
      {
        "id": "Appointment.supportingInformation.identifier",
        "path": "Appointment.supportingInformation.identifier",
        "min": 1
      },
      {
        "id": "Appointment.supportingInformation.identifier.id",
        "path": "Appointment.supportingInformation.identifier.id",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation.identifier.use",
        "path": "Appointment.supportingInformation.identifier.use",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation.identifier.type",
        "path": "Appointment.supportingInformation.identifier.type",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation.identifier.system",
        "path": "Appointment.supportingInformation.identifier.system",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/CareAppointmentDoc",
        "min": 1
      },
      {
        "id": "Appointment.supportingInformation.identifier.value",
        "path": "Appointment.supportingInformation.identifier.value",
        "min": 1
      },
      {
        "id": "Appointment.supportingInformation.identifier.period",
        "path": "Appointment.supportingInformation.identifier.period",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation.identifier.assigner",
        "path": "Appointment.supportingInformation.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Appointment.supportingInformation.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.supportingInformation.display",
        "max": "0"
      },
      {
        "id": "Appointment.start",
        "path": "Appointment.start",
        "definition": "medico: This reflects only the scheduled time, not the effective date-time",
        "min": 1
      },
      {
        "id": "Appointment.end",
        "path": "Appointment.end",
        "max": "0"
      },
      {
        "id": "Appointment.minutesDuration",
        "path": "Appointment.minutesDuration",
        "definition": "medico: Maps to n1100mdc.dur\r\nIts value depends on status:\r\n - if status is fulfilled - than duration represents the actual duration needed for that care intervention\r\n - if status is not fulfilled - than duration is the planned time for the care intervention",
        "min": 1
      },
      {
        "id": "Appointment.slot",
        "path": "Appointment.slot",
        "max": "0"
      },
      {
        "id": "Appointment.created",
        "path": "Appointment.created",
        "max": "0"
      },
      {
        "id": "Appointment.comment",
        "path": "Appointment.comment",
        "definition": "medico: Maps to n1100mdc.info"
      },
      {
        "id": "Appointment.incomingReferral",
        "path": "Appointment.incomingReferral",
        "max": "0"
      },
      {
        "id": "Appointment.participant.id",
        "path": "Appointment.participant.id",
        "max": "0"
      },
      {
        "id": "Appointment.participant.extension",
        "path": "Appointment.participant.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Appointment.participant.extension:participantFlags",
        "path": "Appointment.participant.extension",
        "sliceName": "participantFlags",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Appointment-ParticipantFlags-1"
          }
        ]
      },
      {
        "id": "Appointment.participant.extension:participantFlags.id",
        "path": "Appointment.participant.extension.id",
        "max": "0"
      },
      {
        "id": "Appointment.participant.extension:participantFlags.valueCodeableConcept:valueCodeableConcept",
        "path": "Appointment.participant.extension.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "min": 1
      },
      {
        "id": "Appointment.participant.type",
        "path": "Appointment.participant.type",
        "max": "0"
      },
      {
        "id": "Appointment.participant.actor",
        "path": "Appointment.participant.actor",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-medicoEmployeeResourceReference-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Practitioner-Employee-1"
          }
        ]
      },
      {
        "id": "Appointment.participant.actor.identifier:medicoResourceId",
        "path": "Appointment.participant.actor.identifier",
        "sliceName": "medicoResourceId"
      },
      {
        "id": "Appointment.participant.actor.identifier:medicoResourceId.system",
        "path": "Appointment.participant.actor.identifier.system",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/Employee"
      },
      {
        "id": "Appointment.participant.actor.identifier:medicoResourceId2",
        "path": "Appointment.participant.actor.identifier",
        "sliceName": "medicoResourceId2"
      },
      {
        "id": "Appointment.participant.actor.identifier:medicoResourceId2.system",
        "path": "Appointment.participant.actor.identifier.system",
        "definition": "Must be a constant underneath http://medico-emr.net/%KUNDE%/sid1/*\r\n(ResourceId matches x8701res.resid)",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/ResourceId"
      },
      {
        "id": "Appointment.participant.actor.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Appointment.participant.actor.display",
        "definition": "medico: The name of the employee as stated in x8701res.des"
      },
      {
        "id": "Appointment.participant.required",
        "path": "Appointment.participant.required",
        "max": "0"
      },
      {
        "id": "Appointment.participant.status",
        "path": "Appointment.participant.status",
        "fixedCode": "accepted"
      },
      {
        "id": "Appointment.requestedPeriod",
        "path": "Appointment.requestedPeriod",
        "max": "0"
      }
    ]
  }
}