| | |
| | | if (customer.getCusSex() == 0) patientInfo.put("PatientSex","M"); |
| | | else if (customer.getCusSex() == 1) patientInfo.put("PatientSex","F"); |
| | | else patientInfo.put("PatientSex","O"); |
| | | patientInfo.put("PatBirthday",customer.getCusBrithday()); |
| | | patientInfo.put("PatBirthday",new SimpleDateFormat("yyyy-MM-dd").format(customer.getCusBrithday())); |
| | | patientInfo.put("IdCard",customer.getCusIdcard()); |
| | | patientInfo.put("hospitalid","chkwyy"); |
| | | |
| | | String examItems = ""; |
| | | // String examItems = ""; |
| | | HashMap<String, Object> examItem = new HashMap<>(); |
| | | List<Map<String,Object>> list = new ArrayList<>(); |
| | | String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); |
| | | for (TjProject project : projects) { |
| | | HashMap<String, Object> examItem = new HashMap<>(); |
| | | HashMap<String, Object> examItems = new HashMap<>(); |
| | | // 申请单号规则:体检号_project.getProId()后四位 |
| | | examItem.put("HisID", tjOrder.getTjNumber() + String.valueOf(project.getProId()).substring(String.valueOf(project.getProId()).length() - 4)); |
| | | examItem.put("EmergencyFlag", "0"); |
| | | examItem.put("ExamItemID", project.getHisXmbm()); |
| | | examItem.put("ExamItemName", project.getHisXmmc()); |
| | | examItem.put("OrderDT", date); |
| | | examItems.put("HisID", tjOrder.getTjNumber() + String.valueOf(project.getProId()).substring(String.valueOf(project.getProId()).length() - 4)); |
| | | examItems.put("EmergencyFlag", "0"); |
| | | examItems.put("ExamItemID", project.getHisXmbm()); |
| | | examItems.put("ExamItemName", project.getHisXmmc()); |
| | | examItems.put("OrderDT", date); |
| | | SysDept dept = deptService.getById(project.getDeptId()); |
| | | examItem.put("Modality", dept.getModality()); |
| | | examItems.put("Modality", dept.getModality()); |
| | | // TODO 收费标识 1是收费 和 0未收费 |
| | | examItem.put("ChargeFlag",""); |
| | | examItems += "<ExamItem>"+ |
| | | XmlUtil.mapToXmlStr(examItem) |
| | | .replaceAll("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","") |
| | | .replaceAll("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","") |
| | | .replaceAll("<xml>","") |
| | | .replaceAll("</xml>","") |
| | | +"</ExamItem>"; |
| | | examItems.put("ChargeFlag",""); |
| | | // examItems += "<ExamItem>"+ |
| | | // XmlUtil.mapToXmlStr(examItem) |
| | | // .replace("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","") |
| | | //// .replaceAll("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","") |
| | | // .replace("<xml>","") |
| | | // .replace("</xml>","") |
| | | // +"</ExamItem>"; |
| | | list.add(examItems); |
| | | } |
| | | examItem.put("ExamItem",list); |
| | | hashMap.put("PatientInfor",patientInfo); |
| | | hashMap.put("ExamItemList",examItems); |
| | | hashMap.put("ExamItemList",examItem); |
| | | root.put("Root",hashMap); |
| | | String result = HttpRequest.post("").body(XmlUtil.mapToXmlStr(root)).contentType("application/xml;charset:utf-8;").execute().body(); |
| | | String result = HttpRequest.post("http://10.100.100.222:8000/WebInterfaceService.asmx") |
| | | .body(XmlUtil.mapToXmlStr(root)).contentType("application/xml;charset:utf-8;").execute().body(); |
| | | String s = XmlUtil.mapToXmlStr(root); |
| | | log.info("调用pacs传递参数的值为: "+s); |
| | | Map<String, Object> map = XmlUtil.xmlToMap(result); |
| | | if (map.get("Code").toString().equals("1")){ |
| | | for (TjProject project : projects) { |