|
@@ -3,6 +3,7 @@ package com.lantone.qc.kernel.util;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.pub.Content;
|
|
|
+import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
@@ -146,6 +147,14 @@ public class CatalogueUtil {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ public static boolean equalsDate(Date firstDate, Date secondDate, String datePattren) {
|
|
|
+ if (firstDate != null && secondDate != null) {
|
|
|
+ SimpleDateFormat fmt = new SimpleDateFormat(datePattren);
|
|
|
+ return fmt.format(firstDate).equals(fmt.format(secondDate));
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 对比两个String类型的Date先后
|
|
|
*
|
|
@@ -312,6 +321,7 @@ public class CatalogueUtil {
|
|
|
|
|
|
/**
|
|
|
* 判断字符串是否包含中文字
|
|
|
+ *
|
|
|
* @param str
|
|
|
* @return
|
|
|
*/
|
|
@@ -323,4 +333,27 @@ public class CatalogueUtil {
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否为手术患者
|
|
|
+ *
|
|
|
+ * @param doctorAdviceDocs
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static boolean isOperativePatients(List<DoctorAdviceDoc> doctorAdviceDocs) {
|
|
|
+ String orderPrescriptionType, orderItemName;
|
|
|
+ for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
|
|
|
+ Map<String, String> doctorAdviceStructureMap = doctorAdviceDoc.getStructureMap();
|
|
|
+ orderPrescriptionType = doctorAdviceStructureMap.get("医嘱处方类型");
|
|
|
+ orderItemName = doctorAdviceStructureMap.get("医嘱项目名称");
|
|
|
+ if (StringUtil.isNotBlank(orderPrescriptionType) && "手术".equals(orderPrescriptionType)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(orderItemName) && Pattern.matches(".*拟.*术.*", orderItemName)
|
|
|
+ && !orderItemName.contains("冠脉造影")) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|