csx 4 years ago
parent
commit
16f4318175

+ 2 - 2
controllers/his_api_controller.go View File

@@ -64,9 +64,9 @@ func HisManagerApiRegistRouters() {
64 64
 
65 65
 	//beego.Router("/api/additionalcharge/get", &HisApiController{}, "Get:GetAdditionalcharge")
66 66
 
67
-	beego.Router("/api/hisprescription/get", &DialysisApiController{}, "Get:GetLastOrNextHisPrescription")
67
+	beego.Router("/api/hisprescription/get", &HisApiController{}, "Get:GetLastOrNextHisPrescription")
68 68
 
69
-	beego.Router("/api/callhisprescription/get", &DialysisApiController{}, "Get:GetCallHisPrescription")
69
+	beego.Router("/api/callhisprescription/get", &HisApiController{}, "Get:GetCallHisPrescription")
70 70
 
71 71
 	beego.Router("/api/dayprescription/get", &HisApiController{}, "get:GetHisDayPrescription")
72 72
 

+ 5 - 0
controllers/new_mobile_api_controllers/mobile_his_api_controller.go View File

@@ -76,6 +76,9 @@ func (c *MobileHisApiController) GetHisPatientInfo() {
76 76
 	case_history, _ := service.GetHisPatientCaseHistoryInfo(admin.Org.Id, patient_id, recordDateTime)
77 77
 	patientPrescriptionInfo, _ := service.FindPatientPrescriptionInfo(admin.Org.Id, patient_id, recordDateTime)
78 78
 	order, _ := service.GetHisOrder(admin.Org.Id, number, patient_id)
79
+	all_prescriptions, _ := service.GetCallHisPrescriptions(startRecordDateTime, endRecordDateTime, admin.Org.Id, patient_id)
80
+
81
+	adminUserInfo, _ := service.GetAdminUserInfoByID(admin.Org.Id, admin.AdminUser.Id)
79 82
 
80 83
 	doctors, _ := service.GetHisAdminUserDoctors(admin.Org.Id)
81 84
 	//获取所有科室信息
@@ -91,6 +94,8 @@ func (c *MobileHisApiController) GetHisPatientInfo() {
91 94
 		"order":               order,
92 95
 		"doctors":             doctors,
93 96
 		"department":          department,
97
+		"admin_user_info":     adminUserInfo,
98
+		"all_prescriptions":   all_prescriptions,
94 99
 	})
95 100
 	return
96 101
 

+ 3 - 3
controllers/new_mobile_api_controllers/new_mobile_api_router_register.go View File

@@ -167,11 +167,11 @@ func NewMobileAPIControllersRegisterRouters() {
167 167
 	beego.Router("/m/api/hispatientlist/get", &MobileHisApiController{}, "Get:GetHisPatientList")
168 168
 	beego.Router("/m/api/prescriptionconfig/get", &MobileHisApiController{}, "Get:GetHisPrescriptionConfig")
169 169
 	beego.Router("/m/api/prescriptioninfo/get", &MobileHisApiController{}, "Get:GetHisPatientInfo")
170
-	beego.Router("/m/api/prescription/cell", &MobileHisApiController{}, "Get:GetCallHisPrescription")
170
+	beego.Router("/m/api/prescription/call", &MobileHisApiController{}, "Get:GetCallHisPrescription")
171 171
 	beego.Router("/m/api/lastornextprescription/get", &MobileHisApiController{}, "Get:GetLastOrNextHisPrescription")
172 172
 	beego.Router("/m/api/prescription/delete", &MobileHisApiController{}, "Post:DeletePrescription")
173
-	beego.Router("/m/api/hisdoctoradvice/delete", &MobileHisApiController{}, "Post:DeletePrescription")
174
-	beego.Router("/m/api/hisproject/delete", &MobileHisApiController{}, "Post:DeleteDoctorAdvice")
173
+	beego.Router("/m/api/hisdoctoradvice/delete", &MobileHisApiController{}, "Post:DeleteDoctorAdvice")
174
+	beego.Router("/m/api/hisproject/delete", &MobileHisApiController{}, "Post:DeleteProject")
175 175
 	beego.Router("/m/api/prescription/create", &MobileHisApiController{}, "Post:CreateHisPrescription")
176 176
 
177 177
 }

+ 3 - 3
service/his_service.go View File

@@ -1145,11 +1145,11 @@ func (VMHisPrescriptionTwo) TableName() string {
1145 1145
 func GetAllProjectTeamList(orgid int64) (project []*VMHisProjectTeam, err error) {
1146 1146
 	err = XTReadDB().Model(&VMHisProjectTeam{}).Where("user_org_id = ? and status = 1", orgid).Find(&project).Error
1147 1147
 	for _, item := range project {
1148
-		var project_item *VMHisProject
1148
+		var project_item VMHisProject
1149 1149
 		ids := strings.Split(item.ProjectId, ",")
1150 1150
 		for _, id := range ids {
1151
-			XTReadDB().Model(&VMSchedule{}).Where("user_org_id = ? and status = 1 AND id = ?", id).First(&project_item)
1152
-			item.VMHisProject = append(item.VMHisProject, project_item)
1151
+			XTReadDB().Model(&VMSchedule{}).Where("user_org_id = ? and status = 1 AND id = ?", orgid, id).First(&project_item)
1152
+			item.VMHisProject = append(item.VMHisProject, &project_item)
1153 1153
 		}
1154 1154
 	}
1155 1155
 	return