Frequency
A structured frequency specification for recurring activities that defines how often something occurs within a time period. Captures count of occurrences, period duration, timing constraints, and bounds. Commonly used for medication schedules, calendar events, task reminders, and any recurring activity pattern.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| count | number | stored | Number of times the activity occurs within the period Example: | Required |
| period | number | stored | Duration of one period Example: | Required |
| periodUnit | string | stored | Unit of the period Values: Example: | Required |
| interval | number | stored | Spacing between periods (e.g., 2 for 'every 2 weeks') Example: | Optional |
| timeOfDay | string[] | stored | Specific times of day for the activity (24h format) Example: | Optional |
| dayOfWeek | string[] | stored | Specific days of the week Example: | Optional |
| dayOfMonth | number[] | stored | Specific days of the month (1-31) Example: | Optional |
| when | string | stored | Event-relative timing description Values: Example: | Optional |
| duration | number | stored | How long each occurrence lasts Example: | Optional |
| durationUnit | string | stored | Unit for duration Values: Example: | Optional |
| maxOccurrences | number | stored | Maximum total number of occurrences (for finite recurrence) | Optional |
| maxPerDay | number | stored | Maximum occurrences per day regardless of frequency Example: | Optional |
| startDate | Date | stored | When the frequency pattern begins | Optional |
| endDate | Date | stored | When the frequency pattern ends | Optional |
| asNeeded | boolean | stored | Whether the activity is performed as needed (PRN) | Optional |
| displayText | string | calculated | Human-readable frequency text Example: | Optional |
Examples
Example 1
{
"@type": "Frequency",
"count": 1,
"period": 1,
"periodUnit": "day",
"timeOfDay": [
"08:00"
]
}Example 2
{
"@type": "Frequency",
"count": 2,
"period": 1,
"periodUnit": "day",
"timeOfDay": [
"08:00",
"20:00"
]
}Example 3
{
"@type": "Frequency",
"count": 3,
"period": 1,
"periodUnit": "day",
"when": "with-meal"
}Example 4
{
"@type": "Frequency",
"count": 1,
"period": 1,
"periodUnit": "week",
"dayOfWeek": [
"monday",
"wednesday",
"friday"
],
"timeOfDay": [
"09:00"
]
}Example 5
{
"@type": "Frequency",
"count": 1,
"period": 2,
"periodUnit": "week",
"interval": 2,
"dayOfWeek": [
"tuesday"
]
}Example 6
{
"@type": "Frequency",
"count": 1,
"period": 1,
"periodUnit": "month",
"dayOfMonth": [
1,
15
]
}Example 7
{
"@type": "Frequency",
"count": 1,
"period": 4,
"periodUnit": "hour",
"maxPerDay": 6,
"asNeeded": true
}Example 8
{
"@type": "Frequency",
"count": 1,
"period": 1,
"periodUnit": "day",
"duration": 30,
"durationUnit": "minute",
"timeOfDay": [
"07:00"
]
}