Browse Source

三院患者诊前档案开发

wangzhinan 4 weeks ago
parent
commit
dc4c5e9c11

+ 3 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java

@ -817,7 +817,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @return
     * @throws Exception
     */
    public JSONObject buildAccountAllToHospital(String operatorName,String userName,String idNo,String gend,String phone,String cardNo,String cardType,String addr,String age) throws Exception {
    public JSONObject buildAccountAllToHospital(String operatorName,String userName,String idNo,String gend,String phone,String cardNo,String cardType,String addr,String age,String psnNo) throws Exception {
        String url = entranceUrl +"buildAccount";
        JSONObject object = new JSONObject();
        Map<String,Object> params = new HashedMap();
@ -830,6 +830,8 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        params.put("cardType",cardType);
        params.put("addr",addr);
        params.put("age",age);
        params.put("psnNo",psnNo);
        logger.info("request:"+params);
        HttpResponse response = HttpUtils.doPost(url,params);
        String content = response.getContent();
        logger.info("response:"+content);

+ 10 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -2084,7 +2084,7 @@ public class DsyyEntranceService {
     * @return
     * @throws Exception
     */
    public String buildAccount(String userName,String idNo,String gend,String phone,String cardNo,String cardType,String addr,String age) throws  Exception{
    public String buildAccount(String userName,String idNo,String gend,String phone,String cardNo,String cardType,String addr,String age,String psnNo,String empName) throws  Exception{
        String api = "build_account";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
@ -2118,13 +2118,20 @@ public class DsyyEntranceService {
        if (StringUtils.isNoneBlank(cardType)){
            object.put("cardType",cardType);
        }
        if (!StringUtils.isNoneBlank(addr)){
        if (StringUtils.isNoneBlank(addr)){
            object.put("addr",addr);
        }
        if (!StringUtils.isNoneBlank(age)){
        if (StringUtils.isNoneBlank(age)){
            object.put("age",age);
        }
        if (StringUtils.isNoneBlank(psnNo)){
            object.put("psnNo",psnNo);
        }
        if (StringUtils.isNoneBlank(empName)){
            object.put("empName",empName);
        }
        condition = object.toJSONString();
        String msgBody =condition;

+ 28 - 20
business/base-service/src/main/java/com/yihu/jw/patient/service/PatientPreDiagnosisInfoService.java

@ -115,10 +115,10 @@ public class PatientPreDiagnosisInfoService extends BaseJpaService<PatientPreDia
        String address = infoDO.getProvinceName()+infoDO.getCityName()+infoDO.getTownName()+infoDO.getStreetName()+infoDO.getAddress();
        JSONObject object = dsyyPrescriptionService.queryCardListToHospital("",infoDO.getIdcard());
        if (object!=null){
            if (object.getString("retCode").equalsIgnoreCase("00")){
            if (!object.getString("retCode").equalsIgnoreCase("00")){
                com.alibaba.fastjson.JSONArray array = object.getJSONArray("cardlist");
                if (array==null||array.size()==0){
                    JSONObject jsonObject = dsyyPrescriptionService.buildAccountAllToHospital(infoDO.getName(),infoDO.getName(),infoDO.getIdcard(),infoDO.getSex(),infoDO.getMobile(),infoDO.getCardNo(),infoDO.getChargeType(),address,infoDO.getAge());
                    JSONObject jsonObject = dsyyPrescriptionService.buildAccountAllToHospital(infoDO.getName(),infoDO.getName(),infoDO.getIdcard(),infoDO.getSex(),infoDO.getMobile(),infoDO.getCardNo(),infoDO.getChargeType(),address,infoDO.getAge(),infoDO.getPsnNo());
                    if("00".equals(jsonObject.getString("retCode"))){
                        System.out.println("注册成功"+infoDO.getName());
                    }
@ -147,6 +147,7 @@ public class PatientPreDiagnosisInfoService extends BaseJpaService<PatientPreDia
            }
            patient.setMobile(mobile);
            patient.setDel("1");
            patient.setSex(Integer.parseInt(infoDO.getSex()));
            patient.setEnabled(1);
            patient.setLocked(0);
            patient.setSsc(infoDO.getCardNo());
@ -156,15 +157,18 @@ public class PatientPreDiagnosisInfoService extends BaseJpaService<PatientPreDia
            if (StringUtils.isNoneBlank(idcard)) {
                patient.setIdcard(idcard);
            }
            patient.setProvinceCode(infoDO.getProvince());
            patient.setProvinceName(infoDO.getProvinceName());
            patient.setCityCode(infoDO.getCity());
            patient.setCityName(infoDO.getCityName());
            patient.setTownCode(infoDO.getTown());
            patient.setTownName(infoDO.getTownName());
            patient.setStreetCode(infoDO.getStreet());
            patient.setStreetName(infoDO.getStreetName());
            patient.setAddress(infoDO.getAddress());
            if (StringUtils.isNoneBlank(address)){
                patient.setProvinceCode(infoDO.getProvince());
                patient.setProvinceName(infoDO.getProvinceName());
                patient.setCityCode(infoDO.getCity());
                patient.setCityName(infoDO.getCityName());
                patient.setTownCode(infoDO.getTown());
                patient.setTownName(infoDO.getTownName());
                patient.setStreetCode(infoDO.getStreet());
                patient.setStreetName(infoDO.getStreetName());
                patient.setAddress(infoDO.getAddress());
            }
            BasePatientDO temp = patientDao.save(patient);
            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO();
@ -184,15 +188,19 @@ public class PatientPreDiagnosisInfoService extends BaseJpaService<PatientPreDia
            }
            familyMemberDao.save(wlyyPatientFamilyMemberDO);
        }else {
            patient.setProvinceCode(infoDO.getProvince());
            patient.setProvinceName(infoDO.getProvinceName());
            patient.setCityCode(infoDO.getCity());
            patient.setCityName(infoDO.getCityName());
            patient.setTownCode(infoDO.getTown());
            patient.setTownName(infoDO.getTownName());
            patient.setStreetCode(infoDO.getStreet());
            patient.setStreetName(infoDO.getStreetName());
            patient.setAddress(infoDO.getAddress());
            patient.setSex(Integer.parseInt(infoDO.getSex()));
            if (StringUtils.isNoneBlank(address)){
                patient.setProvinceCode(infoDO.getProvince());
                patient.setProvinceName(infoDO.getProvinceName());
                patient.setCityCode(infoDO.getCity());
                patient.setCityName(infoDO.getCityName());
                patient.setTownCode(infoDO.getTown());
                patient.setTownName(infoDO.getTownName());
                patient.setStreetCode(infoDO.getStreet());
                patient.setStreetName(infoDO.getStreetName());
                patient.setAddress(infoDO.getAddress());
                patientDao.save(patient);
            }
        }
        infoDO.setPatient(patient.getId());
        infoDO.setCreateTime(new Date());

+ 11 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/PatientPreDiagnosisInfoDO.java

@ -45,6 +45,17 @@ public class PatientPreDiagnosisInfoDO extends IdEntityWithCreateTime {
    private String street;//街道
    private String streetName;//
    private String address;//详情地址
    private String psnNo;//医疗保险号
    @Column(name = "psn_no")
    public String getPsnNo() {
        return psnNo;
    }
    public void setPsnNo(String psnNo) {
        this.psnNo = psnNo;
    }
    @Column(name = "patient")
    public String getPatient() {

+ 2 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java

@ -11,6 +11,7 @@ import com.yihu.jw.security.dao.patient.BasePatientMedicareCardDao;
import com.yihu.jw.security.dao.patient.BasePatientWechatDao;
import com.yihu.jw.security.dao.patient.WlyyPatientFamilyMemberDao;
import com.yihu.jw.security.utils.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.encrypt.MD5;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
@ -166,6 +167,7 @@ public class RegisterService {
                    System.out.println("birthday===>" + birthday);
                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
                    patient.setBirthday(dateFormat.parse(birthday));
                    patient.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard)));
                }
            } catch (ParseException e) {
                e.printStackTrace();

+ 6 - 2
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/DsyyController.java

@ -263,8 +263,12 @@ public class DsyyController extends EnvelopRestEndpoint {
                                   @ApiParam(name = "addr", value = "家庭地址", required = false)
                                       @RequestParam(value = "addr",required = false)String addr,
                                   @ApiParam(name = "age", value = "年龄", required = false)
                                       @RequestParam(value = "age",required = false)String age) throws Exception {
        return success("请求成功",dsyyEntranceService.buildAccount(userName,idNo,gend,phone,cardNo,cardType,addr,age));
                                       @RequestParam(value = "age",required = false)String age,
                                   @ApiParam(name = "psnNo", value = "医疗保险号", required = false)
                                       @RequestParam(value = "psnNo",required = false)String psnNo,
                                   @ApiParam(name = "empName", value = "工作单位", required = false)
                                       @RequestParam(value = "empName",required = false)String empName) throws Exception {
        return success("请求成功",dsyyEntranceService.buildAccount(userName,idNo,gend,phone,cardNo,cardType,addr,age,psnNo,empName));
    }
    /**