Generated Narrative: PlanDefinition Resource PlanDefinition "us-ph-plandefinition-alt-expression-example" Profile: US Public Health PlanDefinition url: http://example.org/fhir/PlanDefinition/us-ph-plandefinition-alt-expression-example version: 1.0.0 name: USPublicHealthPlanDefinitionAlternativeExpressionExample title: US Public Health PlanDefinition Alternative Expression Example type: Workflow Definition (PlanDefinitionType#workflow-definition) status: active experimental: true date: 2022-07-31 12:32:29-0500 publisher: HL7 Public Health Working Group contact: HL7 Public Health Working Group: http://www.hl7.org/Special/committees/pher,pher@lists.HL7.org description: An example PlanDefinition jurisdiction: United States of America (ISO 3166-1 Codes for the representation of names of countries and their subdivisions — Part 1: Country code#US) effectivePeriod: 2020-12-01 --> (ongoing) RelatedArtifacts - Type Label Resource * depends-on RCTC Value Set Library of Trigger Codes http://example.org/fhir/Library/library-rctc-example 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: Initiate a reporting workflow (US Public Health CodeSystem - PlanDefinition Actions#initiate-reporting-workflow) trigger id encounter-start US Public Health Named Event Type Extension: Indicates the start of an encounter (US Public Health CodeSystem - Trigger Definition Named Events#encounter-start) type: named-event name: encounter-start input id patient US Public Health FHIR Query Pattern Extension: Patient/{{context.patientId}} type: Patient input id encounter US Public Health FHIR Query Pattern Extension: Encounter/{{context.encounterId}} type: Encounter RelatedActions - ActionId Relationship Offset[x] * check-suspected-disorder before-start 1 h (Details: UCUM code h = 'h') action 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: Execute a series of actions to accomplish reporting (US Public Health CodeSystem - PlanDefinition Actions#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: Evaluate candidate patient's data against trigger codes to determine reportability (US Public Health CodeSystem - PlanDefinition Actions#check-trigger-codes) condition input Type: Condition Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-sdtc-example input Type: Observation Filter Value value In ValueSet http://example.org/fhir/ValueSet/valueset-sdtc-example input Type: MedicationRequest Filter Value medication In ValueSet http://example.org/fhir/ValueSet/valueset-sdtc-example relatedAction action id continue-check-reportable code: Evaluate condition to determine reportability (US Public Health CodeSystem - PlanDefinition Actions#evaluate-condition) condition relatedAction action 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: Execute a series of actions to accomplish reporting (US Public Health CodeSystem - PlanDefinition Actions#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: Evaluate candidate patient's data against trigger codes to determine reportability (US Public Health CodeSystem - PlanDefinition Actions#check-trigger-codes) condition input Type: Condition Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-dxtc-example input Type: Encounter Filter Value reasonCode In ValueSet http://example.org/fhir/ValueSet/valueset-dxtc-example input Type: Immunization Filter Value vaccineCode In ValueSet http://example.org/fhir/ValueSet/valueset-mrtc-example input Type: ServiceRequest Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-lotc-example input Type: Observation Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-lotc-example input Type: DiagnosticReport Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-lotc-example input Type: ServiceRequest Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-pctc-example input Type: Procedure Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-pctc-example input Type: MedicationRequest Filter Value medication In ValueSet http://example.org/fhir/ValueSet/valueset-mrtc-example input Type: MedicationDispense Filter Value medication In ValueSet http://example.org/fhir/ValueSet/valueset-mrtc-example input Type: MedicationAdministration Filter Value medication In ValueSet http://example.org/fhir/ValueSet/valueset-mrtc-example input Type: Observation Filter Value value In ValueSet http://example.org/fhir/ValueSet/valueset-ostc-example input Type: DiagnosticReport Filter Value code In ValueSet http://example.org/fhir/ValueSet/valueset-ostc-example relatedAction action id check-update-eicr code: Evaluate condition to determine reportability (US Public Health CodeSystem - PlanDefinition Actions#evaluate-condition) condition input Type: Bundle (US Public Health Document Bundle) relatedAction action id is-encounter-in-progress code: Evaluate condition to determine reportability (US Public Health CodeSystem - PlanDefinition Actions#evaluate-condition) condition input Type: Encounter relatedAction action id create-eicr description: This action represents the creation of the eICR. It subsequently calls validate. textEquivalent: Create eICR code: Create a Report containing Patient's data for patients who passed the check-reportability test (US Public Health CodeSystem - PlanDefinition Actions#create-report) input id patientdata US Public Health Related Data Extension: patient type: Patient profile: US Core Patient Profile input id conditiondata US Public Health Related Data Extension: conditions type: Condition profile: US Core Condition Encounter Diagnosis Profile input id encounterdata US Public Health Related Data Extension: encounter type: Encounter profile: US Core Encounter Profile input id mrdata US Public Health Related Data Extension: medicationOrders type: MedicationRequest profile: US Core MedicationRequest Profile input id immzdata US Public Health Related Data Extension: immunizations type: Immunization profile: US Core Immunization Profile input id procdata US Public Health Related Data Extension: procedures type: Procedure profile: US Core Procedure Profile input id labResultdata US Public Health Related Data Extension: labResults type: Observation profile: US Core Laboratory Result Observation Profile input id labOrderdata US Public Health Related Data Extension: labOrders type: ServiceRequest profile: ServiceRequest input id diagnosticResultdata US Public Health Related Data Extension: diagnosticResults type: DiagnosticReport profile: US Core DiagnosticReport Profile for Laboratory Results Reporting input id diagnosticOrderdata US Public Health Related Data Extension: diagnosticOrders type: DiagnosticReport profile: US Core DiagnosticReport Profile for Laboratory Results Reporting output id eicrreport type: Bundle profile: US Public Health Document Bundle RelatedActions - ActionId Relationship * validate-eicr before-start action id anonymize-report US Public Health Trust Service Endpoint Extension: Endpoint/us-ph-endpoint-pha "PHAReceiver" description: This action is used to anonymize a identifiable report textEquivalent: Anonymize the report. code: Anonymize the report before submitting the report (US Public Health CodeSystem - PlanDefinition Actions#anonymize-report) input Type: Bundle output Type: Bundle (US Public Health Reporting Bundle) action id validate-eicr description: This action represents the validation of the eICR. It subsequently calls route-and-send. textEquivalent: Validate eICR code: Validate Report against specified profiles and terminologies. (US Public Health CodeSystem - PlanDefinition Actions#validate-report) input id generatedeicrreport US Public Health Related Data Extension: eicrreport type: Bundle profile: US Public Health Document Bundle output id valideicrreport type: Bundle profile: US Public Health Document Bundle RelatedActions - ActionId Relationship * route-and-send-eicr before-start action id route-and-send-eicr description: This action represents the routing and sending of the eICR. textEquivalent: Route and send eICR code: Submit the report to specified endpoint (US Public Health CodeSystem - PlanDefinition Actions#submit-report) input id validatedeicrreport US Public Health Related Data Extension: valideicrreport type: Bundle profile: US Public Health Document Bundle output id submittedeicrreport type: Bundle profile: US Public Health Document Bundle action 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: Initiate a reporting workflow (US Public Health CodeSystem - PlanDefinition Actions#initiate-reporting-workflow) trigger id encounter-modified-trigger US Public Health Named Event Type Extension: Indicates modifications to data elements of an encounter (US Public Health CodeSystem - Trigger Definition Named Events#encounter-modified) type: named-event name: encounter-modified condition kind: applicability Expressions - Extension Language Expression * text/fhirpath %encounter.where(period.start + 1 day * %normalReportingDuration < now()).select(true) RelatedActions - ActionId Relationship * create-eicr before-start
US Public Health PlanDefinition Alternative Expression Example
This action represents the start of the reporting workflow in response to the encounter-start event.
Start the reporting workflow in response to an encounter-start event
This action represents the start of the check suspected disorder reporting workflow in response to the encounter-start event.
Check suspected disorders for immediate reportability and setup jobs for future reportability checks.
This action represents the check for suspected disorder reportability to create the patients eICR.
Check Trigger Codes based on Suspected Reportable Value set.
%modifiedConditions.exists() or %modifiedLabResults.exists() or %modifiedMedicationOrders.exists()
Is Encounter In Progress and Within Normal Reporting Duration or 72h or less after end of encounter?
%encounter.where((status = 'in-progress' and period.start + 1 day * %normalReportingDuration >= now()) or (status = 'finished' and period.end + 72 hours >= now())).select(true)
This action represents the check for suspected reportability of the eICR.
Check Reportability and setup jobs for future reportability checks.
This action represents the check for reportability to create the patients eICR.
Check Trigger Codes based on RCTC Value sets.
Is Encounter Reportable and Within Normal Reporting Duration?
%encounter.where(period.start + 1 day * %normalReportingDuration >= 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())
Most recent eICR sent over 72 hours ago?
((%lasteicr.last().entry[2].resource as Bundle).entry.first().resource as Composition).date < now() - 72 hours
%inprogressencounter.where(status = 'in-progress' and period.start + 1 day * %normalReportingDuration >= now() or (status = 'finished' and period.end + 72 hours >= now())).exists()
This action represents the creation of the eICR. It subsequently calls validate.
This action is used to anonymize a identifiable report
This action represents the validation of the eICR. It subsequently calls route-and-send.
This action represents the routing and sending of the eICR.
This action represents the start of the reporting workflow in response to the encounter-modified event
Start the reporting workflow in response to an encounter-modified event
Indicates modifications to data elements of an encounter
Is Encounter Longer Than Normal Reporting Duration?
%encounter.where(period.start + 1 day * %normalReportingDuration < now()).select(true)