Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into fix/anything-moko
This commit is contained in:
No files matched your search
@@ -0,0 +1,36 @@
|
|||||||
|
-- Create "SoapiLink" table
|
||||||
|
CREATE TABLE "public"."SoapiLink" (
|
||||||
|
"Id" bigserial NOT NULL,
|
||||||
|
"CreatedAt" timestamptz NULL,
|
||||||
|
"UpdatedAt" timestamptz NULL,
|
||||||
|
"DeletedAt" timestamptz NULL,
|
||||||
|
"Simx_Id" bigint NULL,
|
||||||
|
"Simgos_Id" bigint NULL,
|
||||||
|
PRIMARY KEY ("Id"),
|
||||||
|
CONSTRAINT "uni_SoapiLink_Simgos_Id" UNIQUE ("Simgos_Id"),
|
||||||
|
CONSTRAINT "uni_SoapiLink_Simx_Id" UNIQUE ("Simx_Id")
|
||||||
|
);
|
||||||
|
-- Create "SoapiSimgosLog" table
|
||||||
|
CREATE TABLE "public"."SoapiSimgosLog" (
|
||||||
|
"Id" bigserial NOT NULL,
|
||||||
|
"CreatedAt" timestamptz NULL,
|
||||||
|
"UpdatedAt" timestamptz NULL,
|
||||||
|
"DeletedAt" timestamptz NULL,
|
||||||
|
"Value" text NULL,
|
||||||
|
"Date" timestamptz NULL,
|
||||||
|
"Status" text NULL,
|
||||||
|
"ErrMessage" text NULL,
|
||||||
|
PRIMARY KEY ("Id")
|
||||||
|
);
|
||||||
|
-- Create "SoapiSimxLog" table
|
||||||
|
CREATE TABLE "public"."SoapiSimxLog" (
|
||||||
|
"Id" bigserial NOT NULL,
|
||||||
|
"CreatedAt" timestamptz NULL,
|
||||||
|
"UpdatedAt" timestamptz NULL,
|
||||||
|
"DeletedAt" timestamptz NULL,
|
||||||
|
"Value" text NULL,
|
||||||
|
"Date" timestamptz NULL,
|
||||||
|
"Status" text NULL,
|
||||||
|
"ErrMessage" text NULL,
|
||||||
|
PRIMARY KEY ("Id")
|
||||||
|
);
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
h1:UdPzQZ17yyNN9HVuyrFFHj5KjLj4m6/e7s9frkdpQVU=
|
h1:6YZBXq/r79I5tuYyY1+CBzhZsSeukHSs8MyHCC5QuV4=
|
||||||
20251113035508.sql h1:rjDlu6yDdy5xv6nrCOr7NialrLSLT23pzduYNq29Hf0=
|
20251113035508.sql h1:rjDlu6yDdy5xv6nrCOr7NialrLSLT23pzduYNq29Hf0=
|
||||||
20251114071129.sql h1:Z0GQ5bJo3C+tplaWzxT8n3J9HLkEaVsRVp5nn7bmYow=
|
20251114071129.sql h1:Z0GQ5bJo3C+tplaWzxT8n3J9HLkEaVsRVp5nn7bmYow=
|
||||||
20251117041601.sql h1:l/RPG5mObqCSBjO4mzG+wTq2ieSycvlfOSz4czpUdWY=
|
20251117041601.sql h1:l/RPG5mObqCSBjO4mzG+wTq2ieSycvlfOSz4czpUdWY=
|
||||||
20251118082246.sql h1:xLUwA+EvKWIg3X/TJvu7rqbtBzONiINfag5NJpMV29E=
|
20251118082246.sql h1:xLUwA+EvKWIg3X/TJvu7rqbtBzONiINfag5NJpMV29E=
|
||||||
20251118082915.sql h1:hP6FmUVFuADIN2cDg2Z1l7Wx7PQRb+IYQDvKD7J8VAM=
|
20251118082915.sql h1:hP6FmUVFuADIN2cDg2Z1l7Wx7PQRb+IYQDvKD7J8VAM=
|
||||||
20251126115527.sql h1:+2bp2nWTTqaPpKKfy5ZYSr6b1nEUXFG3tIw4r3OEnAQ=
|
20251126115527.sql h1:Bvg+Y7k+h5s+/UaezUyJb7J7uzEJS7U5Z/RoCixcUtI=
|
||||||
|
20251201093443.sql h1:m18tksKG3OzbkxXkhfKUUqbkxnJ0VBPi3Cw34Tbywyc=
|
||||||
@@ -15,7 +15,7 @@ type Patient struct {
|
|||||||
RegisteredAt *time.Time `json:"registeredAt"`
|
RegisteredAt *time.Time `json:"registeredAt"`
|
||||||
RegisteredBy_User_Name *string `json:"registeredBy_user_name" gorm:"size:100"`
|
RegisteredBy_User_Name *string `json:"registeredBy_user_name" gorm:"size:100"`
|
||||||
Status_Code erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
|
Status_Code erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||||
Number *string `json:"number" gorm:"unique;size:15"`
|
Number *string `json:"number" gorm:"size:15;unique"`
|
||||||
Parent_Number *string `json:"parent_number"`
|
Parent_Number *string `json:"parent_number"`
|
||||||
Parent *Patient `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
|
Parent *Patient `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
|
||||||
}
|
}
|
||||||
@@ -386,3 +386,34 @@ type RecordAction struct {
|
|||||||
SpecimentDest_Code *string `json:"specimentDest" gorm:"size:100"`
|
SpecimentDest_Code *string `json:"specimentDest" gorm:"size:100"`
|
||||||
TissueInfo []string `json:"tissueInfo" gorm:"size:100"`
|
TissueInfo []string `json:"tissueInfo" gorm:"size:100"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SoapiSrc struct {
|
||||||
|
Id string `json:"id,omitempty"`
|
||||||
|
Code string `json:"code,omitempty"`
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
|
IndName string `json:"indName,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type EarlyMedicValue struct {
|
||||||
|
Vaccinated bool `json:"vaccinated,omitempty"`
|
||||||
|
CaseStatus string `json:"case-status,omitempty"`
|
||||||
|
EncounterStatus string `json:"encounter-status,omitempty"`
|
||||||
|
PrimaryComplain string `json:"pri-complain,omitempty"`
|
||||||
|
CurrentDiseaseHistory string `json:"cur-disea-hist,omitempty"`
|
||||||
|
SpO2 int `json:"spo2,omitempty"`
|
||||||
|
SystolicBloodPressure int `json:"syst-bp,omitempty"`
|
||||||
|
DiastolicBloodPressure int `json:"diast-bp,omitempty"`
|
||||||
|
RespiratoryRate int `json:"resp-rate,omitempty"`
|
||||||
|
Pulse int `json:"pulse,omitempty"`
|
||||||
|
Weight int `json:"weight,omitempty"`
|
||||||
|
BloodType string `json:"blood-type,omitempty"`
|
||||||
|
Temperature int `json:"temp,omitempty"`
|
||||||
|
Height int `json:"height,omitempty"`
|
||||||
|
PhysicalExamination string `json:"physical-exam,omitempty"`
|
||||||
|
DiagnoseSrc []SoapiSrc `json:"diagnoseSrc,omitempty"`
|
||||||
|
ProcedureSrc []SoapiSrc `json:"procedureSrc,omitempty"`
|
||||||
|
EarlyMedicDiagnose string `json:"early-med-diag,omitempty"`
|
||||||
|
EarlyMedicPlan string `json:"early-med-plan,omitempty"`
|
||||||
|
Therapy string `json:"therapy,omitempty"`
|
||||||
|
ExpectedOutcome []SoapiSrc `json:"expected-outcome,omitempty"`
|
||||||
|
}
|
||||||
@@ -123,6 +123,7 @@ const (
|
|||||||
DTCGC DocTypeCode = "general-consent"
|
DTCGC DocTypeCode = "general-consent"
|
||||||
DTCVSCL DocTypeCode = "vclaim-control-letter" // vclaim control letter
|
DTCVSCL DocTypeCode = "vclaim-control-letter" // vclaim control letter
|
||||||
DTCResume DocTypeCode = "resume" // Resume
|
DTCResume DocTypeCode = "resume" // Resume
|
||||||
|
DTCScreening DocTypeCode = "screening" // Screening
|
||||||
|
|
||||||
ETCPerson EntityTypeCode = "person"
|
ETCPerson EntityTypeCode = "person"
|
||||||
ETCEncounter EntityTypeCode = "encounter"
|
ETCEncounter EntityTypeCode = "encounter"
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package t_diagnosadanterapi
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TDiagnosaDanTerapi struct {
|
||||||
|
Idxterapi uint `json:"idxterapi" gorm:"column:idxterapi;primaryKey"`
|
||||||
|
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||||
|
Nomr string `json:"nomr" gorm:"column:nomr"`
|
||||||
|
Tanggal time.Time `json:"tanggal" gorm:"column:tanggal"`
|
||||||
|
TekananDarah string `json:"tekanan_darah" gorm:"column:tekanan_darah"`
|
||||||
|
GolonganDarah string `json:"golongan_darah" gorm:"column:golongan_darah"`
|
||||||
|
TinggiBadan float64 `json:"tinggi_badan" gorm:"column:tinggi_badan"`
|
||||||
|
BeratBadan float64 `json:"berat_badan" gorm:"column:berat_badan"`
|
||||||
|
Diagnosa string `json:"diagnosa" gorm:"column:diagnosa"`
|
||||||
|
Komplikasi string `json:"komplikasi" gorm:"column:komplikasi"`
|
||||||
|
Terapi string `json:"terapi" gorm:"column:terapi"`
|
||||||
|
Anamnesa string `json:"anamnesa" gorm:"column:anamnesa"`
|
||||||
|
Kdpoly uint `json:"kdpoly" gorm:"column:kdpoly"`
|
||||||
|
Kddokter uint `json:"kddokter" gorm:"column:kddokter"`
|
||||||
|
Kdtujuanrujuk uint `json:"kdtujuanrujuk" gorm:"column:kdtujuanrujuk"`
|
||||||
|
Nip string `json:"nip" gorm:"column:nip"`
|
||||||
|
IcdCode string `json:"icd_code" gorm:"column:icd_code"`
|
||||||
|
KunjunganBl uint `json:"kunjungan_bl" gorm:"column:kunjungan_bl"`
|
||||||
|
KasusBl uint `json:"kasus_bl" gorm:"column:kasus_bl"`
|
||||||
|
Icdcm string `json:"icdcm" gorm:"column:icdcm"`
|
||||||
|
Icd9 string `json:"icd_9" gorm:"column:icd_9"`
|
||||||
|
Klb uint `json:"klb" gorm:"column:klb"`
|
||||||
|
Bedah uint `json:"bedah" gorm:"column:bedah"`
|
||||||
|
Jenis uint `json:"jenis" gorm:"column:jenis"`
|
||||||
|
Perawat string `json:"perawat" gorm:"column:perawat"`
|
||||||
|
Status string `json:"status" gorm:"column:status"`
|
||||||
|
PemeriksaanFisik string `json:"pemeriksaan_fisik" gorm:"column:pemeriksaan_fisik"`
|
||||||
|
RiwayatPasien string `json:"riwayat_pasien" gorm:"column:riwayat_pasien"`
|
||||||
|
TindakanMedis string `json:"tindakan_medis" gorm:"column:tindakan_medis"`
|
||||||
|
Rajal uint `json:"rajal" gorm:"column:rajal"`
|
||||||
|
UserBatal string `json:"user_batal" gorm:"column:user_batal"`
|
||||||
|
TglBatal *time.Time `json:"tgl_batal" gorm:"column:tgl_batal"`
|
||||||
|
SudahVaksin string `json:"sudah_vaksin" gorm:"column:sudah_vaksin"`
|
||||||
|
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
|
||||||
|
DenyutJantung string `json:"denyut_jantung" gorm:"column:denyut_jantung"`
|
||||||
|
Pernapasan string `json:"pernapasan" gorm:"column:pernapasan"`
|
||||||
|
Suhu string `json:"suhu" gorm:"column:suhu"`
|
||||||
|
Sp02 string `json:"sp02" gorm:"column:sp02"`
|
||||||
|
TujuanPerawatan string `json:"tujuan_perawatan" gorm:"column:tujuan_perawatan"`
|
||||||
|
TargetCapaian string `json:"target_capaian" gorm:"column:target_capaian"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// TableName overrides the table name used by GORM
|
||||||
|
func (TDiagnosaDanTerapi) TableName() string {
|
||||||
|
return "t_diagnosadanterapi"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package t_icd_cm
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TIcdCm struct {
|
||||||
|
Idx uint `json:"idx" gorm:"column:idx;primaryKey"`
|
||||||
|
Nomr string `json:"nomr" gorm:"column:nomr"`
|
||||||
|
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||||
|
Kddokter uint `json:"kddokter" gorm:"column:kddokter"`
|
||||||
|
Icd string `json:"icd" gorm:"column:icd"`
|
||||||
|
IcdVerified string `json:"icd_verified" gorm:"column:icd_verified"`
|
||||||
|
StatusRajal uint16 `json:"status_rajal" gorm:"column:status_rajal"`
|
||||||
|
Tanggal time.Time `json:"tanggal" gorm:"column:tanggal"`
|
||||||
|
StatusVerif uint16 `json:"status_verif" gorm:"column:status_verif"`
|
||||||
|
IcdVerifiedOrder uint16 `json:"icd_verified_order" gorm:"column:icd_verified_order"`
|
||||||
|
IcdVerifBy string `json:"icd_verif_by" gorm:"column:icd_verif_by"`
|
||||||
|
IcdVerifDate *time.Time `json:"icd_verif_date" gorm:"column:icd_verif_date"`
|
||||||
|
IcdActive uint16 `json:"icd_active" gorm:"column:icd_active"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (TIcdCm) TableName() string {
|
||||||
|
return "t_icd_cm"
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package t_icd
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TIcd struct {
|
||||||
|
Idx uint `json:"idx" gorm:"column:idx;primaryKey"`
|
||||||
|
Nomr string `json:"nomr" gorm:"column:nomr"`
|
||||||
|
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||||
|
Kddokter uint `json:"kddokter" gorm:"column:kddokter"`
|
||||||
|
Icd string `json:"icd" gorm:"column:icd"`
|
||||||
|
IcdVerified string `json:"icd_verified" gorm:"column:icd_verified"`
|
||||||
|
StatusRajal uint16 `json:"status_rajal" gorm:"column:status_rajal"`
|
||||||
|
Tanggal time.Time `json:"tanggal" gorm:"column:tanggal"`
|
||||||
|
StatusVerif uint16 `json:"status_verif" gorm:"column:status_verif"`
|
||||||
|
IcdVerifiedOrder uint16 `json:"icd_verified_order" gorm:"column:icd_verified_order"`
|
||||||
|
IcdVerifBy string `json:"icd_verif_by" gorm:"column:icd_verif_by"`
|
||||||
|
IcdVerifDate *time.Time `json:"icd_verif_date" gorm:"column:icd_verif_date"`
|
||||||
|
IcdActive uint16 `json:"icd_active" gorm:"column:icd_active"`
|
||||||
|
StSebabMati uint16 `json:"st_sebab_mati" gorm:"column:st_sebab_mati"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (TIcd) TableName() string {
|
||||||
|
return "t_icd"
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package t_rekammedik
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TRekammedik struct {
|
||||||
|
TglKirim *time.Time `json:"tgl_kirim" gorm:"column:tgl_kirim"`
|
||||||
|
TglTerima *time.Time `json:"tgl_terima" gorm:"column:tgl_terima"`
|
||||||
|
Idxdaftar int `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||||
|
Kdpoly int `json:"kdpoly" gorm:"column:kdpoly"`
|
||||||
|
Pengirim string `json:"pengirim" gorm:"column:pengirim"`
|
||||||
|
Penerima string `json:"penerima" gorm:"column:penerima"`
|
||||||
|
Statusrm int `json:"statusrm" gorm:"column:statusrm"`
|
||||||
|
PenerimaPoly string `json:"penerima_poly" gorm:"column:penerima_poly"`
|
||||||
|
JamKirimRm string `json:"jam_kirim_rm" gorm:"column:jam_kirim_rm"`
|
||||||
|
JamTerimaRm string `json:"jam_terima_rm" gorm:"column:jam_terima_rm"`
|
||||||
|
PjBerkasRm string `json:"pj_berkas_rm" gorm:"column:pj_berkas_rm"`
|
||||||
|
StatusFisikBerkas string `json:"status_fisik_berkas" gorm:"column:status_fisik_berkas"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (TRekammedik) TableName() string {
|
||||||
|
return "t_rekammedik"
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package Soapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||||
|
erc "simrs-vx/internal/domain/references/common"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SoapiLink struct {
|
||||||
|
ecore.Main
|
||||||
|
Simx_Id uint `json:"simx_id" gorm:"unique"`
|
||||||
|
Simgos_Id uint `json:"simgos_id" gorm:"unique"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SoapiSimxLog struct {
|
||||||
|
ecore.Main
|
||||||
|
Value *string `json:"value"`
|
||||||
|
Date *time.Time `json:"date"`
|
||||||
|
Status erc.ProcessStatusCode `json:"status"`
|
||||||
|
ErrMessage *string `json:"errMessage"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SoapiSimgosLog struct {
|
||||||
|
ecore.Main
|
||||||
|
Value *string `json:"value"`
|
||||||
|
Date *time.Time `json:"date"`
|
||||||
|
Status erc.ProcessStatusCode `json:"status"`
|
||||||
|
ErrMessage *string `json:"errMessage"`
|
||||||
|
}
|
||||||
@@ -68,4 +68,4 @@ func (obj myBase) Delete(w http.ResponseWriter, r *http.Request) {
|
|||||||
dto.Id = uint16(id)
|
dto.Id = uint16(id)
|
||||||
res, err := u.Delete(dto)
|
res, err := u.Delete(dto)
|
||||||
rw.DataResponse(w, res, err)
|
rw.DataResponse(w, res, err)
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
installation "simrs-vx/internal/domain/sync-entities/installation"
|
installation "simrs-vx/internal/domain/sync-entities/installation"
|
||||||
internalreference "simrs-vx/internal/domain/sync-entities/internal-reference"
|
internalreference "simrs-vx/internal/domain/sync-entities/internal-reference"
|
||||||
patient "simrs-vx/internal/domain/sync-entities/patient"
|
patient "simrs-vx/internal/domain/sync-entities/patient"
|
||||||
|
soapi "simrs-vx/internal/domain/sync-entities/soapi"
|
||||||
specialist "simrs-vx/internal/domain/sync-entities/specialist"
|
specialist "simrs-vx/internal/domain/sync-entities/specialist"
|
||||||
subspecialist "simrs-vx/internal/domain/sync-entities/subspecialist"
|
subspecialist "simrs-vx/internal/domain/sync-entities/subspecialist"
|
||||||
unit "simrs-vx/internal/domain/sync-entities/unit"
|
unit "simrs-vx/internal/domain/sync-entities/unit"
|
||||||
@@ -38,5 +39,8 @@ func getSyncEntities() []any {
|
|||||||
&internalreference.InternalReferenceLink{},
|
&internalreference.InternalReferenceLink{},
|
||||||
&internalreference.InternalReferenceSimxLog{},
|
&internalreference.InternalReferenceSimxLog{},
|
||||||
&internalreference.InternalReferenceSimgosLog{},
|
&internalreference.InternalReferenceSimgosLog{},
|
||||||
|
&soapi.SoapiLink{},
|
||||||
|
&soapi.SoapiSimxLog{},
|
||||||
|
&soapi.SoapiSimgosLog{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -137,4 +137,4 @@ func DeleteData(data *e.AntibioticInUse, event *pl.Event, dbx ...*gorm.DB) error
|
|||||||
|
|
||||||
pl.SetLogInfo(event, nil, "complete")
|
pl.SetLogInfo(event, nil, "complete")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -100,4 +100,4 @@ func (me *middlewareRunner) RunDeleteMiddleware(middlewares []readDetailMw, inpu
|
|||||||
|
|
||||||
func (me *middlewareRunner) setMwType(mwType pu.MWType) {
|
func (me *middlewareRunner) setMwType(mwType pu.MWType) {
|
||||||
me.MwType = mwType
|
me.MwType = mwType
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ package antibioticinuse
|
|||||||
// CreateMw{Name: "modif-input", Func: pm.ModifInput},
|
// CreateMw{Name: "modif-input", Func: pm.ModifInput},
|
||||||
// CreateMw{Name: "check-data", Func: pm.CheckData},
|
// CreateMw{Name: "check-data", Func: pm.CheckData},
|
||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
@@ -41,4 +41,4 @@ var readDetailPostMw []readDetailMw
|
|||||||
var updatePreMw []readDetailMw
|
var updatePreMw []readDetailMw
|
||||||
var updatePostMw []readDetailMw
|
var updatePostMw []readDetailMw
|
||||||
var deletePreMw []readDetailMw
|
var deletePreMw []readDetailMw
|
||||||
var deletePostMw []readDetailMw
|
var deletePostMw []readDetailMw
|
||||||
@@ -277,4 +277,4 @@ func Delete(input e.DeleteDto) (*d.Data, error) {
|
|||||||
Data: data.ToResponse(),
|
Data: data.ToResponse(),
|
||||||
}, nil
|
}, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -137,4 +137,4 @@ func DeleteData(data *e.AntibioticSrc, event *pl.Event, dbx ...*gorm.DB) error {
|
|||||||
|
|
||||||
pl.SetLogInfo(event, nil, "complete")
|
pl.SetLogInfo(event, nil, "complete")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user