Skip to content

fwury/clinic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patient Vitals Monitoring System

This Java program processes raw vitals data from patients (including heart rate, blood pressure, temperature, and respiratory rate) and identifies any measurements outside of normal medical ranges for their age and sex. It generates a report listing patients sorted by the number of alerts, allowing clinicians to prioritize follow-up care.

UML Diagram

UML Diagram

Input Format

The input file must be a plain text file with the following structure:

Patient Registrations

PATIENT,<ID>,<Name>,<Sex (M, F, or X)>,<Date of Birth (YYYY-MM-DD)>

Example:

PATIENT,6518309427,Grace Li,F,1999-06-20

Vitals Records

RECORD,<ID>,<Date (YYYY-MM-DD)>,<Heart Rate>,<Systolic/Diastolic Blood Pressure>,<Temperature (in celsius)>,<Respiratory Rate>

Example:

RECORD,6518309427,2025-04-10,101,136/86,37.7,18

Prompt

The input file for the program can be generated by providing the following prompt to ChatGPT:

Generate input data for a clinical patient vitals monitoring program. The data must include:

1. A list of approximately 20 patients. Each patient must be registered with the following format (each on its own line):

PATIENT,<ID>,<Name>,<Sex (M, F, or X)>,<Date of Birth (YYYY-MM-DD)>

Example: PATIENT,6518309427,Grace Li,F,1999-06-20

The IDs must be unique and exactly 10 digits.
The names should be realistic and culturally diverse. They may or may not include a middle name.
The dates of birth should reflect a realistic range of ages, including children, adolescents, adults, and seniors.
Ensure a mix of male and female patients.

2. After the patient registrations, include a series of chronologically ordered vitals records for each patient. Each patient should have between 1 and 5 vitals records spanning a realistic range of time. Each line must follow this format:

RECORD,<ID>,<Date (YYYY-MM-DD)>,<Heart Rate (integer)>,<Systolic/Diastolic Blood Pressure (integer/integer)>,<Temperature (with one decimal place)>,<Respiratory Rate (integer)>

Example: RECORD,6518309427,2025-04-10,101,136/86,37.7,18

The ID must match one of the patient IDs defined previously.
The vital values should include a realistic mix of normal and abnormal readings.
All vitals records across all patients must be globally ordered by date—i.e., the final list must reflect the actual chronological order in which visits occurred, regardless of which patient they belong to.

3. Ensure the final output follows all of the above instructions.

Do not include explanations or headings—just the raw data.

Output Format

The program generates a plain text file listing patients sorted in descending order by the number of alerts:

Patient: <Name> (<ID>)
Sex: <Sex (M or F)>
Age: <Age> (<Date of Birth (YYYY-MM-DD)>)

-- Alerts --
<Date> [<Vital Sign>] <Alert Description> (<Measured Value>)

If the patient has no alerts:

-- Alerts --
No alerts.

Example:

Patient: Grace Li (6518309427)
Sex: F
Age: 25 (1999-06-20)

-- Alerts --
2025-02-01 [Heart Rate] Tachycardia (105 bpm)
2025-02-01 [Blood Pressure] Possible hypertension stage 1 (138/88 mmHg)
2025-02-01 [Temperature] Moderate fever (38.0 °C)
2025-04-10 [Heart Rate] Tachycardia (101 bpm)
2025-04-10 [Blood Pressure] Possible hypertension stage 1 (136/86 mmHg)

Possible Extensions

  • Add support for additional vitals like oxygen saturation
  • Introduce patient risk scoring based on vital signs

Disclosure of AI Usage

This program incorporated assistance from ChatGPT (GPT-4.0) during its development process. Specifically, AI was used for the following purposes:

  • Editing of Javadocs for consistency, clarity, and adherence to documentation standards
  • Debugging support, including help identifying logic errors and syntax issues
  • Guidance on exception handling with try-catch blocks and the java.time package
  • Assistance with implementing merge sort

About

Patient Vitals Monitoring System (Cumulative Summative Project for ICS4U)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages