Skip to main content

User login

What is not?

 Impossible is not a fact, its an opinion 

Software Plan

April 26, 2010 by Dr.Inayath

 

COMMAND LINE INTERFACE

 

System >>> Please enter the age and sex of the patient, eg. 30 y M

Patient >>> 45 y  M

 

System >>> Please enter the presenting symptoms separated by commas

Patient >>> Chest pain, breathlessness

 

We split the input by commas, use each symptom word and see if its matches a dictionary value i.e { 'Dyspnea' : 'Shortness of breath', 'breathlessness', 'sob', 'breathless', 'difficulty breathing', 'breathing problems'}. When using the translation the dictionary would still have the same keys but different values eg. {'Dsypnea': ' ساس لینے می تکل', 'دم چدن', 'ساس پہلن'}.

If the symptom matches a value, its corresponding key is mapped internally as a fact, for eg. in this case Chest pain and Dsypnea are asserted to engine. If the symptom doesnt match, relevant answers are suggested. 

Once the presenting symptoms are asserted, they first invoke forward chaining rules which contain the canning questions. These questions are added to the question stack and sorted according to the weights. The user is asked to set the question threshold and diagnosis threshold.

 

System >>> Please enter the threshold for questions between a value 0.0 to 1.0 . The threshold determines how deep you want to probe the case, a lower threshold means more questions will be asked and more diseases evaluated.

Patinet >>> 0.5

 

Usually the canned questions have a high threshold as we want them to be asked at all times first. The patient answers the initial questions.

 

System >>> What is the severity of chest pain? (1- Mild, 2- Moderate 3- Severe, 4- Very severe). To know how to determine severity type 'help'

Patient >>> 2

 

System >>> What is the character of chest pain? Enter a number : 1 - Tightness like a band 2 - Heaviness 3 - Sharp 4 - Burning 5 - Throbbing. If not sure please type 'help' for more verbose description.

Patient >>> 2

 

System >>> What is the location of chest pain? Enter a number : 1 - Substernal 2 - Right/Left Side of chest 3 - Interscapular back 

Patient >>> 2

 

System >>> Is the pain radiating? Enter a number 1- Radiating to epigastric region 2- Left Hand 3- Neck 4- Jaw 5- Back (If more than one answer, enter numbers separated by commas)

Patinet >>> 2,3

 

System >>> What is the duration of chest pain? (use 'd' for days, 'h' for hours, 'm' for minutes)

Patient >>> 1 h 15 m

 

System >>> How was the onset of chest pain? 1- Sudden 2- Gradual 3- Sudden on gradual

Patient >>> 1

 

System >>> Does the pain increase on any of the following : 1- Exertion 2- Meals 3- Deep inspiration

Patient >>> 1

 

System >>> Before we proceed with history, following alerts have been made : 1. Make the patient lie down 2. Give sublingual nitrate 5mg stat 3. Record Vitals 4. Arrange for ECG. If done, type yes

Patient >>> yes

 

Alerts are messages for doctors to act on, they might be triggered by certain rules, for eg. a patient with breathlessness grade 3/4 fact triggers a rule that alerts for immediate oxygen and pulse oximetry. The alerts are recorded separately in another list, which doctors can refer anytime if they had had skipped an action. In GUI these alerts are always shown in a box.

 

System >>> What is the grade of dyspnea? ( Grades 1,2,3,4). For explanation type 'help'

Patient >>> help

System >>> There are four grades of dyspnea by NYHA classification : Grade 1 is dyspnea on doing heavy activities, Grade 2 is dyspnea on moderate activities, Grade 3 is dyspnea on mild exertion i.e doing light household chores , Grade 4 is dyspnea even on rest. Type either of one 1,2,3,4

Patient >>> 1

 

System >>> Is the dyspnea paroxysmal? Yes/ No

Patient >>> No

 

System >>> How is the onset of dyspnea? 1- Sudden 2- Gradual 3- Sudden on Gradual

Patient >>> 1

 

System >>> What is the duration of dyspnea? days - d, hours - h, minutes - m

Patient >>> 1 hr

 

System >>> Is the patient any of the following 1- Hypertensive 2 - Diabetic 3 - Obese (If more than one answer, separate by commas)

Patient >>> 1,2

 

System >>> How long has the patient been hypertensive? (y, m)

Patient >>> 20 y

 

System >>> What drug does the patient take for hypertension? (Drug name, dose, dosage timings)

Patient >>> Aten 25 mg OD.

 

System >>> How long is the diabetes present? y,m

Patient >>> 15 y

 

