Medication IG DE
1.0.0-ballot - STU1

This page is part of the Medication IG DE (v1.0.0-ballot: STU1 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

Data Type Profile: Timing dgMP

Official URL: http://ig.fhir.de/igs/medication/StructureDefinition/TimingDgMP Version: 1.0.0-ballot
Draft as of 2025-07-22 Computable Name: TimingDgMP

Beschreibt ein Ereignis, das mehrfach auftreten kann. Zeitpläne werden verwendet, um festzuhalten, wann etwas geplant, erwartet oder angefordert ist. Die häufigste Anwendung ist in Dosierungsanweisungen für Medikamente. Sie werden aber auch für die Planung verschiedener Versorgungsleistungen genutzt und können zur Dokumentation von bereits erfolgten oder laufenden Aktivitäten verwendet werden.

Usages:

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing 0..* TimingDE A timing schedule that specifies an event that may occur multiple times
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
... repeat SΣC 1..1 Element Wann das Ereignis stattfinden soll
Constraints: tim-9, tim-5, tim-6, tim-7, tim-8, tim-1, tim-10, tim-2, tim-4, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit
.... Slices for bounds[x] SΣ 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
Slice: Unordered, Closed by type:$this
..... bounds[x]:boundsDuration SΣ 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... comparator ?!Σ 0..1 code < | <= | >= | > - how to understand the value
Binding: QuantityComparator (required): How the Quantity should be understood and represented.
...... unit SΣ 1..1 string Unit representation
...... system SΣC 1..1 uri UCUM-Einheit für die Dauer
Fixed Value: http://unitsofmeasure.org
...... code SΣ 1..1 code Coded form of the unit
Binding: Duration UnitsOfTime dgMP ValueSet (required)
.... frequency SΣ 1..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... period SΣ 1..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodUnit SΣ 1..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Period UnitsOfTime dgMP ValueSet (required)
.... dayOfWeek SΣ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
.... timeOfDay SΣ 0..* time Tageszeit für die Aktion
.... when SΣ 0..* code Code für den Zeitraum des Auftretens
Binding: Timing When dgMP (required)

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Timing.repeat.bounds[x]:boundsDuration.comparatorrequiredQuantityComparator
http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1
From the FHIR Standard
Timing.repeat.bounds[x]:boundsDuration.coderequiredDurationUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP
From this IG
Timing.repeat.periodUnitrequiredPeriodUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP
From this IG
Timing.repeat.dayOfWeekrequiredDaysOfWeek
http://hl7.org/fhir/ValueSet/days-of-week|4.0.1
From the FHIR Standard
Timing.repeat.whenrequiredTimingWhenDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP
From this IG

Constraints

IdGradePath(s)DetailsRequirements
TimingFrequencyCounterrorTiming.repeatThe frequency of the timing needs to reflect the count of timeOfDay or when
: (when.exists() and dayOfWeek.empty() implies when.count() = frequency) and (when.exists() and dayOfWeek.exists() implies (when.count() * dayOfWeek.count()) = frequency) and (timeOfDay.exists() and dayOfWeek.empty() implies timeOfDay.count() = frequency) and (timeOfDay.exists() and dayOfWeek.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency) and (dayOfWeek.exists() and timeOfDay.empty() and when.empty() implies dayOfWeek.count() = frequency)
TimingIntervalOnlyOneFrequencyerrorTiming.repeatIf a dosage is defined by a pure interval, then only one dosage is allowed in the resource.
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosage.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosage.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same day across multiple dosage instances
: ( /* Detect DayOfWeek */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatFor schedules using only dayOfWeek with either timeOfDay or when, each (day + period of day/time) combination must be unique across all dosage instructions.
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosage Interval Timings must not state the same time of day across multiple dosage instances
: /* Detect Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) and (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: /* DayOfWeek */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) )
TimingOnlyWhenOrTimeOfDayerrorTiming.repeatDosages Timings must not state a time of day and period of day across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and (timing.repeat.when.exists() or timing.repeat.timeOfDay.exists()) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.exists() xor %resource.dosageInstruction.timing.repeat.timeOfDay.exists()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.exists() xor %resource.dosage.timing.repeat.timeOfDay.exists()) ) ) )
TimingPeriodUniterrorTiming.repeatIf weekdays are given the periodUnit must be week, otherwise day
: (dayOfWeek.exists() implies periodUnit = 'wk') and ((dayOfWeek.empty() and (when.exists() or timeOfDay.exists())) implies periodUnit = 'd')
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

