|
@@ -110,7 +110,7 @@ class Reciveremote extends Base
|
|
|
break;
|
|
|
case 'exam_status':
|
|
|
if($v != 10){
|
|
|
- $where .= " and e.exam_status=".$v;
|
|
|
+ $where .= " and ra.report_status=".$v;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -142,7 +142,7 @@ class Reciveremote extends Base
|
|
|
// }
|
|
|
log::record($sql);
|
|
|
$list = DB::query($sql);
|
|
|
- $csql = "SELECT count(1) from exams as e,remote_application as ra,patient_infos as p,report as r where (ra.remote_doctor_id='".$doctor['id']."' or ra.remote_doctor_id='') and r.remote_application_id=ra.id and ra.exam_id=e.id and ra.report_status !='' and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id']."'".$where;
|
|
|
+ $csql = "SELECT count(1) from exams as e,remote_application as ra,patient_infos as p,report as r where (ra.remote_doctor_id='".$doctor['id']."' or ra.remote_doctor_id='') and r.remote_application_id=ra.id and ra.exam_id=e.id and ra.report_status !='' and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id']."'".$where.$dwhere;
|
|
|
$count = DB::query($csql);
|
|
|
foreach ($list as $k => $v) {
|
|
|
$cache_key = $doctor['id'].'_'.$v['id'];
|