|
@@ -278,10 +278,19 @@ func (this *PCIndexEvaluationApiController) GetPatientInspectionBarChartData() {
|
278
|
278
|
|
279
|
279
|
var range_value string
|
280
|
280
|
if range_type == 1 {
|
281
|
|
- qcs, _ := statistics_service.FindOrgConfigRangeTypeValue(adminUserInfo.CurrentOrgId, project_id, item_id)
|
282
|
|
- range_value = qcs.RangeMin + "," + qcs.RangeMax
|
|
281
|
+ count, _ := statistics_service.FindOrgInspectionCount(adminUserInfo.CurrentOrgId)
|
|
282
|
+
|
|
283
|
+ if count <= 0 {
|
|
284
|
+ qcs, _ := statistics_service.FindOrgConfigRangeTypeValue(0, project_id, item_id)
|
|
285
|
+ range_value = qcs.RangeMin + "," + qcs.RangeMax
|
|
286
|
+
|
|
287
|
+ } else {
|
|
288
|
+ qcs, _ := statistics_service.FindOrgConfigRangeTypeValue(adminUserInfo.CurrentOrgId, project_id, item_id)
|
|
289
|
+ range_value = qcs.RangeMin + "," + qcs.RangeMax
|
|
290
|
+ }
|
283
|
291
|
|
284
|
292
|
} else {
|
|
293
|
+
|
285
|
294
|
inspection, _ := statistics_service.FindOrgInspectionReferenceRangeTypeValue(adminUserInfo.CurrentOrgId, project_id, item_id)
|
286
|
295
|
for _, item := range inspection {
|
287
|
296
|
if len(range_value) == 0 {
|
|
@@ -292,7 +301,6 @@ func (this *PCIndexEvaluationApiController) GetPatientInspectionBarChartData() {
|
292
|
301
|
}
|
293
|
302
|
|
294
|
303
|
}
|
295
|
|
-
|
296
|
304
|
data, _ := statistics_service.GetPatientInspectionBarChartData(adminUserInfo.CurrentOrgId, theStartTIme, theEndtTIme, project_id, item_id, range_type, range_value, patient_id)
|
297
|
305
|
this.ServeSuccessJSON(map[string]interface{}{
|
298
|
306
|
"data": data,
|