Medication IG DE
1.0.1 - STU1

Medication IG DE - Downloaded Version 1.0.1 See the Directory of published versions

## Data Type Profile: Timing dgMP

Official URL: http://ig.fhir.de/igs/medication/StructureDefinition/TimingDgMP | Version: 1.0.1
Active as of 2025-10-20 | 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:

- Use this DataType Profile: Dosage dgMP

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.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
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, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, 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
value | S Σ | 1..1 | decimal | Numerical value (with implicit precision)
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)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Timing.repeat.bounds[x]:boundsDuration.​code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std.
Timing.repeat.when | Base | required | Timing When dgMP | 📦1.0.1 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
TimingBoundsUnitMatchesCode | error | Timing.repeat | boundsDuration.unit muss zur UCUM boundsDuration.code passen (z. B. 'Woche(n)' nur mit code='wk'). | `bounds.ofType(Duration).exists().not() or ( ( bounds.ofType(Duration).code = 'd' implies ( bounds.ofType(Duration).unit = 'Tag(e)' or bounds.ofType(Duration).unit = 'Tag' or bounds.ofType(Duration).unit = 'Tage' ) ) and ( bounds.ofType(Duration).code = 'wk' implies ( bounds.ofType(Duration).unit = 'Woche(n)' or bounds.ofType(Duration).unit = 'Woche' or bounds.ofType(Duration).unit = 'Wochen' ) ) and ( bounds.ofType(Duration).code = 'mo' implies ( bounds.ofType(Duration).unit = 'Monat(e)' or bounds.ofType(Duration).unit = 'Monat' or bounds.ofType(Duration).unit = 'Monate' ) ) and ( bounds.ofType(Duration).code = 'a' implies ( bounds.ofType(Duration).unit = 'Jahr(e)' or bounds.ofType(Duration).unit = 'Jahr' or bounds.ofType(Duration).unit = 'Jahre' ) ) )`
TimingFrequencyCount | error | Timing.repeat | The 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)`
TimingIntervalOnlyOneFrequency | error | Timing.repeat | If 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 ) ) )`
TimingOnlyOneBounds | error | Timing.repeat | Dosages Timings must 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) ) ) ) )`
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | For 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()) )) ) ) ) )`
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosage 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()) ) ) ) )`
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOneType | error | Timing.repeat | Only 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()) ) )`
TimingOnlyOneWhen | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyWhenOrTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingPeriodUnit | error | Timing.repeat | If 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')`
TimingSingleDosageForTimeOfDay | error | Timing.repeat | Wenn nur timeOfDay verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
TimingSingleDosageForWhen | error | Timing.repeat | Wenn nur when verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units | `duration.empty() or durationUnit.exists()`
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units | `period.empty() or periodUnit.exists()`
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value | `duration.exists() implies duration >= 0`
tim-5 | error | Timing.repeat | period SHALL be a non-negative value | `period.exists() implies period >= 0`
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period | `periodMax.empty() or period.exists()`
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration | `durationMax.empty() or duration.exists()`
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count | `countMax.empty() or count.exists()`
tim-9 | error | Timing.repeat | If 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-10 | error | Timing.repeat | If there's a timeOfDay, there cannot be a when, or vice versa | `timeOfDay.empty() or when.empty()`

