Developing a Bedside Software for Digitizing Paper Based Medical Data in Intensive Care Settings

Objective: Most of the data in medical monitoring are gathered analogically or their digital format is inaccessible to the clinician. Current techniques of digitization are very complicated and mostly cause heavy costs. We have developed a software package which can convert paper based input data to a digital format. Design: Recordings were obtained from patients with supratentorial tumors who were monitored postoperatively after elective craniotomy. Then the clinically determined values were calculated by our software and were compared with the average value for each point as measured by three independent blinded examiners. www.ccsenet.org/gjhs Global Journal of Health Science Vol. 3, No. 1; April 2011 ISSN 1916-9736 E-ISSN 1916-9744 10 Measurements: Three types of recordings: trancranial doppler, arterial blood pressure and intra cranial pressure recordings were selected for validation of our software package. Comparison of the results performed both by overlapping of the curves for each variable by three different observers. In addition statistical analysis performed with use of normalized mean square method. Results: Recordings were obtained from 10 patients. The resultant curve for each tested parameter was completely compatible with the related curve obtained by our digitization software. In addition statistical analysis showed no difference between the results in clinical assays and the digitized results. Conclusion: Our proposed software is tested by several different measurements and compared with the clinical results. Our proposed software is based on a brief program which is not only precise but also simple and user friendly and cheap. It eliminates the background grid and artifacts especially in TCD monitoring record which causes a very crowded display.


Introduction
Today neurosurgeons, anesthesiologists, cardiologists, internists and intensive care specialists use continuous recordings from physiological parameters using monitoring devices in ICU, CCU, and operating room theater.These data are gathered through invasive and non-invasive routes.Patients in ICU and operating room are in critical situations and need precise and continuous monitoring like central venous pressure (CVP), arterial blood pressure (ABP), cerebral perfusion pressure (CPP) or electroencephalography (EEG), which are not needed in general wards.(Gravenstein JS., 1986) During the past decades these physiological parameters have been recorded via a chart recorder onto different standard grid papers.Nowadays with advances achieved in digital technology, devices produced by different companies are capable of recording these waveforms in a digital format which can be played back and analyzed later if needed.However non-digital devices are used worldwide and these recordings is still the most common mode for archiving medical records.(Gravenstein JS., 1986;Bernhard Schmidt, 2002) Due to the well known problems with invasive methods of data collection such as damaging the natural barriers of the patient and the discomfort these methods provide for the patients, there has been a trend toward reproducing the invasive data through non-invasive methods.It is possible to get data of invasive monitoring from noninvasive methods by application neural network protocols or weight functions.(Bernhard Schmidt, 2002) The output protocol for the ICU instruments such as TCD, ABP, or EEG is different, based on the manufacturer company.There are many ICU departments in developing countries which do not have an integrated software system for processing different outputs from different sources and for the combination of data derived from these various noninvasive methods we need a common output protocol.
Many of the companies do not permit to change in their output protocols or the integrated digital systems are not available.Our software package enables its users to produce digital output from the shape of output signals from different sources without the necessity of access to their specific output protocols and without interrupting the present software system in the ICU setting.
To achieve this goal the data gathered through non-invasive recordings should be processed and reformatted to yield the favorite results.(Meting van Rijn, 1990) Another problem encountered in evaluation of the recordings is that the some of these, are quite complex and their interpretation is both time consuming and requires high degrees of expertise.To prepare the complex recordings e.g., EEG or EKG in a reproducible easy to use format efforts have been made to obtain some scores to analyze the data in an objective and easy to use manner understandable for ordinary caretakers without undue time wasting.(Towe BC., 1981;Mc Manus CD, 1993;Arefian NM, 2007;Saberi H, 2007) To process the data in intensive care settings, it is needed the procedure be performed in a quick, reliable and cost effective format so that the attending clinician becomes able to take appropriate decisions in a short period of time.
Unfortunately most of the data gathered in intensive care setting are not available in their digital format to the clinician.They are either available analogically or their digital format is inaccessible to the clinician cause the computer network adjusted in these units are permissive only to their administrators who usually don't allow modification of their system as required by the clinicians.This reduces the flexibility of the management of monitoring systems in these units.Some devices produce their digital output in a special format incompatible to other devices.Also a lot of parameters such as EEG or EKG are gathered in paper based analog format, unusable for the microprocessors required to analyze them.(Bazhyna A, 2004;Ziaran AK, 2002) So with digitalization, access to patient examinations is rapid and the cases can be viewed in many places simultaneously.The images are consistently of high quality and the examinations are in order according to dates and no films are lost.With this innovation no chemicals are used for processing and film artifacts are reduced.So data transfer is performed more precisely and in a rapid and easy way.In addition there would be an improved work area with the ability to decrease in storage and filing costs therefore it would be more cost effective.(Dotsinsky I, 2005) Analogue to digital conversion is carried out with an analogue to digital converter (ADC).It is the ADC which converts the source analogue signal to a digital representation of the original.While there are many processes involved, and while many different types of ADC exist, the most important factors to be considered are the rate or frequency at which the conversion occurs and the degree of discrimination which is possible during the conversion process.(Christov II, 2000) Various methods have been innovated and tried clinically, like beat to beat noise removal by Bazhyna and Christov (Bazhyna A, 2004), nonlinear adaptation method of elimination of power line interference by Ziaran and Konrad (Ziaran AK, 2002), power line interference cancellation in signals by Dostinsky and his colleagues (Dotsinsky I, 2005), or dynamic power line interference subtraction for biosignals performed by Christov (Christov II, 2000) and digitization technique published by Frazier and his colleagues.(Fraser RG, 1989) Current techniques of digitization of records are very complicated and not flexible and mostly cause heavy costs.There is also a high risk of data loss during the conversion.(Bazhyna A, 2004;Ziaran AK, 2002;Dotsinsky I, 2005;Christov II, 2000) We have developed a software package to cope with the above mentioned problems, easily installed on laptop or microcomputers which can convert paper based input data such as EKG, EEG, ABP, ICP, saturation profiles and, to a digital format easily accessible for other software packages to process them also prepare them in such manner that background noises be filtered out and the axis shifts corrected and an accurate reliable output be produced.
Our software protocol eliminates the need to install an integrated data system compatible with all output protocols from different companies.
To validate the accuracy of our software we have tried it on different types of recordings obtained from our patients.
To our best knowledge there is not a similar package validated in a randomized trial in the literature either.

