feat/action-report: adjust table structure

This commit is contained in:
2025-12-01 18:49:54 +07:00
parent b65c86750a
commit 47d2e427c0
4 changed files with 18 additions and 6 deletions
@@ -2,23 +2,29 @@ package actionreport
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
eem "simrs-vx/internal/domain/main-entities/employee"
ee "simrs-vx/internal/domain/main-entities/encounter"
en "simrs-vx/internal/domain/main-entities/nurse"
"time"
)
type ActionReport struct {
ecore.Main // adjust this according to the needs
Encounter_Id uint64 `json:"encounter_id" gorm:"foreignKey"`
Encounter *ee.Encounter `json:"doctor,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Date *time.Time `json:"date" gorm:"not null;size:20"`
Doctor_Code string `json:"doctor_code" gorm:"size:10"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Operator_Employe_Id uint `json:"operator_employe_id"`
Operator_Employe *eem.Employee `json:"operator_employe,omitempty" gorm:"foreignKey:Operator_Employe_Id;references:Id"`
Assistant_Employe_Id uint `json:"assistant_employe_id"`
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
Instrumentor_Employe *eem.Employee `json:"instrumentor_employe,omitempty" gorm:"foreignKey:Instrumentor_Employe_Id;references:Id"`
Diagnose *string `json:"diagnose" gorm:"size:1024"`
Nurse_Code string `json:"nurse_code" gorm:"size:10"`
Value string `json:"value"`
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
Value string `json:"value"`
// SurgerySize_Code *string `json:"surgerySize_code" gorm:"size:10"`
// Billing_Code *string `json:"billing_code" gorm:"size:10"`
// SurgerySystem_Code *string `json:"surgerySystem_code" gorm:"size:10"`