Medication IG DE - Local Development build (v1.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Official URL: http://ig.fhir.de/igs/medication/StructureDefinition/TimingDgMP | Version: 1.1.0 | |||
| Active as of 2026-07-06 | 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.
Invariante: tim-9
Die Invariante tim-9 enthält einen
bekannten Fehler.
Dieser wurde in einigen Validatoren bereits behoben.
Sollte ein Validator ohne den entsprechenden Fix verwendet werden,
ist die tim-9-Definition aus FHIR R5 zu verwenden:
offset.empty() or (when.exists() and when.select($this in ('C' | 'CM' | 'CD' | 'CV')).allFalse())
Siehe auch die entsprechende Beschreibung in
FHIR R5 (Timing).
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-1, tim-2, tim-4, tim-5, tim-6, tim-7, tim-8, tim-9, tim-10, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit, TimingVarFreqOrPeriod, TimingVarFreqGtMin, TimingVarPeriodGtMin |
![]() ![]() ![]() |
SΣ | 0..1 | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this | |
![]() ![]() ![]() ![]() |
Duration | |||
![]() ![]() ![]() ![]() |
Period | |||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | decimal | Numerical value (with implicit precision) |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Duration UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Period | Start und Enddatum der Dosieranweisung ausgedrückt in Datum mit optional Uhrzeit. |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | Starting time with inclusive boundary |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | End time with inclusive boundary, if not ongoing |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Event occurs up to frequencyMax times per period |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Upper limit of period (3-4 hours) |
![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Period UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: Timing When dgMP (required) |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Timing.repeat.bounds[x]:boundsDuration.code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std. |
| Timing.repeat.when | Base | required | Timing When dgMP | 📦1.1.0 | This IG |
| 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() and frequency.exists() implies when.count() = frequency)
and
(when.exists() and dayOfWeek.exists() and frequency.exists() implies (when.count() * dayOfWeek.count()) = frequency)
and
(timeOfDay.exists() and dayOfWeek.empty() and frequency.exists() implies timeOfDay.count() = frequency)
and
(timeOfDay.exists() and dayOfWeek.exists() and frequency.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency)
and
(dayOfWeek.exists() and timeOfDay.empty() and when.empty() and frequency.exists() 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.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.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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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 use the same period and periodUnit across all dosage instances, and each timeOfDay or when value must be unique across 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.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.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 (with optional Interval), DayOfWeek (with optional Time/4-Schema), Interval only |
/* DayOfWeek only (without when/timeOfDay) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
timing.repeat.when.empty() and
timing.repeat.timeOfDay.empty()
) or
/* Interval only (frequency + period + periodUnit, no when/timeOfDay/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.when.empty() and
timing.repeat.timeOfDay.empty() and
timing.repeat.dayOfWeek.empty()
) or
/* DayOfWeek and Time/4-Schema (with optional frequency/period/periodUnit) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
(
(timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or
(timing.repeat.when.exists() and timing.repeat.timeOfDay.empty())
)
) or
/* When or TimeOfDay only (no dayOfWeek; frequency/period/periodUnit optional) */
(
%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()) 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 when-based schema */
%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()
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.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() and periodUnit.exists() implies periodUnit = 'wk')
and
((dayOfWeek.empty() and (when.exists() or timeOfDay.exists()) and periodUnit.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()
)
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()
).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()
).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()
)
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()
).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()
).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1
)
)
)
|
| TimingVarFreqGtMin | error | Timing.repeat | Bei variabler Frequenz muss die maximale Frequenz größer als die minimale Frequenz sein. |
frequencyMax.empty() or frequency.empty() or frequency.value < frequencyMax.value
|
| TimingVarFreqOrPeriod | warning | Timing.repeat | Bei gleichzeitiger Angabe von Frequenz und Periode sollte entweder nur die Frequenz einschließlich frequencyMax oder nur die Periode einschließlich periodMax größer als 1 sein. |
frequency.exists() and period.exists() implies
(
(
((frequency.exists() and frequency > 1) or (frequencyMax.exists() and frequencyMax > 1))
implies
(
period = 1 and
(periodMax.empty() or periodMax = 1)
)
)
and
(
((period.exists() and period > 1) or (periodMax.exists() and periodMax > 1))
implies
(
frequency = 1 and
(frequencyMax.empty() or frequencyMax = 1)
)
)
)
|
| TimingVarPeriodGtMin | error | Timing.repeat | Bei variabler Periode muss die maximale Periode größer als die minimale Periode sein. |
periodMax.empty() or period.empty() or period < periodMax
|
| 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: ![]() ![]() |
|---|---|---|---|---|
![]() |
TimingDE | |||
![]() ![]() |
0..0 | When the event occurs | ||
![]() ![]() |
C | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit, TimingVarFreqOrPeriod, TimingVarFreqGtMin, TimingVarPeriodGtMin |
![]() ![]() ![]() |
0..1 | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen | ||
![]() ![]() ![]() ![]() |
Duration | |||
![]() ![]() ![]() ![]() |
Period | |||
![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() |
0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten | |
![]() ![]() ![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |
![]() ![]() ![]() ![]() ![]() |
0..0 | < | <= | >= | > - how to understand the value | ||
![]() ![]() ![]() ![]() ![]() |
1..1 | string | Unit representation | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | UCUM-Einheit für die Dauer | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Coded form of the unit Binding: Duration UnitsOfTime dgMP ValueSet (required) | |
![]() ![]() ![]() |
0..0 | Number of times to repeat | ||
![]() ![]() ![]() |
0..0 | Maximum number of times to repeat | ||
![]() ![]() ![]() |
0..0 | How long when it happens | ||
![]() ![]() ![]() |
0..0 | How long when it happens (Max) | ||
![]() ![]() ![]() |
0..0 | s | min | h | d | wk | mo | a - unit of time (UCUM) | ||
![]() ![]() ![]() |
0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Period UnitsOfTime dgMP ValueSet (required) | |
![]() ![]() ![]() |
0..* | code | Code für den Zeitraum des Auftretens Binding: Timing When dgMP (required) | |
![]() ![]() ![]() |
0..0 | Zeitversatz | ||
![]() ![]() |
0..0 | BID | TID | QID | AM | PM | QD | QOD | + | ||
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Timing.repeat.bounds[x]:boundsDuration.code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.when | Base | required | Timing When dgMP | 📦1.1.0 | This IG |
| 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() and frequency.exists() implies when.count() = frequency)
and
(when.exists() and dayOfWeek.exists() and frequency.exists() implies (when.count() * dayOfWeek.count()) = frequency)
and
(timeOfDay.exists() and dayOfWeek.empty() and frequency.exists() implies timeOfDay.count() = frequency)
and
(timeOfDay.exists() and dayOfWeek.exists() and frequency.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency)
and
(dayOfWeek.exists() and timeOfDay.empty() and when.empty() and frequency.exists() 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.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.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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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 use the same period and periodUnit across all dosage instances, and each timeOfDay or when value must be unique across 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.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.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 (with optional Interval), DayOfWeek (with optional Time/4-Schema), Interval only |
/* DayOfWeek only (without when/timeOfDay) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
timing.repeat.when.empty() and
timing.repeat.timeOfDay.empty()
) or
/* Interval only (frequency + period + periodUnit, no when/timeOfDay/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.when.empty() and
timing.repeat.timeOfDay.empty() and
timing.repeat.dayOfWeek.empty()
) or
/* DayOfWeek and Time/4-Schema (with optional frequency/period/periodUnit) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
(
(timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or
(timing.repeat.when.exists() and timing.repeat.timeOfDay.empty())
)
) or
/* When or TimeOfDay only (no dayOfWeek; frequency/period/periodUnit optional) */
(
%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()) 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 when-based schema */
%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()
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.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() and periodUnit.exists() implies periodUnit = 'wk')
and
((dayOfWeek.empty() and (when.exists() or timeOfDay.exists()) and periodUnit.exists()) implies periodUnit = 'd')
|
| TimingVarFreqGtMin | error | Timing.repeat | Bei variabler Frequenz muss die maximale Frequenz größer als die minimale Frequenz sein. |
frequencyMax.empty() or frequency.empty() or frequency.value < frequencyMax.value
|
| TimingVarFreqOrPeriod | warning | Timing.repeat | Bei gleichzeitiger Angabe von Frequenz und Periode sollte entweder nur die Frequenz einschließlich frequencyMax oder nur die Periode einschließlich periodMax größer als 1 sein. |
frequency.exists() and period.exists() implies
(
(
((frequency.exists() and frequency > 1) or (frequencyMax.exists() and frequencyMax > 1))
implies
(
period = 1 and
(periodMax.empty() or periodMax = 1)
)
)
and
(
((period.exists() and period > 1) or (periodMax.exists() and periodMax > 1))
implies
(
frequency = 1 and
(frequencyMax.empty() or frequencyMax = 1)
)
)
)
|
| TimingVarPeriodGtMin | error | Timing.repeat | Bei variabler Periode muss die maximale Periode größer als die minimale Periode sein. |
periodMax.empty() or period.empty() or period < periodMax
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-1, tim-2, tim-4, tim-5, tim-6, tim-7, tim-8, tim-9, tim-10, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit, TimingVarFreqOrPeriod, TimingVarFreqGtMin, TimingVarPeriodGtMin |
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() |
SΣ | 0..1 | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this | |
![]() ![]() ![]() ![]() |
Duration | |||
![]() ![]() ![]() ![]() |
Period | |||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | decimal | Numerical value (with implicit precision) |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Duration UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Period | Start und Enddatum der Dosieranweisung ausgedrückt in Datum mit optional Uhrzeit. |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | Starting time with inclusive boundary |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | End time with inclusive boundary, if not ongoing |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Event occurs up to frequencyMax times per period |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Upper limit of period (3-4 hours) |
![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Period UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: Timing When dgMP (required) |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Timing.repeat.bounds[x]:boundsDuration.code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std. |
| Timing.repeat.when | Base | required | Timing When dgMP | 📦1.1.0 | This IG |
| 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() and frequency.exists() implies when.count() = frequency)
and
(when.exists() and dayOfWeek.exists() and frequency.exists() implies (when.count() * dayOfWeek.count()) = frequency)
and
(timeOfDay.exists() and dayOfWeek.empty() and frequency.exists() implies timeOfDay.count() = frequency)
and
(timeOfDay.exists() and dayOfWeek.exists() and frequency.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency)
and
(dayOfWeek.exists() and timeOfDay.empty() and when.empty() and frequency.exists() 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.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.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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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 use the same period and periodUnit across all dosage instances, and each timeOfDay or when value must be unique across 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.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.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 (with optional Interval), DayOfWeek (with optional Time/4-Schema), Interval only |
/* DayOfWeek only (without when/timeOfDay) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
timing.repeat.when.empty() and
timing.repeat.timeOfDay.empty()
) or
/* Interval only (frequency + period + periodUnit, no when/timeOfDay/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.when.empty() and
timing.repeat.timeOfDay.empty() and
timing.repeat.dayOfWeek.empty()
) or
/* DayOfWeek and Time/4-Schema (with optional frequency/period/periodUnit) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
(
(timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or
(timing.repeat.when.exists() and timing.repeat.timeOfDay.empty())
)
) or
/* When or TimeOfDay only (no dayOfWeek; frequency/period/periodUnit optional) */
(
%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()) 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 when-based schema */
%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()
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.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() and periodUnit.exists() implies periodUnit = 'wk')
and
((dayOfWeek.empty() and (when.exists() or timeOfDay.exists()) and periodUnit.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()
)
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()
).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()
).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()
)
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()
).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()
).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1
)
)
)
|
| TimingVarFreqGtMin | error | Timing.repeat | Bei variabler Frequenz muss die maximale Frequenz größer als die minimale Frequenz sein. |
frequencyMax.empty() or frequency.empty() or frequency.value < frequencyMax.value
|
| TimingVarFreqOrPeriod | warning | Timing.repeat | Bei gleichzeitiger Angabe von Frequenz und Periode sollte entweder nur die Frequenz einschließlich frequencyMax oder nur die Periode einschließlich periodMax größer als 1 sein. |
frequency.exists() and period.exists() implies
(
(
((frequency.exists() and frequency > 1) or (frequencyMax.exists() and frequencyMax > 1))
implies
(
period = 1 and
(periodMax.empty() or periodMax = 1)
)
)
and
(
((period.exists() and period > 1) or (periodMax.exists() and periodMax > 1))
implies
(
frequency = 1 and
(frequencyMax.empty() or frequencyMax = 1)
)
)
)
|
| TimingVarPeriodGtMin | error | Timing.repeat | Bei variabler Periode muss die maximale Periode größer als die minimale Periode sein. |
periodMax.empty() or period.empty() or period < periodMax
|
| 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
Key Elements View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-1, tim-2, tim-4, tim-5, tim-6, tim-7, tim-8, tim-9, tim-10, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit, TimingVarFreqOrPeriod, TimingVarFreqGtMin, TimingVarPeriodGtMin |
![]() ![]() ![]() |
SΣ | 0..1 | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this | |
![]() ![]() ![]() ![]() |
Duration | |||
![]() ![]() ![]() ![]() |
Period | |||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | decimal | Numerical value (with implicit precision) |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Duration UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Period | Start und Enddatum der Dosieranweisung ausgedrückt in Datum mit optional Uhrzeit. |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | Starting time with inclusive boundary |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | End time with inclusive boundary, if not ongoing |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Event occurs up to frequencyMax times per period |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Upper limit of period (3-4 hours) |
![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Period UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: Timing When dgMP (required) |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Timing.repeat.bounds[x]:boundsDuration.code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std. |
| Timing.repeat.when | Base | required | Timing When dgMP | 📦1.1.0 | This IG |
| 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() and frequency.exists() implies when.count() = frequency)
and
(when.exists() and dayOfWeek.exists() and frequency.exists() implies (when.count() * dayOfWeek.count()) = frequency)
and
(timeOfDay.exists() and dayOfWeek.empty() and frequency.exists() implies timeOfDay.count() = frequency)
and
(timeOfDay.exists() and dayOfWeek.exists() and frequency.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency)
and
(dayOfWeek.exists() and timeOfDay.empty() and when.empty() and frequency.exists() 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.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.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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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 use the same period and periodUnit across all dosage instances, and each timeOfDay or when value must be unique across 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.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.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 (with optional Interval), DayOfWeek (with optional Time/4-Schema), Interval only |
/* DayOfWeek only (without when/timeOfDay) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
timing.repeat.when.empty() and
timing.repeat.timeOfDay.empty()
) or
/* Interval only (frequency + period + periodUnit, no when/timeOfDay/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.when.empty() and
timing.repeat.timeOfDay.empty() and
timing.repeat.dayOfWeek.empty()
) or
/* DayOfWeek and Time/4-Schema (with optional frequency/period/periodUnit) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
(
(timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or
(timing.repeat.when.exists() and timing.repeat.timeOfDay.empty())
)
) or
/* When or TimeOfDay only (no dayOfWeek; frequency/period/periodUnit optional) */
(
%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()) 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 when-based schema */
%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()
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.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() and periodUnit.exists() implies periodUnit = 'wk')
and
((dayOfWeek.empty() and (when.exists() or timeOfDay.exists()) and periodUnit.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()
)
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()
).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()
).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()
)
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()
).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()
).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1
)
)
)
|
| TimingVarFreqGtMin | error | Timing.repeat | Bei variabler Frequenz muss die maximale Frequenz größer als die minimale Frequenz sein. |
frequencyMax.empty() or frequency.empty() or frequency.value < frequencyMax.value
|
| TimingVarFreqOrPeriod | warning | Timing.repeat | Bei gleichzeitiger Angabe von Frequenz und Periode sollte entweder nur die Frequenz einschließlich frequencyMax oder nur die Periode einschließlich periodMax größer als 1 sein. |
frequency.exists() and period.exists() implies
(
(
((frequency.exists() and frequency > 1) or (frequencyMax.exists() and frequencyMax > 1))
implies
(
period = 1 and
(periodMax.empty() or periodMax = 1)
)
)
and
(
((period.exists() and period > 1) or (periodMax.exists() and periodMax > 1))
implies
(
frequency = 1 and
(frequencyMax.empty() or frequencyMax = 1)
)
)
)
|
| TimingVarPeriodGtMin | error | Timing.repeat | Bei variabler Periode muss die maximale Periode größer als die minimale Periode sein. |
periodMax.empty() or period.empty() or period < periodMax
|
| 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: ![]() ![]() |
|---|---|---|---|---|
![]() |
TimingDE | |||
![]() ![]() |
0..0 | When the event occurs | ||
![]() ![]() |
C | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit, TimingVarFreqOrPeriod, TimingVarFreqGtMin, TimingVarPeriodGtMin |
![]() ![]() ![]() |
0..1 | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen | ||
![]() ![]() ![]() ![]() |
Duration | |||
![]() ![]() ![]() ![]() |
Period | |||
![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() |
0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten | |
![]() ![]() ![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |
![]() ![]() ![]() ![]() ![]() |
0..0 | < | <= | >= | > - how to understand the value | ||
![]() ![]() ![]() ![]() ![]() |
1..1 | string | Unit representation | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | UCUM-Einheit für die Dauer | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Coded form of the unit Binding: Duration UnitsOfTime dgMP ValueSet (required) | |
![]() ![]() ![]() |
0..0 | Number of times to repeat | ||
![]() ![]() ![]() |
0..0 | Maximum number of times to repeat | ||
![]() ![]() ![]() |
0..0 | How long when it happens | ||
![]() ![]() ![]() |
0..0 | How long when it happens (Max) | ||
![]() ![]() ![]() |
0..0 | s | min | h | d | wk | mo | a - unit of time (UCUM) | ||
![]() ![]() ![]() |
0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Period UnitsOfTime dgMP ValueSet (required) | |
![]() ![]() ![]() |
0..* | code | Code für den Zeitraum des Auftretens Binding: Timing When dgMP (required) | |
![]() ![]() ![]() |
0..0 | Zeitversatz | ||
![]() ![]() |
0..0 | BID | TID | QID | AM | PM | QD | QOD | + | ||
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Timing.repeat.bounds[x]:boundsDuration.code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.when | Base | required | Timing When dgMP | 📦1.1.0 | This IG |
| 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() and frequency.exists() implies when.count() = frequency)
and
(when.exists() and dayOfWeek.exists() and frequency.exists() implies (when.count() * dayOfWeek.count()) = frequency)
and
(timeOfDay.exists() and dayOfWeek.empty() and frequency.exists() implies timeOfDay.count() = frequency)
and
(timeOfDay.exists() and dayOfWeek.exists() and frequency.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency)
and
(dayOfWeek.exists() and timeOfDay.empty() and when.empty() and frequency.exists() 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.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.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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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 use the same period and periodUnit across all dosage instances, and each timeOfDay or when value must be unique across 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.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.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 (with optional Interval), DayOfWeek (with optional Time/4-Schema), Interval only |
/* DayOfWeek only (without when/timeOfDay) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
timing.repeat.when.empty() and
timing.repeat.timeOfDay.empty()
) or
/* Interval only (frequency + period + periodUnit, no when/timeOfDay/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.when.empty() and
timing.repeat.timeOfDay.empty() and
timing.repeat.dayOfWeek.empty()
) or
/* DayOfWeek and Time/4-Schema (with optional frequency/period/periodUnit) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
(
(timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or
(timing.repeat.when.exists() and timing.repeat.timeOfDay.empty())
)
) or
/* When or TimeOfDay only (no dayOfWeek; frequency/period/periodUnit optional) */
(
%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()) 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 when-based schema */
%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()
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.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() and periodUnit.exists() implies periodUnit = 'wk')
and
((dayOfWeek.empty() and (when.exists() or timeOfDay.exists()) and periodUnit.exists()) implies periodUnit = 'd')
|
| TimingVarFreqGtMin | error | Timing.repeat | Bei variabler Frequenz muss die maximale Frequenz größer als die minimale Frequenz sein. |
frequencyMax.empty() or frequency.empty() or frequency.value < frequencyMax.value
|
| TimingVarFreqOrPeriod | warning | Timing.repeat | Bei gleichzeitiger Angabe von Frequenz und Periode sollte entweder nur die Frequenz einschließlich frequencyMax oder nur die Periode einschließlich periodMax größer als 1 sein. |
frequency.exists() and period.exists() implies
(
(
((frequency.exists() and frequency > 1) or (frequencyMax.exists() and frequencyMax > 1))
implies
(
period = 1 and
(periodMax.empty() or periodMax = 1)
)
)
and
(
((period.exists() and period > 1) or (periodMax.exists() and periodMax > 1))
implies
(
frequency = 1 and
(frequencyMax.empty() or frequencyMax = 1)
)
)
)
|
| TimingVarPeriodGtMin | error | Timing.repeat | Bei variabler Periode muss die maximale Periode größer als die minimale Periode sein. |
periodMax.empty() or period.empty() or period < periodMax
|
Snapshot View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-1, tim-2, tim-4, tim-5, tim-6, tim-7, tim-8, tim-9, tim-10, TimingSingleDosageForTimeOfDay, TimingSingleDosageForWhen, TimingBoundsUnitMatchesCode, TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyWhenOrTimeOfDay, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds, TimingFrequencyCount, TimingPeriodUnit, TimingVarFreqOrPeriod, TimingVarFreqGtMin, TimingVarPeriodGtMin |
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() |
SΣ | 0..1 | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this | |
![]() ![]() ![]() ![]() |
Duration | |||
![]() ![]() ![]() ![]() |
Period | |||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | decimal | Numerical value (with implicit precision) |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Duration UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Period | Start und Enddatum der Dosieranweisung ausgedrückt in Datum mit optional Uhrzeit. |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | Starting time with inclusive boundary |
![]() ![]() ![]() ![]() ![]() |
SΣC | 0..1 | dateTime | End time with inclusive boundary, if not ongoing |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Event occurs up to frequencyMax times per period |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() |
SΣ | 0..1 | decimal | Upper limit of period (3-4 hours) |
![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Period UnitsOfTime dgMP ValueSet (required) |
![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: Timing When dgMP (required) |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| Timing.repeat.bounds[x]:boundsDuration.code | Base | required | Duration UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.periodUnit | Base | required | Period UnitsOfTime dgMP ValueSet | 📦1.1.0 | This IG |
| Timing.repeat.dayOfWeek | Base | required | DaysOfWeek | 📍4.0.1 | FHIR Std. |
| Timing.repeat.when | Base | required | Timing When dgMP | 📦1.1.0 | This IG |
| 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() and frequency.exists() implies when.count() = frequency)
and
(when.exists() and dayOfWeek.exists() and frequency.exists() implies (when.count() * dayOfWeek.count()) = frequency)
and
(timeOfDay.exists() and dayOfWeek.empty() and frequency.exists() implies timeOfDay.count() = frequency)
and
(timeOfDay.exists() and dayOfWeek.exists() and frequency.exists() implies (timeOfDay.count() * dayOfWeek.count()) = frequency)
and
(dayOfWeek.exists() and timeOfDay.empty() and when.empty() and frequency.exists() 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.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.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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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').count() > 1) 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 use the same period and periodUnit across all dosage instances, and each timeOfDay or when value must be unique across 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.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.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 (with optional Interval), DayOfWeek (with optional Time/4-Schema), Interval only |
/* DayOfWeek only (without when/timeOfDay) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
timing.repeat.when.empty() and
timing.repeat.timeOfDay.empty()
) or
/* Interval only (frequency + period + periodUnit, no when/timeOfDay/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.when.empty() and
timing.repeat.timeOfDay.empty() and
timing.repeat.dayOfWeek.empty()
) or
/* DayOfWeek and Time/4-Schema (with optional frequency/period/periodUnit) */
(
%resource.ofType(MedicationRequest).dosageInstruction |
%resource.ofType(MedicationDispense).dosageInstruction |
%resource.ofType(MedicationStatement).dosage
).all(
timing.repeat.dayOfWeek.exists() and
(
(timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or
(timing.repeat.when.exists() and timing.repeat.timeOfDay.empty())
)
) or
/* When or TimeOfDay only (no dayOfWeek; frequency/period/periodUnit optional) */
(
%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()) 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 when-based schema */
%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()
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.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() and periodUnit.exists() implies periodUnit = 'wk')
and
((dayOfWeek.empty() and (when.exists() or timeOfDay.exists()) and periodUnit.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()
)
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()
).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()
).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()
)
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()
).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()
).doseAndRate.dose.ofType(Quantity).value.distinct().count() > 1
)
)
)
|
| TimingVarFreqGtMin | error | Timing.repeat | Bei variabler Frequenz muss die maximale Frequenz größer als die minimale Frequenz sein. |
frequencyMax.empty() or frequency.empty() or frequency.value < frequencyMax.value
|
| TimingVarFreqOrPeriod | warning | Timing.repeat | Bei gleichzeitiger Angabe von Frequenz und Periode sollte entweder nur die Frequenz einschließlich frequencyMax oder nur die Periode einschließlich periodMax größer als 1 sein. |
frequency.exists() and period.exists() implies
(
(
((frequency.exists() and frequency > 1) or (frequencyMax.exists() and frequencyMax > 1))
implies
(
period = 1 and
(periodMax.empty() or periodMax = 1)
)
)
and
(
((period.exists() and period > 1) or (periodMax.exists() and periodMax > 1))
implies
(
frequency = 1 and
(frequencyMax.empty() or frequencyMax = 1)
)
)
)
|
| TimingVarPeriodGtMin | error | Timing.repeat | Bei variabler Periode muss die maximale Periode größer als die minimale Periode sein. |
periodMax.empty() or period.empty() or period < periodMax
|
| 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
Other representations of profile: CSV, Excel, Schematron