diff --git a/app/__pycache__/views.cpython-311.pyc b/app/__pycache__/views.cpython-311.pyc index c5df66eee..59ed98010 100644 Binary files a/app/__pycache__/views.cpython-311.pyc and b/app/__pycache__/views.cpython-311.pyc differ diff --git a/app/sounds.sqlite3 b/app/sounds.sqlite3 index 323f09525..bfe5aee77 100644 Binary files a/app/sounds.sqlite3 and b/app/sounds.sqlite3 differ diff --git a/app/views.py b/app/views.py index 9ad99b419..35afb1d9a 100644 --- a/app/views.py +++ b/app/views.py @@ -274,10 +274,10 @@ def index(request): start_mitral_thread('normal_heart') elif 'split_first_heart_sound_mitral_valve' in request.POST: print('\nSound Played: Split First Heart, Location: Mitral Valve') - start_mitral_thread('split_first_heart_sound') + start_mitral_thread('split_first_heart') elif 'split_second_heart_sound_mitral_valve' in request.POST: print('\nSound Played: Split Second Heart, Location: Mitral Valve') - start_mitral_thread('split_second_heart_sound') + start_mitral_thread('split_second_heart') elif 'third_heart_sound_mitral_valve' in request.POST: print('\nSound Played: Third Heart (gallop), Location: Mitral Valve') start_mitral_thread('third_heart_sound_gallop') @@ -399,10 +399,10 @@ def index(request): start_aortic_thread('normal_heart') elif 'split_first_heart_sound_aortic_valve' in request.POST: print('\nSound Played: Split First Heart, Location: Aortic Valve') - start_aortic_thread('split_first_heart_sound') + start_aortic_thread('split_first_heart') elif 'split_second_heart_sound_aortic_valve' in request.POST: print('\nSound Played: Split Second Heart, Location: Aortic Valve') - start_aortic_thread('split_second_heart_sound') + start_aortic_thread('split_second_heart') elif 'third_heart_sound_aortic_valve' in request.POST: print('\nSound Played: Third Heart (gallop), Location: Aortic Valve') start_aortic_thread('third_heart_sound_gallop') @@ -524,10 +524,10 @@ def index(request): start_pulmonary_thread('normal_heart') elif 'split_first_heart_sound_pulmonary_valve' in request.POST: print('\nSound Played: Split First Heart, Location: Pulmonary Valve') - start_pulmonary_thread('split_first_heart_sound') + start_pulmonary_thread('split_first_heart') elif 'split_second_heart_sound_pulmonary_valve' in request.POST: print('\nSound Played: Split Second Heart, Location: Pulmonanary Valve') - start_pulmonary_thread('split_second_heart_sound') + start_pulmonary_thread('split_second_heart') elif 'third_heart_sound_pulmonary_valve' in request.POST: print('\nSound Played: Third Heart (gallop), Location: Pulmonanary Valve') start_pulmonary_thread('third_heart_sound_gallop') @@ -649,10 +649,10 @@ def index(request): start_tricuspid_thread('normal_heart') elif 'split_first_heart_sound_tricuspid_valvee' in request.POST: print('\nSound Played: Split First Heart, Location: Tricuspid Valve') - start_tricuspid_thread('split_first_heart_sound') + start_tricuspid_thread('split_first_heart') elif 'split_second_heart_sound_tricuspid_valve' in request.POST: print('\nSound Played: Split Second Heart, Location: Tricuspid Valve') - start_tricuspid_thread('split_second_heart_sound') + start_tricuspid_thread('split_second_heart') elif 'third_heart_sound_tricuspid_valve' in request.POST: print('\nSound Played: Third Heart (gallop), Location: Tricuspid Valve') start_tricuspid_thread('third_heart_sound_gallop') @@ -774,10 +774,10 @@ def index(request): start_erb_thread('normal_heart') elif 'split_first_heart_sound_erb_point' in request.POST: print('\nSound Played: Split First Heart, Location: Erb Valve') - start_erb_thread('split_first_heart_sound') + start_erb_thread('split_first_heart') elif 'split_second_heart_sound_erb_point' in request.POST: print('\nSound Played: Split Second Heart, Location: Erb Valve') - start_erb_thread('split_second_heart_sound') + start_erb_thread('split_second_heart') elif 'third_heart_sound_erb_point' in request.POST: print('\nSound Played: Third Heart (gallop), Location: Erb Valve') start_erb_thread('third_heart_sound_gallop') diff --git a/db_test.ipynb b/db_test.ipynb new file mode 100644 index 000000000..ab63d4a6b --- /dev/null +++ b/db_test.ipynb @@ -0,0 +1,127 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import sqlite3\n", + "import numpy as np\n", + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "try:\n", + " con = sqlite3.connect(\"/home/pi/Downloads/Auscultation-Simulator-Application/app/sounds.sqlite3\", check_same_thread=False)\n", + "except:\n", + " con = sqlite3.connect(\"/Users/kumarlaxmikant/Desktop/Visual_Studio/Auscultation-Simulator-Application/app/sounds.sqlite3\", check_same_thread=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "cur = con.cursor()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(0,\n", + " 'pulmonary_hypertension',\n", + " 'T',\n", + " 'app/static/audio/heart/pulmonary_hypertension/T/combined_audio.wav')" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "temp = cur.execute(\"SELECT * FROM app_heartaudio\")\n", + "temp.fetchone()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cur.execute(\"UPDATE app_heartaudio SET sound_name='split_first_heart' WHERE sound_name='split_first_heart_sound'\")" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "cur.execute(\"UPDATE app_heartaudio SET sound_name='split_second_heart' WHERE sound_name='split_second_heart_sound'\")\n", + "con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "virtualenv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/temp1.html b/temp1.html deleted file mode 100644 index e69de29bb..000000000