refactor/unit-dropping: done
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
func setDataCreate(input *ir.CreateDto, data *ir.InternalReference) {
|
||||
data.Encounter_Id = input.Encounter_Id
|
||||
data.Unit_Code = input.Unit_Code
|
||||
data.Specialist_Code = input.Specialist_Code
|
||||
|
||||
data.Doctor_Code = input.Doctor_Code
|
||||
data.SrcDoctor_Code = input.SrcDoctor_Code
|
||||
@@ -28,18 +28,18 @@ func setDataUpdate(input *ir.UpdateDto, data *ir.InternalReference) {
|
||||
data.Status_Code = &input.Status_Code
|
||||
}
|
||||
|
||||
func setBulkData(input *e.SwitchUnitDto) []ir.InternalReference {
|
||||
func setBulkData(input *e.SwitchSpecialistDto) []ir.InternalReference {
|
||||
var data []ir.InternalReference
|
||||
|
||||
for _, v := range *input.InternalReferences {
|
||||
statusCode := erc.DACNew
|
||||
data = append(data, ir.InternalReference{
|
||||
Encounter_Id: &input.Id,
|
||||
Unit_Code: v.Unit_Code,
|
||||
Doctor_Code: v.Doctor_Code,
|
||||
Status_Code: &statusCode,
|
||||
SrcDoctor_Code: input.Src_Doctor_Code,
|
||||
SrcNurse_Code: input.Src_Nurse_Code,
|
||||
Encounter_Id: &input.Id,
|
||||
Specialist_Code: v.Specialist_Code,
|
||||
Doctor_Code: v.Doctor_Code,
|
||||
Status_Code: &statusCode,
|
||||
SrcDoctor_Code: input.Src_Doctor_Code,
|
||||
SrcNurse_Code: input.Src_Nurse_Code,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ func DeleteData(data *eir.InternalReference, event *pl.Event, dbx ...*gorm.DB) e
|
||||
return nil
|
||||
}
|
||||
|
||||
func CreateBulkData(input *e.SwitchUnitDto, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
func CreateBulkData(input *e.SwitchSpecialistDto, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
pl.SetLogInfo(event, nil, "started", "DBCreate")
|
||||
|
||||
data := setBulkData(input)
|
||||
|
||||
Reference in New Issue
Block a user