Преглед на файлове

'保健记录查询接口'

YE-YI преди 8 години
родител
ревизия
01062bc3aa

+ 8 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthController.java

@ -273,7 +273,14 @@ public class DoctorHealthController extends BaseController {
			{
				map.put("xy",xy);
			}
			DevicePatientHealthIndex tz = healthIndexService.findLastByPatien(patient,3);
			if(tz != null){
				map.put("tz",tz);
			}
			DevicePatientHealthIndex sg = healthIndexService.findLastByPatien(patient,4);
			if(tz != null){
				map.put("sg",sg);
			}
			return write(200, "查询成功", "data", map);
		} catch (Exception ex) {
			return invalidUserException(ex, -1, ex.getMessage());

+ 38 - 8
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthRecordController.java

@ -48,7 +48,9 @@ public class DoctorHealthRecordController extends BaseController {
	 */
	@RequestMapping(value = "recent")
	@ResponseBody
	public String recent(String patient) {
	@ApiOperation("根据患者标志获取最近的保健记录")
	public String recent(@ApiParam(name="patient",value="患者代码",defaultValue = "P20160901001")
									 @RequestParam(value="patient",required = true) String patient) {
		try {
			JSONObject json = patientHealthRecordService.findRecentByPatient(patient);
			if (json != null) {
@ -70,7 +72,17 @@ public class DoctorHealthRecordController extends BaseController {
	 */
	@RequestMapping(value = "list_sports")
	@ResponseBody
	public String sports(String patient, String start,String end,int page, int pagesize) {
	@ApiOperation("获取患者运动记录")
	public String sports(@ApiParam(name="patient",value="患者代码",defaultValue = "P20160901001")
							 @RequestParam(value="patient",required = true)String patient,
						 @ApiParam(name="start",value="开始时间",defaultValue = "2017-05-15 00:00:00")
						 @RequestParam(value="start",required = true)String start,
						 @ApiParam(name="end",value="结束时间",defaultValue = "2017-05-15 12:00:00")
							 @RequestParam(value="end",required = true) String end,
						 @ApiParam(name="page",value="第几页",defaultValue = "1")
							 @RequestParam(value="page",required = true) int page,
						 @ApiParam(name="pagesize",value="每页记录数",defaultValue = "10")
							 @RequestParam(value="pagesize",required = true) int pagesize) {
		try {
			//Page<PatientHealthRecordSports> data = patientHealthRecordService.findSportsByPatient(patient, DateUtil.strToDateLong(sortDate), pagesize);
			Page<PatientHealthRecordSports> data = patientHealthRecordService.findSportsByPatientPage(patient, start,end,page, pagesize);
@ -113,10 +125,19 @@ public class DoctorHealthRecordController extends BaseController {
	 */
	@RequestMapping(value = "list_medication")
	@ResponseBody
	public String medication(String patient, @RequestParam(required = false) String start,
							 @RequestParam(required = false) String end,
							 @RequestParam(required = false) Integer page,
							 @RequestParam(required = false) String sortDate, int pagesize) {
	@ApiOperation("获取患者用药记录")
	public String medication(@ApiParam(name="patient",value="患者代码",defaultValue = "P20160901001")
								 @RequestParam(value="patient",required = true)String patient,
							 @ApiParam(name="start",value="开始")
							 	 @RequestParam(required = true) String start,
							 @ApiParam(name="end",value="结束")
								 @RequestParam(required = false) String end,
							 @ApiParam(name="page",value="第几页",defaultValue = "1")
								 @RequestParam(required = true) Integer page,
							 @ApiParam(name="sortDate",value="日期")
							 	@RequestParam(required = false) String sortDate,
							 @ApiParam(name="pagesize",value="每页记录数",defaultValue = "10")
								 @RequestParam(required = true)int pagesize) {
		try {
			Page<PatientHealthRecordMedication> data = null;
			if(!StringUtils.isEmpty(sortDate)) {
@ -161,7 +182,16 @@ public class DoctorHealthRecordController extends BaseController {
	 */
	@RequestMapping(value = "list_diet")
	@ResponseBody
	public String diet(String patient, String start,String end,int page, int pagesize) {
	public String diet(@ApiParam(name = "patient", value = "患者代码", defaultValue = "P20160901001")
						   @RequestParam(value="patient",required = true)String patient,
					   @ApiParam(name="start",value="开始")
					   @RequestParam(required = true) String start,
					   @ApiParam(name="end",value="结束")
						   @RequestParam(required = false) String end,
					   @ApiParam(name="page",value="第几页",defaultValue = "1")
						   @RequestParam(required = true)int page,
					   @ApiParam(name="pagesize",value="每页记录数",defaultValue = "10")
						   @RequestParam(required = true)int pagesize) {
		try {
			Page<PatientHealthRecordDiet> data = patientHealthRecordService.findDietByPatientPage(patient, start,end, page, pagesize);
			if (data != null) {
@ -196,7 +226,7 @@ public class DoctorHealthRecordController extends BaseController {
	@RequestMapping(value = "list_medical", method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("查询居民健康体检列表")
	public String medical(@ApiParam(name = "patient", value = "患者代码", defaultValue = "b7ed0275638e11e69616fa163e424525")
	public String medical(@ApiParam(name = "patient", value = "患者代码", defaultValue = "P20160901001")
						    @RequestParam(value="patient",required = true) String patient ,
						    @ApiParam(name = "pageIndex", value = "第几页", defaultValue = "")
						    @RequestParam(value = "pageIndex", required = false) Integer pageIndex,