34 lines
1.4 KiB
Go
34 lines
1.4 KiB
Go
package mcuorder
|
|
|
|
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"
|
|
|
|
ercl "simrs-vx/internal/domain/references/clinical"
|
|
erc "simrs-vx/internal/domain/references/common"
|
|
)
|
|
|
|
type McuOrder 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"`
|
|
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
|
|
Doctor_Id *uint `json:"doctor_id"`
|
|
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
|
SpecimenPickTime *time.Time `json:"specimenPickTime"`
|
|
ExaminationDate *time.Time `json:"examinationDate"`
|
|
Number uint8 `json:"number"`
|
|
Temperature float64 `json:"temperature"`
|
|
McuUrgencyLevel_Code ercl.McuUrgencyLevelCode `json:"mcuUrgencyLevel_code" gorm:"not null;size:15"`
|
|
}
|
|
|
|
func (d McuOrder) IsCompleted() bool {
|
|
return d.Status_Code == erc.DSCDone
|
|
}
|
|
|
|
func (d McuOrder) IsSameDoctor(doctor_id *uint) bool {
|
|
return d.Doctor_Id == doctor_id
|
|
}
|