From b1288d31b1a4ac06c8e82016218bfe7519bdfb52 Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Tue, 28 Nov 2023 13:05:12 -0500 Subject: [PATCH] ensure overdose conditions are ended --- .../resources/modules/opioid_addiction.json | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/main/resources/modules/opioid_addiction.json b/src/main/resources/modules/opioid_addiction.json index 70afb2a978..f8062feb84 100644 --- a/src/main/resources/modules/opioid_addiction.json +++ b/src/main/resources/modules/opioid_addiction.json @@ -645,7 +645,7 @@ "distributed_transition": [ { "distribution": 0.98747, - "transition": "End_Directed_Use_Overdose_Encounter" + "transition": "End_Directed_Use_Overdose" }, { "distribution": 0.01253, @@ -683,7 +683,7 @@ "distributed_transition": [ { "distribution": 0.98747, - "transition": "End_Misuse_Overdose_Encounter" + "transition": "End_Misuse_Overdose" }, { "distribution": 0.01253, @@ -738,19 +738,7 @@ } }, "unit": "hours", - "conditional_transition": [ - { - "condition": { - "condition_type": "Attribute", - "attribute": "opioid_addiction_careplan", - "operator": "is nil" - }, - "transition": "Opioid_Addiction_CarePlan" - }, - { - "transition": "End_Addiction_Overdose_Encounter" - } - ] + "direct_transition": "End_Addiction_Overdose" }, "Opioid_Addiction_CarePlan": { "type": "CarePlanStart", @@ -928,6 +916,33 @@ ], "direct_transition": "Recovery_Management", "assign_to_attribute": "opioid_drug_addiction" + }, + "End_Addiction_Overdose": { + "type": "ConditionEnd", + "conditional_transition": [ + { + "condition": { + "condition_type": "Attribute", + "attribute": "opioid_addiction_careplan", + "operator": "is nil" + }, + "transition": "Opioid_Addiction_CarePlan" + }, + { + "transition": "End_Addiction_Overdose_Encounter" + } + ], + "condition_onset": "Addiction_Overdose" + }, + "End_Misuse_Overdose": { + "type": "ConditionEnd", + "direct_transition": "End_Misuse_Overdose_Encounter", + "condition_onset": "Misuse_Overdose" + }, + "End_Directed_Use_Overdose": { + "type": "ConditionEnd", + "direct_transition": "End_Directed_Use_Overdose_Encounter", + "condition_onset": "Directed_Use_Overdose" } }, "gmf_version": 1