PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.r3.examples@3.0.2
    http://hl7.org/fhir/StructureDefinition/Timing
{
  "description": "Base StructureDefinition for Timing Type",
  "_filename": "StructureDefinition-Timing.json",
  "package_name": "hl7.fhir.r3.examples",
  "date": "2019-10-24T11:53:00+11:00",
  "derivation": "specialization",
  "meta": {
    "lastUpdated": "2019-10-24T11:53:00+11:00"
  },
  "publisher": "HL7 FHIR Standard",
  "fhirVersion": "3.0.2",
  "purpose": "Need to able to track proposed timing schedules. There are several different ways to do this: one or more specified times, a simple rules like three times a day, or  before/after meals.",
  "name": "Timing",
  "mapping": [ {
    "uri": "http://hl7.org/v2",
    "name": "HL7 v2 Mapping",
    "identity": "v2"
  }, {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  } ],
  "abstract": false,
  "type": "Timing",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "3.0.2",
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "Element",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      } ],
      "path": "Timing",
      "min": 0,
      "definition": "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.",
      "short": "A timing schedule that specifies an event that may occur multiple times",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "QSET (GTS)",
        "identity": "rim"
      } ],
      "max": "*",
      "id": "Timing",
      "condition": [ "ele-1" ],
      "comment": "A timing schedule can be either a list of events - intervals on which the event occurs, or a single event with repeating criteria or just repeating criteria with no actual event.  When both event and a repeating specification are provided, the list of events should be understood as an interpretation of the information in the repeat structure."
    }, {
      "path": "Timing.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Timing.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "path": "Timing.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Timing.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "path": "Timing.event",
      "requirements": "In an MAR, for instance, you need to take a general specification, and turn it into a precise specification.",
      "min": 0,
      "definition": "Identifies specific times when the event occurs.",
      "short": "When the event occurs",
      "mapping": [ {
        "map": "QLIST",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "*",
      "id": "Timing.event",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "Element",
        "severity": "error",
        "expression": "hasValue() | (children().count() > id.count())"
      }, {
        "key": "tim-9",
        "human": "If there's an offset, there must be a when (and not C, CM, CD, CV)",
        "xpath": "not(exists(f:offset)) or exists(f:when)",
        "severity": "error",
        "expression": "offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))"
      }, {
        "key": "tim-5",
        "human": "period SHALL be a non-negative value",
        "xpath": "f:period/@value >= 0 or not(f:period/@value)",
        "severity": "error",
        "expression": "period.exists() implies period >= 0"
      }, {
        "key": "tim-6",
        "human": "If there's a periodMax, there must be a period",
        "xpath": "not(exists(f:periodMax)) or exists(f:period)",
        "severity": "error",
        "expression": "periodMax.empty() or period.exists()"
      }, {
        "key": "tim-7",
        "human": "If there's a durationMax, there must be a duration",
        "xpath": "not(exists(f:durationMax)) or exists(f:duration)",
        "severity": "error",
        "expression": "durationMax.empty() or duration.exists()"
      }, {
        "key": "tim-8",
        "human": "If there's a countMax, there must be a count",
        "xpath": "not(exists(f:countMax)) or exists(f:count)",
        "severity": "error",
        "expression": "countMax.empty() or count.exists()"
      }, {
        "key": "tim-1",
        "human": "if there's a duration, there needs to be duration units",
        "xpath": "not(exists(f:duration)) or exists(f:durationUnit)",
        "severity": "error",
        "expression": "duration.empty() or durationUnit.exists()"
      }, {
        "key": "tim-10",
        "human": "If there's a timeOfDay, there cannot be be a when, or vice versa",
        "xpath": "not(exists(f:timeOfDay)) or not(exists(f:when))",
        "severity": "error",
        "expression": "timeOfDay.empty() or when.empty()"
      }, {
        "key": "tim-2",
        "human": "if there's a period, there needs to be period units",
        "xpath": "not(exists(f:period)) or exists(f:periodUnit)",
        "severity": "error",
        "expression": "period.empty() or periodUnit.exists()"
      }, {
        "key": "tim-4",
        "human": "duration SHALL be a non-negative value",
        "xpath": "f:duration/@value >= 0 or not(f:duration/@value)",
        "severity": "error",
        "expression": "duration.exists() implies duration >= 0"
      } ],
      "path": "Timing.repeat",
      "requirements": "Many timing schedules are determined by regular repetitions.",
      "min": 0,
      "definition": "A set of rules that describe when the event is scheduled.",
      "short": "When the event is to occur",
      "mapping": [ {
        "map": "Implies PIVL or EIVL",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Element"
      } ],
      "max": "1",
      "id": "Timing.repeat",
      "isSummary": true
    }, {
      "path": "Timing.repeat.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Timing.repeat.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "path": "Timing.repeat.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Timing.repeat.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "path": "Timing.repeat.bounds[x]",
      "min": 0,
      "definition": "Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.",
      "short": "Length/Range of lengths, or (Start and/or end) limits",
      "mapping": [ {
        "map": "IVL(TS) used in a QSI",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Duration"
      }, {
        "code": "Range"
      }, {
        "code": "Period"
      } ],
      "max": "1",
      "id": "Timing.repeat.bounds[x]",
      "isSummary": true
    }, {
      "path": "Timing.repeat.count",
      "requirements": "Repetitions may be limited by end time or total occurrences.",
      "min": 0,
      "definition": "A total count of the desired number of repetitions.",
      "short": "Number of times to repeat",
      "mapping": [ {
        "map": "PIVL.count",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.count",
      "comment": "If you have both bounds and count, then this should be understood as within the bounds period, until count times happens.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.countMax",
      "min": 0,
      "definition": "A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).",
      "short": "Maximum number of times to repeat",
      "mapping": [ {
        "map": "PIVL.count",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.countMax",
      "isSummary": true
    }, {
      "path": "Timing.repeat.duration",
      "requirements": "Some activities are not instantaneous and need to be maintained for a period of time.",
      "min": 0,
      "definition": "How long this thing happens for when it happens.",
      "short": "How long when it happens",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.duration",
      "comment": "For some events the duration is part of the definition of the event (e.g. IV infusions, where the duration is implicit in the specified quantity and rate). For others, it's part of the timing specification (e.g. exercise).",
      "isSummary": true
    }, {
      "path": "Timing.repeat.durationMax",
      "requirements": "Some activities are not instantaneous and need to be maintained for a period of time.",
      "min": 0,
      "definition": "The upper limit of how long this thing happens for when it happens.",
      "short": "How long when it happens (Max)",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.durationMax",
      "comment": "For some events the duration is part of the definition of the event (e.g. IV infusions, where the duration is implicit in the specified quantity and rate). For others, it's part of the timing specification (e.g. exercise).",
      "isSummary": true
    }, {
      "path": "Timing.repeat.durationUnit",
      "min": 0,
      "definition": "The units of time for the duration, in UCUM units.",
      "short": "s | min | h | d | wk | mo | a - unit of time (UCUM)",
      "mapping": [ {
        "map": "PIVL.phase.unit",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "UnitsOfTime"
        } ],
        "description": "A unit of time (units from UCUM).",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/units-of-time"
        }
      },
      "max": "1",
      "id": "Timing.repeat.durationUnit",
      "isSummary": true
    }, {
      "path": "Timing.repeat.frequency",
      "min": 0,
      "definition": "The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).",
      "short": "Event occurs frequency times per period",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.frequency",
      "defaultValueInteger": 1,
      "isSummary": true
    }, {
      "path": "Timing.repeat.frequencyMax",
      "min": 0,
      "definition": "If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.",
      "short": "Event occurs up to frequencyMax times per period",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.frequencyMax",
      "isSummary": true
    }, {
      "path": "Timing.repeat.period",
      "min": 0,
      "definition": "Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period.",
      "short": "Event occurs frequency times per period",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.period",
      "isSummary": true
    }, {
      "path": "Timing.repeat.periodMax",
      "min": 0,
      "definition": "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days.",
      "short": "Upper limit of period (3-4 hours)",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.periodMax",
      "isSummary": true
    }, {
      "path": "Timing.repeat.periodUnit",
      "min": 0,
      "definition": "The units of time for the period in UCUM units.",
      "short": "s | min | h | d | wk | mo | a - unit of time (UCUM)",
      "mapping": [ {
        "map": "PIVL.phase.unit",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "UnitsOfTime"
        } ],
        "description": "A unit of time (units from UCUM).",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/units-of-time"
        }
      },
      "max": "1",
      "id": "Timing.repeat.periodUnit",
      "isSummary": true
    }, {
      "path": "Timing.repeat.dayOfWeek",
      "min": 0,
      "definition": "If one or more days of week is provided, then the action happens only on the specified day(s).",
      "short": "mon | tue | wed | thu | fri | sat | sun",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "DayOfWeek"
        } ],
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/days-of-week"
        }
      },
      "max": "*",
      "id": "Timing.repeat.dayOfWeek",
      "comment": "If no days are specified, the action is assumed to happen every day as otherwise specified. The elements frequency and period cannot be used as well as dayOfWeek.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.timeOfDay",
      "min": 0,
      "definition": "Specified time of day for action to take place.",
      "short": "Time of day for action",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "time"
      } ],
      "max": "*",
      "id": "Timing.repeat.timeOfDay",
      "comment": "When time of day is specified, it is inferred that the action happens every day (as filtered by dayofWeek) on the specified times. The elements when, frequency and period cannot be used as well as timeOfDay.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.when",
      "requirements": "Timings are frequently determined by occurrences such as waking, eating and sleep.",
      "min": 0,
      "definition": "Real world events that the occurrence of the event should be tied to.",
      "short": "Regular life events the event is tied to",
      "mapping": [ {
        "map": "EIVL.event",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "EventTiming"
        } ],
        "description": "Real world event relating to the schedule.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/event-timing"
        }
      },
      "max": "*",
      "id": "Timing.repeat.when",
      "comment": "When more than one event is listed, the event is tied to the union of the specified events.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.offset",
      "min": 0,
      "definition": "The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.",
      "short": "Minutes from event (before or after)",
      "mapping": [ {
        "map": "EIVL.offset",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "unsignedInt"
      } ],
      "max": "1",
      "id": "Timing.repeat.offset",
      "isSummary": true
    }, {
      "path": "Timing.code",
      "min": 0,
      "definition": "A code for the timing schedule. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).",
      "short": "BID | TID | QID | AM | PM | QD | QOD | Q4H | Q6H +",
      "mapping": [ {
        "map": "QSC.code",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "preferred",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "TimingAbbreviation"
        } ],
        "description": "Code for a known / defined timing pattern.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/timing-abbreviation"
        }
      },
      "max": "1",
      "id": "Timing.code",
      "comment": "BID etc are defined as 'at institutionally specified times'. For example, an institution may choose that BID is \"always at 7am and 6pm\".  If it is inappropriate for this choice to be made, the code BID should not be used. Instead, a distinct organization-specific code should be used in place of the HL7-defined BID code and/or the a structured representation should be used (in this case, specifying the two event times).",
      "isSummary": true
    } ]
  },
  "status": "draft",
  "id": "0c14cfec-5397-4a91-b6b2-dc0502a60376",
  "kind": "complex-type",
  "url": "http://hl7.org/fhir/StructureDefinition/Timing",
  "version": null,
  "differential": {
    "element": [ {
      "id": "Timing",
      "max": "*",
      "min": 0,
      "path": "Timing",
      "short": "A timing schedule that specifies an event that may occur multiple times",
      "comment": "A timing schedule can be either a list of events - intervals on which the event occurs, or a single event with repeating criteria or just repeating criteria with no actual event.  When both event and a repeating specification are provided, the list of events should be understood as an interpretation of the information in the repeat structure.",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "QSET (GTS)",
        "identity": "rim"
      } ],
      "definition": "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."
    }, {
      "path": "Timing.event",
      "requirements": "In an MAR, for instance, you need to take a general specification, and turn it into a precise specification.",
      "min": 0,
      "definition": "Identifies specific times when the event occurs.",
      "short": "When the event occurs",
      "mapping": [ {
        "map": "QLIST",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "*",
      "id": "Timing.event",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "tim-9",
        "human": "If there's an offset, there must be a when (and not C, CM, CD, CV)",
        "xpath": "not(exists(f:offset)) or exists(f:when)",
        "severity": "error",
        "expression": "offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))"
      }, {
        "key": "tim-5",
        "human": "period SHALL be a non-negative value",
        "xpath": "f:period/@value >= 0 or not(f:period/@value)",
        "severity": "error",
        "expression": "period.exists() implies period >= 0"
      }, {
        "key": "tim-6",
        "human": "If there's a periodMax, there must be a period",
        "xpath": "not(exists(f:periodMax)) or exists(f:period)",
        "severity": "error",
        "expression": "periodMax.empty() or period.exists()"
      }, {
        "key": "tim-7",
        "human": "If there's a durationMax, there must be a duration",
        "xpath": "not(exists(f:durationMax)) or exists(f:duration)",
        "severity": "error",
        "expression": "durationMax.empty() or duration.exists()"
      }, {
        "key": "tim-8",
        "human": "If there's a countMax, there must be a count",
        "xpath": "not(exists(f:countMax)) or exists(f:count)",
        "severity": "error",
        "expression": "countMax.empty() or count.exists()"
      }, {
        "key": "tim-1",
        "human": "if there's a duration, there needs to be duration units",
        "xpath": "not(exists(f:duration)) or exists(f:durationUnit)",
        "severity": "error",
        "expression": "duration.empty() or durationUnit.exists()"
      }, {
        "key": "tim-10",
        "human": "If there's a timeOfDay, there cannot be be a when, or vice versa",
        "xpath": "not(exists(f:timeOfDay)) or not(exists(f:when))",
        "severity": "error",
        "expression": "timeOfDay.empty() or when.empty()"
      }, {
        "key": "tim-2",
        "human": "if there's a period, there needs to be period units",
        "xpath": "not(exists(f:period)) or exists(f:periodUnit)",
        "severity": "error",
        "expression": "period.empty() or periodUnit.exists()"
      }, {
        "key": "tim-4",
        "human": "duration SHALL be a non-negative value",
        "xpath": "f:duration/@value >= 0 or not(f:duration/@value)",
        "severity": "error",
        "expression": "duration.exists() implies duration >= 0"
      } ],
      "path": "Timing.repeat",
      "requirements": "Many timing schedules are determined by regular repetitions.",
      "min": 0,
      "definition": "A set of rules that describe when the event is scheduled.",
      "short": "When the event is to occur",
      "mapping": [ {
        "map": "Implies PIVL or EIVL",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Element"
      } ],
      "max": "1",
      "id": "Timing.repeat",
      "isSummary": true
    }, {
      "path": "Timing.repeat.bounds[x]",
      "min": 0,
      "definition": "Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.",
      "short": "Length/Range of lengths, or (Start and/or end) limits",
      "mapping": [ {
        "map": "IVL(TS) used in a QSI",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Duration"
      }, {
        "code": "Range"
      }, {
        "code": "Period"
      } ],
      "max": "1",
      "id": "Timing.repeat.bounds[x]",
      "isSummary": true
    }, {
      "path": "Timing.repeat.count",
      "requirements": "Repetitions may be limited by end time or total occurrences.",
      "min": 0,
      "definition": "A total count of the desired number of repetitions.",
      "short": "Number of times to repeat",
      "mapping": [ {
        "map": "PIVL.count",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.count",
      "comment": "If you have both bounds and count, then this should be understood as within the bounds period, until count times happens.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.countMax",
      "min": 0,
      "definition": "A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).",
      "short": "Maximum number of times to repeat",
      "mapping": [ {
        "map": "PIVL.count",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.countMax",
      "isSummary": true
    }, {
      "path": "Timing.repeat.duration",
      "requirements": "Some activities are not instantaneous and need to be maintained for a period of time.",
      "min": 0,
      "definition": "How long this thing happens for when it happens.",
      "short": "How long when it happens",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.duration",
      "comment": "For some events the duration is part of the definition of the event (e.g. IV infusions, where the duration is implicit in the specified quantity and rate). For others, it's part of the timing specification (e.g. exercise).",
      "isSummary": true
    }, {
      "path": "Timing.repeat.durationMax",
      "requirements": "Some activities are not instantaneous and need to be maintained for a period of time.",
      "min": 0,
      "definition": "The upper limit of how long this thing happens for when it happens.",
      "short": "How long when it happens (Max)",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.durationMax",
      "comment": "For some events the duration is part of the definition of the event (e.g. IV infusions, where the duration is implicit in the specified quantity and rate). For others, it's part of the timing specification (e.g. exercise).",
      "isSummary": true
    }, {
      "path": "Timing.repeat.durationUnit",
      "min": 0,
      "definition": "The units of time for the duration, in UCUM units.",
      "short": "s | min | h | d | wk | mo | a - unit of time (UCUM)",
      "mapping": [ {
        "map": "PIVL.phase.unit",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "UnitsOfTime"
        } ],
        "description": "A unit of time (units from UCUM).",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/units-of-time"
        }
      },
      "max": "1",
      "id": "Timing.repeat.durationUnit",
      "isSummary": true
    }, {
      "path": "Timing.repeat.frequency",
      "min": 0,
      "definition": "The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).",
      "short": "Event occurs frequency times per period",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.frequency",
      "defaultValueInteger": 1,
      "isSummary": true
    }, {
      "path": "Timing.repeat.frequencyMax",
      "min": 0,
      "definition": "If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.",
      "short": "Event occurs up to frequencyMax times per period",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "integer"
      } ],
      "max": "1",
      "id": "Timing.repeat.frequencyMax",
      "isSummary": true
    }, {
      "path": "Timing.repeat.period",
      "min": 0,
      "definition": "Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period.",
      "short": "Event occurs frequency times per period",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.period",
      "isSummary": true
    }, {
      "path": "Timing.repeat.periodMax",
      "min": 0,
      "definition": "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days.",
      "short": "Upper limit of period (3-4 hours)",
      "mapping": [ {
        "map": "PIVL.phase",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "decimal"
      } ],
      "max": "1",
      "id": "Timing.repeat.periodMax",
      "isSummary": true
    }, {
      "path": "Timing.repeat.periodUnit",
      "min": 0,
      "definition": "The units of time for the period in UCUM units.",
      "short": "s | min | h | d | wk | mo | a - unit of time (UCUM)",
      "mapping": [ {
        "map": "PIVL.phase.unit",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "UnitsOfTime"
        } ],
        "description": "A unit of time (units from UCUM).",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/units-of-time"
        }
      },
      "max": "1",
      "id": "Timing.repeat.periodUnit",
      "isSummary": true
    }, {
      "path": "Timing.repeat.dayOfWeek",
      "min": 0,
      "definition": "If one or more days of week is provided, then the action happens only on the specified day(s).",
      "short": "mon | tue | wed | thu | fri | sat | sun",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "DayOfWeek"
        } ],
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/days-of-week"
        }
      },
      "max": "*",
      "id": "Timing.repeat.dayOfWeek",
      "comment": "If no days are specified, the action is assumed to happen every day as otherwise specified. The elements frequency and period cannot be used as well as dayOfWeek.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.timeOfDay",
      "min": 0,
      "definition": "Specified time of day for action to take place.",
      "short": "Time of day for action",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "time"
      } ],
      "max": "*",
      "id": "Timing.repeat.timeOfDay",
      "comment": "When time of day is specified, it is inferred that the action happens every day (as filtered by dayofWeek) on the specified times. The elements when, frequency and period cannot be used as well as timeOfDay.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.when",
      "requirements": "Timings are frequently determined by occurrences such as waking, eating and sleep.",
      "min": 0,
      "definition": "Real world events that the occurrence of the event should be tied to.",
      "short": "Regular life events the event is tied to",
      "mapping": [ {
        "map": "EIVL.event",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "EventTiming"
        } ],
        "description": "Real world event relating to the schedule.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/event-timing"
        }
      },
      "max": "*",
      "id": "Timing.repeat.when",
      "comment": "When more than one event is listed, the event is tied to the union of the specified events.",
      "isSummary": true
    }, {
      "path": "Timing.repeat.offset",
      "min": 0,
      "definition": "The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.",
      "short": "Minutes from event (before or after)",
      "mapping": [ {
        "map": "EIVL.offset",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "unsignedInt"
      } ],
      "max": "1",
      "id": "Timing.repeat.offset",
      "isSummary": true
    }, {
      "path": "Timing.code",
      "min": 0,
      "definition": "A code for the timing schedule. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).",
      "short": "BID | TID | QID | AM | PM | QD | QOD | Q4H | Q6H +",
      "mapping": [ {
        "map": "QSC.code",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "preferred",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "TimingAbbreviation"
        } ],
        "description": "Code for a known / defined timing pattern.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/timing-abbreviation"
        }
      },
      "max": "1",
      "id": "Timing.code",
      "comment": "BID etc are defined as 'at institutionally specified times'. For example, an institution may choose that BID is \"always at 7am and 6pm\".  If it is inappropriate for this choice to be made, the code BID should not be used. Instead, a distinct organization-specific code should be used in place of the HL7-defined BID code and/or the a structured representation should be used (in this case, specifying the two event times).",
      "isSummary": true
    } ]
  },
  "contact": [ {
    "telecom": [ {
      "value": "http://hl7.org/fhir",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element"
}