|
@ -12,10 +12,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 续方咨询问卷相关方法
|
|
|
* 患者端-续方咨询问卷相关方法
|
|
|
* @author huangwenjie
|
|
|
* @date 2017/11/1 22:50
|
|
|
*/
|
|
@ -29,7 +31,7 @@ public class PatientPrescriptionFollowupContentController extends BaseController
|
|
|
|
|
|
@RequestMapping(value = "/getinfo", method = RequestMethod.GET)
|
|
|
@ApiOperation("根据续方CODE、类型CODE,获取随访调查分类数据")
|
|
|
public String getByPrescriptionCodeAndFollowupProject(
|
|
|
public String getinfoByPrescriptionCodeAndFollowupProject(
|
|
|
@ApiParam(name = "prescriptioncode", value = "续方CODE", defaultValue = "续方CODE")
|
|
|
@RequestParam(value = "prescriptioncode", required = true) String prescriptioncode,
|
|
|
@ApiParam(name = "followupProject", value = "续方CODE", defaultValue = "问卷类型(症状、体征和问卷)")
|
|
@ -37,7 +39,16 @@ public class PatientPrescriptionFollowupContentController extends BaseController
|
|
|
try {
|
|
|
|
|
|
List<PrescriptionFollowupContent> result = prescriptionFollowupContentService.getByPrescriptionCodeAndFollowupProject(prescriptioncode,followupProject);
|
|
|
return write(200, "请求成功!","data",result);
|
|
|
|
|
|
Map<String, String> datamap = new HashMap<>();
|
|
|
|
|
|
if(!result.isEmpty()){
|
|
|
for (PrescriptionFollowupContent prescriptionFollowupContent: result) {
|
|
|
datamap.put(prescriptionFollowupContent.getFollowupKey(),prescriptionFollowupContent.getFollowupValue());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return write(200, "请求成功!","data",datamap);
|
|
|
|
|
|
}catch (Exception e){
|
|
|
//日志文件中记录异常信息
|
|
@ -50,11 +61,11 @@ public class PatientPrescriptionFollowupContentController extends BaseController
|
|
|
@RequestMapping(value = "/saveinfo", method = RequestMethod.POST)
|
|
|
@ApiOperation("保存随访调查分类数据")
|
|
|
public String saveInfo(@ApiParam(name = "prescriptioncode", value = "续方CODE", defaultValue = "续方CODE")
|
|
|
@RequestParam(value = "prescriptioncode", required = true) String prescriptioncode,
|
|
|
@RequestParam(value = "prescriptioncode", required = true) String prescriptioncode,
|
|
|
@ApiParam(name = "followupProjectData", value = "调查分类数据", defaultValue = "[{\"followupProject\":\"1\",\"projectData\":{\"WEIGHT\":\"76\",\"WEIGHT_EXP\":\"60\",\"BMI\":\"11\"}}]")
|
|
|
@RequestParam(value = "followupProjectData", required = true) String followupProjectData){
|
|
|
try {
|
|
|
prescriptionFollowupContentService.saveInfo(prescriptioncode,followupProjectData);
|
|
|
prescriptionFollowupContentService.saveInfo(prescriptioncode,followupProjectData,getUID());
|
|
|
return write(200, "请求成功!");
|
|
|
}catch (Exception e){
|
|
|
//日志文件中记录异常信息
|
|
@ -62,6 +73,6 @@ public class PatientPrescriptionFollowupContentController extends BaseController
|
|
|
//返回接口异常信息处理结果
|
|
|
return error(-1, "请求失败!"+e.getMessage());
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|