This structure is derived from TimingDE

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing TimingDE
... event 0..0
... repeat C 1..1 Element Wann das Ereignis stattfinden soll
Constraints: TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit
.... bounds[x] 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
.... Slices for bounds[x] Content/Rules for all slices
..... bounds[x]:boundsDuration 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... unit S 1..1 string Unit representation
...... system S 1..1 uri UCUM-Einheit für die Dauer
...... code S 1..1 code Coded form of the unit
Binding: Duration UnitsOfTime dgMP ValueSet (required)
.... count 0..0
.... countMax 0..0
.... duration 0..0
.... durationMax 0..0
.... durationUnit 0..0
.... frequency 1..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... frequencyMax 0..0
.... period 1..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodMax 0..0
.... periodUnit 1..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Period UnitsOfTime dgMP ValueSet (required)
.... when 0..* code Code für den Zeitraum des Auftretens
Binding: Timing When dgMP (required)
.... offset 0..0
... code 0..0

doco Documentation for this format

Terminology Bindings (Differential)

PathConformanceValueSetURI
Timing.repeat.bounds[x]:boundsDuration.coderequiredDurationUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP
From this IG
Timing.repeat.periodUnitrequiredPeriodUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP
From this IG
Timing.repeat.whenrequiredTimingWhenDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP
From this IG

Constraints

IdGradePath(s)DetailsRequirements
TimingFrequencyCounterrorTiming.repeatThe frequency of the timing needs to reflect the count of timeOfDay or when
: (when.exists() and dayOfWeek.empty() implies when.count() = frequency) and (when.exists() and dayOfWeek.exists() implies (when.count() * dayOfWeek.count()) = frequency) and (timeOfDay.exists() and dayOfWeek.empty() implies timeOfDay.count() = frequency) and (timeOfDay.exists() and dayOfWeek.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency) and (dayOfWeek.exists() and timeOfDay.empty() and when.empty() implies dayOfWeek.count() = frequency)
TimingIntervalOnlyOneFrequencyerrorTiming.repeatIf a dosage is defined by a pure interval, then only one dosage is allowed in the resource.
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosage.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosage.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same day across multiple dosage instances
: ( /* Detect DayOfWeek */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatFor schedules using only dayOfWeek with either timeOfDay or when, each (day + period of day/time) combination must be unique across all dosage instructions.
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosage Interval Timings must not state the same time of day across multiple dosage instances
: /* Detect Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) and (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: /* DayOfWeek */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) )
TimingOnlyWhenOrTimeOfDayerrorTiming.repeatDosages Timings must not state a time of day and period of day across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and (timing.repeat.when.exists() or timing.repeat.timeOfDay.exists()) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.exists() xor %resource.dosageInstruction.timing.repeat.timeOfDay.exists()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.exists() xor %resource.dosage.timing.repeat.timeOfDay.exists()) ) ) )
TimingPeriodUniterrorTiming.repeatIf weekdays are given the periodUnit must be week, otherwise day
: (dayOfWeek.exists() implies periodUnit = 'wk') and ((dayOfWeek.empty() and (when.exists() or timeOfDay.exists())) implies periodUnit = 'd')
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing 0..* TimingDE A timing schedule that specifies an event that may occur multiple times
... id 0..1 string Unique id for inter-element referencing
... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... id 0..1 string Unique id for inter-element referencing
.... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... Slices for bounds[x] SΣ 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
Slice: Unordered, Closed by type:$this
..... bounds[x]:boundsDuration SΣ 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... id 0..1 string Unique id for inter-element referencing
...... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... value Σ 0..1 decimal Numerical value (with implicit precision)
...... comparator ?!Σ 0..1 code < | <= | >= | > - how to understand the value
Binding: QuantityComparator (required): How the Quantity should be understood and represented.
...... unit SΣ 1..1 string Unit representation
...... system SΣC 1..1 uri UCUM-Einheit für die Dauer
Fixed Value: http://unitsofmeasure.org
...... code SΣ 1..1 code Coded form of the unit
Binding: Duration UnitsOfTime dgMP ValueSet (required)
.... frequency SΣ 1..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... period SΣ 1..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodUnit SΣ 1..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Period UnitsOfTime dgMP ValueSet (required)
.... dayOfWeek SΣ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
.... timeOfDay SΣ 0..* time Tageszeit für die Aktion
.... when SΣ 0..* code Code für den Zeitraum des Auftretens
Binding: Timing When dgMP (required)

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Timing.repeat.bounds[x]:boundsDuration.comparatorrequiredQuantityComparator
http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1
From the FHIR Standard
Timing.repeat.bounds[x]:boundsDuration.coderequiredDurationUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP
From this IG
Timing.repeat.periodUnitrequiredPeriodUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP
From this IG
Timing.repeat.dayOfWeekrequiredDaysOfWeek
http://hl7.org/fhir/ValueSet/days-of-week|4.0.1
From the FHIR Standard
Timing.repeat.whenrequiredTimingWhenDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP
From this IG

