修改家庭成员-问诊病例入参、返回值数据
This commit is contained in:
@@ -937,4 +937,58 @@ class PatientFamilyService extends BaseService
|
||||
return success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取家庭成员病例数据
|
||||
* @return array
|
||||
*/
|
||||
public function getFamilyCase(): array
|
||||
{
|
||||
$family_id = $this->request->route('family_id');
|
||||
|
||||
$user_info = $this->request->getAttribute("userInfo");
|
||||
|
||||
// 患者家庭成员信息表-健康情况
|
||||
$params = array();
|
||||
$params['family_id'] = $family_id;
|
||||
$params['patient_id'] = $user_info['client_user_id'];
|
||||
$patient_family_health = PatientFamilyHealth::getOne($params);
|
||||
|
||||
$params = array();
|
||||
$params['family_id'] = $family_id;
|
||||
$params['patient_id'] = $user_info['client_user_id'];
|
||||
$patient_family_personal = PatientFamilyPersonalModel::getOne($params);
|
||||
|
||||
$result = array();
|
||||
$result['user_id'] = $user_info['user_id'];
|
||||
$result['patient_id'] = $user_info['client_user_id'];
|
||||
$result['family_id'] = $family_id;
|
||||
$result['diagnosis_date'] = $patient_family_health['diagnosis_date'] ?? null; // 确诊日期
|
||||
$result['disease_class_id'] = $patient_family_health['disease_class_id'] ?? null; // 疾病分类id-系统
|
||||
$result['disease_class_name'] = $patient_family_health['disease_class_name'] ?? null; // 疾病名称-系统
|
||||
$result['is_allergy_history'] = null; // 是否存在过敏史(0:否 1:是)
|
||||
$result['allergy_history'] = null; // 过敏史描述
|
||||
$result['is_family_history'] = null; // 是否存在家族病史(0:否 1:是)
|
||||
$result['family_history'] = null; // 家族病史描述
|
||||
$result['is_pregnant'] = null; // 是否备孕、妊娠、哺乳期(0:否 1:是)
|
||||
$result['pregnant'] = null; // 备孕、妊娠、哺乳期描述
|
||||
|
||||
if (!empty($patient_family_personal)){
|
||||
if ($patient_family_personal['is_allergy_history'] != null){
|
||||
$result['is_allergy_history'] = (int)$patient_family_personal['is_allergy_history']; // 是否存在过敏史(0:否 1:是)
|
||||
$result['allergy_history'] = $patient_family_personal['allergy_history']; // 过敏史描述
|
||||
}
|
||||
|
||||
if ($patient_family_personal['is_family_history'] != null){
|
||||
$result['is_family_history'] = (int)$patient_family_personal['is_family_history']; // 是否存在家族病史(0:否 1:是)
|
||||
$result['family_history'] = $patient_family_personal['family_history']; // 家族病史描述
|
||||
}
|
||||
|
||||
if ($patient_family_personal['is_pregnant'] != null){
|
||||
$result['is_pregnant'] = (int)$patient_family_personal['is_pregnant']; // 是否备孕、妊娠、哺乳期(0:否 1:是)
|
||||
$result['pregnant'] = $patient_family_personal['pregnant']; // 备孕、妊娠、哺乳期描述
|
||||
}
|
||||
}
|
||||
|
||||
return success($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user