Merge branch 'dev' of github.com:dikstub-rssa/simrs-be into fix/anything-moko
This commit is contained in:
No files matched your search
@@ -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,86 @@
|
||||
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"`
|
||||
}
|
||||
|
||||
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,24 @@
|
||||
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"`
|
||||
}
|
||||
@@ -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,6 +1,7 @@
|
||||
package chemo
|
||||
|
||||
import (
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
// std
|
||||
"time"
|
||||
|
||||
@@ -50,10 +51,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
|
||||
}
|
||||
@@ -74,6 +77,9 @@ type ResponseDto struct {
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty"`
|
||||
SrcUnit_Code *string `json:"srcUnit_code"`
|
||||
SrcUnit *eun.Unit `json:"srcUnit,omitempty"`
|
||||
Doctor_Code *string `json:"doctor_code"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
NextChemoDate *time.Time `json:"nextChemoDate"`
|
||||
}
|
||||
|
||||
func (d Chemo) ToResponse() ResponseDto {
|
||||
@@ -86,6 +92,9 @@ func (d Chemo) ToResponse() ResponseDto {
|
||||
VerifiedBy: d.VerifiedBy,
|
||||
SrcUnit_Code: d.SrcUnit_Code,
|
||||
SrcUnit: d.SrcUnit,
|
||||
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"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
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"
|
||||
)
|
||||
|
||||
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_Code *string `json:"src_unit_code"` // klinik asal
|
||||
SrcUnit *eun.Unit `json:"src_unit,omitempty" gorm:"foreignKey:SrcUnit_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"`
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -34,28 +34,39 @@ import (
|
||||
)
|
||||
|
||||
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
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -60,6 +60,7 @@ type UpdateDto struct {
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type SearchDto struct {
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -9,6 +9,7 @@ type (
|
||||
InstructionCode string
|
||||
HeadToToeCode string
|
||||
McuUrgencyLevelCode string
|
||||
McuOrderStageCode string
|
||||
McuScopeCode string
|
||||
SoapiTypeCode string
|
||||
MedicalActionTypeCode string
|
||||
@@ -126,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
|
||||
@@ -403,8 +407,8 @@ type SoapiSrc struct {
|
||||
|
||||
type EarlyMedicValue struct {
|
||||
Vaccinated bool `json:"vaccinated,omitempty"`
|
||||
CaseStatus string `json:"case-status,omitempty"`
|
||||
EncounterStatus string `json:"encounter-status,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"`
|
||||
|
||||
@@ -22,6 +22,7 @@ type (
|
||||
PolySwitchCode string
|
||||
DocTypeCode string
|
||||
EntityTypeCode string
|
||||
StatusProtocolChemo string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -128,6 +129,10 @@ const (
|
||||
ETCPerson EntityTypeCode = "person"
|
||||
ETCEncounter EntityTypeCode = "encounter"
|
||||
ETCMCU EntityTypeCode = "mcu"
|
||||
|
||||
SPCComplete StatusProtocolChemo = "complete"
|
||||
SPCPlanned StatusProtocolChemo = "planned"
|
||||
SPCSchedule StatusProtocolChemo = "schedule"
|
||||
)
|
||||
|
||||
func (ec EncounterClassCode) Code() string {
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
package m_pasien
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
e "simrs-vx/internal/domain/main-entities/patient"
|
||||
pr "simrs-vx/internal/domain/main-entities/person"
|
||||
pa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
pab "simrs-vx/internal/domain/main-entities/person-address/base"
|
||||
pc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
rf "simrs-vx/internal/domain/references/person"
|
||||
|
||||
"time"
|
||||
)
|
||||
|
||||
type MPasienDto struct {
|
||||
Id uint `json:"id" gorm:"primaryKey;autoIncrement;column:id"`
|
||||
Nomr string `json:"nomr" gorm:"uniqueIndex;column:nomr"`
|
||||
Title string `json:"title" gorm:"column:title"`
|
||||
Nama string `json:"nama" gorm:"column:nama"`
|
||||
Tempat string `json:"tempat" gorm:"column:tempat"`
|
||||
Tgllahir string `json:"tgllahir" gorm:"column:tgllahir"`
|
||||
Jeniskelamin string `json:"jeniskelamin" gorm:"column:jeniskelamin"`
|
||||
Alamat string `json:"alamat" gorm:"column:alamat"`
|
||||
Kelurahan uint64 `json:"kelurahan" gorm:"column:kelurahan"`
|
||||
Kdkecamatan uint `json:"kdkecamatan" gorm:"column:kdkecamatan"`
|
||||
Kota uint `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"`
|
||||
SuamiOrtu *string `json:"suami_ortu" gorm:"column:suami_ortu"`
|
||||
Pekerjaan string `json:"pekerjaan" gorm:"column:pekerjaan"`
|
||||
Status uint `json:"status" gorm:"column:status"`
|
||||
Agama uint `json:"agama" gorm:"column:agama"`
|
||||
Pendidikan uint `json:"pendidikan" gorm:"column:pendidikan"`
|
||||
Kdcarabayar *uint `json:"kdcarabayar" gorm:"column:kdcarabayar"`
|
||||
Nip *string `json:"nip" gorm:"column:nip"`
|
||||
Tgldaftar string `json:"tgldaftar" gorm:"column:tgldaftar"`
|
||||
AlamatKtp string `json:"alamat_ktp" gorm:"column:alamat_ktp"`
|
||||
ParentNomr *string `json:"parent_nomr" gorm:"column:parent_nomr"`
|
||||
Kepercayaan string `json:"kepercayaan" gorm:"column:kepercayaan"`
|
||||
PenanggungjawabNama string `json:"penanggungjawab_nama" gorm:"column:penanggungjawab_nama"`
|
||||
PenanggungjawabHubungan string `json:"penanggungjawab_hubungan" gorm:"column:penanggungjawab_hubungan"`
|
||||
PenanggungjawabAlamat string `json:"penanggungjawab_alamat" gorm:"column:penanggungjawab_alamat"`
|
||||
PenanggungjawabPhone string `json:"penanggungjawab_phone" gorm:"column:penanggungjawab_phone"`
|
||||
NoKartu string `json:"no_kartu" gorm:"column:no_kartu"`
|
||||
JnsPasien string `json:"jns_pasien" gorm:"column:jns_pasien"`
|
||||
Nk *string `json:"nk" gorm:"column:nk"`
|
||||
Kdprovider *string `json:"kdprovider" gorm:"column:kdprovider"`
|
||||
Nmprovider *string `json:"nmprovider" gorm:"column:nmprovider"`
|
||||
Kelas *uint `json:"kelas" gorm:"column:kelas"`
|
||||
Sim *string `json:"sim" gorm:"column:sim"`
|
||||
Paspor *string `json:"paspor" gorm:"column:paspor"`
|
||||
Disabilitas *string `json:"disabilitas" gorm:"column:disabilitas"`
|
||||
Bahasa string `json:"bahasa" gorm:"column:bahasa"`
|
||||
HambatanKomunikasi string `json:"hambatan_komunikasi" gorm:"column:hambatan_komunikasi"`
|
||||
Kebangsaan string `json:"kebangsaan" gorm:"column:kebangsaan"`
|
||||
Notelprumah1 string `json:"notelprumah1" gorm:"column:notelprumah1"`
|
||||
Notelprumah2 *string `json:"notelprumah2" gorm:"column:notelprumah2"`
|
||||
Notelpkantor string `json:"notelpkantor" gorm:"column:notelpkantor"`
|
||||
NoHp *string `json:"no_hp" gorm:"column:no_hp"`
|
||||
AsalMasuk *string `json:"asal_masuk" gorm:"column:asal_masuk"`
|
||||
Diagnosa *string `json:"diagnosa" gorm:"column:diagnosa"`
|
||||
DiagnosaUtama *string `json:"diagnosa_utama" gorm:"column:diagnosa_utama"`
|
||||
Suku string `json:"suku" gorm:"column:suku"`
|
||||
AgamaLain string `json:"agama_lain" gorm:"column:agama_lain"`
|
||||
StDisabilitas uint `json:"stDisabilitas" gorm:"column:st_disabilitas"`
|
||||
TxtKelurahan string `json:"txt_kelurahan" gorm:"column:txt_kelurahan"`
|
||||
TxtKecamatan string `json:"txt_kecamatan" gorm:"column:txt_kecamatan"`
|
||||
TxtKota string `json:"txt_kota" gorm:"column:txt_kota"`
|
||||
TxtProvinsi string `json:"txt_provinsi" gorm:"column:txt_provinsi"`
|
||||
TxtStatus string `json:"txt_status" gorm:"column:txt_status"`
|
||||
TxtAgama string `json:"txt_agama" gorm:"column:txt_agama"`
|
||||
TxtPendidikan string `json:"txt_pendidikan" gorm:"column:txt_pendidikan"`
|
||||
NamaAyah string `json:"nama_ayah" gorm:"column:nama_ayah"`
|
||||
NamaIbu string `json:"nama_ibu" gorm:"column:nama_ibu"`
|
||||
PendidikanAyah string `json:"pendidikan_ayah" gorm:"column:pendidikan_ayah"`
|
||||
PendidikanIbu string `json:"pendidikan_ibu" gorm:"column:pendidikan_ibu"`
|
||||
StIdentitasOrtu int `json:"st_identitas_ortu" gorm:"column:st_identitas_ortu"`
|
||||
NomrBaru *string `json:"nomr_baru" gorm:"column:nomr_baru"`
|
||||
KtpFile *string `json:"ktp_file" gorm:"column:ktp_file"`
|
||||
KkFile *string `json:"kk_file" gorm:"column:kk_file"`
|
||||
CreatedAt *time.Time `json:"created_at" gorm:"column:created_at"`
|
||||
UpdatedAt *time.Time `json:"updated_at" gorm:"column:updated_at"`
|
||||
NoKk *string `json:"no_kk" gorm:"column:no_kk"`
|
||||
NoktpBaru string `json:"noktp_baru" gorm:"column:noktp_baru"`
|
||||
}
|
||||
|
||||
func (mp MPasienDto) ToPatient() e.Patient {
|
||||
|
||||
patient := e.Patient{
|
||||
Main: ecore.Main{
|
||||
Id: mp.Id,
|
||||
},
|
||||
NewBornStatus: mp.ParentNomr != nil,
|
||||
RegisteredAt: parseTimeDateOnly(mp.Tgldaftar),
|
||||
RegisteredBy_User_Name: mp.Nip,
|
||||
Number: &mp.Nomr,
|
||||
Parent_Number: mp.ParentNomr,
|
||||
// Status_Code: getActiveStatus(mp.Status),
|
||||
// mp.Status is marital status
|
||||
// Parent
|
||||
}
|
||||
|
||||
// person
|
||||
gc := getGender(mp.Jeniskelamin)
|
||||
rc := getReligion(mp.Agama)
|
||||
ec := getEducation(mp.Pendidikan)
|
||||
mc := getMaritalStatus(mp.Status)
|
||||
bc := getBirthRegencyCode(mp.Tempat)
|
||||
et := getEthnicCode(mp.Suku)
|
||||
lc := getLanguageCode(mp.Bahasa)
|
||||
|
||||
person := pr.Person{
|
||||
Name: mp.Nama,
|
||||
FrontTitle: &mp.Title,
|
||||
BirthDate: parseTimeDateOnly(mp.Tgllahir),
|
||||
BirthRegency_Code: &bc,
|
||||
Gender_Code: &gc,
|
||||
ResidentIdentityNumber: nilEmptyString(&mp.Noktp),
|
||||
PassportNumber: nilEmptyString(mp.Paspor),
|
||||
DrivingLicenseNumber: nilEmptyString(mp.Sim),
|
||||
Religion_Code: &rc,
|
||||
Education_Code: &ec,
|
||||
Ocupation_Name: &mp.Pekerjaan,
|
||||
MaritalStatus_Code: &mc,
|
||||
Nationality: &mp.Kebangsaan,
|
||||
Ethnic_Code: &et,
|
||||
Language_Code: &lc,
|
||||
CommunicationIssueStatus: mp.HambatanKomunikasi == "Y",
|
||||
Disability: mp.Disabilitas,
|
||||
ResidentIdentityFileUrl: mp.KtpFile,
|
||||
FamilyIdentityFileUrl: mp.KkFile,
|
||||
// EndTitle
|
||||
// Confidence
|
||||
// Ocupation_Code
|
||||
}
|
||||
var addresses []pa.PersonAddress
|
||||
if mp.Alamat != "" {
|
||||
vc := fmt.Sprintf("%d", mp.Kelurahan)
|
||||
addresses = append(addresses, pa.PersonAddress{
|
||||
PersonAddress: pab.PersonAddress{
|
||||
Address: mp.Alamat,
|
||||
LocationType_Code: rf.ALTCDom,
|
||||
Village_Code: &vc,
|
||||
},
|
||||
})
|
||||
}
|
||||
if mp.AlamatKtp != "" {
|
||||
addresses = append(addresses, pa.PersonAddress{
|
||||
PersonAddress: pab.PersonAddress{
|
||||
Address: mp.AlamatKtp,
|
||||
LocationType_Code: rf.ALTCIdn,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
var contacts []pc.PersonContact
|
||||
|
||||
if mp.NoHp != nil {
|
||||
|
||||
}
|
||||
|
||||
person.Addresses = &addresses
|
||||
person.Contacts = &contacts
|
||||
patient.Person = &person
|
||||
return patient
|
||||
}
|
||||
|
||||
func nilEmptyString(s *string) *string {
|
||||
if s == nil {
|
||||
return nil
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func getGender(g string) rf.GenderCode {
|
||||
if g == "L" {
|
||||
return rf.GCMale
|
||||
} else if g == "P" {
|
||||
return rf.GCFemale
|
||||
}
|
||||
return rf.GCUnknown
|
||||
|
||||
}
|
||||
|
||||
func getReligion(r uint) rf.ReligionCode {
|
||||
switch r {
|
||||
case 1:
|
||||
return rf.RCIslam
|
||||
case 2:
|
||||
return rf.RCProtestan
|
||||
case 3:
|
||||
return rf.RCKatolik
|
||||
case 4:
|
||||
return rf.RCHindu
|
||||
case 5:
|
||||
return rf.RCBudha
|
||||
case 6:
|
||||
return rf.RCKonghucu
|
||||
default:
|
||||
// 9 "Lainnya"
|
||||
// 0 "Tidak diketahui"
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func getEducation(e uint) rf.EducationCode {
|
||||
switch e {
|
||||
case 0:
|
||||
return rf.ECTS
|
||||
case 1:
|
||||
return rf.ECSD
|
||||
case 2:
|
||||
return rf.ECSLTP
|
||||
case 3:
|
||||
return rf.ECSLTA
|
||||
case 4:
|
||||
return rf.ECD3
|
||||
case 5:
|
||||
return rf.ECS1
|
||||
case 6:
|
||||
return rf.ECOther
|
||||
case 7:
|
||||
return rf.ECUnkown
|
||||
default:
|
||||
return rf.ECUnkown
|
||||
}
|
||||
}
|
||||
|
||||
func getMaritalStatus(m uint) rf.MaritalStatusCode {
|
||||
switch m {
|
||||
case 1:
|
||||
return rf.MaritalStatusSingle // S
|
||||
case 2:
|
||||
return rf.MaritalStatusMarried // M
|
||||
case 3:
|
||||
return rf.MaritalStatusWidowed // W
|
||||
case 4:
|
||||
return rf.MaritalStatusDivorced // D
|
||||
default:
|
||||
return "" // unknown
|
||||
}
|
||||
}
|
||||
|
||||
func getBirthRegencyCode(r string) string {
|
||||
if r != "" {
|
||||
// TODO get from database
|
||||
}
|
||||
return "3574"
|
||||
}
|
||||
|
||||
func getEthnicCode(s string) string {
|
||||
if s != "" {
|
||||
// TODO check database
|
||||
}
|
||||
return "jawa"
|
||||
}
|
||||
|
||||
func getLanguageCode(s string) string {
|
||||
if s != "" {
|
||||
// TODO check database
|
||||
}
|
||||
return "jawa"
|
||||
}
|
||||
|
||||
func parseTimeDateOnly(d string) *time.Time {
|
||||
do, err := time.Parse("2006-01-02", d)
|
||||
if err == nil {
|
||||
return &do
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -11,29 +11,29 @@ type TDiagnosaDanTerapi struct {
|
||||
GolonganDarah string `json:"golongan_darah" gorm:"column:golongan_darah"`
|
||||
TinggiBadan float64 `json:"tinggi_badan" gorm:"column:tinggi_badan"`
|
||||
BeratBadan float64 `json:"berat_badan" gorm:"column:berat_badan"`
|
||||
Diagnosa string `json:"diagnosa" gorm:"column:diagnosa"`
|
||||
Komplikasi string `json:"komplikasi" gorm:"column:komplikasi"`
|
||||
Terapi string `json:"terapi" gorm:"column:terapi"`
|
||||
Anamnesa string `json:"anamnesa" gorm:"column:anamnesa"`
|
||||
Diagnosa *string `json:"diagnosa" gorm:"column:diagnosa"`
|
||||
Komplikasi *string `json:"komplikasi" gorm:"column:komplikasi"`
|
||||
Terapi *string `json:"terapi" gorm:"column:terapi"`
|
||||
Anamnesa *string `json:"anamnesa" gorm:"column:anamnesa"`
|
||||
Kdpoly uint `json:"kdpoly" gorm:"column:kdpoly"`
|
||||
Kddokter uint `json:"kddokter" gorm:"column:kddokter"`
|
||||
Kdtujuanrujuk uint `json:"kdtujuanrujuk" gorm:"column:kdtujuanrujuk"`
|
||||
Kdtujuanrujuk *uint `json:"kdtujuanrujuk" gorm:"column:kdtujuanrujuk"`
|
||||
Nip string `json:"nip" gorm:"column:nip"`
|
||||
IcdCode string `json:"icd_code" gorm:"column:icd_code"`
|
||||
IcdCode *string `json:"icd_code" gorm:"column:icd_code"`
|
||||
KunjunganBl uint `json:"kunjungan_bl" gorm:"column:kunjungan_bl"`
|
||||
KasusBl uint `json:"kasus_bl" gorm:"column:kasus_bl"`
|
||||
Icdcm string `json:"icdcm" gorm:"column:icdcm"`
|
||||
Icd9 string `json:"icd_9" gorm:"column:icd_9"`
|
||||
Klb uint `json:"klb" gorm:"column:klb"`
|
||||
Bedah uint `json:"bedah" gorm:"column:bedah"`
|
||||
Jenis uint `json:"jenis" gorm:"column:jenis"`
|
||||
Perawat string `json:"perawat" gorm:"column:perawat"`
|
||||
Status string `json:"status" gorm:"column:status"`
|
||||
PemeriksaanFisik string `json:"pemeriksaan_fisik" gorm:"column:pemeriksaan_fisik"`
|
||||
RiwayatPasien string `json:"riwayat_pasien" gorm:"column:riwayat_pasien"`
|
||||
TindakanMedis string `json:"tindakan_medis" gorm:"column:tindakan_medis"`
|
||||
Icdcm *string `json:"icdcm" gorm:"column:icdcm"`
|
||||
Icd9 *string `json:"icd_9" gorm:"column:icd_9"`
|
||||
Klb *uint `json:"klb" gorm:"column:klb"`
|
||||
Bedah *uint `json:"bedah" gorm:"column:bedah"`
|
||||
Jenis *uint `json:"jenis" gorm:"column:jenis"`
|
||||
Perawat *string `json:"perawat" gorm:"column:perawat"`
|
||||
Status *string `json:"status" gorm:"column:status"`
|
||||
PemeriksaanFisik *string `json:"pemeriksaan_fisik" gorm:"column:pemeriksaan_fisik"`
|
||||
RiwayatPasien *string `json:"riwayat_pasien" gorm:"column:riwayat_pasien"`
|
||||
TindakanMedis *string `json:"tindakan_medis" gorm:"column:tindakan_medis"`
|
||||
Rajal uint `json:"rajal" gorm:"column:rajal"`
|
||||
UserBatal string `json:"user_batal" gorm:"column:user_batal"`
|
||||
UserBatal *string `json:"user_batal" gorm:"column:user_batal"`
|
||||
TglBatal *time.Time `json:"tgl_batal" gorm:"column:tgl_batal"`
|
||||
SudahVaksin string `json:"sudah_vaksin" gorm:"column:sudah_vaksin"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
|
||||
@@ -41,7 +41,7 @@ type TDiagnosaDanTerapi struct {
|
||||
Pernapasan string `json:"pernapasan" gorm:"column:pernapasan"`
|
||||
Suhu string `json:"suhu" gorm:"column:suhu"`
|
||||
Sp02 string `json:"sp02" gorm:"column:sp02"`
|
||||
TujuanPerawatan string `json:"tujuan_perawatan" gorm:"column:tujuan_perawatan"`
|
||||
TujuanPerawatan *string `json:"tujuan_perawatan" gorm:"column:tujuan_perawatan"`
|
||||
TargetCapaian string `json:"target_capaian" gorm:"column:target_capaian"`
|
||||
}
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ type TIcdCm struct {
|
||||
Nomr string `json:"nomr" gorm:"column:nomr"`
|
||||
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||
Kddokter uint `json:"kddokter" gorm:"column:kddokter"`
|
||||
Icd string `json:"icd" gorm:"column:icd"`
|
||||
IcdVerified string `json:"icd_verified" gorm:"column:icd_verified"`
|
||||
Icd *string `json:"icd" gorm:"column:icd"`
|
||||
IcdVerified *string `json:"icd_verified" gorm:"column:icd_verified"`
|
||||
StatusRajal uint16 `json:"status_rajal" gorm:"column:status_rajal"`
|
||||
Tanggal time.Time `json:"tanggal" gorm:"column:tanggal"`
|
||||
StatusVerif uint16 `json:"status_verif" gorm:"column:status_verif"`
|
||||
IcdVerifiedOrder uint16 `json:"icd_verified_order" gorm:"column:icd_verified_order"`
|
||||
IcdVerifBy string `json:"icd_verif_by" gorm:"column:icd_verif_by"`
|
||||
StatusVerif *uint16 `json:"status_verif" gorm:"column:status_verif"`
|
||||
IcdVerifiedOrder *uint16 `json:"icd_verified_order" gorm:"column:icd_verified_order"`
|
||||
IcdVerifBy *string `json:"icd_verif_by" gorm:"column:icd_verif_by"`
|
||||
IcdVerifDate *time.Time `json:"icd_verif_date" gorm:"column:icd_verif_date"`
|
||||
IcdActive uint16 `json:"icd_active" gorm:"column:icd_active"`
|
||||
IcdActive *uint16 `json:"icd_active" gorm:"column:icd_active"`
|
||||
}
|
||||
|
||||
func (TIcdCm) TableName() string {
|
||||
|
||||
@@ -8,15 +8,15 @@ type TIcd struct {
|
||||
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||
Kddokter uint `json:"kddokter" gorm:"column:kddokter"`
|
||||
Icd string `json:"icd" gorm:"column:icd"`
|
||||
IcdVerified string `json:"icd_verified" gorm:"column:icd_verified"`
|
||||
IcdVerified *string `json:"icd_verified" gorm:"column:icd_verified"`
|
||||
StatusRajal uint16 `json:"status_rajal" gorm:"column:status_rajal"`
|
||||
Tanggal time.Time `json:"tanggal" gorm:"column:tanggal"`
|
||||
StatusVerif uint16 `json:"status_verif" gorm:"column:status_verif"`
|
||||
IcdVerifiedOrder uint16 `json:"icd_verified_order" gorm:"column:icd_verified_order"`
|
||||
IcdVerifBy string `json:"icd_verif_by" gorm:"column:icd_verif_by"`
|
||||
StatusVerif *uint16 `json:"status_verif" gorm:"column:status_verif"`
|
||||
IcdVerifiedOrder *uint16 `json:"icd_verified_order" gorm:"column:icd_verified_order"`
|
||||
IcdVerifBy *string `json:"icd_verif_by" gorm:"column:icd_verif_by"`
|
||||
IcdVerifDate *time.Time `json:"icd_verif_date" gorm:"column:icd_verif_date"`
|
||||
IcdActive uint16 `json:"icd_active" gorm:"column:icd_active"`
|
||||
StSebabMati uint16 `json:"st_sebab_mati" gorm:"column:st_sebab_mati"`
|
||||
IcdActive *uint16 `json:"icd_active" gorm:"column:icd_active"`
|
||||
StSebabMati *uint16 `json:"st_sebab_mati" gorm:"column:st_sebab_mati"`
|
||||
}
|
||||
|
||||
func (TIcd) TableName() string {
|
||||
|
||||
@@ -5,16 +5,16 @@ import "time"
|
||||
type TRekammedik struct {
|
||||
TglKirim *time.Time `json:"tgl_kirim" gorm:"column:tgl_kirim"`
|
||||
TglTerima *time.Time `json:"tgl_terima" gorm:"column:tgl_terima"`
|
||||
Idxdaftar int `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||
Kdpoly int `json:"kdpoly" gorm:"column:kdpoly"`
|
||||
Idxdaftar uint `json:"idxdaftar" gorm:"column:idxdaftar"`
|
||||
Kdpoly uint `json:"kdpoly" gorm:"column:kdpoly"`
|
||||
Pengirim string `json:"pengirim" gorm:"column:pengirim"`
|
||||
Penerima string `json:"penerima" gorm:"column:penerima"`
|
||||
Statusrm int `json:"statusrm" gorm:"column:statusrm"`
|
||||
PenerimaPoly string `json:"penerima_poly" gorm:"column:penerima_poly"`
|
||||
JamKirimRm string `json:"jam_kirim_rm" gorm:"column:jam_kirim_rm"`
|
||||
JamTerimaRm string `json:"jam_terima_rm" gorm:"column:jam_terima_rm"`
|
||||
PjBerkasRm string `json:"pj_berkas_rm" gorm:"column:pj_berkas_rm"`
|
||||
StatusFisikBerkas string `json:"status_fisik_berkas" gorm:"column:status_fisik_berkas"`
|
||||
Penerima *string `json:"penerima" gorm:"column:penerima"`
|
||||
Statusrm *uint `json:"statusrm" gorm:"column:statusrm"`
|
||||
PenerimaPoly *string `json:"penerima_poly" gorm:"column:penerima_poly"`
|
||||
JamKirimRm *time.Time `json:"jam_kirim_rm" gorm:"column:jam_kirim_rm"`
|
||||
JamTerimaRm *time.Time `json:"jam_terima_rm" gorm:"column:jam_terima_rm"`
|
||||
PjBerkasRm *string `json:"pj_berkas_rm" gorm:"column:pj_berkas_rm"`
|
||||
StatusFisikBerkas *string `json:"status_fisik_berkas" gorm:"column:status_fisik_berkas"`
|
||||
}
|
||||
|
||||
func (TRekammedik) TableName() string {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package authentication
|
||||
|
||||
type SyncKey struct{}
|
||||
|
||||
type CredentialDto struct {
|
||||
Source string `json:"X-Sync-Source"`
|
||||
SecretKey string `json:"X-Sync-SecretKey"`
|
||||
UserName string `json:"X-Sync-UserName"`
|
||||
}
|
||||
Reference in New Issue
Block a user