|
@@ -1,11 +1,14 @@
|
|
|
package com.lantone.qc.kernel.catalogue.deathrecord;
|
|
|
|
|
|
+import com.lantone.qc.dbanaly.util.KernelConstants;
|
|
|
+import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
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.util.StringUtil;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -14,21 +17,42 @@ import java.util.Map;
|
|
|
/**
|
|
|
* @ClassName : DEAR03145
|
|
|
* @Description : 死亡记录未由上级医师(主治及以上)签名
|
|
|
+ * 主治及以上-----主治,主任,副主任
|
|
|
* @Author : 胡敬
|
|
|
* @Date: 2020-03-18 18:38
|
|
|
*/
|
|
|
@Component
|
|
|
public class DEAR03145 extends QCCatalogue {
|
|
|
+ @Autowired
|
|
|
+ private SpecialStorageUtil specialStorageUtil;
|
|
|
+
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- status.set("0");
|
|
|
- if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
|
|
|
- Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
|
|
|
- String reviewerName = deathRecordStructureMap.get("审核人");
|
|
|
- status.set("-1");
|
|
|
- Date deathDate = StringUtil.parseDateTime(reviewerName, CatalogueUtil.processDateFormat(Content.dateFormats));
|
|
|
- if (null == deathDate) {
|
|
|
- status.set("-1");
|
|
|
+ if (inputInfo.getDeathRecordDoc() == null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> deathRecordStructure = inputInfo.getDeathRecordDoc().getStructureMap();
|
|
|
+ String recordDoctor = deathRecordStructure.get("审核人");
|
|
|
+ if (StringUtil.isNotBlank(recordDoctor)) {
|
|
|
+ if (findDirectorDoctor(recordDoctor)) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean findDirectorDoctor(String recordDoctor) {
|
|
|
+ Map<String, Map<String, Object>> hospitalDoctorMap = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
|
|
|
+ if (hospitalDoctorMap == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (hospitalDoctorMap.containsKey(recordDoctor)) {
|
|
|
+ Object professor = hospitalDoctorMap.get(recordDoctor).get("professor");
|
|
|
+ if (professor != null) {
|
|
|
+ if(professor.toString().contains("主治")||professor.toString().contains("主任")||professor.toString().contains("副主任")) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|