|
@@ -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
|
|
|
@@ -292,7 +296,7 @@ func (c *HisApiController) CreateHisPrescription() {
|
292
|
296
|
record_date := c.GetString("record_date")
|
293
|
297
|
patient_id, _ := c.GetInt64("patient_id")
|
294
|
298
|
reg_type, _ := c.GetInt64("reg_type")
|
295
|
|
- diagnose, _ := c.GetInt64("diagnose")
|
|
299
|
+ diagnose := c.GetString("diagnose")
|
296
|
300
|
sick_type, _ := c.GetInt64("sick_type")
|
297
|
301
|
sick_history := c.GetString("sick_history")
|
298
|
302
|
doctor_id, _ := c.GetInt64("doctor", 0)
|
|
@@ -729,7 +733,8 @@ func (c *HisApiController) EditHisPrescription() {
|
729
|
733
|
record_date := c.GetString("record_date")
|
730
|
734
|
patient_id, _ := c.GetInt64("patient_id")
|
731
|
735
|
reg_type, _ := c.GetInt64("reg_type")
|
732
|
|
- diagnose, _ := c.GetInt64("diagnose", 0)
|
|
736
|
+ //diagnose, _ := c.GetInt64("diagnose", 0)
|
|
737
|
+ diagnose := c.GetString("diagnose")
|
733
|
738
|
sick_type, _ := c.GetInt64("sick_type")
|
734
|
739
|
sick_history := c.GetString("sick_history")
|
735
|
740
|
doctor_id, _ := c.GetInt64("doctor", 0)
|
|
@@ -2582,7 +2587,10 @@ func (c *HisApiController) GetRegisterInfo() {
|
2582
|
2587
|
medical_expenses, _ := c.GetFloat("medical_expenses")
|
2583
|
2588
|
social_type, _ := c.GetInt64("social_type")
|
2584
|
2589
|
|
2585
|
|
- diagnosis_id, _ := c.GetInt64("diagnosis")
|
|
2590
|
+ //diagnosis_id, _ := c.GetInt64("diagnosis")
|
|
2591
|
+
|
|
2592
|
+ diagnosis_ids := c.GetString("diagnosis")
|
|
2593
|
+
|
2586
|
2594
|
sick_type, _ := c.GetInt64("sick_type")
|
2587
|
2595
|
reg_type := c.GetString("p_type")
|
2588
|
2596
|
|
|
@@ -2672,7 +2680,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
2672
|
2680
|
Departments: department,
|
2673
|
2681
|
Doctor: doctor,
|
2674
|
2682
|
PType: reg_type,
|
2675
|
|
- Diagnosis: diagnosis_id,
|
|
2683
|
+ Diagnosis: diagnosis_ids,
|
2676
|
2684
|
SickType: sick_type,
|
2677
|
2685
|
}
|
2678
|
2686
|
service.CreateHisPatient(&hisPatient)
|
|
@@ -2711,7 +2719,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
2711
|
2719
|
Departments: department,
|
2712
|
2720
|
Doctor: doctor,
|
2713
|
2721
|
PType: reg_type,
|
2714
|
|
- Diagnosis: diagnosis_id,
|
|
2722
|
+ Diagnosis: diagnosis_ids,
|
2715
|
2723
|
SickType: sick_type,
|
2716
|
2724
|
}
|
2717
|
2725
|
service.CreateHisPatient(&hisPatient)
|
|
@@ -2750,7 +2758,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2750
|
2758
|
fapiao_code := c.GetString("fapiao_code")
|
2751
|
2759
|
fapiao_number := c.GetString("fapiao_number")
|
2752
|
2760
|
|
2753
|
|
- diagnosis_id, _ := c.GetInt64("diagnosis")
|
|
2761
|
+ diagnosis_id := c.GetString("diagnosis")
|
2754
|
2762
|
sick_type, _ := c.GetInt64("sick_type")
|
2755
|
2763
|
reg_type, _ := c.GetInt64("p_type")
|
2756
|
2764
|
order_id, _ := c.GetInt64("order_id")
|
|
@@ -2862,6 +2870,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2862
|
2870
|
SettleType: settle_accounts_type,
|
2863
|
2871
|
FaPiaoCode: fapiao_code,
|
2864
|
2872
|
FaPiaoNumber: fapiao_number,
|
|
2873
|
+ Diagnosis: diagnosis_id,
|
2865
|
2874
|
PType: 2,
|
2866
|
2875
|
}
|
2867
|
2876
|
err = service.CreateOrder(order)
|
|
@@ -3006,6 +3015,7 @@ func (c *HisApiController) GetUploadInfo() {
|
3006
|
3015
|
tempOrder.FaPiaoNumber = fapiao_number
|
3007
|
3016
|
tempOrder.PType = 2
|
3008
|
3017
|
tempOrder.MedfeeSumamt = totals
|
|
3018
|
+ tempOrder.Diagnosis = diagnosis_id
|
3009
|
3019
|
|
3010
|
3020
|
err = service.SaveHisOrder(&tempOrder)
|
3011
|
3021
|
err = service.UpdataOrderStatusTwo(tempOrder.Number, adminUser.CurrentOrgId)
|
|
@@ -3368,6 +3378,9 @@ func (c *HisApiController) GetHisChargePatientInfo() {
|
3368
|
3378
|
}
|
3369
|
3379
|
case_history, _ := service.GetHisPatientCaseHistoryInfo(admin.CurrentOrgId, patient_id, recordDateTime)
|
3370
|
3380
|
patientPrescriptionInfo, _ := service.FindPatientPrescriptionInfo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
|
3381
|
+
|
|
3382
|
+ lastPatientPrescriptionInfo, _ := service.FindLastPatientPrescriptionInfoTwo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
|
3383
|
+
|
3371
|
3384
|
doctors, _ := service.GetHisAdminUserDoctors(admin.CurrentOrgId)
|
3372
|
3385
|
//获取所有科室信息
|
3373
|
3386
|
department, _ := service.GetAllDepartMent(admin.CurrentOrgId)
|
|
@@ -3378,6 +3391,7 @@ func (c *HisApiController) GetHisChargePatientInfo() {
|
3378
|
3391
|
"prescription": prescriptions,
|
3379
|
3392
|
"case_history": case_history,
|
3380
|
3393
|
"info": patientPrescriptionInfo,
|
|
3394
|
+ "last_info": lastPatientPrescriptionInfo,
|
3381
|
3395
|
"month_prescriptions": monthPrescriptions,
|
3382
|
3396
|
"order": order,
|
3383
|
3397
|
"doctors": doctors,
|
|
@@ -4407,7 +4421,7 @@ func (c *HisApiController) PreSettle() {
|
4407
|
4421
|
timeLayout := "2006-01-02"
|
4408
|
4422
|
loc, _ := time.LoadLocation("Local")
|
4409
|
4423
|
settle_accounts_type, _ := c.GetInt64("settle_accounts_type")
|
4410
|
|
- diagnosis_id, _ := c.GetInt64("diagnosis")
|
|
4424
|
+ diagnosis_id := c.GetString("diagnosis")
|
4411
|
4425
|
sick_type, _ := c.GetInt64("sick_type")
|
4412
|
4426
|
reg_type, _ := c.GetInt64("p_type")
|
4413
|
4427
|
|
|
@@ -4501,6 +4515,7 @@ func (c *HisApiController) PreSettle() {
|
4501
|
4515
|
PType: 2,
|
4502
|
4516
|
IsPre: 1,
|
4503
|
4517
|
MedType: strconv.Itoa(int(reg_type)),
|
|
4518
|
+ Diagnosis: diagnosis_id,
|
4504
|
4519
|
}
|
4505
|
4520
|
err = service.CreateOrder(order)
|
4506
|
4521
|
if err != nil {
|
|
@@ -4609,7 +4624,6 @@ func (c *HisApiController) PreSettle() {
|
4609
|
4624
|
}
|
4610
|
4625
|
service.CreateOrderInfo(info)
|
4611
|
4626
|
}
|
4612
|
|
- his.Diagnosis = diagnosis_id
|
4613
|
4627
|
his.SickType = sick_type
|
4614
|
4628
|
service.UpdataHisPateint(&his)
|
4615
|
4629
|
err = service.UpDatePrescriptionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
|
|
@@ -4646,3 +4660,25 @@ func (c *HisApiController) GetPrivateExpensesInfo() {
|
4646
|
4660
|
})
|
4647
|
4661
|
|
4648
|
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
|
+}
|