Constraints

IdGradePath(s)DetailsRequirements
TimingFrequencyCounterrorTiming.repeatThe frequency of the timing needs to reflect the count of timeOfDay or when
: (when.exists() and dayOfWeek.empty() implies when.count() = frequency) and (when.exists() and dayOfWeek.exists() implies (when.count() * dayOfWeek.count()) = frequency) and (timeOfDay.exists() and dayOfWeek.empty() implies timeOfDay.count() = frequency) and (timeOfDay.exists() and dayOfWeek.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency) and (dayOfWeek.exists() and timeOfDay.empty() and when.empty() implies dayOfWeek.count() = frequency)
TimingIntervalOnlyOneFrequencyerrorTiming.repeatIf a dosage is defined by a pure interval, then only one dosage is allowed in the resource.
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosage.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosage.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same day across multiple dosage instances
: ( /* Detect DayOfWeek */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatFor schedules using only dayOfWeek with either timeOfDay or when, each (day + period of day/time) combination must be unique across all dosage instructions.
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosage Interval Timings must not state the same time of day across multiple dosage instances
: /* Detect Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) and (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: /* DayOfWeek */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) )
TimingOnlyWhenOrTimeOfDayerrorTiming.repeatDosages Timings must not state a time of day and period of day across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and (timing.repeat.when.exists() or timing.repeat.timeOfDay.exists()) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.exists() xor %resource.dosageInstruction.timing.repeat.timeOfDay.exists()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.exists() xor %resource.dosage.timing.repeat.timeOfDay.exists()) ) ) )
TimingPeriodUniterrorTiming.repeatIf weekdays are given the periodUnit must be week, otherwise day
: (dayOfWeek.exists() implies periodUnit = 'wk') and ((dayOfWeek.empty() and (when.exists() or timeOfDay.exists())) implies periodUnit = 'd')
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

This structure is derived from TimingDE

Summary

Mandatory: 4 elements(3 nested mandatory elements)
Must-Support: 3 elements
Prohibited: 10 elements

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing 0..* TimingDE A timing schedule that specifies an event that may occur multiple times
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
... repeat SΣC 1..1 Element Wann das Ereignis stattfinden soll
Constraints: tim-9, tim-5, tim-6, tim-7, tim-8, tim-1, tim-10, tim-2, tim-4, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit
.... Slices for bounds[x] SΣ 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
Slice: Unordered, Closed by type:$this
..... bounds[x]:boundsDuration SΣ 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... comparator ?!Σ 0..1 code < | <= | >= | > - how to understand the value
Binding: QuantityComparator (required): How the Quantity should be understood and represented.
...... unit SΣ 1..1 string Unit representation
...... system SΣC 1..1 uri UCUM-Einheit für die Dauer
Fixed Value: http://unitsofmeasure.org
...... code SΣ 1..1 code Coded form of the unit
Binding: Duration UnitsOfTime dgMP ValueSet (required)
.... frequency SΣ 1..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... period SΣ 1..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodUnit SΣ 1..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Period UnitsOfTime dgMP ValueSet (required)
.... dayOfWeek SΣ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
.... timeOfDay SΣ 0..* time Tageszeit für die Aktion
.... when SΣ 0..* code Code für den Zeitraum des Auftretens
Binding: Timing When dgMP (required)

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Timing.repeat.bounds[x]:boundsDuration.comparatorrequiredQuantityComparator
http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1
From the FHIR Standard
Timing.repeat.bounds[x]:boundsDuration.coderequiredDurationUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP
From this IG
Timing.repeat.periodUnitrequiredPeriodUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP
From this IG
Timing.repeat.dayOfWeekrequiredDaysOfWeek
http://hl7.org/fhir/ValueSet/days-of-week|4.0.1
From the FHIR Standard
Timing.repeat.whenrequiredTimingWhenDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP
From this IG

Constraints

