Skip to content

Milestone #2

noaharaki edited this page Oct 16, 2023 · 14 revisions

System Description

An electronic health record system (EHR) is a secure and complete record of the health history of individuals. Despite investments of hundreds of millions of dollars, Canada still does not have any provincial or national EHR [1]. Instead, at least 15 separate EHR are commonly used by physicians. However, these systems do not often connect with one another. It is a common occurrence for health care providers to not have access to a patient's previous health history ahead of a visit.

The proposed system is a component of an EHR, which would aim to combine some common tasks in the healthcare industry to a cohesive system. Patients with a valid Canadian personal health number (PHN) would be able access the system virtually through a web browser. Patients would sign up for the system with their PHN by inputting some contact information and choosing a password. Doctors would be able to use a similar method to log into a doctor profile. Once into the system, users would have several features at their disposal. One main focus of the specific system is ease of access to medical professionals. Users would be able to view the availability of medical professionals available to them, such as their family doctor. They could use the system to book an appointment with a medical professional, which would then be tracked by their profile. The EHR would provide an appointment section where doctors or patients using the system could manage their future appointments. Users would be able to cancel or reschedule an appointment. If at any point a patient is referred to a specialist such as a dermatologist or neurologist, patients would also be able to book these visits using the described system. The system would also include a notification system. Users could be reminded about upcoming appointments, any referrals made, or any messages from doctors. From the doctor perspective, doctors will be able to view the health history of their patients. They would also be able to add entries to this health history, such as when diagnosing patients, or prescribing medication.

Component & Connector View

System Component Diagram

Microservice Descriptions

The system is comprised of three microservices: the Patient Profile, Appointments Manager, and Medical Professional Perspective. Each microservice is further expanded upon in the following sections along with their own component diagrams.

Patient Profile

The Patient Profile service handles patient registration and logins, and allows patients to see their health history and notifications. Below is the component diagram for this microservice, which displays the connections between core functions.

Patient Profile Component Diagram

Patients can see notifications, Health history, upcoming appointments, past appointments, and results from past appointments like referrals or prescriptions.

Provided APIs

HealthHistory - Given some identifier of a patient, provide the health history of the patient.
See API documentation here: https://app.swaggerhub.com/apis/OLUWATONIDAVID45/profile/1.0.0
note. the link may require an account with access to the api. The documentation can alternatively be viewed by opening this html file in a browser

Appointments

The Appointment microservice allows both patients and medical professionals to have access to their relevant appointment information. Below is the component diagram for this microservice, which displays the provided and required interfaces as well as the connections between core functions.

Appointment Component Diagram

This microservice facilitates appointment management by allowing for appointment scheduling, updates and deletion(limited to medical professionals), and access to view all upcoming and previous appointments. The list of appointments can be searched by patient or by professional, which allows specific patients to only be able to view and schedule appointments with their general practitioner or referred professionals.

Provided APIs

The following information can be obtained through the use of the API
Appointments management - Create/Read/Update/Delete current appointments
Appointment filtering - Filter appointments by doctor or patient id's
Doctor availability - Provide upcoming availabilities for a certain doctor
See API documentation here: https://appointment-service.onrender.com/swagger/
url for appointment endpoint here: https://appointment-service.onrender.com/appointments/

Medical Professional Perspective

The Medical Professional Perspective is the view of the system that medical professionals, such as doctors or nurses, would see when they sign in. Below is a component diagram illustrating the components that make up this microservice and the interfaces it provides and requires:

Medical Professional Component Diagram

This service allows medical professionals to see their profile where they can view notifications, see their patients profiles (including past appointments, prescriptions, diagnoses) through the required PatientProfile API, and also take notes on a patient and submit this to their profiles (such as prescribe medication to patients or diagnose patients) or update their medical history. Doctors are also able to refer patients by filling out a form using the Form Manager. Doctors can also submit the hours they work through the DoctorAvailability API, so that patients can see their availability and book an appointment.

Provided APIs

DoctorAvailability - This provides the work schedule per doctor. See API documentation here: https://app.swaggerhub.com/apis/OLUWATONIDAVID45/doctor-perspective/1.0.0
note. the link may require an account with access to the api. The documentation can alternatively be viewed by opening this html file in a browser

Use cases & Sequence Diagrams

(updated from milestone 1)

UC1
Use Case 1. Sign_In
history created 9/23/23 Noah Araki
Description Patient can sign in or sign up into the website using their PHN and contact information
Actors Patients (primary)
Assumptions Patient has a valid PHN and contact information
Steps 1. Patient opens a web browser
2. Patient goes to the website sign in page or login in page
3. Patient logins in using there email and password or input their PHN, DOB, contact information and create password into page sign up page to create account
Variations None
Issues How would someone login if they didn't have a valid PHN

Sequence Diagram for UC1:
UC1 Sequence Diagram

UC2
Use Case 2. View_Notifications
history created 9/23/23 Noah Araki
Description Patients are able to view notifications sent to them by doctors or nurses
Actors Patients (primary)
Assumptions Patients are able to sign in to their account and navigate to their notifications
Steps 1. Patient logins into the website through a web browser
2. Patient then navigates the website to find the notification bar
3. Patient then clicks each individual message to view them
Variations None
Issues What would a patient do if they didn't have a device to access the website

