|
@ -3,15 +3,9 @@ package com.yihu.jw.controller.rehabilitation;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.dao.rehabilitation.RehabilitationOperateRecordsDao;
|
|
|
import com.yihu.jw.entity.specialist.HospitalServiceItemDO;
|
|
|
import com.yihu.jw.entity.specialist.rehabilitation.*;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.entity.specialist.HospitalServiceItemDO;
|
|
|
import com.yihu.jw.entity.specialist.HospitalServiceItemDO;
|
|
|
import com.yihu.jw.entity.specialist.rehabilitation.PatientRehabilitationPlanDO;
|
|
|
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationDetailDO;
|
|
|
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationPlanTemplateDO;
|
|
|
import com.yihu.jw.entity.specialist.rehabilitation.RehabilitationTemplateDetailDO;
|
|
|
import com.yihu.jw.restmodel.web.ListEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
@ -28,8 +22,8 @@ import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cloud.sleuth.Tracer;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@ -268,9 +262,15 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
|
|
|
public MixEnvelop updatePlanStatusById(@ApiParam(name = "planId", value = "康复计划id", required = true)
|
|
|
@RequestParam(value = "planId", required = true)String planId,
|
|
|
@ApiParam(name = "status", value = "状态", required = true)
|
|
|
@RequestParam(value = "status", required = true)Integer status){
|
|
|
@RequestParam(value = "status", required = true)Integer status,
|
|
|
@ApiParam(name = "abortReason", value = "中止原因", required = true)
|
|
|
@RequestParam(value = "abortReason", required = false)String abortReason){
|
|
|
try {
|
|
|
return rehabilitationPlanService.updatePlanStatusById(status,planId);
|
|
|
if(StringUtils.isEmpty(abortReason)){
|
|
|
return rehabilitationPlanService.updatePlanStatusById(status,planId);
|
|
|
}else {
|
|
|
return rehabilitationPlanService.abortPlanById(planId,abortReason);
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
@ -300,7 +300,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = SpecialistMapping.rehabilitation.abortPlanById)
|
|
|
/*@PostMapping(value = SpecialistMapping.rehabilitation.abortPlanById)
|
|
|
@ApiOperation(value = "康复管理-中止康复计划填写中止原因")
|
|
|
public Envelop abortPlanById(@ApiParam(name = "planId", value = "康复计划id", required = true)
|
|
|
@RequestParam(value = "planId", required = true)String planId,
|
|
@ -313,5 +313,32 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 根据居民code和标签code获取康复计划
|
|
|
*
|
|
|
* @param patient
|
|
|
* @param label
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = SpecialistMapping.rehabilitation.selectByLabelAndPatient)
|
|
|
@ApiOperation(value = "根据标签获取康复计划")
|
|
|
public MixEnvelop selectByLabelAndPatient(@ApiParam(name = "patient", value = "居民code")
|
|
|
@RequestParam(required = true)String patient,
|
|
|
@ApiParam(name = "label", value = "标签code")
|
|
|
@RequestParam(required = false)String label){
|
|
|
try {
|
|
|
MixEnvelop envelop = new MixEnvelop();
|
|
|
List<PatientRehabilitationPlanDO> planDOS = rehabilitationPlanService.selectByLabelAndPatient(patient,label);
|
|
|
envelop.setDetailModelList(planDOS);
|
|
|
return envelop;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return MixEnvelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|