26 lines
856 B
Go
26 lines
856 B
Go
package prescription
|
|
|
|
import (
|
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
|
ed "simrs-vx/internal/domain/main-entities/doctor"
|
|
ee "simrs-vx/internal/domain/main-entities/encounter"
|
|
|
|
"time"
|
|
|
|
erc "simrs-vx/internal/domain/references/common"
|
|
)
|
|
|
|
type Prescription struct {
|
|
ecore.Main // adjust this according to the needs
|
|
Encounter_Id *uint `json:"encounter_id"`
|
|
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
|
Doctor_Id *uint `json:"doctor_id"`
|
|
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
|
IssuedAt *time.Time `json:"issuedAt"`
|
|
Status_Code erc.DataStatusCode `json:"status_code"`
|
|
}
|
|
|
|
func (d Prescription) IsApproved() bool {
|
|
return d.Status_Code == erc.DSCDone
|
|
}
|