|
@ -5,17 +5,16 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.yihu.jw.entity.specialist.rehabilitation.PatientMedicalRecordsDO;
|
|
import com.yihu.jw.entity.specialist.rehabilitation.PatientMedicalRecordsDO;
|
|
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationAdviceDO;
|
|
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationAdviceDO;
|
|
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationInfoService;
|
|
import com.yihu.jw.hospital.module.rehabilitation.service.RehabilitationInfoService;
|
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
|
import com.yihu.jw.rm.specialist.SpecialistMapping;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@ -31,13 +30,35 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
|
|
@Autowired
|
|
@Autowired
|
|
private ObjectMapper objectMapper;
|
|
private ObjectMapper objectMapper;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询患者基本信息
|
|
|
|
*/
|
|
|
|
@GetMapping(value = "getPatientInfo")
|
|
|
|
@ApiOperation(value = "查询患者基本信息")
|
|
|
|
public MixEnvelop getPatientInfo(
|
|
|
|
@ApiParam(name = "patientId", value = "居民id") @RequestParam(value = "patientId", required = false) String patientId,
|
|
|
|
@ApiParam(name = "idcard", value = "计划id") @RequestParam(value = "idcard", required = false) String idcard
|
|
|
|
) {
|
|
|
|
try {
|
|
|
|
List<Map<String, Object>> list = rehabilitationInfoService.getPatientInfo(patientId,idcard);
|
|
|
|
return MixEnvelop.getSuccess(SpecialistMapping.api_success, list);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return MixEnvelop.getError(e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getRehabilitationPatientList", method = RequestMethod.GET)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* status
|
|
|
|
* 是否分配下转:0未分配,1已分配(已下转列表),2创建计划过程失败,3患者无住院病历信息(等待重新下转) 5同步居民失败
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "getRehabilitationPatientListNew", method = RequestMethod.GET)
|
|
@ApiOperation("获取康复下转居民列表")
|
|
@ApiOperation("获取康复下转居民列表")
|
|
public String getRehabilitationPatientList(
|
|
|
|
|
|
public String getRehabilitationPatientListNew(
|
|
@ApiParam(name = "doctorId", value = "医生id", required = false) @RequestParam(value = "doctorId", required = false) String doctorId,
|
|
@ApiParam(name = "doctorId", value = "医生id", required = false) @RequestParam(value = "doctorId", required = false) String doctorId,
|
|
@ApiParam(name = "idcard", value = "身份证", required = false) @RequestParam(value = "idcard", required = false) String idcard,
|
|
@ApiParam(name = "idcard", value = "身份证", required = false) @RequestParam(value = "idcard", required = false) String idcard,
|
|
@ApiParam(name = "isTurnDown", value = "是否已下转 -2:未下转未家签,-1未下转 0未下转全部,;1已下转(未接收);2已下转(已接收);3已下转全部;03已下转全部+未下转全部", defaultValue = "0", required = false) @RequestParam(value = "isTurnDown", required = false, defaultValue = "3") String isTurnDown,
|
|
|
|
|
|
@ApiParam(name = "status", value = "", defaultValue = "0", required = false) @RequestParam(value = "status", required = false) String status,
|
|
@ApiParam(name = "page", value = "起始页", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
|
@ApiParam(name = "page", value = "起始页", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
|
@ApiParam(name = "pagesize", value = "每页显示数据条数", required = false) @RequestParam(value = "pagesize", required = false, defaultValue = "10") Integer pagesize
|
|
@ApiParam(name = "pagesize", value = "每页显示数据条数", required = false) @RequestParam(value = "pagesize", required = false, defaultValue = "10") Integer pagesize
|
|
) {
|
|
) {
|
|
@ -52,21 +73,27 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
|
|
doctorId = getUID();
|
|
doctorId = getUID();
|
|
System.out.println("获取康复下转居民列表--医生id==>getUID()==>" + getUID());
|
|
System.out.println("获取康复下转居民列表--医生id==>getUID()==>" + getUID());
|
|
}
|
|
}
|
|
JSONObject result = rehabilitationInfoService.getRehabilitationPatientList(idcard, doctorId, isTurnDown, page, pagesize);
|
|
|
|
|
|
JSONObject result = rehabilitationInfoService.getRehabilitationPatientListNew(idcard, doctorId, status, page, pagesize);
|
|
return write(200, "请求成功", "data", result);
|
|
return write(200, "请求成功", "data", result);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
return error(-1, e.getMessage());
|
|
return error(-1, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "getDeorsumvergenceCount", method = RequestMethod.GET)
|
|
|
|
@ApiOperation("康复下转已下转顶头数据")
|
|
|
|
public String getDeorsumvergenceCount() {
|
|
|
|
|
|
/**
|
|
|
|
* 查询科室和医生
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "getDetpAndDoctor", method = RequestMethod.GET)
|
|
|
|
@ApiOperation("获取康复下转居民列表")
|
|
|
|
public String getDetpAndDoctor(
|
|
|
|
@ApiParam(name = "type", value = "类型1科室2医生", required = false) @RequestParam(value = "type", required = false) String type,
|
|
|
|
@ApiParam(name = "disease", value = "疾病", required = false) @RequestParam(value = "disease", required = false) String disease,
|
|
|
|
@ApiParam(name = "doctorName", value = "医生名字", required = false) @RequestParam(value = "doctorName", required = false) String doctorName,
|
|
|
|
@ApiParam(name = "deptCode", value = "科室code", required = false) @RequestParam(value = "deptCode", required = false) String deptCode,
|
|
|
|
@ApiParam(name = "deptName", value = "科室", required = false) @RequestParam(value = "deptName", required = false) String deptName) {
|
|
try {
|
|
try {
|
|
JSONObject result = rehabilitationInfoService.getDeorsumvergenceCount(getUID());
|
|
|
|
return write(200, "请求成功", "data", result);
|
|
|
|
|
|
List<Map<String, Object>> list = rehabilitationInfoService.getDetpAndDoctor(doctorName, deptCode, deptName, type,disease);
|
|
|
|
return write(200, "请求成功", "data", list);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
return error(-1, e.getMessage());
|
|
return error(-1, e.getMessage());
|
|
}
|
|
}
|
|
@ -120,6 +147,50 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "getRehabilitationPatientList", method = RequestMethod.GET)
|
|
|
|
@ApiOperation("获取康复下转居民列表")
|
|
|
|
public String getRehabilitationPatientList(
|
|
|
|
@ApiParam(name = "doctorId", value = "医生id", required = false) @RequestParam(value = "doctorId", required = false) String doctorId,
|
|
|
|
@ApiParam(name = "idcard", value = "身份证", required = false) @RequestParam(value = "idcard", required = false) String idcard,
|
|
|
|
@ApiParam(name = "isTurnDown", value = "是否已下转 -2:未下转未家签,-1未下转 0未下转全部,;1已下转(未接收);2已下转(已接收);3已下转全部;03已下转全部+未下转全部", defaultValue = "0", required = false) @RequestParam(value = "isTurnDown", required = false, defaultValue = "3") String isTurnDown,
|
|
|
|
@ApiParam(name = "page", value = "起始页", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
|
|
|
@ApiParam(name = "pagesize", value = "每页显示数据条数", required = false) @RequestParam(value = "pagesize", required = false, defaultValue = "10") Integer pagesize
|
|
|
|
) {
|
|
|
|
try {
|
|
|
|
if (page == null) {
|
|
|
|
page = 1;
|
|
|
|
}
|
|
|
|
if (pagesize == null) {
|
|
|
|
pagesize = 10;
|
|
|
|
}
|
|
|
|
if (StringUtils.isBlank(doctorId)) {
|
|
|
|
doctorId = getUID();
|
|
|
|
System.out.println("获取康复下转居民列表--医生id==>getUID()==>" + getUID());
|
|
|
|
}
|
|
|
|
JSONObject result = rehabilitationInfoService.getRehabilitationPatientList(idcard, doctorId, isTurnDown, page, pagesize);
|
|
|
|
return write(200, "请求成功", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
return error(-1, e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "getDeorsumvergenceCount", method = RequestMethod.GET)
|
|
|
|
@ApiOperation("康复下转已下转顶头数据")
|
|
|
|
public String getDeorsumvergenceCount() {
|
|
|
|
try {
|
|
|
|
JSONObject result = rehabilitationInfoService.getDeorsumvergenceCount(getUID());
|
|
|
|
return write(200, "请求成功", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
return error(-1, e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "createMedicalRecords", method = RequestMethod.POST)
|
|
@RequestMapping(value = "createMedicalRecords", method = RequestMethod.POST)
|
|
@ApiOperation("添加编辑住院病历")
|
|
@ApiOperation("添加编辑住院病历")
|
|
public String createMedicalRecords(
|
|
public String createMedicalRecords(
|