|
@ -1,5 +1,6 @@
|
|
package com.yihu.mm.service;
|
|
package com.yihu.mm.service;
|
|
|
|
|
|
|
|
import com.yihu.mm.entity.patient.ExamReport;
|
|
import com.yihu.mm.entity.yueren.MedicineStroresNo;
|
|
import com.yihu.mm.entity.yueren.MedicineStroresNo;
|
|
import com.yihu.mm.util.HttpClientUtil;
|
|
import com.yihu.mm.util.HttpClientUtil;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
@ -20,6 +21,9 @@ public class PhysicalExaminationService {
|
|
@Autowired
|
|
@Autowired
|
|
private MedicineStroresNoService medicineStroresNoService;
|
|
private MedicineStroresNoService medicineStroresNoService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private ExamReportService examReportService;
|
|
|
|
|
|
//查找试卷
|
|
//查找试卷
|
|
public String findExames(String type, String examCode) {
|
|
public String findExames(String type, String examCode) {
|
|
JSONObject params = new JSONObject();
|
|
JSONObject params = new JSONObject();
|
|
@ -52,7 +56,7 @@ public class PhysicalExaminationService {
|
|
}
|
|
}
|
|
params.put("u_sex",sexStr );
|
|
params.put("u_sex",sexStr );
|
|
MedicineStroresNo medicineStroresNo = medicineStroresNoService.findByCity("350200");
|
|
MedicineStroresNo medicineStroresNo = medicineStroresNoService.findByCity("350200");
|
|
params.put("sh_id", medicineStroresNo.getCity());
|
|
|
|
|
|
params.put("sh_id", medicineStroresNo.getShId());
|
|
params.put("u_idnum", patient.getIdcard());
|
|
params.put("u_idnum", patient.getIdcard());
|
|
//params.put("u_native", u_native);//籍贯
|
|
//params.put("u_native", u_native);//籍贯
|
|
params.put("u_birthday", patient.getBirthday());
|
|
params.put("u_birthday", patient.getBirthday());
|
|
@ -138,13 +142,34 @@ public class PhysicalExaminationService {
|
|
return HttpClientUtil.postBody(yuerenApi+"/findintegral", params);
|
|
return HttpClientUtil.postBody(yuerenApi+"/findintegral", params);
|
|
}
|
|
}
|
|
|
|
|
|
public String showDetail(String patientCode,String ctId){
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 请求接口,获取报告,将其存入数据库中
|
|
|
|
* @param patientCode
|
|
|
|
* @param ctId
|
|
|
|
*/
|
|
|
|
public ExamReport saveReportDetail(String patientCode,String ctId){
|
|
|
|
ExamReport examReport = null;
|
|
String centralizedproblem = centralizedproblem(ctId);
|
|
String centralizedproblem = centralizedproblem(ctId);
|
|
String conclusionfactor = conclusionfactor(ctId);
|
|
String conclusionfactor = conclusionfactor(ctId);
|
|
String insertconconhealth = insertconconhealth(ctId);
|
|
String insertconconhealth = insertconconhealth(ctId);
|
|
String findconconhealth = findconconhealth(ctId);
|
|
String findconconhealth = findconconhealth(ctId);
|
|
String findintegral = findintegral(ctId);
|
|
String findintegral = findintegral(ctId);
|
|
return null;
|
|
|
|
|
|
|
|
|
|
JSONObject reportJson = new JSONObject(findconconhealth);
|
|
|
|
JSONObject reportDetail = new JSONObject(findintegral);
|
|
|
|
String status1 = reportJson.get("status").toString();
|
|
|
|
String status2 = reportDetail.get("status").toString();
|
|
|
|
if("200".equals(status1) && "200".equals(status2)){
|
|
|
|
examReport = new ExamReport();
|
|
|
|
examReport.setPatient(patientCode);
|
|
|
|
examReport.setCtId(ctId);
|
|
|
|
examReport.setCreateTime(new Date());
|
|
|
|
examReport.setReport(reportJson.get("recordset").toString());
|
|
|
|
examReport.setReportDetail(reportDetail.get("recordset").toString());
|
|
|
|
examReport = examReportService.save(examReport);
|
|
|
|
}
|
|
|
|
return examReport;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|