openIMIS FHIR R4 Implementation Guide
1.0.0 - ci-build

openIMIS FHIR R4 Implementation Guide - Local Development build (v1.0.0). See the Directory of published versions

Extension: Frequency (Medication)

Official URL: https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/medication-frequency Version: 1.0.0
Active as of 2022-05-31 Responsible: openIMIS Initiative Computable Name: MedicationFrequencyExtension

The frequency a Medication can be prescribed.

Context of Use

This extension may be used on the following element(s):

  • OpenIMISMedication

Usage info

Usage:

Formal Views of Extension Content

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

This structure is derived from Extension

Summary

Mandatory: 0 element (3 nested mandatory elements)
Fixed Value: 1 element
Prohibited: 1 element

Slices

This structure defines the following Slices:

  • The element Extension.value[x] is sliced based on the value of type:$this

This structure is derived from Extension

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionFrequency (Medication)
... extension 0..0
... url 1..1uri"https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/medication-frequency"
... value[x] 0..1TimingValue of extension
Slice: Unordered, Open by type:$this
.... repeat
..... frequency 1..1positiveIntEvent occurs frequency times per period
Required Pattern: 1
..... period 1..1decimalFrequency (days)
..... periodUnit 1..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
Required Pattern: d

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionFrequency (Medication)
... id 0..1stringUnique id for inter-element referencing
... extension 0..0
... url 1..1uri"https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/medication-frequency"
.... value[x]:valueTiming 0..1TimingValue of extension
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... event Σ0..*dateTimeWhen the event occurs
..... repeat ΣI0..1ElementWhen the event is to occur
...... id 0..1stringUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
...... bounds[x] Σ0..1Length/Range of lengths, or (Start and/or end) limits
....... boundsDurationDuration
....... boundsRangeRange
....... boundsPeriodPeriod
...... count Σ0..1positiveIntNumber of times to repeat
...... countMax Σ0..1positiveIntMaximum number of times to repeat
...... duration Σ0..1decimalHow long when it happens
...... durationMax Σ0..1decimalHow long when it happens (Max)
...... durationUnit Σ0..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime (required): A unit of time (units from UCUM).

...... frequency Σ1..1positiveIntEvent occurs frequency times per period
Required Pattern: 1
...... frequencyMax Σ0..1positiveIntEvent occurs up to frequencyMax times per period
...... period Σ1..1decimalFrequency (days)
...... periodMax Σ0..1decimalUpper limit of period (3-4 hours)
...... periodUnit Σ1..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime (required): A unit of time (units from UCUM).


Required Pattern: d
...... dayOfWeek Σ0..*codemon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
...... timeOfDay Σ0..*timeTime of day for action
...... when Σ0..*codeCode for time period of occurrence
Binding: EventTiming (required): Real world event relating to the schedule.


...... offset Σ0..1unsignedIntMinutes from event (before or after)
..... code Σ0..1CodeableConceptBID | TID | QID | AM | PM | QD | QOD | +
Binding: TimingAbbreviation (preferred): Code for a known / defined timing pattern.


doco Documentation for this format

This structure is derived from Extension

Summary

Mandatory: 0 element (3 nested mandatory elements)
Fixed Value: 1 element
Prohibited: 1 element

Slices

This structure defines the following Slices:

  • The element Extension.value[x] is sliced based on the value of type:$this

Differential View

This structure is derived from Extension

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionFrequency (Medication)
... extension 0..0
... url 1..1uri"https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/medication-frequency"
... value[x] 0..1TimingValue of extension
Slice: Unordered, Open by type:$this
.... repeat
..... frequency 1..1positiveIntEvent occurs frequency times per period
Required Pattern: 1
..... period 1..1decimalFrequency (days)
..... periodUnit 1..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
Required Pattern: d

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionFrequency (Medication)
... id 0..1stringUnique id for inter-element referencing
... extension 0..0
... url 1..1uri"https://openimis.github.io/openimis_fhir_r4_ig/StructureDefinition/medication-frequency"
.... value[x]:valueTiming 0..1TimingValue of extension
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... event Σ0..*dateTimeWhen the event occurs
..... repeat ΣI0..1ElementWhen the event is to occur
...... id 0..1stringUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
...... bounds[x] Σ0..1Length/Range of lengths, or (Start and/or end) limits
....... boundsDurationDuration
....... boundsRangeRange
....... boundsPeriodPeriod
...... count Σ0..1positiveIntNumber of times to repeat
...... countMax Σ0..1positiveIntMaximum number of times to repeat
...... duration Σ0..1decimalHow long when it happens
...... durationMax Σ0..1decimalHow long when it happens (Max)
...... durationUnit Σ0..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime (required): A unit of time (units from UCUM).

