lgy 3 weeks ago
parent
commit
b7320807a7
1 changed files with 10 additions and 10 deletions
  1. 10 10
      jcjyhr/app/zskk/servies/PatientServies.php

+ 10 - 10
jcjyhr/app/zskk/servies/PatientServies.php

@@ -1510,25 +1510,25 @@ class PatientServies
         }
         $patient = $this->patientModel->getPatientsByID_CARDNUM($idCard,$where);
         $list = [];
+        $patientData = [];
         foreach ($patient as $v)
         {
+            if(!empty($patientData))
+            {
+                $arr['AGE'] = $medical['AGE'];
+                $arr['GENDER'] = $medical['GENDER'];
+                $arr['PHONE'] = $v['PHONE'];
+                $arr['NAME'] = $v['NAME'];
+                $patientData = $arr;
+            }
             $exam = $this->patientModel->getExam($v['PATIENT_CODE'],"STUDY_ID != ''");
             if(empty($exam))
             {
-//                continue;
+                continue;
             }
             $medical = $this->patientModel->getMedical($v['PATIENT_CODE']);
-            $patientData = [];
             foreach ($exam as $value)
             {
-                if(!empty($patientData))
-                {
-                    $arr['AGE'] = $medical['AGE'];
-                    $arr['GENDER'] = $medical['GENDER'];
-                    $arr['PHONE'] = $v['PHONE'];
-                    $arr['NAME'] = $v['NAME'];
-                    $patientData = $arr;
-                }
                 $arr = [];
                 if(!empty($value))
                 {