|
@@ -48,10 +48,77 @@ public class XiamenThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
log.error(e.getMessage(), e);
|
|
|
}
|
|
|
});
|
|
|
+ //厦门查房无主治的情况(查房中高职称+低职称查房,低职称为主治查房)
|
|
|
+ theWardsManage(threeLevelWardDoc);
|
|
|
retList.add(threeLevelWardDoc);
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ //厦门查房无主治的情况(查房中高职称+低职称查房,低职称为主治查房)
|
|
|
+ private void theWardsManage(ThreeLevelWardDoc threeLevelWardDoc) {
|
|
|
+ //科主任
|
|
|
+ boolean department = false;
|
|
|
+ //主任
|
|
|
+ boolean director = false;
|
|
|
+ //副主任
|
|
|
+ boolean deputyDirector = false;
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
|
+ if (threeLevelWardDoc.getAttendingDoctorWardDocs().size() == 0) {
|
|
|
+ for (ThreeLevelWardDoc t : allDoctorWradDocs) {
|
|
|
+ Map<String, String> structureMap = t.getStructureMap();
|
|
|
+ String title = structureMap.get("查房标题");
|
|
|
+ if (title.contains("科主任")) {
|
|
|
+ department = true;
|
|
|
+ }
|
|
|
+ if (title.contains("主任") && !title.contains("科主任") && !title.contains("副主任")) {
|
|
|
+ director = true;
|
|
|
+ }
|
|
|
+ if (title.contains("副主任")) {
|
|
|
+ deputyDirector = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //存在科主任并且存在副主任或主任
|
|
|
+ if (department && (director || deputyDirector)) {
|
|
|
+ for (ThreeLevelWardDoc t : allDoctorWradDocs) {
|
|
|
+ Map<String, String> structureMap = t.getStructureMap();
|
|
|
+ String title = structureMap.get("查房标题");
|
|
|
+ if (!title.contains("科主任") &&(title.contains("副主任") || title.contains("主任"))) {
|
|
|
+// structureMap.put("查房标题", title.replace("副主任", "主治").replace("主任", "主治"));
|
|
|
+ AttendingDoctorWardDoc attendingDoctorWardDoc = null;
|
|
|
+ attendingDoctorWardDoc = new AttendingDoctorWardDoc();
|
|
|
+ attendingDoctorWardDoc.setStructureMap(structureMap);
|
|
|
+ attendingDoctorWardDoc.setPageData((Map) structureMap);
|
|
|
+ if (attendingDoctorWardDoc != null) {
|
|
|
+ threeLevelWardDoc.addAttendingDoctorWardDoc(attendingDoctorWardDoc);
|
|
|
+ }
|
|
|
+ }
|
|
|
+// AttendingDoctorWardDoc attendingDoctorWardDoc = findAttendingDoctorWardDoc(structureMap);
|
|
|
+// if (attendingDoctorWardDoc != null) {
|
|
|
+// threeLevelWardDoc.addAttendingDoctorWardDoc(attendingDoctorWardDoc);
|
|
|
+// }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //不存在科主任并且存在副主任或主任
|
|
|
+ if (director && deputyDirector) {
|
|
|
+ for (ThreeLevelWardDoc t : allDoctorWradDocs) {
|
|
|
+ Map<String, String> structureMap = t.getStructureMap();
|
|
|
+ String title = structureMap.get("查房标题");
|
|
|
+// structureMap.put("查房标题", title.replace("副主任", "主治"));
|
|
|
+ if(title.contains("副主任")){
|
|
|
+ AttendingDoctorWardDoc attendingDoctorWardDoc = null;
|
|
|
+ attendingDoctorWardDoc = new AttendingDoctorWardDoc();
|
|
|
+ attendingDoctorWardDoc.setStructureMap(structureMap);
|
|
|
+ attendingDoctorWardDoc.setPageData((Map) structureMap);
|
|
|
+ if (attendingDoctorWardDoc != null) {
|
|
|
+ threeLevelWardDoc.addAttendingDoctorWardDoc(attendingDoctorWardDoc);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void classifyThreeLevelWardDoc(ThreeLevelWardDoc threeLevelWardDoc, Map<String, Object> contentMap) {
|
|
|
String content = contentMap.get("xmlText").toString();
|
|
|
Map<String, String> structureMap = null;
|
|
@@ -187,7 +254,7 @@ public class XiamenThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
title = title.replace("一助", doctorTitle);
|
|
|
}
|
|
|
if ((StringUtils.isNotEmpty(subTitle(title)) && subTitle(title).contains("主治"))
|
|
|
- || findAttend(content) || title.contains("多学科联合") || endocrinologyTitle(title) || xiamenTitle(title)) {
|
|
|
+ || findAttend(content) || title.contains("多学科联合") || endocrinologyTitle(title)) {
|
|
|
attendingDoctorWardDoc = new AttendingDoctorWardDoc();
|
|
|
attendingDoctorWardDoc.setStructureMap(structureMap);
|
|
|
attendingDoctorWardDoc.setPageData((Map) structureMap);
|
|
@@ -204,7 +271,7 @@ public class XiamenThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
writTitle = writTitle.replace("一助", doctorTitle);
|
|
|
}
|
|
|
if ((StringUtils.isNotEmpty(subTitle(writTitle)) && subTitle(writTitle).contains("主治"))
|
|
|
- || findAttend(content) || writTitle.contains("多学科联合") || endocrinologyTitle(writTitle) || xiamenTitle(title)) {
|
|
|
+ || findAttend(content) || writTitle.contains("多学科联合") || endocrinologyTitle(writTitle)) {
|
|
|
attendingDoctorWardDoc = new AttendingDoctorWardDoc();
|
|
|
attendingDoctorWardDoc.setStructureMap(structureMap);
|
|
|
attendingDoctorWardDoc.setPageData((Map) structureMap);
|
|
@@ -230,10 +297,10 @@ public class XiamenThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
* @param title
|
|
|
* @return
|
|
|
*/
|
|
|
- private boolean xiamenTitle(String title) {
|
|
|
- String regex = ".*主任.*主任.*";
|
|
|
- return title.matches(regex);
|
|
|
- }
|
|
|
+// private boolean xiamenTitle(String title) {
|
|
|
+// String regex = ".*主任.*主任.*";
|
|
|
+// return title.matches(regex);
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 共同照护讨论记录中找主任查房
|