From 0d52c3c7ff06fa62813678042b934e3a55a1739e Mon Sep 17 00:00:00 2001 From: Abigail R Watson Date: Sat, 30 Dec 2023 00:24:51 -0600 Subject: [PATCH] endometriosis module --- ...enstrual_cycle.json => endometriosis.json} | 222 ++--- .../modules/wearables_sleepapnea.json | 814 +++++++++--------- 2 files changed, 526 insertions(+), 510 deletions(-) rename src/main/resources/modules/{menstrual_cycle.json => endometriosis.json} (67%) diff --git a/src/main/resources/modules/menstrual_cycle.json b/src/main/resources/modules/endometriosis.json similarity index 67% rename from src/main/resources/modules/menstrual_cycle.json rename to src/main/resources/modules/endometriosis.json index bcb6d6df56..7b4fef19be 100644 --- a/src/main/resources/modules/menstrual_cycle.json +++ b/src/main/resources/modules/endometriosis.json @@ -1,19 +1,21 @@ { - "name": "Menstrual Cycle", - "remarks": [ + "name": "Endometriosis", + "remarks": [ "The reproductive system of a female, unlike men, shows regular cyclic changes that teleologically may be regarded as periodic preparation for pregnancy and fertilization. In primates and humans, the cycle is a menstrual cycle, and its most conspicuous feature is the periodic vaginal bleeding that occurs with the shedding of uterine mucose (menstruation). The length of the cycle is notoriously variable, but an average figure is 28 days from the start of one menstrual period to the start of the next. By common usage, the days of the cycle are identified by number starting with the first day of menstruation. It begins at puberty, ranging from the ages of 10 to 16, and ends at menopause at an average age of 51. -Thiyagarajan, Basit, Jeanmonod 2022", "", "References", "https://www.ncbi.nlm.nih.gov/books/NBK500020/", "https://www.womenshealth.gov/a-z-topics/endometriosis", - "Roblitz2013_Menstrual_Cycle.pdf", - "", + "Roblitz2013_Menstrual_Cycle.pdf", + "https://www.womenshealth.gov/a-z-topics/endometriosis", + "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4921342", + "", "Known model limitations:", "This model is significantly more complex than other models included in Synthea, with nearly 10x more parameters than the circadian cycle.", "Currently, only Estradiol output levels are mapped to output data.", "This model generates continuous data over a 28 cycle, which would not be recorded in any known clinical test. Rather, laboratory tests would typically involve a blood draw, and a discrite value at a single point in time.", "Details for writing intersection functions to extract a single value are explianed in greater detail in the Synthea Wiki." - ], + ], "states": { "Initial": { "type": "Initial", @@ -28,10 +30,12 @@ { "transition": "Terminal" } - ] + ], + "name": "Initial" }, "Terminal": { - "type": "Terminal" + "type": "Terminal", + "name": "Terminal" }, "Female": { "type": "Simple", @@ -40,61 +44,16 @@ ], "distributed_transition": [ { - "transition": "Age_13-19", - "distribution": 0.10 - }, - { - "transition": "Age_20-29", - "distribution": 0.20 + "transition": "Age_15-44", + "distribution": 0.11 }, { - "transition": "Age_30-39", - "distribution": 0.35 - }, - { - "transition": "Age_40-49", - "distribution": 0.35 + "distribution": 0.89, + "transition": "Terminal" } - ] - }, - "Age_13-19": { - "type": "Delay", - "direct_transition": "Endometriosis", - "range": { - "low": 13, - "high": 19, - "unit": "years" - } - }, - "Age_20-29": { - "type": "Delay", - "direct_transition": "Endometriosis", - "range": { - "low": 20, - "high": 29, - "unit": "years" - } - }, - "Age_30-39": { - "type": "Delay", - "direct_transition": "Endometriosis", - "range": { - "low": 30, - "high": 39, - "unit": "years" - } - }, - "Age_40-49": { - "type": "Delay", - "direct_transition": "Endometriosis", - "range": { - "low": 40, - "high": 49, - "unit": "years" - } + ], + "name": "Female" }, - - "Endometriosis": { "type": "ConditionOnset", "target_encounter": "Obgyn_Encounter", @@ -102,10 +61,13 @@ { "system": "SNOMED-CT", "code": 129103003, - "display": "Endometriosis (disorder)" + "display": "Endometriosis (disorder)", + "value_set": "" } ], - "remarks": [ "" ], + "remarks": [ + "" + ], "distributed_transition": [ { "transition": "Obgyn_Encounter", @@ -116,10 +78,11 @@ "distribution": 0.79 }, { - "transition": "Terminal", + "transition": "Endometriosis_End", "distribution": 0.01 } - ] + ], + "name": "Endometriosis" }, "Symptom_Onset_Delay": { "type": "Delay", @@ -128,75 +91,62 @@ "low": 1, "high": 5, "unit": "years" - } + }, + "name": "Symptom_Onset_Delay" }, "Menstrual_Cramps_Symptom": { "type": "Symptom", - "symptom": "Cramps", "cause": "Endometriosis", - "direct_transition": "Menstrual_Cramps_Symptom_Ends", + "distributed_transition": [ + { + "transition": "Endometriosis_End", + "distribution": 0.05 + }, + { + "distribution": 0.95, + "transition": "Obgyn_Encounter" + } + ], "codes": [ { "system": "SNOMED-CT", "code": 431416001, - "display": "Menstrual cramp (finding)" + "display": "Menstrual cramp (finding)", + "value_set": "" } - ] - }, - "Menstrual_Cramps_Symptom_Ends": { - "type": "Symptom", - "symptom": "Cramps", - "cause": "Endometriosis", - "direct_transition": "Endometriosis_End" + ], + "name": "Menstrual_Cramps_Symptom" }, - "Endometriosis_End": { "type": "ConditionEnd", "condition_onset": "Endometriosis", - "direct_transition": "Terminal" + "direct_transition": "Terminal", + "name": "Endometriosis_End" }, - "Obgyn_Encounter": { "type": "Encounter", "encounter_class": "emergency", - "reason": "Gynecology_Exam", + "reason": "Blood Draw", "codes": [ { "system": "SNOMED-CT", "code": 185221008, - "display": "Seen in gynecology clinic (finding)" + "display": "Seen in gynecology clinic (finding)", + "value_set": "" } ], - "direct_transition": "Gynecology_Exam" + "direct_transition": "Blood Draw", + "name": "Obgyn_Encounter" }, - - "Obgyn_Encounter_End": { "type": "EncounterEnd", - "direct_transition": "Terminal", + "direct_transition": "Aromatase Inhibitor", "discharge_disposition": { "system": "NUBC", "code": "01", "display": "Discharged to home care or self care (routine discharge)" - } - }, - - - "Gynecology_Exam": { - "type": "Procedure", - "codes": [ - { - "system": "SNOMED-CT", - "code": 396540005, - "display": "Phlebotomy (procedure)" - } - ], - "duration": { - "low": 5, - "high": 10, - "unit": "minutes" }, - "direct_transition": "Endocrinology_Sim" + "name": "Obgyn_Encounter_End" }, "Endocrinology_Sim": { "type": "Physiology", @@ -214,7 +164,8 @@ } ], "direct_transition": "HormonePanel", - "alt_direct_transition": "Clear_endocrinology_data" + "alt_direct_transition": "Clear_endocrinology_data", + "name": "Endocrinology_Sim" }, "HormonePanel": { "type": "Observation", @@ -224,7 +175,8 @@ { "system": "SNOMED-CT", "code": "2243-4", - "display": "Estradiol (E2) [Mass/volume] in Serum or Plasma" + "display": "Estradiol (E2) [Mass/volume] in Serum or Plasma", + "value_set": "" } ], "sampled_data": { @@ -232,7 +184,8 @@ "endocrinology_data" ] }, - "direct_transition": "HormonePanel_Chart" + "direct_transition": "HormonePanel_Chart", + "name": "HormonePanel" }, "HormonePanel_Chart": { "type": "Observation", @@ -242,7 +195,8 @@ { "system": "SNOMED-CT", "code": "2243-4", - "display": "Estradiol (E2) [Mass/volume] in Serum or Plasma" + "display": "Estradiol (E2) [Mass/volume] in Serum or Plasma", + "value_set": "" } ], "attachment": { @@ -260,12 +214,68 @@ ] } }, - "direct_transition": "Clear_endocrinology_data" + "direct_transition": "Clear_endocrinology_data", + "name": "HormonePanel_Chart" }, "Clear_endocrinology_data": { "type": "SetAttribute", "attribute": "endocrinology_data", - "direct_transition": "Obgyn_Encounter_End" + "direct_transition": "Prescribe Aromatase Inhibitor", + "name": "Clear_endocrinology_data" + }, + "Blood Draw": { + "type": "Procedure", + "codes": [ + { + "system": "SNOMED-CT", + "code": 396540005, + "display": "Phlebotomy (procedure)", + "value_set": "" + } + ], + "duration": { + "low": 5, + "high": 10, + "unit": "minutes" + }, + "direct_transition": "Endocrinology_Sim", + "name": "Blood Draw" + }, + "Age_15-44": { + "type": "Delay", + "direct_transition": "Endometriosis", + "range": { + "low": 13, + "high": 19, + "unit": "years" + }, + "name": "Age_15-44" + }, + "Prescribe Aromatase Inhibitor": { + "type": "MedicationOrder", + "codes": [ + { + "system": "RxNorm", + "code": 72965, + "display": "letrozole", + "value_set": "" + } + ], + "direct_transition": "Obgyn_Encounter_End", + "name": "Prescribe Aromatase Inhibitor" + }, + "Aromatase Inhibitor": { + "type": "MedicationEnd", + "direct_transition": "Endometriosis_End", + "name": "Aromatase Inhibitor", + "codes": [ + { + "system": "RxNorm", + "code": 413575009, + "display": "Substance with aromatase inhibitor mechanism of action (substance)", + "value_set": "" + } + ] } }, "gmf_version": 1 diff --git a/src/main/resources/modules/wearables_sleepapnea.json b/src/main/resources/modules/wearables_sleepapnea.json index bec19b6bff..5a117a54f4 100644 --- a/src/main/resources/modules/wearables_sleepapnea.json +++ b/src/main/resources/modules/wearables_sleepapnea.json @@ -1,431 +1,437 @@ { - "name": "Wearables_SleepApnea", - "remarks": [ - "The regulation of sleep is processed by the homeostatic physiology of the circadian rhythm, the sleep/wake cycle. Circadian rhythm is the 24-hour internal clock in our brain that regulates cycles of alertness and sleepiness by responding to light changes in our environment. ", - "", - "References", - "https://www.ncbi.nlm.nih.gov/books/NBK519507/", - "https://houstonsleepsolutions.com/blog/the-statistics-of-sleep-apnea/", - "", - "Known model limitations:", - "This model produces continuous data over 24hrs, and would not typically be reportable in any sort of laboratory test. Clinical tests of melatonin or cortisol would take discrete sample at a specific time.", - "This model can be interected with another function (i.e. a line), to produce a sleep/wake cycle. Additional information on how to do this is provided in the Wiki.", - "This model me be useful in generating cyclical daily habits, such as taking medicaitons in the morning, exercising at certain times of the day, and so forth. Please see the Wiki for additional details." - ], - "states": { - "Initial": { - "type": "Initial", - "name": "Initial", - "direct_transition": "Sleep Apnea Guard" - }, - "Terminal": { - "type": "Terminal", - "name": "Terminal" + "name": "Wearables_SleepApnea", + "remarks": [ + "The regulation of sleep is processed by the homeostatic physiology of the circadian rhythm, the sleep/wake cycle. Circadian rhythm is the 24-hour internal clock in our brain that regulates cycles of alertness and sleepiness by responding to light changes in our environment. ", + "", + "References", + "https://www.ncbi.nlm.nih.gov/books/NBK519507/", + "https://houstonsleepsolutions.com/blog/the-statistics-of-sleep-apnea/", + "", + "Known model limitations:", + "This model produces continuous data over 24hrs, and would not typically be reportable in any sort of laboratory test. Clinical tests of melatonin or cortisol would take discrete sample at a specific time.", + "This model can be interected with another function (i.e. a line), to produce a sleep/wake cycle. Additional information on how to do this is provided in the Wiki.", + "This model me be useful in generating cyclical daily habits, such as taking medicaitons in the morning, exercising at certain times of the day, and so forth. Please see the Wiki for additional details." + ], + "states": { + "Initial": { + "type": "Initial", + "name": "Initial", + "direct_transition": "Sleep Apnea Guard" + }, + "Terminal": { + "type": "Terminal", + "name": "Terminal" + }, + "Symptom_Onset_Delay": { + "type": "Delay", + "range": { + "low": 1, + "high": 5, + "unit": "years" }, - "Symptom_Onset_Delay": { - "type": "Delay", - "range": { - "low": 1, - "high": 5, - "unit": "years" + "name": "Symptom_Onset_Delay", + "distributed_transition": [ + { + "transition": "Snoring", + "distribution": 0.5 }, - "name": "Symptom_Onset_Delay", - "distributed_transition": [ - { - "transition": "Snoring", - "distribution": 0.5 - }, - { - "transition": "Insomia_Symptom", - "distribution": 1 - } - ] - }, - "Insomia_Symptom": { - "type": "Symptom", - "symptom": "Insomnia", - "cause": "Sleep_Apnea", - "codes": [ - { - "system": "SNOMED-CT", - "code": 193462001, - "display": "Insomnia (disorder)", - "value_set": "" - } - ], - "direct_transition": "Insomia_Symptom_Ends", - "name": "Insomia_Symptom" - }, - "Insomia_Symptom_Ends": { - "type": "Symptom", - "symptom": "Insomnia", - "cause": "Sleep_Apnea", - "direct_transition": "Physical_Activity_Resumes", - "name": "Insomia_Symptom_Ends" - }, - "Physical_Activity_Resumes": { - "type": "ConditionEnd", - "condition_onset": "Sleep Apnea Guard", - "direct_transition": "Terminal", - "name": "Physical_Activity_Resumes" - }, - "SleepStudy_Baseline_Encounter": { - "type": "Encounter", - "encounter_class": "emergency", - "reason": "SleepStudy_Baseline", - "codes": [ - { - "system": "SNOMED-CT", - "code": 60554003, - "display": "Polysomnography (procedure)", - "value_set": "" - } - ], - "direct_transition": "SleepStudy_Baseline", - "name": "SleepStudy_Baseline_Encounter" - }, - "Monitor_iWatch": { - "type": "Device", - "code": { + { + "transition": "Insomia_Symptom", + "distribution": 1 + } + ] + }, + "Insomia_Symptom": { + "type": "Symptom", + "symptom": "Insomnia", + "cause": "Sleep_Apnea", + "codes": [ + { "system": "SNOMED-CT", - "code": 13288007, - "display": "Monitor, device (physical object)" - }, - "direct_transition": "Monitor_CPAP", - "assign_to_attribute": "o2_data_iwatch", - "name": "Monitor_iWatch" - }, - "SleepStudy_Baseline_Encounter_End": { - "type": "EncounterEnd", - "direct_transition": "Terminal", - "discharge_disposition": { - "system": "NUBC", - "code": "01", - "display": "Discharged to home care or self care (routine discharge)" - }, - "name": "SleepStudy_Baseline_Encounter_End" - }, - "SleepStudy_Baseline": { - "type": "Procedure", - "codes": [ - { - "system": "SNOMED-CT", - "code": 60554003, - "display": "Polysomnography (procedure)", - "value_set": "" - } - ], - "duration": { - "low": 5, - "high": 10, - "unit": "minutes" - }, - "direct_transition": "CircadianClock_Sim", - "name": "SleepStudy_Baseline" - }, - "CircadianClock_Sim": { - "type": "Physiology", - "model": "Hong2009_CircadianClock.xml", - "solver": "runge_kutta", - "step_size": 0.01, - "sim_duration": 24, - "lead_time": 0, - "inputs": [ - { - "from_exp": "#{BMI}", - "to": "kica" - } - ], - "outputs": [ - { - "from_list": "CPtot", - "to": "sleep_monitor_data", - "type": "Attribute" - } - ], - "direct_transition": "SleepMonitor_Data", - "alt_direct_transition": "SleepAnalysis", - "name": "CircadianClock_Sim" + "code": 193462001, + "display": "Insomnia (disorder)", + "value_set": "" + } + ], + "direct_transition": "Insomia_Symptom_Ends", + "name": "Insomia_Symptom" + }, + "Insomia_Symptom_Ends": { + "type": "Symptom", + "symptom": "Insomnia", + "cause": "Sleep_Apnea", + "direct_transition": "Physical_Activity_Resumes", + "name": "Insomia_Symptom_Ends" + }, + "Physical_Activity_Resumes": { + "type": "ConditionEnd", + "condition_onset": "Sleep Apnea Guard", + "direct_transition": "Terminal", + "name": "Physical_Activity_Resumes" + }, + "SleepStudy_Baseline_Encounter": { + "type": "Encounter", + "encounter_class": "emergency", + "reason": "SleepStudy_Baseline", + "codes": [ + { + "system": "SNOMED-CT", + "code": 453701000124103, + "display": "In-person encounter (procedure)", + "value_set": "" + } + ], + "direct_transition": "SleepStudy_Baseline", + "name": "SleepStudy_Baseline_Encounter" + }, + "Monitor_iWatch": { + "type": "Device", + "code": { + "system": "SNOMED-CT", + "code": 13288007, + "display": "Monitor, device (physical object)" }, - "SleepMonitor_Data": { - "type": "Observation", - "category": "procedure", - "unit": "", - "codes": [ - { - "system": "SNOMED-CT", - "code": 60554003, - "display": "Polysomnography (procedure)", - "value_set": "" - } - ], - "sampled_data": { - "attributes": [ - "sleep_monitor_data" - ] - }, - "direct_transition": "SleepMonitor_Chart", - "name": "SleepMonitor_Data" + "direct_transition": "Monitor_CPAP", + "assign_to_attribute": "o2_data_iwatch", + "name": "Monitor_iWatch" + }, + "SleepStudy_Baseline_Encounter_End": { + "type": "EncounterEnd", + "discharge_disposition": { + "system": "NUBC", + "code": "01", + "display": "Discharged to home care or self care (routine discharge)" }, - "SleepMonitor_Chart": { - "type": "Observation", - "category": "procedure", - "unit": "", - "codes": [ - { - "system": "SNOMED-CT", - "code": 60554003, - "display": "Polysomnography (procedure)", - "value_set": "" - } - ], - "attachment": { - "chart": { - "type": "line", - "title": "Circadian Cycle", - "axis_attribute_x": "time", - "width": 400, - "height": 200, - "series": [ - { - "attribute": "sleep_monitor_data" - } - ] - } + "name": "SleepStudy_Baseline_Encounter_End", + "distributed_transition": [ + { + "transition": "Terminal", + "distribution": 0.5 }, - "direct_transition": "Clear_SleepMonitor_result", - "name": "SleepMonitor_Chart" - }, - "Clear_SleepMonitor_result": { - "type": "SetAttribute", - "attribute": "sleep_monitor_data", - "direct_transition": "SleepStudy_Baseline_Encounter_End", - "name": "Clear_SleepMonitor_result" + { + "transition": "Monitor_iWatch", + "distribution": 0.5 + } + ] + }, + "SleepStudy_Baseline": { + "type": "Procedure", + "codes": [ + { + "system": "SNOMED-CT", + "code": 60554003, + "display": "Polysomnography (procedure)", + "value_set": "" + } + ], + "duration": { + "low": 5, + "high": 10, + "unit": "minutes" }, - "SleepAnalysis": { - "type": "Observation", - "category": "exam", - "unit": "", - "codes": [ - { - "system": "http://loinc.org", - "code": "93832-4", - "display": "Sleep duration.", - "value_set": "" - } - ], - "direct_transition": "Wellness_Baseline_Encounter_End", - "name": "SleepAnalysis" + "direct_transition": "CircadianClock_Sim", + "name": "SleepStudy_Baseline" + }, + "CircadianClock_Sim": { + "type": "Physiology", + "model": "Hong2009_CircadianClock.xml", + "solver": "runge_kutta", + "step_size": 0.01, + "sim_duration": 24, + "lead_time": 0, + "inputs": [ + { + "from_exp": "#{BMI}", + "to": "kica" + } + ], + "outputs": [ + { + "from_list": "CPtot", + "to": "sleep_monitor_data", + "type": "Attribute" + } + ], + "direct_transition": "SleepMonitor_Data", + "alt_direct_transition": "SleepAnalysis", + "name": "CircadianClock_Sim" + }, + "SleepMonitor_Data": { + "type": "Observation", + "category": "exam", + "unit": "", + "codes": [ + { + "system": "LOINC", + "code": "28633-6", + "display": "Polysomnography (sleep) study", + "value_set": "" + } + ], + "sampled_data": { + "attributes": [ + "sleep_monitor_data" + ] }, - "Sleep Apnea Guard": { - "type": "Guard", - "allow": { - "condition_type": "Active Condition", - "codes": [ + "direct_transition": "SleepMonitor_Chart", + "name": "SleepMonitor_Data" + }, + "SleepMonitor_Chart": { + "type": "Observation", + "category": "exam", + "unit": "", + "codes": [ + { + "system": "LOINC", + "code": "28633-6", + "display": "Polysomnography (sleep) study", + "value_set": "" + } + ], + "attachment": { + "chart": { + "type": "line", + "title": "Sleep Monitor - Circadium Rhythm", + "axis_attribute_x": "time", + "axis_attribute_y": "f(t)", + "width": 400, + "height": 200, + "series": [ { - "system": "SNOMED-CT", - "code": 73430006, - "display": "Sleep apnea" + "attribute": "sleep_monitor_data" } ] - }, - "name": "Sleep Apnea Guard", - "distributed_transition": [ - { - "transition": "Symptom_Onset_Delay", - "distribution": 0.8 - }, - { - "transition": "Wellness_Baseline_Encounter", - "distribution": 0.2 - } - ] - }, - "Snoring": { - "type": "Symptom", - "symptom": "Snoring", - "cause": "Sleep_Apnea", - "codes": [ - { - "system": "SNOMED-CT", - "code": 72863001, - "display": "Snoring (finding)", - "value_set": "" - } - ], - "direct_transition": "Snoring_Ends", - "name": "Snoring" - }, - "Snoring_Ends": { - "type": "Symptom", - "symptom": "Snoring", - "cause": "Sleep_Apnea", - "direct_transition": "Sleep_Apnea_Resolved", - "name": "Snoring_Ends" - }, - "Sleep_Apnea_Resolved": { - "type": "ConditionEnd", - "direct_transition": "Terminal", - "name": "Sleep_Apnea_Resolved" + } }, - "Wellness_Baseline_Encounter": { - "type": "Encounter", - "encounter_class": "emergency", - "reason": "Wellness_Baseline", + "direct_transition": "Clear_SleepMonitor_result", + "name": "SleepMonitor_Chart" + }, + "Clear_SleepMonitor_result": { + "type": "SetAttribute", + "attribute": "sleep_monitor_data", + "direct_transition": "SleepStudy_Baseline_Encounter_End", + "name": "Clear_SleepMonitor_result" + }, + "SleepAnalysis": { + "type": "Observation", + "category": "exam", + "unit": "h", + "codes": [ + { + "system": "http://loinc.org", + "code": "93832-4", + "display": "Sleep duration.", + "value_set": "" + } + ], + "direct_transition": "Terminal", + "name": "SleepAnalysis", + "remarks": [ + "2" + ] + }, + "Sleep Apnea Guard": { + "type": "Guard", + "allow": { + "condition_type": "Active Condition", "codes": [ { "system": "SNOMED-CT", - "code": 225385005, - "display": "Behavioral assessment (procedure)", - "value_set": "" - } - ], - "name": "Wellness_Baseline_Encounter", - "distributed_transition": [ - { - "transition": "SleepStudy_Baseline_Encounter", - "distribution": 0.5 - }, - { - "transition": "Monitor_iWatch", - "distribution": 0.5 + "code": 73430006, + "display": "Sleep apnea" } ] }, - "Monitor_CPAP": { - "type": "Device", - "code": { - "system": "SNOMED-CT", - "code": 702172008, - "display": "Home continuous positive airway pressure unit (physical object)" - }, - "direct_transition": "Sleep_Study_Baseline", - "assign_to_attribute": "o2_data_cpap", - "name": "Monitor_CPAP" - }, - "Wellness_Baseline_Encounter_End": { - "type": "EncounterEnd", - "direct_transition": "Terminal", - "discharge_disposition": { - "system": "NUBC", - "code": "01", - "display": "Discharged to home care or self care (routine discharge)" + "name": "Sleep Apnea Guard", + "distributed_transition": [ + { + "transition": "Symptom_Onset_Delay", + "distribution": 0.8 }, - "name": "Wellness_Baseline_Encounter_End" + { + "transition": "Wellness_Baseline_Encounter", + "distribution": 0.2 + } + ] + }, + "Snoring": { + "type": "Symptom", + "symptom": "Snoring", + "cause": "Sleep_Apnea", + "codes": [ + { + "system": "SNOMED-CT", + "code": 72863001, + "display": "Snoring (finding)", + "value_set": "" + } + ], + "direct_transition": "Snoring_Ends", + "name": "Snoring" + }, + "Snoring_Ends": { + "type": "Symptom", + "symptom": "Snoring", + "cause": "Sleep_Apnea", + "direct_transition": "Sleep_Apnea_Resolved", + "name": "Snoring_Ends" + }, + "Sleep_Apnea_Resolved": { + "type": "ConditionEnd", + "condition_onset": "Sleep Apnea Guard", + "direct_transition": "Terminal", + "name": "Sleep_Apnea_Resolved" + }, + "Wellness_Baseline_Encounter": { + "type": "Encounter", + "encounter_class": "emergency", + "reason": "Wellness_Baseline", + "codes": [ + { + "system": "SNOMED-CT", + "code": 444971000124105, + "display": "Annual wellness visit (procedure)", + "value_set": "" + } + ], + "name": "Wellness_Baseline_Encounter", + "direct_transition": "Wellness_Baseline_Encounter_End" + }, + "Monitor_CPAP": { + "type": "Device", + "code": { + "system": "SNOMED-CT", + "code": 702172008, + "display": "Home continuous positive airway pressure unit (physical object)" }, - "Sleep_Study_Baseline": { - "type": "Observation", - "category": "exam", - "unit": "", - "codes": [ - { - "system": "SNOMED-CT", - "code": "410189008", - "display": "Taking patient vitals signs education (procedure)", - "value_set": "" - } - ], - "direct_transition": "CPAP_Baseline", - "name": "Sleep_Study_Baseline" + "direct_transition": "Sleep_Study_Baseline", + "assign_to_attribute": "o2_data_cpap", + "name": "Monitor_CPAP" + }, + "Sleep_Study_Baseline": { + "type": "Procedure", + "codes": [ + { + "system": "SNOMED-CT", + "code": "1234", + "display": "SNOMED Code", + "value_set": "" + } + ], + "distribution": { + "kind": "UNIFORM", + "parameters": { + "high": 60, + "low": 30 + } }, - "CPAP_Baseline": { - "type": "Procedure", - "codes": [ - { - "system": "SNOMED-CT", - "code": 47545007, - "display": "Continuous positive airway pressure ventilation treatment (regime/therapy)", - "value_set": "" - } - ], - "duration": { - "low": 5, - "high": 10, - "unit": "minutes" - }, - "direct_transition": "O2_Sim", - "name": "CPAP_Baseline" + "unit": "minutes", + "direct_transition": "CPAP_Baseline", + "name": "Sleep_Study_Baseline" + }, + "CPAP_Baseline": { + "type": "Procedure", + "codes": [ + { + "system": "SNOMED-CT", + "code": 47545007, + "display": "Continuous positive airway pressure ventilation treatment (regime/therapy)", + "value_set": "" + } + ], + "duration": { + "low": 5, + "high": 10, + "unit": "minutes" }, - "O2_Sim": { - "type": "Physiology", - "model": "Guyton1972_PulmonaryOxygenIntake.xml", - "solver": "euler", - "step_size": 0.1, - "sim_duration": 60, - "lead_time": 2, - "inputs": [ - { - "from_exp": "#{BMI} * 0.497 + 56.15", - "to": "OVA" - } - ], - "outputs": [ - { - "from_list": "PO2ART", - "to": "o2_result", - "type": "Attribute" - } - ], - "direct_transition": "CPAP_Data", - "alt_direct_transition": "Clear_CPAP_result", - "name": "O2_Sim" + "direct_transition": "O2_Sim", + "name": "CPAP_Baseline" + }, + "O2_Sim": { + "type": "Physiology", + "model": "Guyton1972_PulmonaryOxygenIntake.xml", + "solver": "euler", + "step_size": 0.1, + "sim_duration": 60, + "lead_time": 2, + "inputs": [ + { + "from_exp": "#{BMI} * 0.497 + 56.15", + "to": "OVA" + } + ], + "outputs": [ + { + "from_list": "PO2ART", + "to": "o2_result", + "type": "Attribute" + } + ], + "direct_transition": "CPAP_Data", + "alt_direct_transition": "Clear_CPAP_result", + "name": "O2_Sim" + }, + "CPAP_Data": { + "type": "Observation", + "category": "exam", + "unit": "", + "codes": [ + { + "system": "LOINC", + "code": "2703-7", + "display": "Oxygen [Partial pressure] in Arterial blood", + "value_set": "" + } + ], + "sampled_data": { + "attributes": [ + "o2_result" + ] }, - "CPAP_Data": { - "type": "Observation", - "category": "procedure", - "unit": "", - "codes": [ - { - "system": "http://loinc.org", - "code": "2703-7", - "display": "Oxygen [Partial pressure] in Arterial blood", - "value_set": "" - } - ], - "sampled_data": { - "attributes": [ - "o2_result" + "direct_transition": "CPAP_Chart", + "name": "CPAP_Data" + }, + "CPAP_Chart": { + "type": "Observation", + "category": "exam", + "unit": "", + "codes": [ + { + "system": "LOINC", + "code": "2703-7", + "display": "Oxygen [Partial pressure] in Arterial blood", + "value_set": "" + } + ], + "attachment": { + "chart": { + "type": "line", + "title": "CPAP O2 Usage", + "axis_attribute_x": "time", + "axis_attribute_y": "mmHg", + "width": 400, + "height": 200, + "series": [ + { + "attribute": "o2_result" + } ] - }, - "direct_transition": "CPAP_Chart", - "name": "CPAP_Data" + } }, - "CPAP_Chart": { - "type": "Observation", - "category": "procedure", - "unit": "", - "codes": [ - { - "system": "http://loinc.org", - "code": "2703-7", - "display": "Oxygen [Partial pressure] in Arterial blood", - "value_set": "" - } - ], - "attachment": { - "chart": { - "type": "line", - "title": "CPAP O2 Usage", - "axis_attribute_x": "time", - "axis_attribute_y": "mmHg", - "width": 400, - "height": 200, - "series": [ - { - "attribute": "o2_result" - } - ] - } - }, - "direct_transition": "Clear_CPAP_result", - "name": "CPAP_Chart" - }, - "Clear_CPAP_result": { - "type": "SetAttribute", - "attribute": "o2_result", - "direct_transition": "SleepAnalysis", - "name": "Clear_CPAP_result" - } + "direct_transition": "Clear_CPAP_result", + "name": "CPAP_Chart" + }, + "Clear_CPAP_result": { + "type": "SetAttribute", + "attribute": "o2_result", + "direct_transition": "SleepAnalysis", + "name": "Clear_CPAP_result" }, - "gmf_version": 1 - } \ No newline at end of file + "Wellness_Baseline_Encounter_End": { + "type": "EncounterEnd", + "name": "Wellness_Baseline_Encounter_End", + "direct_transition": "SleepStudy_Baseline_Encounter" + } + }, + "gmf_version": 1 +} \ No newline at end of file