System >>> What does the patient use for diabetes? (Separate by comma)

Patient >>> Glycomet GP 2 BD, Insulin Mixtard 30/70 12 U - 12 U.

 

System >>> Is the patient compliant with the drugs? (yes, y, no, n)

Patient >>> y

 

System >>> What are the vitals of the patient ? Blood pressure, Pulse rate, Temperature, Respiratory rate

Patient >>> 120/80, 90, 98.6 F, 22

 

System >>> Lets proceed to general examination - is there any of the following - pallor, cyanosis, clubbing, icterus, lymphadenopathy, edema?

Patient >>> n

 

System >>> Doctor, does the patient have anything significant on general physical examination? If yes - enter the organ system name.

Patient >>> n

 

System >>> Lets proceed to Cardiovascular and respiratory physical examination. Do you wish to do a complete examination (1) or answer relevant findings (2) ?

Patient >>> 2

 

System >>> Is there any of the following ? 1- S3/S4 heart sound 2- Cardiac Murmur 3- Deviation of trachea 4 - Decreased breath sounds 5 - Wheeze 6 - Crackles, type 0 for none?

Patient >>> 0

 

System >>> The system recommends you to input the findings of ECG (1)  before you proceed with answering other finer questions (2)

Patient >>> 1

 

System >>> The current differential diagnosis include - Disease (Chance in %) 1 - Coronary artery disease (90%), 2- Myocarditis (40%), 3- Pneumothorax (30%)  4-Aortic Dissection (20%), 5- Acid Peptic Disease (20%) 6- Pulmonary Embolism(20%) 7 - Ten Others ( <15%) 

Do you wish to work on any particular disease or if you wish the system to takes it own course type 9.

Patient >>> 9

 

System >>> Do you wish to assistance in reading the ECG? (This will load the ECG module) - y/n?

Patient >>> n

 

System >>> What are the findings on ECG 1- ST depression 2 - ST elevation 3 - S1Q3T3 4 - Sinus Tachycardia 5- Sinus Bradycardia 6- Arrythmia 

Patient >>> 2

 

System >>> ALERT : Start IV line, give oxygen inhalation, Tab. Aspirin 325 mg Stat, Tab. Clopitab 300mg Stat, Tab. Sorbitrate 10mg. 

 

System >>> Which leads does the ST elevation appear in - 1. Lateral 2. Anterior 3. Inferior 4. Right

Patient >>> 1

 

System >>> Is there a provision for thrombolysis here? (y,n)

Patient >>> n

 

System >>> Please immediately transfer the patient to a higher center where thrombolysis can be conducted. This is a life threatening condition, please act immediately. While the patient is being transferred would you like to answer questions to know if the patient is fit for thrombolysis? y/n

Patient >>> n

 

System >>> The case sheet for this patient is ready for print (1), you can also transfer this patient data to the higher center directly and inform them about the patient condition before the patient reaches there (2).

Patient >>> 1,2

 

System >>> Patient data transferred, you may wish to continue answering the questions while the patient is being transferred to hospital to save time.

 

Explanation:

 

As can be seen in the discussion, the system is actively sorting its questions into three lists - symptoms, signs, investigations. The threshold set by the user is utilized to  determine when the system exhausts the list and moves on to the next one. Also note that the system gives the user the option to do a complete examination or a finding wise examination. In the case above, the canned questions were sufficient to lead to a diagnosis, often when the canned questions are completed, the system falls back to the engine where according to the rules questions are generated with weights for eg. in the above case - chest pain triggers 'angina', and if there is a rule that says angina (40) + syncope(30) + dyspnea(40) = Aortic stenosis (50), the engine gives back the system the questions 'syncope' and 'dyspnea' with weights 0.3, 0.4 and these can be questioned to the user. (However if the weight of the questions are less than threshold set by user, they wont be asked unless the user lowers the threshold to explore more possibilities)

There is a separate scoring for investigations, and when certain investigation is strongly needed it is asked before the symptom list exhausts. However if that is not the case - the investigations are sorted according to their diagnostic value and the cheapest, easily available test is asked to be carried out.

The system(brain.py) contains metarules which guides the process of diagnosis by using heuristics. Heuristics are rules of thumb that may or may not succeed, however they bring a lot of efficiency and gives the human like aspect of the software.

 

Once a certain disease is confirmed, the system asks if the user wants to freeze the diagnosis process and proceed with management, which may include further investigations and treatment. (This uses forward chaining rules). 

 

0
Your rating: None
Premium Drupal Themes by Adaptivethemes