Patient centric Medical Database with Remote Urinalysis Test Dr. Nathaniel Joseph C. Libatique, Ph.D., Dr. Gregory L. Tangonan, Ph.D., Engr. Ma. Leonora C. Guico, M.Sc., Catherine L. Ramos, M.Sc., Erwin Ray P. Hapal, Michael U. Siapno, Ronell B. Sicat and Kelvin Chryzth P. Velasquez Electronics, Computer and Communications Engineering Department Ateneo de Manila University, Philippines Abstract The patient centric medical database called ECMED (EleCtronic MEdical Database) is an on line repository for patient medical records which is accessible and can be updated via the Internet and/or the GSM network (via SMS and MMS). The database stores important patient information as well as laboratory test scores and reports for electrocardiogram (ECG) and urine analysis (UA). Using an automated urinalysis test developed and tested by the group, the database receives multi media messaging service (MMS) images (in JPEG format) of urinalysis strips and automatically processes the images to get urinalysis scores. Aside from MMS updating, the patient can also use short messaging service (SMS), more commonly known as text messaging, to report urinalysis scores. Encoded MMS (in PNG format) containing ECG graph samples taken using a low cost ECG circuit (developed by another group) can also be received and processed by the database. In addition, both urinalysis and ECG testing and updating can also be done on line. 1. Introduction Telehealth technology is gaining popularity as a means of remote health management. It provides not only a cheap means to monitor one s health but also provides medical services conveniently due to its accessibility and mobility. Current trends also involve the inter networking of medical devices to provide real time data, therefore providing better health services. The development of the patient centric medical database involves integrating the service with other medical devices for easier remote tests and data transfers. In line with this, the study is focused on the development of an automated urinalysis test using simple image processing. This test will be subjected to several actual tests in order to measure its accuracy and precision. 2. Theoretical Framework Successfully implementing ECMED services requires the integration of several components, both in terms of hardware and software. In the implementation of the project, the cost of the components (the software specifically) was also considered. Thus, in order to minimize costs, the group used open source software as much as possible. This section lists down and briefly describes the important components of the medical database server. 2.1 LAMP Server The patient centric medical database is powered by a LAMP server Linux, Apache, MySQL, and PHP. Linux serves as the platform OS, Apache is the web server, MySQL is the database management system and PHP is the programming language. Using LAMP reduces the cost of deploying the system since everything in the bundle is open source. 2.2 Cake PHP In addition to LAMP, cake PHP was used as the web application framework. Cake simply organizes the files for the web application for easier configuration and can automatically generate web pages with built in codes for the user. The automatically generated web pages were still modified however, in order to match the needs of the medical database web site. 2.3 GSM Network Interface Aside from being accessible on line, the database can also be accessed via the GSM network via short message service (SMS) and multimedia messaging service (MMS). To add this feature, an open source software called kannel was used. Kannel acts as the server s SMS and wireless application protocol (WAP) gateway in order to send and receive both SMS and MMS using the server. Once installed, kannel is interfaced with and controls the GSM modem which is a Fargo Maestro. In order to execute specific commands, kannel gets the messages sent to the modem and passes it to a PHP script which tells the server what to do.
3. System Arcecture 4.1 Protocol for Patient The system arcecture in Figure 1 shows the interconnection of devices with the Internet and the GSM network. The arrows in between devices and networks indicate the direction of data transfer. Figure 3 shows the flowchart for using the automated urinalysis test. First, the user has to log in using their mobile phones or via Internet. Next, the set up should be prepared as shown in Figure 4. Then, the urine strip dipped in urine should be placed on the testing frame for image capture using the Sony Ericsson P1i camera phone. The image can then be sent to the server via MMS or on line for automatic processing. Figure 1. Sytem Arcecture Another important component of the system is the database itself. To model the database, an entity relationship diagram in Figure 2 is used. Note that the rectangular boxes represent tables in the database while the diamond figures represent relationships between or among tables. Figure 3. Protocol for Automated UA Test Figure 2. Entity Relationship Diagram 4. Automated Urinalysis Test ECMED services provide users with an automated urinalysis test which receives an image of the patient's urinalysis test strip (taken using a camera phone) as input and automatically processes the image to get the scores. Figure 4. Set up for Taking Strip Image
4.2 Automated Urinalysis Test Experiments In order to verify if the urinalysis test software developed by the group is accurate and precise in scoring, a simple experiment was conducted. The summary of the whole urinalysis test experiment is presented in Figure. 1.2 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.2 1.2 1.3 1.3 Taking a look at the table will show that the scores generated by the no color correction version of the software is relatively accurate and precise. Its generated scores do not deviate to more than three boxes from the medical technologist s scores. The second version of the software is the 2 box color correction method. It is called precisely 2 box since it first gets the average difference of all color box reference to the original reference. The scores for the second version are given in Table 2. Table 2. 2 Box Color Correction Scores Figure. Flowchart for Urinalysis Test Experiment 4.3 Urinalysis Test Results There were initially three auto scoring schemes that were implemented during the test. First is the version with no color correction. This scheme directly compared the urine strip colors to the reference without adjusting the colors of the urine strip. Table 1 shows the scoring results of this version of the automated test. The clear boxes show a perfect with the correct score with respect to the medical technologist s generated score. The yellow boxes represent scores that are just one color box from the score given by the medical technologist while the red boxes represent scores that are two boxes from the score given by the medical technologist. Table 1. No Color Correction Scores no color correct scores 1.3 1.3 1.3 1.3 1.2 1.2 2-box scores 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 For the second version results, the scores for are noticeably consistent in being two color boxes from the actual scores. This can be attributed to the adjustment technique used which uses the average RGB
color differences of all the blocks in the reference. Because of the error mentioned above, a third version of the software is developed the chemical box color correction. This scheme still follows the concept of averaging for color adjustment. The only difference is that the averaging happens not to all thee reference boxes but only to the specified chemical reference boxes involved (glucose reference colors for glucose strip, reference color for strip, etc.), hence the name chemical box color correction. Thus, when scoring for glucose, the software first gets the average of the color boxes for glucose with respect to the color boxes provided by the original reference for glucose and adjusts the color of the glucose color box in the urine strip. This eliminates the problem of having all the colors of the reference boxes affect all the urine strips. After implementing the mentioned adjustments, the scores generated were unexpectedly different. The scores are given in Table 3. Table 3. Chemical box Color Correction Scores chemical-box scores 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 Comparing the results for the 2 box and chemical box color correction, it is easily seen that the scoring has improved in the expense of decreasing the efficiency of scoring in specific gravity for the chemical box color correction. With this in mind, a better scoring method is created which is based on the 2 box and chemical box color correction. The final version employed the color correction scheme of the chemical box version for all the tests except for specific gravity which used the scheme of the 2 box color correction instead. The scores of the final color correction are shown in Table 4 below. Table 4. Final Color Correction Scores final color correct scores 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 As to be seen on the table of results, the final version provides the best scoring results as compared to all the scoring versions made for urinalysis in this research. However, this result is not yet conclusive. It cannot be finalized that this version is already very accurate and precise since it is only tested for a total of 2 samples. For further verification, more tests should be made and should involve testing larger number of samples with more variations in the actual scores (preferably including very negative scores). Tallying the scores and accuracy of the different scoring methods, a summary of percentages is created. Table shows the percentage of all scoring methods.
Table. Efficiency of Scoring Schemes No color correct scores 9% % % % % 3% 8% 2% % % 1% % 2-box color correct 9% % % % % 3% 1% % % % 8% % Chemical-box color correct 9% % 8% % % 3% 3% % % % % Final version % 9% % 8% % % 3% 3% % % % % % As shown in Table, urine s has the most inaccurate scores projected in the automation of urinalysis scoring. One reason behind this is that the reagent for scoring is very volatile and it fades quicker than the other reagents on the urine strip. Since the strips were not collected quickly, the has already faded before the image was taken from the testing frame. But as the table shows, the scores are still close to that of the medical technologist s. In fact, all the scores generated by the automated test are acceptable since they all fall within the error margin of one to two boxes from the correct score (this range is also used for medical technologists). For the other chemical tests, the glucose protein and specific gravity have more accurate scoring. There are no scores that have reached the two box error margin for scoring. Almost all have correctly matched the scores of the medical technologist. Some scores are just one color box from the recorded score of the medical technologist. After scoring using the no color correction method, all the strips are retested using the three color correction method. Surprisingly, all 2 strips have the same scores. But in terms of accuracy, glucose, protein and specific gravity still has the most precise scores compared to the scores given by the medical technologist.. Conclusion The group was able to develop a new online telehealth service called ECMED (EleCtronic MEdical Database). This new service is also accessible via the Internet and the GSM network but with the urinalysis test fully automated and integrated with the system. Patients can now send urinalysis strip images via MMS or the Internet for automatic processing and diagnosis. In addition, more SMS based services were added, including the reporting of urinalysis scores, request for recent scores, request for an MMS based graph showing the five most recent scores and other doctor addition and authorization methods. Aside from urinalysis strip images, patients can now send ECG data, both graph images and text files containing sample values, for processing and storage in the server. The web application component of ECMED services was successfully implemented using the cake PHP framework, thus providing better and easier to understand configuration of the web application. The web user interface was also improved, making it easier to use and more appealing to users. For online membership security, a web service administrator was also added to handle the memberships and account management. In line with the development of the automated urinalysis test, the group also created a software which receives an image of a urinalysis strip taken with the urinalysis scoring reference (as specified by the group) and processes the image to come up with the scores for glucose, protein, specific gravity and. The first version of the software did not employ any color correction technique and the next three versions used a simple color adjustment technique using a reference image as basis of adjustment. All the software versions used met the acceptable accuracy for scoring which is plus minus one to two blocks from the correct score but the final version is considered to be the best. Due to the successful implementation of ECMED services in the laboratory setting, the next step, aside from further improving the services, is to think of possible deployment scenarios. And the first proposed scenario is the implementation of the automated urinalysis test in a hospital setting. The medical technologist will continue to do the urinalysis test and scoring but the automated test will also be working in the background, serving as a second check. Once the number of tests reaches a considerably large number, the scores made by the medical technologist may be compared with that of the automated test in order to check the accuracy and acceptability of the scores. Once proven to be correct
and consistent, the system can then be deployed independent from the medical technician. However, the medical technicians still have the option of doing random checks on the generated scores just to make sure that it is properly working. The system can be used by hospitals or clinics for several applications including outreach programs for remote and poor communities. Another proposed deployment scenario involves the whole ECMED service being fully implemented and utilized to provide a centralized medical records repository and remote tests service in different communities. For poor and remote communities, ECMED services can provide the basic urinalysis test to the people even if they do not have any formal clinic or medical expert. All that is needed for a test is trained personnel, the urinalysis image capture set up and a camera phone. Finally, the model used for the automated urinalysis test can also be used to implement other automated color based diagnosis applications. Examples of possible diseases to be diagnosed are lung cancer and skin tumor which can both also be diagnosed based on captured images. Acknowledgements The authors would like to thank all the students and faculty who worked on this biomedical research project since its initiation two years ago. References 1. Il, Kon Kim, Winchester, James, Alaoui, Adil, Seong, Ki Mun, and Won, Ki Choi (1998). A Multimedia Medical Database Component for a Dialysis Telemedicine Application. Pacific Medical Technology Symposium. 2. P.J. Mazzone, J. Hammel, R. Dweik, J. Na, C. Czich, D. Laskowski, and T. Mekhail (2). Diagnosis of lung cancer by the analysis of exhaled breath with a colorimetric sensor array. Cleveland Clinic, Ohio. 3. Kakkilaya, Bevinje Srinivas (23). Rapid Diagnosis of Malaria. K.S. Hedge Medical Academy, India. 4. Urinalysis [on line]. Available from http://www.medicinenet.com/urinalysis/article.htm; internet; accessed 3 March 28.. Urine [on line]. Available from http://library.med.utah.edu/webpath/tutorial/urin E/URINE.html; internet; accessed 3 March 28.. Chung Chih Lin; Jeng Ren Duann; Chien Tsai Liu; Heng Shuen Chen; Jenn Lung Su; Jyh Horng Chen, "A unified multimedia database system to support telemedicine," Information Technology in Biomedicine, IEEE Transactions on, vol.2, no.3, pp.183 192, Sep 1998.. N. Chandrashekar; S.M. Gautam; K.S. Srinivas; J. Vijayananda, "Design Considerations for a Reusable Medical Database," Computer Based Medical Systems, 2. CBMS 2. 19th IEEE International Symposium on, vol., no., pp.9 4, 2. 8. Sudhakar, G.N.M.; Karmouch, A.; Georganas, N.D., "Design and performance evaluation considerations of a multimedia medical database," Knowledge and Data Engineering, IEEE Transactions on, vol., no., pp.888 894, Oct 1993.