feat/prescription: more flow on medicine
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
eit "simrs-vx/internal/domain/main-entities/item"
|
||||
emf "simrs-vx/internal/domain/main-entities/medicine-form"
|
||||
emg "simrs-vx/internal/domain/main-entities/medicine-group"
|
||||
emm "simrs-vx/internal/domain/main-entities/medicine-method"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
@@ -71,6 +72,8 @@ type ResponseDto struct {
|
||||
MedicineGroup *emg.MedicineGroup `json:"medicineGroup"`
|
||||
MedicineMethod_Code *string `json:"medicineMethod_code"`
|
||||
MedicineMethod *emm.MedicineMethod `json:"medicineMethod"`
|
||||
MedicineForm_Code *string `json:"medicineForm_code"`
|
||||
MedicineForm *emf.MedicineForm `json:"medicineForm"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Uom *eu.Uom `json:"uom"`
|
||||
Dose uint8 `json:"dose"`
|
||||
@@ -89,6 +92,8 @@ func (d Medicine) ToResponse() ResponseDto {
|
||||
MedicineGroup: d.MedicineGroup,
|
||||
MedicineMethod_Code: d.MedicineMethod_Code,
|
||||
MedicineMethod: d.MedicineMethod,
|
||||
MedicineForm_Code: d.MedicineForm_Code,
|
||||
MedicineForm: d.MedicineForm,
|
||||
Uom_Code: d.Uom_Code,
|
||||
Uom: d.Uom,
|
||||
Dose: d.Dose,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package medicine
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
e "simrs-vx/internal/domain/main-entities/medicine"
|
||||
|
||||
plh "simrs-vx/pkg/lib-helper"
|
||||
@@ -47,6 +48,7 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Me
|
||||
tx = dg.I
|
||||
}
|
||||
|
||||
fmt.Println(input.Includes)
|
||||
tx = tx.
|
||||
Model(&e.Medicine{}).
|
||||
Scopes(gh.Preload(input.Includes)).
|
||||
|
||||
Reference in New Issue
Block a user