Material and Methods
Three types of recordings TCD (Transcranial Doppler), ABP (Arterial Blood Pressure) and ICP (Intra Cranial Pressure) recordings were selected for validation of our software package.Recordings were obtained from patients with supratentorial tumors who were being monitored postoperatively after elective craniotomy in Shohada Tajrish Hospital in 2007.The recordings were obtained in day 3 and 4 and 5 post operative day under the supervision of two neurosurgeons and an anesthesiologist.TCD recordings of middle cerebral artery velocity contralateral to the side of craniotomy, 1cm distal to its separation from internal carotid artery were obtained by an expert radiologist and under the supervision of senior author.All the invasive ICP catheters were placed intraparenchymally by the senior author after craniotomy for supratentorial tumor resection in accordance with our department protocol for monitoring ICP invasively after resection of supratentorial tumors in patients in whom postoperative swelling appears likely.The recordings obtained so were delivered to three independent clinician blinded about the trial.They were told to choose 10 second intervals and then divide them to 50 equi-distant parts each equal to 0.2 sec.They then registered the value of the recording corresponding to the points for ICP (mmHg), invasive ABP (mmHg) and TCD flow velocity (cm/sec).Then the value corresponding to the points mentioned above were calculated by our software after scanning the records selected by the three examiners mentioned above.The results were compared with the average value for each point as measured by three independent blinded examiners.It is worth mentioning that the selection of the intervals was by the three examiners by their agreements but the measurements by them were independently obtained.And finally the average value for each 0.2 sec point was compared with the calculated data.
Comparison of the results performed both by overlapping of the curves for each variable by three different observers.In addition statistical analysis performed with use of normalized mean square method:

