ongoing
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"`
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package chemo_protocol
|
||||
|
||||
import (
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ec "simrs-vx/internal/domain/main-entities/chemo"
|
||||
ecp "simrs-vx/internal/domain/main-entities/chemo-plan"
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
)
|
||||
|
||||
type ChemoProtocol struct {
|
||||
@@ -28,4 +29,6 @@ type ChemoProtocol struct {
|
||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
|
||||
ChemoPlans *[]ecp.ChemoPlan `json:"chemoPlans,omitempty" gorm:"foreignKey:Protocol_Id;references:Id"`
|
||||
Patient_Id *uint `json:"patient_id"`
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.ChemoProtocol) {
|
||||
data.StartDate = inputSrc.StartDate
|
||||
data.EndDate = inputSrc.EndDate
|
||||
data.Status_Code = inputSrc.Status_Code
|
||||
data
|
||||
data.Patient_Id = inputSrc.Patient_Id
|
||||
}
|
||||
|
||||
func getChemoEncounterReg(event *pl.Event) (*ec.Chemo, error) {
|
||||
|
||||
Reference in New Issue
Block a user