Przeglądaj źródła

创建订单新增his病人id

wangjun 3 lat temu
rodzic
commit
ffc98b9aec

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

@ -11836,9 +11836,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                orderObj.put("openId",openId);
                orderObj.put("openId",openId);
                orderObj.put("name",name);
                orderObj.put("name",name);
                orderObj.put("idNo",cardNo);
                orderObj.put("idNo",cardNo);
                String hisPatientId=tasyNatService.getPatientHisId(cardNo,mediaCard);
                orderObj.put("patientId",hisPatientId);
                orderObj.put("mobile",mobile);
                Map mapHis=tasyNatService.getPatientHisId(cardNo,mediaCard);
                orderObj.put("patientId",mapHis.get("Patientid").toString());
                orderObj.put("mobile",mapHis.get("MobilePhone").toString());
                //orderObj.put("socialCard","");
                //orderObj.put("socialCard","");
                orderObj.put("icCard",mediaCard);
                orderObj.put("icCard",mediaCard);
                BigDecimal b = new BigDecimal(itemPrice);
                BigDecimal b = new BigDecimal(itemPrice);

+ 14 - 7
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/TasyNatService.java

@ -850,9 +850,9 @@ public class TasyNatService {
            orderObj.put("openId",openId);
            orderObj.put("openId",openId);
            orderObj.put("name",baseNatAppointmentDO.getName());
            orderObj.put("name",baseNatAppointmentDO.getName());
            orderObj.put("idNo",baseNatAppointmentDO.getCardNo());
            orderObj.put("idNo",baseNatAppointmentDO.getCardNo());
            String hisPatientId=getPatientHisId(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getMedicare());
            orderObj.put("patientId",hisPatientId);
            orderObj.put("mobile",baseNatAppointmentDO.getMobile());
            Map mapHis=getPatientHisId(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getMedicare());
            orderObj.put("patientId",mapHis.get("Patientid").toString());
            orderObj.put("mobile",mapHis.get("MobilePhone").toString());
            //orderObj.put("socialCard","");
            //orderObj.put("socialCard","");
            orderObj.put("icCard",baseNatAppointmentDO.getMedicare());
            orderObj.put("icCard",baseNatAppointmentDO.getMedicare());
            BigDecimal b = new BigDecimal(baseNatAppointmentDO.getChargeAmount());
            BigDecimal b = new BigDecimal(baseNatAppointmentDO.getChargeAmount());
@ -1007,7 +1007,8 @@ public class TasyNatService {
        result.put("msg","验证通过");
        result.put("msg","验证通过");
        return  result;
        return  result;
    }
    }
    public String getPatientHisId(String idcard,String mediacard) throws Exception{
    public Map getPatientHisId(String idcard,String mediacard) throws Exception{
        Map map = new HashMap();
        String res = findHisPatientCard(idcard);
        String res = findHisPatientCard(idcard);
        JSONObject jsonObject = JSON.parseObject(res);
        JSONObject jsonObject = JSON.parseObject(res);
        if ("1".equalsIgnoreCase(jsonObject.getString("ReturnCode"))) {
        if ("1".equalsIgnoreCase(jsonObject.getString("ReturnCode"))) {
@ -1019,7 +1020,10 @@ public class TasyNatService {
                        JSONObject child = jsonArray.getJSONObject(i);
                        JSONObject child = jsonArray.getJSONObject(i);
                        if (mediacard.equalsIgnoreCase(child.getString("CardNo"))) {
                        if (mediacard.equalsIgnoreCase(child.getString("CardNo"))) {
                            String Patientid = child.getString("Patientid");
                            String Patientid = child.getString("Patientid");
                            return Patientid;
                            String MobilePhone = child.getString("MobilePhone");
                            map.put("Patientid",Patientid);
                            map.put("MobilePhone",MobilePhone);
                            return map;
                        }
                        }
                    }
                    }
@ -1029,7 +1033,10 @@ public class TasyNatService {
                    JSONObject jsonObject1 = JSONObject.parseObject(patients);
                    JSONObject jsonObject1 = JSONObject.parseObject(patients);
                    if (mediacard.equalsIgnoreCase(jsonObject1.getString("CardNo"))) {
                    if (mediacard.equalsIgnoreCase(jsonObject1.getString("CardNo"))) {
                        String Patientid = jsonObject1.getString("Patientid");
                        String Patientid = jsonObject1.getString("Patientid");
                        return Patientid;
                        String MobilePhone = jsonObject1.getString("MobilePhone");
                        map.put("Patientid",Patientid);
                        map.put("MobilePhone",MobilePhone);
                        return map;
                    }
                    }
                } catch (Exception e) {
                } catch (Exception e) {
                   e.printStackTrace();
                   e.printStackTrace();
@ -1037,6 +1044,6 @@ public class TasyNatService {
            }
            }
        }
        }
        return "";
        return map;
    }
    }
}
}