add chemoplans entity in chemo protocol
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
package chemo_plan
|
||||
|
||||
import (
|
||||
ecp "simrs-vx/internal/domain/main-entities/chemo-protocol"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
// std
|
||||
"time"
|
||||
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
// internal - domain - main-entities
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Parent_Id *uint `json:"parent_id"`
|
||||
Protocol_Id *uint `json:"protocol_id"`
|
||||
SeriesNumber *uint16 `json:"seriesNumber"`
|
||||
CycleNumber *uint `json:"cycleNumber"`
|
||||
PlanDate *time.Time `json:"planDate"`
|
||||
@@ -56,7 +55,6 @@ type ResponseDto struct {
|
||||
ecore.Main
|
||||
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
||||
Protocol_Id *uint `json:"protocol_id"`
|
||||
Protocol ecp.ChemoProtocol `json:"protocol,omitempty"`
|
||||
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
||||
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
||||
PlanDate *time.Time `json:"planDate"`
|
||||
@@ -68,8 +66,6 @@ type ResponseDto struct {
|
||||
func (d ChemoPlan) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Parent_Id: d.Parent_Id,
|
||||
Protocol_Id: d.Protocol_Id,
|
||||
Protocol: d.Protocol,
|
||||
SeriesNumber: d.SeriesNumber,
|
||||
CycleNumber: d.CycleNumber,
|
||||
PlanDate: d.PlanDate,
|
||||
|
||||
@@ -6,15 +6,12 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
ecp "simrs-vx/internal/domain/main-entities/chemo-protocol"
|
||||
)
|
||||
|
||||
type ChemoPlan struct {
|
||||
ecore.Main
|
||||
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
||||
Protocol_Id *uint `json:"protocol_id"`
|
||||
Protocol ecp.ChemoProtocol `json:"protocol,omitempty" gorm:"foreignKey:Protocol_Id;references:Id"`
|
||||
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
||||
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
||||
PlanDate *time.Time `json:"planDate"`
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ec "simrs-vx/internal/domain/main-entities/chemo"
|
||||
ecp "simrs-vx/internal/domain/main-entities/chemo-plan"
|
||||
)
|
||||
|
||||
type ChemoProtocol struct {
|
||||
@@ -24,4 +25,5 @@ type ChemoProtocol struct {
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
ChemoPlans *[]ecp.ChemoPlan `json:"chemoPlans,omitempty" gorm:"foreignKey:Protocol_Id;references:Id"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user