HL7 FHIR® Implementation Guide: Electronic Case Reporting (eCR) - US Realm CI Build

This page is part of the electronic Case Reporting (eCR) (v1.0.0: STU 1) based on FHIR R4. The current version which supercedes this version is 2.1.0. For a full list of available versions, see the Directory of published versions

XML Format: PlanDefinition-plandefinition-ersd-instance

Raw xml


<PlanDefinition xmlns="http://hl7.org/fhir">
  <id value="plandefinition-ersd-instance"/>
  <meta>
    <versionId value="42"/>
    <lastUpdated value="2019-11-05T00:00:37.000+00:00"/>
    <profile
             value="http://hl7.org/fhir/us/ecr/StructureDefinition/ersd-plandefinition"/>
  </meta>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
      <table>
        <tr>
          <td style="font-weight: bold">id</td>
          <td>
            <div title="id">plandefinition-ersd-instance</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">meta</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">versionId</td>
                <td>
                  <div title="versionId">42</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">lastUpdated</td>
                <td>
                  <div title="lastUpdated">2019-11-04T19:00:37.000-05:00</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">profile</td>
                <td>
                  <div title="profile">http://hl7.org/fhir/us/ecr/StructureDefinition/ersd-plandefinition</div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">url</td>
          <td>
            <div title="url">http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">version</td>
          <td>
            <div title="version">0.1</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">name</td>
          <td>
            <div title="name">PlanDefinition_eRSD_Instance</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">title</td>
          <td>
            <div title="title">eRSD PlanDefinition Instance</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">type</td>
          <td>
            <ul style="list-style:none; padding-left:0; margin:0 0;">
              <li>
                <ul style="list-style:none; padding-left:0; margin:0 0;">
                  <li>
                    <div title="display">ECA Rule</div>  (<div title="code">eca-rule</div> )
          </li>
                  <li>
                    <div title="system">
                      <a href="http://terminology.hl7.org/CodeSystem/plan-definition-type">http://terminology.hl7.org/CodeSystem/plan-definition-type</a>
                    </div>
                  </li>
                </ul>
              </li>
            </ul>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">status</td>
          <td>
            <div title="status">active</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">date</td>
          <td>
            <div title="date">2019-09-15T12:49:11-04:00</div>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">action</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">description</td>
                <td>
                  <div title="description">
                    <p>This action represents the matching of a trigger code to one of the values in the eRSD value sets.</p>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">textEquivalent</td>
                <td>
                  <div title="textEquivalent">Match of a code to one of the values in the eRSD value sets.</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">CodeableConcept</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">codeFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">Condition.code</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">valueSet</td>
                                  <td>
                                    <div title="valueSet">http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">CodeableConcept</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">codeFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">Immunization.vaccineCode</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">valueSet</td>
                                  <td>
                                    <div title="valueSet">http://hl7.org/fhir/us/ecr/ValueSet/valueset-iztc-example</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">CodeableConcept</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">codeFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">ServiceRequest.code</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">valueSet</td>
                                  <td>
                                    <div title="valueSet">http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">CodeableConcept</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">codeFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">Observation.code</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">valueSet</td>
                                  <td>
                                    <div title="valueSet">http://hl7.org/fhir/us/ecr/ValueSet/valueset-lrtc-example</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">CodeableConcept</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">codeFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">MedicationAdministration.medicationCodeableConcept</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">valueSet</td>
                                  <td>
                                    <div title="valueSet">http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">CodeableConcept</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">codeFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">Observation.code</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">valueSet</td>
                                  <td>
                                    <div title="valueSet">http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">action</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">description</td>
                <td>
                  <div title="description">
                    <p>This action represents the initial creation of the eICR.</p>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">textEquivalent</td>
                <td>
                  <div title="textEquivalent">eICR construction delay (offsetDuration.value = x hours) - time after trigger event before an eICR should be created.</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">relatedAction</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">actionId</td>
                      <td>
                        <div title="actionId">match-trigger</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">relationship</td>
                      <td>
                        <div title="relationship">after</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">offsetDuration</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">value</td>
                            <td>
                              <div title="value">1</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">unit</td>
                            <td>
                              <div title="unit">h</div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">action</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">description</td>
                <td>
                  <div title="description">
                    <p>This action represents the periodic update of the eICR.</p>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">textEquivalent</td>
                <td>
                  <div title="textEquivalent">eICR periodic update (repeat.frequency = y hours) - the time after an initial eICR creation to send a new eICR as an update during long encounters.</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">periodic</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">timingTiming</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">repeat</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">frequency</td>
                                  <td>
                                    <div title="frequency">1</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">period</td>
                                  <td>
                                    <div title="period">24</div>
                                  </td>
                                </tr>
                                <tr>
                                  <td style="font-weight: bold">periodUnit</td>
                                  <td>
                                    <div title="periodUnit">h</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">condition</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">kind</td>
                      <td>
                        <div title="kind">start</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">expression</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">description</td>
                            <td>
                              <div title="description">
                                <p>Encounter is active.</p>
                              </div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">language</td>
                            <td>
                              <div title="language">text/cql</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">expression</td>
                            <td>
                              <div title="expression">encounter.period.start != null and encounter.period.end = null</div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">condition</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">kind</td>
                      <td>
                        <div title="kind">stop</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">expression</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">description</td>
                            <td>
                              <div title="description">
                                <p>Encounter is closed.</p>
                              </div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">language</td>
                            <td>
                              <div title="language">text/cql</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">expression</td>
                            <td>
                              <div title="expression">encounter.period.end != null</div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">relatedAction</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">actionId</td>
                      <td>
                        <div title="actionId">create-eicr</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">relationship</td>
                      <td>
                        <div title="relationship">after</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">offsetDuration</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">value</td>
                            <td>
                              <div title="value">24</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">unit</td>
                            <td>
                              <div title="unit">h</div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">action</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">description</td>
                <td>
                  <div title="description">
                    <p>This action represents the close out of an eICR encounter.</p>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">textEquivalent</td>
                <td>
                  <div title="textEquivalent">eICR encounter close out (timingTiming.repeat.duration = z hours) - the time after the end of the encounter to create the final eICR when there have been one or more trigger events.</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-added</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">Encounter</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">profile</td>
                            <td>
                              <div title="profile">http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-encounter</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">dateFilter</td>
                            <td>
                              <table>
                                <tr>
                                  <td style="font-weight: bold">path</td>
                                  <td>
                                    <div title="path">period.end</div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">relatedAction</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">actionId</td>
                      <td>
                        <div title="actionId">create-eicr</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">relationship</td>
                      <td>
                        <div title="relationship">after</div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">timingTiming</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">repeat</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">count</td>
                            <td>
                              <div title="count">1</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">duration</td>
                            <td>
                              <div title="duration">24</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">durationUnit</td>
                            <td>
                              <div title="durationUnit">h</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">frequency</td>
                            <td>
                              <div title="frequency">1</div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">action</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">description</td>
                <td>
                  <div title="description">
                    <p>This action represents the validation of an eICR.</p>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">textEquivalent</td>
                <td>
                  <div title="textEquivalent">Validate eICR.</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">trigger</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">type</td>
                      <td>
                        <div title="type">data-changed</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">name</td>
                      <td>
                        <div title="name">eicr-created</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">data</td>
                      <td>
                        <table>
                          <tr>
                            <td style="font-weight: bold">type</td>
                            <td>
                              <div title="type">Composition</div>
                            </td>
                          </tr>
                          <tr>
                            <td style="font-weight: bold">profile</td>
                            <td>
                              <div title="profile">http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition</div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td style="font-weight: bold">action</td>
          <td>
            <table>
              <tr>
                <td style="font-weight: bold">description</td>
                <td>
                  <div title="description">
                    <p>This action represents the routing and sending of an eICR.</p>
                  </div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">textEquivalent</td>
                <td>
                  <div title="textEquivalent">Route and send eICR</div>
                </td>
              </tr>
              <tr>
                <td style="font-weight: bold">relatedAction</td>
                <td>
                  <table>
                    <tr>
                      <td style="font-weight: bold">actionId</td>
                      <td>
                        <div title="actionId">validate-eicr</div>
                      </td>
                    </tr>
                    <tr>
                      <td style="font-weight: bold">relationship</td>
                      <td>
                        <div title="relationship">after</div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </div>
  </text>
  <url
       value="http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance"/>
  <version value="1.0.0"/>
  <name value="PlanDefinition_eRSD_Instance"/>
  <title value="eRSD PlanDefinition Instance"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
      <code value="eca-rule"/>
      <display value="ECA Rule"/>
    </coding>
  </type>
  <status value="active"/>
  <date value="2019-09-15T16:49:11+00:00"/>
  <action id="match-trigger">
    <description
                 value="This action represents the matching of a trigger code to one of the values in the eRSD value sets."/>
    <textEquivalent
                    value="Match of a code to one of the values in the eRSD value sets."/>
    <trigger>
      <type value="data-changed"/>
      <data>
        <type value="Condition"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example"/>
        </codeFilter>
      </data>
    </trigger>
    <trigger>
      <type value="data-changed"/>
      <data>
        <type value="Immunization"/>
        <codeFilter>
          <path value="vaccineCode"/>
          <valueSet
                    value="http://hl7.org/fhir/us/ecr/ValueSet/valueset-iztc-example"/>
        </codeFilter>
      </data>
    </trigger>
    <trigger>
      <type value="data-changed"/>
      <data>
        <type value="ServiceRequest"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"/>
        </codeFilter>
      </data>
    </trigger>
    <trigger>
      <type value="data-changed"/>
      <data>
        <type value="Observation"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/ecr/ValueSet/valueset-lrtc-example"/>
        </codeFilter>
      </data>
    </trigger>
    <trigger>
      <type value="data-changed"/>
      <data>
        <type value="MedicationAdministration"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"/>
        </codeFilter>
      </data>
    </trigger>
    <trigger>
      <type value="data-changed"/>
      <data>
        <type value="Observation"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example"/>
        </codeFilter>
      </data>
    </trigger>
  </action>
  <action id="create-eicr">
    <description
                 value="This action represents the initial creation of the eICR."/>
    <textEquivalent
                    value="eICR construction delay (offsetDuration.value = x hours) - time after trigger event before an eICR should be created."/>
    <relatedAction>
      <actionId value="match-trigger"/>
      <relationship value="after"/>
      <offsetDuration>
        <value value="1"/>
        <unit value="h"/>
      </offsetDuration>
    </relatedAction>
  </action>
  <action id="periodic-update-eicr">
    <description value="This action represents the periodic update of the eICR."/>
    <textEquivalent
                    value="eICR periodic update (repeat.frequency = y hours) - the time after an initial eICR creation to send a new eICR as an update during long encounters."/>
    <trigger>
      <type value="periodic"/>
      <timingTiming>
        <repeat>
          <frequency value="1"/>
          <period value="24"/>
          <periodUnit value="h"/>
        </repeat>
      </timingTiming>
    </trigger>
    <condition>
      <kind value="start"/>
      <expression>
        <description value="Encounter is active."/>
        <language value="text/cql"/>
        <expression
                    value="encounter.period.start != null and encounter.period.end = null"/>
      </expression>
    </condition>
    <condition>
      <kind value="stop"/>
      <expression>
        <description value="Encounter is closed."/>
        <language value="text/cql"/>
        <expression value="encounter.period.end != null"/>
      </expression>
    </condition>
    <relatedAction>
      <actionId value="create-eicr"/>
      <relationship value="after"/>
      <offsetDuration>
        <value value="24"/>
        <unit value="h"/>
      </offsetDuration>
    </relatedAction>
  </action>
  <action id="close-out-eicr">
    <description
                 value="This action represents the close out of an eICR encounter."/>
    <textEquivalent
                    value="eICR encounter close out (timingTiming.repeat.duration = z hours) - the time after the end of the encounter to create the final eICR when there have been one or more trigger events."/>
    <trigger>
      <type value="data-added"/>
      <data>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-encounter"/>
        <dateFilter>
          <path value="period.end"/>
        </dateFilter>
      </data>
    </trigger>
    <relatedAction>
      <actionId value="create-eicr"/>
      <relationship value="after"/>
    </relatedAction>
    <timingTiming>
      <repeat>
        <count value="1"/>
        <duration value="24"/>
        <durationUnit value="h"/>
        <frequency value="1"/>
      </repeat>
    </timingTiming>
  </action>
  <action id="validate-eicr">
    <description value="This action represents the validation of an eICR."/>
    <textEquivalent value="Validate eICR."/>
    <trigger>
      <type value="data-changed"/>
      <name value="eicr-created"/>
      <data>
        <type value="Composition"/>
        <profile
                 value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition"/>
      </data>
    </trigger>
  </action>
  <action id="route-and-send-eicr">
    <description
                 value="This action represents the routing and sending of an eICR."/>
    <textEquivalent value="Route and send eICR"/>
    <relatedAction>
      <actionId value="validate-eicr"/>
      <relationship value="after"/>
    </relatedAction>
  </action>
</PlanDefinition>