|
@@ -5,6 +5,8 @@ import com.lantone.qc.pub.Content;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.transferrecord.TransferOutDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.transferrecord.TransferRecordDoc;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -29,6 +31,7 @@ public class THR03138 extends QCCatalogue {
|
|
|
if(ListUtil.isEmpty(doctorAdviceDocs)){
|
|
|
return;
|
|
|
}
|
|
|
+ doc:
|
|
|
for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
|
|
|
//取长期临时医嘱,不为作废医嘱
|
|
|
if(doctorAdviceDoc.getStructureMap()!=null){
|
|
@@ -40,14 +43,34 @@ public class THR03138 extends QCCatalogue {
|
|
|
if(StringUtil.isNotEmpty(adviceState)){
|
|
|
if(!adviceState.equals(Content.cancellationOrder)){
|
|
|
//医嘱若是包含 转*科/科*转则为一个转科患者
|
|
|
- flag=true;
|
|
|
+ String medicalOrderName = doctorAdviceDoc.getStructureMap().get(Content.medicalOrderName);
|
|
|
+ String rex1="[\\s\\S]*(?=转)[\\s\\S]{0,6}(?=科)[\\s\\S]*";
|
|
|
+ String rex2="[\\s\\S]*(?=科)[\\s\\S]{0,6}(?=转)[\\s\\S]*";
|
|
|
+ if(medicalOrderName.matches(rex1)||medicalOrderName.matches(rex2)) {
|
|
|
+ flag = true;
|
|
|
+ break doc;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //为转科人员判断是否有转出记录
|
|
|
+ if(flag){
|
|
|
+ status.set("-1");
|
|
|
+ TransferRecordDoc transferRecordDocs = inputInfo.getTransferRecordDocs();
|
|
|
+ if(transferRecordDocs==null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<TransferOutDoc> transferOutDocs = transferRecordDocs.getTransferOutDocs();
|
|
|
+ if(transferOutDocs!=null || transferOutDocs.size()>0){
|
|
|
+ //转出记录存在
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|