فهرست منبع

家庭关系修改

wangjun 4 سال پیش
والد
کامیت
213cc89ab8

+ 6 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -122,15 +122,20 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                patientMappingDO.setCreateTime(new Date());
                patientMappingDao.save(patientMappingDO);
                resultMap.put("patientId",patientId);
                resultMap.put("familyId",patientNewId);
                resultMap.put("familyMember",patientNewId);
                resultMap.put("idCard",idCard);
                resultMap.put("phoneNum",phoneNum);
                resultMap.put("relationName",dictName);
                resultMap.put("name",familyName);
                resultMap.put("cardType",cardType);
                List<Map<String,Object>> resultList = new ArrayList();
                resultList.add(resultMap);
                mixEnvelop.setStatus(200);
                mixEnvelop.setMessage("添加成功");
                mixEnvelop.setDetailModelList(resultList);
            }else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("您所添加的家属无就诊记录,无法添加");
            }
        }
        else {

+ 18 - 15
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -1727,6 +1727,9 @@ public class XzzxEntranceService{
        }
        return personInfoVOS;
    }
    public String replaceHtml(String demoData,String oldChar,String newChar){
        return demoData.replace(oldChar,null==newChar?"无":newChar);
    }
    /**
     * 同步门诊病历
     * @return
@ -1746,22 +1749,22 @@ public class XzzxEntranceService{
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("EMRHTMLDEMO");
            if (null!=wlyyHospitalSysDictDO){
                htmlDeo = wlyyHospitalSysDictDO.getDictValue();
                htmlDeo = htmlDeo.replace("@patientName@",jsonObject.getString("patientName"));
                htmlDeo = htmlDeo.replace("@patientAge@",jsonObject.getString("patientAge"));
                htmlDeo = htmlDeo.replace("@patientsex@",jsonObject.getString("patientsex"));
                htmlDeo = htmlDeo.replace("@deptCode@",jsonObject.getString("deptCode"));
                htmlDeo = htmlDeo.replace("@r+outpatientCode@",jsonObject.getString("outpatientCode"));
                htmlDeo = htmlDeo.replace("@patientClan@",jsonObject.getString("patientClan"));
                htmlDeo = htmlDeo.replace("@Special@",prescriptionEmrDO.getSpecialHistory());
                htmlDeo = replaceHtml(htmlDeo,"@patientName@",jsonObject.getString("patientName"));
                htmlDeo = replaceHtml(htmlDeo,"@patientAge@",jsonObject.getString("patientAge"));
                htmlDeo = replaceHtml(htmlDeo,"@patientsex@",jsonObject.getString("patientsex"));
                htmlDeo = replaceHtml(htmlDeo,"@deptCode@",jsonObject.getString("deptCode"));
                htmlDeo = replaceHtml(htmlDeo,"@r+outpatientCode@",jsonObject.getString("outpatientCode"));
                htmlDeo = replaceHtml(htmlDeo,"@patientClan@",jsonObject.getString("patientClan"));
                htmlDeo = replaceHtml(htmlDeo,"@Special@",prescriptionEmrDO.getSpecialHistory());
                SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd hh:MM");
                htmlDeo = htmlDeo.replace("@createTime@",sf.format(prescriptionEmrDO.getCreateTime()));
                htmlDeo = htmlDeo.replace("@complaint@",prescriptionEmrDO.getComplaint());
                htmlDeo = htmlDeo.replace("@medicalHistory@",prescriptionEmrDO.getMedicalHistory());
                htmlDeo = htmlDeo.replace("@popularHistory@",prescriptionEmrDO.getPopularHistory());
                htmlDeo = htmlDeo.replace("@pastHistory@",prescriptionEmrDO.getPastHistory());
                htmlDeo = htmlDeo.replace("@allergicHistory@",prescriptionEmrDO.getAllergicHistory());
                htmlDeo = htmlDeo.replace("@physicalExamination@",prescriptionEmrDO.getPhysicalExamination());
                htmlDeo = htmlDeo.replace("@assistExamination@",prescriptionEmrDO.getAssistExamination());
                htmlDeo = replaceHtml(htmlDeo,"@createTime@",sf.format(prescriptionEmrDO.getCreateTime()));
                htmlDeo = replaceHtml(htmlDeo,"@complaint@",prescriptionEmrDO.getComplaint());
                htmlDeo = replaceHtml(htmlDeo,"@medicalHistory@",prescriptionEmrDO.getMedicalHistory());
                htmlDeo = replaceHtml(htmlDeo,"@popularHistory@",prescriptionEmrDO.getPopularHistory());
                htmlDeo = replaceHtml(htmlDeo,"@pastHistory@",prescriptionEmrDO.getPastHistory());
                htmlDeo = replaceHtml(htmlDeo,"@allergicHistory@",prescriptionEmrDO.getAllergicHistory());
                htmlDeo = replaceHtml(htmlDeo,"@physicalExamination@",prescriptionEmrDO.getPhysicalExamination());
                htmlDeo = replaceHtml(htmlDeo,"@assistExamination@",prescriptionEmrDO.getAssistExamination());
                condition+="<content>"+htmlDeo+"</content>";
            }
        }

+ 16 - 3
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3,6 +3,7 @@ package com.yihu.jw.im.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ibm.mq.jmqi.MQPD;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
@ -2254,7 +2255,7 @@ public class ImService {
				sql = "SELECT " +
						"a.id AS \"id\"," +
						"op.pay_status AS \"payStatus\"," +
						"case op.type  when 1 then 9 when 2 then 16 else op.type end type," +
						"case op.type  when '1' then '9' when '2' then '16' else op.type end type," +
						"op.description AS \"title\"," +
						"op.description AS \"symptoms\",";
				if ("xm_ykyy_wx".equals(wxId)) {
@ -2278,7 +2279,7 @@ public class ImService {
						"op.id as \"outpatientId\"," +
						"op.type as \"consultType\"," +
						"op.general_doctor as \"generalDoctor\"," +
						"op.icd10_name as \"icd10Name\"," +
							"op.icd10_name as \"icd10Name\"," +
						"d.photo AS \"patientPhoto\" , " +
						"op.doctor as \"doctor\" ," +
						"op.source as \"source\"  " +
@ -2484,7 +2485,19 @@ public class ImService {
				}
			}
			if (map.get("id")!=null){
				if("1".equals(type) || "15".equals(type) || type.contains(",")){
				if("1".equals(type) || "15".equals(type) || type.contains(",")|| "17".equals(type)){
					String consultCode = map.get("id").toString();
					List<WlyyConsultAdvice> consultAdvices = wlyyConsultAdviceDao.getByConsult(consultCode);
					StringBuffer content = new StringBuffer();
					for (WlyyConsultAdvice consultAdvice:consultAdvices){
						content.append(consultAdvice.getAdviceValue()+",");
					}
					if (content!=null&&content.length()>0){
						System.out.println("content+====="+content);
						content.deleteCharAt(content.length()-1);
					}
					map.put("icd10Name",content);
				}else if ("0".equals(type)&&null!=map.get("type")&&"17".equalsIgnoreCase(map.get("type").toString())){
					String consultCode = map.get("id").toString();
					List<WlyyConsultAdvice> consultAdvices = wlyyConsultAdviceDao.getByConsult(consultCode);
					StringBuffer content = new StringBuffer();

+ 2 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -1516,7 +1516,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }else {
            try {
                Map<String,Object> rs = registerService.registerPatient(name,mobile,idcard,ssc,pw,openid,wxId,captcha);
                Map<String,Object> rs = registerService.registerPatient(mobile,pw);
                String code = rs.get("code").toString();
                if(!"1".equals(code)){
                    ObjEnvelop objEnvelop = new ObjEnvelop();
@ -1532,7 +1532,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                Map<String, String> parameters = new HashedMap();
                parameters.put("username",patientDO.getIdcard());
                parameters.put("username",patientDO.getMobile());
                parameters.put("grant_type", "ihealthCode");
                TokenRequest tokenRequest = oAuth2RequestFactory.createTokenRequest(parameters, authenticatedClient);

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

@ -113,6 +113,51 @@ public class RegisterService {
        rs.put("mes","保存用户信息失败");
        return rs;
    }
    public Map<String,Object> registerPatient(String mobile,String pw)throws Exception{
        Map<String,Object> rs = new HashedMap();
        try{
            List<BasePatientDO> p2 = basePatientDao.findByMobileAndDel(mobile,"1");
            if(p2!=null&&p2.size()>0){
                rs.put("code","-2");
                rs.put("mes","手机号已经存在");
                return rs;
            }
            BasePatientDO patient = new BasePatientDO();
            String salt = UUID.randomUUID().toString().substring(0,5);
            patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
            patient.setSalt(salt);
            patient.setMobile(mobile);
            patient.setDel("1");
            patient.setEnabled(1);
            patient.setLocked(0);
            patient.setCreateTime(new Date());
            patient.setUpdateTime(new Date());
            BasePatientDO temp = basePatientDao.save(patient);
            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO();
            medicareCardDO.setDel("1");
            medicareCardDO.setParentType("A");
            medicareCardDO.setType("A_01");
            medicareCardDO.setPatientCode(temp.getId());
            basePatientMedicareCardDao.save(medicareCardDO);
            /*if (org.apache.commons.lang3.StringUtils.isNoneBlank(wxId)&&wxId.equalsIgnoreCase("xm_ykyy_wx")){
                ykyyService.registerYkt(temp.getId(),pw,captcha);
            }*/
            rs.put("code","1");
            rs.put("mes","ok");
            rs.put("patient",temp);
            return rs;
        }catch (Exception e){
            e.printStackTrace();
        }
        rs.put("code","-3");
        rs.put("mes","保存用户信息失败");
        return rs;
    }
    public String updatePatientPw(String pw,String mobile){