208 lines
7.9 KiB
Go
208 lines
7.9 KiB
Go
package screening
|
|
|
|
import (
|
|
// std
|
|
|
|
// internal - lib
|
|
pa "simrs-vx/internal/lib/auth"
|
|
|
|
// internal - domain - base-entities
|
|
ecore "simrs-vx/internal/domain/base-entities/core"
|
|
|
|
// internal - domain - main-entities
|
|
eem "simrs-vx/internal/domain/main-entities/employee"
|
|
|
|
erc "simrs-vx/internal/domain/references/clinical"
|
|
)
|
|
|
|
type CreateDto struct {
|
|
Encounter_Id *uint `json:"encounter_id"`
|
|
Employee_Id *uint `json:"-"`
|
|
Type erc.ScreeningFormTypeCode `json:"type"`
|
|
Value *string `json:"value"`
|
|
|
|
pa.AuthInfo
|
|
}
|
|
|
|
type ReadListDto struct {
|
|
FilterDto
|
|
Includes string `json:"includes"`
|
|
Sort string `json:"sort"`
|
|
Pagination ecore.Pagination
|
|
}
|
|
|
|
type FilterDto struct {
|
|
Encounter_Id *uint `json:"encounter-id"`
|
|
Employee_Id *uint `json:"employee-id"`
|
|
Type erc.ScreeningFormTypeCode `json:"type"`
|
|
Value *string `json:"value"`
|
|
}
|
|
|
|
type ReadDetailDto struct {
|
|
Id uint `json:"id"`
|
|
Includes string `json:"includes"`
|
|
}
|
|
|
|
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"`
|
|
Employee_Id *uint `json:"employee_id"`
|
|
Employee *eem.Employee `json:"employee,omitempty"`
|
|
Type erc.ScreeningFormTypeCode `json:"type"`
|
|
Value *string `json:"value"`
|
|
}
|
|
|
|
func (d Screening) ToResponse() ResponseDto {
|
|
resp := ResponseDto{
|
|
Encounter_Id: d.Encounter_Id,
|
|
Employee_Id: d.Employee_Id,
|
|
Employee: d.Employee,
|
|
Type: d.Type,
|
|
Value: d.Value,
|
|
}
|
|
resp.Main = d.Main
|
|
return resp
|
|
}
|
|
|
|
func ToResponseList(data []Screening) []ResponseDto {
|
|
resp := make([]ResponseDto, len(data))
|
|
for i, u := range data {
|
|
resp[i] = u.ToResponse()
|
|
}
|
|
return resp
|
|
}
|
|
|
|
type ScreeningEntry struct {
|
|
AgeAtRisk bool `json:"ageAtRisk"` // Usia Dengan Risiko
|
|
LowCognitiveFunction bool `json:"lowCognitiveFunction"` // Pasien Dengan Fungsi Kognitif Rendah
|
|
HighRiskPatient bool `json:"highRiskPatient"` // Pasien Dengan Risiko Tinggi
|
|
HighComplaintPotential bool `json:"highComplaintPotential"` // Potensi Komplain Tinggi (Medik dan Non Medik)
|
|
ChronicOrCatastrophicOrTerminal bool `json:"chronicOrCatastrophicOrTerminal"` // Kasus Dengan Penyakit Kronis, Katastropik, Terminal
|
|
LowFunctionalStatus bool `json:"lowFunctionalStatus"` // Status Fungsional Rendah, Kebutuhan Bantuan ADL Tinggi
|
|
HistoryOfMedicalDeviceUse bool `json:"historyOfMedicalDeviceUse"` // Pasien Dengan Riwayat Penggunaan Peralatan Medis Masa Lalu
|
|
MentalOrSocialIssues bool `json:"mentalOrSocialIssues"` // Riwayat Gangguan Mental, Bunuh Diri, Krisis Keluarga, Isu Sosial
|
|
FrequentERVisitsOrReadmission bool `json:"frequentERVisitsOrReadmission"` // Sering Masuk IGD, Readmisi RS
|
|
HighCareCostEstimate bool `json:"highCareCostEstimate"` // Perkiraan Asuhan Dengan Biaya Tinggi
|
|
ComplexFinancingSystem bool `json:"complexFinancingSystem"` // Kemungkinan Sistem Pembiayaan Yang Kompleks
|
|
AboveAverageLengthOfStay bool `json:"aboveAverageLengthOfStay"` // Kasus Yang Melebihi Rata-Rata Lama Dirawat
|
|
ImportantOrHighRiskDischargePlanning bool `json:"importantOrHighRiskDischargePlanning"` // Rencana Pemulangan Penting / Kontinuitas Pelayanan
|
|
Stagnation bool `json:"stagnation"` // Stagnasi
|
|
}
|
|
|
|
type ProblemIdentification struct {
|
|
CareNotFollowingGuidelines bool `json:"careNotFollowingGuidelines"` // Tingkat Asuhan Tidak Sesuai Panduan/ Norma
|
|
OverUtilization bool `json:"overUtilization"` // Over Utilization Pelayanan
|
|
UnderUtilization bool `json:"underUtilization"` // Under Utilization Pelayanan
|
|
PatientNonCompliance bool `json:"patientNonCompliance"` // Ketidakpatuhan Pasien
|
|
InadequateEducation bool `json:"inadequateEducation"` // Edukasi Kurang Memadai
|
|
LackOfFamilySupport bool `json:"lackOfFamilySupport"` // Kurang Dukungan Keluarga
|
|
DecreasedDetermination bool `json:"decreasedDetermination"` // Penurunan Determinasi Ketika Komplikasi Meningkat
|
|
FinancialDifficultyDuringComplications bool `json:"financialDifficultyDuringComplications"` // Kendala Keuangan Ketika Komplikasi Meningkat
|
|
DischargeCriteriaNotMetOrDelayed bool `json:"dischargeCriteriaNotMetOrDelayed"` // Pemulangan/ Rujukan Belum Memenuhi Kriteria/ Ditunda
|
|
}
|
|
|
|
type FormA struct {
|
|
Screening ScreeningEntry `json:"screening"`
|
|
AssessmentDetail string `json:"assessmentDetail"` // Masukkan detail assesmen
|
|
ProblemIdentification ProblemIdentification `json:"problemIdentification"`
|
|
PlanningDetail string `json:"planningDetail"` // Masukkan detail perencanaan
|
|
}
|
|
|
|
func (s ScreeningEntry) SelectedScreeningLabels() []string {
|
|
result := []string{}
|
|
|
|
if s.AgeAtRisk {
|
|
result = append(result, "Usia Dengan Risiko")
|
|
}
|
|
if s.LowCognitiveFunction {
|
|
result = append(result, "Pasien Dengan Fungsi Kognitif Rendah")
|
|
}
|
|
if s.HighRiskPatient {
|
|
result = append(result, "Pasien Dengan Risiko Tinggi")
|
|
}
|
|
if s.HighComplaintPotential {
|
|
result = append(result, "Potensi Komplain Tinggi (Medik dan Non Medik)")
|
|
}
|
|
if s.ChronicOrCatastrophicOrTerminal {
|
|
result = append(result, "Kasus Dengan Penyakit Kronis, Katastropik, Terminal")
|
|
}
|
|
if s.LowFunctionalStatus {
|
|
result = append(result, "Status Fungsional Rendah, Kebutuhan Bantuan ADL Tinggi")
|
|
}
|
|
if s.HistoryOfMedicalDeviceUse {
|
|
result = append(result, "Pasien Dengan Riwayat Penggunaan Peralatan Medis Masa Lalu")
|
|
}
|
|
if s.MentalOrSocialIssues {
|
|
result = append(result, "Riwayat Gangguan Mental, Bunuh Diri, Krisis Keluarga, Isu Sosial")
|
|
}
|
|
if s.FrequentERVisitsOrReadmission {
|
|
result = append(result, "Sering Masuk IGD, Readmisi RS")
|
|
}
|
|
if s.HighCareCostEstimate {
|
|
result = append(result, "Perkiraan Asuhan Dengan Biaya Tinggi")
|
|
}
|
|
if s.ComplexFinancingSystem {
|
|
result = append(result, "Kemungkinan Sistem Pembiayaan Yang Kompleks")
|
|
}
|
|
if s.AboveAverageLengthOfStay {
|
|
result = append(result, "Kasus Yang Melebihi Rata-Rata Lama Dirawat")
|
|
}
|
|
if s.ImportantOrHighRiskDischargePlanning {
|
|
result = append(result, "Rencana Pemulangan Penting / Kontinuitas Pelayanan")
|
|
}
|
|
if s.Stagnation {
|
|
result = append(result, "Stagnasi")
|
|
}
|
|
|
|
return result
|
|
}
|
|
|
|
func (p ProblemIdentification) SelectedProblemLabels() []string {
|
|
result := []string{}
|
|
|
|
if p.CareNotFollowingGuidelines {
|
|
result = append(result, "Tingkat Asuhan Tidak Sesuai Panduan/ Norma")
|
|
}
|
|
if p.OverUtilization {
|
|
result = append(result, "Over Utilization Pelayanan")
|
|
}
|
|
if p.UnderUtilization {
|
|
result = append(result, "Under Utilization Pelayanan")
|
|
}
|
|
if p.PatientNonCompliance {
|
|
result = append(result, "Ketidakpatuhan Pasien")
|
|
}
|
|
if p.InadequateEducation {
|
|
result = append(result, "Edukasi Kurang Memadai")
|
|
}
|
|
if p.LackOfFamilySupport {
|
|
result = append(result, "Kurang Dukungan Keluarga")
|
|
}
|
|
if p.DecreasedDetermination {
|
|
result = append(result, "Penurunan Determinasi Ketika Komplikasi Meningkat")
|
|
}
|
|
if p.FinancialDifficultyDuringComplications {
|
|
result = append(result, "Kendala Keuangan Ketika Komplikasi Meningkat")
|
|
}
|
|
if p.DischargeCriteriaNotMetOrDelayed {
|
|
result = append(result, "Pemulangan/ Rujukan Belum Memenuhi Kriteria/ Ditunda")
|
|
}
|
|
|
|
return result
|
|
}
|