IdGradePath(s)DetailsRequirements
TimingFrequencyCounterrorTiming.repeatThe frequency of the timing needs to reflect the count of timeOfDay or when
: (when.exists() and dayOfWeek.empty() implies when.count() = frequency) and (when.exists() and dayOfWeek.exists() implies (when.count() * dayOfWeek.count()) = frequency) and (timeOfDay.exists() and dayOfWeek.empty() implies timeOfDay.count() = frequency) and (timeOfDay.exists() and dayOfWeek.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency) and (dayOfWeek.exists() and timeOfDay.empty() and when.empty() implies dayOfWeek.count() = frequency)
TimingIntervalOnlyOneFrequencyerrorTiming.repeatIf a dosage is defined by a pure interval, then only one dosage is allowed in the resource.
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosage.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosage.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same day across multiple dosage instances
: ( /* Detect DayOfWeek */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatFor schedules using only dayOfWeek with either timeOfDay or when, each (day + period of day/time) combination must be unique across all dosage instructions.
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosage Interval Timings must not state the same time of day across multiple dosage instances
: /* Detect Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) and (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: /* DayOfWeek */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) )
TimingOnlyWhenOrTimeOfDayerrorTiming.repeatDosages Timings must not state a time of day and period of day across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and (timing.repeat.when.exists() or timing.repeat.timeOfDay.exists()) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.exists() xor %resource.dosageInstruction.timing.repeat.timeOfDay.exists()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.exists() xor %resource.dosage.timing.repeat.timeOfDay.exists()) ) ) )
TimingPeriodUniterrorTiming.repeatIf weekdays are given the periodUnit must be week, otherwise day
: (dayOfWeek.exists() implies periodUnit = 'wk') and ((dayOfWeek.empty() and (when.exists() or timeOfDay.exists())) implies periodUnit = 'd')
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

Differential View

This structure is derived from TimingDE

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing TimingDE
... event 0..0
... repeat C 1..1 Element Wann das Ereignis stattfinden soll
Constraints: TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit
.... bounds[x] 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
.... Slices for bounds[x] Content/Rules for all slices
..... bounds[x]:boundsDuration 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... unit S 1..1 string Unit representation
...... system S 1..1 uri UCUM-Einheit für die Dauer
...... code S 1..1 code Coded form of the unit
Binding: Duration UnitsOfTime dgMP ValueSet (required)
.... count 0..0
.... countMax 0..0
.... duration 0..0
.... durationMax 0..0
.... durationUnit 0..0
.... frequency 1..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... frequencyMax 0..0
.... period 1..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodMax 0..0
.... periodUnit 1..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Period UnitsOfTime dgMP ValueSet (required)
.... when 0..* code Code für den Zeitraum des Auftretens
Binding: Timing When dgMP (required)
.... offset 0..0
... code 0..0

doco Documentation for this format

Terminology Bindings (Differential)

PathConformanceValueSetURI
Timing.repeat.bounds[x]:boundsDuration.coderequiredDurationUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP
From this IG
Timing.repeat.periodUnitrequiredPeriodUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP
From this IG
Timing.repeat.whenrequiredTimingWhenDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP
From this IG

Constraints

