Monday, August 27, 2007

Work done Up to 28/8

SQL Generation
The SQLGenerator has been extended to include the following categories in the answer and condition part of the query:
1. Patient event - All the basic demographic information for patients (E.g. medical record number, sex, etc.)
2. Chart event (Numerical) - All the numerical charted information for patients (E.g. heart rate, peep, cvp, etc.)
3. Chart event (Categorical) - All the categorical charted information for patients (E.g. ventilation mode, airway, etc.)
4. Medication event (drip) - All the iv-drip-infusion (sedation and inotropes) information for patients (E.g. Propofol, Fentanyl, etc.)
5. Medication event (dose) - All the dosage (antibiotics and thromoebolic prophylaxis) information for patients (E.g. Panadol, etc.)
6. Laboratory event - All the chemical information for patients (E.g. Chloride, Sodium, pH, etc.)
7. Output event - All the output information for patients (E.g. urine, etc.)

At the moment, categories 1,2,3,4 are completed. Categories 5,6,7 are in progress.

User Interface
The user interface has been extended to include the following features:
1. Automatically update the query as the user types and makes selection (with the use of AJAX).
2. Check whether the variable names that the user entered are found in the dictionary.
3. Display the query result in the format selected by the user (E.g. Table, List, etc.)

At the moment, features 1,2 are completed. Feature 3 is in progress. Feature 2 will later be implemented with the SNOMED-CT server to replace the dictionary.

Saturday, August 18, 2007

Work done Up to 19/8

SQL Generation
The SQL Generator has been extended to handle the followings:
1. Multiple conditions can be processed by separating the logical operator (and/or) and breaking them into sub-queries which will be processed separately and combined into a single set of results.
2. Retrieve data from archive database.
3. Able to distinguish between categorical/numerical entities and handle them correspondingly.

User Interface
The user interface has been extended to allow:
1. Selecting patients by demographical information and historical information.

Other Features
The following statistical functions can now be included in CDAL:
1. mean
2. sd (standard deviation)
3. median
4. max (maximum)
5. min (minimum)

Thursday, August 2, 2007

Input User Interface

The current user interface uses combo-boxes and text-boxes to help the user to correctly (according to the syntax) enter the query question.

The stages / milestones for this module include the followings:
1. Correctly transform the question from combo-boxes and text-boxes into a single language (CDAL).
2. Keep track of the question as it is being inputed.
3. Perform validation checking on the syntax.
4. Perform validation checking on the medical terms used. This requires the use of SNOMED server.

At the moment, stage 1 has been completed. Stage 2 is under researched (implementing AJAX).


Since the existing parser (version 1) only deals with 2 tables (ptevent and pteventclass), the code must be re-written / extended to support for multiple tables. This means that each of the 8 modules need to be changed accordingly. These require the following stages / milestones:

1. The current system (version 2) can now enable the user to type in the query question from the interface module.
2. The syntactic parser then splits the question up into each of the above part , and generates separate objects (from patient_class, answer_class and condition_class) accordingly.
3. These objects are then passed to the SQL generator that is responsible to convert the question into the corresponding SQL for the underlying databases. Note that there are 2 sub-tasks here: the realtime database and the archive database.
4. The results are then passed to the the Response Generator that is responsible to display the query results.

At the moment, stage 2 is completed. Stage 1 is under reviewed (see below). Stage 3 is in progress.

Syntax of CDAL

The syntax of CDAL has been extended to consist of the following elements:
1. USING TOC: where TOC = [SNOMED]
2. IN [database_ent]+: where database_ent = [GICU-DB, NSICU-DB, CICU-DB, ISM-DB all DB]+
3. FIND [reference_ent statistical_ent]+ : where reference_ent = [all values, any value]; statistical_ent = [mean, median, sd, max, min]
4. OF medical_ent
5. FOR Patient_Class: where Patient_Class is in the form: PATIENTS WHOSE [demographics_ent operator value]*
6. WITH [medical_ent operator value]* [joint_ent medical_ent operator value]*
7. DURING [time_ent]*
8. IN [location_ent]*

Example: The following question is valid:
3. FIND all values and mean and sd
4. OF heart rate
5. FOR patients whose age > 40 and sex = male
6. WITH ventilation mode = PS AND PEEP <> 20
7. DURING the last 72 hours