|
|
|
@ -18,55 +18,47 @@ class DetailsResource extends JsonResource |
|
|
|
|
return []; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$lists = []; |
|
|
|
|
foreach ($this->resource['response']['body'] as $k => $v) { |
|
|
|
|
// 过滤掉诊断为接口调用正常的第一条数据 |
|
|
|
|
if ($v['diagnose'] === '医院接口调用正常') { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$lists[] = [ |
|
|
|
|
'clinic_no' => $v['clinicNo'], |
|
|
|
|
'serial_no' => $v['sourceId'], |
|
|
|
|
'source_form' => $v['sourceFrom'], |
|
|
|
|
'dept_id' => $v['dept']['localCode'], |
|
|
|
|
'dept_name' => $v['dept']['localText'], |
|
|
|
|
'doctor_id' => $v['doctor']['localText'], |
|
|
|
|
'doctor_name' => $v['doctor']['localText'], |
|
|
|
|
'exam_type' => $v['examMethod'], |
|
|
|
|
'exam_name' => $v['examName'], |
|
|
|
|
'exam_purpose' => $v['examPurpose'], |
|
|
|
|
'diagnose' => $v['diagnose'], |
|
|
|
|
'exam_view' => $v['examView'], |
|
|
|
|
'diagnose_opinion' =>$v['diagnose_opinion'], |
|
|
|
|
'created_time' => $v['createDt'], |
|
|
|
|
'check_time' => $v['checkDt'], |
|
|
|
|
'report_time' => $v['reportDt'], |
|
|
|
|
'comment' => $v['comment'], |
|
|
|
|
$info = [ |
|
|
|
|
'clinic_no' => $this->resource['clinicNo'], |
|
|
|
|
'serial_no' => $this->resource['sourceId'], |
|
|
|
|
'source_form' => $this->resource['sourceFrom'], |
|
|
|
|
'dept_id' => $this->resource['dept']['localCode'], |
|
|
|
|
'dept_name' => $this->resource['dept']['localText'], |
|
|
|
|
'doctor_id' => $this->resource['doctor']['localText'], |
|
|
|
|
'doctor_name' => $this->resource['doctor']['localText'], |
|
|
|
|
'exam_type' => $this->resource['examMethod'], |
|
|
|
|
'exam_name' => $this->resource['examName'], |
|
|
|
|
'exam_purpose' => $this->resource['examPurpose'], |
|
|
|
|
'diagnose' => $this->resource['diagnose'], |
|
|
|
|
'exam_view' => $this->resource['examView'], |
|
|
|
|
'diagnose_opinion' =>$this->resource['diagnoseOpinion'], |
|
|
|
|
'created_time' => $this->resource['createDt'], |
|
|
|
|
'check_time' => $this->resource['checkDt'], |
|
|
|
|
'report_time' => $this->resource['reportDt'], |
|
|
|
|
'comment' => $this->resource['comment'] ?: '', |
|
|
|
|
// 患者信息 |
|
|
|
|
'patient_name' => $v['patient']['name'], |
|
|
|
|
'patient_gender' => $v['patient']['gender'], |
|
|
|
|
'patient_birth' => $v['patient']['birthday'], |
|
|
|
|
'patient_name' => $this->resource['patient']['name'], |
|
|
|
|
'patient_gender' => (int)$this->resource['patient']['sex'], |
|
|
|
|
'patient_birthday' => $this->resource['patient']['dob'], |
|
|
|
|
// 冗余信息 |
|
|
|
|
'org_id' => $v['org']['localCode'], |
|
|
|
|
'org_name' => $v['org']['localText'], |
|
|
|
|
'equipment_name' => $v['equipmentName'], |
|
|
|
|
'equipment_no' => $v['equipmentNameNo'], |
|
|
|
|
'report_doctor_id' => $v['rpDoctor']['localCode'], |
|
|
|
|
'report_doctor_name' => $v['rpDoctor']['localText'], |
|
|
|
|
'report_org_id' => $v['rpOrg']['localCode'], |
|
|
|
|
'report_org_name' => $v['rpOrg']['localText'], |
|
|
|
|
'crisis_flag' => $v['crisisFlag'], |
|
|
|
|
'crisis_desc' => $v['crisisDesc'], |
|
|
|
|
'crisis_content' => $v['crisisContent'], |
|
|
|
|
'unusual_flag' => $v['unusualFlag'], |
|
|
|
|
'deal_flag' => $v['dealFlag'], |
|
|
|
|
'need_deal_flag' => $v['needDealFlag'], |
|
|
|
|
'org_id' => $this->resource['org']['localCode'], |
|
|
|
|
'org_name' => $this->resource['org']['localText'], |
|
|
|
|
'equipment_name' => $this->resource['equipmentName'], |
|
|
|
|
'equipment_no' => $this->resource['equipmentNameNo'] ?: '', |
|
|
|
|
'report_doctor_id' => $this->resource['rpDoctor']['localCode'], |
|
|
|
|
'report_doctor_name' => $this->resource['rpDoctor']['localText'], |
|
|
|
|
'report_org_id' => $this->resource['rpOrg']['localCode'], |
|
|
|
|
'report_org_name' => $this->resource['rpOrg']['localText'], |
|
|
|
|
'crisis_flag' => (int) ($this->resource['crisisFlag'] ?: 0), |
|
|
|
|
'crisis_desc' => $this->resource['crisisDesc'] ?: '', |
|
|
|
|
'crisis_content' => $this->resource['crisisContent'] ?: '', |
|
|
|
|
'unusual_flag' => (int) ($this->resource['unusualFlag'] ?: 0), |
|
|
|
|
'deal_flag' => (int) ($this->resource['dealFlag'] ?: 0), |
|
|
|
|
'need_deal_flag' => (int) ($this->resource['needDealFlag'] ?: 0), |
|
|
|
|
// pacs 图片数组一般为空 |
|
|
|
|
'pacs_images' => (array) ($v['pacs'] ?? []) |
|
|
|
|
'pacs_images' => (array) ($this->resource['pacs'] ?? []) |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $lists; |
|
|
|
|
return $info; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|