Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module cleanup #1399

Merged
merged 11 commits into from
Dec 20, 2023
27 changes: 23 additions & 4 deletions src/main/resources/modules/appendicitis.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@
"Avg operative time is ~55 minutes",
"https://www.ncbi.nlm.nih.gov/pubmed/17658102"
],
"direct_transition": "Appendicitis_Symptom1_Ends",
"name": "Appendectomy"
"direct_transition": "End_Appendicitis"
},
"Appendicitis_Symptom1_Ends": {
"type": "Symptom",
Expand Down Expand Up @@ -407,8 +406,28 @@
},
"Transfer_To_Inpatient": {
"type": "EncounterEnd",
"direct_transition": "Appendectomy_Encounter",
"name": "Transfer_To_Inpatient"
"direct_transition": "Appendectomy_Encounter"
},
"End_Appendicitis": {
"type": "ConditionEnd",
"condition_onset": "Appendicitis",
"conditional_transition": [
{
"transition": "End_Rupture",
"condition": {
"condition_type": "PriorState",
"name": "Rupture"
}
},
{
"transition": "Appendicitis_Symptom1_Ends"
}
]
},
"End_Rupture": {
"type": "ConditionEnd",
"direct_transition": "Appendicitis_Symptom1_Ends",
"condition_onset": "Rupture"
}
},
"gmf_version": 1
Expand Down
13 changes: 12 additions & 1 deletion src/main/resources/modules/covid19/end_outcomes.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"display": "Pneumonia (disorder)"
}
],
"direct_transition": "End Mild Respiratory Distress"
"direct_transition": "End Hypoxemia"
},
"End ARDS": {
"type": "ConditionEnd",
Expand Down Expand Up @@ -150,6 +150,17 @@
}
],
"direct_transition": "End Heart Failure"
},
"End Hypoxemia": {
"type": "ConditionEnd",
"direct_transition": "End Mild Respiratory Distress",
"codes": [
{
"system": "SNOMED-CT",
"code": 389087006,
"display": "Hypoxemia (disorder)"
}
]
}
},
"gmf_version": 1
Expand Down
52 changes: 31 additions & 21 deletions src/main/resources/modules/home_health_treatment.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"direct_transition": "Referral_Home_Health_Care",
"encounter_class": "urgentcare",
"reason": "Transition_To_Home"
"reason": "home_health_reason"
},
"Referral_Home_Health_Care": {
"type": "Procedure",
Expand Down Expand Up @@ -65,7 +65,7 @@
],
"direct_transition": "Initial_Patient_Assessment",
"encounter_class": "home",
"reason": "Transition_To_Home"
"reason": "home_health_reason"
},
"Initial_Patient_Assessment": {
"type": "Procedure",
Expand Down Expand Up @@ -126,7 +126,7 @@
],
"direct_transition": "Begin_Visit",
"encounter_class": "home",
"reason": "Transition_To_Home"
"reason": "home_health_reason"
},
"Begin_Visit": {
"type": "Counter",
Expand Down Expand Up @@ -225,7 +225,7 @@
"display": "Patient discharge (procedure)"
}
],
"direct_transition": "End_Transition_To_Home"
"direct_transition": "Last Visit"
},
"Nursing_Care": {
"type": "Procedure",
Expand Down Expand Up @@ -352,30 +352,40 @@
}
]
},
"direct_transition": "Transition_To_Home"
"conditional_transition": [
{
"transition": "Default_Home_Health_Reason",
"condition": {
"condition_type": "Attribute",
"attribute": "home_health_reason",
"operator": "is nil"
}
},
{
"transition": "Face_to_Face_Encounter"
}
]
},
"Reset Home Health": {
"type": "SetAttribute",
"attribute": "home_health",
"direct_transition": "Wait Until Home Health",
"direct_transition": "Reset Home Health Reason",
"value": false
},
"Transition_To_Home": {
"type": "ConditionOnset",
"target_encounter": "Face_to_Face_Encounter",
"codes": [
{
"system": "SNOMED-CT",
"code": 1871000124103,
"display": "Transition from acute care to home-health care (finding)"
}
],
"direct_transition": "Face_to_Face_Encounter"
"Default_Home_Health_Reason": {
"type": "SetAttribute",
"attribute": "home_health_reason",
"direct_transition": "Face_to_Face_Encounter",
"value_code": {
"system": "SNOMED-CT",
"code": "1871000124103",
"display": "Transition from acute care to home-health care (finding)"
}
},
"End_Transition_To_Home": {
"type": "ConditionEnd",
"direct_transition": "Last Visit",
"condition_onset": "Transition_To_Home"
"Reset Home Health Reason": {
"type": "SetAttribute",
"attribute": "home_health_reason",
"direct_transition": "Wait Until Home Health"
}
},
"gmf_version": 1
Expand Down
13 changes: 12 additions & 1 deletion src/main/resources/modules/metabolic_syndrome_care.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,18 @@
"remarks": [
"setting prediabetes as severity 0 makes some things easier"
],
"direct_transition": "Diagnose_Prediabetes"
"conditional_transition": [
{
"transition": "Check_CarePlan",
"condition": {
"condition_type": "PriorState",
"name": "Diagnose_Diabetes"
}
},
{
"transition": "Diagnose_Prediabetes"
}
]
},
"Diagnose_Prediabetes": {
"type": "ConditionOnset",
Expand Down
45 changes: 30 additions & 15 deletions src/main/resources/modules/opioid_addiction.json
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
"distributed_transition": [
{
"distribution": 0.98747,
"transition": "End_Directed_Use_Overdose_Encounter"
"transition": "End_Directed_Use_Overdose"
},
{
"distribution": 0.01253,
Expand Down Expand Up @@ -683,7 +683,7 @@
"distributed_transition": [
{
"distribution": 0.98747,
"transition": "End_Misuse_Overdose_Encounter"
"transition": "End_Misuse_Overdose"
},
{
"distribution": 0.01253,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
56 changes: 36 additions & 20 deletions src/main/resources/modules/pregnancy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1919,11 +1919,11 @@
"Miscarriage_Fatal_Pregnancy_Complication_Ends": {
"type": "ConditionEnd",
"referenced_by_attribute": "fatal_pregnancy_complication",
"direct_transition": "End_Miscarriage_Followup_Encounter"
"direct_transition": "History_of_Miscarriage"
},
"End_Miscarriage_Followup_Encounter": {
"type": "EncounterEnd",
"direct_transition": "Miscarriage_Ends"
"direct_transition": "End_Miscarriage_Condition"
},
"Wait_For_Induced_Abortion": {
"type": "Delay",
Expand Down Expand Up @@ -2129,24 +2129,6 @@
}
]
},
"Miscarriage_Ends": {
"type": "ConditionEnd",
"condition_onset": "Become_Pregnant",
"conditional_transition": [
{
"transition": "Anemia_End_2",
"condition": {
"condition_type": "Attribute",
"attribute": "anemia_pregnancy",
"operator": "==",
"value": 1
}
},
{
"transition": "Unset_Pregnant_Attribute"
}
]
},
"Abortion_Ends": {
"type": "ConditionEnd",
"condition_onset": "Become_Pregnant",
Expand Down Expand Up @@ -2326,6 +2308,40 @@
],
"assign_to_attribute": "fatal_pregnancy_complication",
"direct_transition": "End_Initial_Visit_Towards_Ectopic_Pregnancy"
},
"Miscarriage_Ends_Pregnancy": {
"type": "ConditionEnd",
"condition_onset": "Become_Pregnant",
"conditional_transition": [
{
"transition": "Anemia_End_2",
"condition": {
"condition_type": "Attribute",
"attribute": "anemia_pregnancy",
"operator": "==",
"value": 1
}
},
{
"transition": "Unset_Pregnant_Attribute"
}
]
},
"End_Miscarriage_Condition": {
"type": "ConditionEnd",
"direct_transition": "Miscarriage_Ends_Pregnancy",
"referenced_by_attribute": "miscarriage"
},
"History_of_Miscarriage": {
"type": "ConditionOnset",
"codes": [
{
"system": "SNOMED-CT",
"code": 161744009,
"display": "Past pregnancy history of miscarriage (situation)"
}
],
"direct_transition": "End_Miscarriage_Followup_Encounter"
}
},
"gmf_version": 1
Expand Down
Loading