feat/action-report: adjust table structure
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- Modify "ActionReport" table
|
||||
ALTER TABLE "public"."ActionReport" ADD CONSTRAINT "fk_ActionReport_Instrumentor_Employe" FOREIGN KEY ("Instrumentor_Employe_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ActionReport_Nurse" FOREIGN KEY ("Nurse_Code") REFERENCES "public"."Nurse" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ActionReport_Operator_Employe" FOREIGN KEY ("Operator_Employe_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "ActionReport" table
|
||||
ALTER TABLE "public"."ActionReport" ADD CONSTRAINT "fk_ActionReport_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
@@ -1,4 +1,4 @@
|
||||
h1:EpEYOCY46tEg91o5Y4scmFj3/yIyR311HaP95Ts3vus=
|
||||
h1:bYhAmgY4p8jgE8JpZ6YeJyS1iYCH2LEvDXW2PE+iZpc=
|
||||
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
||||
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
||||
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
||||
@@ -133,5 +133,7 @@ h1:EpEYOCY46tEg91o5Y4scmFj3/yIyR311HaP95Ts3vus=
|
||||
20251126064057.sql h1:vAdhz5Nn/gGJy0UKZAEldeXv8HpHtJU/t8ygDVIbTsU=
|
||||
20251201081333.sql h1:PoC8ADRdwDuohDTB74yW/DaB42igdYa4B6humbrEJBk=
|
||||
20251201104439.sql h1:tpqdrOf9d2aGwZshqm62nG6SXnfVaO/g6A7z0efPS14=
|
||||
20251201113804.sql h1:pR0nbmjJNDLi929vmGm2W9RKxLJ2iECzf2otO+JpKWA=
|
||||
20251201113858.sql h1:JciS3xbCF94huB0qkGJ24YtS1a+nqV26hxzeKh2AOj0=
|
||||
20251201113804.sql h1:kIEmVoETJXBkab2Q+b3y/pP84eF8W2BdQ47amHCnc+c=
|
||||
20251201113858.sql h1:KLXKZO5XTQPoEU0YLHE8Fhg9WPKpSN3wNgYPJ+RGFcg=
|
||||
20251201114751.sql h1:QMcFLz4vr6lwQ03k0Wthhosce743DW9A3w6WJzfqjoU=
|
||||
20251201114913.sql h1:GvRLyn62Z5CIckonFhtHOZKbJK43yyoCXUfFiADLiAo=
|
||||
|
||||
@@ -2,23 +2,29 @@ package actionreport
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eem "simrs-vx/internal/domain/main-entities/employee"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ActionReport struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id uint64 `json:"encounter_id" gorm:"foreignKey"`
|
||||
Encounter *ee.Encounter `json:"doctor,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Date *time.Time `json:"date" gorm:"not null;size:20"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"size:10"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id"`
|
||||
Operator_Employe *eem.Employee `json:"operator_employe,omitempty" gorm:"foreignKey:Operator_Employe_Id;references:Id"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
|
||||
Instrumentor_Employe *eem.Employee `json:"instrumentor_employe,omitempty" gorm:"foreignKey:Instrumentor_Employe_Id;references:Id"`
|
||||
Diagnose *string `json:"diagnose" gorm:"size:1024"`
|
||||
Nurse_Code string `json:"nurse_code" gorm:"size:10"`
|
||||
|
||||
Value string `json:"value"`
|
||||
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
|
||||
Value string `json:"value"`
|
||||
// SurgerySize_Code *string `json:"surgerySize_code" gorm:"size:10"`
|
||||
// Billing_Code *string `json:"billing_code" gorm:"size:10"`
|
||||
// SurgerySystem_Code *string `json:"surgerySystem_code" gorm:"size:10"`
|
||||
|
||||
Reference in New Issue
Block a user