|
|
@@ -2203,32 +2203,7 @@ class ButtService extends ZskkDefaultService {
|
|
|
public function saveDmExam($data)
|
|
|
{
|
|
|
$arr = $this->makeDmExamDatas($data);
|
|
|
- $where = ['studyuid'=>$arr['studyuid'],'institution_id'=>$arr['institution_id']];
|
|
|
- $exam = $this->butt->getExam($where,'*');
|
|
|
- if(empty($exam))
|
|
|
- {
|
|
|
- $info = $this->butt->getExam(['imagenumber'=>$arr['imagenumber'],'institution_id'=>$arr['institution_id']],'*');
|
|
|
- if(empty($info))
|
|
|
- {
|
|
|
- $arr['id'] = UUIDUtils::uuid();
|
|
|
- $this->butt->insertExam($arr);
|
|
|
- $id = $arr['id'];
|
|
|
- }else{
|
|
|
- $this->butt->updateExam($arr,$info['id']);
|
|
|
- $id = $info['id'];
|
|
|
- }
|
|
|
-
|
|
|
- }else{
|
|
|
- $this->butt->updateExam($arr,$exam['id']);
|
|
|
- $id = $exam['id'];
|
|
|
- }
|
|
|
- $report = $this->butt->getReportData(['exam_id'=>null,'imagenumber'=>$arr['imagenumber']]);
|
|
|
- if(!empty($report))
|
|
|
- {
|
|
|
- $this->butt->updateReport(['exam_id'=>null,'imagenumber'=>$arr['imagenumber']],['exam_id'=>$id]);
|
|
|
- $this->butt->updateExam(['exam_status'=>9],$id);
|
|
|
- }
|
|
|
- return $id;
|
|
|
+ var_dump($arr);die;
|
|
|
}
|
|
|
|
|
|
public function makeDmExamDatas($data)
|
|
|
@@ -2255,46 +2230,4 @@ class ButtService extends ZskkDefaultService {
|
|
|
$arr['exam_status'] = 3;
|
|
|
return $arr;
|
|
|
}
|
|
|
-
|
|
|
- public function saveDmReport($data)
|
|
|
- {
|
|
|
- $where = ['imagenumber'=>$data['B']['BD'],'institution_id'=>$data['B']['BJ']];
|
|
|
- $exam = $this->butt->getExam($where,'*');
|
|
|
- $report = $this->makeReportData($data);
|
|
|
- if(empty($exam))
|
|
|
- {
|
|
|
- $report['id'] = UUIDUtils::uuid();
|
|
|
- $this->butt->insertReport($report);
|
|
|
- return '';
|
|
|
- }else{
|
|
|
- $report['exam_id'] = $exam['id'];
|
|
|
- $old = $this->butt->getReportData(['exam_id'=>$exam['id'],'type'=>1],'*');
|
|
|
- if(empty($old))
|
|
|
- {
|
|
|
- //
|
|
|
- $report['id'] = UUIDUtils::uuid();
|
|
|
- $this->butt->insertReport($report);
|
|
|
- }else{
|
|
|
- $this->butt->updateReport($report,['id'=>$old['id']]);
|
|
|
- }
|
|
|
- $this->butt->updateExam(['exam_status'=>9],$exam['id']);
|
|
|
- return 'success';
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public function makeReportData($data)
|
|
|
- {
|
|
|
- $report = [];
|
|
|
- $report['description'] = $data['C']['CD'];
|
|
|
- $report['impression'] = $data['C']['CE'];
|
|
|
- $report['report_result'] = ($data['C']['CF'] == 9) ? null : $data['C']['CF'];
|
|
|
- $report['report_doctor_name'] = $data['C']['CH'];
|
|
|
- $report['review_doctor_name'] = $data['C']['CI'];
|
|
|
- $report['confirm_doctor_name'] = $data['C']['CI'];
|
|
|
- $report['report_datetime'] = $data['C']['CJ'];
|
|
|
- $report['review_datetime'] = $data['C']['CK'];
|
|
|
- $report['confirm_datetime'] = $data['C']['CK'];
|
|
|
- $report['imagenumber'] = $data['B']['BD'];
|
|
|
- return $report;
|
|
|
- }
|
|
|
}
|