PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.us.ecr@2.0.0
    http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example
{
  "description": "An example ersd PlanDefinition",
  "_filename": "example/PlanDefinition-plandefinition-ersd-instance-example.json",
  "package_name": "hl7.fhir.us.ecr",
  "date": "2020-07-31T12:32:29.858-05:00",
  "meta": {
    "source": "#DYpZHR1G1x5B4mFC",
    "profile": [ "http://hl7.org/fhir/us/ecr/StructureDefinition/ersd-plandefinition" ],
    "versionId": "6",
    "lastUpdated": "2021-11-17T04:21:04.738+00:00"
  },
  "publisher": "HL7 Public Health Work Group (http://www.hl7.org/Special/committees/pher/index.cfm)",
  "jurisdiction": [ {
    "text": "United States of America",
    "coding": [ {
      "code": "US",
      "system": "urn:iso:std:iso:3166",
      "display": "United States of America"
    } ]
  } ],
  "name": "PlanDefinition_eRSD_Instance_Example",
  "type": "{:coding [{:system \\\"http://terminology.hl7.org/CodeSystem/plan-definition-type\\\", :code \\\"workflow-definition\\\", :display \\\"Workflow Definition\\\"}]}",
  "experimental": "true",
  "resourceType": "PlanDefinition",
  "title": "eRSD PlanDefinition Instance Example",
  "package_version": "2.0.0",
  "status": "active",
  "id": "b93793bf-434f-41b5-af24-01ea0c13618e",
  "kind": null,
  "url": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example",
  "action": [ {
    "id": "start-workflow",
    "code": [ {
      "coding": [ {
        "code": "initiate-reporting-workflow",
        "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions",
        "display": "Initiate a reporting workflow"
      } ]
    } ],
    "trigger": [ {
      "id": "encounter-start",
      "name": "encounter-start",
      "type": "named-event",
      "extension": [ {
        "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-named-eventtype-extension",
        "valueCodeableConcept": {
          "coding": [ {
            "code": "encounter-start",
            "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-triggerdefinition-namedevents",
            "display": "Indicates the start of an encounter"
          } ]
        }
      } ]
    } ],
    "description": "This action represents the start of the reporting workflow in response to the encounter-start event",
    "relatedAction": [ {
      "actionId": "check-reportable",
      "relationship": "before-start",
      "offsetDuration": {
        "code": "s",
        "value": 60,
        "system": "http://unitsofmeasure.org"
      }
    } ],
    "textEquivalent": "Start the reporting workflow in response to an encounter-start event"
  }, {
    "id": "check-reportable",
    "code": [ {
      "coding": [ {
        "code": "execute-reporting-workflow",
        "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
      } ]
    } ],
    "action": [ {
      "id": "is-encounter-reportable",
      "code": [ {
        "coding": [ {
          "code": "check-trigger-codes",
          "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
        } ]
      } ],
      "input": [ {
        "id": "conditions",
        "type": "Condition",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "Condition?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example"
        } ]
      }, {
        "id": "encounters",
        "type": "Encounter",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "Encounter?reason-code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "reasonCode",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example"
        } ]
      }, {
        "id": "immunizations",
        "type": "Immunization",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "Immunization?vaccine-code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "vaccineCode",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
        } ]
      }, {
        "id": "labOrders",
        "type": "ServiceRequest",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "ServiceRequest?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"
        } ]
      }, {
        "id": "labTests",
        "type": "Observation",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "Observation?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example"
        } ]
      }, {
        "id": "procedureOrders",
        "type": "ServiceRequest",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "ServiceRequest?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example"
        } ]
      }, {
        "id": "procedures",
        "type": "Procedure",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "Procedure?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example"
        } ]
      }, {
        "id": "medicationOrders",
        "type": "MedicationRequest",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "MedicationRequest?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "medication",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
        } ]
      }, {
        "id": "medicationDispenses",
        "type": "MedicationDispense",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "MedicationDispense?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "medication",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
        } ]
      }, {
        "id": "medicationAdministrations",
        "type": "MedicationAdministration",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "MedicationAdministration?code:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "medication",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example"
        } ]
      }, {
        "id": "labResults",
        "type": "Observation",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension",
          "valueString": "Observation?value-concept:in=http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example&patient=Patient/{{context.patientId}}"
        } ],
        "codeFilter": [ {
          "path": "value",
          "valueSet": "http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example"
        } ]
      } ],
      "condition": [ {
        "kind": "applicability",
        "expression": {
          "language": "text/fhirpath",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension",
            "valueExpression": {
              "language": "text/cql-identifier",
              "reference": "http://aphl.org/fhir/ecr/Library/RuleFilters|1.0.0",
              "expression": "Is Reportable"
            }
          } ],
          "expression": "%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()"
        }
      } ],
      "description": "This action represents the check for reportability to create the patients eICR.",
      "relatedAction": [ {
        "actionId": "report-eicr",
        "relationship": "before-start"
      } ],
      "textEquivalent": "Check Trigger Codes based on RCTC Value sets."
    }, {
      "id": "check-update-eicr",
      "code": [ {
        "coding": [ {
          "code": "evaluate-condition",
          "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
        } ]
      } ],
      "condition": [ {
        "kind": "applicability",
        "expression": {
          "language": "text/fhirpath",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension",
            "valueExpression": {
              "language": "text/cql-identifier",
              "reference": "http://aphl.org/fhir/ecr/Library/RuleFilters|1.0.0",
              "expression": "Most recent eICR sent over 24 hours ago?"
            }
          } ],
          "expression": "Composition.where(code = 'http://loinc.org#55751-2').last().date < now() - 24 hours"
        }
      } ],
      "relatedAction": [ {
        "actionId": "report-eicr",
        "relationship": "before-start"
      } ]
    }, {
      "id": "is-encounter-in-progress",
      "code": [ {
        "coding": [ {
          "code": "evaluate-condition",
          "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
        } ]
      } ],
      "condition": [ {
        "kind": "applicability",
        "expression": {
          "language": "text/fhirpath",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension",
            "valueExpression": {
              "language": "text/cql-identifier",
              "reference": "http://aphl.org/fhir/ecr/Library/RuleFilters|1.0.0",
              "expression": "Is Encounter In Progress or 72h or less after end of encounter?"
            }
          } ],
          "expression": "%encounter.where(status = 'in-progress' and period.end <= now() - 72 hours)"
        }
      } ],
      "relatedAction": [ {
        "actionId": "check-reportable",
        "relationship": "before-start",
        "offsetDuration": {
          "code": "h",
          "value": 6,
          "system": "http://unitsofmeasure.org"
        }
      } ]
    } ],
    "description": "This action represents the check for suspected reportability of the eICR.",
    "textEquivalent": "Check Reportability and setup jobs for future reportability checks."
  }, {
    "id": "report-eicr",
    "code": [ {
      "coding": [ {
        "code": "execute-reporting-workflow",
        "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
      } ]
    } ],
    "action": [ {
      "id": "create-eicr",
      "code": [ {
        "coding": [ {
          "code": "create-report",
          "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
        } ]
      } ],
      "input": [ {
        "id": "patient",
        "type": "Patient",
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ]
      }, {
        "id": "condition",
        "type": "Condition",
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" ]
      }, {
        "id": "encounter",
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" ]
      }, {
        "id": "mr",
        "type": "MedicationRequest",
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" ]
      }, {
        "id": "immz",
        "type": "Immunization",
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization" ]
      }, {
        "id": "proc",
        "type": "Procedure",
        "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" ]
      }, {
        "id": "obs",
        "type": "Observation",
        "profile": [ "http://hl7.org/fhir/StructureDefinition/vitalsigns" ]
      }, {
        "id": "svcr",
        "type": "ServiceRequest",
        "profile": [ "http://hl7.org/fhir/StructureDefinition/ServiceRequest" ]
      } ],
      "output": [ {
        "id": "eicr-report-output",
        "type": "Bundle",
        "profile": [ "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" ]
      } ],
      "description": "This action represents the creation of the eICR.",
      "relatedAction": [ {
        "actionId": "validate-eicr",
        "relationship": "before-start"
      } ],
      "textEquivalent": "Create eICR"
    }, {
      "id": "validate-eicr",
      "code": [ {
        "coding": [ {
          "code": "validate-report",
          "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
        } ]
      } ],
      "input": [ {
        "id": "eicr-report-input",
        "type": "Bundle",
        "profile": [ "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" ]
      } ],
      "output": [ {
        "id": "validated-eicr-report-output",
        "type": "Bundle",
        "profile": [ "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" ]
      } ],
      "description": "This action represents the validation of the eICR.",
      "relatedAction": [ {
        "actionId": "submit-eicr",
        "relationship": "before-start"
      } ],
      "textEquivalent": "Validate eICR"
    }, {
      "id": "route-and-send-eicr",
      "code": [ {
        "coding": [ {
          "code": "submit-report",
          "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions"
        } ]
      } ],
      "input": [ {
        "id": "validated-eicr-report-input",
        "type": "Bundle",
        "profile": [ "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" ]
      } ],
      "output": [ {
        "id": "eicr-report-submitted",
        "type": "Bundle",
        "profile": [ "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" ]
      } ],
      "description": "This action represents the routing and sending of the eICR.",
      "textEquivalent": "Route and send eICR"
    } ],
    "description": "This action represents the creation, validation and submission of the eICR.",
    "textEquivalent": "Create, Validate and Report eICR set of actions"
  } ],
  "version": "2.0.0",
  "relatedArtifact": [ {
    "type": "depends-on",
    "label": "RCTC Value Set Library of Trigger Codes",
    "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example"
  } ],
  "contact": [ {
    "name": "HL7 International - Public Health",
    "telecom": [ {
      "value": "http://www.hl7.org/Special/committees/pher",
      "system": "url"
    } ]
  } ],
  "effectivePeriod": {
    "start": "2020-12-01"
  }
}