feat/action-report: new migration
This commit is contained in:
@@ -3,20 +3,21 @@ package actionreport
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"time"
|
||||
|
||||
pa "simrs-vx/internal/lib/auth"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint64 `json:"encounter_id"`
|
||||
Date string `json:"date"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Operator_Employe_Id *uint `json:"operator_employe_id"`
|
||||
Assistant_Employe_Id *uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id *uint `json:"instrumentor_employe_id"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Value string `json:"value"`
|
||||
Encounter_Id uint64 `json:"encounter_id" validate:"required"`
|
||||
Date *time.Time `json:"date" validate:"required"`
|
||||
Doctor_Code string `json:"doctor_code" validate:"required"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id" validate:"required"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id" validate:"required"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id" validate:"required"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Code string `json:"nurse_code" validate:"required"`
|
||||
Value string `json:"value" validate:"required"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
@@ -54,13 +55,13 @@ type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id uint64 `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Date string `json:"date"`
|
||||
Date *time.Time `json:"date"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Operator_Employe_Id *uint `json:"operator_employe_id"`
|
||||
Assistant_Employe_Id *uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id *uint `json:"instrumentor_employe_id"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Nurse_Code string `json:"nurse_code"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
|
||||
@@ -3,20 +3,20 @@ package actionreport
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"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"`
|
||||
Date string `json:"date" gorm:"not null;size:20"`
|
||||
Date *time.Time `json:"date" gorm:"not null;size:20"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"size:10"`
|
||||
Operator_Employe_Id *uint `json:"operator_employe_id"`
|
||||
Assistant_Employe_Id *uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id *uint `json:"instrumentor_employe_id"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
|
||||
Diagnose *string `json:"diagnose" gorm:"size:1024"`
|
||||
Procedures *string `json:"procedures" gorm:"size:10240"`
|
||||
Nurse_Code *string `json:"nurse_code" gorm:"size:10"`
|
||||
Nurse_Code string `json:"nurse_code" gorm:"size:10"`
|
||||
|
||||
Value string `json:"value"`
|
||||
// SurgerySize_Code *string `json:"surgerySize_code" gorm:"size:10"`
|
||||
|
||||
Reference in New Issue
Block a user