repo

package
v0.0.0-...-99d0739 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewConversation

func AddNewConversation(ctx context.Context, accID1, accID2 int64) error

func CheckConversationExists

func CheckConversationExists(ctx context.Context, accID1, accID2 int64) error

func CheckEmailAndCitizenID

func CheckEmailAndCitizenID(ctx context.Context, req models.AccountRecoverRequest) error

func CheckPrescriptionExists

func CheckPrescriptionExists(ctx context.Context, prescriptionID string) error

func CloseDBConnect

func CloseDBConnect()

func ComfirmReceivingPrescription

func ComfirmReceivingPrescription(ctx context.Context, prescriptionID string) error

func ConnectToDB

func ConnectToDB(ctx context.Context, connString string) error

func CreateSchedule

func CreateSchedule(ctx context.Context, req models.ScheduleBookingRequest, queue_number int, accID string) (models.ScheduleBookingResponse, error)

func DeletePrescriptionDetail

func DeletePrescriptionDetail(ctx context.Context, prescriptionID, medID string) error

func DeleteRecordAttachment

func DeleteRecordAttachment(ctx context.Context, recordID, prefix string, req models.DeleteRecordAttachmentRequest) error

func GetAccIDByCitizenID

func GetAccIDByCitizenID(ctx context.Context, citizenID string) (int, error)

func GetAccIDByPatientID

func GetAccIDByPatientID(ctx context.Context, patientID int) (int64, error)

func GetAccountInfo

func GetAccountInfo(ctx context.Context, accID string) (models.AccountInfo, error)

func GetAccountList

func GetAccountList(ctx context.Context) ([]models.AccountInfo, error)

func GetConversationList

func GetConversationList(ctx context.Context, accID string) ([]models.Conversation, error)

func GetConversationMessage

func GetConversationMessage(ctx context.Context, conversationID string) ([]models.Message, error)

func GetDiagnosisInfo

func GetDiagnosisInfo(ctx context.Context, icdCode string) (models.DiagnosisInfo, error)

func GetDiagnosisList

func GetDiagnosisList(ctx context.Context) ([]models.DiagnosisInfo, error)

func GetDoctorList

func GetDoctorList(ctx context.Context) ([]int64, error)

func GetMedicalRecordInfo

func GetMedicalRecordInfo(ctx context.Context, recordID string) (models.MedicalRecordInfo, error)

func GetMedicalRecordList

func GetMedicalRecordList(ctx context.Context, patientID int) ([]models.MedicalRecordBriefInfo, error)

func GetMedicalRecordType

func GetMedicalRecordType(ctx context.Context, typeID string) (models.MedicalRecordTypeInfo, error)

func GetMedicalRecordTypeByRecordID

func GetMedicalRecordTypeByRecordID(ctx context.Context, recordID string) (models.MedicalRecordTypeInfo, error)

func GetMedicalRecordTypeList

func GetMedicalRecordTypeList(ctx context.Context) ([]models.MedicalRecordType, error)

func GetMedicationInfo

func GetMedicationInfo(ctx context.Context, medicationID string) (models.MedicationInfo, error)

func GetMedicationList

func GetMedicationList(ctx context.Context) ([]models.MedicationInfo, error)

func GetNameByAccID

func GetNameByAccID(ctx context.Context, accID string) (string, error)

func GetPatientIDListByAccID

func GetPatientIDListByAccID(ctx context.Context, accID string) ([]int, error)

func GetPatientInfo

func GetPatientInfo(ctx context.Context, patientID string, accID string) (models.PatientInfo, error)

func GetPatientList

func GetPatientList(ctx context.Context, accID *string) ([]models.PatientBriefInfo, error)

func GetPrescriptionDetails

func GetPrescriptionDetails(ctx context.Context, prescriptionID string) ([]models.PrescriptionDetailInfo, error)

func GetPrescriptionIDListByAccID

func GetPrescriptionIDListByAccID(ctx context.Context, accID string) ([]int, error)

func GetPrescriptionInfoByRecordID

func GetPrescriptionInfoByRecordID(ctx context.Context, recordID int) (models.PrescriptionInfo, error)

func GetPrescriptionList

func GetPrescriptionList(ctx context.Context, recordIDList []int) ([]models.PrescriptionInfo, error)

func GetPrescriptionListByPatientID

func GetPrescriptionListByPatientID(ctx context.Context, patientID string) ([]models.PrescriptionInfo, error)

func GetQueueNumber

func GetQueueNumber(ctx context.Context, date time.Time) (int, error)

func GetRecordIDListByAccID

func GetRecordIDListByAccID(ctx context.Context, accID string) ([]int, error)

func GetRecordListByTime

func GetRecordListByTime(ctx context.Context, timestamp1, timestamp2 time.Time) ([]models.RecordInfoForStatistic, error)

func GetScheduleList

func GetScheduleList(ctx context.Context, patientID *string, req models.GetScheduleListRequest) ([]models.ScheduleInfo, error)

func GetStaffIDByAccID

func GetStaffIDByAccID(ctx context.Context, accID string) (int, error)

func GetStaffInfo

func GetStaffInfo(ctx context.Context, staffID string, accID string) (models.StaffInfo, error)

func GetStaffList

func GetStaffList(ctx context.Context) ([]models.StaffInfo, error)

func StoreAccountInfo

func StoreAccountInfo(ctx context.Context, req models.AccountRegistrationRequest, password_hash string) (int, error)

func StoreMedicalRecordAttachments

func StoreMedicalRecordAttachments(ctx context.Context, recordID string, attachments []*multipart.FileHeader, attType string) error

func StoreMessage

func StoreMessage(ctx context.Context, message models.NewMessage, senderAccID string) (models.Message, error)

func StorePrescriptionDetails

func StorePrescriptionDetails(ctx context.Context, prescriptionID string, details []models.PrescriptionDetailInfo) error

func UpdateAccountInfo

func UpdateAccountInfo(ctx context.Context, accID string, req models.AccountInfoUpdateRequest) error

func UpdateConversationLastMessage

func UpdateConversationLastMessage(ctx context.Context, conversationID int64, lastMessageTime time.Time) error

func UpdateMedicalRecord

func UpdateMedicalRecord(ctx context.Context, recordID string, newDetail models.UpdateMedicalRecordRequest, additionalInfo models.ExtractedRecordInfo) error

func UpdateMessageSeenStatus

func UpdateMessageSeenStatus(ctx context.Context, conversationID int64, partnerAccID int64, readTime time.Time) error

func UpdatePassword

func UpdatePassword(ctx context.Context, accID, newPassword string) error

func UpdatePatientInfo

func UpdatePatientInfo(ctx context.Context, patientID string, req models.PatientInfoUpdateRequest) error

func UpdatePrescription

func UpdatePrescription(ctx context.Context, prescriptionID string, req models.PrescriptionUpdateRequest) error

func UpdatePrescriptionDetail

func UpdatePrescriptionDetail(ctx context.Context, prescriptionID, medID string, detail models.PrescriptionDetailInfo) error

func UpdateStaffInfo

func UpdateStaffInfo(ctx context.Context, staffID string, req models.StaffInfoUpdateRequest) error

Types

type Credentials

type Credentials struct {
	AccID        string `json:"acc_id" db:"acc_id"`
	PasswordHash string `json:"password_hash" db:"password_hash"`
	Role         string `json:"role" db:"role"`
}

func GetAccountCredentials

func GetAccountCredentials(ctx context.Context, accIdentifier string) (Credentials, error)

Jump to

Keyboard shortcuts

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