|
@ -323,7 +323,7 @@ public class RehabilitationManageService extends BaseService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject patientRehabilitationDetail(String patientCode) throws Exception{
|
|
|
Map<String, Object> param = new HashedMap();
|
|
|
|
|
|
List<SignFamily> list = signFamilyDao.findByPatientAndExpensesStatusAndStatus(patientCode,"1",1);
|
|
|
String healthDoctor = null;
|
|
|
String healthDoctorName =null;
|
|
@ -333,6 +333,8 @@ public class RehabilitationManageService extends BaseService {
|
|
|
Integer age = null;
|
|
|
String sex = null;
|
|
|
String signHospitalName = null;
|
|
|
JSONObject json = null;
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
if(list.size()>0){
|
|
|
SignFamily signFamily = list.get(0);
|
|
|
healthDoctor = signFamily.getDoctorHealth();
|
|
@ -340,43 +342,56 @@ public class RehabilitationManageService extends BaseService {
|
|
|
generalDoctor = signFamily.getDoctor();
|
|
|
generalDoctorName = signFamily.getDoctorName();
|
|
|
patientName = signFamily.getName();
|
|
|
age = IdCardUtil.getAgeForIdcard(signFamily.getIdcard());
|
|
|
sex = IdCardUtil.getSexForIdcard_new(signFamily.getIdcard());
|
|
|
signHospitalName = signFamily.getHospitalName();
|
|
|
}
|
|
|
param.put("patientCode", patientCode);
|
|
|
param.put("healthDoctor", healthDoctor);
|
|
|
param.put("healthDoctorName", healthDoctorName);
|
|
|
param.put("generalDoctor", generalDoctor);
|
|
|
param.put("generalDoctorName", generalDoctorName);
|
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + patientRehabilitationDetail, param);
|
|
|
JSONObject result = new JSONObject(response.getContent());
|
|
|
if(result.getInt("status")==200){
|
|
|
JSONObject json = result.getJSONObject("obj").getJSONObject("patientInfo");
|
|
|
json.put("patientName",patientName);
|
|
|
json.put("age",age);
|
|
|
json.put("sex",sex);
|
|
|
String healthyConditionSql =" select label_name,label from wlyy_sign_patient_label_info where status=1 and patient='"+patientCode+"' and label_type=8";
|
|
|
List<Map<String,Object>> healthyConditionList = jdbcTemplate.queryForList(healthyConditionSql);
|
|
|
String healthyCondition = healthyConditionList.size()>0?healthyConditionList.get(0).get("label_name")+"":"";
|
|
|
String healthyConditionType = healthyConditionList.size()>0?healthyConditionList.get(0).get("label")+"":"";
|
|
|
json.put("healthyCondition",healthyCondition);
|
|
|
json.put("healthyConditionType",healthyConditionType);
|
|
|
json.put("signHospitalName",signHospitalName);
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
json.put("photo",patient.getPhoto());
|
|
|
json.put("mobile",patient.getMobile());
|
|
|
JSONArray jsonArray = result.getJSONObject("obj").getJSONArray("serviceDoctorList");
|
|
|
String doctorCode ="";
|
|
|
Doctor doctor = null;
|
|
|
for(int i=0;i<jsonArray.length();i++){
|
|
|
doctorCode = jsonArray.getJSONObject(i).get("doctorCode")+"";
|
|
|
doctor = doctorDao.findByCode(doctorCode);
|
|
|
jsonArray.getJSONObject(i).put("doctorPhoto",doctor!=null?doctor.getPhoto():"");
|
|
|
Map<String, Object> param = new HashedMap();
|
|
|
param.put("patientCode", patientCode);
|
|
|
param.put("healthDoctor", healthDoctor);
|
|
|
param.put("healthDoctorName", healthDoctorName);
|
|
|
param.put("generalDoctor", generalDoctor);
|
|
|
param.put("generalDoctorName", generalDoctorName);
|
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + patientRehabilitationDetail, param);
|
|
|
JSONObject result = new JSONObject(response.getContent());
|
|
|
if(result.getInt("status")==200){
|
|
|
json = result.getJSONObject("obj").getJSONObject("patientInfo");
|
|
|
json.put("patientName",patientName);
|
|
|
String healthyConditionSql =" select label_name,label from wlyy_sign_patient_label_info where status=1 and patient='"+patientCode+"' and label_type=8";
|
|
|
List<Map<String,Object>> healthyConditionList = jdbcTemplate.queryForList(healthyConditionSql);
|
|
|
String healthyCondition = healthyConditionList.size()>0?healthyConditionList.get(0).get("label_name")+"":"";
|
|
|
String healthyConditionType = healthyConditionList.size()>0?healthyConditionList.get(0).get("label")+"":"";
|
|
|
json.put("healthyCondition",healthyCondition);
|
|
|
json.put("healthyConditionType",healthyConditionType);
|
|
|
json.put("signHospitalName",signHospitalName);
|
|
|
age = IdCardUtil.getAgeForIdcard(patient.getIdcard());
|
|
|
sex = IdCardUtil.getSexForIdcard_new(patient.getIdcard());
|
|
|
json.put("patientCode", patientCode);
|
|
|
json.put("patientName", patient.getName());
|
|
|
json.put("age",age);
|
|
|
json.put("sex",sex);
|
|
|
json.put("photo",patient.getPhoto());
|
|
|
json.put("mobile",patient.getMobile());
|
|
|
JSONArray jsonArray = result.getJSONObject("obj").getJSONArray("serviceDoctorList");
|
|
|
String doctorCode ="";
|
|
|
Doctor doctor = null;
|
|
|
for(int i=0;i<jsonArray.length();i++){
|
|
|
doctorCode = jsonArray.getJSONObject(i).get("doctorCode")+"";
|
|
|
doctor = doctorDao.findByCode(doctorCode);
|
|
|
jsonArray.getJSONObject(i).put("doctorPhoto",doctor!=null?doctor.getPhoto():"");
|
|
|
}
|
|
|
return result.getJSONObject("obj").put("patientInfo",json);
|
|
|
}
|
|
|
return result.getJSONObject("obj").put("patientInfo",json);
|
|
|
throw new Exception("请求微服务失败!");
|
|
|
}else{
|
|
|
json = new JSONObject();
|
|
|
}
|
|
|
throw new Exception("请求微服务失败!");
|
|
|
age = IdCardUtil.getAgeForIdcard(patient.getIdcard());
|
|
|
sex = IdCardUtil.getSexForIdcard_new(patient.getIdcard());
|
|
|
json.put("patientCode", patientCode);
|
|
|
json.put("patientName", patient.getName());
|
|
|
json.put("age",age);
|
|
|
json.put("sex",sex);
|
|
|
json.put("photo",patient.getPhoto());
|
|
|
json.put("mobile",patient.getMobile());
|
|
|
return new JSONObject().put("patientInfo",json) ;
|
|
|
}
|
|
|
|
|
|
/**
|