Browse Source

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 8 years ago
parent
commit
03fbd52635

+ 12 - 7
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -43,7 +43,7 @@ import com.yihu.wlyy.web.WeixinBaseController;
 * @author George
 */
@Controller
@RequestMapping(value = "/doctor/family_contract", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/doctor/family_contract/getPatientByLable", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-家庭签约")
public class DoctorFamilyContractController extends WeixinBaseController {
@ -74,8 +74,8 @@ public class DoctorFamilyContractController extends WeixinBaseController {
        try {
            JSONObject returnJO = new JSONObject();
            Map<String, List<Patient>> list = familyContractService.getPatientByLevel(getUID());
            if(list!=null&&list.size()>0){
                for(Map.Entry<String, List<Patient>> entyr:list.entrySet()) {
            if (list != null && list.size() > 0) {
                for (Map.Entry<String, List<Patient>> entyr : list.entrySet()) {
                    JSONArray array = new JSONArray();
                    addList(returnJO, entyr.getValue(), array, entyr.getKey());
                }
@ -110,19 +110,22 @@ public class DoctorFamilyContractController extends WeixinBaseController {
            returnJO.put(key, array);
        }
    }
    /**
     * 根据标签查看当前医生签约的居民  3 健康管理师  2是全科
     */
    @RequestMapping(value = "/getPatientByLable")
    @ResponseBody
    public String getPatientByLable(String labelType,String level) {
    public String getPatientByLable(String labelType, String level, String doctorcode) {
        try {
            JSONObject list = familyContractService.getPatientByLable(getUID(), labelType,level);
            JSONObject list = familyContractService.getPatientByLable(doctorcode, labelType, level);
            return write(200, "查询成功", "data", list);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
    /**
     * 医生签约患者列表查询接口
     *
@ -836,7 +839,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
            String labelType,
            @RequestParam(required = false) String patientName) {
        try {
            JSONObject list = familyContractService.findNoHealthSignFamilyHealth(getUID(),labelType,patientName);
            JSONObject list = familyContractService.findNoHealthSignFamilyHealth(getUID(), labelType, patientName);
            return write(200, "签约数据加载成功!", "data", list);
        } catch (Exception e) {
            e.printStackTrace();
@ -846,6 +849,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
    /**
     * 搜索患者
     *
     * @param patientAddr
     * @param patientName
     * @return
@ -856,13 +860,14 @@ public class DoctorFamilyContractController extends WeixinBaseController {
            @RequestParam(required = false) String patientAddr,
            @RequestParam(required = false) String patientName) {
        try {
            JSONArray list = familyContractService.findNoHealthSignFamilyHealthByParams(getUID(),patientAddr,patientName);
            JSONArray list = familyContractService.findNoHealthSignFamilyHealthByParams(getUID(), patientAddr, patientName);
            return write(200, "签约数据加载成功!", "data", list);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
    /**
     * 获取没有健康管理师的签约数据数目
     *