IdGradePath(s)DetailsRequirements
TimingFrequencyCounterrorTiming.repeatThe frequency of the timing needs to reflect the count of timeOfDay or when
: (when.exists() and dayOfWeek.empty() implies when.count() = frequency) and (when.exists() and dayOfWeek.exists() implies (when.count() * dayOfWeek.count()) = frequency) and (timeOfDay.exists() and dayOfWeek.empty() implies timeOfDay.count() = frequency) and (timeOfDay.exists() and dayOfWeek.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency) and (dayOfWeek.exists() and timeOfDay.empty() and when.empty() implies dayOfWeek.count() = frequency)
TimingIntervalOnlyOneFrequencyerrorTiming.repeatIf a dosage is defined by a pure interval, then only one dosage is allowed in the resource.
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosage.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosage.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same day across multiple dosage instances
: ( /* Detect DayOfWeek */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatFor schedules using only dayOfWeek with either timeOfDay or when, each (day + period of day/time) combination must be unique across all dosage instructions.
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosage Interval Timings must not state the same time of day across multiple dosage instances
: /* Detect Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) and (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: /* DayOfWeek */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) )
TimingOnlyWhenOrTimeOfDayerrorTiming.repeatDosages Timings must not state a time of day and period of day across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and (timing.repeat.when.exists() or timing.repeat.timeOfDay.exists()) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.exists() xor %resource.dosageInstruction.timing.repeat.timeOfDay.exists()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.exists() xor %resource.dosage.timing.repeat.timeOfDay.exists()) ) ) )
TimingPeriodUniterrorTiming.repeatIf weekdays are given the periodUnit must be week, otherwise day
: (dayOfWeek.exists() implies periodUnit = 'wk') and ((dayOfWeek.empty() and (when.exists() or timeOfDay.exists())) implies periodUnit = 'd')

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing 0..* TimingDE A timing schedule that specifies an event that may occur multiple times
... id 0..1 string Unique id for inter-element referencing
... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... id 0..1 string Unique id for inter-element referencing
.... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... Slices for bounds[x] SΣ 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
Slice: Unordered, Closed by type:$this
..... bounds[x]:boundsDuration SΣ 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... id 0..1 string Unique id for inter-element referencing
...... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... value Σ 0..1 decimal Numerical value (with implicit precision)
...... comparator ?!Σ 0..1 code < | <= | >= | > - how to understand the value
Binding: QuantityComparator (required): How the Quantity should be understood and represented.
...... unit SΣ 1..1 string Unit representation
...... system SΣC 1..1 uri UCUM-Einheit für die Dauer
Fixed Value: http://unitsofmeasure.org
...... code SΣ 1..1 code Coded form of the unit
Binding: Duration UnitsOfTime dgMP ValueSet (required)
.... frequency SΣ 1..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... period SΣ 1..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodUnit SΣ 1..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Period UnitsOfTime dgMP ValueSet (required)
.... dayOfWeek SΣ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
.... timeOfDay SΣ 0..* time Tageszeit für die Aktion
.... when SΣ 0..* code Code für den Zeitraum des Auftretens
Binding: Timing When dgMP (required)

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Timing.repeat.bounds[x]:boundsDuration.comparatorrequiredQuantityComparator
http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1
From the FHIR Standard
Timing.repeat.bounds[x]:boundsDuration.coderequiredDurationUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP
From this IG
Timing.repeat.periodUnitrequiredPeriodUnitsOfTimeDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP
From this IG
Timing.repeat.dayOfWeekrequiredDaysOfWeek
http://hl7.org/fhir/ValueSet/days-of-week|4.0.1
From the FHIR Standard
Timing.repeat.whenrequiredTimingWhenDgMPVS
http://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP
From this IG

Constraints

IdGradePath(s)DetailsRequirements
TimingFrequencyCounterrorTiming.repeatThe frequency of the timing needs to reflect the count of timeOfDay or when
: (when.exists() and dayOfWeek.empty() implies when.count() = frequency) and (when.exists() and dayOfWeek.exists() implies (when.count() * dayOfWeek.count()) = frequency) and (timeOfDay.exists() and dayOfWeek.empty() implies timeOfDay.count() = frequency) and (timeOfDay.exists() and dayOfWeek.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency) and (dayOfWeek.exists() and timeOfDay.empty() and when.empty() implies dayOfWeek.count() = frequency)
TimingIntervalOnlyOneFrequencyerrorTiming.repeatIf a dosage is defined by a pure interval, then only one dosage is allowed in the resource.
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.bounds.ofType(Duration).exists().not() or ( (%resource.dosage.timing.repeat.bounds.ofType(Duration).value.distinct().count() = 1) and (%resource.dosage.timing.repeat.bounds.ofType(Duration).code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same day across multiple dosage instances
: ( /* Detect DayOfWeek */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatFor schedules using only dayOfWeek with either timeOfDay or when, each (day + period of day/time) combination must be unique across all dosage instructions.
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosage Interval Timings must not state the same time of day across multiple dosage instances
: /* Detect Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) and (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: /* DayOfWeek */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.exists() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists()) and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ ( %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.distinct().count() = %resource.dosageInstruction.timing.repeat.when.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) )
TimingOnlyWhenOrTimeOfDayerrorTiming.repeatDosages Timings must not state a time of day and period of day across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and (timing.repeat.when.exists() or timing.repeat.timeOfDay.exists()) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.when.exists() xor %resource.dosageInstruction.timing.repeat.timeOfDay.exists()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.when.exists() xor %resource.dosage.timing.repeat.timeOfDay.exists()) ) ) )
TimingPeriodUniterrorTiming.repeatIf weekdays are given the periodUnit must be week, otherwise day
: (dayOfWeek.exists() implies periodUnit = 'wk') and ((dayOfWeek.empty() and (when.exists() or timeOfDay.exists())) implies periodUnit = 'd')
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

This structure is derived from TimingDE

Summary

Mandatory: 4 elements(3 nested mandatory elements)
Must-Support: 3 elements
Prohibited: 10 elements

 

Other representations of profile: CSV, Excel, Schematron