Documentation ¶
Index ¶
- func CheckIfDoctorExists(client *mongo.Client, email, username string) (bool, error)
- func CheckIfPatientExists(client *mongo.Client, username, email string) (bool, error)
- func DeleteReportByID(client *mongo.Client, reportID primitive.ObjectID) error
- func InsertAppointment(client *mongo.Client, doctor DoctorUser, patient PatientUser, date time.Time) error
- func InsertDoctorUser(client *mongo.Client, patient *DoctorUser) error
- func InsertPatientUser(client *mongo.Client, patient *PatientUser) error
- func InsertReport(client *mongo.Client, report *Report) error
- type Appointment
- type DoctorUser
- type PatientAppointments
- type PatientUser
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfDoctorExists ¶
func CheckIfPatientExists ¶
func DeleteReportByID ¶
func InsertAppointment ¶
func InsertAppointment(client *mongo.Client, doctor DoctorUser, patient PatientUser, date time.Time) error
func InsertDoctorUser ¶
func InsertDoctorUser(client *mongo.Client, patient *DoctorUser) error
func InsertPatientUser ¶
func InsertPatientUser(client *mongo.Client, patient *PatientUser) error
Types ¶
type Appointment ¶
type Appointment struct { ID primitive.ObjectID `bson:"_id,omitempty"` DoctorID primitive.ObjectID `bson:"doctorID"` PatientID primitive.ObjectID `bson:"patientID"` AppointmentDate time.Time `bson:"appointmentDate"` }
func FetchFutureAppointments ¶
func FetchFutureAppointments(client *mongo.Client, patient *PatientUser, doctor *DoctorUser) ([]Appointment, error)
type DoctorUser ¶
type DoctorUser struct { ID primitive.ObjectID `bson:"_id,omitempty"` Email string `bson:"email"` FirstName string `bson:"firstName"` LastName string `bson:"lastName"` Username string `bson:"username"` Password string `bson:"password"` }
func FetchDoctorBy ¶
func FetchDoctorBy(client *mongo.Client, field, value string) (*DoctorUser, error)
func FetchDoctors ¶
func FetchDoctors(client *mongo.Client, start, end int) ([]DoctorUser, error)
func NewDoctorUser ¶
func NewDoctorUser(email, firstName, lastName, username, password string) *DoctorUser
type PatientAppointments ¶
type PatientAppointments struct { Patient *PatientUser Appointments []Appointment }
type PatientUser ¶
type PatientUser struct { ID primitive.ObjectID `bson:"_id,omitempty"` Email string `bson:"email"` FirstName string `bson:"firstName"` LastName string `bson:"lastName"` DOB time.Time `bson:"dob"` Gender string `bson:"gender,omitempty"` Username string `bson:"username"` Password string `bson:"password"` }
func FetchPatientExistsBy ¶
func FetchPatientExistsBy(client *mongo.Client, field, value string) (*PatientUser, error)
func FetchUniquePatientsFromAppointments ¶
func FetchUniquePatientsFromAppointments(client *mongo.Client, appointments []Appointment) ([]PatientUser, error)
func NewPatientUser ¶
func NewPatientUser(email, firstName, lastName string, dob time.Time, gender, username, password string) *PatientUser
Click to show internal directories.
Click to hide internal directories.