|
@@ -92,6 +92,8 @@ func HisManagerApiRegistRouters() {
|
92
|
92
|
|
93
|
93
|
beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
|
94
|
94
|
|
|
95
|
+ beego.Router("/api/changemedtype/post", &HisApiController{}, "post:ChangeMedType")
|
|
96
|
+
|
95
|
97
|
}
|
96
|
98
|
|
97
|
99
|
func (c *HisApiController) Sscard() {
|
|
@@ -229,6 +231,7 @@ func (c *HisApiController) GetHisPatientInfo() {
|
229
|
231
|
monthPrescriptions, _ := service.GetMonthHisPrescriptionTwo(admin.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime, p_type)
|
230
|
232
|
case_history, _ := service.GetHisPatientCaseHistoryInfo(admin.CurrentOrgId, patient_id, recordDateTime)
|
231
|
233
|
patientPrescriptionInfo, _ := service.FindPatientPrescriptionInfo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
|
234
|
+ lastPatientPrescriptionInfo, _ := service.FindLastPatientPrescriptionInfoTwo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
232
|
235
|
|
233
|
236
|
order, _ := service.GetHisOrder(admin.CurrentOrgId, number, patient_id)
|
234
|
237
|
doctors, _ := service.GetHisAdminUserDoctors(admin.CurrentOrgId)
|
|
@@ -252,6 +255,7 @@ func (c *HisApiController) GetHisPatientInfo() {
|
252
|
255
|
"schedule": sch,
|
253
|
256
|
"count": count,
|
254
|
257
|
"drugStockConfig": drugStockConfig,
|
|
258
|
+ "last_info": lastPatientPrescriptionInfo,
|
255
|
259
|
})
|
256
|
260
|
return
|
257
|
261
|
|
|
@@ -2866,6 +2870,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2866
|
2870
|
SettleType: settle_accounts_type,
|
2867
|
2871
|
FaPiaoCode: fapiao_code,
|
2868
|
2872
|
FaPiaoNumber: fapiao_number,
|
|
2873
|
+ Diagnosis: diagnosis_id,
|
2869
|
2874
|
PType: 2,
|
2870
|
2875
|
}
|
2871
|
2876
|
err = service.CreateOrder(order)
|
|
@@ -3010,6 +3015,7 @@ func (c *HisApiController) GetUploadInfo() {
|
3010
|
3015
|
tempOrder.FaPiaoNumber = fapiao_number
|
3011
|
3016
|
tempOrder.PType = 2
|
3012
|
3017
|
tempOrder.MedfeeSumamt = totals
|
|
3018
|
+ tempOrder.Diagnosis = diagnosis_id
|
3013
|
3019
|
|
3014
|
3020
|
err = service.SaveHisOrder(&tempOrder)
|
3015
|
3021
|
err = service.UpdataOrderStatusTwo(tempOrder.Number, adminUser.CurrentOrgId)
|
|
@@ -3372,6 +3378,9 @@ func (c *HisApiController) GetHisChargePatientInfo() {
|
3372
|
3378
|
}
|
3373
|
3379
|
case_history, _ := service.GetHisPatientCaseHistoryInfo(admin.CurrentOrgId, patient_id, recordDateTime)
|
3374
|
3380
|
patientPrescriptionInfo, _ := service.FindPatientPrescriptionInfo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
|
3381
|
+
|
|
3382
|
+ lastPatientPrescriptionInfo, _ := service.FindLastPatientPrescriptionInfoTwo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
|
3383
|
+
|
3375
|
3384
|
doctors, _ := service.GetHisAdminUserDoctors(admin.CurrentOrgId)
|
3376
|
3385
|
//获取所有科室信息
|
3377
|
3386
|
department, _ := service.GetAllDepartMent(admin.CurrentOrgId)
|
|
@@ -3382,6 +3391,7 @@ func (c *HisApiController) GetHisChargePatientInfo() {
|
3382
|
3391
|
"prescription": prescriptions,
|
3383
|
3392
|
"case_history": case_history,
|
3384
|
3393
|
"info": patientPrescriptionInfo,
|
|
3394
|
+ "last_info": lastPatientPrescriptionInfo,
|
3385
|
3395
|
"month_prescriptions": monthPrescriptions,
|
3386
|
3396
|
"order": order,
|
3387
|
3397
|
"doctors": doctors,
|
|
@@ -4505,6 +4515,7 @@ func (c *HisApiController) PreSettle() {
|
4505
|
4515
|
PType: 2,
|
4506
|
4516
|
IsPre: 1,
|
4507
|
4517
|
MedType: strconv.Itoa(int(reg_type)),
|
|
4518
|
+ Diagnosis: diagnosis_id,
|
4508
|
4519
|
}
|
4509
|
4520
|
err = service.CreateOrder(order)
|
4510
|
4521
|
if err != nil {
|
|
@@ -4613,7 +4624,6 @@ func (c *HisApiController) PreSettle() {
|
4613
|
4624
|
}
|
4614
|
4625
|
service.CreateOrderInfo(info)
|
4615
|
4626
|
}
|
4616
|
|
- his.Diagnosis = diagnosis_id
|
4617
|
4627
|
his.SickType = sick_type
|
4618
|
4628
|
service.UpdataHisPateint(&his)
|
4619
|
4629
|
err = service.UpDatePrescriptionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
|
|
@@ -4650,3 +4660,25 @@ func (c *HisApiController) GetPrivateExpensesInfo() {
|
4650
|
4660
|
})
|
4651
|
4661
|
|
4652
|
4662
|
}
|
|
4663
|
+
|
|
4664
|
+func (this *HisApiController) ChangeMedType() {
|
|
4665
|
+ med_type := this.GetString("med_type")
|
|
4666
|
+ id, _ := this.GetInt64("id")
|
|
4667
|
+
|
|
4668
|
+ prescription, _ := service.GetPrescriptionById(id, this.GetAdminUserInfo().CurrentOrgId)
|
|
4669
|
+ prescription.MedType = med_type
|
|
4670
|
+ err := service.SaveHisPrescription(&prescription)
|
|
4671
|
+
|
|
4672
|
+ if err == nil {
|
|
4673
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
4674
|
+ "msg": "修改成功",
|
|
4675
|
+ })
|
|
4676
|
+
|
|
4677
|
+ } else {
|
|
4678
|
+
|
|
4679
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
4680
|
+ return
|
|
4681
|
+
|
|
4682
|
+ }
|
|
4683
|
+
|
|
4684
|
+}
|