US Public Health Profiles Library
1.0.0 - STU1

US Public Health Profiles Library, published by HL7 Public Health Working Group. This is not an authorized publication; it is the continuous build for version 1.0.0). This version is based on the current content of https://github.com/HL7/fhir-us-ph-common-library-ig/ and changes regularly. See the Directory of published versions

## : US Public Health PlanDefinition - Alternative Expression - XML Representation

Active as of 2022-07-31

Raw xml | Download

    <PlanDefinition xmlns="http://hl7.org/fhir">
      <id value="us-ph-plandefinition-alt-expression-example"/>
      <meta>
        <profile
                 value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-plandefinition"/>
      </meta>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative: PlanDefinition</b><a name="us-ph-plandefinition-alt-expression-example"> </a></p><div style="display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%"><p style="margin-bottom: 0px">Resource PlanDefinition &quot;us-ph-plandefinition-alt-expression-example&quot; </p><p style="margin-bottom: 0px">Profile: <a href="StructureDefinition-us-ph-plandefinition.html">US Public Health PlanDefinition</a></p></div><p><b>url</b>: <code>http://example.org/fhir/PlanDefinition/us-ph-plandefinition-alt-expression-example</code></p><p><b>version</b>: 1.0.0</p><p><b>name</b>: USPublicHealthPlanDefinitionAlternativeExpressionExample</p><p><b>title</b>: US Public Health PlanDefinition Alternative Expression Example</p><p><b>type</b>: Workflow Definition <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="http://terminology.hl7.org/5.0.0/CodeSystem-plan-definition-type.html">PlanDefinitionType</a>#workflow-definition)</span></p><p><b>status</b>: active</p><p><b>experimental</b>: true</p><p><b>date</b>: 2022-07-31 12:32:29-0500</p><p><b>publisher</b>: HL7 Public Health Working Group</p><p><b>contact</b>: HL7 Public Health Working Group: <a href="http://www.hl7.org/Special/committees/pher">http://www.hl7.org/Special/committees/pher</a>,<a href="mailto:pher@lists.HL7.org">pher@lists.HL7.org</a></p><p><b>description</b>: An example PlanDefinition</p><p><b>jurisdiction</b>: United States of America <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="http://terminology.hl7.org/5.0.0/CodeSystem-ISO3166Part1.html">ISO 3166-1 Codes for the representation of names of countries and their subdivisions — Part 1: Country code</a>#US)</span></p><p><b>effectivePeriod</b>: 2020-12-01 --&gt; (ongoing)</p><h3>RelatedArtifacts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Label</b></td><td><b>Resource</b></td></tr><tr><td style="display: none">*</td><td>depends-on</td><td>RCTC Value Set Library of Trigger Codes</td><td><a href="http://example.org/fhir/Library/library-rctc-example">http://example.org/fhir/Library/library-rctc-example</a></td></tr></table><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>start-workflow</blockquote><p><b>description</b>: This action represents the start of the reporting workflow in response to the encounter-start event.</p><p><b>textEquivalent</b>: Start the reporting workflow in response to an encounter-start event</p><p><b>code</b>: Initiate a reporting workflow <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#initiate-reporting-workflow)</span></p><blockquote><p><b>trigger</b></p><blockquote><p><b>id</b></p>encounter-start</blockquote><p><b>US Public Health Named Event Type Extension</b>: Indicates the start of an encounter <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-triggerdefinition-namedevents.html">US Public Health CodeSystem - Trigger Definition Named Events</a>#encounter-start)</span></p><p><b>type</b>: named-event</p><p><b>name</b>: encounter-start</p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>patient</blockquote><p><b>US Public Health FHIR Query Pattern Extension</b>: Patient/{{context.patientId}}</p><p><b>type</b>: Patient</p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>encounter</blockquote><p><b>US Public Health FHIR Query Pattern Extension</b>: Encounter/{{context.encounterId}}</p><p><b>type</b>: Encounter</p></blockquote><h3>RelatedActions</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ActionId</b></td><td><b>Relationship</b></td><td><b>Offset[x]</b></td></tr><tr><td style="display: none">*</td><td>check-suspected-disorder</td><td>before-start</td><td>1 h<span style="background: LightGoldenRodYellow"> (Details: UCUM code h = 'h')</span></td></tr></table></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>check-suspected-disorder</blockquote><p><b>description</b>: This action represents the start of the check suspected disorder reporting workflow in response to the encounter-start event.</p><p><b>textEquivalent</b>: Check suspected disorders for immediate reportability and setup jobs for future reportability checks.</p><p><b>code</b>: Execute a series of actions to accomplish reporting <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#execute-reporting-workflow)</span></p><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>is-encounter-suspected-disorder</blockquote><p><b>description</b>: This action represents the check for suspected disorder reportability to create the patients eICR.</p><p><b>textEquivalent</b>: Check Trigger Codes based on Suspected Reportable Value set.</p><p><b>code</b>: Evaluate candidate patient's data against trigger codes to determine reportability <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#check-trigger-codes)</span></p><blockquote><p><b>condition</b></p></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/condition.html">Condition</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-sdtc-example">http://example.org/fhir/ValueSet/valueset-sdtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/observation.html">Observation</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>value</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-sdtc-example">http://example.org/fhir/ValueSet/valueset-sdtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>medication</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-sdtc-example">http://example.org/fhir/ValueSet/valueset-sdtc-example</a></td></tr></table></blockquote><blockquote><p><b>relatedAction</b></p></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>continue-check-reportable</blockquote><p><b>code</b>: Evaluate condition to determine reportability <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#evaluate-condition)</span></p><blockquote><p><b>condition</b></p></blockquote><blockquote><p><b>relatedAction</b></p></blockquote></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>check-reportable</blockquote><p><b>description</b>: This action represents the check for suspected reportability of the eICR.</p><p><b>textEquivalent</b>: Check Reportability and setup jobs for future reportability checks.</p><p><b>code</b>: Execute a series of actions to accomplish reporting <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#execute-reporting-workflow)</span></p><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>is-encounter-reportable</blockquote><p><b>description</b>: This action represents the check for reportability to create the patients eICR.</p><p><b>textEquivalent</b>: Check Trigger Codes based on RCTC Value sets.</p><p><b>code</b>: Evaluate candidate patient's data against trigger codes to determine reportability <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#check-trigger-codes)</span></p><blockquote><p><b>condition</b></p></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/condition.html">Condition</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-dxtc-example">http://example.org/fhir/ValueSet/valueset-dxtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>reasonCode</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-dxtc-example">http://example.org/fhir/ValueSet/valueset-dxtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/immunization.html">Immunization</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>vaccineCode</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-mrtc-example">http://example.org/fhir/ValueSet/valueset-mrtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-lotc-example">http://example.org/fhir/ValueSet/valueset-lotc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/observation.html">Observation</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-lotc-example">http://example.org/fhir/ValueSet/valueset-lotc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/diagnosticreport.html">DiagnosticReport</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-lotc-example">http://example.org/fhir/ValueSet/valueset-lotc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-pctc-example">http://example.org/fhir/ValueSet/valueset-pctc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-pctc-example">http://example.org/fhir/ValueSet/valueset-pctc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>medication</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-mrtc-example">http://example.org/fhir/ValueSet/valueset-mrtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/medicationdispense.html">MedicationDispense</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>medication</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-mrtc-example">http://example.org/fhir/ValueSet/valueset-mrtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>medication</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-mrtc-example">http://example.org/fhir/ValueSet/valueset-mrtc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/observation.html">Observation</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>value</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-ostc-example">http://example.org/fhir/ValueSet/valueset-ostc-example</a></td></tr></table></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/diagnosticreport.html">DiagnosticReport</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>In ValueSet <a href="http://example.org/fhir/ValueSet/valueset-ostc-example">http://example.org/fhir/ValueSet/valueset-ostc-example</a></td></tr></table></blockquote><blockquote><p><b>relatedAction</b></p></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>check-update-eicr</blockquote><p><b>code</b>: Evaluate condition to determine reportability <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#evaluate-condition)</span></p><blockquote><p><b>condition</b></p></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a> (<a href="StructureDefinition-us-ph-document-bundle.html">US Public Health Document Bundle</a>)</td></tr></table></blockquote><blockquote><p><b>relatedAction</b></p></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>is-encounter-in-progress</blockquote><p><b>code</b>: Evaluate condition to determine reportability <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#evaluate-condition)</span></p><blockquote><p><b>condition</b></p></blockquote><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a></td></tr></table></blockquote><blockquote><p><b>relatedAction</b></p></blockquote></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>create-eicr</blockquote><p><b>description</b>: This action represents the creation of the eICR. It subsequently calls validate.</p><p><b>textEquivalent</b>: Create eICR</p><p><b>code</b>: Create a Report containing Patient's data for patients who passed the check-reportability test <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#create-report)</span></p><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>patientdata</blockquote><p><b>US Public Health Related Data Extension</b>: patient</p><p><b>type</b>: Patient</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-patient.html">US Core Patient Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>conditiondata</blockquote><p><b>US Public Health Related Data Extension</b>: conditions</p><p><b>type</b>: Condition</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-condition-encounter-diagnosis.html">US Core Condition Encounter Diagnosis Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>encounterdata</blockquote><p><b>US Public Health Related Data Extension</b>: encounter</p><p><b>type</b>: Encounter</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-encounter.html">US Core Encounter Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>mrdata</blockquote><p><b>US Public Health Related Data Extension</b>: medicationOrders</p><p><b>type</b>: MedicationRequest</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-medicationrequest.html">US Core MedicationRequest Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>immzdata</blockquote><p><b>US Public Health Related Data Extension</b>: immunizations</p><p><b>type</b>: Immunization</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-immunization.html">US Core Immunization Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>procdata</blockquote><p><b>US Public Health Related Data Extension</b>: procedures</p><p><b>type</b>: Procedure</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-procedure.html">US Core Procedure Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>labResultdata</blockquote><p><b>US Public Health Related Data Extension</b>: labResults</p><p><b>type</b>: Observation</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-observation-lab.html">US Core Laboratory Result Observation Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>labOrderdata</blockquote><p><b>US Public Health Related Data Extension</b>: labOrders</p><p><b>type</b>: ServiceRequest</p><p><b>profile</b>: <a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>diagnosticResultdata</blockquote><p><b>US Public Health Related Data Extension</b>: diagnosticResults</p><p><b>type</b>: DiagnosticReport</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-diagnosticreport-lab.html">US Core DiagnosticReport Profile for Laboratory Results Reporting</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>diagnosticOrderdata</blockquote><p><b>US Public Health Related Data Extension</b>: diagnosticOrders</p><p><b>type</b>: DiagnosticReport</p><p><b>profile</b>: <a href="http://hl7.org/fhir/us/core/STU5.0.1/StructureDefinition-us-core-diagnosticreport-lab.html">US Core DiagnosticReport Profile for Laboratory Results Reporting</a></p></blockquote><blockquote><p><b>output</b></p><blockquote><p><b>id</b></p>eicrreport</blockquote><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href="StructureDefinition-us-ph-document-bundle.html">US Public Health Document Bundle</a></p></blockquote><h3>RelatedActions</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ActionId</b></td><td><b>Relationship</b></td></tr><tr><td style="display: none">*</td><td>validate-eicr</td><td>before-start</td></tr></table><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>anonymize-report</blockquote><p><b>US Public Health Trust Service Endpoint Extension</b>: <a href="Endpoint-us-ph-endpoint-pha.html">Endpoint/us-ph-endpoint-pha</a> &quot;PHAReceiver&quot;</p><p><b>description</b>: This action is used to anonymize a identifiable report</p><p><b>textEquivalent</b>: Anonymize the report.</p><p><b>code</b>: Anonymize the report before submitting the report <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#anonymize-report)</span></p><blockquote><p><b>input</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a></td></tr></table></blockquote><blockquote><p><b>output</b></p><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/bundle.html">Bundle</a> (<a href="StructureDefinition-us-ph-reporting-bundle.html">US Public Health Reporting Bundle</a>)</td></tr></table></blockquote></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>validate-eicr</blockquote><p><b>description</b>: This action represents the validation of the eICR. It subsequently calls route-and-send.</p><p><b>textEquivalent</b>: Validate eICR</p><p><b>code</b>: Validate Report against specified profiles and terminologies. <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#validate-report)</span></p><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>generatedeicrreport</blockquote><p><b>US Public Health Related Data Extension</b>: eicrreport</p><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href="StructureDefinition-us-ph-document-bundle.html">US Public Health Document Bundle</a></p></blockquote><blockquote><p><b>output</b></p><blockquote><p><b>id</b></p>valideicrreport</blockquote><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href="StructureDefinition-us-ph-document-bundle.html">US Public Health Document Bundle</a></p></blockquote><h3>RelatedActions</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ActionId</b></td><td><b>Relationship</b></td></tr><tr><td style="display: none">*</td><td>route-and-send-eicr</td><td>before-start</td></tr></table></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>route-and-send-eicr</blockquote><p><b>description</b>: This action represents the routing and sending of the eICR.</p><p><b>textEquivalent</b>: Route and send eICR</p><p><b>code</b>: Submit the report to specified endpoint <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#submit-report)</span></p><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>validatedeicrreport</blockquote><p><b>US Public Health Related Data Extension</b>: valideicrreport</p><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href="StructureDefinition-us-ph-document-bundle.html">US Public Health Document Bundle</a></p></blockquote><blockquote><p><b>output</b></p><blockquote><p><b>id</b></p>submittedeicrreport</blockquote><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href="StructureDefinition-us-ph-document-bundle.html">US Public Health Document Bundle</a></p></blockquote></blockquote><blockquote><p><b>action</b></p><blockquote><p><b>id</b></p>encounter-modified</blockquote><p><b>description</b>: This action represents the start of the reporting workflow in response to the encounter-modified event</p><p><b>textEquivalent</b>: Start the reporting workflow in response to an encounter-modified event</p><p><b>code</b>: Initiate a reporting workflow <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-plandefinition-actions.html">US Public Health CodeSystem - PlanDefinition Actions</a>#initiate-reporting-workflow)</span></p><blockquote><p><b>trigger</b></p><blockquote><p><b>id</b></p>encounter-modified-trigger</blockquote><p><b>US Public Health Named Event Type Extension</b>: Indicates modifications to data elements of an encounter <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (<a href="CodeSystem-us-ph-codesystem-triggerdefinition-namedevents.html">US Public Health CodeSystem - Trigger Definition Named Events</a>#encounter-modified)</span></p><p><b>type</b>: named-event</p><p><b>name</b>: encounter-modified</p></blockquote><blockquote><p><b>condition</b></p><p><b>kind</b>: applicability</p><h3>Expressions</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Language</b></td><td><b>Expression</b></td></tr><tr><td style="display: none">*</td><td/><td>text/fhirpath</td><td>%encounter.where(period.start + 1 day * %normalReportingDuration &lt; now()).select(true)</td></tr></table></blockquote><h3>RelatedActions</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ActionId</b></td><td><b>Relationship</b></td></tr><tr><td style="display: none">*</td><td>create-eicr</td><td>before-start</td></tr></table></blockquote></div>
      </text>
      <url
           value="http://example.org/fhir/PlanDefinition/us-ph-plandefinition-alt-expression-example"/>
      <version value="1.0.0"/>
      <name value="USPublicHealthPlanDefinitionAlternativeExpressionExample"/>
      <title
             value="US Public Health PlanDefinition Alternative Expression Example"/>
      <type>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
          <code value="workflow-definition"/>
          <display value="Workflow Definition"/>
        </coding>
      </type>
      <status value="active"/>
      <experimental value="true"/>
      <date value="2022-07-31T12:32:29.858-05:00"/>
      <publisher value="HL7 Public Health Working Group"/>
      <contact>
        <name value="HL7 Public Health Working Group"/>
        <telecom>
          <system value="url"/>
          <value value="http://www.hl7.org/Special/committees/pher"/>
        </telecom>
        <telecom>
          <system value="email"/>
          <value value="pher@lists.HL7.org"/>
        </telecom>
      </contact>
      <description value="An example PlanDefinition"/>
      <jurisdiction>
        <coding>
          <system value="urn:iso:std:iso:3166"/>
          <code value="US"/>
        </coding>
      </jurisdiction>
      <effectivePeriod>
        <start value="2020-12-01"/>
      </effectivePeriod>
      <relatedArtifact>
        <type value="depends-on"/>
        <label value="RCTC Value Set Library of Trigger Codes"/>
        <resource value="http://example.org/fhir/Library/library-rctc-example"/>
      </relatedArtifact>
      <action id="start-workflow">
        <description
                     value="This action represents the start of the reporting workflow in response to the encounter-start event."/>
        <textEquivalent
                        value="Start the reporting workflow in response to an encounter-start event"/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="initiate-reporting-workflow"/>
            <display value="Initiate a reporting workflow"/>
          </coding>
        </code>
        <trigger id="encounter-start">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-named-eventtype-extension">
            <valueCodeableConcept>
              <coding>
                <system
                        value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-triggerdefinition-namedevents"/>
                <code value="encounter-start"/>
                <display value="Indicates the start of an encounter"/>
              </coding>
            </valueCodeableConcept>
          </extension>
          <type value="named-event"/>
          <name value="encounter-start"/>
        </trigger>
        <input id="patient">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
            <valueString value="Patient/{{context.patientId}}"/>
          </extension>
          <type value="Patient"/>
        </input>
        <input id="encounter">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
            <valueString value="Encounter/{{context.encounterId}}"/>
          </extension>
          <type value="Encounter"/>
        </input>
        <relatedAction>
          <actionId value="check-suspected-disorder"/>
          <relationship value="before-start"/>
          <offsetDuration>
            <value value="1"/>
            <system value="http://unitsofmeasure.org"/>
            <code value="h"/>
          </offsetDuration>
        </relatedAction>
      </action>
      <action id="check-suspected-disorder">
        <description
                     value="This action represents the start of the check suspected disorder reporting workflow in response to the encounter-start event."/>
        <textEquivalent
                        value="Check suspected disorders for immediate reportability and setup jobs for future reportability checks."/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="execute-reporting-workflow"/>
          </coding>
        </code>
        <action id="is-encounter-suspected-disorder">
          <description
                       value="This action represents the check for suspected disorder reportability to create the patients eICR."/>
          <textEquivalent
                          value="Check Trigger Codes based on Suspected Reportable Value set."/>
          <code>
            <coding>
              <system
                      value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
              <code value="check-trigger-codes"/>
            </coding>
          </code>
          <condition>
            <kind value="applicability"/>
            <expression>
              <extension
                         url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-alternative-expression-extension">
                <valueExpression>
                  <language value="text/cql-identifier"/>
                  <expression value="Is Suspected Disorder?"/>
                  <reference
                             value="http://example.org/fhir/Library/RuleFilters|1.0.0"/>
                </valueExpression>
              </extension>
              <language value="text/fhirpath"/>
              <expression
                          value="%modifiedConditions.exists() or %modifiedLabResults.exists() or %modifiedMedicationOrders.exists()"/>
            </expression>
          </condition>
          <input id="modifiedConditions">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="Condition?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="Condition"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-sdtc-example"/>
            </codeFilter>
          </input>
          <input id="modifiedLabResults">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="Observation?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="Observation"/>
            <codeFilter>
              <path value="value"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-sdtc-example"/>
            </codeFilter>
          </input>
          <input id="modifiedMedicationOrders">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="MedicationRequest?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="MedicationRequest"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-sdtc-example"/>
            </codeFilter>
          </input>
          <relatedAction>
            <actionId value="create-eicr"/>
            <relationship value="before-start"/>
          </relatedAction>
        </action>
        <action id="continue-check-reportable">
          <code>
            <coding>
              <system
                      value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
              <code value="evaluate-condition"/>
            </coding>
          </code>
          <condition>
            <kind value="applicability"/>
            <expression>
              <extension
                         url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-alternative-expression-extension">
                <valueExpression>
                  <language value="text/cql-identifier"/>
                  <expression
                              value="Is Encounter In Progress and Within Normal Reporting Duration or 72h or less after end of encounter?"/>
                  <reference
                             value="http://example.org/fhir/Library/RuleFilters|1.0.0"/>
                </valueExpression>
              </extension>
              <language value="text/fhirpath"/>
              <expression
                          value="%encounter.where((status = 'in-progress' and period.start + 1 day * %normalReportingDuration &gt;= now()) or (status = 'finished' and period.end + 72 hours &gt;= now())).select(true)"/>
            </expression>
          </condition>
          <relatedAction>
            <actionId value="check-reportable"/>
            <relationship value="before-start"/>
            <offsetDuration>
              <value value="6"/>
              <system value="http://unitsofmeasure.org"/>
              <code value="h"/>
            </offsetDuration>
          </relatedAction>
        </action>
      </action>
      <action id="check-reportable">
        <description
                     value="This action represents the check for suspected reportability of the eICR."/>
        <textEquivalent
                        value="Check Reportability and setup jobs for future reportability checks."/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="execute-reporting-workflow"/>
          </coding>
        </code>
        <action id="is-encounter-reportable">
          <description
                       value="This action represents the check for reportability to create the patients eICR."/>
          <textEquivalent value="Check Trigger Codes based on RCTC Value sets."/>
          <code>
            <coding>
              <system
                      value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
              <code value="check-trigger-codes"/>
            </coding>
          </code>
          <condition>
            <kind value="applicability"/>
            <expression>
              <extension
                         url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-alternative-expression-extension">
                <valueExpression>
                  <language value="text/cql-identifier"/>
                  <expression
                              value="Is Encounter Reportable and Within Normal Reporting Duration?"/>
                  <reference
                             value="http://example.org/fhir/Library/RuleFilters|1.0.0"/>
                </valueExpression>
              </extension>
              <language value="text/fhirpath"/>
              <expression
                          value="%encounter.where(period.start + 1 day * %normalReportingDuration &gt;= now()).select(true) and (%conditions.exists() or %encounters.exists() or %immunizations.exists() or %procedures.exists() or %procedureOrders.exists() or %labOrders.exists() or %labTests.exists() or %labResults.exists() or %medicationAdministrations.exists() or %medicationOrders.exists() or %medicationDispenses.exists())"/>
            </expression>
          </condition>
          <input id="conditions">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="Condition?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="Condition"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-dxtc-example"/>
            </codeFilter>
          </input>
          <input id="encounters">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
              <valueString value="encounter"/>
            </extension>
            <type value="Encounter"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-dxtc-example"/>
            </codeFilter>
          </input>
          <input id="immunizations">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="Immunization?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="Immunization"/>
            <codeFilter>
              <path value="vaccineCode"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-mrtc-example"/>
            </codeFilter>
          </input>
          <input id="labOrders">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="ServiceRequest?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="ServiceRequest"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-lotc-example"/>
            </codeFilter>
          </input>
          <input id="labTests">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="Observation?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="Observation"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-lotc-example"/>
            </codeFilter>
          </input>
          <input id="diagnosticOrders">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="DiagnosticReport?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="DiagnosticReport"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-lotc-example"/>
            </codeFilter>
          </input>
          <input id="procedureOrders">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="ServiceRequest?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="ServiceRequest"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-pctc-example"/>
            </codeFilter>
          </input>
          <input id="procedures">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="Procedure?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="Procedure"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-pctc-example"/>
            </codeFilter>
          </input>
          <input id="medicationOrders">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="MedicationRequest?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="MedicationRequest"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-mrtc-example"/>
            </codeFilter>
          </input>
          <input id="medicationDispenses">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="MedicationDispense?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="MedicationDispense"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-mrtc-example"/>
            </codeFilter>
          </input>
          <input id="medicationAdministrations">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-fhirquerypattern-extension">
              <valueString
                           value="MedicationAdministration?patient=Patient/{{context.patientId}}"/>
            </extension>
            <type value="MedicationAdministration"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-mrtc-example"/>
            </codeFilter>
          </input>
          <input id="labResults">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
              <valueString value="labTests"/>
            </extension>
            <type value="Observation"/>
            <codeFilter>
              <path value="value"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-ostc-example"/>
            </codeFilter>
          </input>
          <input id="diagnosticResults">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
              <valueString value="diagnosticOrders"/>
            </extension>
            <type value="DiagnosticReport"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://example.org/fhir/ValueSet/valueset-ostc-example"/>
            </codeFilter>
          </input>
          <relatedAction>
            <actionId value="create-eicr"/>
            <relationship value="before-start"/>
          </relatedAction>
        </action>
        <action id="check-update-eicr">
          <code>
            <coding>
              <system
                      value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
              <code value="evaluate-condition"/>
            </coding>
          </code>
          <condition>
            <kind value="applicability"/>
            <expression>
              <extension
                         url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-alternative-expression-extension">
                <valueExpression>
                  <language value="text/cql-identifier"/>
                  <expression value="Most recent eICR sent over 72 hours ago?"/>
                  <reference
                             value="http://example.org/fhir/Library/RuleFilters|1.0.0"/>
                </valueExpression>
              </extension>
              <language value="text/fhirpath"/>
              <expression
                          value="((%lasteicr.last().entry[2].resource as Bundle).entry.first().resource as Composition).date &lt; now() - 72 hours"/>
            </expression>
          </condition>
          <input id="lasteicr">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
              <valueString value="eicrreport"/>
            </extension>
            <type value="Bundle"/>
            <profile
                     value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-document-bundle"/>
          </input>
          <relatedAction>
            <actionId value="create-eicr"/>
            <relationship value="before-start"/>
          </relatedAction>
        </action>
        <action id="is-encounter-in-progress">
          <code>
            <coding>
              <system
                      value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
              <code value="evaluate-condition"/>
            </coding>
          </code>
          <condition>
            <kind value="applicability"/>
            <expression>
              <extension
                         url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-alternative-expression-extension">
                <valueExpression>
                  <language value="text/cql-identifier"/>
                  <expression
                              value="Is Encounter In Progress and Within Normal Reporting Duration or 72h or less after end of encounter?"/>
                  <reference
                             value="http://example.org/fhir/Library/RuleFilters|1.0.0"/>
                </valueExpression>
              </extension>
              <language value="text/fhirpath"/>
              <expression
                          value="%inprogressencounter.where(status = 'in-progress' and period.start + 1 day * %normalReportingDuration &gt;= now() or (status = 'finished' and period.end + 72 hours &gt;= now())).exists()"/>
            </expression>
          </condition>
          <input id="inprogressencounter">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
              <valueString value="encounter"/>
            </extension>
            <type value="Encounter"/>
          </input>
          <relatedAction>
            <actionId value="check-reportable"/>
            <relationship value="before-start"/>
            <offsetDuration>
              <value value="6"/>
              <system value="http://unitsofmeasure.org"/>
              <code value="h"/>
            </offsetDuration>
          </relatedAction>
        </action>
      </action>
      <action id="create-eicr">
        <description
                     value="This action represents the creation of the eICR. It subsequently calls validate."/>
        <textEquivalent value="Create eICR"/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="create-report"/>
          </coding>
        </code>
        <input id="patientdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="patient"/>
          </extension>
          <type value="Patient"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"/>
        </input>
        <input id="conditiondata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="conditions"/>
          </extension>
          <type value="Condition"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis"/>
        </input>
        <input id="encounterdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="encounter"/>
          </extension>
          <type value="Encounter"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"/>
        </input>
        <input id="mrdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="medicationOrders"/>
          </extension>
          <type value="MedicationRequest"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"/>
        </input>
        <input id="immzdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="immunizations"/>
          </extension>
          <type value="Immunization"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"/>
        </input>
        <input id="procdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="procedures"/>
          </extension>
          <type value="Procedure"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"/>
        </input>
        <input id="labResultdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="labResults"/>
          </extension>
          <type value="Observation"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"/>
        </input>
        <input id="labOrderdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="labOrders"/>
          </extension>
          <type value="ServiceRequest"/>
          <profile
                   value="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
        </input>
        <input id="diagnosticResultdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="diagnosticResults"/>
          </extension>
          <type value="DiagnosticReport"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab"/>
        </input>
        <input id="diagnosticOrderdata">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="diagnosticOrders"/>
          </extension>
          <type value="DiagnosticReport"/>
          <profile
                   value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab"/>
        </input>
        <output id="eicrreport">
          <type value="Bundle"/>
          <profile
                   value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-document-bundle"/>
        </output>
        <relatedAction>
          <actionId value="validate-eicr"/>
          <relationship value="before-start"/>
        </relatedAction>
        <action id="anonymize-report">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-trust-service-endpoint-extension">
            <valueReference>
              <reference value="Endpoint/us-ph-endpoint-pha"/>
            </valueReference>
          </extension>
          <description
                       value="This action is used to anonymize a identifiable report"/>
          <textEquivalent value="Anonymize the report."/>
          <code>
            <coding>
              <system
                      value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
              <code value="anonymize-report"/>
            </coding>
          </code>
          <input id="report-to-be-anonymized">
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
              <valueString value="output-report"/>
            </extension>
            <type value="Bundle"/>
          </input>
          <output id="anonymized-report">
            <type value="Bundle"/>
            <profile
                     value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-reporting-bundle"/>
          </output>
        </action>
      </action>
      <action id="validate-eicr">
        <description
                     value="This action represents the validation of the eICR. It subsequently calls route-and-send."/>
        <textEquivalent value="Validate eICR"/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="validate-report"/>
          </coding>
        </code>
        <input id="generatedeicrreport">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="eicrreport"/>
          </extension>
          <type value="Bundle"/>
          <profile
                   value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-document-bundle"/>
        </input>
        <output id="valideicrreport">
          <type value="Bundle"/>
          <profile
                   value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-document-bundle"/>
        </output>
        <relatedAction>
          <actionId value="route-and-send-eicr"/>
          <relationship value="before-start"/>
        </relatedAction>
      </action>
      <action id="route-and-send-eicr">
        <description
                     value="This action represents the routing and sending of the eICR."/>
        <textEquivalent value="Route and send eICR"/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="submit-report"/>
          </coding>
        </code>
        <input id="validatedeicrreport">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-relateddata-extension">
            <valueString value="valideicrreport"/>
          </extension>
          <type value="Bundle"/>
          <profile
                   value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-document-bundle"/>
        </input>
        <output id="submittedeicrreport">
          <type value="Bundle"/>
          <profile
                   value="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-document-bundle"/>
        </output>
      </action>
      <action id="encounter-modified">
        <description
                     value="This action represents the start of the reporting workflow in response to the encounter-modified event"/>
        <textEquivalent
                        value="Start the reporting workflow in response to an encounter-modified event"/>
        <code>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-plandefinition-actions"/>
            <code value="initiate-reporting-workflow"/>
            <display value="Initiate a reporting workflow"/>
          </coding>
        </code>
        <trigger id="encounter-modified-trigger">
          <extension
                     url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-named-eventtype-extension">
            <valueCodeableConcept>
              <coding>
                <system
                        value="http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-triggerdefinition-namedevents"/>
                <code value="encounter-modified"/>
                <display
                         value="Indicates modifications to data elements of an encounter"/>
              </coding>
            </valueCodeableConcept>
          </extension>
          <type value="named-event"/>
          <name value="encounter-modified"/>
        </trigger>
        <condition>
          <kind value="applicability"/>
          <expression>
            <extension
                       url="http://hl7.org/fhir/us/ph-library/StructureDefinition/us-ph-alternative-expression-extension">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression
                            value="Is Encounter Longer Than Normal Reporting Duration?"/>
                <reference
                           value="http://example.org/fhir/Library/RuleFilters|1.0.0"/>
              </valueExpression>
            </extension>
            <language value="text/fhirpath"/>
            <expression
                        value="%encounter.where(period.start + 1 day * %normalReportingDuration &lt; now()).select(true)"/>
          </expression>
        </condition>
        <relatedAction>
          <actionId value="create-eicr"/>
          <relationship value="before-start"/>
        </relatedAction>
      </action>
    </PlanDefinition>