|
@ -1,11 +1,21 @@
|
|
|
package com.yihu.mm.service;
|
|
|
|
|
|
import com.yihu.mm.entity.yueren.MedicineStroresNo;
|
|
|
import com.yihu.mm.util.HttpClientUtil;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
|
|
@ -15,16 +25,20 @@ public class PhysicalExaminationService {
|
|
|
@Value(("${yuerenApi}"))
|
|
|
private String yuerenApi;
|
|
|
|
|
|
@Autowired
|
|
|
private MedicineStroresNoService medicineStroresNoService;
|
|
|
|
|
|
//查找试卷
|
|
|
public String findExames(String type, String examCode) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("tp_type", type);
|
|
|
//TODO
|
|
|
params.put("sh_id", "52");
|
|
|
MedicineStroresNo medicineStroresNo = medicineStroresNoService.findByCity("350200");
|
|
|
params.put("sh_id", medicineStroresNo.getShId());
|
|
|
return HttpClientUtil.postBody(yuerenApi + "/findtest", params);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取预约信息 ,并且将
|
|
|
* 获取预约信息
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
@ -45,9 +59,8 @@ public class PhysicalExaminationService {
|
|
|
sexStr="女";
|
|
|
}
|
|
|
params.put("u_sex",sexStr );
|
|
|
|
|
|
//todo sh_id 需要从数据库获取 wlyy_medicine_strores_no
|
|
|
params.put("sh_id", "52");
|
|
|
MedicineStroresNo medicineStroresNo = medicineStroresNoService.findByCity("350200");
|
|
|
params.put("sh_id", medicineStroresNo.getCity());
|
|
|
params.put("u_idnum", patient.getIdcard());
|
|
|
//params.put("u_native", u_native);//籍贯
|
|
|
params.put("u_birthday", patient.getBirthday());
|
|
@ -59,6 +72,7 @@ public class PhysicalExaminationService {
|
|
|
return HttpClientUtil.postBody(yuerenApi + "/insertslip", params);
|
|
|
}
|
|
|
|
|
|
//查找题目
|
|
|
public String findQuestion(String tp_id, String pb_id, String ct_id) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ct_id);
|
|
@ -68,6 +82,7 @@ public class PhysicalExaminationService {
|
|
|
return postStr;
|
|
|
}
|
|
|
|
|
|
//提交保存答案
|
|
|
public String handleExam(String tp_id, String pb_id, String dc_answer, String ct_id) {
|
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
@ -78,13 +93,7 @@ public class PhysicalExaminationService {
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/handleproblem", params);
|
|
|
}
|
|
|
|
|
|
public String findconconhealth(String ct_id) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ct_id);
|
|
|
params.put("reqtype", 1);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/findconconhealth", params);
|
|
|
}
|
|
|
|
|
|
//四诊资料采集
|
|
|
public String dillphoneimgdata(String at_id, String answer, String type, String ct_id) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("at_id", at_id);
|
|
@ -98,4 +107,43 @@ public class PhysicalExaminationService {
|
|
|
params.put("object_type",type);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/dillphoneimgdata", params);
|
|
|
}
|
|
|
|
|
|
//处理题目
|
|
|
public String centralizedproblem(String ctId){
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ctId);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/centralizedproblem", params);
|
|
|
}
|
|
|
|
|
|
//处理用户影响
|
|
|
public String conclusionfactor(String ctId){
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ctId);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/conclusionfactor", params);
|
|
|
}
|
|
|
|
|
|
//生成报告单
|
|
|
public String insertconconhealth(String ct_id) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ct_id);
|
|
|
params.put("reqtype", 1);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/insertconconhealth", params);
|
|
|
}
|
|
|
|
|
|
//查找报告单
|
|
|
public String findconconhealth(String ct_id) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ct_id);
|
|
|
params.put("reqtype", 1);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/findconconhealth", params);
|
|
|
}
|
|
|
|
|
|
//查找状态要素结论积分图及个人信息
|
|
|
public String findintegral(String ct_id) {
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("ct_id", ct_id);
|
|
|
params.put("reqtype", 1);
|
|
|
return HttpClientUtil.postBody(yuerenApi+"/findintegral", params);
|
|
|
}
|
|
|
|
|
|
}
|