Sequence Diagram for UC2:
UC2 Sequence Diagram

UC3
Use Case 3. Doctors_Refer_Patients
history created 09/22/23 Sydney Macdonald
Description Doctors should be able to refer patients to another doctor or a specialist
Actors Doctor (primary)
Patient
Referred practitioner
Assumptions Doctor is signed into system and has access to patients medical and contact information
Steps 1. Doctor decides to refer patient
2. Doctor finds other practitioner or specialist in the system
3. Doctor fills out referral form
4.Form is sent to correct location
5. Referred practitioner receives the form
Variations #4 If patient is required to take the form to the referred practitioner, Doctor can print it for or send it to them or
If Doctor is required to send form to the referred practitioner, they can do so using the system
Issues How will referred practitioner receive form if it is sent through the system?

Sequence Diagram for UC3:
UC3 Sequence Diagram

UC4
Use Case 4. Patients_Schedule_Appointments
history created 09/23/23 Sydney Macdonald updated 10/09/23
Description Patients should be able to schedule appointments through the system
Actors Patient (primary)
Medical practitioner
Assumptions Patient is logged in with correct PHN and is actively seeing a doctor or has been referred to another practitioner
Steps 1. Patient locates schedule for doctor or referred practitioner
2. Patient chooses a date/time and appointment mode that works for them
3. Patient reserves date/time in system
4. Specified doctor is notified by system of new appointment
Variations #4. If appointment is virtual, system will provide phone number or video call link to referred practitioner and patient as necessary or
If appointment is in-person system will provide location to patient
Issues How does system notify doctor of appointment? How is patient given appointment details to confirm with or remind them?

Sequence Diagram for UC4:
UC4 Sequence Diagram

UC5
Use Case 5. Appointment_Modification
history created 10/09/23
Description Patients and doctors should be able to modify their appointments
Actors Patient or Doctor (primary)
Assumptions Patient or doctor is logged into their account and have one or more scheduled appointments
Steps 1. User navigates to appointment section of their profile
2. User chooses an appointment from the appointment list to modify
3. User then uses interface to either cancel or reschedule an appointment
4. Specified doctor is notified by system of new appointment
Variations #3. If doctor is user then upon cancelling an appointment, should provide the patient with an opportunity to choose a new time for the appointment or
If patient is user then if the patient cancels an appointment, they will have the opportunity to choose a new time using the appointment scheduler interface
Issues How to prevent users cancelling right before appointment? A policy may need to be implemented that only allows users to cancel appointments that are over some amount of hours in the future

Sequence Diagram for UC5:
UC5 Sequence Diagram

UC6
Use Case 6. Health_History
history created 10/09/23
Description Doctors are able to view the health history of their patients, as well as add entries to this history
Actors Practitioner (primary)
Patient
Assumptions The patient in question has a valid PHN which can be used to identify their health history. Doctor has legal access to view the health history of the patient. The doctor is logged into the system with a doctor profile
Steps 1. Doctor chooses a patient who they care for
2. Doctor can then see a page showing the health history of this patient
3. Doctor can add an entry to the health history including prescriptions and diagnoses
4. The new entry is then added to the patients health history as well as a timestamp of when this entry was added
Variations #3. Doctor can choose to close the health history page without adding any entries
Issues How to confirm which doctors have access to which patients health history

Sequence Diagram for UC6:
UC6 Sequence Diagram

Allocation View

Deployment of Profile Microservice

Patient Profile Deployment Diagram

Deployment of Appointment Microservice

Appointment Deployment Diagram
We built this microservice with the Django framework, using Postgres for our database, which we deployed using Render.

The skeleton microservice can be seen in the following links:
https://appointment-service.onrender.com/appointments/
https://appointment-service.onrender.com/swagger/
https://github.com/jack-klob/AppointmentService

Deployment of Medical Professional Microservice

Medical Professional Deployment Diagram

We built this microservice using Next.js and deployed it using Cloudflare Pages.

The Medical Professional API is deployed here: https://project-m1-team10.pages.dev/api/doctoravailability/2

Team Responsibility

Microservice Team Members
Patient Profile Noah Araki, Tyler Le
Appointments Saxon Forster, Jack Klobchar
Medical Professional Perspective Oluwatoni David, Sydney Macdonald

Contributions

Name Contributions
Jack Klobchar UC5 sequence diagram, wrote and deployed appointment microservice. Update use cases and system description from milestone #1
Sydney Macdonald UC3 sequence diagram, system C&C diagram, medical professional component diagram and description, medical professional deployment diagram, medical professional api documentation, edit profile api documentation and add description to wiki
Saxon Forster UC4 Sequence Diagram, Appointment Component Diagram and description, Appointment Deployment Diagram and description, Appointment Swaggerhub API documentation
Tyler Le UC1 Sequence Diagram, deployed login microservice, worked on component diagram, and API documentation as well as interface.
Oluwatoni David UC6 Sequence diagram, helped write and deploy medical professional microservice, helped setup SwaggerHub project and write medical professional api documentation
Noah araki UC2 Sequence Diagram, worked on the profile microservice