|  | @ -1,5 +1,6 @@
 | 
												
													
														
															|  | package com.yihu.wlyy.web.doctor.patient;
 |  | package com.yihu.wlyy.web.doctor.patient;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | import com.yihu.wlyy.aop.ObserverRequired;
 | 
												
													
														
															|  | import com.yihu.wlyy.entity.doctor.profile.Doctor;
 |  | import com.yihu.wlyy.entity.doctor.profile.Doctor;
 | 
												
													
														
															|  | import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroup;
 |  | import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroup;
 | 
												
													
														
															|  | import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroupInfo;
 |  | import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroupInfo;
 | 
												
											
												
													
														
															|  | @ -15,6 +16,7 @@ import com.yihu.wlyy.util.DateUtil;
 | 
												
													
														
															|  | import com.yihu.wlyy.web.BaseController;
 |  | import com.yihu.wlyy.web.BaseController;
 | 
												
													
														
															|  | 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 org.apache.commons.lang3.StringUtils;
 |  | import org.apache.commons.lang3.StringUtils;
 | 
												
													
														
															|  | import org.json.JSONArray;
 |  | import org.json.JSONArray;
 | 
												
													
														
															|  | import org.json.JSONObject;
 |  | import org.json.JSONObject;
 | 
												
											
												
													
														
															|  | @ -25,6 +27,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
 | 
												
													
														
															|  | import org.springframework.stereotype.Controller;
 |  | import org.springframework.stereotype.Controller;
 | 
												
													
														
															|  | import org.springframework.web.bind.annotation.RequestMapping;
 |  | import org.springframework.web.bind.annotation.RequestMapping;
 | 
												
													
														
															|  | import org.springframework.web.bind.annotation.RequestMethod;
 |  | import org.springframework.web.bind.annotation.RequestMethod;
 | 
												
													
														
															|  | 
 |  | import org.springframework.web.bind.annotation.RequestParam;
 | 
												
													
														
															|  | import org.springframework.web.bind.annotation.ResponseBody;
 |  | import org.springframework.web.bind.annotation.ResponseBody;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | import java.text.DateFormat;
 |  | import java.text.DateFormat;
 | 
												
											
												
													
														
															|  | @ -75,4 +78,63 @@ public class PatientInfoController extends BaseController {
 | 
												
													
														
															|  |             return invalidUserException(e, -1, "获取患者信息失败!");
 |  |             return invalidUserException(e, -1, "获取患者信息失败!");
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     @RequestMapping(value = "createProfile",method = RequestMethod.POST)
 | 
												
													
														
															|  | 
 |  |     @ResponseBody
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("档案建立")
 | 
												
													
														
															|  | 
 |  |     @ObserverRequired
 | 
												
													
														
															|  | 
 |  |     public String createProfile(@ApiParam(value = "医生code", name = "doctorCode") @RequestParam(required = true)String doctorCode ,
 | 
												
													
														
															|  | 
 |  |                                 @ApiParam(value = "患者code", name = "patient") @RequestParam(required = true)String patient,
 | 
												
													
														
															|  | 
 |  |                                 @ApiParam(value = "居委会", name = "jwCountryCode") @RequestParam(required = true)String jwCountryCode,
 | 
												
													
														
															|  | 
 |  |                                 @ApiParam(value = "民族", name = "nation") @RequestParam(required = true)String nation,
 | 
												
													
														
															|  | 
 |  |                                 @ApiParam(value = "血型", name = "blood") @RequestParam(required = true)String blood,
 | 
												
													
														
															|  | 
 |  |                                 @ApiParam(value = "婚姻状况", name = "marry") @RequestParam(required = true)String marry){
 | 
												
													
														
															|  | 
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             // 获取医生下的患者
 | 
												
													
														
															|  | 
 |  |             return write(200, "档案建立成功!", "data", patientInfoService.createProfile(doctorCode , patient, jwCountryCode, nation, blood, marry));
 | 
												
													
														
															|  | 
 |  |         } catch (Exception e) {
 | 
												
													
														
															|  | 
 |  |             error(e);
 | 
												
													
														
															|  | 
 |  |             return invalidUserException(e, -1, "获取患者信息失败!");
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     @RequestMapping(value = "getNationDict",method = RequestMethod.GET)
 | 
												
													
														
															|  | 
 |  |     @ResponseBody
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("获取民族信息列表")
 | 
												
													
														
															|  | 
 |  |     public String getNationDict(){
 | 
												
													
														
															|  | 
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             // 获取医生下的患者
 | 
												
													
														
															|  | 
 |  |             return write(200, "获取成功!", "data",patientInfoService.getNationDict());
 | 
												
													
														
															|  | 
 |  |         } catch (Exception e) {
 | 
												
													
														
															|  | 
 |  |             error(e);
 | 
												
													
														
															|  | 
 |  |             return invalidUserException(e, -1, "获取字典信息失败!");
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     @RequestMapping(value = "getMarryDict",method = RequestMethod.GET)
 | 
												
													
														
															|  | 
 |  |     @ResponseBody
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("婚姻状态字典")
 | 
												
													
														
															|  | 
 |  |     public String getMarryDict(){
 | 
												
													
														
															|  | 
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             // 获取医生下的患者
 | 
												
													
														
															|  | 
 |  |             return write(200, "获取成功!", "data",patientInfoService.getMarryDict());
 | 
												
													
														
															|  | 
 |  |         } catch (Exception e) {
 | 
												
													
														
															|  | 
 |  |             error(e);
 | 
												
													
														
															|  | 
 |  |             return invalidUserException(e, -1, "获取字典信息失败!");
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     @RequestMapping(value = "getBloodDict",method = RequestMethod.GET)
 | 
												
													
														
															|  | 
 |  |     @ResponseBody
 | 
												
													
														
															|  | 
 |  |     @ApiOperation("血型状态字典")
 | 
												
													
														
															|  | 
 |  |     public String getBloodDict(){
 | 
												
													
														
															|  | 
 |  |         try {
 | 
												
													
														
															|  | 
 |  |             // 获取医生下的患者
 | 
												
													
														
															|  | 
 |  |             return write(200, "获取成功!", "data",patientInfoService.getBloodDict());
 | 
												
													
														
															|  | 
 |  |         } catch (Exception e) {
 | 
												
													
														
															|  | 
 |  |             error(e);
 | 
												
													
														
															|  | 
 |  |             return invalidUserException(e, -1, "获取字典信息失败!");
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | }
 |  | }
 |