Merge branch 'migration' of https://github.com/dikstub-rssa/simrs-be into migration
This commit is contained in:
@@ -81,8 +81,8 @@ type Mr struct {
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
Kode string `json:"kdProvider" json:"kode"` // API sometimes uses different keys
|
||||
NmProvider string `json:"nmProvider" json:"nama"`
|
||||
Kode string `son:"kode"`
|
||||
NmProvider string `json:"nama"`
|
||||
}
|
||||
|
||||
type Poli struct {
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package vclaimsepcontrolletter
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
|
||||
pu "simrs-vx/pkg/use-case-helper"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -9,6 +15,7 @@ type CreateDto struct {
|
||||
Number *string `json:"number" gorm:"unique;size:20"`
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl" gorm:"unique;size:1024"`
|
||||
RequestPayload string `json:"requestPayload" validate:"maxLength=1024"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -69,3 +76,49 @@ func ToResponseList(data []VclaimSepControlLetter) []ResponseDto {
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func (c CreateDto) RequestPayloadIntoJson() ([]byte, error) {
|
||||
payload := map[string]interface{}{}
|
||||
err := json.Unmarshal([]byte(c.RequestPayload), &payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.Marshal(payload)
|
||||
}
|
||||
|
||||
type ResponseForPDF struct {
|
||||
Number string `json:"noSuratKontrol"`
|
||||
PlannedControlDate string `json:"tglRencanaKontrol"`
|
||||
IssuedDate string `json:"tglTerbit"`
|
||||
Doctor_Name string `json:"namaDokter"`
|
||||
DstUnit_Name string `json:"namaPoliTujuan"`
|
||||
ResponsibleDoctor_Name string `json:"namaDokterPembuat"`
|
||||
VclaimSep VclaimSep `json:"sep"`
|
||||
}
|
||||
|
||||
type VclaimSep struct {
|
||||
VclaimMember VclaimMember `json:"peserta"`
|
||||
Diagnose string `json:"diagnosa"`
|
||||
Number string `json:"noSep"`
|
||||
}
|
||||
|
||||
type VclaimMember struct {
|
||||
CardNumber string `json:"noKartu"`
|
||||
Name string `json:"nama"`
|
||||
BirthDate string `json:"tglLahir"`
|
||||
Gender string `json:"kelamin"`
|
||||
}
|
||||
|
||||
func (v ResponseForPDF) GenerateNameWithGender() string {
|
||||
gender := "Perempuan"
|
||||
if v.VclaimSep.VclaimMember.Gender == "L" {
|
||||
gender = "Laki-Laki"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s (%s)", v.VclaimSep.VclaimMember.Name, gender)
|
||||
}
|
||||
|
||||
func (v ResponseForPDF) GenerateBirthDate() string {
|
||||
t, _ := time.Parse("2006-01-02", v.VclaimSep.VclaimMember.BirthDate)
|
||||
return pu.FormatIndonesianDate(t)
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
package actionreport
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"time"
|
||||
|
||||
pa "simrs-vx/internal/lib/auth"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint64 `json:"encounter_id" validate:"required"`
|
||||
Date *time.Time `json:"date" validate:"required"`
|
||||
Doctor_Code string `json:"doctor_code" validate:"required"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id" validate:"required"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id" validate:"required"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id" validate:"required"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Code string `json:"nurse_code" validate:"required"`
|
||||
Value string `json:"value" validate:"required"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `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 uint64 `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Date *time.Time `json:"date"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Code string `json:"nurse_code"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
func (d ActionReport) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Date: d.Date,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Operator_Employe_Id: d.Operator_Employe_Id,
|
||||
Assistant_Employe_Id: d.Assistant_Employe_Id,
|
||||
Instrumentor_Employe_Id: d.Instrumentor_Employe_Id,
|
||||
Nurse_Code: d.Nurse_Code,
|
||||
Value: &d.Value,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ActionReport) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package actionreport
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eem "simrs-vx/internal/domain/main-entities/employee"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ActionReport struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id uint64 `json:"encounter_id" gorm:"foreignKey"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Date *time.Time `json:"date" gorm:"not null;size:20"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"size:10"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Operator_Employe_Id uint `json:"operator_employe_id"`
|
||||
Operator_Employe *eem.Employee `json:"operator_employe,omitempty" gorm:"foreignKey:Operator_Employe_Id;references:Id"`
|
||||
Assistant_Employe_Id uint `json:"assistant_employe_id"`
|
||||
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
|
||||
Instrumentor_Employe *eem.Employee `json:"instrumentor_employe,omitempty" gorm:"foreignKey:Instrumentor_Employe_Id;references:Id"`
|
||||
Diagnose *string `json:"diagnose" gorm:"size:1024"`
|
||||
Nurse_Code string `json:"nurse_code" gorm:"size:10"`
|
||||
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
|
||||
Value string `json:"value"`
|
||||
// SurgerySize_Code *string `json:"surgerySize_code" gorm:"size:10"`
|
||||
// Billing_Code *string `json:"billing_code" gorm:"size:10"`
|
||||
// SurgerySystem_Code *string `json:"surgerySystem_code" gorm:"size:10"`
|
||||
// StartAt *string `json:"startAt" gorm:"size:20"`
|
||||
// EndAt *string `json:"endAt" gorm:"size:20"`
|
||||
// AnesthesiaStartAt *string `json:"anesthesiaStartAt" gorm:"size:20"`
|
||||
// AnesthesiaEndAt *string `json:"anesthesiaEndAt" gorm:"size:20"`
|
||||
// SurgeryType_Code *string `json:"surgeryType_code" gorm:"size:10"`
|
||||
// SurgeryStage_Code *string `json:"surgeryStage_code" gorm:"size:10"`
|
||||
// BornMortality_Code *string `json:"bornMortality_code" gorm:"size:10"`
|
||||
// BornLocation_Code *string `json:"bornLocation_code" gorm:"size:10"`
|
||||
// Weight *string `json:"weight" gorm:"size:10"`
|
||||
// BornNotes *string `json:"bornNotes" gorm:"size:1024"`
|
||||
// Description *string `json:"notes" gorm:"size:1024"`
|
||||
// BleedingAmount *uint16 `json:"bleedingAmount" gorm:"size:10"`
|
||||
// BloodInType_Code *string `json:"bloodInType_code" gorm:"size:10"`
|
||||
// BloodInAmount *uint16 `json:"bloodInAmount" gorm:"size:10"`
|
||||
// Brand *string `json:"brand" gorm:"size:100"`
|
||||
// ImplantName *string `json:"implantName" gorm:"size:100"`
|
||||
// ImplantRegisterNumber *string `json:"implantRegisterNumber" gorm:"size:100"`
|
||||
// ImplantCompanionName *string `json:"implantCompanionName" gorm:"size:100"`
|
||||
// SpecimentDest_Code *string `json:"specimentDest" gorm:"size:100"`
|
||||
// TissueInfo *string `json:"tissueInfo" gorm:"size:100"`
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package apmcuorder
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"-"`
|
||||
Substances string `json:"substances"`
|
||||
Fictations string `json:"fictations"`
|
||||
Localization string `json:"localization"`
|
||||
ClinicalDiagnoses string `json:"clinicalDiagnoses"`
|
||||
Stadium string `json:"stadium"`
|
||||
ClinicalNotes string `json:"clinicalNotes"`
|
||||
CurrentHistory string `json:"currentHistory"`
|
||||
PastHistory string `json:"pastHistory"`
|
||||
PrevApMcu string `json:"prevApMcu"`
|
||||
PrevApMcuNotes string `json:"prevApMcuNotes"`
|
||||
SupportingExams string `json:"supportingExams"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package apmcuorder
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type ApMcuOrder struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
|
||||
Substances string `json:"substances"`
|
||||
Fictations string `json:"fictations"`
|
||||
Localization string `json:"localization"`
|
||||
ClinicalDiagnoses string `json:"clinicalDiagnoses"`
|
||||
Stadium string `json:"stadium"`
|
||||
ClinicalNotes *string `json:"clinicalNotes"`
|
||||
CurrentHistory string `json:"currentHistory"`
|
||||
PastHistory string `json:"pastHistory"`
|
||||
PrevApMcu *string `json:"prevApMcu"`
|
||||
PrevApMcuNotes *string `json:"prevApMcuNotes"`
|
||||
SupportingExams *string `json:"supportingExams"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package apmcuorder
|
||||
|
||||
import (
|
||||
la "simrs-vx/internal/lib/auth"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eamob "simrs-vx/internal/domain/main-entities/ap-mcu-order/base"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
eamob.CreateDto
|
||||
la.AuthInfo
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
McuOrder_Id string `json:"mcu-order-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor
|
||||
Substances string `json:"substances"`
|
||||
Fictations string `json:"fictations"`
|
||||
Localization string `json:"localization"`
|
||||
ClinicalDiagnoses string `json:"clinicalDiagnoses"`
|
||||
Stadium string `json:"stadium"`
|
||||
ClinicalNotes *string `json:"clinicalNotes"`
|
||||
PastHistory string `json:"pastHistory"`
|
||||
CurrentHistory string `json:"currentHistory"`
|
||||
PrevApMcu *string `json:"prevApMcu"`
|
||||
PrevApMcuNotes *string `json:"prevApMcuNotes"`
|
||||
SupportingExams *string `json:"supportingExams"`
|
||||
}
|
||||
|
||||
func (d ApMcuOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Number: d.Number,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
Substances: d.Substances,
|
||||
Fictations: d.Fictations,
|
||||
Localization: d.Localization,
|
||||
ClinicalDiagnoses: d.ClinicalDiagnoses,
|
||||
Stadium: d.Stadium,
|
||||
ClinicalNotes: d.ClinicalNotes,
|
||||
PastHistory: d.PastHistory,
|
||||
CurrentHistory: d.CurrentHistory,
|
||||
PrevApMcu: d.PrevApMcu,
|
||||
PrevApMcuNotes: d.PrevApMcuNotes,
|
||||
SupportingExams: d.SupportingExams,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ApMcuOrder) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package apmcuorder
|
||||
|
||||
import (
|
||||
eamob "simrs-vx/internal/domain/main-entities/ap-mcu-order/base"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type ApMcuOrder struct {
|
||||
eamob.ApMcuOrder
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
}
|
||||
|
||||
func (d ApMcuOrder) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
|
||||
func (d ApMcuOrder) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
|
||||
func (d ApMcuOrder) IsSameDoctor(doctor_code *string) bool {
|
||||
return d.Doctor_Code == *doctor_code
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package chemo_plan
|
||||
|
||||
import (
|
||||
// std
|
||||
"time"
|
||||
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
// internal - domain - main-entities
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Parent_Id *uint `json:"parent_id"`
|
||||
SeriesNumber *uint16 `json:"seriesNumber"`
|
||||
CycleNumber *uint `json:"cycleNumber"`
|
||||
PlanDate *time.Time `json:"planDate"`
|
||||
RealizationDate *time.Time `json:"realizationDate"`
|
||||
Notes *string `json:"notes"`
|
||||
Status ere.StatusProtocolChemo `json:"status"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Parent_Id *uint `json:"parent-id"`
|
||||
Protocol_Id *uint `json:"protocol-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
||||
Protocol_Id *uint `json:"protocol_id"`
|
||||
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
||||
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
||||
PlanDate *time.Time `json:"planDate"`
|
||||
RealizationDate *time.Time `json:"realizationDate"`
|
||||
Notes *string `json:"notes"`
|
||||
Status ere.StatusProtocolChemo `json:"status"`
|
||||
Reasons *string `json:"reasons"`
|
||||
}
|
||||
|
||||
func (d ChemoPlan) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Parent_Id: d.Parent_Id,
|
||||
SeriesNumber: d.SeriesNumber,
|
||||
CycleNumber: d.CycleNumber,
|
||||
PlanDate: d.PlanDate,
|
||||
RealizationDate: d.RealizationDate,
|
||||
Notes: d.Notes,
|
||||
Status: d.Status,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ChemoPlan) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package chemo_plan
|
||||
|
||||
import (
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
)
|
||||
|
||||
type ChemoPlan struct {
|
||||
ecore.Main
|
||||
Parent_Id *uint `json:"parent_id"` // chemo.Id
|
||||
Protocol_Id *uint `json:"protocol_id"`
|
||||
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
|
||||
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
|
||||
PlanDate *time.Time `json:"planDate"`
|
||||
RealizationDate *time.Time `json:"realizationDate"`
|
||||
Notes *string `json:"notes"`
|
||||
Status ere.StatusProtocolChemo `json:"status"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Reasons *string `json:"reasons"` // json
|
||||
}
|
||||
@@ -9,18 +9,21 @@ import (
|
||||
|
||||
// internal - domain - main-entities
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
|
||||
ec "simrs-vx/internal/domain/main-entities/chemo"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Patient_Weight *float32 `json:"patient_weight"`
|
||||
Patient_Height *float32 `json:"patient_height"`
|
||||
Diagnoses *string `json:"diagnoses"`
|
||||
Duration *uint `json:"duration"`
|
||||
DurationUnit_Code *erc.TimeUnitCode `json:"durationUnit_code"`
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Chemo_Id *uint `json:"chemo_id"`
|
||||
Patient_Weight *float32 `json:"patient_weight"`
|
||||
Patient_Height *float32 `json:"patient_height"`
|
||||
Diagnoses *string `json:"diagnoses"`
|
||||
Interval *uint `json:"interval"`
|
||||
Cycle *uint `json:"cycle"`
|
||||
Series *uint16 `json:"series"`
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Status_Code erc.DataVerifiedCode `json:"-"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -30,7 +33,7 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Chemo_Id *uint `json:"chemo-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -55,28 +58,32 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Patient_Weight *float32 `json:"patient_weight"`
|
||||
Patient_Height *float32 `json:"patient_height"`
|
||||
Diagnoses *string `json:"diagnoses"`
|
||||
Duration *uint `json:"duration"`
|
||||
DurationUnit_Code *erc.TimeUnitCode `json:"durationUnit_code"`
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Chemo_Id *uint `json:"chemo_id"`
|
||||
Chemo *ec.Chemo `json:"chemo,omitempty"`
|
||||
Patient_Weight *float32 `json:"patient_weight"`
|
||||
Patient_Height *float32 `json:"patient_height"`
|
||||
Diagnoses *string `json:"diagnoses"`
|
||||
Interval *uint `json:"interval"`
|
||||
Cycle *uint `json:"cycle"`
|
||||
Series *uint16 `json:"series"`
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d ChemoProtocol) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Patient_Weight: d.Patient_Weight,
|
||||
Patient_Height: d.Patient_Height,
|
||||
Diagnoses: d.Diagnoses,
|
||||
Duration: d.Duration,
|
||||
DurationUnit_Code: d.DurationUnit_Code,
|
||||
StartDate: d.StartDate,
|
||||
EndDate: d.EndDate,
|
||||
Chemo_Id: d.Chemo_Id,
|
||||
Chemo: d.Chemo,
|
||||
Patient_Weight: d.Patient_Weight,
|
||||
Patient_Height: d.Patient_Height,
|
||||
Diagnoses: d.Diagnoses,
|
||||
Interval: d.Interval,
|
||||
Cycle: d.Cycle,
|
||||
Series: d.Series,
|
||||
StartDate: d.StartDate,
|
||||
EndDate: d.EndDate,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -1,21 +1,34 @@
|
||||
package chemo_protocol
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ec "simrs-vx/internal/domain/main-entities/chemo"
|
||||
ecp "simrs-vx/internal/domain/main-entities/chemo-plan"
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
)
|
||||
|
||||
type ChemoProtocol struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Patient_Weight *float32 `json:"patient_weight"`
|
||||
Patient_Height *float32 `json:"patient_height"`
|
||||
Diagnoses *string `json:"diagnoses"`
|
||||
Duration *uint `json:"duration"`
|
||||
DurationUnit_Code *common.TimeUnitCode `json:"durationUnit_code" gorm:"size:10"`
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Chemo_Id *uint `json:"chemo_id"`
|
||||
Chemo *ec.Chemo `json:"chemo,omitempty" gorm:"foreignKey:Chemo_Id;references:Id"`
|
||||
Patient_Weight *float32 `json:"patient_weight"`
|
||||
Patient_Height *float32 `json:"patient_height"`
|
||||
Diagnoses *string `json:"diagnoses"`
|
||||
Duration *uint `json:"duration"` // not used
|
||||
DurationUnit_Code *erc.TimeUnitCode `json:"durationUnit_code"` // not used
|
||||
Interval *uint `json:"interval"`
|
||||
Cycle *uint `json:"cycle"` // total cycle
|
||||
Series *uint16 `json:"series"` // total series
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
|
||||
ChemoPlans *[]ecp.ChemoPlan `json:"chemoPlans,omitempty" gorm:"foreignKey:Protocol_Id;references:Id"`
|
||||
Patient_Id *uint `json:"patient_id"`
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package chemo
|
||||
|
||||
import (
|
||||
// std
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
"time"
|
||||
|
||||
// internal - lib
|
||||
@@ -13,14 +14,13 @@ import (
|
||||
// internal - domain - main-entities
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
eun "simrs-vx/internal/domain/main-entities/unit"
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
SrcUnit_Code *string `json:"srcUnit_code"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -33,7 +33,7 @@ type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Status_Code *erc.DataVerifiedCode `json:"status-code"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy-user-id"`
|
||||
SrcUnit_Code *string `json:"srcUnit-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -50,10 +50,12 @@ type DeleteDto struct {
|
||||
}
|
||||
|
||||
type VerifyDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
Bed *string `json:"bed" validate:"required"`
|
||||
Needs *string `json:"needs" validate:"required"`
|
||||
Id uint16 `json:"id"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
Bed *string `json:"bed"`
|
||||
Needs *string `json:"needs"`
|
||||
Doctor_Code *string `json:"doctor_code" validate:"required"`
|
||||
NextChemoDate *time.Time `json:"nextChemoDate"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
@@ -72,8 +74,11 @@ type ResponseDto struct {
|
||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty"`
|
||||
SrcUnit_Code *string `json:"srcUnit_code"`
|
||||
SrcUnit *eun.Unit `json:"srcUnit,omitempty"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
NextChemoDate *time.Time `json:"nextChemoDate"`
|
||||
}
|
||||
|
||||
func (d Chemo) ToResponse() ResponseDto {
|
||||
@@ -84,8 +89,11 @@ func (d Chemo) ToResponse() ResponseDto {
|
||||
VerifiedAt: d.VerifiedAt,
|
||||
VerifiedBy_User_Id: d.VerifiedBy_User_Id,
|
||||
VerifiedBy: d.VerifiedBy,
|
||||
SrcUnit_Code: d.SrcUnit_Code,
|
||||
SrcUnit: d.SrcUnit,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
NextChemoDate: d.NextChemoDate,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package chemo
|
||||
|
||||
import (
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
eun "simrs-vx/internal/domain/main-entities/unit"
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
)
|
||||
|
||||
type Chemo struct {
|
||||
@@ -19,8 +21,12 @@ type Chemo struct {
|
||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
|
||||
SrcUnit_Code *string `json:"src_unit_code"`
|
||||
SrcUnit *eun.Unit `json:"src_unit,omitempty" gorm:"foreignKey:SrcUnit_Code;references:Code"`
|
||||
Specialist_Code *string `json:"specialist_code"` // klinik asal
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Bed *string `json:"bed" gorm:"size:1024"`
|
||||
Needs *string `json:"needs" gorm:"size:2048"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
NextChemoDate *time.Time `json:"nextChemoDate"`
|
||||
Class_Code ere.ChemoClassCode `json:"class_code"`
|
||||
}
|
||||
|
||||
@@ -13,14 +13,14 @@ import (
|
||||
// internal - domain - main-entities
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Date *time.Time `json:"date"`
|
||||
Problem *string `json:"problem" validate:"maxLength=10240"`
|
||||
DstUnit_Code *string `json:"dstUnit_code"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Date *time.Time `json:"date"`
|
||||
Problem *string `json:"problem" validate:"maxLength=10240"`
|
||||
Specialist_Code *string `json:"dstSpecialist_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -30,9 +30,9 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
DstUnit_Code *string `json:"dstUnit-code"`
|
||||
DstDoctor_Code *string `json:"dstDoctor-code"`
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Specialist_Code *string `json:"dstSpecialist-code"`
|
||||
Doctor_Code *string `json:"doctor-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -63,29 +63,29 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Date *time.Time `json:"date"`
|
||||
Problem *string `json:"problem"`
|
||||
Solution *string `json:"solution"`
|
||||
DstUnit_Code *string `json:"dstUnit_code"`
|
||||
DstUnit *eu.Unit `json:"dstUnit,omitempty"`
|
||||
DstDoctor_Code *string `json:"dstDoctor_code"`
|
||||
DstDoctor *ed.Doctor `json:"dstDoctor,omitempty"`
|
||||
RepliedAt *time.Time `json:"repliedAt"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Date *time.Time `json:"date"`
|
||||
Problem *string `json:"problem"`
|
||||
Solution *string `json:"solution"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
RepliedAt *time.Time `json:"repliedAt"`
|
||||
}
|
||||
|
||||
func (d Consultation) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Date: d.Date,
|
||||
Problem: d.Problem,
|
||||
Solution: d.Solution,
|
||||
DstUnit_Code: d.DstUnit_Code,
|
||||
DstUnit: d.DstUnit,
|
||||
DstDoctor_Code: d.DstDoctor_Code,
|
||||
DstDoctor: d.DstDoctor,
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Date: d.Date,
|
||||
Problem: d.Problem,
|
||||
Solution: d.Solution,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type Consultation struct {
|
||||
@@ -15,11 +15,11 @@ type Consultation struct {
|
||||
Encounter *ee.Encounter `json:"encounter" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Date *time.Time `json:"date"`
|
||||
|
||||
Problem *string `json:"case" gorm:"size:10240"`
|
||||
Solution *string `json:"solution" gorm:"size:10240"`
|
||||
DstUnit_Code *string `json:"dstUnit_code"`
|
||||
DstUnit *eu.Unit `json:"dstUnit" gorm:"foreignKey:DstUnit_Code;references:Code"`
|
||||
DstDoctor_Code *string `json:"dstDoctor_code"`
|
||||
DstDoctor *ed.Doctor `json:"dstDoctor" gorm:"foreignKey:DstDoctor_Code;references:Code"`
|
||||
RepliedAt *time.Time `json:"repliedAt"`
|
||||
Problem *string `json:"case" gorm:"size:10240"`
|
||||
Solution *string `json:"solution" gorm:"size:10240"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
RepliedAt *time.Time `json:"repliedAt"`
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -66,8 +65,6 @@ type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
@@ -81,8 +78,6 @@ func (d ControlLetter) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Code: d.Subspecialist_Code,
|
||||
|
||||
@@ -8,15 +8,12 @@ import (
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type ControlLetter struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package cpmcuorderitem
|
||||
|
||||
type SubCreateDto struct {
|
||||
McuSrc_Code string `json:"mcuSrc_code" validate:"required"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cpmcuorderitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CpMcuOrderItem struct {
|
||||
ecore.BigMain // adjust this according to the needs
|
||||
CpMcuOrder_Id uint64 `json:"cpMcuOrder_id" gorm:"uniqueIndex:idx_order_src"`
|
||||
McuSrc_Code string `json:"mcuSrc_code" gorm:"uniqueIndex:idx_order_src"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
|
||||
Note *string `json:"note" gorm:"size:1024"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package cpmcuorderitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
emro "simrs-vx/internal/domain/main-entities/cp-mcu-order"
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
CpMcuOrder_Id uint64 `json:"cpMcuOrder_id"`
|
||||
McuSrc_Code string `json:"mcuSrc_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
CpMcuOrder_Id *uint64 `json:"cp-mcu-order-id"`
|
||||
McuSrc_Code *string `json:"mcu-src-code"`
|
||||
Status_Code erc.DataStatusCode `json:"status-code"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type SetScheduleDto struct {
|
||||
Id uint `json:"id"`
|
||||
ExaminationDate *time.Time `json:"examinationDate"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
CpMcuOrder_Id uint64 `json:"cpMcuOrder_id"`
|
||||
CpMcuOrder *emro.CpMcuOrder `json:"cpMcuOrder,omitempty"`
|
||||
McuSrc_Code string `json:"mcuSrc_code"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d CpMcuOrderItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
CpMcuOrder_Id: d.CpMcuOrder_Id,
|
||||
CpMcuOrder: d.CpMcuOrder,
|
||||
McuSrc_Code: d.McuSrc_Code,
|
||||
McuSrc: d.McuSrc,
|
||||
Result: d.Result,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []CpMcuOrderItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cpmcuorderitem
|
||||
|
||||
import (
|
||||
emo "simrs-vx/internal/domain/main-entities/cp-mcu-order"
|
||||
emoib "simrs-vx/internal/domain/main-entities/cp-mcu-order-item/base"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CpMcuOrderItem struct {
|
||||
emoib.CpMcuOrderItem
|
||||
CpMcuOrder *emo.CpMcuOrder `json:"cpMcuOrder,omitempty" gorm:"foreignKey:CpMcuOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d CpMcuOrderItem) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cpmcuorder
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ercl "simrs-vx/internal/domain/references/clinical"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CpMcuOrder struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
|
||||
UrgencyLevel_Code ercl.McuUrgencyLevelCode `json:"urgencyLevel_code" gorm:"not null;size:15"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
ExamScheduleDate *time.Time `json:"examinationDate"`
|
||||
Resume *string `json:"resume"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package cpmcuorder
|
||||
|
||||
import (
|
||||
la "simrs-vx/internal/lib/auth"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint `json:"encounter_id" validate:"required"`
|
||||
Number uint64 `json:"number"` // SHOULD BE AUTOMATIC WITHOUT SYNC
|
||||
UrgencyLevel_Code string `json:"urgencyLevel_code" validate:"required"`
|
||||
OtherNotes string `json:"otherNotes"`
|
||||
la.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"`
|
||||
Doctor_Code string `json:"doctor-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint
|
||||
Encounter *ee.Encounter
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor
|
||||
UrgencyLevel_Code string `json:"urgencyLevel_code" gorm:"not null;size:15"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
Resume *string `json:"resume"`
|
||||
}
|
||||
|
||||
func (d CpMcuOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Number: d.Number,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
UrgencyLevel_Code: string(d.UrgencyLevel_Code),
|
||||
OtherNotes: d.OtherNotes,
|
||||
Resume: d.Resume,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []CpMcuOrder) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cpmcuorder
|
||||
|
||||
import (
|
||||
ecmoi "simrs-vx/internal/domain/main-entities/cp-mcu-order-item/base"
|
||||
eamob "simrs-vx/internal/domain/main-entities/cp-mcu-order/base"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CpMcuOrder struct {
|
||||
eamob.CpMcuOrder
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Items []*ecmoi.CpMcuOrderItem `json:"items" gorm:"foreignKey:CpMcuOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d CpMcuOrder) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
|
||||
func (d CpMcuOrder) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
|
||||
func (d CpMcuOrder) IsSameDoctor(doctor_code *string) bool {
|
||||
return d.Doctor_Code == *doctor_code
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package devicepackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d DevicePackage) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DevicePackage) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package devicepackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type DevicePackage struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code" gorm:"unique;size:20;not null"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package devicepackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/device"
|
||||
edp "simrs-vx/internal/domain/main-entities/device-package"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
DevicePackage_Code string `json:"devicePackage_code" validate:"maxLength=20"`
|
||||
Device_Code string `json:"code" validate:"maxLength=20"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
DevicePackage_Code string `json:"devicePackage-code"`
|
||||
Device_Code string `json:"code"`
|
||||
}
|
||||
|
||||
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
|
||||
DevicePackage_Code string `json:"devicePackage_code"`
|
||||
DevicePackage *edp.DevicePackage `json:"devicePackage,omitempty"`
|
||||
Device_Code string `json:"code"`
|
||||
Device *ed.Device `json:"device,omitempty"`
|
||||
}
|
||||
|
||||
func (d DevicePackageItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
DevicePackage_Code: d.DevicePackage_Code,
|
||||
DevicePackage: d.DevicePackage,
|
||||
Device_Code: d.Device_Code,
|
||||
Device: d.Device,
|
||||
}
|
||||
resp.Id = d.Id
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DevicePackageItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package devicepackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/device"
|
||||
edp "simrs-vx/internal/domain/main-entities/device-package"
|
||||
)
|
||||
|
||||
type DevicePackageItem struct {
|
||||
ecore.Main
|
||||
DevicePackage_Code string `json:"devicePackage_code" gorm:"size:20;not null"`
|
||||
DevicePackage *edp.DevicePackage `json:"devicePackage" gorm:"foreignKey:DevicePackage_Code;references:Code"`
|
||||
Device_Code string `json:"code" gorm:"size:20;not null"`
|
||||
Device *ed.Device `json:"device" gorm:"foreignKey:Device_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package devicepackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d DevicePackage) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DevicePackage) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package devicepackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type DevicePackage struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code" gorm:"unique;size:20;not null"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -69,8 +68,6 @@ type ResponseDto struct {
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" `
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
@@ -84,8 +81,6 @@ func (d Doctor) ToResponse() ResponseDto {
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
SIP_Number: d.SIP_Number,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Code: d.Subspecialist_Code,
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -17,8 +16,6 @@ type Doctor struct {
|
||||
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
|
||||
SIP_Number *string `json:"sip_number" gorm:"unique;size:20"`
|
||||
SIP_ExpiredDate *time.Time `json:"sip_expiredDate"`
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:10"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:10"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code" gorm:"size:10"`
|
||||
|
||||
@@ -30,32 +30,41 @@ import (
|
||||
er "simrs-vx/internal/domain/main-entities/rehab/base"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Patient_Id *uint `json:"patient_id"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
|
||||
SubClass_Code *string `json:"subClass_code" validate:"maxLength=10"` // for sub
|
||||
Infra_Code *string `json:"infra_code"` // for inpatient
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
Member_Number *string `json:"member_number" validate:"maxLength=20"`
|
||||
Ref_Number *string `json:"ref_number" validate:"maxLength=20"`
|
||||
Trx_Number *string `json:"trx_number" validate:"maxLength=20"`
|
||||
Appointment_Doctor_Code *string `json:"appointment_doctor_code"`
|
||||
Adm_Employee_Id *uint `json:"-"`
|
||||
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
|
||||
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
|
||||
Appointment_Id *uint `json:"appointment_id"`
|
||||
RefTypeCode ere.RefTypeCode `json:"refTypeCode"`
|
||||
NewStatus bool `json:"newStatus"`
|
||||
VclaimReference *TRujukan `json:"vclaimReference"`
|
||||
Patient_Id *uint `json:"patient_id"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
|
||||
SubClass_Code *string `json:"subClass_code" validate:"maxLength=10"` // for sub
|
||||
Infra_Code *string `json:"infra_code"` // for inpatient
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
StartedAt *time.Time `json:"startedAt"`
|
||||
FinishedAt *time.Time `json:"finishedAt"`
|
||||
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
Member_Number *string `json:"member_number" validate:"maxLength=20"`
|
||||
RefTypeCode ere.RefTypeCode `json:"refTypeCode"`
|
||||
Ref_Number *string `json:"ref_number" validate:"maxLength=20"`
|
||||
Trx_Number *string `json:"trx_number" validate:"maxLength=20"`
|
||||
Appointment_Doctor_Code *string `json:"appointment_doctor_code"`
|
||||
Adm_Employee_Id *uint `json:"-"`
|
||||
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
|
||||
Responsible_Nurse_Code *string `json:"responsible_nurse_code"`
|
||||
Discharge_Method_Code *ere.DischargeMethodCode `json:"discharge_method_code" gorm:"size:16"`
|
||||
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
|
||||
Appointment_Id *uint `json:"appointment_id"`
|
||||
EarlyEducation *string `json:"earlyEducation"`
|
||||
MedicalDischargeEducation *string `json:"medicalDischargeEducation"`
|
||||
AdmDischargeEducation *string `json:"admDischargeEducation"`
|
||||
DischargeReason *string `json:"dischargeReason"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code" gorm:"size:10"`
|
||||
Discharge_Date *time.Time `json:"discharge_date"`
|
||||
DeathCause *edc.DeathCause `json:"deathCause"`
|
||||
NewStatus bool `json:"newStatus"`
|
||||
VclaimReference *TRujukan `json:"vclaimReference"`
|
||||
|
||||
Id uint `json:"-"`
|
||||
RecentEncounterAdm *Encounter `json:"-"` // if subClass_Code is rehab
|
||||
@@ -78,8 +87,14 @@ type TRujukan struct {
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
Patient_Identifier *string `json:"patient-identifier"`
|
||||
StartDate *string `json:"start-date"`
|
||||
EndDate *string `json:"end-date"`
|
||||
PaymentMethod_Code *string `json:"paymentMethod-code"`
|
||||
Status_Code *string `json:"status-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
@@ -89,7 +104,6 @@ type FilterDto struct {
|
||||
Patient *ep.Patient `json:"patient,omitempty"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class-code" validate:"maxLength=10"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Subspecialist_Code *string `json:"subspecialist-code"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
@@ -154,7 +168,7 @@ type CheckinDto struct {
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type SwitchUnitDto struct {
|
||||
type SwitchSpecialistDto struct {
|
||||
Id uint `json:"id"`
|
||||
PolySwitchCode *ere.PolySwitchCode `json:"polySwitchCode"`
|
||||
InternalReferences *[]eir.CreateDto `json:"internalReferences" validate:"required"`
|
||||
@@ -164,7 +178,7 @@ type SwitchUnitDto struct {
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ApproveCancelUnitDto struct {
|
||||
type ApproveCancelSpecialistDto struct {
|
||||
Id uint `json:"id"`
|
||||
InternalReferences_Id uint `json:"internalReferences_id" validate:"required"`
|
||||
Dst_Doctor_Code *string `json:"dst_doctor_code"`
|
||||
@@ -178,12 +192,10 @@ type ResponseDto struct {
|
||||
Patient *ep.Patient `json:"patient,omitempty"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
@@ -228,8 +240,6 @@ func (d Encounter) ToResponse() ResponseDto {
|
||||
Patient: d.Patient,
|
||||
RegisteredAt: d.RegisteredAt,
|
||||
Class_Code: d.Class_Code,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Code: d.Subspecialist_Code,
|
||||
@@ -281,3 +291,8 @@ func ToResponseList(data []Encounter) []ResponseDto {
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
type CreateWithPatientDto struct {
|
||||
Encounter CreateDto `json:"encounter"`
|
||||
Patient ep.CreateDto `json:"patient"`
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import (
|
||||
er "simrs-vx/internal/domain/main-entities/rehab/base"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Encounter struct {
|
||||
@@ -34,8 +33,6 @@ type Encounter struct {
|
||||
Patient *ep.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
|
||||
@@ -3,15 +3,16 @@ package infra
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
erb "simrs-vx/internal/domain/main-entities/room/base"
|
||||
|
||||
erb "simrs-vx/internal/domain/main-entities/procedure-room/base"
|
||||
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" validate:"maxLength=15"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" validate:"maxLength=20"`
|
||||
Parent_Code *string `json:"parent_code"`
|
||||
Item_Code *string `json:"-"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
@@ -31,7 +32,7 @@ type ReadListDto struct {
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup-code"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infra-group-code"`
|
||||
Parent_Code *string `json:"parent-code"`
|
||||
Item_Id *string `json:"item-code"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
@@ -69,7 +70,7 @@ type ResponseDto struct {
|
||||
Childrens []Infra `json:"childrens,omitempty"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
Rooms []erb.Basic `json:"rooms,omitempty"`
|
||||
ProcedureRooms *erb.ProcedureRoom `json:"rooms,omitempty"`
|
||||
}
|
||||
|
||||
func (d Infra) ToResponse() ResponseDto {
|
||||
@@ -79,10 +80,10 @@ func (d Infra) ToResponse() ResponseDto {
|
||||
InfraGroup_Code: d.InfraGroup_Code,
|
||||
Parent_Code: d.Parent_Code,
|
||||
// Parent: d.Parent,
|
||||
Childrens: d.Childrens,
|
||||
Item_Code: d.Item_Code,
|
||||
Item: d.Item,
|
||||
Rooms: d.Rooms,
|
||||
Childrens: d.Childrens,
|
||||
Item_Code: d.Item_Code,
|
||||
Item: d.Item,
|
||||
ProcedureRooms: d.ProcedureRooms,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
|
||||
@@ -4,20 +4,20 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
|
||||
erb "simrs-vx/internal/domain/main-entities/room/base"
|
||||
erb "simrs-vx/internal/domain/main-entities/procedure-room/base"
|
||||
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Infra struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"uniqueIndex;size:10;not null"`
|
||||
Code string `json:"code" gorm:"uniqueIndex;size:20;not null"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:15"`
|
||||
Parent_Code *string `json:"parent_code" gorm:"size:10"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:20"`
|
||||
Parent_Code *string `json:"parent_code" gorm:"size:20"`
|
||||
Parent *Infra `json:"parent" gorm:"foreignKey:Parent_Code;references:Code"`
|
||||
Childrens []Infra `json:"childrens" gorm:"foreignKey:Parent_Code;references:Code"`
|
||||
Item_Code *string `json:"item_code" gorm:"size:50"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Code;references:Code"`
|
||||
Rooms []erb.Basic `json:"rooms" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
ProcedureRooms *erb.ProcedureRoom `json:"rooms" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
|
||||
type CreateDto struct {
|
||||
Id *uint `json:"id"`
|
||||
Code *string `json:"code" validate:"maxLength=10"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" validate:"maxLength=10"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" validate:"maxLength=20"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type Installation struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" gorm:"size:10"`
|
||||
InstallationPositions []eipb.Basic `json:"installationPositions,omitempty" gorm:"foreignKey:Installation_Code;references:Code"`
|
||||
|
||||
@@ -5,17 +5,17 @@ import (
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"-"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Status_Code erc.DataApprovalCode `json:"status_code"`
|
||||
SrcDoctor_Code *string `json:"srcDoctor_code"`
|
||||
SrcNurse_Code *string `json:"srcNurse_code"`
|
||||
Encounter_Id *uint `json:"-"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Status_Code erc.DataApprovalCode `json:"status_code"`
|
||||
SrcDoctor_Code *string `json:"srcDoctor_code"`
|
||||
SrcNurse_Code *string `json:"srcNurse_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -25,10 +25,10 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Unit_Code *uint `json:"unit-code"`
|
||||
Doctor_Code *uint `json:"doctor-code"`
|
||||
Status_Code erc.DataApprovalCode `json:"status-code"`
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Specialist_Code *uint `json:"specialist-code"`
|
||||
Doctor_Code *uint `json:"doctor-code"`
|
||||
Status_Code erc.DataApprovalCode `json:"status-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -53,22 +53,22 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Doctor_Code *string `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
Status_Code *erc.DataApprovalCode `json:"status_code"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Doctor_Code *string `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
Status_Code *erc.DataApprovalCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d InternalReference) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
Status_Code: d.Status_Code,
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -6,21 +6,21 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type InternalReference struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Status_Code *erc.DataApprovalCode `json:"status_code"`
|
||||
SrcDoctor_Code *string `json:"srcDoctor_code"`
|
||||
SrcDoctor *ed.Doctor `json:"srcDoctor,omitempty" gorm:"foreignKey:SrcDoctor_Code;references:Code"`
|
||||
SrcNurse_Code *string `json:"srcNurse_code"`
|
||||
SrcNurse *en.Nurse `json:"srcNurse,omitempty" gorm:"foreignKey:SrcNurse_Code;references:Code"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Status_Code *erc.DataApprovalCode `json:"status_code"`
|
||||
SrcDoctor_Code *string `json:"srcDoctor_code"`
|
||||
SrcDoctor *ed.Doctor `json:"srcDoctor,omitempty" gorm:"foreignKey:SrcDoctor_Code;references:Code"`
|
||||
SrcNurse_Code *string `json:"srcNurse_code"`
|
||||
SrcNurse *en.Nurse `json:"srcNurse,omitempty" gorm:"foreignKey:SrcNurse_Code;references:Code"`
|
||||
Nurse_Code *string `json:"nurse_code"`
|
||||
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ type CreateDto struct {
|
||||
Uom_Code *string `json:"uom_code" validate:"maxLength=10"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Stock *int `json:"stock"`
|
||||
BuyingPrice *float64 `json:"buyingPrice"`
|
||||
SellingPrice *float64 `json:"sellingPrice"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -33,7 +35,7 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Id *uint `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package materialpackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
em "simrs-vx/internal/domain/main-entities/material"
|
||||
emp "simrs-vx/internal/domain/main-entities/material-package"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
MaterialPackage_Code string `json:"materialPackage_code" validate:"maxLength=20"`
|
||||
Material_Code string `json:"material_code" validate:"maxLength=20"`
|
||||
Count uint16 `json:"count" validate:"required"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
Sort string `json:"sort"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
MaterialPackage_Code string `json:"material-package-code"`
|
||||
Material_Code string `json:"material_code"`
|
||||
}
|
||||
|
||||
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
|
||||
MaterialPackage_Code string `json:"materialPackage_code"`
|
||||
MaterialPackage *emp.MaterialPackage `json:"materialPackage,omitempty"`
|
||||
Material_Code string `json:"material_code"`
|
||||
Material *em.Material `json:"material,omitempty"`
|
||||
Count *uint16 `json:"count"`
|
||||
}
|
||||
|
||||
func (d MaterialPackageItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
MaterialPackage_Code: d.MaterialPackage_Code,
|
||||
MaterialPackage: d.MaterialPackage,
|
||||
Material_Code: d.Material_Code,
|
||||
Material: d.Material,
|
||||
Count: d.Count,
|
||||
}
|
||||
resp.Id = d.Id
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MaterialPackageItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package materialpackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
em "simrs-vx/internal/domain/main-entities/material"
|
||||
emp "simrs-vx/internal/domain/main-entities/material-package"
|
||||
)
|
||||
|
||||
type MaterialPackageItem struct {
|
||||
ecore.Main
|
||||
MaterialPackage_Code string `json:"materialPackage_code" gorm:"size:20;not null"`
|
||||
MaterialPackage *emp.MaterialPackage `json:"materialPackage" gorm:"foreignKey:MaterialPackage_Code;references:Code"`
|
||||
Material_Code string `json:"code" gorm:"size:20;not null"`
|
||||
Material *em.Material `json:"material" gorm:"foreignKey:Material_Code;references:Code"`
|
||||
Count *uint16 `json:"count"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package materialpackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
Sort string `json:"sort"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d MaterialPackage) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MaterialPackage) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package materialpackage
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type MaterialPackage struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code" gorm:"unique;size:20;not null"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package micromcuorderitem
|
||||
|
||||
type SubCreateDto struct {
|
||||
McuSrc_Code string `json:"mcuSrc_code" validate:"required"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package micromcuorderitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type MicroMcuOrderItem struct {
|
||||
ecore.BigMain // adjust this according to the needs
|
||||
MicroMcuOrder_Id uint64 `json:"microMcuOrder_id" gorm:"uniqueIndex:idx_order_src"`
|
||||
McuSrc_Code string `json:"mcuSrc_code" gorm:"uniqueIndex:idx_order_src"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
|
||||
Note *string `json:"note" gorm:"size:1024"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package micromcuorderitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
emro "simrs-vx/internal/domain/main-entities/micro-mcu-order"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
MicroMcuOrder_Id uint64 `json:"microMcuOrder_id"`
|
||||
McuSrc_Code string `json:"mcuSrc_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
MicroMcuOrder_Id *uint64 `json:"micro-mcu-order-id"`
|
||||
McuSrc_Code *string `json:"mcu-src-code"`
|
||||
Status_Code erc.DataStatusCode `json:"status-code"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type SetScheduleDto struct {
|
||||
Id uint `json:"id"`
|
||||
ExaminationDate *time.Time `json:"examinationDate"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
MicroMcuOrder_Id uint64 `json:"microMcuOrder_id"`
|
||||
MicroMcuOrder *emro.MicroMcuOrder `json:"microMcuOrder,omitempty"`
|
||||
McuSrc_Code string `json:"mcuSrc_code"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d MicroMcuOrderItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
MicroMcuOrder_Id: d.MicroMcuOrder_Id,
|
||||
MicroMcuOrder: d.MicroMcuOrder,
|
||||
McuSrc_Code: d.McuSrc_Code,
|
||||
McuSrc: d.McuSrc,
|
||||
Result: d.Result,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MicroMcuOrderItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package micromcuorderitem
|
||||
|
||||
import (
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
emo "simrs-vx/internal/domain/main-entities/micro-mcu-order"
|
||||
emoib "simrs-vx/internal/domain/main-entities/micro-mcu-order-item/base"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type MicroMcuOrderItem struct {
|
||||
emoib.MicroMcuOrderItem
|
||||
MicroMcuOrder *emo.MicroMcuOrder `json:"microMcuOrder,omitempty" gorm:"foreignKey:MicroMcuOrder_Id;references:Id"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
|
||||
}
|
||||
|
||||
func (d MicroMcuOrderItem) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package micromcuorder
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ercl "simrs-vx/internal/domain/references/clinical"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type MicroMcuOrder struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
|
||||
Stage_Code ercl.McuOrderStageCode `json:"stage_code" gorm:"not null;size:10"`
|
||||
AxillaryTemp float64 `json:"axillaryTemp"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package micromcuorder
|
||||
|
||||
import (
|
||||
la "simrs-vx/internal/lib/auth"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
ercl "simrs-vx/internal/domain/references/clinical"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint `json:"encounter_id" validate:"required"`
|
||||
Number uint64 `json:"number"` // SHOULD BE AUTOMATIC WITHOUT SYNC
|
||||
OrderStage_Code string `json:"orderStage_code" gorm:"not null;size:10"`
|
||||
AxillaryTemp float64 `json:"axillaryTemp"`
|
||||
OtherNotes string `json:"otherNotes"`
|
||||
la.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"`
|
||||
Doctor_Code string `json:"doctor-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint
|
||||
Encounter *ee.Encounter
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor
|
||||
Stage_Code ercl.McuOrderStageCode `json:"stage_code" gorm:"not null;size:10"`
|
||||
AxillaryTemp float64 `json:"axillaryTemp"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
}
|
||||
|
||||
func (d MicroMcuOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Number: d.Number,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
Stage_Code: d.Stage_Code,
|
||||
AxillaryTemp: d.AxillaryTemp,
|
||||
OtherNotes: d.OtherNotes,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MicroMcuOrder) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package micromcuorder
|
||||
|
||||
import (
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
emmoi "simrs-vx/internal/domain/main-entities/micro-mcu-order-item/base"
|
||||
eamob "simrs-vx/internal/domain/main-entities/micro-mcu-order/base"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type MicroMcuOrder struct {
|
||||
eamob.MicroMcuOrder
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Items []*emmoi.MicroMcuOrderItem `json:"items" gorm:"foreignKey:MicroMcuOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d MicroMcuOrder) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
|
||||
func (d MicroMcuOrder) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
|
||||
func (d MicroMcuOrder) IsSameDoctor(doctor_code *string) bool {
|
||||
return d.Doctor_Code == *doctor_code
|
||||
}
|
||||
@@ -4,15 +4,15 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -22,11 +22,11 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code *string `json:"code"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
IHS_Number *string `json:"ihs-number"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Infra_Code *string `json:"infra-code"`
|
||||
Code *string `json:"code"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
IHS_Number *string `json:"ihs-number"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Infra_Code *string `json:"infra-code"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
@@ -53,26 +53,26 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code *string `json:"code"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Infra *ei.Infra `json:"infra,omitempty"`
|
||||
Code *string `json:"code"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Infra *ei.Infra `json:"infra,omitempty"`
|
||||
}
|
||||
|
||||
func (d Nurse) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Infra_Code: d.Infra_Code,
|
||||
Infra: d.Infra,
|
||||
Code: d.Code,
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Infra_Code: d.Infra_Code,
|
||||
Infra: d.Infra,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -4,17 +4,17 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
)
|
||||
|
||||
type Nurse struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code *string `json:"code" gorm:"unique;size:20"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:10"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Infra_Code *string `json:"infra_code" gorm:"size:10"`
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code *string `json:"code" gorm:"unique;size:20"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:10"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Infra_Code *string `json:"infra_code" gorm:"size:10"`
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ type UpdateDto struct {
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type SearchDto struct {
|
||||
|
||||
@@ -15,7 +15,7 @@ type Patient struct {
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
RegisteredBy_User_Name *string `json:"registeredBy_user_name" gorm:"size:100"`
|
||||
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 *Patient `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ type CreateDto struct {
|
||||
FrontTitle *string `json:"frontTitle" validate:"maxLength=50"`
|
||||
EndTitle *string `json:"endTitle" validate:"maxLength=50"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthPlace *string `json:"birthPlace" validate:"maxLength=4"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code" validate:"maxLength=4"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber" validate:"nik;maxLength=16"`
|
||||
@@ -46,14 +47,13 @@ type ReadListDto struct {
|
||||
|
||||
type FilterDto struct {
|
||||
Name string `json:"name"`
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency-code"`
|
||||
FrontTitle *string `json:"front-title"`
|
||||
EndTitle *string `json:"end-title"`
|
||||
BirthDate *time.Time `json:"birth-date,omitempty"`
|
||||
Gender_Code *erp.GenderCode `json:"gender-code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
PassportNumber *string `json:"passportNumber"`
|
||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
||||
ResidentIdentityNumber *string `json:"resident-identity-number"`
|
||||
PassportNumber *string `json:"passport-number"`
|
||||
DrivingLicenseNumber *string `json:"driving-license-number"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion-code"`
|
||||
Education_Code *erp.EducationCode `json:"education-code"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation-code"`
|
||||
@@ -61,7 +61,7 @@ type FilterDto struct {
|
||||
Nationality *string `json:"nationality"`
|
||||
Ethnic_Code *string `json:"ethnic-code"`
|
||||
Language_Code *string `json:"language-code"`
|
||||
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||
CommunicationIssueStatus bool `json:"communication-issue-status"`
|
||||
Disability *string `json:"disability"`
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ type ResponseDto struct {
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthPlace *string `json:"birthPlace"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||
BirthRegency *er.Regency `json:"birthRegency,omitempty"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
@@ -128,6 +129,7 @@ func (d *Person) ToResponse() ResponseDto {
|
||||
FrontTitle: d.FrontTitle,
|
||||
EndTitle: d.EndTitle,
|
||||
BirthDate: d.BirthDate,
|
||||
BirthPlace: d.BirthPlace,
|
||||
BirthRegency_Code: d.BirthRegency_Code,
|
||||
BirthRegency: d.BirthRegency,
|
||||
Gender_Code: d.Gender_Code,
|
||||
|
||||
@@ -23,6 +23,7 @@ type Person struct {
|
||||
FrontTitle *string `json:"frontTitle" gorm:"size:50"`
|
||||
EndTitle *string `json:"endTitle" gorm:"size:50"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthPlace *string `json:"birthPlace,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code" gorm:"size:4"`
|
||||
BirthRegency *er.Regency `json:"birthRegency,omitempty" gorm:"foreignKey:BirthRegency_Code;references:Code"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code" gorm:"size:10"`
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime" validate:"maxLength=5"`
|
||||
EndTime *string `json:"endTime" validate:"maxLength=5"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime" validate:"maxLength=5"`
|
||||
EndTime *string `json:"endTime" validate:"maxLength=5"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -20,11 +20,11 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Doctor_Code *string `json:"doctor-code"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Day_Code *erc.DayCode `json:"day-code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
Doctor_Code *string `json:"doctor-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Day_Code *erc.DayCode `json:"day-code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -48,20 +48,20 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
}
|
||||
|
||||
func (d PracticeSchedule) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Day_Code: d.Day_Code,
|
||||
StartTime: d.StartTime,
|
||||
EndTime: d.EndTime,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Day_Code: d.Day_Code,
|
||||
StartTime: d.StartTime,
|
||||
EndTime: d.EndTime,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -3,17 +3,17 @@ package practiceschedule
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type PracticeSchedule struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime" gorm:"size:5"`
|
||||
EndTime *string `json:"endTime" gorm:"size:5"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime" gorm:"size:5"`
|
||||
EndTime *string `json:"endTime" gorm:"size:5"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package procedurereport
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"time"
|
||||
|
||||
pa "simrs-vx/internal/lib/auth"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint64 `json:"encounter_id" validate:"required"`
|
||||
Date *time.Time `json:"date" validate:"required"`
|
||||
Doctor_Code string `json:"doctor_code" validate:"required"`
|
||||
Operator_Name string `json:"operator_name" validate:"required"`
|
||||
Assistant_Name string `json:"assistant_name" validate:"required"`
|
||||
Instrumentor_Name string `json:"instrumentor_name" validate:"required"`
|
||||
Anesthesia_Doctor_Code *string `json:"anesthesia_doctor_code"`
|
||||
Anesthesia_Nurse_Name *string `json:"anesthesia_nurse_name"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Name string `json:"nurse_name" validate:"required"`
|
||||
ProcedureValue string `json:"procedure_value" validate:"required"`
|
||||
ExecutionValue string `json:"execution_value" validate:"required"`
|
||||
Type_Code string `json:"type_code" validate:"required"`
|
||||
|
||||
pa.AuthInfo
|
||||
|
||||
// PROPER
|
||||
// Operator_Employe_Id uint `json:"operator_employe_id" validate:"required"`
|
||||
// Assistant_Employe_Id uint `json:"assistant_employe_id" validate:"required"`
|
||||
// Instrumentor_Employe_Id uint `json:"instrumentor_employe_id" validate:"required"`
|
||||
// Anesthesia_Doctor_Code string `json:"anesthesia_doctor_code" validate:"required"`
|
||||
// Anesthesia_Nurse_Employe_Id uint `json:"anesthesia_nurse_employe_id" validate:"required"`
|
||||
// Nurse_Code string `json:"nurse_code" validate:"required"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Type_Code string `json:"type-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `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 uint64 `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty"`
|
||||
Date *time.Time `json:"date"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Operator_Name string `json:"operator_name"`
|
||||
Assistant_Name string `json:"assistant_name"`
|
||||
Instrumentor_Name string `json:"instrumentor_name"`
|
||||
Anesthesia_Doctor_Code *string `json:"anesthesia_doctor_code"`
|
||||
Anesthesia_Nurse_Name *string `json:"anesthesia_nurse_name"`
|
||||
Diagnose *string `json:"diagnose"`
|
||||
Nurse_Name string `json:"nurse_name"`
|
||||
ProcedureValue *string `json:"procedure_value"`
|
||||
ExecutionValue *string `json:"execution_value"`
|
||||
Type_Code string `json:"type_code"`
|
||||
}
|
||||
|
||||
func (d ProcedureReport) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Date: d.Date,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Operator_Name: d.Operator_Name,
|
||||
Assistant_Name: d.Assistant_Name,
|
||||
Instrumentor_Name: d.Instrumentor_Name,
|
||||
Anesthesia_Doctor_Code: d.Anesthesia_Doctor_Code,
|
||||
Anesthesia_Nurse_Name: d.Anesthesia_Nurse_Name,
|
||||
Nurse_Name: d.Nurse_Name,
|
||||
ProcedureValue: &d.ProcedureValue,
|
||||
ExecutionValue: &d.ExecutionValue,
|
||||
Type_Code: d.Type_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ProcedureReport) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package procedurereport
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ProcedureReport struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id uint64 `json:"encounter_id" gorm:"foreignKey"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Date *time.Time `json:"date" gorm:"not null;size:20"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"size:10"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Operator_Name string `json:"operator_name"`
|
||||
Assistant_Name string `json:"assistant_name"`
|
||||
Instrumentor_Name string `json:"instrumentor_name"`
|
||||
Diagnose *string `json:"diagnose" gorm:"size:1024"`
|
||||
Nurse_Name string `json:"nurse_name"`
|
||||
Anesthesia_Doctor_Code *string `json:"anesthesia_doctor_code" gorm:"size:10"`
|
||||
Anesthesia_Doctor *ed.Doctor `json:"anesthesia,omitempty" gorm:"foreignKey:Anesthesia_Doctor_Code;references:Code"`
|
||||
Anesthesia_Nurse_Name *string `json:"anesthesia_nurse_name"`
|
||||
ProcedureValue string `json:"procedure_value"`
|
||||
ExecutionValue string `json:"execution_value"`
|
||||
Type_Code string `json:"type_code"`
|
||||
|
||||
// SurgerySize_Code *string `json:"surgerySize_code" gorm:"size:10"`
|
||||
// Billing_Code *string `json:"billing_code" gorm:"size:10"`
|
||||
// SurgerySystem_Code *string `json:"surgerySystem_code" gorm:"size:10"`
|
||||
// StartAt *string `json:"startAt" gorm:"size:20"`
|
||||
// EndAt *string `json:"endAt" gorm:"size:20"`
|
||||
// AnesthesiaStartAt *string `json:"anesthesiaStartAt" gorm:"size:20"`
|
||||
// AnesthesiaEndAt *string `json:"anesthesiaEndAt" gorm:"size:20"`
|
||||
// SurgeryType_Code *string `json:"surgeryType_code" gorm:"size:10"`
|
||||
// SurgeryStage_Code *string `json:"surgeryStage_code" gorm:"size:10"`
|
||||
// BornMortality_Code *string `json:"bornMortality_code" gorm:"size:10"`
|
||||
// BornLocation_Code *string `json:"bornLocation_code" gorm:"size:10"`
|
||||
// Weight *string `json:"weight" gorm:"size:10"`
|
||||
// BornNotes *string `json:"bornNotes" gorm:"size:1024"`
|
||||
// Description *string `json:"notes" gorm:"size:1024"`
|
||||
// BleedingAmount *uint16 `json:"bleedingAmount" gorm:"size:10"`
|
||||
// BloodInType_Code *string `json:"bloodInType_code" gorm:"size:10"`
|
||||
// BloodInAmount *uint16 `json:"bloodInAmount" gorm:"size:10"`
|
||||
// Brand *string `json:"brand" gorm:"size:100"`
|
||||
// ImplantName *string `json:"implantName" gorm:"size:100"`
|
||||
// ImplantRegisterNumber *string `json:"implantRegisterNumber" gorm:"size:100"`
|
||||
// ImplantCompanionName *string `json:"implantCompanionName" gorm:"size:100"`
|
||||
// SpecimentDest_Code *string `json:"specimentDest" gorm:"size:100"`
|
||||
// TissueInfo *string `json:"tissueInfo" gorm:"size:100"`
|
||||
|
||||
//PROPER
|
||||
// Doctor_Code string `json:"doctor_code" gorm:"size:10"`
|
||||
// Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
// Operator_Employe_Id uint `json:"operator_employe_id"`
|
||||
// Operator_Employe *eem.Employee `json:"operator_employe,omitempty" gorm:"foreignKey:Operator_Employe_Id;references:Id"`
|
||||
// Assistant_Employe_Id uint `json:"assistant_employe_id"`
|
||||
// Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
|
||||
// Instrumentor_Employe *eem.Employee `json:"instrumentor_employe,omitempty" gorm:"foreignKey:Instrumentor_Employe_Id;references:Id"`
|
||||
// Nurse_Code string `json:"nurse_code" gorm:"size:10"`
|
||||
// Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
|
||||
// Anesthesia_Doctor_Code string `json:"anesthesia_doctor_code" gorm:"size:10"`
|
||||
// Anesthesia *eem.Employee `json:"anesthesia,omitempty" gorm:"foreignKey:Anesthesia_Doctor_Code;references:Code"`
|
||||
// Anesthesia_Nurse_Employe_Id uint `json:"anesthesia_nurse_employe_id"`
|
||||
// Anesthesia_Nurse *eem.Employee `json:"anesthesia_nurse,omitempty" gorm:"foreignKey:Anesthesia_Nurse_Employe_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package procedureroomorder
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type ProcedureRoomOrderItem struct {
|
||||
ecore.BigMain
|
||||
ProcedureRoomOrder_Id uint64 `json:"procedureRoomOrder_id"`
|
||||
ProcedureRoom_Code string `json:"procedureRoom_code" gorm:"size:20"`
|
||||
Note string `json:"note" gorm:"size:255"`
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package procedureroomorder
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
epr "simrs-vx/internal/domain/main-entities/procedure-room"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
ProcedureRoomOrder_Id uint64 `json:"procedureRoomOrder_id"`
|
||||
ProcedureRoom_Code string `json:"procedureRoom_code"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id uint64 `json:"encounter-id"`
|
||||
ProcedureRoomOrder_Id uint64 `json:"procedure-room-order-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
ProcedureRoomOrder_Id uint64 `json:"procedureRoomOrder_id"`
|
||||
ProcedureRoom_Code string `json:"procedureRoom_code"`
|
||||
ProcedureRoom *epr.ProcedureRoom `json:"procedureRoom,omitempty"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
|
||||
func (d ProcedureRoomOrderItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
ProcedureRoomOrder_Id: d.ProcedureRoomOrder_Id,
|
||||
ProcedureRoom_Code: d.ProcedureRoom_Code,
|
||||
ProcedureRoom: d.ProcedureRoom,
|
||||
Note: d.Note,
|
||||
}
|
||||
resp.Id = d.Id
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ProcedureRoomOrderItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package procedureroomorder
|
||||
|
||||
import (
|
||||
epr "simrs-vx/internal/domain/main-entities/procedure-room"
|
||||
epro "simrs-vx/internal/domain/main-entities/procedure-room-order"
|
||||
eb "simrs-vx/internal/domain/main-entities/procedure-room-order-item/base"
|
||||
)
|
||||
|
||||
type ProcedureRoomOrderItem struct {
|
||||
eb.ProcedureRoomOrderItem
|
||||
ProcedureRoomOrder *epro.ProcedureRoomOrder `json:"procedureRoomOrder,omitempty" gorm:"foreignKey:ProcedureRoomOrder_Id;references:Id"`
|
||||
ProcedureRoom *epr.ProcedureRoom `json:"procedureRoom,omitempty" gorm:"foreignKey:ProcedureRoom_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package procedureroomorder
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ec "simrs-vx/internal/domain/main-entities/encounter"
|
||||
emp "simrs-vx/internal/domain/main-entities/material-package"
|
||||
epr "simrs-vx/internal/domain/main-entities/procedure-room"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint64 `json:"encounter_id" validate:"required"`
|
||||
// Infra_Code string `json:"infra_code" validate:"required"`
|
||||
MaterialPackage_Code *string `json:"materialPackage_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Encounter_Id uint64 `json:"encounter-id"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint64 `json:"encounter_id"`
|
||||
Encounter *ec.Encounter `json:"encounter,omitempty"`
|
||||
Infra_Code string `json:"procedure"`
|
||||
MaterialPackage_Code *string `json:"materialPackage_code"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
ProcedureRoom *epr.ProcedureRoom `json:"procedureRoom,omitempty"`
|
||||
MaterialPackage *emp.MaterialPackage `json:"materialPackage,omitempty"`
|
||||
}
|
||||
|
||||
func (d ProcedureRoomOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
// Infra_Code: d.Infra_Code,
|
||||
MaterialPackage_Code: d.MaterialPackage_Code,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Id = d.Id
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ProcedureRoomOrder) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package procedureroomorder
|
||||
|
||||
import (
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
emp "simrs-vx/internal/domain/main-entities/material-package"
|
||||
eproi "simrs-vx/internal/domain/main-entities/procedure-room-order-item/base"
|
||||
)
|
||||
|
||||
type ProcedureRoomOrder struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint64 `json:"encounter_id"`
|
||||
// Infra_Code string `json:"infra_code" gorm:"size:20"`
|
||||
// ProcedureRoom *epr.ProcedureRoom `json:"procedureRoom,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
MaterialPackage_Code *string `json:"materialPackage_code" gorm:"size:20"`
|
||||
MaterialPackage *emp.MaterialPackage `json:"materialPackage,omitempty" gorm:"foreignKey:MaterialPackage_Code;references:Code"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code" gorm:"size:20"`
|
||||
Items []eproi.ProcedureRoomOrderItem `json:"items,omitempty" gorm:"foreignKey:ProcedureRoomOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d ProcedureRoomOrder) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package procedureroombase
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type ProcedureRoom struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code" gorm:"unique;size:20"` // copied from infra code
|
||||
Infra_Code *string `json:"infra_code" gorm:"size:20;unique"`
|
||||
Type_Code *ero.ProdcedureRoomTypeCode `json:"type_code" gorm:"size:10"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:20"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code" gorm:"size:20"`
|
||||
}
|
||||
|
||||
// THIS IS ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
|
||||
// func (ProcedureRoom) TableName() string {
|
||||
// return "Room"
|
||||
// }
|
||||
+10
-10
@@ -1,16 +1,16 @@
|
||||
package room
|
||||
package procedureroom
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code *string `json:"code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
}
|
||||
@@ -23,7 +23,7 @@ type ReadListDto struct {
|
||||
|
||||
type FilterDto struct {
|
||||
Infra_Code *string `json:"infra-code"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Type_Code string `json:"type-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Subspecialist_Code *string `json:"subspecialist-code"`
|
||||
}
|
||||
@@ -49,22 +49,22 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Type_Code *string `json:"type_code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Infra *ei.Infra `json:"infra,omitempty"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
|
||||
}
|
||||
|
||||
func (d Room) ToResponse() ResponseDto {
|
||||
func (d ProcedureRoom) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Infra_Code: d.Infra_Code,
|
||||
Infra: d.Infra,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Type_Code: (*string)(d.Type_Code),
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Code: d.Subspecialist_Code,
|
||||
@@ -74,7 +74,7 @@ func (d Room) ToResponse() ResponseDto {
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Room) []ResponseDto {
|
||||
func ToResponseList(data []ProcedureRoom) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
@@ -0,0 +1,15 @@
|
||||
package procedureroom
|
||||
|
||||
import (
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
ebase "simrs-vx/internal/domain/main-entities/procedure-room/base"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
)
|
||||
|
||||
type ProcedureRoom struct {
|
||||
ebase.ProcedureRoom
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package radiologymcuorderitem
|
||||
|
||||
type SubCreateDto struct {
|
||||
McuSrc_Code string `json:"mcuSrc_code" validate:"required"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package radiologymcuorderitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type RadiologyMcuOrderItem struct {
|
||||
ecore.BigMain // adjust this according to the needs
|
||||
RadiologyMcuOrder_Id uint64 `json:"radiologyMcuOrder_id" gorm:"uniqueIndex:idx_order_src"`
|
||||
McuSrc_Code string `json:"mcuSrc_code" gorm:"uniqueIndex:idx_order_src"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
|
||||
Note *string `json:"note" gorm:"size:1024"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package radiologymcuorderitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ems "simrs-vx/internal/domain/main-entities/mcu-src"
|
||||
emro "simrs-vx/internal/domain/main-entities/radiology-mcu-order"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
RadiologyMcuOrder_Id uint64 `json:"radiologyMcuOrder_id"`
|
||||
McuSrc_Code string `json:"mcuSrc_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
RadiologyMcuOrder_Id *uint64 `json:"radiology-mcu-order-id"`
|
||||
McuSrc_Code *string `json:"mcu-src-code"`
|
||||
Status_Code erc.DataStatusCode `json:"status-code"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type SetScheduleDto struct {
|
||||
Id uint `json:"id"`
|
||||
ExaminationDate *time.Time `json:"examinationDate"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
RadiologyMcuOrder_Id uint64 `json:"radiologyMcuOrder_id"`
|
||||
RadiologyMcuOrder *emro.RadiologyMcuOrder `json:"radiologyMcuOrder,omitempty"`
|
||||
McuSrc_Code string `json:"mcuSrc_code"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
|
||||
Result *string `json:"result"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d RadiologyMcuOrderItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
RadiologyMcuOrder_Id: d.RadiologyMcuOrder_Id,
|
||||
RadiologyMcuOrder: d.RadiologyMcuOrder,
|
||||
McuSrc_Code: d.McuSrc_Code,
|
||||
McuSrc: d.McuSrc,
|
||||
Result: d.Result,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []RadiologyMcuOrderItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package radiologymcuorderitem
|
||||
|
||||
import (
|
||||
emo "simrs-vx/internal/domain/main-entities/radiology-mcu-order"
|
||||
emoib "simrs-vx/internal/domain/main-entities/radiology-mcu-order-item/base"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type RadiologyMcuOrderItem struct {
|
||||
emoib.RadiologyMcuOrderItem
|
||||
RadiologyMcuOrder *emo.RadiologyMcuOrder `json:"radiologyMcuOrder,omitempty" gorm:"foreignKey:RadiologyMcuOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d RadiologyMcuOrderItem) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package radiologymcuorder
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type RadiologyMcuOrder struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
|
||||
ClinicalNotes *string `json:"clinicalNotes"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
Resume *string `json:"resume"`
|
||||
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package radiologymcuorder
|
||||
|
||||
import (
|
||||
la "simrs-vx/internal/lib/auth"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
ermoi "simrs-vx/internal/domain/main-entities/radiology-mcu-order-item/base"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Number *uint64 `json:"number"` // SHOULD BE AUTOMATIC WITHOUT SYNC
|
||||
Doctor_Code string `json:"-" validate:"required"`
|
||||
ClinicalNotes *string `json:"clinicalNotes"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
Items []ermoi.SubCreateDto `json:"items" validate:"required"`
|
||||
la.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"`
|
||||
Doctor_Code string `json:"doctor-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint64 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.BigMain
|
||||
Encounter_Id uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter
|
||||
Number uint64 `json:"number"`
|
||||
Doctor_Code string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor
|
||||
ClinicalNotes *string `json:"clinicalNotes"`
|
||||
OtherNotes *string `json:"otherNotes"`
|
||||
Resume *string `json:"resume"`
|
||||
Items []*ermoi.RadiologyMcuOrderItem
|
||||
}
|
||||
|
||||
func (d RadiologyMcuOrder) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Encounter_Id: d.Encounter_Id,
|
||||
Encounter: d.Encounter,
|
||||
Number: d.Number,
|
||||
Doctor_Code: d.Doctor_Code,
|
||||
Doctor: d.Doctor,
|
||||
ClinicalNotes: d.ClinicalNotes,
|
||||
OtherNotes: d.OtherNotes,
|
||||
Resume: d.Resume,
|
||||
}
|
||||
resp.BigMain = d.BigMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []RadiologyMcuOrder) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package radiologymcuorder
|
||||
|
||||
import (
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
ermoi "simrs-vx/internal/domain/main-entities/radiology-mcu-order-item/base"
|
||||
eamob "simrs-vx/internal/domain/main-entities/radiology-mcu-order/base"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type RadiologyMcuOrder struct {
|
||||
eamob.RadiologyMcuOrder
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
|
||||
Items []*ermoi.RadiologyMcuOrderItem `json:"items" gorm:"foreignKey:RadiologyMcuOrder_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d RadiologyMcuOrder) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
|
||||
func (d RadiologyMcuOrder) IsCompleted() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
|
||||
func (d RadiologyMcuOrder) IsSameDoctor(doctor_code *string) bool {
|
||||
return d.Doctor_Code == *doctor_code
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package registrator
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Employee_Id uint `json:"employee_id"`
|
||||
Installation_Code string `json:"installation_code" validate:"maxLength=20"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
Installation_Code *string `json:"installation-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id *uint `json:"id"`
|
||||
Employee_Id *uint `json:"employee_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
|
||||
Employee_Id uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
Installation_Code string `json:"installation_code"`
|
||||
Installation *ei.Installation `json:"installation,omitempty"`
|
||||
}
|
||||
|
||||
func (d Registrator) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
Installation_Code: d.Installation_Code,
|
||||
Installation: d.Installation,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Registrator) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package registrator
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
)
|
||||
|
||||
type Registrator struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
Installation_Code string `json:"installation_code" gorm:"size:20"`
|
||||
Installation *ei.Installation `json:"installation,omitempty" gorm:"foreignKey:Installation_Code;references:Code"`
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package base
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ess "simrs-vx/internal/domain/main-entities/subspecialist"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Basic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Infra_Code *string `json:"infra_code" gorm:"size:10"`
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:10"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:10"`
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code" gorm:"size:10"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Code;references:Code"`
|
||||
}
|
||||
|
||||
func (Basic) TableName() string {
|
||||
return "Room"
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package room
|
||||
|
||||
import (
|
||||
ei "simrs-vx/internal/domain/main-entities/infra"
|
||||
ebase "simrs-vx/internal/domain/main-entities/room/base"
|
||||
)
|
||||
|
||||
type Room struct {
|
||||
ebase.Basic
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
}
|
||||
@@ -27,6 +27,7 @@ type CreateDto struct {
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
@@ -38,16 +39,17 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
@@ -84,3 +86,122 @@ func ToResponseList(data []Screening) []ResponseDto {
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@@ -18,3 +18,7 @@ type Screening struct {
|
||||
Value *string `json:"value"`
|
||||
FileUrl *string `json:"fileUrl" gorm:"size:1024"`
|
||||
}
|
||||
|
||||
func (d Screening) IsFormA() bool {
|
||||
return d.Type == erc.SFTCA
|
||||
}
|
||||
|
||||
@@ -37,16 +37,19 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id uint `json:"id"`
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
|
||||
@@ -17,6 +17,6 @@ type Soapi struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *eem.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
Time *time.Time `json:"time"`
|
||||
TypeCode erc.SoapiTypeCode `json:"type_code" gorm:"size:11"`
|
||||
TypeCode erc.SoapiTypeCode `json:"type_code" gorm:"size:15"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
@@ -4,14 +4,13 @@ import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
espb "simrs-vx/internal/domain/main-entities/specialist-position/base"
|
||||
essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Id *uint `json:"id"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Id *uint `json:"id"`
|
||||
Installation_Code string `json:"installation_code"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -22,10 +21,9 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -54,8 +52,6 @@ type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
SpecialistPositions []espb.Basic `json:"specialistPositions,omitempty"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty"`
|
||||
}
|
||||
@@ -64,8 +60,6 @@ func (d Specialist) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Unit: d.Unit,
|
||||
Unit_Code: d.Unit_Code,
|
||||
SpecialistPositions: d.SpecialistPositions,
|
||||
Subspecialists: d.Subspecialists,
|
||||
}
|
||||
|
||||
@@ -2,17 +2,17 @@ package specialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
eub "simrs-vx/internal/domain/main-entities/specialist-position/base"
|
||||
essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Specialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:10"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
SpecialistPositions []eub.Basic `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Installation_Code *string `json:"installation_code" gorm:"size:20"`
|
||||
Installation *ei.Installation `json:"installation,omitempty" gorm:"foreignKey:Installation_Code;references:Code"`
|
||||
SpecialistPositions []eub.Basic `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type CreateDto struct {
|
||||
Subspecialist_Code *string `json:"subspecialist_code" validate:"required"`
|
||||
Code string `json:"code" validate:"maxLength=10;required"`
|
||||
Code string `json:"code" validate:"maxLength=20;required"`
|
||||
Name string `json:"name" validate:"maxLength=30;required"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
|
||||
type Basic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:10"`
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:20"`
|
||||
}
|
||||
|
||||
func (Basic) TableName() string {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type CreateDto struct {
|
||||
Id *uint `json:"id"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package base
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type Basic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:10"`
|
||||
Code string `json:"code" gorm:"unique;size:10;not null"`
|
||||
Name string `json:"name" gorm:"size:30;not null"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (Basic) TableName() string {
|
||||
return "UnitPosition"
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package unit_position
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Unit_Code *string `json:"unit_code" validate:"required"`
|
||||
Code string `json:"code" validate:"maxLength=10;required"`
|
||||
Name string `json:"name" validate:"maxLength=30;required"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
HeadStatus *bool `json:"head-status"`
|
||||
Employee_Id *uint `json:"employee-id"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
HeadStatus bool `json:"headStatus"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
}
|
||||
|
||||
func (d UnitPosition) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
HeadStatus: d.HeadStatus,
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []UnitPosition) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package unit_position
|
||||
|
||||
import (
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
eub "simrs-vx/internal/domain/main-entities/unit-position/base"
|
||||
)
|
||||
|
||||
type UnitPosition struct {
|
||||
eub.Basic
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
package unit
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
eipb "simrs-vx/internal/domain/main-entities/unit-position/base"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Id *uint `json:"id"`
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Installation_Code *string `json:"installation-code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Code *string `json:"code"`
|
||||
Includes string `json:"includes"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Installation *ei.Installation `json:"installation,omitempty"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
UnitPositions []eipb.Basic `json:"unitPositions,omitempty"`
|
||||
}
|
||||
|
||||
func (d Unit) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Installation_Code: d.Installation_Code,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
UnitPositions: d.UnitPositions,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
if d.Installation != nil {
|
||||
resp.Installation = d.Installation
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Unit) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package unit
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
eub "simrs-vx/internal/domain/main-entities/unit-position/base"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Unit struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Installation_Code *string `json:"installation_code" gorm:"size:10"`
|
||||
Installation *ei.Installation `json:"installation" gorm:"foreignKey:Installation_Code;references:Code"`
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Type_Code *ero.UnitTypeCode `json:"type_code"`
|
||||
UnitPositions []eub.Basic `json:"unitPositions,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
}
|
||||
@@ -13,22 +13,24 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name" validate:"maxLength=25"`
|
||||
Password string `json:"password" validate:"maxLength=255"`
|
||||
Name string `json:"name" validate:"required;maxLength=50"`
|
||||
Password string `json:"password" validate:"required;maxLength=255"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20" validate:"required"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Employee *EmployeUpdateDto `json:"employee"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20"`
|
||||
|
||||
Employee *EmployeUpdateDto `json:"employee"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -87,11 +89,20 @@ func (d *User) ToResponse() ResponseDto {
|
||||
type EmployeUpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
User_Id *uint `json:"-"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number" validate:"maxLength=20"`
|
||||
Position_Code erg.EmployeePositionCode `json:"position_code" validate:"maxLength=20"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
// TODO: Extras
|
||||
// Code *string `json:"code" validate:"maxLength=20"`
|
||||
// IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
// SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
// Installation_Code *string `json:"installation_code"`
|
||||
// Unit_Code *string `json:"unit_code"`
|
||||
// Specialist_Code *string `json:"specialist_code"`
|
||||
// Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
// Infra_Code *string `json:"infra_code"`
|
||||
}
|
||||
|
||||
func ToResponseList(data []User) []ResponseDto {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
type User struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"unique;not null;size:25"`
|
||||
Name string `json:"name" gorm:"unique;not null;size:50"`
|
||||
Password string `json:"password" gorm:"not null;size:255"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20"`
|
||||
|
||||
@@ -9,6 +9,7 @@ type (
|
||||
InstructionCode string
|
||||
HeadToToeCode string
|
||||
McuUrgencyLevelCode string
|
||||
McuOrderStageCode string
|
||||
McuScopeCode string
|
||||
SoapiTypeCode string
|
||||
MedicalActionTypeCode string
|
||||
@@ -30,6 +31,7 @@ type (
|
||||
BornMortalityCode string
|
||||
BornLocationCode string
|
||||
SpecimentDestCode string
|
||||
ProcedureReportType string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -125,6 +127,9 @@ const (
|
||||
MULCPF McuUrgencyLevelCode = "priority-form" // Form Prioritas
|
||||
MULCRT McuUrgencyLevelCode = "routine" // Pemeriksaan Rutin
|
||||
|
||||
MOSFirst McuOrderStageCode = "first" // Stage 1
|
||||
MOSSecond McuOrderStageCode = "repeat" // Stage 2
|
||||
|
||||
STCEarlyNurse SoapiTypeCode = "early-nursery" // Kajian Awal Keperawatan
|
||||
STCEEarlyMedic SoapiTypeCode = "early-medic" // Kajian Awal Rehab Medis
|
||||
STCEarlyRehab SoapiTypeCode = "early-rehab" // Kajian Awal Rehab Medik
|
||||
@@ -133,6 +138,7 @@ const (
|
||||
STCDevRecord SoapiTypeCode = "dev-record" // Catatan Perkembangan
|
||||
STCKfrAdm SoapiTypeCode = "kfr-adm" // soapi untuk kfr
|
||||
STCKfrSeries SoapiTypeCode = "kfr-series" // soapi untuk kfr
|
||||
STCAmbResume SoapiTypeCode = "amb-resume" // Rajal resume
|
||||
|
||||
MATCChemo MedicalActionTypeCode = "chemo"
|
||||
MATCHemo MedicalActionTypeCode = "hemo"
|
||||
@@ -203,37 +209,40 @@ const (
|
||||
MSCMicroLab McuScopeCode = "micro-lab"
|
||||
MSCApLab McuScopeCode = "ap-lab"
|
||||
|
||||
SSCSmall SurgerySizeCode = ""
|
||||
SSCMedium SurgerySizeCode = ""
|
||||
SSCLarge SurgerySizeCode = ""
|
||||
SSCSpecial SurgerySizeCode = ""
|
||||
SSCSmall SurgerySizeCode = "small"
|
||||
SSCMedium SurgerySizeCode = "medium"
|
||||
SSCLarge SurgerySizeCode = "large"
|
||||
SSCSpecial SurgerySizeCode = "special"
|
||||
|
||||
SSyCCito SurgerySystemCode = ""
|
||||
SSyCUrgent SurgerySystemCode = ""
|
||||
SSyCEfective SurgerySystemCode = ""
|
||||
SSyCSpecial SurgerySystemCode = ""
|
||||
SSyCCito SurgerySystemCode = "cito"
|
||||
SSyCUrgent SurgerySystemCode = "urgent"
|
||||
SSyCEfective SurgerySystemCode = "efective"
|
||||
SSyCSpecial SurgerySystemCode = "special"
|
||||
|
||||
STCClean SurgeryTypeCode = ""
|
||||
STCCleanCtm SurgeryTypeCode = ""
|
||||
STCUncleanCtm SurgeryTypeCode = ""
|
||||
STCUnclean SurgeryTypeCode = ""
|
||||
STCClean SurgeryTypeCode = "clean"
|
||||
STCCleanCtm SurgeryTypeCode = "clean-ctm"
|
||||
STCUncleanCtm SurgeryTypeCode = "unclean-ctm"
|
||||
STCUnclean SurgeryTypeCode = "unclean"
|
||||
|
||||
SStCFirst SurgeryStageCode = ""
|
||||
SStCRepeat SurgeryStageCode = ""
|
||||
SStCFirst SurgeryStageCode = "first"
|
||||
SStCRepeat SurgeryStageCode = "repeat"
|
||||
|
||||
BMCAlive BornMortalityCode = ""
|
||||
BMCDead BornMortalityCode = ""
|
||||
BMCAlive BornMortalityCode = "alive"
|
||||
BMCDead BornMortalityCode = "dead"
|
||||
|
||||
BLCExtMiw BornLocationCode = ""
|
||||
BLCExtDoc BornLocationCode = ""
|
||||
BLCTradMiw BornLocationCode = ""
|
||||
BLCLocalMed BornLocationCode = ""
|
||||
BLCExtParamedic BornLocationCode = ""
|
||||
BLCExtMiw BornLocationCode = "ext-miw"
|
||||
BLCExtDoc BornLocationCode = "ext-doc"
|
||||
BLCTradMiw BornLocationCode = "trad-miw"
|
||||
BLCLocalMed BornLocationCode = "local-med"
|
||||
BLCExtParamedic BornLocationCode = "ext-paramedic"
|
||||
|
||||
SDCAp SpecimentDestCode = ""
|
||||
SDCMicro SpecimentDestCode = ""
|
||||
SDCLab SpecimentDestCode = ""
|
||||
SDCNone SpecimentDestCode = ""
|
||||
SDCAp SpecimentDestCode = "ap"
|
||||
SDCMicro SpecimentDestCode = "micro"
|
||||
SDCLab SpecimentDestCode = "lab"
|
||||
SDCNone SpecimentDestCode = "none"
|
||||
|
||||
PRTProcedure ProcedureReportType = "procedure"
|
||||
PRTSurgery ProcedureReportType = "surgery"
|
||||
)
|
||||
|
||||
type Soapi struct {
|
||||
@@ -359,8 +368,11 @@ type HeadToToe struct {
|
||||
BodyOthers string `json:"body-others,omitempty"`
|
||||
}
|
||||
|
||||
type RecordAction struct {
|
||||
Procedures []string `json:"procedures"`
|
||||
type ProcedureRecord struct {
|
||||
Procedures []CodeWithName `json:"procedures"`
|
||||
}
|
||||
|
||||
type ProcedureExecution struct {
|
||||
SurgerySize_Code *string `json:"surgerySize_code"`
|
||||
Billing_Code *string `json:"billing_code"`
|
||||
SurgerySystem_Code *string `json:"surgerySystem_code"`
|
||||
@@ -385,3 +397,34 @@ type RecordAction struct {
|
||||
SpecimentDest_Code *string `json:"specimentDest" 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 int `json:"case-status,omitempty"`
|
||||
EncounterStatus int `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"`
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ type (
|
||||
PolySwitchCode string
|
||||
DocTypeCode string
|
||||
EntityTypeCode string
|
||||
StatusProtocolChemo string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -123,10 +124,15 @@ const (
|
||||
DTCGC DocTypeCode = "general-consent"
|
||||
DTCVSCL DocTypeCode = "vclaim-control-letter" // vclaim control letter
|
||||
DTCResume DocTypeCode = "resume" // Resume
|
||||
DTCScreening DocTypeCode = "screening" // Screening
|
||||
|
||||
ETCPerson EntityTypeCode = "person"
|
||||
ETCEncounter EntityTypeCode = "encounter"
|
||||
ETCMCU EntityTypeCode = "mcu"
|
||||
|
||||
SPCComplete StatusProtocolChemo = "complete"
|
||||
SPCPlanned StatusProtocolChemo = "planned"
|
||||
SPCSchedule StatusProtocolChemo = "schedule"
|
||||
)
|
||||
|
||||
func (ec EncounterClassCode) Code() string {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user