Skip to content

Spring 2025 Documentation

Sreeja A edited this page May 17, 2025 · 8 revisions

Figma

Database Design

This section shows the organization of the database in the repository. This database helps with scheduling appointments and managing different profiles (Admin, User service/support, therapist, sponsor, patient, and parent). The different tables in the database and the relationships between them are shown below.

The tables:

  • User - Used to allow access to all users on the website
  • NonEmployee - Used to keep track of users who need to have more personal information (patients and parents)
  • PostCodeCity - Used to keep track of postal codes (collected on the contact form)
  • Patient - Used to manage patients (data collected from contact form; used for assigning appointments/therapists)
  • Specialization - Gives therapists different specializations (not enum since specializations need to be added over time)
  • Session - Used to manage appointments and sessions
  • SessionType - Used to store details about the session
  • SessionPatient - Assigns patients and therapists to sessions
  • MedicalRecord - Stores medical records for patients
  • Sponsor - Manages sponsors (they sponsor patients for insurance and other purposes)
  • Report - Stores progress reports for each patient
  • ReportData - Stores a question and answer (stored in progress report)
  • ContactForm - Stores more personal information from the contact form (patients and parents)

User

Column Description
id Primary Key
fName First Name
mInit Middle Initial (optional)
lName Last Name
email Email Address (optional)
phone Phone Number
whatsApp WhatsApp Profile (optional)
contactPref Preferred Contact (Three choices (from enum): email, phone number, or WhatsApp)
type Type of user (optional; Three choices (from enum): therapist, user services or admin)
Specializations List of therapy specializations (optional; references Specialization table)
Sessions List of sessions (references Session table)
NonEmployee More personal details (optional; references NonEmployee table)

NonEmployee

Column Description
id Primary Key
User Stores basic information (reference to User.id)
dob Date of birth (MM/DD/YYYY)
gender Gender (Three choices (from enum): female, male, and other)
streetName Street Name of Address
streetNum Street Number of Address
buildingNum Building number of Address (optional)
PostCode Postal Code of Address
PostCodeCity Stores the city and postal code (references PostCodeCity.postCode)
Children List of children who are patients (if the user is a parent; references Patient table)
Patient More personal details for patients (optional; references Patient table)

PostCodeCity

Column Description
postCode Primary Key; Postal Code
city City of the Address
person List of users with this Postal Code (references NonEmployee table)

Patient

Column Description
id Primary Key
User Stores other information (reference to NonEmployee.id)
identification ID number/information for the Dominican Republic
diagnosed Is the patient diagnosed with Autism or not?
Appointments List of appointments for the patient (references SessionPatient table)
MedicalRecords List of medical records for the patient (references MedicalRecords table)
ProgressReports List of Progress Reports for the patient (references Report table)
ContactForm Stores more data from the ContactForm (optional; references ContactForm table)
sponsorId ID of the sponsor (optional)
Sponsor The details of the sponsor (optional; reference to Sponsor.id)
Parents Parents of the patient (references NonEmployee table)

Specialization

Column Description
id Primary Key
name Name of specialization
Therapists List of therapists with this specialization (references User table)

Session

Column Description
id Primary Key
time Time when the Session is scheduled
duration Duration of the Session
comment Comments made during the session (optional)
maxAttendance Maximum number of patients in the session
typeId ID of Session Type
Type Session Type details (reference to SessionType.id)
therapistId ID of the therapist of the Session
Therapist Therapist details (reference to User.id)
Patients Patients in the session (references SessionPatient table)

SessionType

Column Description
id Primary Key
name Name of Session
color Color of the session block on calendar view
Sessions List of Sessions with this Session Type (references Session table)

SessionPatient

Column Description
sessionId ID of session
Session Session that has the patient (reference to Session.id)
patientId ID of the patient of the Session
Patient Patient details (reference to Patient.id)
paid Did the user pay their dues?

MedicalRecord

Column Description
id Primary Key
data The medical record data
patientId ID of the patient
Patient Patient details (reference to Patient.id)

Sponsor

Column Description
id Primary Key
name The name of the sponsor
contact Contact Details of the sponsor
Patients List of patients with this sponsor (references Patient table)

Report

Column Description
id Primary Key
date Date of the Progress Report
patientId ID of the patient of the Report
Patient Patient details (reference to Patient.id)
Questions Content of the Progress Report (references the ReportData table)

ReportData

Column Description
reportId Primary Key
Report Progress report with the questions (reference to Report.id)
question A question on the Progress Report
answer An answer to the same question on the Progress Report

ContactForm

Column Description
id Primary Key
nationality Nationality of Patient
returnPatient Is the patient a returning patient?
wantsEval Does the patient want a diagnostic evaluation?
insurance Insurance of patient (Several options (from enum))
comment Comments made by the patient on the contact form (optional)
status Status of the application (Three options (from enum): processing, scheduling, and completed)
patientId ID of the patient of the ContactForm
Patient Patient details (reference to Patient.id)

Entity-Relationship (ER) Diagram

This diagram shows in visual detail the relationships between each table and the organization of the data. manos-db-s2025

Created By: Sreeja Amaresam and Emory Grubbs

Clone this wiki locally