Overview
ThePatientService is an Angular injectable service that manages patient information including personal details, medical history, appointments, and treatments. It provides methods to retrieve and add patient records.
Interfaces
PatientData
Represents a complete patient record with all associated information.Unique identifier for the patient
Full name of the patient
Age of the patient
Contact phone number
Email address
Physical address
Known medication allergies
Insurance or billing information
Current health status description
Family medical history
Date of last visit
Date of next appointment
Patient status (e.g., ‘activo’, ‘pendiente’, ‘urgente’)
Array of appointments associated with this patient
Array of treatments associated with this patient
Cita
Represents an appointment record.Tratamiento
Represents a treatment record for a patient.Methods
getPatients()
Retrieves all patient records.Array containing all patient records
getPatientById()
Retrieves a specific patient by their ID.The unique identifier of the patient to retrieve
The patient record if found, otherwise undefined
addPatient()
Adds a new patient to the system.Patient data object with the following properties:
first_name(string): Patient’s first namelast_name(string): Patient’s last nameedad(number): Agephone(string): Phone numberemail(string): Email addressaddress(string, optional): Physical addressmedication_allergies(string, optional): Known allergiesbilling_data(string, optional): Insurance informationhealth_status(string, optional): Current health statusfamily_history(string, optional): Family medical history