penambahan All case Satu sehat
This commit is contained in:
No files matched your search
@@ -1,44 +1,40 @@
|
||||
package encounter
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
"service/internal/satusehat/common"
|
||||
"service/pkg/utils/custom"
|
||||
)
|
||||
|
||||
// EncounterRequest merepresentasikan data input untuk membuat atau memperbarui Encounter.
|
||||
type EncounterRequest struct {
|
||||
EncounterID string `json:"encounter_id" binding:"required"`
|
||||
OrganizationID string `json:"organization_id" binding:"required"`
|
||||
EpisodeOfCareID string `json:"episode_of_care_id,omitempty"`
|
||||
PatientID string `json:"patient_id" binding:"required"`
|
||||
PatientName string `json:"patient_name" binding:"required"`
|
||||
PractitionerID string `json:"practitioner_id" binding:"required"`
|
||||
PractitionerName string `json:"practitioner_name" binding:"required"`
|
||||
LocationID string `json:"location_id" binding:"required"`
|
||||
LocationName string `json:"location_name" binding:"required"`
|
||||
Status string `json:"status" binding:"required,oneof=arrived in-progress finished cancelled"` // arrived, in-progress, finished, cancelled
|
||||
Class string `json:"class" binding:"required,oneof=AMB IMP EMER"` // AMB (ambulatory), IMP (inpatient), EMER (emergency)
|
||||
PeriodStart time.Time `json:"period_start" binding:"required"`
|
||||
PeriodEnd *time.Time `json:"period_end,omitempty"`
|
||||
OrganizationID string `json:"organization_id,omitempty"`
|
||||
EncounterID string `json:"encounter_id,omitempty"`
|
||||
Status string `json:"status" binding:"required,oneof=planned arrived triaged in-progress onleave finished cancelled entered-in-error unknown"`
|
||||
Class string `json:"class" binding:"required,oneof=AMB EMER IMP"`
|
||||
Subject *common.ReferenceDTO `json:"subject" binding:"required"`
|
||||
Participant []common.ReferenceDTO `json:"participant,omitempty"`
|
||||
Location []LocationDTO `json:"location,omitempty"`
|
||||
PeriodStart *custom.CustomTime `json:"period_start" binding:"required"`
|
||||
PeriodEnd *custom.CustomTime `json:"period_end,omitempty"`
|
||||
Diagnosis []DiagnosisDTO `json:"diagnosis,omitempty"`
|
||||
StatusHistory []StatusHistoryDTO `json:"status_history,omitempty"`
|
||||
}
|
||||
|
||||
type LocationDTO struct {
|
||||
Location *common.ReferenceDTO `json:"location,omitempty"`
|
||||
PeriodStart *custom.CustomTime `json:"period_start,omitempty"`
|
||||
PeriodEnd *custom.CustomTime `json:"period_end,omitempty"`
|
||||
}
|
||||
|
||||
type DiagnosisDTO struct {
|
||||
Condition *common.ReferenceDTO `json:"condition,omitempty"`
|
||||
Use *common.CodeableConceptDTO `json:"use,omitempty"`
|
||||
Rank int `json:"rank,omitempty"`
|
||||
}
|
||||
|
||||
type StatusHistoryDTO struct {
|
||||
Status string `json:"status,omitempty"`
|
||||
PeriodStart *custom.CustomTime `json:"period_start,omitempty"`
|
||||
PeriodEnd *custom.CustomTime `json:"period_end,omitempty"`
|
||||
}
|
||||
|
||||
// EncounterPatchRequest merepresentasikan payload operasi JSON Patch.
|
||||
type EncounterPatchRequest []map[string]interface{}
|
||||
|
||||
// PendaftaranDB merepresentasikan baris data dari tabel t_pendaftaran
|
||||
type PendaftaranDB struct {
|
||||
IdxDaftar int64 `db:"idxdaftar"`
|
||||
NoMR sql.NullString `db:"nomr"`
|
||||
JamReg sql.NullTime `db:"jamreg"`
|
||||
MasukPoly sql.NullTime `db:"masukpoly"`
|
||||
KeluarPoly sql.NullTime `db:"keluarpoly"`
|
||||
Batal sql.NullString `db:"batal"`
|
||||
KdPoly sql.NullInt64 `db:"kdpoly"`
|
||||
PoliNameHFIS sql.NullString `db:"poli_name_hfis"`
|
||||
DokterIDHFIS sql.NullString `db:"dokter_id_hfis"`
|
||||
DokterNameHFIS sql.NullString `db:"dokter_name_hfis"`
|
||||
PasienNIK sql.NullString `db:"pasien_nik"`
|
||||
DokterNIK sql.NullString `db:"dokter_nik"`
|
||||
PatientIHS sql.NullString `db:"patient_ihs"`
|
||||
PractitionerIHS sql.NullString `db:"practitioner_ihs"`
|
||||
}
|
||||
Reference in New Issue
Block a user