trick9191 před 7 roky
rodič
revize
c5740d1d16

+ 9 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/vo/PatientArchivesDto.java

@ -7,6 +7,7 @@ public class PatientArchivesDto {
    private String doctorCode; //医生code
    private String patient; //患者code
    private String sex; //性别
    private String idcard; //身份证
    private String mobile; //电话
    private String ssc; //社保号
@ -264,4 +265,12 @@ public class PatientArchivesDto {
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
}

+ 51 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/PatientInfoService.java

@ -36,10 +36,12 @@ import com.yihu.wlyy.service.common.account.TokenService;
import com.yihu.wlyy.service.common.login.LoginLogService;
import com.yihu.wlyy.service.third.jw.JwArchivesService;
import com.yihu.wlyy.util.*;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.objenesis.ObjenesisBase;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@ -406,7 +408,7 @@ public class PatientInfoService extends BaseService {
        json.put("ARCHIVE_TIME", DateUtil.getStringDateShort());//建档时间
        json.put("ARCHIVE_STATUS","3");//档案状态【1.未管理 2.死亡 3.正常 4.高危】
        json.put("SICK_NAME",p.getName());//姓名
        json.put("SICK_SEX",p.getSex());//性别【1.男 2.女 9 未知】
        json.put("SICK_SEX",archive.getSex());//性别【1.男 2.女 9 未知】
        json.put("BIRTHDAY",archive.getBrithday());//出生日期
        json.put("ZONE_CODE",archive.getJwCountryCode());//所属社区【ZONE_DICT】
        json.put("IDENTITY_TYPE","1");//证件类型【IDENTITY_TYPE_DICT】
@ -865,4 +867,52 @@ public class PatientInfoService extends BaseService {
        return rs;
    }
    public Map<String,Object> getArchiveComboList(){
        List<SystemDict> education =systemDictDao.findByDictName("ZY_DEGREE_EDUCATION");
        List<SystemDict> occupation =systemDictDao.findByDictName("ZY_OCCUPATION");
        List<SystemDict> payment =systemDictDao.findByDictName("ZY_PAYMENT_METHOD");
        List<SystemDict> allergy =systemDictDao.findByDictName("ZY_HISTORY_OF_DRUG_ALLERGY");
        List<SystemDict> pastHistory =systemDictDao.findByDictName("ZY_PAST_HISTORY");
        List<SystemDict> disability =systemDictDao.findByDictName("ZY_DISABILITY");
        List<SystemDict> familyHistory =systemDictDao.findByDictName("ZY_FAMILY_HISTORY");
        Map<String,Object> rs = new HashedMap();
        rs.put("education",education);
        rs.put("occupation",occupation);
        rs.put("payment",payment);
        rs.put("allergy",allergy);
        rs.put("pastHistory",pastHistory);
        rs.put("disability",disability);
        rs.put("familyHistory",familyHistory);
        return rs;
    }
    public JSONObject getPatientJWInfo(String idcard)throws Exception{
        org.json.JSONArray jsonArray = jwArchivesService.getSickArchiveRecord(idcard);
        JSONObject rs = (JSONObject) jsonArray.get(0);
        String sql ="SELECT " +
                " TIMESTAMPDIFF(YEAR,p.birthday,SYSDATE()) age, " +
                " p.photo, " +
                " FROM " +
                " wlyy_patient p " +
                " WHERE " +
                " p.idcard = '"+idcard+"'";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0){
            Map<String,Object>  s = list.get(0);
            rs.put("age",s.get("age"));
            rs.put("photo",s.get("photo"));
        }
        return rs;
    }
    public  Map<String,Object> getPatientSignFamily(String idcard){
        SignFamily f = signFamilyDao.findByIdcard(idcard);
        Map<String,Object> rs = new HashedMap();
        rs.put("SignFamily",f);
        return rs;
    }
}

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -2286,6 +2286,7 @@ public class SignWebService extends BaseService {
        SignFamilyRenewLog log = new SignFamilyRenewLog();
        //存储新记录
        log.setRenewSignCode(renew.getCode());
        log.setSignCode(renew.getCode());
        log.setSignYear(renew.getSignYear());
        log.setIdcard(renew.getIdcard());
        log.setAdminTeamId(renew.getAdminTeamId());

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/call/CustomerService.java

@ -37,7 +37,7 @@ public class CustomerService extends BaseService{
	@Autowired
	private MessageDao messageDao;
	public List<Map<String,Object>> getCallServices(String keyword, Integer serverType,Integer state,String patientName,String ssc,String idCard,String doctorName,String code,Integer adminTeamCode ,String startDate,String endDate,Integer page,Integer size){
	public List<Map<String,Object>> getCallServices(String keyword, Integer serverType,Integer state,String patientName,String ssc,String idCard,String doctor,String doctorName,String code,Integer adminTeamCode ,String startDate,String endDate,Integer page,Integer size){
		String sql = "SELECT " +
				" s.`code`, " +
				" s.patient, " +
@ -76,6 +76,9 @@ public class CustomerService extends BaseService{
		if(StringUtils.isNotBlank(idCard)){
			sql +=" AND s.IdCard ='"+idCard+"'" ;
		}
		if(StringUtils.isNotBlank(doctor)){
			sql +=" AND s.doctor ='"+doctor+"'" ;
		}
		if(StringUtils.isNotBlank(doctorName)){
			sql +=" AND s.doctor_name ='"+doctorName+"'" ;
		}

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/call/CallRecordController.java

@ -33,6 +33,7 @@ public class CallRecordController extends BaseController {
                                  @ApiParam(name="patientName",value="患者姓名")@RequestParam(required = false)String patientName,
                                  @ApiParam(name="ssc",value="医保卡号")@RequestParam(required = false)String ssc,
                                  @ApiParam(name="idCard",value="身份证号")@RequestParam(required = false)String idCard,
                                  @ApiParam(name="doctor",value="医生code")@RequestParam(required = false)String doctor,
                                  @ApiParam(name="doctorName",value="医生姓名")@RequestParam(required = false)String doctorName,
                                  @ApiParam(name="code",value="服务编号")@RequestParam(required = false)String code,
                                  @ApiParam(name="adminTeamCode",value="签约医生团队团队")@RequestParam(required = false)Integer adminTeamCode,
@ -42,7 +43,7 @@ public class CallRecordController extends BaseController {
                                  @ApiParam(name="size",value="每页大小")@RequestParam(required = true)Integer size){
        try {
            return write(200,"保存成功","data",customerService.getCallServices(keyword, serverType,state,patientName,ssc,idCard,doctorName, code,adminTeamCode,startDate, endDate, page, size));
            return write(200,"保存成功","data",customerService.getCallServices(keyword, serverType,state,patientName,ssc,idCard,doctor,doctorName, code,adminTeamCode,startDate, endDate, page, size));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");

+ 41 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/PatientInfoController.java

@ -387,4 +387,45 @@ public class PatientInfoController extends BaseController {
            return error(-1, "注册失败!");
        }
    }
    @RequestMapping(value = "getArchiveComboList", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("获取居民建档详细信息下拉列表集合")
    public String getArchiveComboList(){
        try {
            // 获取医生下的患者
            return write(200, "请求成功", "data",patientInfoService.getArchiveComboList());
        } catch (Exception e) {
            error(e);
            return error( -1, "查询失败!");
        }
    }
    @RequestMapping(value = "getPatientJWInfo", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取居民建档信息")
    public String getPatientJWInfo(@ApiParam(value = "身份证号", name = "idcard") @RequestParam(required = true)String idcard){
        try {
            // 获取医生下的患者
            return write(200, "请求成功", "data",patientInfoService.getPatientJWInfo(idcard));
        } catch (Exception e) {
            error(e);
            return error( -1, "查询失败!");
        }
    }
    @RequestMapping(value = "getPatientSignFamily", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取居民签约信息")
    public String getPatientSignFamily(@ApiParam(value = "身份证号", name = "idcard") @RequestParam(required = true)String idcard){
        try {
            // 获取医生下的患者
            return write(200, "请求成功", "data",patientInfoService.getPatientSignFamily(idcard));
        } catch (Exception e) {
            error(e);
            return error( -1, "查询失败!");
        }
    }
}