diff --git a/app/__pycache__/views.cpython-311.pyc b/app/__pycache__/views.cpython-311.pyc index 318cdc7fe..57c489bee 100644 Binary files a/app/__pycache__/views.cpython-311.pyc and b/app/__pycache__/views.cpython-311.pyc differ diff --git a/app/templates/elements/Scripts/footerButtons.html b/app/templates/elements/Scripts/footerButtons.html index 4873a89c9..efbf6096e 100644 --- a/app/templates/elements/Scripts/footerButtons.html +++ b/app/templates/elements/Scripts/footerButtons.html @@ -11,6 +11,48 @@ var tricuspid_buttons = ["normal_heart_sound_tricuspid_valve","split_first_heart_sound_tricuspid_valve","split_second_heart_sound_tricuspid_valve","third_heart_sound_tricuspid_valve","fourth_heart_sound_tricuspid_valve","functional_murmur_sound_tricuspid_valve","diastolic_murmur_sound_tricuspid_valve","opening_snap_sound_tricuspid_valve","holosystolic_murmur_sound_tricuspid_valve","early_systolic_murmur_sound_tricuspid_valve","mid_systolic_murmur_sound_tricuspid_valve","continuous_murmur_sound_tricuspid_valve","austin_flint_murmur_sound_tricuspid_valve","pericardial_rub_sound_tricuspid_valve","graham_steell_murmur_sound_tricuspid_valve","tricuspid_valve_regurgitation_sound_tricuspid_valve","tricuspid_valve_stenosis_sound_tricuspid_valve","tricuspid_valve_stenosis_regurgitation_sound_tricuspid_valve","congenital_tricuspid_stenosis_sound_tricuspid_valve","tricuspid_valve_regurgitation_sound_tricuspid_valve","tricuspid_valve_stenosis_sound_tricuspid_valve","tricuspid_valve_prolapse_sound_tricuspid_valve","tricuspid_stenosis_regurgitation_sound_tricuspid_valve","tricuspid_stenosis_tricuspid_regurgitation_sound_tricuspid_valve","tricuspid_valve_stenosis_sound_tricuspid_valve","tricuspid_valve_regurgitation_sound_tricuspid_valve","tricuspid_valve_regurgitation_sound_tricuspid_valve","coarctation_of_the_aorta_sound_tricuspid_valve","hypertrophic_cardiomyopathy_sound_tricuspid_valve","patent_ductus_arteriosus_sound_tricuspid_valve","atrial_septal_defect_sound_tricuspid_valve","ventricular_septal_defect_sound_tricuspid_valve","acute_myocardial_infarction_sound_tricuspid_valve","congestive_heart_failure_sound_tricuspid_valve","systemic_hypertension_sound_tricuspid_valve","acute_pericarditis_sound_tricuspid_valve","dilated_cardiomyopathy_sound_tricuspid_valve","tricuspid_hypertension_sound_tricuspid_valve","tetralogy_of_fallot_sound_tricuspid_valve","ventricular_aneurysm_sound_tricuspid_valve","ebstein_anomaly_sound_tricuspid_valve"]; var erb_buttons = ["normal_heart_sound_erb_point","split_first_heart_sound_erb_point","split_second_heart_sound_erb_point","third_heart_sound_erb_point","fourth_heart_sound_erb_point","functional_murmur_sound_erb_point","diastolic_murmur_sound_erb_point","opening_snap_sound_erb_point","holosystolic_murmur_sound_erb_point","early_systolic_murmur_sound_erb_point","mid_systolic_murmur_sound_erb_point","continuous_murmur_sound_erb_point","austin_flint_murmur_sound_erb_point","pericardial_rub_sound_erb_point","graham_steell_murmur_sound_erb_point","erb_point_regurgitation_sound_erb_point","erb_point_stenosis_sound_erb_point","erb_point_stenosis_regurgitation_sound_erb_point","congenital_tricuspid_stenosis_sound_erb_point","erb_point_regurgitation_sound_erb_point","erb_point_stenosis_sound_erb_point","erb_point_prolapse_sound_erb_point","tricuspid_stenosis_regurgitation_sound_erb_point","tricuspid_stenosis_tricuspid_regurgitation_sound_erb_point","erb_point_stenosis_sound_erb_point","erb_point_regurgitation_sound_erb_point","erb_point_regurgitation_sound_erb_point","coarctation_of_the_aorta_sound_erb_point","hypertrophic_cardiomyopathy_sound_erb_point","patent_ductus_arteriosus_sound_erb_point","atrial_septal_defect_sound_erb_point","ventricular_septal_defect_sound_erb_point","acute_myocardial_infarction_sound_erb_point","congestive_heart_failure_sound_erb_point","systemic_hypertension_sound_erb_point","acute_pericarditis_sound_erb_point","dilated_cardiomyopathy_sound_erb_point","tricuspid_hypertension_sound_erb_point","tetralogy_of_fallot_sound_erb_point","ventricular_aneurysm_sound_erb_point","ebstein_anomaly_sound_erb_point"]; + // Lungs Buttons + var LUL_buttons = [ + "brochial_respiration_front_sound_LUL","bronchovesicular_respiration_front_sound_LUL","vesicular_respiration_front_sound_LUL","diminished_vescicular_respiration_front_sound_LUL","coarse_crackles_front_sound_LUL","fine_crackles_front_sound_LUL","wheezes_front_sound_LUL","rhonchi_front_sound_LUL","gurgling_rhonchi_front_sound_LUL","stridor_front_sound_LUL","pleural_friction_rub_front_sound_LUL","amphoric_respiration_front_sound_LUL","harsh_respiration_front_sound_LUL","asthma_front_sound_LUL","covid19_front_sound_LUL","right_sided_pneumothorax_front_sound_LUL","left_sided_pneumothorax_front_sound_LUL","pneumonia_front_sound_LUL", + "brochial_respiration_back_sound_LUL","bronchovesicular_respiration_back_sound_LUL","vesicular_respiration_back_sound_LUL","diminished_vescicular_respiration_back_sound_LUL","coarse_crackles_back_sound_LUL","fine_crackles_back_sound_LUL","wheezes_back_sound_LUL","rhonchi_back_sound_LUL","gurgling_rhonchi_back_sound_LUL","stridor_back_sound_LUL","pleural_friction_rub_back_sound_LUL","amphoric_respiration_back_sound_LUL","harsh_respiration_back_sound_LUL","asthma_back_sound_LUL","covid19_back_sound_LUL","right_sided_pneumothorax_back_sound_LUL","left_sided_pneumothorax_back_sound_LUL","pneumonia_back_sound_LUL" + ]; + var LML_buttons = [ + "brochial_respiration_front_sound_LML","bronchovesicular_respiration_front_sound_LML","vesicular_respiration_front_sound_LML","diminished_vescicular_respiration_front_sound_LML","coarse_crackles_front_sound_LML","fine_crackles_front_sound_LML","wheezes_front_sound_LML","rhonchi_front_sound_LML","gurgling_rhonchi_front_sound_LML","stridor_front_sound_LML","pleural_friction_rub_front_sound_LML","amphoric_respiration_front_sound_LML","harsh_respiration_front_sound_LML","asthma_front_sound_LML","covid19_front_sound_LML","right_sided_pneumothorax_front_sound_LML","left_sided_pneumothorax_front_sound_LML","pneumonia_front_sound_LML", + "brochial_respiration_back_sound_LML","bronchovesicular_respiration_back_sound_LML","vesicular_respiration_back_sound_LML","diminished_vescicular_respiration_back_sound_LML","coarse_crackles_back_sound_LML","fine_crackles_back_sound_LML","wheezes_back_sound_LML","rhonchi_back_sound_LML","gurgling_rhonchi_back_sound_LML","stridor_back_sound_LML","pleural_friction_rub_back_sound_LML","amphoric_respiration_back_sound_LML","harsh_respiration_back_sound_LML","asthma_back_sound_LML","covid19_back_sound_LML","right_sided_pneumothorax_back_sound_LML","left_sided_pneumothorax_back_sound_LML","pneumonia_back_sound_LML" + ]; + var LLL_buttons = [ + "brochial_respiration_front_sound_LLL","bronchovesicular_respiration_front_sound_LLL","vesicular_respiration_front_sound_LLL","diminished_vescicular_respiration_front_sound_LLL","coarse_crackles_front_sound_LLL","fine_crackles_front_sound_LLL","wheezes_front_sound_LLL","rhonchi_front_sound_LLL","gurgling_rhonchi_front_sound_LLL","stridor_front_sound_LLL","pleural_friction_rub_front_sound_LLL","amphoric_respiration_front_sound_LLL","harsh_respiration_front_sound_LLL","asthma_front_sound_LLL","covid19_front_sound_LLL","right_sided_pneumothorax_front_sound_LLL","left_sided_pneumothorax_front_sound_LLL","pneumonia_front_sound_LLL", + "brochial_respiration_back_sound_LLL","bronchovesicular_respiration_back_sound_LLL","vesicular_respiration_back_sound_LLL","diminished_vescicular_respiration_back_sound_LLL","coarse_crackles_back_sound_LLL","fine_crackles_back_sound_LLL","wheezes_back_sound_LLL","rhonchi_back_sound_LLL","gurgling_rhonchi_back_sound_LLL","stridor_back_sound_LLL","pleural_friction_rub_back_sound_LLL","amphoric_respiration_back_sound_LLL","harsh_respiration_back_sound_LLL","asthma_back_sound_LLL","covid19_back_sound_LLL","right_sided_pneumothorax_back_sound_LLL","left_sided_pneumothorax_back_sound_LLL","pneumonia_back_sound_LLL" + ]; + var RUL_buttons = [ + "brochial_respiration_front_sound_RUL","bronchovesicular_respiration_front_sound_RUL","vesicular_respiration_front_sound_RUL","diminished_vescicular_respiration_front_sound_RUL","coarse_crackles_front_sound_RUL","fine_crackles_front_sound_RUL","wheezes_front_sound_RUL","rhonchi_front_sound_RUL","gurgling_rhonchi_front_sound_RUL","stridor_front_sound_RUL","pleural_friction_rub_front_sound_RUL","amphoric_respiration_front_sound_RUL","harsh_respiration_front_sound_RUL","asthma_front_sound_RUL","covid19_front_sound_RUL","right_sided_pneumothorax_front_sound_RUL","left_sided_pneumothorax_front_sound_RUL","pneumonia_front_sound_RUL", + "brochial_respiration_back_sound_RUL","bronchovesicular_respiration_back_sound_RUL","vesicular_respiration_back_sound_RUL","diminished_vescicular_respiration_back_sound_RUL","coarse_crackles_back_sound_RUL","fine_crackles_back_sound_RUL","wheezes_back_sound_RUL","rhonchi_back_sound_RUL","gurgling_rhonchi_back_sound_RUL","stridor_back_sound_RUL","pleural_friction_rub_back_sound_RUL","amphoric_respiration_back_sound_RUL","harsh_respiration_back_sound_RUL","asthma_back_sound_RUL","covid19_back_sound_RUL","right_sided_pneumothorax_back_sound_RUL","left_sided_pneumothorax_back_sound_RUL","pneumonia_back_sound_RUL" + ]; + var RML_buttons = [ + "brochial_respiration_front_sound_RML","bronchovesicular_respiration_front_sound_RML","vesicular_respiration_front_sound_RML","diminished_vescicular_respiration_front_sound_RML","coarse_crackles_front_sound_RML","fine_crackles_front_sound_RML","wheezes_front_sound_RML","rhonchi_front_sound_RML","gurgling_rhonchi_front_sound_RML","stridor_front_sound_RML","pleural_friction_rub_front_sound_RML","amphoric_respiration_front_sound_RML","harsh_respiration_front_sound_RML","asthma_front_sound_RML","covid19_front_sound_RML","right_sided_pneumothorax_front_sound_RML","left_sided_pneumothorax_front_sound_RML","pneumonia_front_sound_RML", + "brochial_respiration_back_sound_RML","bronchovesicular_respiration_back_sound_RML","vesicular_respiration_back_sound_RML","diminished_vescicular_respiration_back_sound_RML","coarse_crackles_back_sound_RML","fine_crackles_back_sound_RML","wheezes_back_sound_RML","rhonchi_back_sound_RML","gurgling_rhonchi_back_sound_RML","stridor_back_sound_RML","pleural_friction_rub_back_sound_RML","amphoric_respiration_back_sound_RML","harsh_respiration_back_sound_RML","asthma_back_sound_RML","covid19_back_sound_RML","right_sided_pneumothorax_back_sound_RML","left_sided_pneumothorax_back_sound_RML","pneumonia_back_sound_RML" + ]; + var RLL_buttons = [ + "brochial_respiration_front_sound_RLL","bronchovesicular_respiration_front_sound_RLL","vesicular_respiration_front_sound_RLL","diminished_vescicular_respiration_front_sound_RLL","coarse_crackles_front_sound_RLL","fine_crackles_front_sound_RLL","wheezes_front_sound_RLL","rhonchi_front_sound_RLL","gurgling_rhonchi_front_sound_RLL","stridor_front_sound_RLL","pleural_friction_rub_front_sound_RLL","amphoric_respiration_front_sound_RLL","harsh_respiration_front_sound_RLL","asthma_front_sound_RLL","covid19_front_sound_RLL","right_sided_pneumothorax_front_sound_RLL","left_sided_pneumothorax_front_sound_RLL","pneumonia_front_sound_RLL", + "brochial_respiration_back_sound_RLL","bronchovesicular_respiration_back_sound_RLL","vesicular_respiration_back_sound_RLL","diminished_vescicular_respiration_back_sound_RLL","coarse_crackles_back_sound_RLL","fine_crackles_back_sound_RLL","wheezes_back_sound_RLL","rhonchi_back_sound_RLL","gurgling_rhonchi_back_sound_RLL","stridor_back_sound_RLL","pleural_friction_rub_back_sound_RLL","amphoric_respiration_back_sound_RLL","harsh_respiration_back_sound_RLL","asthma_back_sound_RLL","covid19_back_sound_RLL","right_sided_pneumothorax_back_sound_RLL","left_sided_pneumothorax_back_sound_RLL","pneumonia_back_sound_RLL" + ]; + + // Bowel Buttons + var normal_bowel_sound_with_bruits_buttons = ["normal_bowel_sound_with_bruits_sound_LUQ","normal_bowel_sound_with_bruits_sound_LLQ","normal_bowel_sound_with_bruits_sound_RUQ","normal_bowel_sound_with_bruits_sound_RLQ"]; + var constipation_buttons = ["constipation_sound_LUQ","constipation_sound_LLQ","constipation_sound_RUQ","constipation_sound_RLQ"]; + var bruits_due_to_renal_arteries_stenosis_buttons = ["bruits_due_to_renal_arteries_stenosis_sound_LUQ","bruits_due_to_renal_arteries_stenosis_sound_LLQ","bruits_due_to_renal_arteries_stenosis_sound_RUQ","bruits_due_to_renal_arteries_stenosis_sound_RLQ"]; + var paralytic_ileus_buttons = ["paralytic_ileus_sound_LUQ","paralytic_ileus_sound_LLQ","paralytic_ileus_sound_RUQ","paralytic_ileus_sound_RLQ"]; + var captement_buttons = ["captement_sound_LUQ","captement_sound_LLQ","captement_sound_RUQ","captement_sound_RLQ"]; + var hyperactive_buttons = ["hyperactive_sound_LUQ","hyperactive_sound_LLQ","hyperactive_sound_RUQ","hyperactive_sound_RLQ"]; + var normal_bowel_buttons = ["normal_bowel_sound_LUQ","normal_bowel_sound_LLQ","normal_bowel_sound_RUQ","normal_bowel_sound_RLQ"]; + var diarrhea_buttons = ["diarrhea_sound_LUQ","diarrhea_sound_LLQ","diarrhea_sound_RUQ","diarrhea_sound_RLQ"]; + var hypoactive_buttons = ["hypoactive_sound_LUQ","hypoactive_sound_LLQ","hypoactive_sound_RUQ","hypoactive_sound_RLQ"]; + var crohns_disease_buttons = ["crohns_disease_sound_LUQ","crohns_disease_sound_LLQ","crohns_disease_sound_RUQ","crohns_disease_sound_RLQ"]; + var irritable_bowel_syndrome_buttons = ["irritable_bowel_syndrome_sound_LUQ","irritable_bowel_syndrome_sound_LLQ","irritable_bowel_syndrome_sound_RUQ","irritable_bowel_syndrome_sound_RLQ"]; + var borborygmus_buttons = ["borborygmus_sound_LUQ","borborygmus_sound_LLQ","borborygmus_sound_RUQ","borborygmus_sound_RLQ"]; + var ulcerative_colitis_buttons = ["ulcerative_colitis_sound_LUQ","ulcerative_colitis_sound_LLQ","ulcerative_colitis_sound_RUQ","ulcerative_colitis_sound_RLQ"]; + var peritoneal_friction_rub_buttons = ["peritoneal_friction_rub_sound_LUQ","peritoneal_friction_rub_sound_LLQ","peritoneal_friction_rub_sound_RUQ","peritoneal_friction_rub_sound_RLQ"]; + // Default Divs var currentDiv = document.getElementById("hbr_div"); var ecgDiv = document.getElementById("ecg_div"); @@ -24,14 +66,28 @@ var erbDiv = document.getElementById("erb_point_div"); // Lungs Divs - /* - var LULDiv = document.getElementById(""); - var LMLDiv = document.getElementById(""); - var LLLDiv = document.getElementById(""); - var RULDiv = document.getElementById(""); - var RMLDiv = document.getElementById(""); - var RLLDiv = document.getElementById(""); - */ + var LULDiv = document.getElementById("LUL_div"); + var LMLDiv = document.getElementById("LML_div"); + var LLLDiv = document.getElementById("LLL_div"); + var RULDiv = document.getElementById("RUL_div"); + var RMLDiv = document.getElementById("RML_div"); + var RLLDiv = document.getElementById("RLL_div"); + + // Bowel Divs + var normal_bowel_sound_with_bruits_div = document.getElementById("normal_bowel_sound_with_bruits_div"); + var constipation_div = document.getElementById("constipation_div"); + var bruits_due_to_renal_arteries_stenosis_div = document.getElementById("bruits_due_to_renal_arteries_stenosis_div"); + var paralytic_ileus_div = document.getElementById("paralytic_ileus_div"); + var captement_div = document.getElementById("captement_div"); + var hyperactive_div = document.getElementById("hyperactive_div"); + var normal_bowel_div = document.getElementById("normal_bowel_div"); + var diarrhea_div = document.getElementById("diarrhea_div"); + var hypoactive_div = document.getElementById("hypoactive_div"); + var crohns_disease_div = document.getElementById("crohns_disease_div"); + var irritable_bowel_syndrome_div = document.getElementById("irritable_bowel_syndrome_div"); + var borborygmus_div = document.getElementById("borborygmus_div"); + var ulcerative_colitis_div = document.getElementById("ulcerative_colitis_div"); + var peritoneal_friction_rub_div = document.getElementById("peritoneal_friction_rub_div"); // Add a click event listener to the button hbr_btn.addEventListener("click", function() { @@ -44,7 +100,7 @@ } }); - // Click event for Mitral Valve + // Click event for Mitral Valve - Heart mitral_buttons.forEach(function(buttonId) { var mitral_btn = document.getElementById(buttonId); mitral_btn.addEventListener("click", function() { @@ -59,7 +115,7 @@ }); }); - // Click event for Aortic Valve + // Click event for Aortic Valve - Heart aortic_buttons.forEach(function(buttonId) { var aortic_btn = document.getElementById(buttonId); aortic_btn.addEventListener("click", function() { @@ -74,7 +130,7 @@ }); }); - // Click event for Pulmonary Valve + // Click event for Pulmonary Valve - Heart pulmonary_buttons.forEach(function(buttonId) { var pulmonary_btn = document.getElementById(buttonId); pulmonary_btn.addEventListener("click", function() { @@ -89,7 +145,7 @@ }); }); - // Click event for Tricuspid Valve + // Click event for Tricuspid Valve - Heart tricuspid_buttons.forEach(function(buttonId) { var tricuspid_btn = document.getElementById(buttonId); tricuspid_btn.addEventListener("click", function() { @@ -104,8 +160,9 @@ }); }); - // Click event for Erb's Point + // Click event for Erb's Point - Heart erb_buttons.forEach(function(buttonId) { + var erb_btn = document.getElementById(buttonId); erb_btn.addEventListener("click", function() { currentDiv.style.display = "none"; currentDiv = erbDiv; @@ -118,6 +175,96 @@ }); }); + // Click event for Left Upper Lobe - Lungs + LUL_buttons.forEach(function(buttonId) { + var LUL_btn = document.getElementById(buttonId); + LUL_btn.addEventListener("click", function() { + currentDiv.style.display = "none"; + currentDiv = LULDiv; + if (currentDiv.style.display === "none" && hbr_btn.classList.contains("active")) { + currentDiv.style.display = "block"; + } + else { + currentDiv.style.display = "none"; + } + }); + }); + + // Click event for Left Middle Lobe - Lungs + LML_buttons.forEach(function(buttonId) { + var LML_btn = document.getElementById(buttonId); + LML_btn.addEventListener("click", function() { + currentDiv.style.display = "none"; + currentDiv = LMLDiv; + if (currentDiv.style.display === "none" && hbr_btn.classList.contains("active")) { + currentDiv.style.display = "block"; + } + else { + currentDiv.style.display = "none"; + } + }); + }); + + // Click event for Left Lower Lobe - Lungs + LLL_buttons.forEach(function(buttonId) { + var LLL_btn = document.getElementById(buttonId); + LLL_btn.addEventListener("click", function() { + currentDiv.style.display = "none"; + currentDiv = LLLDiv; + if (currentDiv.style.display === "none" && hbr_btn.classList.contains("active")) { + currentDiv.style.display = "block"; + } + else { + currentDiv.style.display = "none"; + } + }); + }); + + // Click event for Right Upper Lobe - Lungs + RUL_buttons.forEach(function(buttonId) { + var RUL_btn = document.getElementById(buttonId); + RUL_btn.addEventListener("click", function() { + currentDiv.style.display = "none"; + currentDiv = RULDiv; + if (currentDiv.style.display === "none" && hbr_btn.classList.contains("active")) { + currentDiv.style.display = "block"; + } + else { + currentDiv.style.display = "none"; + } + }); + }); + + // Click event for Right Middle Lobe - Lungs + RML_buttons.forEach(function(buttonId) { + var RML_btn = document.getElementById(buttonId); + RML_btn.addEventListener("click", function() { + currentDiv.style.display = "none"; + currentDiv = RMLDiv; + if (currentDiv.style.display === "none" && hbr_btn.classList.contains("active")) { + currentDiv.style.display = "block"; + } + else { + currentDiv.style.display = "none"; + } + }); + }); + + // Click event for Right Lower Lobe - Lungs + RLL_buttons.forEach(function(buttonId) { + var RLL_btn = document.getElementById(buttonId); + RLL_btn.addEventListener("click", function() { + currentDiv.style.display = "none"; + currentDiv = RLLDiv; + if (currentDiv.style.display === "none" && hbr_btn.classList.contains("active")) { + currentDiv.style.display = "block"; + } + else { + currentDiv.style.display = "none"; + } + }); + }); + compare_btn.addEventListener("click", function() { this.classList.toggle("active"); // Toggle the 'active' class on the button }); diff --git a/app/views.py b/app/views.py index acb493026..df5fdef54 100644 --- a/app/views.py +++ b/app/views.py @@ -45,56 +45,77 @@ def play_mitral(index, samples, samplerate): global speakers, stop_flag_mitral, current_mitral_valve_sound, hr_show delay_seconds = 60 / hr_show - while not stop_flag_mitral.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_mitral.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) def play_aortic(index, samples, samplerate): global speakers, stop_flag_aortic, current_aortic_valve_sound, hr_show delay_seconds = 60 / hr_show - while not stop_flag_aortic.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_aortic.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) def play_pulmonary(index, samples, samplerate): global speakers, stop_flag_pulmonary, current_pulmonary_valve_sound, hr_show delay_seconds = 60 / hr_show - while not stop_flag_pulmonary.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_pulmonary.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) def play_tricuspid(index, samples, samplerate): global speakers, stop_flag_tricuspid, current_tricuspid_valve_sound, hr_show delay_seconds = 60 / hr_show - while not stop_flag_tricuspid.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_tricuspid.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) def play_erb(index, samples, samplerate): global speakers, stop_flag_erb, current_erb_valve_sound, hr_show delay_seconds = 60 / hr_show - while not stop_flag_erb.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_erb.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) def play_lungs(index, samples, samplerate): global speakers, stop_flag_lungs, current_lungs_sound, rr_show delay_seconds = 60 / rr_show - while not stop_flag_lungs.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_lungs.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) def play_bowel(index, samples, samplerate): global speakers, stop_flag_bowel, current_bowel_sound, rr_show delay_seconds = 60 / rr_show - while not stop_flag_bowel.is_set(): + try: speaker = speakers[index] + except: + speaker = speakers[0] + while not stop_flag_bowel.is_set(): speaker.play(samples, samplerate) time.sleep(delay_seconds) diff --git a/db.sqlite3 b/db.sqlite3 index 39195fa52..2c5ce1390 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/test.ipynb b/test.ipynb index ac7ba80ad..ef21d9efd 100644 --- a/test.ipynb +++ b/test.ipynb @@ -1,1776 +1,15 @@ { "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Renamed: Aortic Valve Stenosis Regurgitation -> Aortic_Valve_Stenosis_Regurgitation\n", - "Renamed: Mitral Valve Prelapse -> Mitral_Valve_Prelapse\n", - "Renamed: Ebstein Anomaly -> Ebstein_Anomaly\n", - "Renamed: Graham Steell Murmur -> Graham_Steell_Murmur\n", - "Renamed: Holosystolic Murmur -> Holosystolic_Murmur\n", - "Renamed: Pericardial Rub -> Pericardial_Rub\n", - "Renamed: Acute Myocardial Infarction -> Acute_Myocardial_Infarction\n", - "Renamed: Dilated Cardiomyopathy -> Dilated_Cardiomyopathy\n", - "Renamed: Acute Pericarditis -> Acute_Pericarditis\n", - "Renamed: Ventricular Septal Defect -> Ventricular_Septal_Defect\n", - "Renamed: Normal Heart -> Normal_Heart\n", - "Renamed: Aortic Valve Stenosis -> Aortic_Valve_Stenosis\n", - "Renamed: Congenital Aortic Stenosis -> Congenital_Aortic_Stenosis\n", - "Renamed: Mitral Stenosis Tricuspid Regurgitation -> Mitral_Stenosis_Tricuspid_Regurgitation\n", - "Renamed: Aortic Valve Regurgitation -> Aortic_Valve_Regurgitation\n", - "Renamed: Patent Ductus Arteriosus -> Patent_Ductus_Arteriosus\n", - "Renamed: Pulmonary Hypertension -> Pulmonary_Hypertension\n", - "Renamed: Early Systolic Murmur -> Early_Systolic_Murmur\n", - "Renamed: Tetralogy of Fallot -> Tetralogy_of_Fallot\n", - "Renamed: Mitral Valve Regurgitation -> Mitral_Valve_Regurgitation\n", - "Renamed: Split First Heart -> Split_First_Heart\n", - "Renamed: Pulmonary Valve Stenosis -> Pulmonary_Valve_Stenosis\n", - "Renamed: Fourth Heart -> Fourth_Heart\n", - "Renamed: Congestive Heart Failure -> Congestive_Heart_Failure\n", - "Renamed: Split Second Heart -> Split_Second_Heart\n", - "Renamed: Functional Murmur -> Functional_Murmur\n", - "Renamed: Mid Systolic Murmur -> Mid_Systolic_Murmur\n", - "Renamed: Coarctation of the Aorta -> Coarctation_of_the_Aorta\n", - "Renamed: Mitral Stenosis Regurgitation -> Mitral_Stenosis_Regurgitation\n", - "Renamed: Mitral Valve Stenosis -> Mitral_Valve_Stenosis\n", - "Renamed: Atrial Septal Defect -> Atrial_Septal_Defect\n", - "Renamed: Systemic Hypertension -> Systemic_Hypertension\n", - "Renamed: Continuous Murmur -> Continuous_Murmur\n", - "Renamed: Tricuspid Valve Regurgitation -> Tricuspid_Valve_Regurgitation\n", - "Renamed: Third Heart -> Third_Heart\n", - "Renamed: Pulmonary Valve Regurgitation -> Pulmonary_Valve_Regurgitation\n", - "Renamed: Austin Flint Murmur -> Austin_Flint_Murmur\n", - "Renamed: Hypertrophic Cardiomyopathy -> Hypertrophic_Cardiomyopathy\n", - "Renamed: Opening Snap -> Opening_Snap\n", - "Renamed: Diastolic Murmur -> Diastolic_Murmur\n", - "Renamed: Ventricular Aneurysm -> Ventricular_Aneurysm\n" - ] - } - ], - "source": [ - "import os\n", - "\n", - "def rename_subdirectories(directory_path):\n", - " # Get the list of subdirectories\n", - " subdirectories = [d for d in os.listdir(directory_path) if os.path.isdir(os.path.join(directory_path, d))]\n", - "\n", - " # Rename each subdirectory by replacing spaces with underscores\n", - " for subdirectory in subdirectories:\n", - " new_name = subdirectory.replace(' ', '_')\n", - " old_path = os.path.join(directory_path, subdirectory)\n", - " new_path = os.path.join(directory_path, new_name)\n", - " os.rename(old_path, new_path)\n", - " print(f'Renamed: {subdirectory} -> {new_name}')\n", - "\n", - "# Replace 'app/DashApp/HeartSound' with your actual directory path\n", - "directory_path = 'app/DashApp/HeartSound'\n", - "rename_subdirectories(directory_path)" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "from ..DashApp.HeartSound.Pulmonary_Hypertension import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Patent_Ductus_Arteriosus import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Tetralogy_of_Fallot import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Hypertrophic_Cardiomyopathy import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Congestive_Heart_Failure import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Holosystolic_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Graham_Steell_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Tricuspid_Valve_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Mitral_Valve_Stenosis import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Normal_Heart import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Mid_Systolic_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Opening_Snap import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Pulmonary_Valve_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Ventricular_Septal_Defect import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Acute_Pericarditis import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Mitral_Valve_Prelapse import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Pericardial_Rub import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Third_Heart import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Mitral_Stenosis_Tricuspid_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Systemic_Hypertension import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Early_Systolic_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Atrial_Septal_Defect import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Congenital_Aortic_Stenosis import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Aortic_Valve_Stenosis_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Split_Second_Heart import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Mitral_Stenosis_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Ventricular_Aneurysm import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Austin_Flint_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Functional_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Aortic_Valve_Stenosis import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Aortic_Valve_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Continuous_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Acute_Myocardial_Infarction import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Coarctation_of_the_Aorta import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Diastolic_Murmur import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Ebstein_Anomaly import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Pulmonary_Valve_Stenosis import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Fourth_Heart import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Split_First_Heart import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Dilated_Cardiomyopathy import aortic, erb, mitral, pulmonary, tricuspid\n", - "from ..DashApp.HeartSound.Mitral_Valve_Regurgitation import aortic, erb, mitral, pulmonary, tricuspid\n" - ] - } - ], - "source": [ - "import os\n", - "\n", - "def generate_import_statements(directory_path):\n", - " # Get the list of subdirectories\n", - " subdirectories = [d for d in os.listdir(directory_path) if os.path.isdir(os.path.join(directory_path, d))]\n", - "\n", - " # Generate import statements\n", - " for subdirectory in subdirectories:\n", - " import_statement = f\"from ..DashApp.HeartSound.{subdirectory} import aortic, erb, mitral, pulmonary, tricuspid\"\n", - " print(import_statement)\n", - "\n", - "# Replace 'app/DashApp/HeartSound' with your actual directory path\n", - "directory_path = 'app/DashApp/HeartSound'\n", - "generate_import_statements(directory_path)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "\n", - "directory_path = 'app/DashApp/HeartSound'\n", - "\n", - "app_name = []\n", - "\n", - "for root, dirs, files in os.walk(directory_path):\n", - " # Skip __pycache__ directory\n", - " if '__pycache__' in dirs:\n", - " dirs.remove('__pycache__')\n", - "\n", - " dirs.sort() # Sort subdirectories alphabetically\n", - "\n", - " for dir_name in dirs:\n", - " for file_name in ['aortic.py', 'erb.py', 'mitral.py', 'pulmonary.py', 'tricuspid.py']:\n", - " # Skip files in __pycache__ directory\n", - " if not os.path.isdir(os.path.join(root, dir_name, file_name)):\n", - " # Capitalize the first letter of each directory and file name and print the result\n", - " formatted_dir_name = '_'.join(part.capitalize() for part in dir_name.split('_'))\n", - " formatted_file_name = file_name[:-3].capitalize()\n", - " app_name.append(f\"{formatted_dir_name}_{formatted_file_name}\")" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['Acute_Myocardial_Infarction_Aortic',\n", - " 'Acute_Myocardial_Infarction_Erb',\n", - " 'Acute_Myocardial_Infarction_Mitral',\n", - " 'Acute_Myocardial_Infarction_Pulmonary',\n", - " 'Acute_Myocardial_Infarction_Tricuspid',\n", - " 'Acute_Pericarditis_Aortic',\n", - " 'Acute_Pericarditis_Erb',\n", - " 'Acute_Pericarditis_Mitral',\n", - " 'Acute_Pericarditis_Pulmonary',\n", - " 'Acute_Pericarditis_Tricuspid',\n", - " 'Aortic_Valve_Regurgitation_Aortic',\n", - " 'Aortic_Valve_Regurgitation_Erb',\n", - " 'Aortic_Valve_Regurgitation_Mitral',\n", - " 'Aortic_Valve_Regurgitation_Pulmonary',\n", - " 'Aortic_Valve_Regurgitation_Tricuspid',\n", - " 'Aortic_Valve_Stenosis_Aortic',\n", - " 'Aortic_Valve_Stenosis_Erb',\n", - " 'Aortic_Valve_Stenosis_Mitral',\n", - " 'Aortic_Valve_Stenosis_Pulmonary',\n", - " 'Aortic_Valve_Stenosis_Tricuspid',\n", - " 'Aortic_Valve_Stenosis_Regurgitation_Aortic',\n", - " 'Aortic_Valve_Stenosis_Regurgitation_Erb',\n", - " 'Aortic_Valve_Stenosis_Regurgitation_Mitral',\n", - " 'Aortic_Valve_Stenosis_Regurgitation_Pulmonary',\n", - " 'Aortic_Valve_Stenosis_Regurgitation_Tricuspid',\n", - " 'Atrial_Septal_Defect_Aortic',\n", - " 'Atrial_Septal_Defect_Erb',\n", - " 'Atrial_Septal_Defect_Mitral',\n", - " 'Atrial_Septal_Defect_Pulmonary',\n", - " 'Atrial_Septal_Defect_Tricuspid',\n", - " 'Austin_Flint_Murmur_Aortic',\n", - " 'Austin_Flint_Murmur_Erb',\n", - " 'Austin_Flint_Murmur_Mitral',\n", - " 'Austin_Flint_Murmur_Pulmonary',\n", - " 'Austin_Flint_Murmur_Tricuspid',\n", - " 'Coarctation_Of_The_Aorta_Aortic',\n", - " 'Coarctation_Of_The_Aorta_Erb',\n", - " 'Coarctation_Of_The_Aorta_Mitral',\n", - " 'Coarctation_Of_The_Aorta_Pulmonary',\n", - " 'Coarctation_Of_The_Aorta_Tricuspid',\n", - " 'Congenital_Aortic_Stenosis_Aortic',\n", - " 'Congenital_Aortic_Stenosis_Erb',\n", - " 'Congenital_Aortic_Stenosis_Mitral',\n", - " 'Congenital_Aortic_Stenosis_Pulmonary',\n", - " 'Congenital_Aortic_Stenosis_Tricuspid',\n", - " 'Congestive_Heart_Failure_Aortic',\n", - " 'Congestive_Heart_Failure_Erb',\n", - " 'Congestive_Heart_Failure_Mitral',\n", - " 'Congestive_Heart_Failure_Pulmonary',\n", - " 'Congestive_Heart_Failure_Tricuspid',\n", - " 'Continuous_Murmur_Aortic',\n", - " 'Continuous_Murmur_Erb',\n", - " 'Continuous_Murmur_Mitral',\n", - " 'Continuous_Murmur_Pulmonary',\n", - " 'Continuous_Murmur_Tricuspid',\n", - " 'Diastolic_Murmur_Aortic',\n", - " 'Diastolic_Murmur_Erb',\n", - " 'Diastolic_Murmur_Mitral',\n", - " 'Diastolic_Murmur_Pulmonary',\n", - " 'Diastolic_Murmur_Tricuspid',\n", - " 'Dilated_Cardiomyopathy_Aortic',\n", - " 'Dilated_Cardiomyopathy_Erb',\n", - " 'Dilated_Cardiomyopathy_Mitral',\n", - " 'Dilated_Cardiomyopathy_Pulmonary',\n", - " 'Dilated_Cardiomyopathy_Tricuspid',\n", - " 'Early_Systolic_Murmur_Aortic',\n", - " 'Early_Systolic_Murmur_Erb',\n", - " 'Early_Systolic_Murmur_Mitral',\n", - " 'Early_Systolic_Murmur_Pulmonary',\n", - " 'Early_Systolic_Murmur_Tricuspid',\n", - " 'Ebstein_Anomaly_Aortic',\n", - " 'Ebstein_Anomaly_Erb',\n", - " 'Ebstein_Anomaly_Mitral',\n", - " 'Ebstein_Anomaly_Pulmonary',\n", - " 'Ebstein_Anomaly_Tricuspid',\n", - " 'Fourth_Heart_Aortic',\n", - " 'Fourth_Heart_Erb',\n", - " 'Fourth_Heart_Mitral',\n", - " 'Fourth_Heart_Pulmonary',\n", - " 'Fourth_Heart_Tricuspid',\n", - " 'Functional_Murmur_Aortic',\n", - " 'Functional_Murmur_Erb',\n", - " 'Functional_Murmur_Mitral',\n", - " 'Functional_Murmur_Pulmonary',\n", - " 'Functional_Murmur_Tricuspid',\n", - " 'Graham_Steell_Murmur_Aortic',\n", - " 'Graham_Steell_Murmur_Erb',\n", - " 'Graham_Steell_Murmur_Mitral',\n", - " 'Graham_Steell_Murmur_Pulmonary',\n", - " 'Graham_Steell_Murmur_Tricuspid',\n", - " 'Holosystolic_Murmur_Aortic',\n", - " 'Holosystolic_Murmur_Erb',\n", - " 'Holosystolic_Murmur_Mitral',\n", - " 'Holosystolic_Murmur_Pulmonary',\n", - " 'Holosystolic_Murmur_Tricuspid',\n", - " 'Hypertrophic_Cardiomyopathy_Aortic',\n", - " 'Hypertrophic_Cardiomyopathy_Erb',\n", - " 'Hypertrophic_Cardiomyopathy_Mitral',\n", - " 'Hypertrophic_Cardiomyopathy_Pulmonary',\n", - " 'Hypertrophic_Cardiomyopathy_Tricuspid',\n", - " 'Mid_Systolic_Murmur_Aortic',\n", - " 'Mid_Systolic_Murmur_Erb',\n", - " 'Mid_Systolic_Murmur_Mitral',\n", - " 'Mid_Systolic_Murmur_Pulmonary',\n", - " 'Mid_Systolic_Murmur_Tricuspid',\n", - " 'Mitral_Stenosis_Regurgitation_Aortic',\n", - " 'Mitral_Stenosis_Regurgitation_Erb',\n", - " 'Mitral_Stenosis_Regurgitation_Mitral',\n", - " 'Mitral_Stenosis_Regurgitation_Pulmonary',\n", - " 'Mitral_Stenosis_Regurgitation_Tricuspid',\n", - " 'Mitral_Stenosis_Tricuspid_Regurgitation_Aortic',\n", - " 'Mitral_Stenosis_Tricuspid_Regurgitation_Erb',\n", - " 'Mitral_Stenosis_Tricuspid_Regurgitation_Mitral',\n", - " 'Mitral_Stenosis_Tricuspid_Regurgitation_Pulmonary',\n", - " 'Mitral_Stenosis_Tricuspid_Regurgitation_Tricuspid',\n", - " 'Mitral_Valve_Prelapse_Aortic',\n", - " 'Mitral_Valve_Prelapse_Erb',\n", - " 'Mitral_Valve_Prelapse_Mitral',\n", - " 'Mitral_Valve_Prelapse_Pulmonary',\n", - " 'Mitral_Valve_Prelapse_Tricuspid',\n", - " 'Mitral_Valve_Regurgitation_Aortic',\n", - " 'Mitral_Valve_Regurgitation_Erb',\n", - " 'Mitral_Valve_Regurgitation_Mitral',\n", - " 'Mitral_Valve_Regurgitation_Pulmonary',\n", - " 'Mitral_Valve_Regurgitation_Tricuspid',\n", - " 'Mitral_Valve_Stenosis_Aortic',\n", - " 'Mitral_Valve_Stenosis_Erb',\n", - " 'Mitral_Valve_Stenosis_Mitral',\n", - " 'Mitral_Valve_Stenosis_Pulmonary',\n", - " 'Mitral_Valve_Stenosis_Tricuspid',\n", - " 'Normal_Heart_Aortic',\n", - " 'Normal_Heart_Erb',\n", - " 'Normal_Heart_Mitral',\n", - " 'Normal_Heart_Pulmonary',\n", - " 'Normal_Heart_Tricuspid',\n", - " 'Opening_Snap_Aortic',\n", - " 'Opening_Snap_Erb',\n", - " 'Opening_Snap_Mitral',\n", - " 'Opening_Snap_Pulmonary',\n", - " 'Opening_Snap_Tricuspid',\n", - " 'Patent_Ductus_Arteriosus_Aortic',\n", - " 'Patent_Ductus_Arteriosus_Erb',\n", - " 'Patent_Ductus_Arteriosus_Mitral',\n", - " 'Patent_Ductus_Arteriosus_Pulmonary',\n", - " 'Patent_Ductus_Arteriosus_Tricuspid',\n", - " 'Pericardial_Rub_Aortic',\n", - " 'Pericardial_Rub_Erb',\n", - " 'Pericardial_Rub_Mitral',\n", - " 'Pericardial_Rub_Pulmonary',\n", - " 'Pericardial_Rub_Tricuspid',\n", - " 'Pulmonary_Hypertension_Aortic',\n", - " 'Pulmonary_Hypertension_Erb',\n", - " 'Pulmonary_Hypertension_Mitral',\n", - " 'Pulmonary_Hypertension_Pulmonary',\n", - " 'Pulmonary_Hypertension_Tricuspid',\n", - " 'Pulmonary_Valve_Regurgitation_Aortic',\n", - " 'Pulmonary_Valve_Regurgitation_Erb',\n", - " 'Pulmonary_Valve_Regurgitation_Mitral',\n", - " 'Pulmonary_Valve_Regurgitation_Pulmonary',\n", - " 'Pulmonary_Valve_Regurgitation_Tricuspid',\n", - " 'Pulmonary_Valve_Stenosis_Aortic',\n", - " 'Pulmonary_Valve_Stenosis_Erb',\n", - " 'Pulmonary_Valve_Stenosis_Mitral',\n", - " 'Pulmonary_Valve_Stenosis_Pulmonary',\n", - " 'Pulmonary_Valve_Stenosis_Tricuspid',\n", - " 'Split_First_Heart_Aortic',\n", - " 'Split_First_Heart_Erb',\n", - " 'Split_First_Heart_Mitral',\n", - " 'Split_First_Heart_Pulmonary',\n", - " 'Split_First_Heart_Tricuspid',\n", - " 'Split_Second_Heart_Aortic',\n", - " 'Split_Second_Heart_Erb',\n", - " 'Split_Second_Heart_Mitral',\n", - " 'Split_Second_Heart_Pulmonary',\n", - " 'Split_Second_Heart_Tricuspid',\n", - " 'Systemic_Hypertension_Aortic',\n", - " 'Systemic_Hypertension_Erb',\n", - " 'Systemic_Hypertension_Mitral',\n", - " 'Systemic_Hypertension_Pulmonary',\n", - " 'Systemic_Hypertension_Tricuspid',\n", - " 'Tetralogy_Of_Fallot_Aortic',\n", - " 'Tetralogy_Of_Fallot_Erb',\n", - " 'Tetralogy_Of_Fallot_Mitral',\n", - " 'Tetralogy_Of_Fallot_Pulmonary',\n", - " 'Tetralogy_Of_Fallot_Tricuspid',\n", - " 'Third_Heart_Aortic',\n", - " 'Third_Heart_Erb',\n", - " 'Third_Heart_Mitral',\n", - " 'Third_Heart_Pulmonary',\n", - " 'Third_Heart_Tricuspid',\n", - " 'Tricuspid_Valve_Regurgitation_Aortic',\n", - " 'Tricuspid_Valve_Regurgitation_Erb',\n", - " 'Tricuspid_Valve_Regurgitation_Mitral',\n", - " 'Tricuspid_Valve_Regurgitation_Pulmonary',\n", - " 'Tricuspid_Valve_Regurgitation_Tricuspid',\n", - " 'Ventricular_Aneurysm_Aortic',\n", - " 'Ventricular_Aneurysm_Erb',\n", - " 'Ventricular_Aneurysm_Mitral',\n", - " 'Ventricular_Aneurysm_Pulmonary',\n", - " 'Ventricular_Aneurysm_Tricuspid',\n", - " 'Ventricular_Septal_Defect_Aortic',\n", - " 'Ventricular_Septal_Defect_Erb',\n", - " 'Ventricular_Septal_Defect_Mitral',\n", - " 'Ventricular_Septal_Defect_Pulmonary',\n", - " 'Ventricular_Septal_Defect_Tricuspid']" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "app_name" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "
\n", - " {% plotly_app name=\"Acute_Myocardial_Infarction_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Myocardial_Infarction_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Myocardial_Infarction_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Myocardial_Infarction_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Myocardial_Infarction_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Pericarditis_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Pericarditis_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Pericarditis_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Pericarditis_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Acute_Pericarditis_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Aortic_Valve_Stenosis_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Atrial_Septal_Defect_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Atrial_Septal_Defect_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Atrial_Septal_Defect_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Atrial_Septal_Defect_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Atrial_Septal_Defect_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Austin_Flint_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Austin_Flint_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Austin_Flint_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Austin_Flint_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Austin_Flint_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Coarctation_Of_The_Aorta_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Coarctation_Of_The_Aorta_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Coarctation_Of_The_Aorta_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Coarctation_Of_The_Aorta_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Coarctation_Of_The_Aorta_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congenital_Aortic_Stenosis_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congenital_Aortic_Stenosis_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congenital_Aortic_Stenosis_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congenital_Aortic_Stenosis_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congenital_Aortic_Stenosis_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congestive_Heart_Failure_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congestive_Heart_Failure_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congestive_Heart_Failure_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congestive_Heart_Failure_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Congestive_Heart_Failure_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Continuous_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Continuous_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Continuous_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Continuous_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Continuous_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Diastolic_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Diastolic_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Diastolic_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Diastolic_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Diastolic_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Dilated_Cardiomyopathy_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Dilated_Cardiomyopathy_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Dilated_Cardiomyopathy_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Dilated_Cardiomyopathy_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Dilated_Cardiomyopathy_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Early_Systolic_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Early_Systolic_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Early_Systolic_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Early_Systolic_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Early_Systolic_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ebstein_Anomaly_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ebstein_Anomaly_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ebstein_Anomaly_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ebstein_Anomaly_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ebstein_Anomaly_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Fourth_Heart_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Fourth_Heart_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Fourth_Heart_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Fourth_Heart_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Fourth_Heart_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Functional_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Functional_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Functional_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Functional_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Functional_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Graham_Steell_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Graham_Steell_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Graham_Steell_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Graham_Steell_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Graham_Steell_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Holosystolic_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Holosystolic_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Holosystolic_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Holosystolic_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Holosystolic_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Hypertrophic_Cardiomyopathy_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Hypertrophic_Cardiomyopathy_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Hypertrophic_Cardiomyopathy_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Hypertrophic_Cardiomyopathy_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Hypertrophic_Cardiomyopathy_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mid_Systolic_Murmur_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mid_Systolic_Murmur_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mid_Systolic_Murmur_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mid_Systolic_Murmur_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mid_Systolic_Murmur_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Tricuspid_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Tricuspid_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Tricuspid_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Tricuspid_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Stenosis_Tricuspid_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Prelapse_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Prelapse_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Prelapse_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Prelapse_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Prelapse_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Stenosis_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Stenosis_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Stenosis_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Stenosis_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Mitral_Valve_Stenosis_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Normal_Heart_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Normal_Heart_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Normal_Heart_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Normal_Heart_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Normal_Heart_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Opening_Snap_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Opening_Snap_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Opening_Snap_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Opening_Snap_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Opening_Snap_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Patent_Ductus_Arteriosus_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Patent_Ductus_Arteriosus_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Patent_Ductus_Arteriosus_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Patent_Ductus_Arteriosus_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Patent_Ductus_Arteriosus_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pericardial_Rub_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pericardial_Rub_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pericardial_Rub_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pericardial_Rub_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pericardial_Rub_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Hypertension_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Hypertension_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Hypertension_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Hypertension_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Hypertension_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Stenosis_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Stenosis_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Stenosis_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Stenosis_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Pulmonary_Valve_Stenosis_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_First_Heart_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_First_Heart_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_First_Heart_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_First_Heart_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_First_Heart_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_Second_Heart_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_Second_Heart_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_Second_Heart_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_Second_Heart_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Split_Second_Heart_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Systemic_Hypertension_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Systemic_Hypertension_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Systemic_Hypertension_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Systemic_Hypertension_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Systemic_Hypertension_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tetralogy_Of_Fallot_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tetralogy_Of_Fallot_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tetralogy_Of_Fallot_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tetralogy_Of_Fallot_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tetralogy_Of_Fallot_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Third_Heart_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Third_Heart_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Third_Heart_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Third_Heart_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Third_Heart_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tricuspid_Valve_Regurgitation_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tricuspid_Valve_Regurgitation_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tricuspid_Valve_Regurgitation_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tricuspid_Valve_Regurgitation_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Tricuspid_Valve_Regurgitation_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Aneurysm_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Aneurysm_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Aneurysm_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Aneurysm_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Aneurysm_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Septal_Defect_Aortic\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Septal_Defect_Erb\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Septal_Defect_Mitral\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Septal_Defect_Pulmonary\" ratio=0.3 %}\n", - "
\n", - "\n", - "\n", - "
\n", - " {% plotly_app name=\"Ventricular_Septal_Defect_Tricuspid\" ratio=0.3 %}\n", - "
\n", - "\n" - ] - } - ], - "source": [ - "html_code = '''\n", - "
\n", - " {{% plotly_app name=\"{}\" ratio=0.3 %}}\n", - "
\n", - "'''\n", - "\n", - "for item in app_name:\n", - " formatted_html = html_code.format(item, item)\n", - " print(formatted_html)" - ] - }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "from pydub import AudioSegment\n", - "import numpy as np\n", - "import pandas as pd\n", - "import time\n", - "import sqlite3\n", - "\n", - "# Create Dash app\n", - "con = sqlite3.connect(\"db.sqlite3\")\n", - "cur = con.cursor()\n", - "df = pd.read_sql_query(\"SELECT * FROM app_heartaudio\", con)\n", - "\n", - "audio_path = df.loc[(df['sound_name'] == 'normal_heart') & (df['sound_type'] == 'A'), 'audio_file_path'].values[0]\n", - "audio = AudioSegment.from_file(audio_path)\n", - "audio_data = np.array(audio.get_array_of_samples())\n", - "audio_duration = len(audio_data) / audio.frame_rate\n", - "subsampling_factor = 1\n", - "audio_data = audio_data[::subsampling_factor]\n", - "\n", - "target_duration = 0.877\n", - "num_repeats = 1\n", - "audio_data = np.tile(audio_data, num_repeats)\n", - "sample_rate = 44100\n", - "duration = len(audio_data) / sample_rate" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "29100" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "len(audio_data)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.6598639455782312" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "duration" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "38675.7" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "44100 * 0.877" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Zero audio file 'zero_audio.wav' created.\n" - ] - } - ], - "source": [ - "import numpy as np\n", - "from scipy.io.wavfile import write\n", - "\n", - "# Assuming you have a NumPy array named 'your_array'\n", - "your_array = np.zeros(38676) # Change the size as needed\n", - "\n", - "# Set the sample rate and create a time array\n", - "sample_rate = 44100 # Adjust as needed\n", - "time = np.arange(len(your_array)) / sample_rate\n", - "\n", - "# Create a WAV file with all zeros\n", - "output_filename = 'zero_audio.wav'\n", - "write(output_filename, sample_rate, your_array)\n", - "\n", - "print(f\"Zero audio file '{output_filename}' created.\")" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Last three characters: LUF\n", - "Rest of the string: COVID-19\n" - ] - } - ], - "source": [ - "input_string = \"COVID-19_LUF\"\n", - "\n", - "# Extract the last three characters\n", - "rest_of_string, last_three_characters = input_string[:-4], input_string[-3:]\n", - "\n", - "print(\"Last three characters:\", last_three_characters)\n", - "print(\"Rest of the string:\", rest_of_string)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Blank Python files created successfully.\n" - ] - } - ], - "source": [ - "import os\n", - "\n", - "folder_path = \"app/DashApp/Bowel\"\n", - "file_names = [\n", - " \"normal_bowel_dash.py\",\n", - " \"hyperactive_dash.py\",\n", - " \"hypoactive_dash.py\",\n", - " \"borborygmus_dash.py\",\n", - " \"captement_dash.py\",\n", - " \"peritoneal_friction_rub_dash.py\",\n", - " \"normal_bowel_sound_with_bruits_dash.py\",\n", - " \"irritable_bowel_syndrome_dash.py\",\n", - " \"diarrhea_dash.py\",\n", - " \"bruits_due_to_renal_arteries_stenosis_dash.py\",\n", - " \"constipation_dash.py\",\n", - " \"ulcerative_colitis_dash.py\",\n", - " \"crohns_disease_dash.py\",\n", - " \"paralytic_ileus_dash.py\"\n", - "]\n", - "\n", - "for file_name in file_names:\n", - " file_path = os.path.join(folder_path, file_name)\n", - " with open(file_path, \"w\") as file:\n", - " pass # Empty block, creating an empty file\n", - "\n", - "print(\"Blank Python files created successfully.\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Files created and code added successfully.\n" - ] - } - ], - "source": [ - "import os\n", - "\n", - "folder_path = \"app/DashApp/Bowel\"\n", - "file_names = [\n", - " \"normal_bowel_dash.py\",\n", - " \"hyperactive_dash.py\",\n", - " \"hypoactive_dash.py\",\n", - " \"borborygmus_dash.py\",\n", - " \"captement_dash.py\",\n", - " \"peritoneal_friction_rub_dash.py\",\n", - " \"normal_bowel_sound_with_bruits_dash.py\",\n", - " \"irritable_bowel_syndrome_dash.py\",\n", - " \"diarrhea_dash.py\",\n", - " \"bruits_due_to_renal_arteries_stenosis_dash.py\",\n", - " \"constipation_dash.py\",\n", - " \"ulcerative_colitis_dash.py\",\n", - " \"crohns_disease_dash.py\",\n", - " \"paralytic_ileus_dash.py\"\n", - "]\n", - "\n", - "code_to_insert = \"\"\"\n", - "import dash\n", - "from dash import dcc, html\n", - "from dash.dependencies import Input, Output, State\n", - "import plotly.graph_objs as go\n", - "from pydub import AudioSegment\n", - "from django_plotly_dash import DjangoDash\n", - "from django.http import JsonResponse, HttpResponse\n", - "import numpy as np\n", - "import time\n", - "\n", - "# Create Dash app\n", - "app = DjangoDash('')\n", - "\n", - "# Define a function to load audio data and duration\n", - "def loadAudioData(audioPath):\n", - " try:\n", - " audio = AudioSegment.from_file(audioPath)\n", - " audio_data = np.array(audio.get_array_of_samples())\n", - " audio_duration = len(audio_data) / audio.frame_rate\n", - " subsampling_factor = 100\n", - " audio_data = audio_data[::subsampling_factor]\n", - "\n", - " target_duration = 0.877\n", - " num_repeats = 1\n", - " audio_data = np.tile(audio_data, num_repeats)\n", - " sample_rate = 44100\n", - " duration = len(audio_data) / sample_rate\n", - "\n", - " return {'audio_data': audio_data.tolist(), 'audio_duration': duration}\n", - " except:\n", - " return {'audio_data': [0] * int(duration * sample_rate), 'audio_duration': duration} # Assuming a small duration with zero values\n", - "\n", - "# Layout of the app\n", - "app.layout = html.Div([\n", - " dcc.Input(id='audio-path-input',type='text',placeholder='Enter audio path...',style={'display':'none'}),\n", - " dcc.Graph(id='animated-audio-chart', style={'height': '95vh'}, config={'responsive': True}),\n", - " dcc.Store(id='audio-data-store', data={'audio_data': [], 'audio_duration': 0}),\n", - " dcc.Store(id='interval-store', data=time.time()), # Store the start time and set default heart rate to 60\n", - " dcc.Interval(id='interval-component', interval=25, n_intervals=0) # Interval in milliseconds\n", - "])\n", - "\n", - "# Clientside callback to update the graph\n", - "app.clientside_callback(\n", - " \\\"\"\"\n", - " function(n, audioData, startTime) {\n", - " // Get the audio data and duration from the stored data\n", - " var audioArray = audioData['audio_data'];\n", - " var audioDuration = audioData['audio_duration'];\n", - " var heartRate = 60\n", - "\n", - " // Calculate the time passed since the start\n", - " var currentTime = new Date().getTime() / 1000; // Convert milliseconds to seconds\n", - " var elapsedTime = currentTime - startTime;\n", - "\n", - " // Calculate the position of the vertical line\n", - " var timePerBeat = 60 / heartRate;\n", - " var linePosition = Math.floor((elapsedTime % timePerBeat) * audioArray.length / timePerBeat);\n", - "\n", - " // Create the figure\n", - " var figure = {\n", - " data: [\n", - " {y: audioArray, type: 'line', name: 'HBR Signal', line: {color: 'green'}},\n", - " {x: [linePosition, linePosition], y: [Math.min.apply(null, audioArray), Math.max.apply(null, audioArray)], mode: 'lines', line: {color: 'black', width: 10}}\n", - " ],\n", - " layout: {\n", - " showlegend: false,\n", - " paper_bgcolor: 'black', // Set background color to black\n", - " plot_bgcolor: 'black' // Set plot background color to black\n", - " }\n", - " };\n", - " \n", - " // Return the updated figure, startTime, and heartRate\n", - " return [figure, startTime];\n", - " \\\"\"\",\n", - " Output('animated-audio-chart', 'figure'),\n", - " Output('interval-store', 'data'),\n", - " Input('interval-component', 'n_intervals'),\n", - " State('audio-data-store', 'data'),\n", - " State('interval-store', 'data'),\n", - " prevent_initial_call=True\n", - ")\n", - "\n", - "# Callback to load audio data when the input changes\n", - "@app.callback(\n", - " Output('audio-data-store', 'data'),\n", - " Input('audio-path-input', 'value')\n", - ")\n", - "def update_audio_data(audioPath):\n", - " audioPath = ''\n", - " duration = 0.887\n", - " sample_rate = 44100\n", - " if not audioPath: # If the input is empty, return zero values\n", - " return {'audio_data': [0] * int(duration * sample_rate), 'audio_duration': duration} # Assuming a small duration with zero values\n", - " else:\n", - " return loadAudioData(audioPath)\n", - "\"\"\"\n", - "\n", - "for file_name in file_names:\n", - " file_path = os.path.join(folder_path, file_name)\n", - " with open(file_path, \"w\") as file:\n", - " file.write(code_to_insert)\n", - "\n", - "print(\"Files created and code added successfully.\")\n" + "old = [\n", + " \"normal_bowel\", \"hyperactive\", \"hypoactive\", \"borborygmus\", \"captement\", \"peritoneal_friction_rub\", \"normal_bowel_sound_with_bruits\",\n", + " \"irritable_bowel_syndrome\", \"diarrhea\", \"bruits_due_to_renal_arteries_stenosis\", \"constipation\", \"ulcerative_colitis\", \"crohns_disease\", \"paralytic_ileus\"\n", + "]" ] }, { @@ -1782,38 +21,31 @@ "name": "stdout", "output_type": "stream", "text": [ - "normal_bowel_sound_with_bruits\n", - "constipation\n", - "bruits_due_to_renal_arteries_stenosis\n", - "paralytic_ileus\n", - "captement\n", - "hyperactive\n", - "normal_bowel\n", - "diarrhea\n", - "hypoactive\n", - "crohns_disease\n", - "irritable_bowel_syndrome\n", - "borborygmus\n", - "ulcerative_colitis\n", - "peritoneal_friction_rub\n" + "\"normal_bowel_sound_LUQ\",\"normal_bowel_sound_LLQ\",\"normal_bowel_sound_RUQ\",\"normal_bowel_sound_RLQ\"\n", + "\"hyperactive_sound_LUQ\",\"hyperactive_sound_LLQ\",\"hyperactive_sound_RUQ\",\"hyperactive_sound_RLQ\"\n", + "\"hypoactive_sound_LUQ\",\"hypoactive_sound_LLQ\",\"hypoactive_sound_RUQ\",\"hypoactive_sound_RLQ\"\n", + "\"borborygmus_sound_LUQ\",\"borborygmus_sound_LLQ\",\"borborygmus_sound_RUQ\",\"borborygmus_sound_RLQ\"\n", + "\"captement_sound_LUQ\",\"captement_sound_LLQ\",\"captement_sound_RUQ\",\"captement_sound_RLQ\"\n", + "\"peritoneal_friction_rub_sound_LUQ\",\"peritoneal_friction_rub_sound_LLQ\",\"peritoneal_friction_rub_sound_RUQ\",\"peritoneal_friction_rub_sound_RLQ\"\n", + "\"normal_bowel_sound_with_bruits_sound_LUQ\",\"normal_bowel_sound_with_bruits_sound_LLQ\",\"normal_bowel_sound_with_bruits_sound_RUQ\",\"normal_bowel_sound_with_bruits_sound_RLQ\"\n", + "\"irritable_bowel_syndrome_sound_LUQ\",\"irritable_bowel_syndrome_sound_LLQ\",\"irritable_bowel_syndrome_sound_RUQ\",\"irritable_bowel_syndrome_sound_RLQ\"\n", + "\"diarrhea_sound_LUQ\",\"diarrhea_sound_LLQ\",\"diarrhea_sound_RUQ\",\"diarrhea_sound_RLQ\"\n", + "\"bruits_due_to_renal_arteries_stenosis_sound_LUQ\",\"bruits_due_to_renal_arteries_stenosis_sound_LLQ\",\"bruits_due_to_renal_arteries_stenosis_sound_RUQ\",\"bruits_due_to_renal_arteries_stenosis_sound_RLQ\"\n", + "\"constipation_sound_LUQ\",\"constipation_sound_LLQ\",\"constipation_sound_RUQ\",\"constipation_sound_RLQ\"\n", + "\"ulcerative_colitis_sound_LUQ\",\"ulcerative_colitis_sound_LLQ\",\"ulcerative_colitis_sound_RUQ\",\"ulcerative_colitis_sound_RLQ\"\n", + "\"crohns_disease_sound_LUQ\",\"crohns_disease_sound_LLQ\",\"crohns_disease_sound_RUQ\",\"crohns_disease_sound_RLQ\"\n", + "\"paralytic_ileus_sound_LUQ\",\"paralytic_ileus_sound_LLQ\",\"paralytic_ileus_sound_RUQ\",\"paralytic_ileus_sound_RLQ\"\n" ] } ], "source": [ - "import os\n", - "\n", - "# Define the directory path\n", - "directory_path = 'app/DashApp/Bowel'\n", - "\n", - "# List all files in the directory\n", - "files = os.listdir(directory_path)\n", - "\n", - "# Filter out .py files and remove the \".py\" extension\n", - "py_files_without_extension = [file[:-8] for file in files if file.endswith('.py')]\n", - "\n", - "# Print the list of files\n", - "for file in py_files_without_extension:\n", - " print(file)" + "for x in old:\n", + " print(\"\\\"{}\\\",\\\"{}\\\",\\\"{}\\\",\\\"{}\\\"\".format(\n", + " x + \"_sound_LUQ\",\n", + " x + \"_sound_LLQ\",\n", + " x + \"_sound_RUQ\",\n", + " x + \"_sound_RLQ\"\n", + " ))" ] }, {