浏览代码

xg同步studyid

lgy 9 小时之前
父节点
当前提交
9229cbb193

+ 2 - 2
jcjyhr/app/zskk/model/Patient.php

@@ -217,9 +217,9 @@ class Patient extends ZskkModel
         return (new Institution())->where('INSTITUTION_CODE',$id)->value('name');
     }
 
-    public function saveReportStudy($studyUid,$studyId)
+    public function saveReportStudy($studyUid,$studyId,$orgcode)
     {
-        return (new ExamReport())->where('STUDYUID',$studyUid)->update(['STUDY_ID' => $studyId]);
+        return (new ExamReport())->where('STUDYUID',$studyUid)->where('ORGCODE',$orgcode)->update(['STUDY_ID' => $studyId]);
 
     }
 

+ 2 - 1
jcjyhr/app/zskk/servies/PatientServies.php

@@ -1508,7 +1508,8 @@ class PatientServies
     {
         $study_id = $params['study_id'];
         $studyUid = $params['studyUid'];
-        $exam = $this->patientModel->saveReportStudy($studyUid,$study_id);
+        $orgcode = $params['orgcode'];
+        $exam = $this->patientModel->saveReportStudy($studyUid,$study_id,$orgcode);
         return 'success';
     }
 

+ 3 - 2
server/application/api/servies/butt/ButtService.php

@@ -191,8 +191,9 @@ class ButtService extends ZskkDefaultService {
 
                 $url = "http://111.53.165.106:9605/zskk/patient/syncExams";
                 $data = [
-                    'studyUid'=>$exam['STUDYUID'],
-                    'study_id'=>$exam['STUDY_ID']
+                    'studyUid'=>$exam['studyUid'],
+                    'orgcode'=>$exam['institution_id'],
+                    'study_id'=>$exam['study_id']
                 ];
                 $this->curlPost($url,$data);