{ "description": "An example MedMorph PlanDefinition", "_filename": "example/PlanDefinition-medmorph-plandefinition-example.json", "package_name": "hl7.fhir.us.medmorph", "date": "2020-07-31T12:32:29.858-05:00", "meta": { "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-plandefinition", "http://hl7.org/fhir/us/medmorph/StructureDefinition/medmorph-plandefinition" ] }, "publisher": "HL7 International - Public Health Work Group", "jurisdiction": [ { "coding": [ { "code": "US", "system": "urn:iso:std:iso:3166" } ] } ], "name": "MedMorphPlanDefinitionExample", "type": "{:coding [{:system \\\"http://terminology.hl7.org/CodeSystem/plan-definition-type\\\", :code \\\"workflow-definition\\\", :display \\\"Workflow Definition\\\"}]}", "experimental": "true", "resourceType": "PlanDefinition", "title": "MedMorph PlanDefinition Example", "package_version": "1.0.0", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-receiver-jwks-url", "valueUrl": "http://example.org/jwks/123" }, { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-data-encryption-algorithm", "valueCode": "RSA384" } ], "status": "active", "id": "2a70af4b-4562-444f-ba03-96fa15a33758", "kind": null, "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/medmorph-plandefinition-example", "action": [ { "id": "start-workflow", "code": [ { "coding": [ { "code": "initiate-reporting-workflow", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions", "display": "Initiate a reporting workflow" } ] } ], "input": [ { "id": "patient", "type": "Patient", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "Patient/{{context.patientId}}" } ] }, { "id": "encounter", "type": "Encounter", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "Encounter/{{context.encounterId}}" } ] } ], "trigger": [ { "id": "encounter-start", "name": "encounter-start", "type": "named-event", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-named-eventtype", "valueCodeableConcept": { "coding": [ { "code": "encounter-start", "system": "http://hl7.org/fhir/us/medmorph/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. Other named events can be used instead of encounter-start.", "relatedAction": [ { "actionId": "check-reportability", "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-reportability", "code": [ { "coding": [ { "code": "execute-reporting-workflow", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions" } ] } ], "action": [ { "id": "is-encounter-reportable", "code": [ { "coding": [ { "code": "check-trigger-codes", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions" } ] } ], "input": [ { "id": "conditions", "type": "Condition", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "Condition?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "encounters", "type": "Encounter", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "encounter" } ], "codeFilter": [ { "path": "reasonCode", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "immunizations", "type": "Immunization", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "Immunization?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "vaccineCode", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "labOrders", "type": "ServiceRequest", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "ServiceRequest?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "labTests", "type": "Observation", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "Observation?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "diagnosticOrders", "type": "DiagnosticReport", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "DiagnosticReport?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "procedureOrders", "type": "ServiceRequest", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "ServiceRequest?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "procedures", "type": "Procedure", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "Procedure?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "medicationOrders", "type": "MedicationRequest", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "MedicationRequest?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "medication", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "medicationDispenses", "type": "MedicationDispense", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "MedicationDispense?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "medication", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "medicationAdministrations", "type": "MedicationAdministration", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-fhirquerypattern-extension", "valueString": "MedicationAdministration?patient=Patient/{{context.patientId}}" } ], "codeFilter": [ { "path": "medication", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "labResults", "type": "Observation", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "labTests" } ], "codeFilter": [ { "path": "value", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] }, { "id": "diagnosticResults", "type": "DiagnosticReport", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "diagnosticOrders" } ], "codeFilter": [ { "path": "code", "valueSet": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ] } ], "condition": [ { "kind": "applicability", "expression": { "language": "text/fhirpath", "expression": "%encounter.where(%encounterStartDate + 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())" } } ], "description": "This action represents the check for reportability to create the Report.", "relatedAction": [ { "actionId": "create-report", "relationship": "before-start" } ], "textEquivalent": "Check Trigger Codes based on Value sets." } ], "description": "This action represents the start of the check for reportable conditions in response to the encounter-start event. This is an example of executing a reporting workflow with other actions.", "textEquivalent": "Check Reportability and setup jobs for future reportability checks." }, { "id": "create-report", "code": [ { "coding": [ { "code": "create-report", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions" } ] } ], "input": [ { "id": "patientdata", "type": "Patient", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "patient" } ] }, { "id": "conditiondata", "type": "Condition", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "conditions" } ] }, { "id": "encounterdata", "type": "Encounter", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "encounter" } ] }, { "id": "mrdata", "type": "MedicationRequest", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "medicationOrders" } ] }, { "id": "immzdata", "type": "Immunization", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "immunizations" } ] }, { "id": "procdata", "type": "Procedure", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "procedures" } ] }, { "id": "labResultdata", "type": "Observation", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "labResults" } ] }, { "id": "labOrderdata", "type": "ServiceRequest", "profile": [ "http://hl7.org/fhir/StructureDefinition/ServiceRequest" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "labOrders" } ] }, { "id": "diagnosticResultdata", "type": "DiagnosticReport", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "diagnosticResults" } ] }, { "id": "diagnosticOrderdata", "type": "DiagnosticReport", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "diagnosticOrders" } ] } ], "action": [ { "id": "anonymize-report", "code": [ { "coding": [ { "code": "anonymize-report", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions" } ] } ], "input": [ { "id": "report-to-be-anonymized", "type": "Bundle", "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "output-report" } ] } ], "output": [ { "id": "anonymized-report", "type": "Bundle", "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-reporting-bundle" ] } ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-trust-service-endpoint", "valueReference": { "reference": "Endpoint/example-ph-endpoint" } } ], "description": "This action is used to anonymize a identifiable report", "textEquivalent": "Anonymize the report." } ], "output": [ { "id": "output-report", "type": "Bundle", "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-reporting-bundle" ] } ], "description": "This action represents the creation of the Report. It subsequently calls validate.", "relatedAction": [ { "actionId": "validate-report", "relationship": "before-start" } ], "textEquivalent": "Create Report" }, { "id": "validate-report", "code": [ { "coding": [ { "code": "validate-report", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions" } ] } ], "input": [ { "id": "generated-report", "type": "Bundle", "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-reporting-bundle" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "output-report" } ] } ], "output": [ { "id": "valid-report", "type": "Bundle", "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-reporting-bundle" ] } ], "description": "This action represents the validation of the Report. It subsequently calls route-and-send.", "relatedAction": [ { "actionId": "route-and-send-report", "relationship": "before-start" } ], "textEquivalent": "Validate Report" }, { "id": "route-and-send-report", "code": [ { "coding": [ { "code": "submit-report", "system": "http://hl7.org/fhir/us/medmorph/CodeSystem/us-ph-plandefinition-actions" } ] } ], "input": [ { "id": "validated-report", "type": "Bundle", "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-reporting-bundle" ], "extension": [ { "url": "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-relateddata-extension", "valueString": "valid-report" } ] } ], "output": [ { "id": "submitted-report", "type": "Bundle", "profile": [ "http://hl7.org/fhir/us/medmorph/StructureDefinition/us-ph-reporting-bundle" ] } ], "description": "This action represents the routing and sending of the Report.", "textEquivalent": "Route and send Report" } ], "version": "1.0.0", "relatedArtifact": [ { "type": "depends-on", "label": "Value Set Library of Trigger Codes", "resource": "http://hl7.org/fhir/us/medmorph/ValueSet/valueset-cancer-trigger-codes-example" } ], "contact": [ { "telecom": [ { "value": "http://hl7.org/Special/committees/pher", "system": "url" } ] } ], "effectivePeriod": { "start": "2020-12-01" } }