A: Choosing MATLAB:
MATLAB has been selected as the programming shell for the new protective relay modeling software due to its flexibility of its libraries models and programs which enables its users to integrate different model components in one package conveniently.
Particular factors that support the use of MATLAB are: 1).It has a flexible software structure, comprising libraries, models and programs that enable one to integrate different model components in one package conveniently.
2).MATLAB tools are fast developers with powerful calculation and visual tools especially its graphical interface called GUI (Graphic User Interface) creates a user friendly and open system.(Fig 1) 3).It has a wide selection of Toolboxes with comprehensive collections of predefined functions for solving application specific problems.4).MATLAB and its graphical user interface (GUI) create a friendly and open system.New models and libraries may be just added to package without deep knowledge nor modification of the existing parts.This is very useful if the user is also involved in continued development of the software.5).MATLAB Compiler allows MATLAB application to be developed as an executable or a shared library.Executables and libraries created with the MATLAB Compiler product use a runtime engine called the MATLAB Compiler Runtime (MCR).MATLAB Compiler allows the MATLAB application to be run outside the MATLAB environment.This architecture significantly reduces application development time by eliminating the need to manually translate the code into a different language.When building a standalone application, MATLAB Compiler produces an executable for end users.If needed to integrate into C or C++, MATLAB Compiler provides an interface to use the code as a shared library.Also if integration into other development languages is needed, MATLAB builder products pack MATLAB applications as software components, such as Java™ classes, .NET components, or Excel add-ins, for use within other applications.The graphical Deployment Tool could be used to package and encrypt your code.

B: The Basic Software Concept:
The input of the software is the scanned image of different types of medical recordings which is acquired from the plotter of the mentioned devices and the output is the digitized signal.These images were acquired so that the evaluation of the software package could be implemented by the examiners.The software could be installed on to medical devices in order to increase cost efficiency we discussed former in the introduction.
The algorithm is presented in four different steps which we shall describe as the following: 1).Filtering and Grid Cancellation: The aim of this step is to cancel the background grid and any other noises from the image, to do so after the paper based record is scanned it is imported into the MATLAB command window.Now we use the "imfilter ()" function to cancel the grid.This function measures the correlation in the neighborhood of each pixel and using a threshold it cancels every pixel above that threshold, this procedure is implemented for the image entirely.

2). Image Binerization:
The outcome of the previous section is converted into the binary mode, this is done by the "IM2BW" function of MATLAB, this function converts the image into grayscale first and then using a threshold the image is converted into binaries the basic structure of this method had been proposed by Otsu.(Fraser RG, 1989) 3).Pixel to vector conversion: Now using the "FIND" command we extract all the pixels related to the signal and transfer it in to a 2D matrix.

4). Axis identification:
The most complex and difficult of the proposed algorithm is the axis identification stage, in this part there might be more than one y value available per x value, so we calculated the average of these values to obtain one y per x.Now that we have obtained 2D matrix which contains the location of the pixels related to the signal we shall map this matrix into our favorite one which defines the axis we had desired.
Though the number of the pixels in x vector is the same as time vector, mapping the vectors would not be hard.
On the other hand the pixels related to the y-vector are different from our desirable amplitude, therefore the transfer mapping is used to map the y-vector to our amplitude vector.

Software Algorithm
Our algorithm uses the function imread() to import the scanned image of the recording as the .jpegfile, then using the function im2bw turns it into a two phasic shape which helps delineate of the boundaries more precisely than using the function imcomplement.This process goes on, with defining suitable matrices and defining and measuring the scales and using the filter(), length(), and round () functions with appropriate loops and the outcomes are depicted using the subplot(), plot (), gridon() and imshow().The matrices constricted by the software could be easily exported to Excel medium.We have also developed a graphic interface package which makes the software friendlier and more convenient.

