on going chemo plan

This commit is contained in:
vanilia
2025-12-06 03:58:03 +07:00
85 changed files with 2940 additions and 1320 deletions

No files matched your search

@@ -17,7 +17,7 @@ import (
"gorm.io/gorm"
)
const source = "division"
const source = "chemo"
func Create(input e.CreateDto) (*d.Data, error) {
data := e.Chemo{}
@@ -309,10 +309,12 @@ func Verify(input e.VerifyDto) (*d.Data, error) {
}
data.VerifiedAt = pu.GetTimeNow()
data.Status_Code = input.Status_Code
data.Status_Code = erc.DVCVerified
data.VerifiedBy_User_Id = &input.AuthInfo.User_Id
data.Bed = input.Bed
data.Needs = input.Needs
data.Doctor_Code = input.Doctor_Code
data.NextChemoDate = input.NextChemoDate
err = tx.Save(&data).Error
if err != nil {
@@ -331,7 +333,6 @@ func Verify(input e.VerifyDto) (*d.Data, error) {
})
if err != nil {
return nil, err
}
return &d.Data{
+3 -1
View File
@@ -81,7 +81,9 @@ func ReadDetailData(input e.ReadDetailDto, event *pl.Event, dbx ...*gorm.DB) (*e
tx = dg.I
}
if err := tx.First(&data, input.Id).Error; err != nil {
if err := tx.
Scopes(gh.Preload(input.Includes)).
First(&data, input.Id).Error; err != nil {
if processedErr := pu.HandleReadError(err, event, source, input.Id, data); processedErr != nil {
return nil, processedErr
}