|
@ -2,8 +2,11 @@ package com.yihu.wlyy.web.patient.archives;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.yihu.wlyy.config.FastDFSConfig;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.service.app.archives.PatientEventService;
|
|
|
import com.yihu.wlyy.service.app.archives.PatientRecordService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.service.third.jw.JwArchivesService;
|
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
|
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
@ -12,6 +15,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
@ -45,6 +49,11 @@ public class PatientArchivesController extends WeixinBaseController {
|
|
|
@Autowired
|
|
|
private PatientEventService patientEventService;
|
|
|
|
|
|
@Autowired
|
|
|
private JwArchivesService jwArchivesService;
|
|
|
|
|
|
@Autowired
|
|
|
private PatientService patientService;
|
|
|
|
|
|
@ApiOperation("获取门诊记录/住院记录(基卫+APP)")
|
|
|
@RequestMapping(value = "/event", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
@ -134,6 +143,45 @@ public class PatientArchivesController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/****************************************** 社区体检 **********************************************************/
|
|
|
@RequestMapping(value = "list_medical", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("查询居民社区健康体检列表")
|
|
|
public String medical(
|
|
|
@ApiParam(name = "pageIndex", value = "第几页", defaultValue = "")
|
|
|
@RequestParam(value = "pageIndex", required = false) Integer pageIndex,
|
|
|
@ApiParam(name = "pageSize", value = "每页记录数", defaultValue = "")
|
|
|
@RequestParam(value = "pageSize", required = false) Integer pageSize) {
|
|
|
try{
|
|
|
Patient p = patientService.findByCode(getUID());
|
|
|
if(p != null){
|
|
|
JSONArray re = jwArchivesService.getEhrSickMedicalList(p.getIdcard(),pageIndex,pageSize);
|
|
|
return write(200,"查询成功","list",re);
|
|
|
}else{
|
|
|
return error(-1,"患者不存在");
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,"查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "medical_detail", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("查询居民社区健康体检详情信息")
|
|
|
public String medical_detail(@ApiParam(name = "medicalNo", value = "体检ID", defaultValue = "1249652")
|
|
|
@RequestParam(value="medicalNo",required = true) String medicalNo){
|
|
|
try{
|
|
|
JSONObject json = jwArchivesService.getEhrSickMedicalRecord(medicalNo);
|
|
|
return write(200,"查询成功","medical_detail",json);
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,"查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************* 就诊事件管理 **********************************************************/
|
|
|
@RequestMapping(value = "/event/detail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
@ResponseBody
|