Results
Recordings were obtained from 10 patients with supratentorial tumor who were monitored postoperatively after elective craniotomy in Shohada Tajrish Hospital in 2007.The patients were between 15-55 years old, six men and four women.As mentioned ABP, ICP and TCD recordings were registered from 10 patients on post operative day 3-5, and then 10 second intervals were selected from each record by three expert examiners blinded for the trial and then data were registered on them on 50 consecutive points 0.2 s apart for each recording.
The average result for each point was compared with that read by the software for the points and finally the results were compared with paired t test to evaluate thief validity.The ICP values evaluated by the examiners ranged between 9-34 mmHg.
The maximal ICP for each patient was determined using ICP monitoring data.The average was 20.46 mm Hg.It ranged from 14 to 34 mmHg.The mode was 17 mm Hg and the median was 20 mm Hg.The standard deviation was 4.40 mm Hg.
The obtained results with our software for maximal ICP were as the followings: average= 20.43 mm Hg, range= 13.7-34.2mm Hg.Median =20.2 mm Hg and the mode= 16.8 mm Hg.The standard deviation was 4.42.
Comparing these results with clinical findings showed that the error is 0.031.
ICP monitoring of our patients showed that the minimum ICP ranged from 9-22 mm Hg.
Its average was 14 mm Hg and the median was 14 mm Hg.The mode was 13 mm Hg and finally the standard deviation was 3.77 mm Hg.
With the use of our software the range of minimum ICP of our patients was 8.2-22.1 mm Hg.The average was 13.8 mm Hg and the mode was 13 mm Hg.The standard deviation was 3.78 mm Hg.With the statistical comparison the error was 0.038.
According to ICP monitoring in our study the range of mean ICP for the patients was 10.66-25.33 mm Hg with the average of 16.80.The median was 15.99 mm Hg and the mode was 16.33 mm Hg and the standard deviation was 3.85.
With the use of the software the average of mean ICP for the patients was 16.82 with the range of 10.68-25.37 mm Hg.The median value was 15.89 mm Hg.The mode was 16.35 mm Hg and the standard deviation was 3.87 mm Hg.The statistical error was 0.039.
The results of measurement of the maximal velocity of the middle cerebral artery by TCD are as the followings: average=88.54mm Hg, range=28.4-228 mm Hg, median =73.1 mm Hg and mode was 55.8 mm Hg.The standard deviation was 45.40 mm Hg.
The statistical values for maximal MCA velocity using the software were as the following: average=88.56 mm Hg, range= 28.5-228 mm Hg.Median = 73.2mm Hg and the mode was 55.8 mm Hg, with the standard deviation of 55.3 mm Hg.The error was 0.046.
According to TCD study of minimum MCA velocity the average was 33.32 mm Hg, the range was 10.9-120.7 mm Hg.The median value was 26.6 mm Hg.And the mode was 15.8 mm Hg.The standard deviation was 25.213 mm Hg.
Use of the suggested software and measuring of the minimum velocity of MCA showed the following results: Average=33.31 mm Hg, and ranged from 10.8-120.5 mm Hg.The median level was 26.5 mm Hg.The mode was 15.7 mm Hg and the standard deviation was 25.24 mm Hg.According to statistical analysis the error was 0.048.
Measurement of the maximal ABP performed using conventional arterial catheters.
According to these studies the average of this variable was 115.83 mm Hg.It ranged from 83-159 mm Hg.The mode and the median values was 115 mm Hg.The standard deviation was 21.47 mm Hg.
Our digitization program showed that for maximal ABP, the average value was 115.81 mm Hg.The range varied from 82.9-158.8mm Hg.The median value and the mode were 114.8 mm Hg, and the standard deviation was 21.46 mm Hg.With statistical comparison the error was 0.029.
Minimum ABP studies using arterial line showed that it ranged from 43-93 mm Hg with the average of 69.53 mm Hg.The median was 65 mm Hg and the mode was 87 mm Hg.The value of standard deviation was 16.30 mm Hg.
According to our computerized software for digitization for minimum ABP variable the average was 69.54 mm Hg.And the range was 42.9-93.2mm Hg.The median was 64.9 mm Hg and the mode was 87.2 mmHg.The standard deviation was 16.29 mm Hg.Statistical comparison showed that the error was 0.021.
Comparison of the results performed by overlapping of the curves obtained for each variable by three different observers.After correction of the amplitude scale for each of the above variables, the curves based on clinical observations overlapped completely with the curve based on the data obtained by our software.(Fig 2-4).

Conclusion and Discussion
Data presentation and display deals with the machine-man interface, and relies on the use of vision and audition as the main interface sensory channels.Display itself may be accomplished either by visual presentation of the measured variables on a display screen (oscilloscope, cathode ray tube, etc.), or as "hard-copy" as a paper recording or print-out.(DeSimone DN, 1988;Goodman LA, 1986;Lymon J, 1961) In the early days of monitoring, analogue techniques were used to display both the source waveforms and any initial transformations.Oscilloscopes used either "bouncingball" or prolonged intensity or storage display techniques; meters such as voltmeters were fitted with appropriate scales to permit direct read-out of rates, pressures, and temperatures.Flashing light displays were often fed current varying in intensity with the variable being displayed, thus permitting an analogous visual presentation.(Lymon J, 1961;Benekn JEW, 1979) More recently, the emphasis has been on the use of digital technology regardless of whether the presentation is in "analogue" or "digital" form.(Christov II., 2000) Potential advantages of a computer-based over paper records are: legibility, data safety, confidentiality, flexible layout, integration with other information sources, data incorporation, continuous data-processing, assisted search, greater range of output methods and tailored output.(Fraser RG, 1989;Otsu N., 1979;DeSimone DN, 1988) Analogue to digital conversion is carried out with an analogue to digital converter (ADC).It is the ADC which converts the source analogue signal to a digital representation of the original.While there are many processes involved, and while many different types of ADC exist, the most important factors to be considered are the rate or frequency at which the conversion occurs and the degree of discrimination which is possible during the conversion process.(Goodman LA, 1986) Potential disadvantages of the current techniques of digitization of records are the need for structured and coded data, temptation to "stamp collect", and that layouts are not intuitive.They cause temptation to embellish data.Also there is a risk of loss of design control and flexibility and they mostly cause heavy costs and are also based on sophisticated and complicated hardware and software.(Benekn JEW, 1979;Hutton J., 1986;Weinstein MC, 1981;Dwyer Si III, 1982;Robinson J., 1988;Van Poppel BM, 1990).
In this study we introduced a new method for easy evaluation of many different analog based medical records.
We have proposed a new and simple computer based program which could be used as a clinical tool without laying a heavy cost burden on health care services.
According to our results the resultant curve for each tested parameter (mean, maximum and minimum ICP, maximum and minimum ABP, maximum and minimum MCA velocity by TCD) were completely compatible with the related curve obtained by our computerized digitization software.
In addition statistical analysis showed no difference between the results in clinical assays and the digitize results.(p value < 0.05 for all of the tested parameters) Our proposed software is based on a brief (80 line) computerized program which can be easily used by every simple PCs and Laptops.It is not only precise but also simple and user friendly.It eliminates the background grid and artifacts especially in TCD monitoring record which causes a very crowded display.
The unique feature of our study is that our proposed software is tested by several different measurements and the obtained results are compared statistically with the clinical results.In all of the tested parameters, the statistical error was less than 0.05 and this is the other prominent feature of our study that we used the clinician point of view to determine the most appropriate result.
Considering human observational error comparison of the clinical curves with the curves based on our computerized results were performed by three different observers.
Especially in TCD studies, for each time value, various points in the graph could be seen, and it is the expert clinician that can determine which one is the most appropriate result.
Many hospitals are now actively developing computer-based management information systems, with patient database technology replicating, if not replacing, the traditional hospital chart.Our proposed software with the capacity to link easily with wider database systems would be of great value to measure physiological variables in areas such as the operating room and the intensive care unit and the interested and informed physician can use these systems to the advantage of both himself and his patients.The revised curve for mean TCD of MCA velocity based on our software (below) step 2 implementation is shown above.If we assume figure1-A as part of a signal which the background grid is omitted, then figure2-Ais the pixel values of the image.As seen the diagonal of the pixel matrix is 1 which represents the line (signal) in figure1-A.finally figure1-Cis the binarized matrix of the original image, which all the other pixels are converted to zero and only the diagonal is remained the same.

Figure 2 .
Figure 2. The curve for ABP based on clinical observation (above)The revised curve for ABP based on our software (below)