|
@@ -27,41 +27,28 @@ type HisApiController struct {
|
27
|
27
|
func HisManagerApiRegistRouters() {
|
28
|
28
|
|
29
|
29
|
beego.Router("/api/hispatient/list", &HisApiController{}, "get:GetHisPatientList")
|
30
|
|
- //beego.Router("/api/hispatient/list", &HisApiController{}, "get:GetHisPatientList")
|
31
|
|
-
|
32
|
30
|
beego.Router("/api/hispatient/get", &HisApiController{}, "get:GetHisPatientInfo")
|
33
|
31
|
beego.Router("/api/hisprescription/config", &HisApiController{}, "get:GetHisPrescriptionConfig")
|
34
|
|
-
|
35
|
32
|
beego.Router("/api/hisprescription/delete", &HisApiController{}, "post:DeletePrescription")
|
36
|
33
|
beego.Router("/api/advice/delete", &HisApiController{}, "post:DeleteDoctorAdvice")
|
37
|
34
|
beego.Router("/api/project/delete", &HisApiController{}, "post:DeleteProject")
|
38
|
35
|
beego.Router("/api/addition_charge/delete", &HisApiController{}, "post:DeleteAddition")
|
39
|
|
-
|
40
|
36
|
beego.Router("/api/hisprescription/list", &HisApiController{}, "get:GetHisPrescriptionList")
|
41
|
37
|
beego.Router("/api/hisprescription/info", &HisApiController{}, "get:GetHisPrescriptionInfo")
|
42
|
|
-
|
43
|
38
|
beego.Router("/api/hisprescription/create", &HisApiController{}, "post:CreateHisPrescription")
|
44
|
39
|
beego.Router("/api/hisprescription/edit", &HisApiController{}, "post:EditHisPrescription")
|
45
|
|
-
|
46
|
40
|
beego.Router("/api/doctorworkstation/casehistory/list", &HisApiController{}, "get:GetHisPatientCaseHistoryList")
|
47
|
41
|
beego.Router("/api/doctorworkstation/casehistory/get", &HisApiController{}, "get:GetHisPatientCaseHistory")
|
48
|
42
|
beego.Router("/api/doctorworkstation/casehistory/create", &HisApiController{}, "get:CreateHisPatientCaseHistory")
|
49
|
|
-
|
50
|
43
|
beego.Router("/api/doctorworkstation/casehistorytemplate/create", &HisApiController{}, "get:CreateCaseHistoryTemplate")
|
51
|
|
-
|
52
|
44
|
beego.Router("/api/doctorworkstation/casehistorytemplate/get", &HisApiController{}, "get:GetCaseHistoryTemplate")
|
53
|
|
-
|
54
|
45
|
beego.Router("/api/hisorder/list", &HisApiController{}, "get:GetHisOrderList")
|
55
|
|
-
|
56
|
46
|
beego.Router("/api/hisorder/get", &HisApiController{}, "get:GetHisOrder")
|
57
|
|
-
|
58
|
47
|
beego.Router("/api/register/get", &HisApiController{}, "get:GetRegisterInfo")
|
59
|
48
|
beego.Router("/api/upload/get", &HisApiController{}, "get:GetUploadInfo")
|
60
|
49
|
beego.Router("/api/presettle/get", &HisApiController{}, "get:PreSettle")
|
61
|
|
-
|
62
|
50
|
beego.Router("/api/refund/post", &HisApiController{}, "post:Refund")
|
63
|
51
|
beego.Router("/api/refundnumber/post", &HisApiController{}, "post:RefundNumber")
|
64
|
|
-
|
65
|
52
|
beego.Router("/api/medicalinsurance/config", &HisApiController{}, "get:GetMedicalInsuranceConfig")
|
66
|
53
|
beego.Router("/api/doctor/list", &HisApiController{}, "get:GetAdminUsers")
|
67
|
54
|
|
|
@@ -79,15 +66,12 @@ func HisManagerApiRegistRouters() {
|
79
|
66
|
beego.Router("/api/orderdetaicollect/get", &HisApiController{}, "get:GetAllOrderDetailCollect")
|
80
|
67
|
beego.Router("/api/cost/compare", &HisApiController{}, "get:GetMedicalInsuranceCostCompareList")
|
81
|
68
|
beego.Router("/api/record/list", &HisApiController{}, "get:GetPutOnRecordList")
|
82
|
|
-
|
83
|
69
|
beego.Router("/api/comparedata/get", &HisApiController{}, "get:GetCompareData")
|
84
|
70
|
beego.Router("/api/fapiao/get", &HisApiController{}, "get:GetFaPiaoData")
|
85
|
|
-
|
86
|
71
|
beego.Router("/api/incomestatistics/get", &HisApiController{}, "get:GetIncomeStatisticsData")
|
87
|
72
|
|
88
|
73
|
beego.Router("/api/postprojectinformation", &HisApiController{}, "post:PostProjectInformation")
|
89
|
74
|
//beego.Router("/api/editprojectinformation", &HisApiController{}, "post:EditProjectInformation")
|
90
|
|
-
|
91
|
75
|
beego.Router("/api/hisprescriptiontemplate/create", &HisApiController{}, "post:CreateHisPrescriptionTemplate")
|
92
|
76
|
|
93
|
77
|
beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
|
|
@@ -4408,6 +4392,7 @@ func (c *HisApiController) GetUploadInfo() {
|
4408
|
4392
|
FaPiaoNumber: fapiao_number,
|
4409
|
4393
|
Diagnosis: diagnosis_id,
|
4410
|
4394
|
PType: 2,
|
|
4395
|
+ //SetlTime: t
|
4411
|
4396
|
}
|
4412
|
4397
|
err = service.CreateOrder(order)
|
4413
|
4398
|
if err != nil {
|
|
@@ -6440,22 +6425,56 @@ func (c *HisApiController) GetPrivateExpensesInfo() {
|
6440
|
6425
|
|
6441
|
6426
|
func (this *HisApiController) ChangeMedType() {
|
6442
|
6427
|
med_type := this.GetString("med_type")
|
6443
|
|
- id, _ := this.GetInt64("id")
|
|
6428
|
+ old_med_type := this.GetString("old_med_type")
|
|
6429
|
+ ids := this.GetString("ids")
|
|
6430
|
+ settle_type, _ := this.GetInt64("settle_type")
|
|
6431
|
+ start_time := this.GetString("start_time")
|
|
6432
|
+ end_time := this.GetString("end_time")
|
|
6433
|
+ ids_arr := strings.Split(ids, ",")
|
|
6434
|
+ if settle_type == 1 { //日结
|
|
6435
|
+ id, _ := strconv.ParseInt(ids_arr[0], 10, 64)
|
|
6436
|
+ prescription, _ := service.GetPrescriptionById(id, this.GetAdminUserInfo().CurrentOrgId)
|
|
6437
|
+ prescription.MedType = med_type
|
|
6438
|
+ err := service.SaveHisPrescription(&prescription)
|
6444
|
6439
|
|
6445
|
|
- prescription, _ := service.GetPrescriptionById(id, this.GetAdminUserInfo().CurrentOrgId)
|
6446
|
|
- prescription.MedType = med_type
|
6447
|
|
- err := service.SaveHisPrescription(&prescription)
|
|
6440
|
+ if err == nil {
|
|
6441
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
6442
|
+ "msg": "修改成功",
|
|
6443
|
+ })
|
6448
|
6444
|
|
6449
|
|
- if err == nil {
|
6450
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
6451
|
|
- "msg": "修改成功",
|
6452
|
|
- })
|
|
6445
|
+ } else {
|
6453
|
6446
|
|
6454
|
|
- } else {
|
|
6447
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
6448
|
+ return
|
6455
|
6449
|
|
6456
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
6457
|
|
- return
|
|
6450
|
+ }
|
6458
|
6451
|
|
|
6452
|
+ } else if settle_type == 2 {
|
|
6453
|
+ timeLayout := "2006-01-02"
|
|
6454
|
+ loc, _ := time.LoadLocation("Local")
|
|
6455
|
+ theStartTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
6456
|
+ if err != nil {
|
|
6457
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
6458
|
+ return
|
|
6459
|
+ }
|
|
6460
|
+ recordStartTime := theStartTime.Unix()
|
|
6461
|
+ start_time_timestamp := recordStartTime
|
|
6462
|
+ theEndTime, err := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 00:00:00", loc)
|
|
6463
|
+ if err != nil {
|
|
6464
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
6465
|
+ return
|
|
6466
|
+ }
|
|
6467
|
+ recordEndTime := theEndTime.Unix()
|
|
6468
|
+ end_time_timestamp := recordEndTime
|
|
6469
|
+ updateErr := service.UpdateBatchHisPrescriptionMedType(ids_arr, med_type, start_time_timestamp, end_time_timestamp, this.GetAdminUserInfo().CurrentOrgId, old_med_type)
|
|
6470
|
+ if updateErr == nil {
|
|
6471
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
6472
|
+ "msg": "修改成功",
|
|
6473
|
+ })
|
|
6474
|
+ } else {
|
|
6475
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
6476
|
+ return
|
|
6477
|
+ }
|
6459
|
6478
|
}
|
6460
|
6479
|
|
6461
|
6480
|
}
|