Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into feat/orders
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
type CreateDto struct {
|
||||
DeviceOrder_Id *uint `json:"deviceOrder_id"`
|
||||
Device_Id *uint `json:"device_id"`
|
||||
Count uint8 `json:"count"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -20,6 +21,7 @@ type ReadListDto struct {
|
||||
type FilterDto struct {
|
||||
DeviceOrder_Id *uint `json:"deviceOrder_id"`
|
||||
Device_Id *uint `json:"device_id"`
|
||||
Count uint8 `json:"count"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -50,6 +52,7 @@ type ResponseDto struct {
|
||||
DeviceOrder *edo.DeviceOrder `json:"deviceOrder,omitempty"`
|
||||
Device_Id *uint `json:"device_id"`
|
||||
Device *ed.Device `json:"device,omitempty"`
|
||||
Count uint8 `json:"count"`
|
||||
}
|
||||
|
||||
func (d DeviceOrderItem) ToResponse() ResponseDto {
|
||||
@@ -58,6 +61,7 @@ func (d DeviceOrderItem) ToResponse() ResponseDto {
|
||||
DeviceOrder: d.DeviceOrder,
|
||||
Device_Id: d.Device_Id,
|
||||
Device: d.Device,
|
||||
Count: d.Count,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -12,4 +12,5 @@ type DeviceOrderItem struct {
|
||||
DeviceOrder *edo.DeviceOrder `json:"deviceOrder,omitempty" gorm:"foreignKey:DeviceOrder_Id;references:Id"`
|
||||
Device_Id *uint `json:"device_id"`
|
||||
Device *ed.Device `json:"device,omitempty" gorm:"foreignKey:Device_Id;references:Id"`
|
||||
Count uint8 `json:"count"`
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@ package deviceorder
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -16,7 +18,8 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -43,14 +46,16 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d DeviceOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -3,10 +3,13 @@ package deviceorder
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type DeviceOrder struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@ package materialorder
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -16,7 +18,8 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -43,14 +46,16 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d MaterialOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -3,10 +3,13 @@ package materialorder
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type MaterialOrder struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ import (
|
||||
type CreateDto struct {
|
||||
MedicationItem_Id *uint `json:"medicationItem_id"`
|
||||
DateTime *time.Time `json:"dateTime"`
|
||||
Remain *uint `json:"remain"`
|
||||
Remain float64 `json:"remain"`
|
||||
Nurse_Id *uint `json:"nurse_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -21,7 +22,8 @@ type ReadListDto struct {
|
||||
type FilterDto struct {
|
||||
MedicationItem_Id *uint `json:"medicationItem_id"`
|
||||
DateTime *time.Time `json:"dateTime"`
|
||||
Remain *uint `json:"remain"`
|
||||
Remain float64 `json:"remain"`
|
||||
Nurse_Id *uint `json:"nurse_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -51,7 +53,8 @@ type ResponseDto struct {
|
||||
MedicationItem_Id *uint `json:"medicationItem_id"`
|
||||
MedicationItem *emi.MedicationItem `json:"medicationItem,omitempty"`
|
||||
DateTime *time.Time `json:"dateTime"`
|
||||
Remain *uint `json:"remain"`
|
||||
Remain float64 `json:"remain"`
|
||||
Nurse_Id *uint `json:"nurse_id"`
|
||||
}
|
||||
|
||||
func (d MedicationItemDist) ToResponse() ResponseDto {
|
||||
@@ -60,6 +63,7 @@ func (d MedicationItemDist) ToResponse() ResponseDto {
|
||||
MedicationItem: d.MedicationItem,
|
||||
DateTime: d.DateTime,
|
||||
Remain: d.Remain,
|
||||
Nurse_Id: d.Nurse_Id,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package medicationitem
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
emi "simrs-vx/internal/domain/main-entities/medication-item"
|
||||
"time"
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
)
|
||||
|
||||
type MedicationItemDist struct {
|
||||
@@ -11,5 +13,7 @@ type MedicationItemDist struct {
|
||||
MedicationItem_Id *uint `json:"medicationItem_id"`
|
||||
MedicationItem *emi.MedicationItem `json:"medicationItem,omitempty" gorm:"foreignKey:MedicationItem_Id;references:Id"`
|
||||
DateTime *time.Time `json:"dateTime"`
|
||||
Remain *uint `json:"remain"`
|
||||
Remain float64 `json:"remain"`
|
||||
Nurse_Id *uint `json:"nurse_id"`
|
||||
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Id;references:Id"`
|
||||
}
|
||||
|
||||
@@ -13,9 +13,10 @@ type CreateDto struct {
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -29,9 +30,10 @@ type FilterDto struct {
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -65,9 +67,10 @@ type ResponseDto struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
}
|
||||
|
||||
func (d MedicationItem) ToResponse() ResponseDto {
|
||||
@@ -82,6 +85,7 @@ func (d MedicationItem) ToResponse() ResponseDto {
|
||||
Usage: d.Usage,
|
||||
Interval: d.Interval,
|
||||
IntervalUnit_Code: d.IntervalUnit_Code,
|
||||
IsRedeemed: d.IsRedeemed,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -18,7 +18,8 @@ type MedicationItem struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty" gorm:"foreignKey:Medicine_Id;references:Id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty" gorm:"foreignKey:MedicineMix_Id;references:Id"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
}
|
||||
|
||||
@@ -4,13 +4,15 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
ep "simrs-vx/internal/domain/main-entities/pharmacist"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -20,9 +22,10 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -49,11 +52,12 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Pharmacist *ep.Pharmacist `json:"pharmacist,omitempty"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Pharmacist *ep.Pharmacist `json:"pharmacist,omitempty"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d Medication) ToResponse() ResponseDto {
|
||||
@@ -63,6 +67,7 @@ func (d Medication) ToResponse() ResponseDto {
|
||||
IssuedAt: d.IssuedAt,
|
||||
Pharmacist_Id: d.Pharmacist_Id,
|
||||
Pharmacist: d.Pharmacist,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -6,13 +6,16 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
ep "simrs-vx/internal/domain/main-entities/pharmacist"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type Medication struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Pharmacist *ep.Pharmacist `json:"pharmacist,omitempty" gorm:"foreignKey:Pharmacist_Id;references:Id"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
IssuedAt *time.Time `json:"issuedAt"`
|
||||
Pharmacist_Id *uint `json:"pharmacist_id"`
|
||||
Pharmacist *ep.Pharmacist `json:"pharmacist,omitempty" gorm:"foreignKey:Pharmacist_Id;references:Id"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ type CreateDto struct {
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
}
|
||||
@@ -29,7 +29,7 @@ type FilterDto struct {
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
|
||||
@@ -65,7 +65,7 @@ type ResponseDto struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type PrescriptionItem struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty" gorm:"foreignKey:Medicine_Id;references:Id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty" gorm:"foreignKey:MedicineMix_Id;references:Id"`
|
||||
Usage uint8 `json:"usage"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user