Using the files in MEDDB.tgz build a small web based hospital information system.
You system should contain the following components:
The files in MEDDB.tgz consist of several tables of data randomly generated. These all have names in caps. Other files are source files used for the tables and mumps programs which actually generated the tables case there is a need to re-do some of the data. All the files assume the name of your database in 'medical' (you can change this if you want). Note: all values are random and the names were composed from random first and last names found in an online phone book. The main files are:
use medical; drop table labs; create table labs (ptid char(10), test_date date, test_time time, test int, result int); insert into labs values ( '101000', '1978-6-6', '03:30', 411, 58 ); insert into labs values ( '102000', '1967-7-21', '02:51', 394, 28 ); insert into labs values ( '103000', '1989-1-7', '04:03', 374, 20 ); insert into labs values ( '104000', '1982-11-10', '19:22', 149, 1 ); insert into labs values ( '105000', '1955-6-21', '22:44', 180, 96 );
This is a table of patient ids, test dates, times, test codes and results.
use medical; drop table labtab; create table labtab (test_code int, test_name varchar(100), low int, high int); insert into labtab values ( 1, '5-HIAA', 6, 76 ); insert into labtab values ( 2, '5-Hydroxyindoleacetic Acid', 8, 83 ); insert into labtab values ( 3, '5-Hydroxytryptamine', 2, 55 ); insert into labtab values ( 4, '17-Hydroxyprogesterone', 37, 84 ); insert into labtab values ( 5, '18-Hydroxycorticosterone', 20, 86 );
This is a table of lab test codes, lab test names along with low and high limits for the results.
use medical; drop table medadmin; create table medadmin ( ptid char(10), med int, dose int, admin_date date, admin_time time); insert into medadmin values ( '101000', 209, 186, '1951-6-19', '20:51'); insert into medadmin values ( '102000', 12, 5, '1956-11-19', '18:29'); insert into medadmin values ( '103000', 118, 36, '1985-7-16', '11:00'); insert into medadmin values ( '104000', 151, 132, '1988-11-17', '05:52'); insert into medadmin values ( '105000', 55, 188, '1990-1-26', '15:49');
which gives patiend ids, medicine code, amount of dose, and date administered and time administered.
use medical; drop table medtab; create table medtab (mcode int, med varchar(100), lowdose int, highdose int); insert into medtab values ( 10000, 'ACEPROMAZINE', 16, 44); insert into medtab values ( 10001, 'ACTIGALL', 18, 66); insert into medtab values ( 10002, 'ADEQUAN', 17, 63); insert into medtab values ( 10003, 'ADRIAMYCIN', 10, 77); insert into medtab values ( 10004, 'ADVANTAGE', 14, 92);
which lists the medicine codes, medicine, low dosage and high dosage.
PATIENTID with contents such as:
use medical; drop table patientid; create table patientid (ptid char(10), entry_date date, entry_time time, name varchar(100), prefix char(3), suffix char(3), street varchar (100), city_state varchar(100), zip char(5), tel char(20) ); insert into patientid values ( '101000', '1985-11-6', '12:29', 'Zane Wible', 'Ms.', NULL, '327 Cotton Lane ', 'South River, Ontario', '41672', '(612) 513-2036' ); insert into patientid values ( '102000', '1974-1-25', '11:44', 'Richmal Callison', 'Mr.', 'Sr.', '817 Willow Lane Apt 44', 'Nevada City, California', '58383', '(430) 908-1841' );
which gives patient ids, names, addresses and telephone numbers for patients.
use medical; drop table physicians; create table physicians ( pcode int, pname varchar(100) ); insert into physicians values ( 1, 'Driskoll Goodman' ); insert into physicians values ( 2, 'Mable Schreckengost' ); insert into physicians values ( 3, 'Noelle West' ); insert into physicians values ( 4, 'Cameron Bynum' ); insert into physicians values ( 5, 'Roseanne Coughenour' );
which gives physician id codes and physician names (note: these names may overlap with patient names).
use medical; drop table problems; create table problems (ptid char(10), icd char(10), onset date, resolved date, dxphys int); insert into problems values ( '101000', '117', '1960-3-16', '1989-2-20', 909 ); insert into problems values ( '102000', '494', '1955-6-6', '1984-9-7', 29 ); insert into problems values ( '103000', '065', '1971-11-18', '1995-1-20', 421 ); insert into problems values ( '104000', '048', '1988-1-5', '1980-5-11', 702 ); insert into problems values ( '105000', '084', '1966-11-2', '1995-11-29', 847 );
which gives patiend ids, ICD disease/problem code, date of onset, resolution and diagnosing physician.
use medical; drop table probtab; create table probtab (icdcode int, dx varchar(100)); insert into probtab values ( 001, 'Cholera' ); insert into probtab values ( 002, 'Typhoid' ); insert into probtab values ( 003, 'Other' ); insert into probtab values ( 004, 'Shigellosis' ); insert into probtab values ( 005, 'Other' );
which gives ICD problem codes and text of diagnosis.
use medical; drop table vitals; create table vitals (ptid char(10), date_taken date, time_take time, systolic int, diastolic int, pulse int, respiration int, temperature int ); insert into vitals values ( '101000', '1969-3-1', '07:54', 51, 178, 116, 12, 98); insert into vitals values ( '102000', '1954-10-25', '03:13', 50, 180, 68, 10, 98); insert into vitals values ( '103000', '1992-9-13', '02:50', 64, 86, 117, 26, 104); insert into vitals values ( '104000', '1989-2-15', '18:15', 78, 114, 79, 22, 101); insert into vitals values ( '105000', '1979-2-18', '11:42', 97, 107, 96, 28, 101);
Giving vital signs for patients where systolic and diastolic refer to the upper and lower blood pressure values, respectively. Note: BP is high if systolic is > 140 and/or diastolic is greater than 90 or if (systolic+diastolic)/2+diastolic is greater than 106. temperature is high if greater than 99. Pulse is high if greater than 100.
Each of these is generated by a similarly named mumps script. You must install the current version of the mumps interpreter if you wish to run these. This will also require the C/C++ compiler, the PCRE (Perl Compatible Regular Expression) development libraries and autoconf.
Your system should include the following: