first commit
This commit is contained in:
No files matched your search
@@ -0,0 +1,42 @@
|
||||
package encounter
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
// PendaftaranDB merepresentasikan struktur gabungan dari tabel transaksi SIMRS dan master SATUDATA
|
||||
type PendaftaranDB struct {
|
||||
// --- Sumber: Database SIMRS (PostgreSQL) ---
|
||||
IdxDaftar int64 `db:"idxdaftar"`
|
||||
NoMR sql.NullString `db:"nomr"`
|
||||
TglReg sql.NullTime `db:"tglreg"`
|
||||
KdDokter sql.NullInt64 `db:"kddokter"`
|
||||
KdPoly sql.NullInt64 `db:"kdpoly"`
|
||||
KdCaraBayar sql.NullInt64 `db:"kdcarabayar"`
|
||||
Status sql.NullInt64 `db:"status"`
|
||||
Batal sql.NullString `db:"batal"`
|
||||
JamReg sql.NullTime `db:"jamreg"`
|
||||
MasukPoly sql.NullTime `db:"masukpoly"`
|
||||
KeluarPoly sql.NullTime `db:"keluarpoly"`
|
||||
|
||||
// --- Sumber: Database SIMRS (public.m_pasien) ---
|
||||
PatientName sql.NullString `db:"nama"`
|
||||
NIK sql.NullString `db:"nik"`
|
||||
|
||||
// --- Sumber: Database SIMRS Master Data (PostgreSQL) ---
|
||||
PatientIHS sql.NullString `db:"patient_ihs"`
|
||||
PractitionerIHS sql.NullString `db:"practitioner_ihs"`
|
||||
PractitionerNIK sql.NullString `db:"practitioner_nik"`
|
||||
LocationIHS sql.NullString `db:"location_ihs"`
|
||||
}
|
||||
|
||||
// EncounterSyncLog merepresentasikan struktur log sinkronisasi API SatuSehat.
|
||||
// Struktur ini mempermudah pembacaan payload (Request/Response) serta mendukung proses pengiriman ulang (rollback/resend).
|
||||
type EncounterSyncLog struct {
|
||||
IdxDaftar int64 `db:"idxdaftar"`
|
||||
EncounterID string `db:"encounter_id"` // ID dari SatuSehat jika status SUCCESS
|
||||
RequestPayload string `db:"request_payload"` // Teks JSON raw request
|
||||
ResponsePayload string `db:"response_payload"` // Teks JSON raw response
|
||||
Status string `db:"status"` // Status: SUCCESS / FAILED
|
||||
ErrorMessage string `db:"error_message"` // Pesan kegagalan (jika FAILED)
|
||||
}
|
||||
Reference in New Issue
Block a user