Id: us-ph-plandefinition-alt-expression-example Url: US Public Health PlanDefinition Alternative Expression Example Version: 2.0.0 urn:oid:2.16.840.1.113883.4.642.40.58.34.1 Title: US Public Health PlanDefinition Alternative Expression Example Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/plan-definition-type code: workflow-definition display: Workflow Definition Date: 2022-07-31 12:32:29-0500 Publisher: HL7 International / Public Health Description: An example PlanDefinition Jurisdiction: US Effective Period: 2020-12-01.. Related Artifacts: Dependencies http://example.org/fhir/Library/library-rctc-example Actions: Start the reporting workflow in response to an encounter-start event When: Named Event: encounter-start Check suspected disorders for immediate reportability and setup jobs for future reportability checks. Then: Check Trigger Codes based on Suspected Reportable Value set. If: Applicability: (%modifiedConditions.exists() or %modifiedLabResults.exists() or %modifiedMedicationOrders.exists()) : If: Applicability: (%encounter.where((status = 'in-progress' and period.start + 1 day * %normalReportingDuration >= now()) or (status = 'finished' and period.end + 72 hours >= now())).select(true)) Check Reportability and setup jobs for future reportability checks. Then: Check Trigger Codes based on RCTC Value sets. If: Applicability: (%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())) : If: Applicability: (((%lasteicr.last().entry[2].resource as Bundle).entry.first().resource as Composition).date < now() - 72 hours) : If: Applicability: (%inprogressencounter.where(status = 'in-progress' and period.start + 1 day * %normalReportingDuration >= now() or (status = 'finished' and period.end + 72 hours >= now())).exists()) Create eICR Then: Anonymize the report. Validate eICR Route and send eICR Start the reporting workflow in response to an encounter-modified event When: Named Event: encounter-modified If: Applicability: (%encounter.where(period.start + 1 day * %normalReportingDuration < now()).select(true))
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)