|
|
|
|
72
|
beego.Router("/api/incomestatistics/get", &HisApiController{}, "get:GetIncomeStatisticsData")
|
72
|
beego.Router("/api/incomestatistics/get", &HisApiController{}, "get:GetIncomeStatisticsData")
|
73
|
|
73
|
|
74
|
beego.Router("/api/postprojectinformation", &HisApiController{}, "post:PostProjectInformation")
|
74
|
beego.Router("/api/postprojectinformation", &HisApiController{}, "post:PostProjectInformation")
|
75
|
- //beego.Router("/api/editprojectinformation", &HisApiController{}, "post:EditProjectInformation")
|
|
|
76
|
beego.Router("/api/hisprescriptiontemplate/create", &HisApiController{}, "post:CreateHisPrescriptionTemplate")
|
75
|
beego.Router("/api/hisprescriptiontemplate/create", &HisApiController{}, "post:CreateHisPrescriptionTemplate")
|
77
|
beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
|
76
|
beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
|
78
|
beego.Router("/api/changemedtype/post", &HisApiController{}, "post:ChangeMedType")
|
77
|
beego.Router("/api/changemedtype/post", &HisApiController{}, "post:ChangeMedType")
|
|
|
|
|
101
|
beego.Router("/api/batch/settleaccount", &HisApiController{}, "get:GetBatchSettleAccounts")
|
100
|
beego.Router("/api/batch/settleaccount", &HisApiController{}, "get:GetBatchSettleAccounts")
|
102
|
|
101
|
|
103
|
beego.Router("/api/monthhispatient", &HisApiController{}, "get:GetMonthHisPatient")
|
102
|
beego.Router("/api/monthhispatient", &HisApiController{}, "get:GetMonthHisPatient")
|
104
|
-
|
|
|
105
|
beego.Router("/api/changeorderdesc", &HisApiController{}, "get:ChangeOrderDesc")
|
103
|
beego.Router("/api/changeorderdesc", &HisApiController{}, "get:ChangeOrderDesc")
|
106
|
-
|
|
|
107
|
beego.Router("/api/getfapiaonumber", &HisApiController{}, "get:GetFaPiaoNumber")
|
104
|
beego.Router("/api/getfapiaonumber", &HisApiController{}, "get:GetFaPiaoNumber")
|
108
|
-
|
|
|
109
|
beego.Router("/api/associationprescription", &HisApiController{}, "get:AssociationHisPrescription")
|
105
|
beego.Router("/api/associationprescription", &HisApiController{}, "get:AssociationHisPrescription")
|
110
|
beego.Router("/api/checkhispatient", &HisApiController{}, "get:CheckHisPatient")
|
106
|
beego.Router("/api/checkhispatient", &HisApiController{}, "get:CheckHisPatient")
|
111
|
-
|
|
|
112
|
beego.Router("/api/hisorder/listtwo", &HisApiController{}, "get:GetHisOrderListTwo")
|
107
|
beego.Router("/api/hisorder/listtwo", &HisApiController{}, "get:GetHisOrderListTwo")
|
113
|
|
108
|
|
114
|
}
|
109
|
}
|
|
|
|
|
10251
|
record_time := theAdviceRecordTime.Unix()
|
10246
|
record_time := theAdviceRecordTime.Unix()
|
10252
|
adminUserInfo := this.GetAdminUserInfo()
|
10247
|
adminUserInfo := this.GetAdminUserInfo()
|
10253
|
prescriptions, err := service.GetHisPrescriptionByType(change_type, record_time, adminUserInfo.CurrentOrgId, patient_id, p_type)
|
10248
|
prescriptions, err := service.GetHisPrescriptionByType(change_type, record_time, adminUserInfo.CurrentOrgId, patient_id, p_type)
|
|
|
10249
|
+
|
|
|
10250
|
+ if adminUserInfo.CurrentOrgId == 10265 {
|
|
|
10251
|
+ _, config := service.FindHisStockPriceRecordByOrgId(adminUserInfo.CurrentOrgId)
|
|
|
10252
|
+ if config.ID > 0 && config.IsOpen == 1 {
|
|
|
10253
|
+ for _, subitems := range prescriptions {
|
|
|
10254
|
+ for _, item := range subitems.VMHisPrescription {
|
|
|
10255
|
+ for _, subItem := range item.HisDoctorAdviceInfo {
|
|
|
10256
|
+ drug, _ := service.GetDrugByGoodId(subItem.DrugId)
|
|
|
10257
|
+ info, _ := service.GetWarehoseInfoByDrugId(subItem.DrugId, adminUserInfo.CurrentOrgId)
|
|
|
10258
|
+ if info.RetailPrice > 0 {
|
|
|
10259
|
+ if subItem.PrescribingNumberUnit == drug.MaxUnit && drug.MaxUnit != drug.MinUnit {
|
|
|
10260
|
+ subItem.Drug.RetailPrice = drug.RetailPrice
|
|
|
10261
|
+ }
|
|
|
10262
|
+ if subItem.PrescribingNumberUnit == drug.MinUnit {
|
|
|
10263
|
+ subItem.Drug.MinPrice = info.RetailPrice
|
|
|
10264
|
+ subItem.Drug.RetailPrice = info.RetailPrice
|
|
|
10265
|
+ }
|
|
|
10266
|
+
|
|
|
10267
|
+ }
|
|
|
10268
|
+ }
|
|
|
10269
|
+ }
|
|
|
10270
|
+ }
|
|
|
10271
|
+ }
|
|
|
10272
|
+
|
|
|
10273
|
+ if config.ID > 0 && config.IsOpen == 1 {
|
|
|
10274
|
+ for _, subitems := range prescriptions {
|
|
|
10275
|
+ for _, item := range subitems.VMHisPrescription {
|
|
|
10276
|
+ for _, subItem := range item.HisPrescriptionProject {
|
|
|
10277
|
+ if subItem.Type == 3 {
|
|
|
10278
|
+ info, _ := service.GetGoodWarehoseInfoByGoodId(subItem.ProjectId, adminUserInfo.CurrentOrgId)
|
|
|
10279
|
+ if info.Price > 0 {
|
|
|
10280
|
+ subItem.GoodInfo.PackingPrice = info.Price
|
|
|
10281
|
+ }
|
|
|
10282
|
+ }
|
|
|
10283
|
+ }
|
|
|
10284
|
+ }
|
|
|
10285
|
+ }
|
|
|
10286
|
+ }
|
|
|
10287
|
+ }
|
|
|
10288
|
+
|
10254
|
if err == nil {
|
10289
|
if err == nil {
|
10255
|
if len(prescriptions) == 0 {
|
10290
|
if len(prescriptions) == 0 {
|
10256
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDoctorAdviceEmpty)
|
10291
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDoctorAdviceEmpty)
|
|
|
|
|
10307
|
}
|
10342
|
}
|
10308
|
}
|
10343
|
}
|
10309
|
}
|
10344
|
}
|
10310
|
-
|
|
|
10311
|
if config.ID > 0 && config.IsOpen == 1 {
|
10345
|
if config.ID > 0 && config.IsOpen == 1 {
|
10312
|
for _, subitems := range prescriptions {
|
10346
|
for _, subitems := range prescriptions {
|
10313
|
for _, item := range subitems.VMHisPrescription {
|
10347
|
for _, item := range subitems.VMHisPrescription {
|