又是一个头痛的作业。。。哎。
LABORATORY EXERCISE (Lab-III)Lab-III: Database Creation & Search
In this Project you will create a database using structures and write several
functions to search different types of data on this database.
The application data is text data comprising all the clinical information about
patients and drugs. In other words, you are going to create a library that is
useful for a medical practitioner!!
Create a global database for at least 15 patients– array of structures with
the following information.
- Name of the patient (format: Firstname X. lastname);
- Patient’s ID (random generated 4 digit number with the first two
letters as the first two characters of first and middle or last names);
- Separate structure identifying patient’s contact information;
- Doctor’s name who is attending this patient name (format: Firstname
X. lastname)
- Age of the patient (dd/mm/yyyy format)
- Separate structure to identify patient’s weight during the last three
consultations;
- Blood Group
Special structure capturing the following two items: - Allergic drugs
listing, regular drugs list and any Major disease(s) treated recently in
the last three years;
- Nature of complaint during the last visit to the hospital;
- Last visited date to the hospital;
Create a separate Structure for recording the current visit details of a
patient: Date of visit; weight of the patient, temperature; nature of the
complaint for this current visit; decision made (string input by the
doctor); drugs administered; next appointment date; Any other special
comments
2
With the above attributes, implement the following search functions. In
all these functions, a NIL must be displayed if no result is found.
(I) (a) A simple function to search by using Patient’s name; Display
the full record of the patient as stored; (b) Update the patient’s
record and display the particulars of the current visit;
(II) A simple function to search by disease and list the names of the
patients; Then allow the user to choose one patient from the
displayed list and display that patient’s record;
(III) A simple function to list all the patients attended by a specific
doctor;
Allow the user to interact with the system by looping continuously.
He/She will see his/her search results and then must be allowed to search
further again. Finally, he/she must be asked to confirm an “exit” to stop
interacting with the system.
You may choose to read in all the data to create the database from a text
file or manually enter.
只能用C 语言, VISUAL C。