This structure is derived from TimingDE

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
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
value |  | 1..1 | decimal | Numerical value (with implicit precision)
comparator |  | 0..0 |  |
unit |  | 1..1 | string | Unit representation
system |  | 1..1 | uri | UCUM-Einheit für die Dauer
code |  | 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 |  |
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
Timing.repeat.bounds[x]:boundsDuration.​code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.when | Base | required | Timing When dgMP | 📦1.0.1 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
TimingFrequencyCount | error | Timing.repeat | The 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)`
TimingIntervalOnlyOneFrequency | error | Timing.repeat | If 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 ) ) )`
TimingOnlyOneBounds | error | Timing.repeat | Dosages Timings must 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) ) ) ) )`
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | For 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()) )) ) ) ) )`
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosage 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()) ) ) ) )`
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOneType | error | Timing.repeat | Only 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()) ) )`
TimingOnlyOneWhen | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyWhenOrTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingPeriodUnit | error | Timing.repeat | If 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')`

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
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
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, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit
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 | S Σ | 1..1 | decimal | Numerical value (with implicit precision)
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)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Timing.repeat.bounds[x]:boundsDuration.​code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std.
Timing.repeat.when | Base | required | Timing When dgMP | 📦1.0.1 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
TimingBoundsUnitMatchesCode | error | Timing.repeat | boundsDuration.unit muss zur UCUM boundsDuration.code passen (z. B. 'Woche(n)' nur mit code='wk'). | `bounds.ofType(Duration).exists().not() or ( ( bounds.ofType(Duration).code = 'd' implies ( bounds.ofType(Duration).unit = 'Tag(e)' or bounds.ofType(Duration).unit = 'Tag' or bounds.ofType(Duration).unit = 'Tage' ) ) and ( bounds.ofType(Duration).code = 'wk' implies ( bounds.ofType(Duration).unit = 'Woche(n)' or bounds.ofType(Duration).unit = 'Woche' or bounds.ofType(Duration).unit = 'Wochen' ) ) and ( bounds.ofType(Duration).code = 'mo' implies ( bounds.ofType(Duration).unit = 'Monat(e)' or bounds.ofType(Duration).unit = 'Monat' or bounds.ofType(Duration).unit = 'Monate' ) ) and ( bounds.ofType(Duration).code = 'a' implies ( bounds.ofType(Duration).unit = 'Jahr(e)' or bounds.ofType(Duration).unit = 'Jahr' or bounds.ofType(Duration).unit = 'Jahre' ) ) )`
TimingFrequencyCount | error | Timing.repeat | The 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)`
TimingIntervalOnlyOneFrequency | error | Timing.repeat | If 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 ) ) )`
TimingOnlyOneBounds | error | Timing.repeat | Dosages Timings must 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) ) ) ) )`
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | For 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()) )) ) ) ) )`
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosage 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()) ) ) ) )`
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOneType | error | Timing.repeat | Only 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()) ) )`
TimingOnlyOneWhen | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyWhenOrTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingPeriodUnit | error | Timing.repeat | If 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')`
TimingSingleDosageForTimeOfDay | error | Timing.repeat | Wenn nur timeOfDay verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
TimingSingleDosageForWhen | error | Timing.repeat | Wenn nur when verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units | `duration.empty() or durationUnit.exists()`
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units | `period.empty() or periodUnit.exists()`
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value | `duration.exists() implies duration >= 0`
tim-5 | error | Timing.repeat | period SHALL be a non-negative value | `period.exists() implies period >= 0`
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period | `periodMax.empty() or period.exists()`
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration | `durationMax.empty() or duration.exists()`
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count | `countMax.empty() or count.exists()`
tim-9 | error | Timing.repeat | If 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-10 | error | Timing.repeat | If 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(4 nested mandatory elements)
Prohibited: 11 elements

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
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, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, 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
value | S Σ | 1..1 | decimal | Numerical value (with implicit precision)
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)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Timing.repeat.bounds[x]:boundsDuration.​code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std.
Timing.repeat.when | Base | required | Timing When dgMP | 📦1.0.1 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
TimingBoundsUnitMatchesCode | error | Timing.repeat | boundsDuration.unit muss zur UCUM boundsDuration.code passen (z. B. 'Woche(n)' nur mit code='wk'). | `bounds.ofType(Duration).exists().not() or ( ( bounds.ofType(Duration).code = 'd' implies ( bounds.ofType(Duration).unit = 'Tag(e)' or bounds.ofType(Duration).unit = 'Tag' or bounds.ofType(Duration).unit = 'Tage' ) ) and ( bounds.ofType(Duration).code = 'wk' implies ( bounds.ofType(Duration).unit = 'Woche(n)' or bounds.ofType(Duration).unit = 'Woche' or bounds.ofType(Duration).unit = 'Wochen' ) ) and ( bounds.ofType(Duration).code = 'mo' implies ( bounds.ofType(Duration).unit = 'Monat(e)' or bounds.ofType(Duration).unit = 'Monat' or bounds.ofType(Duration).unit = 'Monate' ) ) and ( bounds.ofType(Duration).code = 'a' implies ( bounds.ofType(Duration).unit = 'Jahr(e)' or bounds.ofType(Duration).unit = 'Jahr' or bounds.ofType(Duration).unit = 'Jahre' ) ) )`
TimingFrequencyCount | error | Timing.repeat | The 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)`
TimingIntervalOnlyOneFrequency | error | Timing.repeat | If 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 ) ) )`
TimingOnlyOneBounds | error | Timing.repeat | Dosages Timings must 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) ) ) ) )`
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | For 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()) )) ) ) ) )`
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosage 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()) ) ) ) )`
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOneType | error | Timing.repeat | Only 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()) ) )`
TimingOnlyOneWhen | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyWhenOrTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingPeriodUnit | error | Timing.repeat | If 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')`
TimingSingleDosageForTimeOfDay | error | Timing.repeat | Wenn nur timeOfDay verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
TimingSingleDosageForWhen | error | Timing.repeat | Wenn nur when verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units | `duration.empty() or durationUnit.exists()`
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units | `period.empty() or periodUnit.exists()`
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value | `duration.exists() implies duration >= 0`
tim-5 | error | Timing.repeat | period SHALL be a non-negative value | `period.exists() implies period >= 0`
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period | `periodMax.empty() or period.exists()`
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration | `durationMax.empty() or duration.exists()`
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count | `countMax.empty() or count.exists()`
tim-9 | error | Timing.repeat | If 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-10 | error | Timing.repeat | If 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

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
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
value |  | 1..1 | decimal | Numerical value (with implicit precision)
comparator |  | 0..0 |  |
unit |  | 1..1 | string | Unit representation
system |  | 1..1 | uri | UCUM-Einheit für die Dauer
code |  | 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 |  |
Documentation for this format

#### Terminology Bindings (Differential)

Path | Status | Usage | ValueSet | Version | Source
Timing.repeat.bounds[x]:boundsDuration.​code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.when | Base | required | Timing When dgMP | 📦1.0.1 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
TimingFrequencyCount | error | Timing.repeat | The 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)`
TimingIntervalOnlyOneFrequency | error | Timing.repeat | If 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 ) ) )`
TimingOnlyOneBounds | error | Timing.repeat | Dosages Timings must 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) ) ) ) )`
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | For 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()) )) ) ) ) )`
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosage 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()) ) ) ) )`
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOneType | error | Timing.repeat | Only 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()) ) )`
TimingOnlyOneWhen | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyWhenOrTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingPeriodUnit | error | Timing.repeat | If 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

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
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
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, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit
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 | S Σ | 1..1 | decimal | Numerical value (with implicit precision)
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)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Timing.repeat.bounds[x]:boundsDuration.​code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.0.1 | This IG
Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std.
Timing.repeat.when | Base | required | Timing When dgMP | 📦1.0.1 | This IG

#### Constraints

Id | Grade | Path(s) | Description | Expression
TimingBoundsUnitMatchesCode | error | Timing.repeat | boundsDuration.unit muss zur UCUM boundsDuration.code passen (z. B. 'Woche(n)' nur mit code='wk'). | `bounds.ofType(Duration).exists().not() or ( ( bounds.ofType(Duration).code = 'd' implies ( bounds.ofType(Duration).unit = 'Tag(e)' or bounds.ofType(Duration).unit = 'Tag' or bounds.ofType(Duration).unit = 'Tage' ) ) and ( bounds.ofType(Duration).code = 'wk' implies ( bounds.ofType(Duration).unit = 'Woche(n)' or bounds.ofType(Duration).unit = 'Woche' or bounds.ofType(Duration).unit = 'Wochen' ) ) and ( bounds.ofType(Duration).code = 'mo' implies ( bounds.ofType(Duration).unit = 'Monat(e)' or bounds.ofType(Duration).unit = 'Monat' or bounds.ofType(Duration).unit = 'Monate' ) ) and ( bounds.ofType(Duration).code = 'a' implies ( bounds.ofType(Duration).unit = 'Jahr(e)' or bounds.ofType(Duration).unit = 'Jahr' or bounds.ofType(Duration).unit = 'Jahre' ) ) )`
TimingFrequencyCount | error | Timing.repeat | The 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)`
TimingIntervalOnlyOneFrequency | error | Timing.repeat | If 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 ) ) )`
TimingOnlyOneBounds | error | Timing.repeat | Dosages Timings must 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) ) ) ) )`
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | For 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()) )) ) ) ) )`
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosage 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()) ) ) ) )`
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyOneType | error | Timing.repeat | Only 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()) ) )`
TimingOnlyOneWhen | error | Timing.repeat | Dosages 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()) ) ) )`
TimingOnlyWhenOrTimeOfDay | error | Timing.repeat | Dosages 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()) ) ) )`
TimingPeriodUnit | error | Timing.repeat | If 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')`
TimingSingleDosageForTimeOfDay | error | Timing.repeat | Wenn nur timeOfDay verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.timeOfDay.exists() and timing.repeat.when.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
TimingSingleDosageForWhen | error | Timing.repeat | Wenn nur when verwendet wird und täglich dosiert wird, ist die Angabe in einem einzigen Dosage-Element zu modellieren. Mehrere Dosage-Elemente sind nur zulässig, wenn sich die Dosis (Wert) unterscheidet. | `( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ) implies ( ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).count() = 1 ) or ( ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).where( timing.repeat.dayOfWeek.empty() and timing.repeat.when.exists() and timing.repeat.timeOfDay.empty() and (timing.repeat.period.exists() and timing.repeat.period = 1) and (timing.repeat.periodUnit.exists() and timing.repeat.periodUnit = 'd') ).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1 ) ) )`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units | `duration.empty() or durationUnit.exists()`
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units | `period.empty() or periodUnit.exists()`
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value | `duration.exists() implies duration >= 0`
tim-5 | error | Timing.repeat | period SHALL be a non-negative value | `period.exists() implies period >= 0`
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period | `periodMax.empty() or period.exists()`
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration | `durationMax.empty() or duration.exists()`
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count | `countMax.empty() or count.exists()`
tim-9 | error | Timing.repeat | If 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-10 | error | Timing.repeat | If 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(4 nested mandatory elements)
Prohibited: 11 elements

Other representations of profile: CSV, Excel, Schematron