Medication IG DE
1.0.0-ballot1 - 1.0.0

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

Data Type Profile: Zeitmuster für Dosierungen im dgMP

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

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

Usages:

Formal Views of Profile Content

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

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

doco Documentation for this format

Terminology Bindings

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

Constraints

IdGradePath(s)DetailsRequirements
TimingIntervalOnlyOneFrequencyerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosageInstruction.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosage.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosage.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of 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.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.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 ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: /* Detect DayOfWeek and Time/4-Schema This logic checks for dosage instructions that specify either timeOfDay or when, but not both, and ensures certain consistency rules for frequency, period, and periodUnit. */ ( /* Combine dosage instructions from all relevant resource types */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( /* Check for required timing fields and ensure dayOfWeek is not used */ timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( /* Either timeOfDay is set (and when is not), or when is set (and timeOfDay is not) */ (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( /* For MedicationRequest or MedicationDispense */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across instructions */ %resource.dosageInstruction.timing.repeat.frequency.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each instruction must have a unique timeOfDay and when value */ (%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 ( /* For MedicationStatement resources */ %resource.ofType(MedicationStatement).exists() implies ( /* If MedicationRequest or MedicationDispense also exists */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across statements */ %resource.dosage.timing.repeat.frequency.distinct().count() = 1 and %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each statement must have a unique timeOfDay and when value */ (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: ( /* 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* TimeOfDay */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.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()) ) ) )
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

This structure is derived from TimingDE

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

doco Documentation for this format

Terminology Bindings (Differential)

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

Constraints

IdGradePath(s)DetailsRequirements
TimingIntervalOnlyOneFrequencyerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosageInstruction.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosage.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosage.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of 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.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.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 ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: /* Detect DayOfWeek and Time/4-Schema This logic checks for dosage instructions that specify either timeOfDay or when, but not both, and ensures certain consistency rules for frequency, period, and periodUnit. */ ( /* Combine dosage instructions from all relevant resource types */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( /* Check for required timing fields and ensure dayOfWeek is not used */ timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( /* Either timeOfDay is set (and when is not), or when is set (and timeOfDay is not) */ (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( /* For MedicationRequest or MedicationDispense */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across instructions */ %resource.dosageInstruction.timing.repeat.frequency.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each instruction must have a unique timeOfDay and when value */ (%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 ( /* For MedicationStatement resources */ %resource.ofType(MedicationStatement).exists() implies ( /* If MedicationRequest or MedicationDispense also exists */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across statements */ %resource.dosage.timing.repeat.frequency.distinct().count() = 1 and %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each statement must have a unique timeOfDay and when value */ (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: ( /* 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* TimeOfDay */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.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()) ) ) )
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Timing 0..* TimingDE A timing schedule that specifies an event that may occur multiple times
... id 0..1 string Unique id for inter-element referencing
... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... id 0..1 string Unique id for inter-element referencing
.... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... Slices for bounds[x] SΣ 0..1 Duration Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen
Slice: Unordered, Closed by type:$this
..... bounds[x]:boundsDuration SΣ 0..1 Duration Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten
...... id 0..1 string Unique id for inter-element referencing
...... extension N 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... value Σ 0..1 decimal Numerical value (with implicit precision)
...... comparator ?!Σ 0..1 code < | <= | >= | > - how to understand the value
Binding: QuantityComparator (required): How the Quantity should be understood and represented.
...... unit SΣ 1..1 string Unit representation
...... system SΣC 1..1 uri UCUM-Einheit für die Dauer
Fixed Value: http://unitsofmeasure.org
...... code SΣ 1..1 code Coded form of the unit
Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required)
.... frequency SΣ 0..1 positiveInt Ereignis tritt frequency-mal pro Zeitraum auf
.... period SΣ 0..1 decimal Ereignis tritt frequency-mal pro Zeitraum auf
.... periodUnit SΣ 0..1 code s | min | h | d | wk | mo | a - Zeiteinheit (UCUM)
Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required)
.... dayOfWeek SΣ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
.... timeOfDay SΣ 0..* time Tageszeit für die Aktion
.... when SΣ 0..* code Code für den Zeitraum des Auftretens
Binding: TimingWhenDgMP (required)

doco Documentation for this format

Terminology Bindings

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

Constraints

IdGradePath(s)DetailsRequirements
TimingIntervalOnlyOneFrequencyerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosageInstruction.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosage.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosage.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of 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.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.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 ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: /* Detect DayOfWeek and Time/4-Schema This logic checks for dosage instructions that specify either timeOfDay or when, but not both, and ensures certain consistency rules for frequency, period, and periodUnit. */ ( /* Combine dosage instructions from all relevant resource types */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( /* Check for required timing fields and ensure dayOfWeek is not used */ timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( /* Either timeOfDay is set (and when is not), or when is set (and timeOfDay is not) */ (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( /* For MedicationRequest or MedicationDispense */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across instructions */ %resource.dosageInstruction.timing.repeat.frequency.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each instruction must have a unique timeOfDay and when value */ (%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 ( /* For MedicationStatement resources */ %resource.ofType(MedicationStatement).exists() implies ( /* If MedicationRequest or MedicationDispense also exists */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across statements */ %resource.dosage.timing.repeat.frequency.distinct().count() = 1 and %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each statement must have a unique timeOfDay and when value */ (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: ( /* 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* TimeOfDay */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.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()) ) ) )
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

This structure is derived from TimingDE

Summary

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

Key Elements View

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

doco Documentation for this format

Terminology Bindings

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

Constraints

IdGradePath(s)DetailsRequirements
TimingIntervalOnlyOneFrequencyerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosageInstruction.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosage.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosage.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of 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.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.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 ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: /* Detect DayOfWeek and Time/4-Schema This logic checks for dosage instructions that specify either timeOfDay or when, but not both, and ensures certain consistency rules for frequency, period, and periodUnit. */ ( /* Combine dosage instructions from all relevant resource types */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( /* Check for required timing fields and ensure dayOfWeek is not used */ timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( /* Either timeOfDay is set (and when is not), or when is set (and timeOfDay is not) */ (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( /* For MedicationRequest or MedicationDispense */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across instructions */ %resource.dosageInstruction.timing.repeat.frequency.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each instruction must have a unique timeOfDay and when value */ (%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 ( /* For MedicationStatement resources */ %resource.ofType(MedicationStatement).exists() implies ( /* If MedicationRequest or MedicationDispense also exists */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across statements */ %resource.dosage.timing.repeat.frequency.distinct().count() = 1 and %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each statement must have a unique timeOfDay and when value */ (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: ( /* 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* TimeOfDay */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.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()) ) ) )
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

Differential View

This structure is derived from TimingDE

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

doco Documentation for this format

Terminology Bindings (Differential)

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

Constraints

IdGradePath(s)DetailsRequirements
TimingIntervalOnlyOneFrequencyerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosageInstruction.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosage.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosage.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of 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.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.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 ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: /* Detect DayOfWeek and Time/4-Schema This logic checks for dosage instructions that specify either timeOfDay or when, but not both, and ensures certain consistency rules for frequency, period, and periodUnit. */ ( /* Combine dosage instructions from all relevant resource types */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( /* Check for required timing fields and ensure dayOfWeek is not used */ timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( /* Either timeOfDay is set (and when is not), or when is set (and timeOfDay is not) */ (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( /* For MedicationRequest or MedicationDispense */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across instructions */ %resource.dosageInstruction.timing.repeat.frequency.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each instruction must have a unique timeOfDay and when value */ (%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 ( /* For MedicationStatement resources */ %resource.ofType(MedicationStatement).exists() implies ( /* If MedicationRequest or MedicationDispense also exists */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across statements */ %resource.dosage.timing.repeat.frequency.distinct().count() = 1 and %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each statement must have a unique timeOfDay and when value */ (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: ( /* 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* TimeOfDay */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.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()) ) ) )

Snapshot View

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

doco Documentation for this format

Terminology Bindings

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

Constraints

IdGradePath(s)DetailsRequirements
TimingIntervalOnlyOneFrequencyerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect Interval */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) /* Only One Dosage allowed for Interval */ implies ( ( ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( %resource.dosageInstruction.count() = 1 ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.count() = 1 ) ) )
TimingOnlyOneBoundserrorTiming.repeatDosages Timings must not state the same bounds duration across multiple dosage instances
: ( %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( ( /* only one different value and code are allowed*/ (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies %resource.dosageInstruction.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosageInstruction.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosageInstruction.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) and ( %resource.ofType(MedicationStatement).exists() implies %resource.dosage.timing.repeat.boundsDuration.exists().not() or ( (%resource.dosage.timing.repeat.boundsDuration.value.distinct().count() = 1) and (%resource.dosage.timing.repeat.boundsDuration.code.distinct().count() = 1) ) ) ) )
TimingOnlyOneDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of 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.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.dayOfWeek.distinct().count() = %resource.dosageInstruction.timing.repeat.dayOfWeek.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.dayOfWeek.distinct().count() = %resource.dosage.timing.repeat.dayOfWeek.count()) ) ) )
TimingOnlyOnePeriodForDayOfWeekerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect DayOfWeek and Time/4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.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 ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosageInstruction.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosageInstruction.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) and ( %resource.ofType(MedicationStatement).exists() implies ( /* For each day of week */ /* if Mon occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'mon') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'mon').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('mon' in dayOfWeek).timeOfDay.count()) )) and /* if tue occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'tue') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'tue').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('tue' in dayOfWeek).timeOfDay.count()) )) and /* if wed occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'wed') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'wed').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('wed' in dayOfWeek).timeOfDay.count()) )) and /* if thu occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'thu') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'thu').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('thu' in dayOfWeek).timeOfDay.count()) )) and /* if fri occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'fri') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'fri').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('fri' in dayOfWeek).timeOfDay.count()) )) and /* if sat occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sat') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sat').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sat' in dayOfWeek).timeOfDay.count()) )) and /* if sun occurs multiple times */ (( %resource.dosage.timing.repeat.dayOfWeek .where($this = 'sun') .where(%resource.dosage.timing.repeat.dayOfWeek.where($this = 'sun').count() > 1) .distinct() ) implies ( (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).when.count()) and (%resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.distinct().count() = %resource.dosage.timing.repeat.where('sun' in dayOfWeek).timeOfDay.count()) )) ) ) ) )
TimingOnlyOneTimeForIntervalerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: /* Detect DayOfWeek and Time/4-Schema This logic checks for dosage instructions that specify either timeOfDay or when, but not both, and ensures certain consistency rules for frequency, period, and periodUnit. */ ( /* Combine dosage instructions from all relevant resource types */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ) .all( ( /* Check for required timing fields and ensure dayOfWeek is not used */ timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( /* Either timeOfDay is set (and when is not), or when is set (and timeOfDay is not) */ (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) implies ( /* For MedicationRequest or MedicationDispense */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across instructions */ %resource.dosageInstruction.timing.repeat.frequency.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.period.distinct().count() = 1 and %resource.dosageInstruction.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each instruction must have a unique timeOfDay and when value */ (%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 ( /* For MedicationStatement resources */ %resource.ofType(MedicationStatement).exists() implies ( /* If MedicationRequest or MedicationDispense also exists */ ( %resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists() ) implies ( /* All intervals must be the same across statements */ %resource.dosage.timing.repeat.frequency.distinct().count() = 1 and %resource.dosage.timing.repeat.period.distinct().count() = 1 and %resource.dosage.timing.repeat.periodUnit.distinct().count() = 1 ) and ( /* Each statement must have a unique timeOfDay and when value */ (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) and (%resource.dosage.timing.repeat.when.distinct().count() = %resource.dosage.timing.repeat.when.count()) ) ) ) )
TimingOnlyOneTimeOfDayerrorTiming.repeatDosages Timings must not state the same time of day across multiple dosage instances
: ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) implies ( ( (%resource.ofType(MedicationRequest).exists() or %resource.ofType(MedicationDispense).exists()) implies (%resource.dosageInstruction.timing.repeat.timeOfDay.distinct().count() = %resource.dosageInstruction.timing.repeat.timeOfDay.count()) ) and ( %resource.ofType(MedicationStatement).exists() implies (%resource.dosage.timing.repeat.timeOfDay.distinct().count() = %resource.dosage.timing.repeat.timeOfDay.count()) ) ) )
TimingOnlyOneTypeerrorTiming.repeatOnly one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema
: ( /* 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* TimeOfDay */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.timeOfDay.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() ) or /* Interval */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.when.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.empty() ) or /* DayOfWeek and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.dayOfWeek.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) ) or /* Interval and Time/4-Schema */ (%resource.ofType(MedicationRequest).dosageInstruction | ofType(MedicationDispense).dosageInstruction | ofType(MedicationStatement).dosage).all( timing.repeat.frequency.exists() and timing.repeat.period.exists() and timing.repeat.periodUnit.exists() and timing.repeat.dayOfWeek.empty() and ( (timing.repeat.timeOfDay.exists() and timing.repeat.when.empty()) or (timing.repeat.when.exists() and timing.repeat.timeOfDay.empty()) ) )
TimingOnlyOneWhenerrorTiming.repeatDosages Timings must not state the same period of day across multiple dosage instances
: ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.when.exists() and timing.repeat.frequency.empty() and timing.repeat.period.empty() and timing.repeat.periodUnit.empty() and timing.repeat.timeOfDay.empty() and timing.repeat.dayOfWeek.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()) ) ) )
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tim-1errorTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()

This structure is derived from TimingDE

Summary

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

 

Other representations of profile: CSV, Excel, Schematron