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
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:
Description of Profiles, Differentials, Snapshots and how the different presentations work.
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-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 |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this |
![]() ![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() ![]() |
?!Σ | 0..1 | code | < | <= | >= | > - how to understand the value Binding: QuantityComparator (required): How the Quantity should be understood and represented. |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: TimingWhenDgMP (required) |
![]() |
Path | Conformance | ValueSet | URI |
Timing.repeat.bounds[x]:boundsDuration.comparator | required | QuantityComparatorhttp://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 From the FHIR Standard | |
Timing.repeat.bounds[x]:boundsDuration.code | required | DurationUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP From this IG | |
Timing.repeat.periodUnit | required | PeriodUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP From this IG | |
Timing.repeat.dayOfWeek | required | DaysOfWeekhttp://hl7.org/fhir/ValueSet/days-of-week|4.0.1 From the FHIR Standard | |
Timing.repeat.when | required | TimingWhenDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP From this IG |
Id | Grade | Path(s) | Details | Requirements |
TimingIntervalOnlyOneFrequency | error | Timing.repeat | Dosages 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 ) ) ) | |
TimingOnlyOneBounds | error | Timing.repeat | Dosages 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) ) ) ) ) | |
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) ) | |
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | Dosages 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()) )) ) ) ) ) | |
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosages 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()) ) ) ) ) | |
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages Timings must not state the same time of day across multiple dosage instances : ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) | |
TimingOnlyOneType | error | Timing.repeat | Only one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema : ( /* 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()) ) ) | |
TimingOnlyOneWhen | error | Timing.repeat | Dosages Timings must not state the same period of day across multiple dosage instances : ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units : duration.empty() or durationUnit.exists() | |
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units : period.empty() or periodUnit.exists() | |
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value : duration.exists() implies duration >= 0 | |
tim-5 | error | Timing.repeat | period SHALL be a non-negative value : period.exists() implies period >= 0 | |
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period : periodMax.empty() or period.exists() | |
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration : durationMax.empty() or duration.exists() | |
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count : countMax.empty() or count.exists() | |
tim-9 | error | Timing.repeat | If there's an offset, there must be a when (and not C, CM, CD, CV) : offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not())) | |
tim-10 | error | Timing.repeat | If there's a timeOfDay, there cannot be a when, or vice versa : timeOfDay.empty() or when.empty() |
This structure is derived from TimingDE
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
TimingDE | |||
![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() |
C | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds |
![]() ![]() ![]() ![]() |
0..1 | Duration | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen | |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten | |
![]() ![]() ![]() ![]() ![]() ![]() |
S | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() ![]() |
S | 1..1 | uri | UCUM-Einheit für die Dauer |
![]() ![]() ![]() ![]() ![]() ![]() |
S | 1..1 | code | Coded form of the unit Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
S | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
0..* | code | Code für den Zeitraum des Auftretens Binding: TimingWhenDgMP (required) | |
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() |
0..0 | |||
![]() |
Path | Conformance | ValueSet | URI |
Timing.repeat.bounds[x]:boundsDuration.code | required | DurationUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP From this IG | |
Timing.repeat.periodUnit | required | PeriodUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP From this IG | |
Timing.repeat.when | required | TimingWhenDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP From this IG |
Id | Grade | Path(s) | Details | Requirements |
TimingIntervalOnlyOneFrequency | error | Timing.repeat | Dosages 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 ) ) ) | |
TimingOnlyOneBounds | error | Timing.repeat | Dosages 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) ) ) ) ) | |
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) ) | |
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | Dosages 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()) )) ) ) ) ) | |
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosages 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()) ) ) ) ) | |
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages Timings must not state the same time of day across multiple dosage instances : ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) | |
TimingOnlyOneType | error | Timing.repeat | Only one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema : ( /* 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()) ) ) | |
TimingOnlyOneWhen | error | Timing.repeat | Dosages Timings must not state the same period of day across multiple dosage instances : ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) |
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() |
N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-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 |
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() |
N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this |
![]() ![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() ![]() ![]() |
N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url |
![]() ![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | decimal | Numerical value (with implicit precision) |
![]() ![]() ![]() ![]() ![]() ![]() |
?!Σ | 0..1 | code | < | <= | >= | > - how to understand the value Binding: QuantityComparator (required): How the Quantity should be understood and represented. |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: TimingWhenDgMP (required) |
![]() |
Path | Conformance | ValueSet | URI |
Timing.repeat.bounds[x]:boundsDuration.comparator | required | QuantityComparatorhttp://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 From the FHIR Standard | |
Timing.repeat.bounds[x]:boundsDuration.code | required | DurationUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP From this IG | |
Timing.repeat.periodUnit | required | PeriodUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP From this IG | |
Timing.repeat.dayOfWeek | required | DaysOfWeekhttp://hl7.org/fhir/ValueSet/days-of-week|4.0.1 From the FHIR Standard | |
Timing.repeat.when | required | TimingWhenDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP From this IG |
Id | Grade | Path(s) | Details | Requirements |
TimingIntervalOnlyOneFrequency | error | Timing.repeat | Dosages 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 ) ) ) | |
TimingOnlyOneBounds | error | Timing.repeat | Dosages 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) ) ) ) ) | |
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) ) | |
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | Dosages 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()) )) ) ) ) ) | |
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosages 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()) ) ) ) ) | |
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages Timings must not state the same time of day across multiple dosage instances : ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) | |
TimingOnlyOneType | error | Timing.repeat | Only one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema : ( /* 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()) ) ) | |
TimingOnlyOneWhen | error | Timing.repeat | Dosages Timings must not state the same period of day across multiple dosage instances : ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units : duration.empty() or durationUnit.exists() | |
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units : period.empty() or periodUnit.exists() | |
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value : duration.exists() implies duration >= 0 | |
tim-5 | error | Timing.repeat | period SHALL be a non-negative value : period.exists() implies period >= 0 | |
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period : periodMax.empty() or period.exists() | |
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration : durationMax.empty() or duration.exists() | |
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count : countMax.empty() or count.exists() | |
tim-9 | error | Timing.repeat | If there's an offset, there must be a when (and not C, CM, CD, CV) : offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not())) | |
tim-10 | error | Timing.repeat | If there's a timeOfDay, there cannot be a when, or vice versa : timeOfDay.empty() or when.empty() |
This structure is derived from TimingDE
Key Elements View
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-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 |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this |
![]() ![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() ![]() |
?!Σ | 0..1 | code | < | <= | >= | > - how to understand the value Binding: QuantityComparator (required): How the Quantity should be understood and represented. |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: TimingWhenDgMP (required) |
![]() |
Path | Conformance | ValueSet | URI |
Timing.repeat.bounds[x]:boundsDuration.comparator | required | QuantityComparatorhttp://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 From the FHIR Standard | |
Timing.repeat.bounds[x]:boundsDuration.code | required | DurationUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP From this IG | |
Timing.repeat.periodUnit | required | PeriodUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP From this IG | |
Timing.repeat.dayOfWeek | required | DaysOfWeekhttp://hl7.org/fhir/ValueSet/days-of-week|4.0.1 From the FHIR Standard | |
Timing.repeat.when | required | TimingWhenDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP From this IG |
Id | Grade | Path(s) | Details | Requirements |
TimingIntervalOnlyOneFrequency | error | Timing.repeat | Dosages 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 ) ) ) | |
TimingOnlyOneBounds | error | Timing.repeat | Dosages 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) ) ) ) ) | |
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) ) | |
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | Dosages 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()) )) ) ) ) ) | |
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosages 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()) ) ) ) ) | |
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages Timings must not state the same time of day across multiple dosage instances : ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) | |
TimingOnlyOneType | error | Timing.repeat | Only one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema : ( /* 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()) ) ) | |
TimingOnlyOneWhen | error | Timing.repeat | Dosages Timings must not state the same period of day across multiple dosage instances : ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units : duration.empty() or durationUnit.exists() | |
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units : period.empty() or periodUnit.exists() | |
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value : duration.exists() implies duration >= 0 | |
tim-5 | error | Timing.repeat | period SHALL be a non-negative value : period.exists() implies period >= 0 | |
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period : periodMax.empty() or period.exists() | |
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration : durationMax.empty() or duration.exists() | |
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count : countMax.empty() or count.exists() | |
tim-9 | error | Timing.repeat | If there's an offset, there must be a when (and not C, CM, CD, CV) : offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not())) | |
tim-10 | error | Timing.repeat | If there's a timeOfDay, there cannot be a when, or vice versa : timeOfDay.empty() or when.empty() |
Differential View
This structure is derived from TimingDE
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
TimingDE | |||
![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() |
C | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: TimingOnlyOneType, TimingIntervalOnlyOneFrequency, TimingOnlyOneWhen, TimingOnlyOneTimeOfDay, TimingOnlyOneDayOfWeek, TimingOnlyOnePeriodForDayOfWeek, TimingOnlyOneTimeForInterval, TimingOnlyOneBounds |
![]() ![]() ![]() ![]() |
0..1 | Duration | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen | |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten | |
![]() ![]() ![]() ![]() ![]() ![]() |
S | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() ![]() |
S | 1..1 | uri | UCUM-Einheit für die Dauer |
![]() ![]() ![]() ![]() ![]() ![]() |
S | 1..1 | code | Coded form of the unit Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() ![]() |
S | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
0..* | code | Code für den Zeitraum des Auftretens Binding: TimingWhenDgMP (required) | |
![]() ![]() ![]() ![]() |
0..0 | |||
![]() ![]() ![]() |
0..0 | |||
![]() |
Path | Conformance | ValueSet | URI |
Timing.repeat.bounds[x]:boundsDuration.code | required | DurationUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP From this IG | |
Timing.repeat.periodUnit | required | PeriodUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP From this IG | |
Timing.repeat.when | required | TimingWhenDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP From this IG |
Id | Grade | Path(s) | Details | Requirements |
TimingIntervalOnlyOneFrequency | error | Timing.repeat | Dosages 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 ) ) ) | |
TimingOnlyOneBounds | error | Timing.repeat | Dosages 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) ) ) ) ) | |
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) ) | |
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | Dosages 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()) )) ) ) ) ) | |
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosages 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()) ) ) ) ) | |
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages Timings must not state the same time of day across multiple dosage instances : ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) | |
TimingOnlyOneType | error | Timing.repeat | Only one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema : ( /* 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()) ) ) | |
TimingOnlyOneWhen | error | Timing.repeat | Dosages Timings must not state the same period of day across multiple dosage instances : ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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
Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
---|---|---|---|---|
![]() ![]() |
0..* | TimingDE | A timing schedule that specifies an event that may occur multiple times | |
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() |
N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
SΣC | 1..1 | Element | Wann das Ereignis stattfinden soll Constraints: tim-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 |
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() |
N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Länge/Bereich der Längen oder (Start- und/oder End-)Grenzen Slice: Unordered, Closed by type:$this |
![]() ![]() ![]() ![]() ![]() |
SΣ | 0..1 | Duration | Dauer der Dosieranweisung ausgedrückt in UCUM-Einheiten |
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |
![]() ![]() ![]() ![]() ![]() ![]() |
N | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url |
![]() ![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | decimal | Numerical value (with implicit precision) |
![]() ![]() ![]() ![]() ![]() ![]() |
?!Σ | 0..1 | code | < | <= | >= | > - how to understand the value Binding: QuantityComparator (required): How the Quantity should be understood and represented. |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | Unit representation |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣC | 1..1 | uri | UCUM-Einheit für die Dauer Fixed Value: http://unitsofmeasure.org |
![]() ![]() ![]() ![]() ![]() ![]() |
SΣ | 1..1 | code | Coded form of the unit Binding: Zeiteinheiten für die DurationUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | positiveInt | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | decimal | Ereignis tritt frequency-mal pro Zeitraum auf |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | code | s | min | h | d | wk | mo | a - Zeiteinheit (UCUM) Binding: Zeiteinheiten für PeriodUnit in Dosierungen im dgMP (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | mon | tue | wed | thu | fri | sat | sun Binding: DaysOfWeek (required) |
![]() ![]() ![]() ![]() |
SΣ | 0..* | time | Tageszeit für die Aktion |
![]() ![]() ![]() ![]() |
SΣ | 0..* | code | Code für den Zeitraum des Auftretens Binding: TimingWhenDgMP (required) |
![]() |
Path | Conformance | ValueSet | URI |
Timing.repeat.bounds[x]:boundsDuration.comparator | required | QuantityComparatorhttp://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1 From the FHIR Standard | |
Timing.repeat.bounds[x]:boundsDuration.code | required | DurationUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/DosageUnitsOfTimeDgMP From this IG | |
Timing.repeat.periodUnit | required | PeriodUnitsOfTimeDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/PeriodUnitsOfTimeDgMP From this IG | |
Timing.repeat.dayOfWeek | required | DaysOfWeekhttp://hl7.org/fhir/ValueSet/days-of-week|4.0.1 From the FHIR Standard | |
Timing.repeat.when | required | TimingWhenDgMPVShttp://ig.fhir.de/igs/medication/ValueSet/TimingWhenDgMP From this IG |
Id | Grade | Path(s) | Details | Requirements |
TimingIntervalOnlyOneFrequency | error | Timing.repeat | Dosages 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 ) ) ) | |
TimingOnlyOneBounds | error | Timing.repeat | Dosages 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) ) ) ) ) | |
TimingOnlyOneDayOfWeek | error | Timing.repeat | Dosages 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()) ) ) ) | |
TimingOnlyOnePeriodForDayOfWeek | error | Timing.repeat | Dosages 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()) )) ) ) ) ) | |
TimingOnlyOneTimeForInterval | error | Timing.repeat | Dosages 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()) ) ) ) ) | |
TimingOnlyOneTimeOfDay | error | Timing.repeat | Dosages Timings must not state the same time of day across multiple dosage instances : ( /* Detect TimeOfDay */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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()) ) ) ) | |
TimingOnlyOneType | error | Timing.repeat | Only one kind of Timing is allowed. Current allowed timings: 4-Scheme, TimeOfDay, DayOfWeek, Interval, DayOfWeek and Time/4-Schema, Interval and Time/4-Schema : ( /* 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()) ) ) | |
TimingOnlyOneWhen | error | Timing.repeat | Dosages Timings must not state the same period of day across multiple dosage instances : ( /* Detect 4-Schema */ %resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage ).all( ( timing.repeat.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-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
tim-1 | error | Timing.repeat | if there's a duration, there needs to be duration units : duration.empty() or durationUnit.exists() | |
tim-2 | error | Timing.repeat | if there's a period, there needs to be period units : period.empty() or periodUnit.exists() | |
tim-4 | error | Timing.repeat | duration SHALL be a non-negative value : duration.exists() implies duration >= 0 | |
tim-5 | error | Timing.repeat | period SHALL be a non-negative value : period.exists() implies period >= 0 | |
tim-6 | error | Timing.repeat | If there's a periodMax, there must be a period : periodMax.empty() or period.exists() | |
tim-7 | error | Timing.repeat | If there's a durationMax, there must be a duration : durationMax.empty() or duration.exists() | |
tim-8 | error | Timing.repeat | If there's a countMax, there must be a count : countMax.empty() or count.exists() | |
tim-9 | error | Timing.repeat | If there's an offset, there must be a when (and not C, CM, CD, CV) : offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not())) | |
tim-10 | error | Timing.repeat | If there's a timeOfDay, there cannot be a when, or vice versa : timeOfDay.empty() or when.empty() |
This structure is derived from TimingDE
Other representations of profile: CSV, Excel, Schematron