appointment

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppointmentService

type AppointmentService struct {
	// contains filtered or unexported fields
}

func NewAppointmentService

func NewAppointmentService(db *gorm.DB, ctx *context.ERPContext) *AppointmentService

NewAppointmentService creates a new instance of AppointmentService with the specified database connection and ERP context. It initializes the service to handle operations related to medical appointments.

func (*AppointmentService) CreateAppointment

func (s *AppointmentService) CreateAppointment(appointment *models.MedicalAppointmentModel) error

CreateAppointment creates a new medical appointment for a patient in the database. It takes a pointer to a MedicalAppointmentModel as an argument and returns an error if the creation fails.

func (*AppointmentService) GetAppointmentsByHealthFacilityID

func (s *AppointmentService) GetAppointmentsByHealthFacilityID(facilityID string) ([]models.MedicalAppointmentModel, error)

GetAppointmentsByHealthFacilityID retrieves a list of medical appointments associated with the specified health facility ID. It performs a join operation with the sub_facilities table to filter appointments based on the facility's ID. The function returns a slice of MedicalAppointmentModel and an error if the retrieval fails.

func (*AppointmentService) GetAppointmentsByPatientID

func (s *AppointmentService) GetAppointmentsByPatientID(patientID string) ([]models.MedicalAppointmentModel, error)

GetAppointmentsByPatientID retrieves a list of medical appointments for a patient with the specified ID from the database. It takes a string argument representing the patient ID and returns a slice of MedicalAppointmentModel and an error. If the retrieval fails, it returns an error.

func (*AppointmentService) GetAppointmentsBySubFacilityID

func (s *AppointmentService) GetAppointmentsBySubFacilityID(subFacilityID string) ([]models.MedicalAppointmentModel, error)

GetAppointmentsBySubFacilityID retrieves a list of medical appointments associated with the specified sub-facility ID. It takes a string argument representing the sub-facility ID and returns a slice of MedicalAppointmentModel and an error. If the retrieval fails, it returns an error.

Jump to

Keyboard shortcuts

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