Merge branch 'migration' of https://github.com/dikstub-rssa/simrs-be into feat/chemo-plan
# Conflicts: # internal/domain/main-entities/chemo/dto.go # internal/use-case/main-use-case/encounter/helper.go
This commit is contained in:
No files matched your search
@@ -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"`
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package chemo
|
||||
|
||||
import (
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
// std
|
||||
@@ -16,15 +17,14 @@ 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"`
|
||||
Class_Code ere.ChemoClassCode `json:"class_code"`
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Class_Code ere.ChemoClassCode `json:"class_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -37,7 +37,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"`
|
||||
Patient_Id *uint `json:"patient-id"`
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ 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"`
|
||||
@@ -96,8 +96,8 @@ 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,
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
eun "simrs-vx/internal/domain/main-entities/unit"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
eus "simrs-vx/internal/domain/main-entities/user"
|
||||
)
|
||||
|
||||
@@ -21,8 +21,8 @@ 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"` // klinik asal
|
||||
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"`
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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,7 +30,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 CreateDto struct {
|
||||
@@ -39,7 +38,6 @@ type CreateDto struct {
|
||||
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"`
|
||||
@@ -96,7 +94,7 @@ type ReadListDto struct {
|
||||
EndDate *string `json:"end-date"`
|
||||
PaymentMethod_Code *string `json:"paymentMethod-code"`
|
||||
Status_Code *string `json:"status-code"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
@@ -171,7 +169,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"`
|
||||
@@ -181,7 +179,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"`
|
||||
@@ -195,12 +193,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"`
|
||||
@@ -245,8 +241,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,
|
||||
@@ -298,3 +292,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"`
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -10,7 +10,6 @@ type ProcedureRoom struct {
|
||||
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"`
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:20"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:20"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code" gorm:"size:20"`
|
||||
}
|
||||
|
||||
@@ -5,14 +5,12 @@ import (
|
||||
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"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
}
|
||||
@@ -26,7 +24,6 @@ type ReadListDto struct {
|
||||
type FilterDto struct {
|
||||
Infra_Code *string `json:"infra-code"`
|
||||
Type_Code string `json:"type-code"`
|
||||
Unit_Code *string `json:"unit-code"`
|
||||
Specialist_Code *string `json:"specialist-code"`
|
||||
Subspecialist_Code *string `json:"subspecialist-code"`
|
||||
}
|
||||
@@ -56,8 +53,6 @@ type ResponseDto struct {
|
||||
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"`
|
||||
@@ -70,8 +65,6 @@ func (d ProcedureRoom) ToResponse() ResponseDto {
|
||||
Infra_Code: d.Infra_Code,
|
||||
Infra: d.Infra,
|
||||
Type_Code: (*string)(d.Type_Code),
|
||||
Unit_Code: d.Unit_Code,
|
||||
Unit: d.Unit,
|
||||
Specialist_Code: d.Specialist_Code,
|
||||
Specialist: d.Specialist,
|
||||
Subspecialist_Code: d.Subspecialist_Code,
|
||||
|
||||
@@ -5,13 +5,11 @@ import (
|
||||
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"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type ProcedureRoom struct {
|
||||
ebase.ProcedureRoom
|
||||
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_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,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"`
|
||||
}
|
||||
@@ -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:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Code *string `json:"unit_code" gorm:"size:20"`
|
||||
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"`
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Basic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
Specialist_Code *string `json:"specialist_code" gorm:"size:20"`
|
||||
}
|
||||
|
||||
|
||||
@@ -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=20"`
|
||||
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:20"`
|
||||
Installation *ei.Installation `json:"installation" gorm:"foreignKey:Installation_Code;references:Code"`
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
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"`
|
||||
|
||||
@@ -31,6 +31,7 @@ type (
|
||||
BornMortalityCode string
|
||||
BornLocationCode string
|
||||
SpecimentDestCode string
|
||||
ProcedureReportType string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -208,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 {
|
||||
@@ -364,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"`
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package m_dokter
|
||||
|
||||
import "time"
|
||||
|
||||
type MDokter struct {
|
||||
Kddokter uint `gorm:"column:kddokter;primaryKey;autoIncrement" json:"kddokter"`
|
||||
Kdpoly uint `gorm:"column:kdpoly" json:"kdpoly"`
|
||||
Namadokter string `gorm:"column:namadokter" json:"namadokter"`
|
||||
Kdprofesi *uint `gorm:"column:kdprofesi" json:"kdprofesi"`
|
||||
Namaprofesi *string `gorm:"column:namaprofesi" json:"namaprofesi"`
|
||||
Aktif uint16 `gorm:"column:aktif" json:"aktif"`
|
||||
KdSMF *string `gorm:"column:kdsmf" json:"kdsmf"`
|
||||
KodeDPJP *string `gorm:"column:kode_dpjp" json:"kode_dpjp"`
|
||||
NIP *string `gorm:"column:nip" json:"nip"`
|
||||
Kategori *string `gorm:"column:kategori" json:"kategori"`
|
||||
TglAkhirSIP *time.Time `gorm:"column:tgl_akhir_sip" json:"tgl_akhir_sip"`
|
||||
NoHP *string `gorm:"column:no_hp" json:"no_hp"`
|
||||
Email *string `gorm:"column:email" json:"email"`
|
||||
TglAkhirSPK *time.Time `gorm:"column:tgl_akhir_spk" json:"tgl_akhir_spk"`
|
||||
}
|
||||
|
||||
func (MDokter) TableName() string {
|
||||
return "m_dokter"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package m_login
|
||||
|
||||
type MLogin struct {
|
||||
NIP string `gorm:"column:nip;primaryKey"`
|
||||
Password string `gorm:"column:pwd"`
|
||||
SesReg string `gorm:"column:ses_reg"`
|
||||
KdPerawat uint `gorm:"column:kdperawat"`
|
||||
KdDokter uint `gorm:"column:kddokter"`
|
||||
NamaPegawai string `gorm:"column:nama_pegawai"`
|
||||
Roles int `gorm:"column:roles"`
|
||||
KdUnit uint `gorm:"column:kdunit"`
|
||||
Departemen string `gorm:"column:departemen"`
|
||||
StDokterRajalEksekutif *uint16 `gorm:"column:st_dokter_rajal_eksekutif"`
|
||||
StDokterRajalReguler *uint16 `gorm:"column:st_dokter_rajal_reguler"`
|
||||
StDokterRajalEmergency *uint16 `gorm:"column:st_dokter_rajal_emergency"`
|
||||
NIPB *string `gorm:"column:nipb"`
|
||||
Aktif uint16 `gorm:"column:aktif"`
|
||||
}
|
||||
|
||||
func (MLogin) TableName() string {
|
||||
return "m_login"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package m_pegawai
|
||||
|
||||
import "time"
|
||||
|
||||
type MPegawai struct {
|
||||
NoPeg uint `gorm:"column:no_peg;primaryKey"`
|
||||
NamaPeg string `gorm:"column:nama_peg"`
|
||||
NIPB string `gorm:"column:nipb"`
|
||||
Gol string `gorm:"column:gol"`
|
||||
SatuanKerja string `gorm:"column:satuan_kerja"`
|
||||
Ruang string `gorm:"column:ruang"`
|
||||
Pendidikan string `gorm:"column:pendidikan"`
|
||||
Tenaga string `gorm:"column:tenaga"`
|
||||
Tenaga1 string `gorm:"column:tenaga1"`
|
||||
Tenaga2 string `gorm:"column:tenaga2"`
|
||||
TMTMasuk *time.Time `gorm:"column:tmt_masuk"`
|
||||
TempatLahir string `gorm:"column:tmp_lahir"`
|
||||
TanggalLahir *time.Time `gorm:"column:tgl_lahir"`
|
||||
Alamat string `gorm:"column:alamat"`
|
||||
Telepon string `gorm:"column:telepon"`
|
||||
HP string `gorm:"column:hp"`
|
||||
Karpeg string `gorm:"column:karpeg"`
|
||||
Kelamin string `gorm:"column:kelamin"`
|
||||
Agama string `gorm:"column:agama"`
|
||||
StatusTubel uint16 `gorm:"column:status_tubel"` // smallint → bool
|
||||
NIK string `gorm:"column:nik"`
|
||||
Seksi string `gorm:"column:seksi"`
|
||||
TMTAwalSIP *time.Time `gorm:"column:tmt_awal_sip"`
|
||||
TMTAkhirSIPStr *time.Time `gorm:"column:tmt_akhir_sip_str"`
|
||||
NoSIP string `gorm:"column:no_sip"`
|
||||
NoSTR string `gorm:"column:no_str"`
|
||||
LoginID string `gorm:"column:login_id"`
|
||||
CodeKasir string `gorm:"column:code_kasir"`
|
||||
}
|
||||
|
||||
func (MPegawai) TableName() string {
|
||||
return "m_pegawai"
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package m_perawat
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type MPerawat struct {
|
||||
Idperawat *uint `json:"idperawat" gorm:"column:idperawat;primaryKey"`
|
||||
NIP string `json:"nip" gorm:"column:nip"`
|
||||
UnitKerja *uint `json:"unit_kerja" gorm:"column:unit_kerja"`
|
||||
Ruang *string `json:"ruang" gorm:"column:ruang"`
|
||||
Nama string `json:"nama" gorm:"column:nama"`
|
||||
Tempat *string `json:"tempat" gorm:"column:tempat"`
|
||||
TglLahir *time.Time `json:"tgllahir" gorm:"column:tgllahir"`
|
||||
JenisKelamin *string `json:"jeniskelamin" gorm:"column:jeniskelamin"`
|
||||
Alamat *string `json:"alamat" gorm:"column:alamat"`
|
||||
Kelurahan *string `json:"kelurahan" gorm:"column:kelurahan"`
|
||||
Kdkecamatan *uint `json:"kdkecamatan" gorm:"column:kdkecamatan"`
|
||||
Kota *string `json:"kota" gorm:"column:kota"`
|
||||
KdProvinsi *uint `json:"kdprovinsi" gorm:"column:kdprovinsi"`
|
||||
NoTelp *string `json:"notelp" gorm:"column:notelp"`
|
||||
NoKTP *string `json:"noktp" gorm:"column:noktp"`
|
||||
Status *uint `json:"status" gorm:"column:status"`
|
||||
Agama *uint `json:"agama" gorm:"column:agama"`
|
||||
Pendidikan *uint `json:"pendidikan" gorm:"column:pendidikan"`
|
||||
AlamatKTP *string `json:"alamat_ktp" gorm:"column:alamat_ktp"`
|
||||
JabFung *string `json:"jabfung" gorm:"column:jabfung"`
|
||||
JabStruk *string `json:"jabstruk" gorm:"column:jabstruk"`
|
||||
LamKer *string `json:"lamker" gorm:"column:lamker"`
|
||||
TemKer *string `json:"temker" gorm:"column:temker"`
|
||||
TemKer2 *string `json:"temker2" gorm:"column:temker2"`
|
||||
PelManKep *string `json:"pelmankep" gorm:"column:pelmankep"`
|
||||
PelTekKepGaw *string `json:"peltekkepgaw" gorm:"column:peltekkepgaw"`
|
||||
PelTekKepMedah *string `json:"peltekkepmedah" gorm:"column:peltekkepmedah"`
|
||||
PelTekKepNak *string `json:"peltekkepnak" gorm:"column:peltekkepnak"`
|
||||
PelTekKepMat *string `json:"peltekkepmat" gorm:"column:peltekkepmat"`
|
||||
PelTekKepJiwa *string `json:"peltekkepjiwa" gorm:"column:peltekkepjiwa"`
|
||||
TemKerTuj *string `json:"temkertuj" gorm:"column:temkertuj"`
|
||||
TemKerTuj2 *string `json:"temkertuj2" gorm:"column:temkertuj2"`
|
||||
TglMutasi *time.Time `json:"tglmutasi" gorm:"column:tglmutasi"`
|
||||
Alasan *string `json:"alasan" gorm:"column:alasan"`
|
||||
TglKeluar *time.Time `json:"tglkeluar" gorm:"column:tglkeluar"`
|
||||
ProgPendidikan *uint `json:"progpendidikan" gorm:"column:progpendidikan"`
|
||||
ProgPeng *string `json:"progpeng" gorm:"column:progpeng"`
|
||||
JabLain *string `json:"jablain" gorm:"column:jablain"`
|
||||
PPA uint `json:"ppa" gorm:"column:ppa"`
|
||||
Aktif uint `json:"aktif" gorm:"column:aktif"`
|
||||
}
|
||||
|
||||
func (MPerawat) TableName() string {
|
||||
return "m_perawat"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package doctor
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type DoctorLink struct {
|
||||
ecore.Main
|
||||
Simx_Id uint `json:"simx_id" gorm:"unique"`
|
||||
Simgos_Id uint `json:"simgos_id" gorm:"unique"`
|
||||
}
|
||||
|
||||
type DoctorSimxLog struct {
|
||||
ecore.Main
|
||||
Value *string `json:"value"`
|
||||
Date *time.Time `json:"date"`
|
||||
Status erc.ProcessStatusCode `json:"status"`
|
||||
ErrMessage *string `json:"errMessage"`
|
||||
}
|
||||
|
||||
type DoctorSimgosLog struct {
|
||||
ecore.Main
|
||||
Value *string `json:"value"`
|
||||
Date *time.Time `json:"date"`
|
||||
Status erc.ProcessStatusCode `json:"status"`
|
||||
ErrMessage *string `json:"errMessage"`
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package nurse
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type NurseLink struct {
|
||||
ecore.Main
|
||||
Simx_Id uint `json:"simx_id" gorm:"unique"`
|
||||
Simgos_Id uint `json:"simgos_id" gorm:"unique"`
|
||||
}
|
||||
|
||||
type NurseSimxLog struct {
|
||||
ecore.Main
|
||||
Value *string `json:"value"`
|
||||
Date *time.Time `json:"date"`
|
||||
Status erc.ProcessStatusCode `json:"status"`
|
||||
ErrMessage *string `json:"errMessage"`
|
||||
}
|
||||
|
||||
type NurseSimgosLog struct {
|
||||
ecore.Main
|
||||
Value *string `json:"value"`
|
||||
Date *time.Time `json:"date"`
|
||||
Status erc.ProcessStatusCode `json:"status"`
|
||||
ErrMessage *string `json:"errMessage"`
|
||||
}
|
||||
Reference in New Issue
Block a user