HL7 FHIR® Implementation Guide: Electronic Case Reporting (eCR) - US Realm
2.1.1 - STU 2.1.1 United States of America flag

HL7 FHIR® Implementation Guide: Electronic Case Reporting (eCR) - US Realm, published by HL7 International / Public Health. This guide is not an authorized publication; it is the continuous build for version 2.1.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/case-reporting/ and changes regularly. See the Directory of published versions

: eRSD PlanDefinition Instance Simple Example - JSON Representation

Active as of 2020-07-31

Raw json | Download


{
  "resourceType" : "PlanDefinition",
  "id" : "plandefinition-ersd-instance-simple-example",
  "meta" : {
    "profile" : [
      🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/ersd-plandefinition"
    ]
  },
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: PlanDefinition</b><a name=\"plandefinition-ersd-instance-simple-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;plandefinition-ersd-instance-simple-example&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ersd-plandefinition.html\">eRSD PlanDefinition</a></p></div><p><b>Variable</b>: <span title=\"text/fhirpath\"><code>2 weeks</code></span>(<b>normalReportingDuration</b>)</p><p><b>wg</b>: pher</p><p><b>url</b>: <code>http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-simple-example</code></p><p><b>version</b>: 2.1.1</p><p><b>name</b>: PlanDefinition_eRSD_Instance_Simple_Example</p><p><b>title</b>: eRSD PlanDefinition Instance Simple 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.3.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>: 2020-07-31 12:32:29-0500</p><p><b>publisher</b>: HL7 International / Public Health</p><p><b>contact</b>: HL7 International / Public Health: <a href=\"http://www.hl7.org/Special/committees/pher\">http://www.hl7.org/Special/committees/pher</a></p><p><b>description</b>: An example ersd 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.3.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><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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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-triggerdefinition-namedevents.html\">US Public Health TriggerDefinition NamedEvents</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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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=\"ValueSet-valueset-sdtc-example.html\">Example Suspected Disorder Triggers for Public Health Reporting</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=\"ValueSet-valueset-lotc-example.html\">Example Lab Order Test Triggers for Public Health Reporting</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=\"ValueSet-valueset-mrtc-example.html\">Example Medications Triggers for Public Health Reporting</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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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=\"ValueSet-valueset-dxtc-example.html\">Example Diagnosis Problem Triggers for Public Health Reporting</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=\"ValueSet-valueset-dxtc-example.html\">Example Diagnosis Problem Triggers for Public Health Reporting</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=\"ValueSet-valueset-mrtc-example.html\">Example Medications Triggers for Public Health Reporting</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=\"ValueSet-valueset-lotc-example.html\">Example Lab Order Test Triggers for Public Health Reporting</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=\"ValueSet-valueset-lotc-example.html\">Example Lab Order Test Triggers for Public Health Reporting</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=\"ValueSet-valueset-lotc-example.html\">Example Lab Order Test Triggers for Public Health Reporting</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=\"ValueSet-valueset-pctc-example.html\">Example Procedure Triggers for Public Health Reporting</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=\"ValueSet-valueset-pctc-example.html\">Example Procedure Triggers for Public Health Reporting</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=\"ValueSet-valueset-mrtc-example.html\">Example Medications Triggers for Public Health Reporting</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=\"ValueSet-valueset-mrtc-example.html\">Example Medications Triggers for Public Health Reporting</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=\"ValueSet-valueset-mrtc-example.html\">Example Medications Triggers for Public Health Reporting</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=\"ValueSet-valueset-ostc-example.html\">Example Organism Substance Triggers for Public Health Reporting</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=\"ValueSet-valueset-ostc-example.html\">Example Organism Substance Triggers for Public Health Reporting</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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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-eicr-document-bundle.html\">eICR 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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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><p><b>action</b></p><blockquote><p><b>id</b></p>is-encounter-completed</blockquote><p><b>code</b>: Complete reporting for the patient <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"CodeSystem-us-ph-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</a>#complete-reporting)</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></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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</a>#create-report)</span></p><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>patient-data</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/STU4/StructureDefinition-us-core-patient.html\">US Core Patient Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>condition-data</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/STU4/StructureDefinition-us-core-condition.html\">US Core Condition Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>encounter-data</blockquote><p><b>US Public Health Related Data Extension</b>: encounters</p><p><b>type</b>: Encounter</p><p><b>profile</b>: <a href=\"http://hl7.org/fhir/us/core/STU4/StructureDefinition-us-core-encounter.html\">US Core Encounter Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>mr-data</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/STU4/StructureDefinition-us-core-medicationrequest.html\">US Core MedicationRequest Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>immz-data</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/STU4/StructureDefinition-us-core-immunization.html\">US Core Immunization Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>proc-data</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/STU4/StructureDefinition-us-core-procedure.html\">US Core Procedure Profile</a></p></blockquote><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>labResult-data</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/STU4/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>labOrder-data</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>diagnosticResult-data</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/STU4/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>diagnosticOrder-data</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/STU4/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>eicr-report</blockquote><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href=\"StructureDefinition-eicr-document-bundle.html\">eICR 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><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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</a>#validate-report)</span></p><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>generated-eicr-report</blockquote><p><b>US Public Health Related Data Extension</b>: eicr-report</p><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href=\"StructureDefinition-eicr-document-bundle.html\">eICR Document Bundle</a></p></blockquote><blockquote><p><b>output</b></p><blockquote><p><b>id</b></p>valid-eicr-report</blockquote><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href=\"StructureDefinition-eicr-document-bundle.html\">eICR 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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</a>#submit-report)</span></p><blockquote><p><b>input</b></p><blockquote><p><b>id</b></p>validated-eicr-report</blockquote><p><b>US Public Health Related Data Extension</b>: valid-eicr-report</p><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href=\"StructureDefinition-eicr-document-bundle.html\">eICR Document Bundle</a></p></blockquote><blockquote><p><b>output</b></p><blockquote><p><b>id</b></p>submitted-eicr-report</blockquote><p><b>type</b>: Bundle</p><p><b>profile</b>: <a href=\"StructureDefinition-eicr-document-bundle.html\">eICR 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-plandefinition-actions.html\">US Public Health PlanDefinition Action Codes</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-triggerdefinition-namedevents.html\">US Public Health TriggerDefinition NamedEvents</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>Language</b></td><td><b>Expression</b></td></tr><tr><td style=\"display: none\">*</td><td>text/fhirpath</td><td>%encounter.where(period.start + %normalReportingDuration &lt; now())</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>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/variable",
      "valueExpression" : {
        "name" : "normalReportingDuration",
        "language" : "text/fhirpath",
        "expression" : "2 weeks"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode" : "pher"
    }
  ],
  "url" : "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-simple-example",
  "version" : "2.1.1",
  "name" : "PlanDefinition_eRSD_Instance_Simple_Example",
  "title" : "eRSD PlanDefinition Instance Simple Example",
  "type" : {
    "coding" : [
      {
        "system" : "http://terminology.hl7.org/CodeSystem/plan-definition-type",
        "code" : "workflow-definition",
        "display" : "Workflow Definition"
      }
    ]
  },
  "status" : "active",
  "experimental" : true,
  "date" : "2020-07-31T12:32:29.858-05:00",
  "publisher" : "HL7 International / Public Health",
  "contact" : [
    {
      "name" : "HL7 International / Public Health",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/pher"
        }
      ]
    }
  ],
  "description" : "An example ersd PlanDefinition",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "US",
          "display" : "United States of America"
        }
      ],
      "text" : "United States of America"
    }
  ],
  "action" : [
    {
      "id" : "start-workflow",
      "description" : "This action represents the start of the reporting workflow in response to the encounter-start event.",
      "textEquivalent" : "Start the reporting workflow in response to an encounter-start event",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "initiate-reporting-workflow",
              "display" : "Initiate a reporting workflow"
            }
          ]
        }
      ],
      "trigger" : [
        {
          "id" : "encounter-start",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-named-eventtype-extension",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-triggerdefinition-namedevents",
                    "code" : "encounter-start",
                    "display" : "Indicates the start of an encounter"
                  }
                ]
              }
            }
          ],
          "type" : "named-event",
          "name" : "encounter-start"
        }
      ],
      "input" : [
        {
          "id" : "patient",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
              "valueString" : "Patient/{{context.patientId}}"
            }
          ],
          "type" : "Patient"
        },
        {
          "id" : "encounter",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
              "valueString" : "Encounter/{{context.encounterId}}"
            }
          ],
          "type" : "Encounter"
        }
      ],
      "relatedAction" : [
        {
          "actionId" : "check-suspected-disorder",
          "relationship" : "before-start",
          "offsetDuration" : {
            "value" : 1,
            "system" : "http://unitsofmeasure.org",
            "code" : "h"
          }
        }
      ]
    },
    {
      "id" : "check-suspected-disorder",
      "description" : "This action represents the start of the check suspected disorder reporting workflow in response to the encounter-start event.",
      "textEquivalent" : "Check suspected disorders for immediate reportability and setup jobs for future reportability checks.",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "execute-reporting-workflow"
            }
          ]
        }
      ],
      "action" : [
        {
          "id" : "is-encounter-suspected-disorder",
          "description" : "This action represents the check for suspected disorder reportability to create the patients eICR.",
          "textEquivalent" : "Check Trigger Codes based on Suspected Reportable Value set.",
          "code" : [
            {
              "coding" : [
                {
                  "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
                  "code" : "check-trigger-codes"
                }
              ]
            }
          ],
          "condition" : [
            {
              "kind" : "applicability",
              "expression" : {
                "language" : "text/fhirpath",
                "expression" : "%modifiedConditions.exists() or %modifiedLabResults.exists() or %modifiedMedicationOrders.exists()"
              }
            }
          ],
          "input" : [
            {
              "id" : "modifiedConditions",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "Condition?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "Condition",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-sdtc-example"
                }
              ]
            },
            {
              "id" : "modifiedLabResults",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "Observation?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "Observation",
              "codeFilter" : [
                {
                  "path" : "value",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"
                }
              ]
            },
            {
              "id" : "modifiedMedicationOrders",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "MedicationRequest?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "MedicationRequest",
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
                }
              ]
            }
          ],
          "relatedAction" : [
            {
              "actionId" : "create-eicr",
              "relationship" : "before-start"
            }
          ]
        },
        {
          "id" : "continue-check-reportable",
          "code" : [
            {
              "coding" : [
                {
                  "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
                  "code" : "evaluate-condition"
                }
              ]
            }
          ],
          "condition" : [
            {
              "kind" : "applicability",
              "expression" : {
                "language" : "text/fhirpath",
                "expression" : "%encounter.where((status = 'in-progress' and period.start + %normalReportingDuration < now()) or status = 'finished' and period.end <= now() - 72 hours)"
              }
            }
          ],
          "relatedAction" : [
            {
              "actionId" : "check-reportable",
              "relationship" : "before-start",
              "offsetDuration" : {
                "value" : 6,
                "comparator" : "<=",
                "system" : "http://unitsofmeasure.org",
                "code" : "h"
              }
            }
          ]
        }
      ]
    },
    {
      "id" : "check-reportable",
      "description" : "This action represents the check for suspected reportability of the eICR.",
      "textEquivalent" : "Check Reportability and setup jobs for future reportability checks.",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "execute-reporting-workflow"
            }
          ]
        }
      ],
      "action" : [
        {
          "id" : "is-encounter-reportable",
          "description" : "This action represents the check for reportability to create the patients eICR.",
          "textEquivalent" : "Check Trigger Codes based on RCTC Value sets.",
          "code" : [
            {
              "coding" : [
                {
                  "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
                  "code" : "check-trigger-codes"
                }
              ]
            }
          ],
          "condition" : [
            {
              "kind" : "applicability",
              "expression" : {
                "language" : "text/fhirpath",
                "expression" : "%encounter.where(period.start + %normalReportingDuration >= now()) 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())"
              }
            }
          ],
          "input" : [
            {
              "id" : "conditions",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "Condition?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "Condition",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example"
                }
              ]
            },
            {
              "id" : "encounters",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
                  "valueString" : "encounter"
                }
              ],
              "type" : "Encounter",
              "codeFilter" : [
                {
                  "path" : "reasonCode",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example"
                }
              ]
            },
            {
              "id" : "immunizations",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "Immunization?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "Immunization",
              "codeFilter" : [
                {
                  "path" : "vaccineCode",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
                }
              ]
            },
            {
              "id" : "labOrders",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "ServiceRequest?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "ServiceRequest",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"
                }
              ]
            },
            {
              "id" : "labTests",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "Observation?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "Observation",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"
                }
              ]
            },
            {
              "id" : "diagnosticOrders",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "DiagnosticReport?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "DiagnosticReport",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"
                }
              ]
            },
            {
              "id" : "procedureOrders",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "ServiceRequest?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "ServiceRequest",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example"
                }
              ]
            },
            {
              "id" : "procedures",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "Procedure?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "Procedure",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example"
                }
              ]
            },
            {
              "id" : "medicationOrders",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "MedicationRequest?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "MedicationRequest",
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
                }
              ]
            },
            {
              "id" : "medicationDispenses",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "MedicationDispense?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "MedicationDispense",
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
                }
              ]
            },
            {
              "id" : "medicationAdministrations",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
                  "valueString" : "MedicationAdministration?patient=Patient/{{context.patientId}}"
                }
              ],
              "type" : "MedicationAdministration",
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
                }
              ]
            },
            {
              "id" : "labResults",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
                  "valueString" : "labTests"
                }
              ],
              "type" : "Observation",
              "codeFilter" : [
                {
                  "path" : "value",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example"
                }
              ]
            },
            {
              "id" : "diagnosticResults",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
                  "valueString" : "diagnosticOrders"
                }
              ],
              "type" : "DiagnosticReport",
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example"
                }
              ]
            }
          ],
          "relatedAction" : [
            {
              "actionId" : "create-eicr",
              "relationship" : "before-start"
            }
          ]
        },
        {
          "id" : "check-update-eicr",
          "code" : [
            {
              "coding" : [
                {
                  "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
                  "code" : "evaluate-condition"
                }
              ]
            }
          ],
          "condition" : [
            {
              "kind" : "applicability",
              "expression" : {
                "language" : "text/fhirpath",
                "expression" : "%last-eicr.last().entry.first().resource.date < now() - 72 hours"
              }
            }
          ],
          "input" : [
            {
              "id" : "last-eicr",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
                  "valueString" : "eicr-report"
                }
              ],
              "type" : "Bundle",
              "profile" : [
                🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle"
              ]
            }
          ],
          "relatedAction" : [
            {
              "actionId" : "create-eicr",
              "relationship" : "before-start"
            }
          ]
        },
        {
          "id" : "is-encounter-in-progress",
          "code" : [
            {
              "coding" : [
                {
                  "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
                  "code" : "evaluate-condition"
                }
              ]
            }
          ],
          "condition" : [
            {
              "kind" : "applicability",
              "expression" : {
                "language" : "text/fhirpath",
                "expression" : "%`inprogress-encounter`.where(status = 'in-progress' and period.start + %normalReportingDuration >= now() and period.end <= now() - 72 hours)"
              }
            }
          ],
          "input" : [
            {
              "id" : "inprogress-encounter",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
                  "valueString" : "encounter"
                }
              ],
              "type" : "Encounter"
            }
          ],
          "relatedAction" : [
            {
              "actionId" : "check-reportable",
              "relationship" : "before-start",
              "offsetDuration" : {
                "value" : 6,
                "comparator" : "<=",
                "system" : "http://unitsofmeasure.org",
                "code" : "h"
              }
            }
          ]
        },
        {
          "id" : "is-encounter-completed",
          "code" : [
            {
              "coding" : [
                {
                  "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
                  "code" : "complete-reporting"
                }
              ]
            }
          ],
          "condition" : [
            {
              "kind" : "applicability",
              "expression" : {
                "language" : "text/fhirpath",
                "expression" : "%completedEncounter.exists(status = 'finished')"
              }
            }
          ],
          "input" : [
            {
              "id" : "completedEncounter",
              "extension" : [
                {
                  "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
                  "valueString" : "encounter"
                }
              ],
              "type" : "Encounter"
            }
          ]
        }
      ]
    },
    {
      "id" : "create-eicr",
      "description" : "This action represents the creation of the eICR. It subsequently calls validate.",
      "textEquivalent" : "Create eICR",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "create-report"
            }
          ]
        }
      ],
      "input" : [
        {
          "id" : "patient-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "patient"
            }
          ],
          "type" : "Patient",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"
          ]
        },
        {
          "id" : "condition-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "conditions"
            }
          ],
          "type" : "Condition",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"
          ]
        },
        {
          "id" : "encounter-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "encounters"
            }
          ],
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"
          ]
        },
        {
          "id" : "mr-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "medicationOrders"
            }
          ],
          "type" : "MedicationRequest",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"
          ]
        },
        {
          "id" : "immz-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "immunizations"
            }
          ],
          "type" : "Immunization",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"
          ]
        },
        {
          "id" : "proc-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "procedures"
            }
          ],
          "type" : "Procedure",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"
          ]
        },
        {
          "id" : "labResult-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "labResults"
            }
          ],
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab"
          ]
        },
        {
          "id" : "labOrder-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "labOrders"
            }
          ],
          "type" : "ServiceRequest",
          "profile" : [
            🔗 "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
          ]
        },
        {
          "id" : "diagnosticResult-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "diagnosticResults"
            }
          ],
          "type" : "DiagnosticReport",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab"
          ]
        },
        {
          "id" : "diagnosticOrder-data",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "diagnosticOrders"
            }
          ],
          "type" : "DiagnosticReport",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab"
          ]
        }
      ],
      "output" : [
        {
          "id" : "eicr-report",
          "type" : "Bundle",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle"
          ]
        }
      ],
      "relatedAction" : [
        {
          "actionId" : "validate-eicr",
          "relationship" : "before-start"
        }
      ]
    },
    {
      "id" : "validate-eicr",
      "description" : "This action represents the validation of the eICR. It subsequently calls route-and-send.",
      "textEquivalent" : "Validate eICR",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "validate-report"
            }
          ]
        }
      ],
      "input" : [
        {
          "id" : "generated-eicr-report",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "eicr-report"
            }
          ],
          "type" : "Bundle",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle"
          ]
        }
      ],
      "output" : [
        {
          "id" : "valid-eicr-report",
          "type" : "Bundle",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle"
          ]
        }
      ],
      "relatedAction" : [
        {
          "actionId" : "route-and-send-eicr",
          "relationship" : "before-start"
        }
      ]
    },
    {
      "id" : "route-and-send-eicr",
      "description" : "This action represents the routing and sending of the eICR.",
      "textEquivalent" : "Route and send eICR",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "submit-report"
            }
          ]
        }
      ],
      "input" : [
        {
          "id" : "validated-eicr-report",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension",
              "valueString" : "valid-eicr-report"
            }
          ],
          "type" : "Bundle",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle"
          ]
        }
      ],
      "output" : [
        {
          "id" : "submitted-eicr-report",
          "type" : "Bundle",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle"
          ]
        }
      ]
    },
    {
      "id" : "encounter-modified",
      "description" : "This action represents the start of the reporting workflow in response to the encounter-modified event",
      "textEquivalent" : "Start the reporting workflow in response to an encounter-modified event",
      "code" : [
        {
          "coding" : [
            {
              "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
              "code" : "initiate-reporting-workflow",
              "display" : "Initiate a reporting workflow"
            }
          ]
        }
      ],
      "trigger" : [
        {
          "id" : "encounter-modified-trigger",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-named-eventtype-extension",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-triggerdefinition-namedevents",
                    "code" : "encounter-modified",
                    "display" : "Indicates modifications to data elements of an encounter"
                  }
                ]
              }
            }
          ],
          "type" : "named-event",
          "name" : "encounter-modified"
        }
      ],
      "condition" : [
        {
          "kind" : "applicability",
          "expression" : {
            "language" : "text/fhirpath",
            "expression" : "%encounter.where(period.start + %normalReportingDuration < now())"
          }
        }
      ],
      "relatedAction" : [
        {
          "actionId" : "create-eicr",
          "relationship" : "before-start"
        }
      ]
    }
  ]
}