<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-core-Timing" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR Timing Profile</b>
      </p>
      <p>A timing schedule that specifies an event that may occur multiple times. Timing offers a choice of multiple OccurrenceTime (used is used to specify specific times), or recurrence patterns.</p>
      <p>
        <b>SHR Mapping Summary</b>
      </p>
      <p>
        <pre>shr.core.Timing maps to Timing:
  OccurrenceTime maps to event
  TimingCode maps to code
  EventDuration.DurationRange.LowerBound maps to repeat.duration
  EventDuration.DurationRange.UpperBound maps to repeat.durationMax
  EventDuration.DurationRange.LowerBound.Quantity.Units.Coding.code maps to repeat.durationUnit
  RecurrencePattern.RecurrenceInterval.Duration maps to repeat.period
  constrain repeat.periodMax to 0..0
  RecurrencePattern.RecurrenceInterval.Duration.Units.Coding.code maps to repeat.periodUnit
  RecurrencePattern.DayOfWeek maps to repeat.dayOfWeek
  RecurrencePattern.TimeOfDay maps to repeat.timeOfDay
  RecurrencePattern.DailyLifeEvent maps to repeat.when
  RecurrencePattern.LifeEventOffset maps to repeat.offset
  RecurrencePattern.CountPerInterval.MinCount maps to repeat.frequency
  RecurrencePattern.CountPerInterval.MaxCount maps to repeat.frequencyMax
</pre>
      </p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Timing" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.core.Timing" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR Timing Profile" />
  <status value="draft" />
  <date value="2017-12-20" />
  <publisher value="The MITRE Corporation: Standard Health Record Collaborative" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://standardhealthrecord.org" />
    </telecom>
  </contact>
  <description value="A timing schedule that specifies an event that may occur multiple times. Timing offers a choice of multiple OccurrenceTime (used is used to specify specific times), or recurrence patterns." />
  <purpose value="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." />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Timing" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Timing" />
  <derivation value="constraint" />
  <differential>
    <element id="Timing:shr-core-Timing">
      <path value="Timing" />
      <short value="SHR Timing Profile" />
      <definition value="A timing schedule that specifies an event that may occur multiple times. Timing offers a choice of multiple OccurrenceTime (used is used to specify specific times), or recurrence patterns." />
    </element>
    <element id="Timing:shr-core-Timing.extension:recurrencerange">
      <path value="Timing.extension" />
      <sliceName value="recurrencerange" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <definition value="The start and end of the overall recurrence pattern in terms of dates/times or in terms of number of repeats. Could also be an event, such as when all doses are taken." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-RecurrenceRange-extension" />
      </type>
    </element>
    <element id="Timing:shr-core-Timing.repeat">
      <path value="Timing.repeat" />
    </element>
    <element id="Timing:shr-core-Timing.repeat.periodMax">
      <path value="Timing.repeat.periodMax" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Timing:shr-core-Timing.code">
      <path value="Timing.code" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TimingAbbreviation" />
        </extension>
        <strength value="extensible" />
        <description value="Code for a known / defined timing pattern." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/timing-abbreviation" />
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>