|
@@ -930,8 +930,12 @@ class PatientServies
|
|
|
public function postExamReport($params): string
|
|
|
{
|
|
|
$information = $this->patientModel->getMedicalData(['HOS_EMPI'=>$params['HOS_EMPI']],'*');
|
|
|
+ if(empty($information))
|
|
|
+ {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
$EXAM_REPORTS = $this->makeExamData($params['EXAM_REPORTS']);
|
|
|
- $report = $this->patientModel->getExamReport(['EXAM_REPORT_CODE'=>$EXAM_REPORTS['EXAM_REPORT_CODE']],'*');
|
|
|
+ $report = $this->patientModel->getExamReport(['PATIENT_CODE'=>$information['PATIENT_CODE']],'*');
|
|
|
$report->save($EXAM_REPORTS);
|
|
|
return 'success';
|
|
|
}
|