Implementation guide for interoperable medicines

This guidance is under active development by NHS England and content may be added or updated on a regular basis.

Timing Elements: when, offset, dayOfWeek, timeOfDay, event and code

A dosage instruction can be tied to the specific days, dates and times, plus life events related to eating or sleeping.

Sub-elements: when and offset

The when element ties to the regular life events of sleeping and eating, for example:

  • C = event occurs at a meal
  • CM = event occurs at breakfast
  • CD = event occurs at lunch
  • CV = event occurs at dinner
  • ACM = event occurs [offset] before breakfast
  • PCM = event occurs [offset] after breakfast

An [offset] allows the event to be tied to defined minutes before or after the event. The offset is an unsigned integer value so different codes within the when value-set are used to define if before or after, opposed to using a negative integer for timing before the event.

Note 1: To ensure consistency across UK implementations, it is recommended that lunch is interpreted at the middle meal of a typical 3 meals a day routine, and dinner interpreted at the last meal of a typical 3 meals a day routine.

Event occurs at breakfast

<timing>
    <repeat>
        <when value="CM"/>
    </repeat>
</timing>

Event occurs at 1 hour before breakfast

<timing>
    <repeat>
        <when value="ACM"/>
        <offset value="60" />
    </repeat>
</timing>

Event occurs at 1 hour after breakfast

<timing>
    <repeat>
        <when value="PCM"/>
        <offset value="60" />
    </repeat>
</timing>

Note 2: We recommend a maximum of one when event per medication administration. The FHIR standard allows for multiple when events but this could become confusing for a single administration.

For example:

Bad potentially confusing example:
daily - at breakfast, in the morning
<!-- "daily - at breakfast, in the morning" -->
<timing>
    <repeat>
        <frequency value="1"/>
        <period value="1"/>
        <periodUnit value="d"/>
        <when value="CM"/>
        <when value="MORN"/>
    </repeat>
</timing>

The above could be confused as two administrations. One at breakfast and another in the morning. Not everybody eats breakfast in the morning. What about those working night shifts?

Whereas when there are multiple administrations, multiple when events are less confusing.

<!-- "twice a day - in the morning, in the evening" -->
<timing>
    <repeat>
        <frequency value="2"/>
        <period value="1"/>
        <periodUnit value="d"/>
        <when value="MORN"/>
        <when value="EVE"/>
    </repeat>
</timing>

Note 3: Where the meal related when codes of "C", "AC" or "PC" are used it is recommended to also include timing frequency instructions. This will ensure the medication is taken for the correct number of times in the day, e.g. "3 times a day, at a meal" or "twice a day, at a meal".

Event occurs at a meal, further clarified with '3 times a day'

<!-- 3 times a day - at a meal -->
<timing>
    <repeat>
        <frequency value="3"/>
        <period value="1"/>
        <periodUnit value="d"/>
        <when value="C"/>
    </repeat>
</timing>

Note 4: The FHIR when codes events relating to meals are for when the dosing instruction is related to timing. Where the primary intent of the dosing instruction is for the medication to be taken with food then include a SNOMED coded additionalInstruction.

Event occurs with food

<!-- with food -->
<additionalInstruction>
    <coding> 
        <system value="http://snomed.info/sct"/> 
        <code value="1116481000001105"/> 
        <display value="With food"/> 
    </coding>
</additionalInstruction>

Event occurs in the morning, with food

<!-- in the morning - with food -->
<timing>
    <repeat>
        <when value="MORN"/>
    </repeat>
</timing>
<additionalInstruction>
    <coding> 
        <system value="http://snomed.info/sct"/> 
        <code value="1116481000001105"/> 
        <display value="With food"/> 
    </coding>
</additionalInstruction>

as needed with or after food

<!-- as needed - with or after food -->
<asNeededBoolean value="true" />
<additionalInstruction>
    <coding> 
        <system value="http://snomed.info/sct"/> 
        <code value="311504000"/> 
        <display value="With or after food"/> 
    </coding>
</additionalInstruction>

Sub-elements: dayOfWeek and timeOfDay

A dosage instruction can specify days of a week and/or specific times within a day for administration.

on Monday and Thursday at 09:00 and 15:00

<timing>
    <repeat>
        <dayOfWeek value="mon" />
        <dayOfWeek value="thu" />
        <timeOfDay value="09:00:00" />
        <timeOfDay value="15:00:00" />
    </repeat>
</timing>

FHIR Inconsistency: The FHIR R4 standard includes a comment that the elements frequency, period and when cannot be used with dayOfWeek and/or timeOfDay. However the rule defined in FHIR R4 only applies to when plus an example exists in the FHIR standard for "Daily at 10:00". Within FHIR R5, the comment has been amended to only apply to when. This guidance is based on the rules defined in FHIR R4 and latest ballot release of FHIR R5.

Daily at 10:00

<timing>
    <repeat>
        <frequency value="1"/>
        <period value="1"/>
        <periodUnit value="d"/>
        <timeOfDay value="10:00:00" />  
    </repeat>
</timing>

Sub-element: event

A dosage instruction can specify specific dates and times for administration.

on 1st Nov 2019

<timing>
    <event value="2019-11-01" />
</timing>

on 1st Nov 2019 at 10:30 and again on 1st Dec 2019 at 22:30

<timing>
    <event value="2019-11-01T10:30" />
    <event value="2019-12-01T22:30" />
</timing>

Sub-element: code

Allows a code, often a Latin abbreviation, for a timing schedule to be specified, for example: BID = twice a day

Note: It is recommended that such codes are not used when the rest of the Dosage structure is supported by the system. Use the structures like frequency and period instead, so that a timing schedule can be computable.

back to top