Documentation
¶
Index ¶
- type PatientService
- func (s *PatientService) CreatePatient(patient *models.PatientModel) error
- func (s *PatientService) DeletePatient(ID string) error
- func (s *PatientService) GetPatientByID(ID string) (*models.PatientModel, error)
- func (s *PatientService) GetPatientByPhoneNumber(phoneNumber string) (*models.PatientModel, error)
- func (s *PatientService) GetPatients(request http.Request, search string) (paginate.Page, error)
- func (s *PatientService) UpdatePatient(patient *models.PatientModel) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PatientService ¶
type PatientService struct {
// contains filtered or unexported fields
}
func NewPatientService ¶
func NewPatientService(db *gorm.DB, ctx *context.ERPContext) *PatientService
func (*PatientService) CreatePatient ¶ added in v1.0.46
func (s *PatientService) CreatePatient(patient *models.PatientModel) error
CreatePatient creates a new patient in the database.
It takes a pointer to a PatientModel as an argument and returns an error if the creation fails.
func (*PatientService) DeletePatient ¶ added in v1.0.46
func (s *PatientService) DeletePatient(ID string) error
DeletePatient deletes a patient from the database.
It takes a string argument representing the patient ID and returns an error if the deletion fails.
func (*PatientService) GetPatientByID ¶ added in v1.0.46
func (s *PatientService) GetPatientByID(ID string) (*models.PatientModel, error)
GetPatientByID retrieves a patient by its ID from the database.
It takes a string argument representing the patient ID and returns a pointer to a PatientModel and an error. If the retrieval fails, it returns an error.
func (*PatientService) GetPatientByPhoneNumber ¶ added in v1.0.56
func (s *PatientService) GetPatientByPhoneNumber(phoneNumber string) (*models.PatientModel, error)
GetPatientByPhoneNumber retrieves a patient by their phone number from the database.
It takes a string argument representing the patient's phone number and returns a pointer to a PatientModel and an error. If the retrieval fails, it returns an error.
func (*PatientService) GetPatients ¶ added in v1.0.64
func (*PatientService) UpdatePatient ¶ added in v1.0.46
func (s *PatientService) UpdatePatient(patient *models.PatientModel) error
UpdatePatient updates a patient in the database.
It takes a pointer to a PatientModel as an argument and returns an error if the update fails.