ehealth-group-appointment
type: StructureDefinition
node role: treeRoot
id:
  v: ehealth-group-appointment
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition ehealth-group-appointment Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Appointment <a style="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints ( responsible-1, max-participants, min-participants )">C 0..* Appointment A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) Constraints: responsible-1, max-participants, min-participants #xD; Slices for extension 1..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:responsible 1..1 Reference(ehealth-careteam | ehealth-practitioner) {r} Responsible careteam/practitioner URL: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible #xD; extension:groupId 0..1 string Logical id identifying a set of messages with the same recipient URL: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-id #xD; extension:legalBasis <a style="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints ( governance-1, responsible-2 )">C 0..1 CodeableConcept Legal basis URL: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-legalBasis Binding: Jurisdiction (required) Constraints: governance-1, responsible-2 #xD; extension:releasableRes…
url:
  v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
  l: ehealth-group-appointment
version:
  v: 7.0.1
name:
  v: ehealth-group-appointment
status:
  v: active
date:
  v: 2025-11-12T10:34:57+00:00
publisher:
  v: Den telemedicinske infrastruktur (eHealth Infrastructure)
contact:
  name:
    v: Den telemedicinske infrastruktur (eHealth Infrastructure)
  telecom:
    system:
      v: url
    value:
      v: http://ehealth.sundhed.dk
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: DK
    display:
      v: Denmark
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: workflow
  uri:
    v: http://hl7.org/fhir/workflow
    l: workflow
  name:
    v: Workflow Pattern
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: ical
  uri:
    v: http://ietf.org/rfc/2445
    l: http://ietf.org/rfc/2445
  name:
    v: iCalendar
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
    l: fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
    l: v2
  name:
    v: HL7 v2 Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Appointment
  l: Appointment
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Appointment
  l: Appointment
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
      l: snapshot-base-version
    value: String
      v: 4.0.1
  element:
    id:
      v: Appointment
    path:
      v: Appointment
    short:
      v: A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)
    definition:
      v: A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Appointment
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: app-2
      severity:
        v: error
      human:
        v: Either start and end are specified, or neither
      expression:
        v: start.exists() = end.exists()
      xpath:
        v: ((exists(f:start) and exists(f:end)) or (not(exists(f:start)) and not(exists(f:end))))
      source:
        v: http://hl7.org/fhir/StructureDefinition/Appointment
        l: Appointment
    constraint:
      key:
        v: app-3
      severity:
        v: error
      human:
        v: Only proposed or cancelled appointments can be missing start/end dates
      expression:
        v: (start.exists() and end.exists()) or (status in ('proposed' | 'cancelled' | 'waitlist'))
      xpath:
        v: ((exists(f:start) and exists(f:end)) or (f:status/@value='proposed') or (f:status/@value='cancelled') or (f:status/@value='waitlist'))
      source:
        v: http://hl7.org/fhir/StructureDefinition/Appointment
        l: Appointment
    constraint:
      key:
        v: app-4
      severity:
        v: error
      human:
        v: Cancelation reason is only used for appointments that have been cancelled, or no-show
      expression:
        v: Appointment.cancelationReason.exists() implies (Appointment.status='no-show' or Appointment.status='cancelled')
      xpath:
        v: not(exists(f:cancellationReason)) or f:status/@value=('no-show', 'cancelled')
      source:
        v: http://hl7.org/fhir/StructureDefinition/Appointment
        l: Appointment
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
      expression:
        v: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      xpath:
        v: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource

key:
  v: dom-5
severity:
  v: error
human:
  v: If a resource is contained in another resource, it SHALL NOT have a security label
expression:
  v: contained.meta.security.empty()
