description: null package_name: dk.ehealth.sundhed.fhir.ig.core derivation: constraint name: ehealth-appointment type: Appointment elements: extension: index: 0 slicing: rules: open ordered: false discriminator: - {path: url, type: value} min: 1 slices: responsible: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible', index: 1} min: 1 max: 1 groupId: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-id', index: 2} min: 0 max: 1 legalBasis: match: {url: null} schema: type: Extension constraint: governance-1: {human: When extension is used a Episode of Care MUST be referenced, source: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-appointment', severity: error, expression: '%resource.supportingInformation.reference.contains(''EpisodeOfCare/'')'} responsible-2: {human: Both performing organization and responsible organization must be populated when legal basis is used, source: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-appointment', severity: error, expression: '%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()'} url: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-legalBasis index: 3 min: 0 max: 1 releasableResource: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-releasableResource', index: 4} min: 0 max: 1 responsibleOrganization: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible-organization', index: 5} min: 0 max: 1 performer: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performer', index: 6} min: 0 max: 1 performingOrganization: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performing-organization', index: 7} min: 0 max: 1 serviceType: index: 8 slicing: rules: open discriminator: - {path: coding.code, type: value} min: 1 slices: appointmentType: match: coding: {code: regular} schema: _required: true index: 9 elements: coding: binding: {strength: required, valueSet: 'http://ehealth.sundhed.dk/vs/appointment-servicetype'} index: 10 elements: code: pattern: {type: Code, value: regular} index: 11 required: [code] appointmentType: binding: {strength: required, valueSet: 'http://ehealth.sundhed.dk/vs/appointmenttype-codes'} index: 12 reasonCode: binding: {strength: required, valueSet: 'http://ehealth.sundhed.dk/vs/appointment-reason'} index: 13 supportingInformation: type: Reference refers: ['http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careplan', 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare'] index: 14 participant: array: true min: 2 index: 15 extensions: careteam: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-ext-careteam', min: 0, max: 1, type: Extension, index: 17} elements: extension: index: 16 slicing: rules: open ordered: false discriminator: - {path: url, type: value} min: null slices: careteam: match: {url: null} schema: {type: Extension, url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-ext-careteam', index: 17} min: 0 max: 1 actor: type: Reference refers: ['http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient', 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner', 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson', 'http://hl7.org/fhir/StructureDefinition/Location'] index: 18 package_version: 3.5.0 extensions: responsible: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible', min: 1, max: 1, type: Extension, index: 1} groupId: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-group-id', min: 0, max: 1, type: Extension, index: 2} legalBasis: url: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-legalBasis min: 0 max: 1 type: Extension constraint: governance-1: {human: When extension is used a Episode of Care MUST be referenced, source: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-appointment', severity: error, expression: '%resource.supportingInformation.reference.contains(''EpisodeOfCare/'')'} responsible-2: {human: Both performing organization and responsible organization must be populated when legal basis is used, source: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-appointment', severity: error, expression: '%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()'} index: 3 releasableResource: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-releasableResource', min: 0, max: 1, type: Extension, index: 4} responsibleOrganization: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible-organization', min: 0, max: 1, type: Extension, index: 5} performer: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performer', min: 0, max: 1, type: Extension, index: 6} performingOrganization: {url: 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-performing-organization', min: 0, max: 1, type: Extension, index: 7} class: profile kind: resource url: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-appointment base: http://hl7.org/fhir/StructureDefinition/Appointment version: 3.5.0 required: [serviceType, extension, appointmentType]