patient

package
v1.0.68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 (s *PatientService) GetPatients(request http.Request, search string) (paginate.Page, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL