feat (prescription-item, medicine-mix, medication-item): adjust field, calculate qty
This commit is contained in:
No files matched your search
@@ -20,7 +20,6 @@ type CreateDto struct {
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
Note *string `json:"note" gorm:"size:1024"`
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Uom_Code *string `json:"uom_code" validate:"maxLength=10"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Name string `json:"name"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -40,12 +42,14 @@ type MetaDto struct {
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Name string `json:"name"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
MixItems []*emmi.MedicineMixItem `json:"mixItems"`
|
||||
}
|
||||
|
||||
func (d MedicineMix) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Name: d.Name,
|
||||
Uom_Code: d.Uom_Code,
|
||||
MixItems: d.MixItems,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
|
||||
@@ -15,10 +15,11 @@ type CreateDto struct {
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Frequency *uint16 `json:"frequency"`
|
||||
Dose float64 `json:"dose"`
|
||||
Usage float64 `json:"usage"`
|
||||
Usage string `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IntervalMultiplier *uint16 `json:"intervalMultiplier"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
|
||||
Reference in New Issue
Block a user