Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into feat/file-generator-169
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- Create "VclaimReference" table
|
||||
CREATE TABLE "public"."VclaimReference" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Encounter_Id" bigint NULL,
|
||||
"Date" timestamptz NULL,
|
||||
"SrcCode" text NULL,
|
||||
"SrcName" text NULL,
|
||||
"Number" text NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Encounter_VclaimReference" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "Resume" table
|
||||
ALTER TABLE "public"."Resume" ADD COLUMN "Doctor_Code" character varying(10) NULL, ADD COLUMN "Status_Code" character varying(10) NOT NULL, ADD CONSTRAINT "fk_Resume_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
@@ -1,4 +1,4 @@
|
||||
h1:4ab+A8iOO9wdTsRlY3sxe8ge29VhYaHMyq+qQCEN2UE=
|
||||
h1:87NyL1nIRuVvOiLbfdC1+PF+v2R/joAnBYyh2CrlGdU=
|
||||
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
||||
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
||||
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
||||
@@ -126,3 +126,6 @@ h1:4ab+A8iOO9wdTsRlY3sxe8ge29VhYaHMyq+qQCEN2UE=
|
||||
20251119072302.sql h1:qCuI2WMEMF/XNbjV+RXPjBnuCKLu1Fia+mR9HiLWBIs=
|
||||
20251119072450.sql h1:Xg+bTwqGyKPNFEQhJylvpz1wifdfmDJvcAq6vmNf0Ng=
|
||||
20251120005512.sql h1:Ek6qpacAI/qVuTYxKno+uJyzn7s5z9pf3t7VA8gTzm4=
|
||||
20251120074415.sql h1:NNUeJVA03EeBHJhHqPXEZoDv/PnC6yK1/cRhmukyaJo=
|
||||
20251121033803.sql h1:/vfvFX/3pzSCIHnSbMUT9EMBDykOpVkvyfeTEle9Vas=
|
||||
20251124071457.sql h1:HBaNJQIzUe6wK8CgBxamuKor7ZiAASzgkkXzL6kWsjY=
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package vclaimreference
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Date *time.Time `json:"date"`
|
||||
SrcCode *string `json:"src_code"`
|
||||
SrcName *string `json:"src_name"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Date *time.Time `json:"date"`
|
||||
SrcCode *string `json:"src_code"`
|
||||
SrcName *string `json:"src_name"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
func (d VclaimReference) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Date: d.Date,
|
||||
SrcCode: d.SrcCode,
|
||||
SrcName: d.SrcName,
|
||||
Number: d.Number,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []VclaimReference) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package vclaimreference
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
"time"
|
||||
)
|
||||
|
||||
type VclaimReference struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Date *time.Time `json:"date"`
|
||||
SrcCode *string `json:"src_code"`
|
||||
SrcName *string `json:"src_name"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
@@ -1,7 +1,13 @@
|
||||
package encounter
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
evr "simrs-vx/internal/domain/bpjs-entities/vclaim-reference"
|
||||
evs "simrs-vx/internal/domain/bpjs-entities/vclaim-sep"
|
||||
eam "simrs-vx/internal/domain/main-entities/ambulatory"
|
||||
ea "simrs-vx/internal/domain/main-entities/appointment"
|
||||
@@ -19,10 +25,6 @@ import (
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Encounter struct {
|
||||
@@ -74,6 +76,7 @@ type Encounter struct {
|
||||
RehabChildren *[]er.Basic `json:"rehabChildren,omitempty" gorm:"foreignKey:Parent_Encounter_Id;references:Id"`
|
||||
EncounterDocuments *[]eed.EncounterDocument `json:"encounterDocuments,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
GeneralConsents *[]egc.GeneralConsent `json:"generalConsents,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
VclaimReference *evr.VclaimReference `json:"vclaimReference,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d Encounter) IsDone() bool {
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package resume
|
||||
|
||||
import (
|
||||
"simrs-vx/internal/domain/base-entities/core"
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type Resume struct {
|
||||
core.Main
|
||||
Encounter_Id *uint `json:"encounter_id" gorm:"not null"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl" gorm:"size:1024"`
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id" gorm:"not null"`
|
||||
Doctor_Code *string `json:"doctor_code" gorm:"size:10"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl" gorm:"size:1024"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
|
||||
@@ -72,9 +72,11 @@ const (
|
||||
DACAvailable DataAvailabilityCode = "available" // Tersedia
|
||||
DACUnavailable DataAvailabilityCode = "unavailable" // Tidak Tersedia
|
||||
|
||||
DVCNew DataVerifiedCode = "new" // Baru
|
||||
DVCVerified DataVerifiedCode = "verified" // Terverifikasi
|
||||
DVCRejected DataVerifiedCode = "rejected" // Ditolak
|
||||
DVCNew DataVerifiedCode = "new" // Baru
|
||||
DVCVerified DataVerifiedCode = "verified" // Terverifikasi
|
||||
DVCValidated DataVerifiedCode = "validated" // Tervalidasi
|
||||
DVCCancelled DataVerifiedCode = "cancelled" // Dibatalkan
|
||||
DVCRejected DataVerifiedCode = "rejected" // Ditolak
|
||||
|
||||
USCNew UserStatusCode = "new" // Baru
|
||||
USCActive UserStatusCode = "active" // Aktif
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package installation
|
||||
package m_instalasi
|
||||
|
||||
type MInstalasi struct {
|
||||
No_Instalasi uint `json:"no_instalasi" gorm:"primaryKey;autoIncrement;column:no_instalasi"`
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package patient
|
||||
package m_pasien
|
||||
|
||||
import "time"
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package unit
|
||||
package m_poly
|
||||
|
||||
type MPloy struct {
|
||||
type MPoly struct {
|
||||
Kode uint `json:"kode" gorm:"primaryKey;autoIncrement;column:kode"`
|
||||
Nama string `json:"nama" gorm:"column:nama"`
|
||||
Jenispoly uint `json:"jenispoly" gorm:"column:jenispoly"`
|
||||
}
|
||||
|
||||
func (MPloy) TableName() string {
|
||||
func (MPoly) TableName() string {
|
||||
return "m_poly"
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package division
|
||||
package m_unit
|
||||
|
||||
type MUnit struct {
|
||||
KodeUnit uint `json:"kode_unit" gorm:"primaryKey;autoIncrement;column:kode_unit"`
|
||||
@@ -0,0 +1,27 @@
|
||||
package t_pemeriksaan_hist
|
||||
|
||||
import "time"
|
||||
|
||||
type TPemeriksaanHist struct {
|
||||
IdPemeriksaanHist uint `json:"id_pemeriksaanhist" gorm:"primaryKey;column:id_pemeriksaanhist"`
|
||||
Idxdaftar *uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||
Kdpoly *uint `json:"kdpoly" gorm:"column:kdpoly"`
|
||||
DokterPengonsul *uint `json:"dokter_pengonsul" gorm:"column:dokter_pengonsul"`
|
||||
DokterPenerima *uint `json:"dokter_penerima" gorm:"column:dokter_penerima"`
|
||||
StartKonsul *time.Time `json:"start_konsul" gorm:"column:start_konsul"`
|
||||
EndKonsul *time.Time `json:"end_konsul" gorm:"column:end_konsul"`
|
||||
UserKonsul *string `json:"user_konsul" gorm:"column:user_konsul;size:100"`
|
||||
TglEntriKonsul *time.Time `json:"tgl_entri_konsul" gorm:"column:tgl_entri_konsul"`
|
||||
IP *string `json:"ip" gorm:"column:ip;size:50"`
|
||||
UserPenerima *string `json:"user_penerima" gorm:"column:user_penerima;size:100"`
|
||||
MasukPoly *time.Time `json:"masuk_poly" gorm:"column:masuk_poly"`
|
||||
PerawatPenerima *uint `json:"perawat_penerima" gorm:"column:perawat_penerima"`
|
||||
StAktif *uint16 `json:"st_aktif" gorm:"column:st_aktif"`
|
||||
UserBatal *string `json:"user_batal" gorm:"column:user_batal;size:100"`
|
||||
TglBatal *time.Time `json:"tgl_batal" gorm:"column:tgl_batal"`
|
||||
IdxBillRajal *uint `json:"idxbillrajal" gorm:"column:idxbillrajal"`
|
||||
}
|
||||
|
||||
func (TPemeriksaanHist) TableName() string {
|
||||
return "t_pemeriksaan_hist"
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package encounter
|
||||
package t_pendaftaran
|
||||
|
||||
import "time"
|
||||
|
||||
@@ -103,6 +103,7 @@ import (
|
||||
|
||||
///BPJS
|
||||
vclaimmember "simrs-vx/internal/domain/bpjs-entities/vclaim-member"
|
||||
vclaimreference "simrs-vx/internal/domain/bpjs-entities/vclaim-reference"
|
||||
vclaimsep "simrs-vx/internal/domain/bpjs-entities/vclaim-sep"
|
||||
vclaimsepcontrolletter "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-control-letter"
|
||||
vclaimsephist "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-hist"
|
||||
@@ -215,5 +216,6 @@ func getMainEntities() []any {
|
||||
&fileattachemnt.EncounterDocument{},
|
||||
&vclaimsepcontrolletter.VclaimSepControlLetter{},
|
||||
&resume.Resume{},
|
||||
&vclaimreference.VclaimReference{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user