medical_record

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 MedicalRecordService

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

MedicalRecordService is the service for MedicalRecord model

func NewMedicalRecordService

func NewMedicalRecordService(db *gorm.DB, ctx *context.ERPContext) *MedicalRecordService

NewMedicalRecordService will create new MedicalRecordService

This method will create a new instance of MedicalRecordService with the given database connection and context.

func (*MedicalRecordService) CreateMedicalRecord

func (s *MedicalRecordService) CreateMedicalRecord(record *models.MedicalRecordModel) error

CreateMedicalRecord creates a new MedicalRecord in the database.

It takes a pointer to a MedicalRecordModel as an argument and returns an error if the creation fails.

func (*MedicalRecordService) DeleteMedicalRecord

func (s *MedicalRecordService) DeleteMedicalRecord(ID string) error

DeleteMedicalRecord deletes a MedicalRecord from the database.

It takes a string argument representing the ID of the MedicalRecord to be deleted and returns an error if the deletion fails.

func (*MedicalRecordService) GetMedicalRecordByID

func (s *MedicalRecordService) GetMedicalRecordByID(ID string) (*models.MedicalRecordModel, error)

GetMedicalRecordByID retrieves a MedicalRecord by its ID from the database.

It takes a string argument representing the ID of the MedicalRecord and returns a pointer to a MedicalRecordModel and an error. If the retrieval fails, it returns an error.

func (*MedicalRecordService) GetMedicalRecordByPatientID

func (s *MedicalRecordService) GetMedicalRecordByPatientID(patientID string) ([]models.MedicalRecordModel, error)

GetMedicalRecordByPatientID retrieves a list of MedicalRecords associated with the specified patient ID from the database.

It takes a string argument representing the patient ID and returns a slice of MedicalRecordModel and an error. If the retrieval fails, it returns an error.

func (*MedicalRecordService) UpdateMedicalRecord

func (s *MedicalRecordService) UpdateMedicalRecord(record *models.MedicalRecordModel) error

UpdateMedicalRecord updates a MedicalRecord in the database.

It takes a pointer to a MedicalRecordModel 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