next up previous contents index
Next: The Established Complications I Up: The Perl modules Previous: The Module's General Structure

The Patient Module

As just mentioned, the patient module -- like all other modules -- first analysis the command line, and determines the desired output formatgif. Then the needed information from the table diabetik   is extracted. The self-written function splitdb  splits one line of a dBASE  table into a list of its fields. The information is then stored in the hash of hashesgif diabet. For instance, diabet{4711}{geschl} contains the sex of patient 4711.

Next, the same procedure is done for the table progression (verlauf).   The last medication of each patient in each quarter and each year he has been treated in is stored in the hash of hashes pat. The information about a whole year is stored as its fifth quarter.

Thereafter the desired information is determined. This is done in two nested loops. The first one iterates over all periods of timegif, the second over all patientsgif}. In those loops the results are stored in the hash of lists erg -- again the according period of time is used as the hash's key. This is simply done by counting certain values of certain fieldsgif.

Last, but not least, the results are issued. The only calculations done in this part are the transformations of absolute values into percentages. The sort function in the loop condition is needed to display the results ordered the same way as by the graphical function of DPV .



Ingo Melzer
Mon Aug 5 15:12:01 MET DST 1996