...... frequency Σ1..1positiveIntEvent occurs frequency times per period
Required Pattern: 1
...... frequencyMax Σ0..1positiveIntEvent occurs up to frequencyMax times per period
...... period Σ1..1decimalFrequency (days)
...... periodMax Σ0..1decimalUpper limit of period (3-4 hours)
...... periodUnit Σ1..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime (required): A unit of time (units from UCUM).


Required Pattern: d
...... dayOfWeek Σ0..*codemon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek (required)
...... timeOfDay Σ0..*timeTime of day for action
...... when Σ0..*codeCode for time period of occurrence
Binding: EventTiming (required): Real world event relating to the schedule.


...... offset Σ0..1unsignedIntMinutes from event (before or after)
..... code Σ0..1CodeableConceptBID | TID | QID | AM | PM | QD | QOD | +
Binding: TimingAbbreviation (preferred): Code for a known / defined timing pattern.


doco Documentation for this format

 

Other representations of profile: CSV, Excel, Schematron

Terminology Bindings

PathConformanceValueSet / Code
Extension.value[x]:valueTiming.repeat.durationUnitrequiredUnitsOfTime
Extension.value[x]:valueTiming.repeat.periodUnitrequiredPattern: d
Extension.value[x]:valueTiming.repeat.dayOfWeekrequiredDaysOfWeek
Extension.value[x]:valueTiming.repeat.whenrequiredEventTiming
Extension.value[x]:valueTiming.codepreferredTimingAbbreviation

Constraints

IdGradePathDetailsRequirements
ele-1errorExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorExtension.value[x]All FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTimingAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorExtension.value[x]:valueTiming.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorExtension.value[x]:valueTiming.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorExtension.value[x]:valueTiming.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorExtension.value[x]:valueTiming.eventAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeatAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
tim-1errorExtension.value[x]:valueTiming.repeatif there's a duration, there needs to be duration units
: duration.empty() or durationUnit.exists()
tim-2errorExtension.value[x]:valueTiming.repeatif there's a period, there needs to be period units
: period.empty() or periodUnit.exists()
tim-4errorExtension.value[x]:valueTiming.repeatduration SHALL be a non-negative value
: duration.exists() implies duration >= 0
tim-5errorExtension.value[x]:valueTiming.repeatperiod SHALL be a non-negative value
: period.exists() implies period >= 0
tim-6errorExtension.value[x]:valueTiming.repeatIf there's a periodMax, there must be a period
: periodMax.empty() or period.exists()
tim-7errorExtension.value[x]:valueTiming.repeatIf there's a durationMax, there must be a duration
: durationMax.empty() or duration.exists()
tim-8errorExtension.value[x]:valueTiming.repeatIf there's a countMax, there must be a count
: countMax.empty() or count.exists()
tim-9errorExtension.value[x]:valueTiming.repeatIf there's an offset, there must be a when (and not C, CM, CD, CV)
: offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))
tim-10errorExtension.value[x]:valueTiming.repeatIf there's a timeOfDay, there cannot be a when, or vice versa
: timeOfDay.empty() or when.empty()
ele-1errorExtension.value[x]:valueTiming.repeat.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1errorExtension.value[x]:valueTiming.repeat.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1errorExtension.value[x]:valueTiming.repeat.bounds[x]All FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.countAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.countMaxAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.durationAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.durationMaxAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.durationUnitAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.frequencyAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.frequencyMaxAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.periodAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.periodMaxAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.periodUnitAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.dayOfWeekAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.timeOfDayAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.whenAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.repeat.offsetAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1errorExtension.value[x]:valueTiming.codeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())