xpath:
  v: not(exists(f:contained/*/f:meta/f:security))
source:
  v: http://hl7.org/fhir/StructureDefinition/DomainResource
  l: DomainResource

extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice
    l: elementdefinition-bestpractice
  value: Boolean
    v: true
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation
    l: elementdefinition-bestpractice-explanation
  value: Markdown
    v: When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time.
key:
  v: dom-6
severity:
  v: warning
human:
  v: A resource should have narrative for robust management
expression:
  v: text.`div`.exists()
xpath:
  v: exists(f:text/h:div)
source:
  v: http://hl7.org/fhir/StructureDefinition/DomainResource
  l: DomainResource

key:
  v: responsible-1
severity:
  v: error
human:
  v: Ensuring that responsible entity is a participating party
expression:
  v: (extension('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible').value.reference in participant.extension('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-ext-careteam').value.reference) or (extension('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible').value.reference in participant.actor.reference)
source:
  v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
  l: ehealth-group-appointment

key:
  v: max-participants
severity:
  v: warning
human:
  v: Too many intended participants
expression:
  v: extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-max-participants').exists() implies participant.actor.where(reference.startsWith('#').not()).count() <= extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-max-participants').value
source:
  v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
  l: ehealth-group-appointment

key:
  v: min-participants
severity:
  v: warning
human:
  v: Too few intended participants
expression:
  v: extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-min-participants').exists() implies participant.actor.where(reference.startsWith('#').not()).count() >= extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-min-participants').value
source:
  v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
  l: ehealth-group-appointment

v: false

v: false

identity:
  v: rim
map:
  v: Entity. Role, or Act

identity:
  v: workflow
map:
  v: Request

identity:
  v: rim
map:
  v: Act[@moodCode <= 'INT']

identity:
  v: ical
map:
  v: VEVENT

id:
  v: Appointment.id
path:
  v: Appointment.id
short:
  v: Logical id of this artifact
definition:
  v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
comment:
  v: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: true

id:
  v: Appointment.meta
path:
  v: Appointment.meta
short:
  v: Metadata about the resource
definition:
  v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
    l: Meta
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: Appointment.implicitRules
path:
  v: Appointment.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
comment:
  v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
is summary:
  v: true

id:
  v: Appointment.language
path:
  v: Appointment.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
      l: elementdefinition-maxValueSet
    value: Canonical
      v: http://hl7.org/fhir/ValueSet/all-languages
      l: all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages|4.0.1
    l: http://hl7.org/fhir/ValueSet/languages

id:
  v: Appointment.text
path:
  v: Appointment.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
comment:
  v: Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Appointment.contained
path:
  v: Appointment.contained
short:
  v: Contained, inline Resources
definition:
  v: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
comment:
  v: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Appointment.extension
path:
  v: Appointment.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 1
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:responsible
path:
  v: Appointment.extension
slice name:
  v: responsible
short:
  v: Responsible careteam/practitioner
definition:
  v: Individuals, careteam and/or organization who are responsible in the given context
min:
  v: 1
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible
    l: ehealth-responsible
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:groupId
path:
  v: Appointment.extension
slice name:
  v: groupId
short:
  v: Logical id identifying a set of messages with the same recipient
definition:
  v: A logical id identifying a set of messages, which have the same recipient (considered a 'group message'). Must be supplied by the client, eg. as a UUID
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-id
    l: ehealth-group-id
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:legalBasis
path:
  v: Appointment.extension
slice name:
  v: legalBasis
short:
  v: Legal basis
definition:
  v: Legal basis
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-legalBasis
    l: ehealth-legalBasis
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
constraint:
  key:
    v: governance-1
  severity:
    v: error
  human:
    v: When extension is used a Episode of Care MUST be referenced
  expression:
    v: %resource.supportingInformation.reference.contains('EpisodeOfCare/')
  source:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
    l: ehealth-group-appointment
constraint:
  key:
    v: responsible-2
  severity:
    v: error
  human:
    v: Both performing organization and responsible organization must be populated when legal basis is used
  expression:
    v: %resource.extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performing-organization').exists() and %resource.extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible-organization').exists()
  source:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
    l: ehealth-group-appointment
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:releasableResource
path:
  v: Appointment.extension
slice name:
  v: releasableResource
short:
  v: Indicates if the resource may be shared through national document repositories
definition:
  v: Indicates if the resource may be shared through national document repositories
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-releasableResource
    l: ehealth-releasableResource
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:responsibleOrganization
path:
  v: Appointment.extension
slice name:
  v: responsibleOrganization
short:
  v: Responsible organization
definition:
  v: Organization responsible in a given context
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible-organization
    l: ehealth-responsible-organization
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:performer
path:
  v: Appointment.extension
slice name:
  v: performer
short:
  v: Performer
definition:
  v: The actual performer in an appointment, eg. teacher in a group class
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performer
    l: ehealth-performer
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:performingOrganization
path:
  v: Appointment.extension
slice name:
  v: performingOrganization
short:
  v: Organization who is performing in the given context
definition:
  v: Organization who is performing in the given context
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performing-organization
    l: ehealth-performing-organization
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:creator
path:
  v: Appointment.extension
slice name:
  v: creator
short:
  v: Creator Careteam
definition:
  v: Creator Careteam
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-creator
    l: ehealth-creator
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:intendedAudience
path:
  v: Appointment.extension
slice name:
  v: intendedAudience
short:
  v: The intended audience of the resource
definition:
  v: Specifies that the resource is only intended for use in the specified organisations. Leave blank if the resource is intended for global use.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-intendedAudience
    l: ehealth-intendedAudience
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.extension:registrationDeadline
path:
  v: Appointment.extension
slice name:
  v: registrationDeadline
short:
  v: Registration deadline
definition:
  v: Registration deadline
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-registration-deadline
    l: ehealth-registration-deadline
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.modifierExtension
path:
  v: Appointment.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 is allowed to 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: 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:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Appointment.identifier
path:
  v: Appointment.identifier
short:
  v: External Ids for this item
definition:
  v: This records identifiers associated with this appointment 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 (e.g. in CDA documents, or in written / printed documentation).
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.identifier
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: v2
  map:
    v: SCH-1, SCH-2, ARQ-1, ARQ-2
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: ical
  map:
    v: UID

id:
  v: Appointment.status
path:
  v: Appointment.status
short:
  v: proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist
definition:
  v: The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.
comment:
  v: If the Appointment's status is "cancelled" then all participants are expected to have their calendars released for the appointment period, and as such any Slots that were marked as BUSY can be re-set to FREE. This element is labeled as a modifier because the status contains the code entered-in-error that mark the Appointment as not currently valid.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Appointment.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: 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
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: AppointmentStatus
  strength:
    v: required
  description:
    v: The free/busy status of an appointment.
  value set:
    v: http://hl7.org/fhir/ValueSet/appointmentstatus|4.0.1
    l: http://hl7.org/fhir/ValueSet/appointmentstatus
mapping:
  identity:
    v: workflow
  map:
    v: Request.status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: v2
  map:
    v: SCH-25
mapping:
  identity:
    v: rim
  map:
    v: .statusCode
mapping:
  identity:
    v: ical
  map:
    v: STATUS

id:
  v: Appointment.cancelationReason
path:
  v: Appointment.cancelationReason
short:
  v: The coded reason for the appointment being cancelled
definition:
  v: The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.cancelationReason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: cancelation-reason
  strength:
    v: example
  value set:
    v: http://hl7.org/fhir/ValueSet/appointment-cancellation-reason|4.0.1
    l: http://hl7.org/fhir/ValueSet/appointment-cancellation-reason
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.serviceCategory
path:
  v: Appointment.serviceCategory
short:
  v: A broad categorization of the service that is to be performed during this appointment
definition:
  v: A broad categorization of the service that is to be performed during this appointment.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.serviceCategory
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: service-category
  strength:
    v: example
  value set:
    v: http://hl7.org/fhir/ValueSet/service-category|4.0.1
    l: http://hl7.org/fhir/ValueSet/service-category
mapping:
  identity:
    v: rim
  map:
    v: n/a, might be inferred from the ServiceDeliveryLocation
mapping:
  identity:
    v: ical
  map:
    v: CATEGORIES

id:
  v: Appointment.serviceType
path:
  v: Appointment.serviceType
slicing:
  discriminator:
    type:
      v: value
    path:
      v: coding.code
  rules:
    v: open
short:
  v: The specific service that is to be performed during this appointment
definition:
  v: The specific service that is to be performed during this appointment.
comment:
  v: For a provider to provider appointment the code "FOLLOWUP" may be appropriate, as this is expected to be discussing some patient that was seen in the past.
min:
  v: 1
max:
  v: *
base:
  path:
    v: Appointment.serviceType
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: service-type
  strength:
    v: example
  value set:
    v: http://hl7.org/fhir/ValueSet/service-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/service-type
mapping:
  identity:
    v: workflow
  map:
    v: Request.code
mapping:
  identity:
    v: rim
  map:
    v: n/a, might be inferred from the ServiceDeliveryLocation

id:
  v: Appointment.serviceType:appointmentType
path:
  v: Appointment.serviceType
slice name:
  v: appointmentType
short:
  v: The specific service that is to be performed during this appointment
definition:
  v: The specific service that is to be performed during this appointment.
comment:
  v: For a provider to provider appointment the code "FOLLOWUP" may be appropriate, as this is expected to be discussing some patient that was seen in the past.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Appointment.serviceType
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: service-type
  strength:
    v: example
  value set:
    v: http://hl7.org/fhir/ValueSet/service-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/service-type
mapping:
  identity:
    v: workflow
  map:
    v: Request.code
mapping:
  identity:
    v: rim
  map:
    v: n/a, might be inferred from the ServiceDeliveryLocation

id:
  v: Appointment.serviceType:appointmentType.id
path:
  v: Appointment.serviceType.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.serviceType:appointmentType.extension
path:
  v: Appointment.serviceType.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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:
  v: 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:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.serviceType:appointmentType.coding
path:
  v: Appointment.serviceType.coding
short:
  v: Code defined by a terminology system
definition:
  v: A reference to a code defined by a terminology system.
comment:
  v: Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
requirements:
  v: Allows for alternative encodings within a code system, and translations to other code systems.
min:
  v: 0
max:
  v: *
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/appointment-servicetype
    l: appointment-servicetype
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: Appointment.serviceType:appointmentType.coding.id
path:
  v: Appointment.serviceType.coding.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.serviceType:appointmentType.coding.extension
path:
  v: Appointment.serviceType.coding.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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:
  v: 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:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.serviceType:appointmentType.coding.system
path:
  v: Appointment.serviceType.coding.system
short:
  v: Identity of the terminology system
definition:
  v: The identification of the code system that defines the meaning of the symbol in the code.
comment:
  v: The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.
requirements:
  v: Need to be unambiguous about the source of the definition of the symbol.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.3
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystem
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem

id:
  v: Appointment.serviceType:appointmentType.coding.version
path:
  v: Appointment.serviceType.coding.version
short:
  v: Version of the system - if relevant
definition:
  v: The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
comment:
  v: Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.version
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.7
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystemVersion
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion

id:
  v: Appointment.serviceType:appointmentType.coding.code
path:
  v: Appointment.serviceType.coding.code
short:
  v: Symbol in syntax defined by the system
definition:
  v: A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
requirements:
  v: Need to refer to a particular code in the system.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Coding.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
fixed: Code
  v: group
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code

id:
  v: Appointment.serviceType:appointmentType.coding.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: Appointment.serviceType.coding.display
short:
  v: Representation defined by the system
definition:
  v: A representation of the meaning of the code in the system, following the rules of the system.
requirements:
  v: Need to be able to carry a human-readable meaning of the code for readers that do not know the system.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.2 - but note this is not well followed
mapping:
  identity:
    v: rim
  map:
    v: CV.displayName
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName

id:
  v: Appointment.serviceType:appointmentType.coding.userSelected
path:
  v: Appointment.serviceType.coding.userSelected
short:
  v: If this coding was chosen directly by the user
definition:
  v: Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
comment:
  v: Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.
requirements:
  v: This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.userSelected
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: Sometimes implied by being first
mapping:
  identity:
    v: rim
  map:
    v: CD.codingRationale
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]

id:
  v: Appointment.serviceType:appointmentType.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: Appointment.serviceType.text
short:
  v: Plain text representation of the concept
definition:
  v: A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
comment:
  v: Very often the text is the same as a displayName of one of the codings.
requirements:
  v: The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CodeableConcept.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.9. But note many systems use C*E.2 for this
mapping:
  identity:
    v: rim
  map:
    v: ./originalText[mediaType/code="text/plain"]/data
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

id:
  v: Appointment.specialty
path:
  v: Appointment.specialty
short:
  v: The specialty of a practitioner that would be required to perform the service requested in this appointment
definition:
  v: The specialty of a practitioner that would be required to perform the service requested in this appointment.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.specialty
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: specialty
  strength:
    v: preferred
  value set:
    v: http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1
    l: http://hl7.org/fhir/ValueSet/c80-practice-codes
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .performer.AssignedPerson.code

id:
  v: Appointment.appointmentType
path:
  v: Appointment.appointmentType
short:
  v: The style of appointment or patient that has been booked in the slot (not service type)
definition:
  v: The style of appointment or patient that has been booked in the slot (not service type).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Appointment.appointmentType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/appointmenttype-codes
    l: appointmenttype-codes
mapping:
  identity:
    v: v2
  map:
    v: ARQ-7
mapping:
  identity:
    v: rim
  map:
    v: .code
mapping:
  identity:
    v: ical
  map:
    v: CLASSIFICATION

id:
  v: Appointment.reasonCode
path:
  v: Appointment.reasonCode
short:
  v: Coded reason this appointment is scheduled
definition:
  v: The coded reason that this appointment is being scheduled. This is more clinical than administrative.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.reasonCode
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/appointment-reason
    l: appointment-reason
mapping:
  identity:
    v: workflow
  map:
    v: Request.reasonCode
mapping:
  identity:
    v: v2
  map:
    v: AIS-3, SCH-7
mapping:
  identity:
    v: rim
  map:
    v: .reasonCode

id:
  v: Appointment.reasonReference
path:
  v: Appointment.reasonReference
short:
  v: Reason the appointment is to take place (resource)
definition:
  v: Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.reasonReference
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Condition|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Condition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Procedure
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Observation
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.reasonReference
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[@typeCode = 'RSON'].observation

id:
  v: Appointment.priority
path:
  v: Appointment.priority
short:
  v: Used to make informed decisions if needing to re-prioritize
definition:
  v: The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).
comment:
  v: Seeking implementer feedback on this property and how interoperable it is. Using an extension to record a CodeableConcept for named values may be tested at a future connectathon.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.priority
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: unsignedInt
    l: unsignedInt
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.priority
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: v2
  map:
    v: ARQ-12, SCH-11.6 / TQ1-9
mapping:
  identity:
    v: rim
  map:
    v: .priorityCode
mapping:
  identity:
    v: ical
  map:
    v: PRIORITY

id:
  v: Appointment.description
path:
  v: Appointment.description
short:
  v: Shown on a subject line in a meeting request, or appointment list
definition:
  v: The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: NTE-3
mapping:
  identity:
    v: rim
  map:
    v: .text
mapping:
  identity:
    v: ical
  map:
    v: SUMMARY

id:
  v: Appointment.supportingInformation
path:
  v: Appointment.supportingInformation
short:
  v: Additional information to support the appointment
definition:
  v: Additional information to support the appointment provided when making the appointment.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.supportingInformation
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare
    l: ehealth-episodeofcare
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careplan
    l: ehealth-careplan
  aggregation:
    v: referenced
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.supportingInfo
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[@typeCode = 'SPRT'].observation
mapping:
  identity:
    v: ical
  map:
    v: ATTACH

id:
  v: Appointment.start
path:
  v: Appointment.start
short:
  v: When appointment is to take place
definition:
  v: Date/Time that the appointment is to take place.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.start
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: instant
    l: instant
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.occurrence[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.init
mapping:
  identity:
    v: v2
  map:
    v: ARQ-11.1, SCH-11.4 / TQ1-7
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime.low
mapping:
  identity:
    v: ical
  map:
    v: DTSTART

id:
  v: Appointment.end
path:
  v: Appointment.end
short:
  v: When appointment is to conclude
definition:
  v: Date/Time that the appointment is to conclude.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.end
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: instant
    l: instant
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.occurrence[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.done[x]
mapping:
  identity:
    v: v2
  map:
    v: SCH-11.5 / TQ1-8/ calculated based on the start and the duration which is in ARQ-9
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime.high
mapping:
  identity:
    v: ical
  map:
    v: DTEND

id:
  v: Appointment.minutesDuration
path:
  v: Appointment.minutesDuration
short:
  v: Can be less than start/end (e.g. estimate)
definition:
  v: Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.minutesDuration
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: positiveInt
    l: positiveInt
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.occurrence[x]
mapping:
  identity:
    v: rim
  map:
    v: .activityTime[@xsi:type = ('SXPR_TS', 'PIVL_TS')].width
mapping:
  identity:
    v: ical
  map:
    v: DURATION (e.g. PT15M)

id:
  v: Appointment.slot
path:
  v: Appointment.slot
short:
  v: The slots that this appointment is filling
definition:
  v: The slots from the participants' schedules that will be filled by the appointment.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.slot
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Slot|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/Slot
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[@typeCode = 'REFR'].act[@classCode = 'ACT'][@moodCode = 'SLOT']

id:
  v: Appointment.created
path:
  v: Appointment.created
short:
  v: The date that this appointment was initially created
definition:
  v: The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.
comment:
  v: This property is required for many use cases where the age of an appointment is considered in processing workflows for scheduling and billing of appointments.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.created
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.authoredOn
mapping:
  identity:
    v: rim
  map:
    v: .author.time
mapping:
  identity:
    v: ical
  map:
    v: CREATED

id:
  v: Appointment.comment
path:
  v: Appointment.comment
short:
  v: Additional comments
definition:
  v: Additional comments about the appointment.
comment:
  v: Additional text to aid in facilitating the appointment. For instance, a comment might be, "patient should proceed immediately to infusion room upon arrival" Where this is a planned appointment and the start/end dates are not set then this field can be used to provide additional guidance on the details of the appointment request, including any restrictions on when to book it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.comment
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.note
mapping:
  identity:
    v: v2
  map:
    v: NTE-3
mapping:
  identity:
    v: rim
  map:
    v: .subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value
mapping:
  identity:
    v: ical
  map:
    v: DESCRIPTION (for internal use)

id:
  v: Appointment.patientInstruction
path:
  v: Appointment.patientInstruction
short:
  v: Detailed information and instructions for the patient
definition:
  v: While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.patientInstruction
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: NTE-3
mapping:
  identity:
    v: rim
  map:
    v: .subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value
mapping:
  identity:
    v: ical
  map:
    v: DESCRIPTION (for patient use)

id:
  v: Appointment.basedOn
path:
  v: Appointment.basedOn
short:
  v: The service request this appointment is allocated to assess
definition:
  v: The service request this appointment is allocated to assess (e.g. incoming referral or procedure request).
alias:
  v: incomingReferral
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.basedOn
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ServiceRequest|4.0.1
    l: http://hl7.org/fhir/StructureDefinition/ServiceRequest
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.basedOn
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[@typeCode = 'FLFS'].act[@classCode < 'ActCareProvisionRequestType'][@moodCode = 'RQO']

id:
  v: Appointment.participant
path:
  v: Appointment.participant
short:
  v: Participants involved in appointment
definition:
  v: List of participants involved in the appointment.
min:
  v: 1
max:
  v: *
base:
  path:
    v: Appointment.participant
  min:
    v: 1
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: app-1
  severity:
    v: error
  human:
    v: Either the type or actor on the participant SHALL be specified
  expression:
    v: type.exists() or actor.exists()
  xpath:
    v: (exists(f:type) or exists(f:actor))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Appointment
    l: Appointment
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.performer, Request.subject
mapping:
  identity:
    v: v2
  map:
    v: PID, AIP, AIG, AIL
mapping:
  identity:
    v: rim
  map:
    v: performer | reusableDevice | subject | location
mapping:
  identity:
    v: ical
  map:
    v: ATTENDEE component to be created

id:
  v: Appointment.participant.id
path:
  v: Appointment.participant.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.participant.extension
path:
  v: Appointment.participant.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 1
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.participant.extension:careteam
path:
  v: Appointment.participant.extension
slice name:
  v: careteam
short:
  v: Careteam
definition:
  v: Careteam
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-ext-careteam
    l: ehealth-ext-careteam
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.participant.extension:assigningCareteam
path:
  v: Appointment.participant.extension
slice name:
  v: assigningCareteam
short:
  v: Assigning careteam
definition:
  v: An Extension
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-assigning-careteam
    l: ehealth-assigning-careteam
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Appointment.participant.modifierExtension
path:
  v: Appointment.participant.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: 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:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Appointment.participant.type
path:
  v: Appointment.participant.type
short:
  v: Role of participant in the appointment
definition:
  v: Role of participant in the appointment.
comment:
  v: The role of the participant can be used to declare what the actor will be doing in the scope of this appointment. If the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning. This value SHALL be the same when creating an AppointmentResponse so that they can be matched, and subsequently update the Appointment.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.participant.type
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ParticipantType
  strength:
    v: extensible
  description:
    v: Role of participant in encounter.
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-participant-type|4.0.1
    l: http://hl7.org/fhir/ValueSet/encounter-participant-type
mapping:
  identity:
    v: v2
  map:
    v: AIP-4, AIG-4
mapping:
  identity:
    v: rim
  map:
    v: (performer | reusableDevice | subject | location).@typeCode
mapping:
  identity:
    v: ical
  map:
    v: n/a

id:
  v: Appointment.participant.actor
path:
  v: Appointment.participant.actor
short:
  v: Person, Location/HealthcareService or Device
definition:
  v: A Person, Location/HealthcareService or Device that is participating in the appointment.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.participant.actor
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    l: ehealth-patient
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    l: ehealth-practitioner
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
    l: ehealth-relatedperson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Location
    l: Location
  aggregation:
    v: referenced
  aggregation:
    v: contained
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: v2
  map:
    v: PID-3-Patient ID List | AIL-3 | AIG-3 | AIP-3
mapping:
  identity:
    v: rim
  map:
    v: performer.person | reusableDevice.manufacturedDevice | subject.patient | location.serviceDeliveryLocation
mapping:
  identity:
    v: ical
  map:
    v: ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource) where the participant type is not "information-only"

id:
  v: Appointment.participant.required
path:
  v: Appointment.participant.required
short:
  v: required | optional | information-only
definition:
  v: Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.participant.required
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ParticipantRequired
  strength:
    v: required
  description:
    v: Is the Participant required to attend the appointment.
  value set:
    v: http://hl7.org/fhir/ValueSet/participantrequired|4.0.1
    l: http://hl7.org/fhir/ValueSet/participantrequired
mapping:
  identity:
    v: rim
  map:
    v: (performer | reusableDevice | subject | location).@performInd
mapping:
  identity:
    v: ical
  map:
    v: ROLE=REQ-PARTICIPANT (roleparam)

id:
  v: Appointment.participant.status
path:
  v: Appointment.participant.status
short:
  v: accepted | declined | tentative | needs-action
definition:
  v: Participation status of the actor.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Appointment.participant.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ParticipationStatus
  strength:
    v: required
  description:
    v: The Participation status of an appointment.
  value set:
    v: http://hl7.org/fhir/ValueSet/participationstatus|4.0.1
    l: http://hl7.org/fhir/ValueSet/participationstatus
mapping:
  identity:
    v: v2
  map:
    v: AIP-12, AIG-14
mapping:
  identity:
    v: rim
  map:
    v: (performer | reusableDevice | subject | location).statusCode
mapping:
  identity:
    v: ical
  map:
    v: ATTENDEE;CN="John Doe";RSVP=TRUE:mailto:john@doe.com (rsvpparam | partstatparam)

id:
  v: Appointment.participant.period
path:
  v: Appointment.participant.period
short:
  v: Participation period of the actor
definition:
  v: Participation period of the actor.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Appointment.participant.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Appointment.requestedPeriod
path:
  v: Appointment.requestedPeriod
short:
  v: Potential date/time interval(s) requested to allocate the appointment within
definition:
  v: A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.
comment:
  v: This does not introduce a capacity for recurring appointments.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Appointment.requestedPeriod
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.occurrence[x]
mapping:
  identity:
    v: v2
  map:
    v: ARQ-11
mapping:
  identity:
    v: rim
  map:
    v: .activityTime[@xsi:type = ('SXPR_TS', 'PIVL_TS')]

element:
  id:
    v: Appointment
  path:
    v: Appointment
  constraint:
    key:
      v: responsible-1
    severity:
      v: error
    human:
      v: Ensuring that responsible entity is a participating party
    expression:
      v: (extension('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible').value.reference in participant.extension('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-ext-careteam').value.reference) or (extension('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible').value.reference in participant.actor.reference)
    source:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
      l: ehealth-group-appointment
  constraint:
    key:
      v: max-participants
    severity:
      v: warning
    human:
      v: Too many intended participants
    expression:
      v: extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-max-participants').exists() implies participant.actor.where(reference.startsWith('#').not()).count() <= extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-max-participants').value
    source:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
      l: ehealth-group-appointment
  constraint:
    key:
      v: min-participants
    severity:
      v: warning
    human:
      v: Too few intended participants
    expression:
      v: extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-min-participants').exists() implies participant.actor.where(reference.startsWith('#').not()).count() >= extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-min-participants').value
    source:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
      l: ehealth-group-appointment
element:
  id:
    v: Appointment.extension
  path:
    v: Appointment.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 1
element:
  id:
    v: Appointment.extension:responsible
  path:
    v: Appointment.extension
  slice name:
    v: responsible
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible
      l: ehealth-responsible
element:
  id:
    v: Appointment.extension:groupId
  path:
    v: Appointment.extension
  slice name:
    v: groupId
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-id
      l: ehealth-group-id
element:
  id:
    v: Appointment.extension:legalBasis
  path:
    v: Appointment.extension
  slice name:
    v: legalBasis
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-legalBasis
      l: ehealth-legalBasis
  constraint:
    key:
      v: governance-1
    severity:
      v: error
    human:
      v: When extension is used a Episode of Care MUST be referenced
    expression:
      v: %resource.supportingInformation.reference.contains('EpisodeOfCare/')
    source:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
      l: ehealth-group-appointment
  constraint:
    key:
      v: responsible-2
    severity:
      v: error
    human:
      v: Both performing organization and responsible organization must be populated when legal basis is used
    expression:
      v: %resource.extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performing-organization').exists() and %resource.extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible-organization').exists()
    source:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-appointment
      l: ehealth-group-appointment
element:
  id:
    v: Appointment.extension:releasableResource
  path:
    v: Appointment.extension
  slice name:
    v: releasableResource
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-releasableResource
      l: ehealth-releasableResource
element:
  id:
    v: Appointment.extension:responsibleOrganization
  path:
    v: Appointment.extension
  slice name:
    v: responsibleOrganization
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible-organization
      l: ehealth-responsible-organization
element:
  id:
    v: Appointment.extension:performer
  path:
    v: Appointment.extension
  slice name:
    v: performer
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
      l: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performer
      l: ehealth-performer
element:
  id:
    v: Appointment.extension:performingOrganization
  path:
    v: Appointment.extension
  slice name:
    v: performingOrganization
  min:
    v: 0
  max:
    v: 1

code:
  v: Extension
  l: Extension
profile:
  v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performing-organization
  l: ehealth-performing-organization

id:
  v: Appointment.extension:creator
path:
  v: Appointment.extension
slice name:
  v: creator
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-creator
    l: ehealth-creator

id:
  v: Appointment.extension:intendedAudience
path:
  v: Appointment.extension
slice name:
  v: intendedAudience
min:
  v: 0
max:
  v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-intendedAudience
    l: ehealth-intendedAudience

id:
  v: Appointment.extension:registrationDeadline
path:
  v: Appointment.extension
slice name:
  v: registrationDeadline
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-registration-deadline
    l: ehealth-registration-deadline

id:
  v: Appointment.serviceType
path:
  v: Appointment.serviceType
slicing:
  discriminator:
    type:
      v: value
    path:
      v: coding.code
  rules:
    v: open
min:
  v: 1

id:
  v: Appointment.serviceType:appointmentType
path:
  v: Appointment.serviceType
slice name:
  v: appointmentType
min:
  v: 1
max:
  v: 1

id:
  v: Appointment.serviceType:appointmentType.coding
path:
  v: Appointment.serviceType.coding
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/appointment-servicetype
    l: appointment-servicetype

id:
  v: Appointment.serviceType:appointmentType.coding.code
path:
  v: Appointment.serviceType.coding.code
min:
  v: 1
fixed: Code
  v: group

id:
  v: Appointment.appointmentType
path:
  v: Appointment.appointmentType
min:
  v: 1
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/appointmenttype-codes
    l: appointmenttype-codes

id:
  v: Appointment.reasonCode
path:
  v: Appointment.reasonCode
max:
  v: 1
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/appointment-reason
    l: appointment-reason

id:
  v: Appointment.supportingInformation
path:
  v: Appointment.supportingInformation
max:
  v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare
    l: ehealth-episodeofcare
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careplan
    l: ehealth-careplan
  aggregation:
    v: referenced

id:
  v: Appointment.participant.extension
path:
  v: Appointment.participant.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
min:
  v: 1

id:
  v: Appointment.participant.extension:careteam
path:
  v: Appointment.participant.extension
slice name:
  v: careteam
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-ext-careteam
    l: ehealth-ext-careteam

id:
  v: Appointment.participant.extension:assigningCareteam
path:
  v: Appointment.participant.extension
slice name:
  v: assigningCareteam
min:
  v: 1
max:
  v: 1
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-assigning-careteam
    l: ehealth-assigning-careteam

id:
  v: Appointment.participant.actor
path:
  v: Appointment.participant.actor
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    l: ehealth-patient
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    l: ehealth-practitioner
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
    l: ehealth-relatedperson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Location
    l: Location
  aggregation:
    v: referenced
  aggregation:
    v: contained