ongoing
This commit is contained in:
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
-- Modify "ChemoPlan" table
|
||||||
|
ALTER TABLE "public"."ChemoPlan" DROP CONSTRAINT "fk_ChemoPlan_Protocol", ADD CONSTRAINT "fk_ChemoProtocol_ChemoPlans" FOREIGN KEY ("Protocol_Id") REFERENCES "public"."ChemoProtocol" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- Modify "ChemoProtocol" table
|
||||||
|
ALTER TABLE "public"."ChemoProtocol" ADD COLUMN "Patient_Id" bigint NULL;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
h1:2pGamYMy0LEZE7Du/0SEb8z5LrkmpNk199Yw0CJri+M=
|
h1:8SotxMlqYq7PNXcyAsIzO4075hP1c39CA2efE7Jp1kk=
|
||||||
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
||||||
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
||||||
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
||||||
@@ -146,3 +146,6 @@ h1:2pGamYMy0LEZE7Du/0SEb8z5LrkmpNk199Yw0CJri+M=
|
|||||||
20251202231005.sql h1:lua0KKoeBptSfs/6ehZE6Azo6YUlNkOJwGFyb1HQWkY=
|
20251202231005.sql h1:lua0KKoeBptSfs/6ehZE6Azo6YUlNkOJwGFyb1HQWkY=
|
||||||
20251203205052.sql h1:az/hGpk7u4YKT7gU+UuEw9guqB9AqdckPF1cYavQ3CA=
|
20251203205052.sql h1:az/hGpk7u4YKT7gU+UuEw9guqB9AqdckPF1cYavQ3CA=
|
||||||
20251205073858.sql h1:GD692c2jC2mFr6esv3eQmxEpWOeIA860TGctwHAldfM=
|
20251205073858.sql h1:GD692c2jC2mFr6esv3eQmxEpWOeIA860TGctwHAldfM=
|
||||||
|
20251205073858.sql h1:Ep03jQ9hJAJILDJfKVcmi3Z6fqmTHSq9gKQtwf070PE=
|
||||||
|
20251205211957.sql h1:zRHcvLY+nfLdUyMcfpgI8vYQcPzJUWbfjkc4cK0QGHU=
|
||||||
|
20251205214433.sql h1:cPyzSgAn5VHElC5yHtK2TCKSnBoTI65S0kcoc2GbIxQ=
|
||||||
@@ -1,18 +1,17 @@
|
|||||||
package chemo_plan
|
package chemo_plan
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ecp "simrs-vx/internal/domain/main-entities/chemo-protocol"
|
|
||||||
ere "simrs-vx/internal/domain/references/encounter"
|
|
||||||
// std
|
// std
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
ere "simrs-vx/internal/domain/references/encounter"
|
||||||
|
|
||||||
// internal - domain - main-entities
|
// internal - domain - main-entities
|
||||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateDto struct {
|
type CreateDto struct {
|
||||||
Parent_Id *uint `json:"parent_id"`
|
Parent_Id *uint `json:"parent_id"`
|
||||||
Protocol_Id *uint `json:"protocol_id"`
|
|
||||||
SeriesNumber *uint16 `json:"seriesNumber"`
|
SeriesNumber *uint16 `json:"seriesNumber"`
|
||||||
CycleNumber *uint `json:"cycleNumber"`
|
CycleNumber *uint `json:"cycleNumber"`
|
||||||
PlanDate *time.Time `json:"planDate"`
|
PlanDate *time.Time `json:"planDate"`
|
||||||
@@ -56,7 +55,6 @@ type ResponseDto struct {
|
|||||||
ecore.Main
|
ecore.Main
|
||||||
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
||||||
Protocol_Id *uint `json:"protocol_id"`
|
Protocol_Id *uint `json:"protocol_id"`
|
||||||
Protocol ecp.ChemoProtocol `json:"protocol,omitempty"`
|
|
||||||
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
||||||
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
||||||
PlanDate *time.Time `json:"planDate"`
|
PlanDate *time.Time `json:"planDate"`
|
||||||
@@ -68,8 +66,6 @@ type ResponseDto struct {
|
|||||||
func (d ChemoPlan) ToResponse() ResponseDto {
|
func (d ChemoPlan) ToResponse() ResponseDto {
|
||||||
resp := ResponseDto{
|
resp := ResponseDto{
|
||||||
Parent_Id: d.Parent_Id,
|
Parent_Id: d.Parent_Id,
|
||||||
Protocol_Id: d.Protocol_Id,
|
|
||||||
Protocol: d.Protocol,
|
|
||||||
SeriesNumber: d.SeriesNumber,
|
SeriesNumber: d.SeriesNumber,
|
||||||
CycleNumber: d.CycleNumber,
|
CycleNumber: d.CycleNumber,
|
||||||
PlanDate: d.PlanDate,
|
PlanDate: d.PlanDate,
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ import (
|
|||||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||||
|
|
||||||
ere "simrs-vx/internal/domain/references/encounter"
|
ere "simrs-vx/internal/domain/references/encounter"
|
||||||
|
|
||||||
ecp "simrs-vx/internal/domain/main-entities/chemo-protocol"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChemoPlan struct {
|
type ChemoPlan struct {
|
||||||
ecore.Main
|
ecore.Main
|
||||||
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
||||||
Protocol_Id *uint `json:"protocol_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 -
|
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
||||||
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
||||||
PlanDate *time.Time `json:"planDate"`
|
PlanDate *time.Time `json:"planDate"`
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package chemo_protocol
|
package chemo_protocol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
eus "simrs-vx/internal/domain/main-entities/user"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||||
erc "simrs-vx/internal/domain/references/common"
|
erc "simrs-vx/internal/domain/references/common"
|
||||||
|
|
||||||
ec "simrs-vx/internal/domain/main-entities/chemo"
|
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 {
|
type ChemoProtocol struct {
|
||||||
@@ -28,4 +29,6 @@ type ChemoProtocol struct {
|
|||||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references: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.StartDate = inputSrc.StartDate
|
||||||
data.EndDate = inputSrc.EndDate
|
data.EndDate = inputSrc.EndDate
|
||||||
data.Status_Code = inputSrc.Status_Code
|
data.Status_Code = inputSrc.Status_Code
|
||||||
data
|
data.Patient_Id = inputSrc.Patient_Id
|
||||||
}
|
}
|
||||||
|
|
||||||
func getChemoEncounterReg(event *pl.Event) (*ec.Chemo, error) {
|
func getChemoEncounterReg(event *pl.Event) (*ec.Chemo, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user