|
@@ -7,6 +7,9 @@ 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.model.doc.DeathCaseDiscussDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -25,48 +28,32 @@ public class DEAC03146 extends QCCatalogue {
|
|
|
* @param inputInfo
|
|
|
* @param outputInfo
|
|
|
*/
|
|
|
- @Autowired
|
|
|
- private SpecialStorageUtil specialStorageUtil;
|
|
|
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- status.set("0");
|
|
|
- if (inputInfo.getDeathCaseDiscussDoc() != null) {
|
|
|
- Map<String, String> deathCaseDiscussStructureMap = inputInfo.getDeathCaseDiscussDoc().getStructureMap();
|
|
|
- if(deathCaseDiscussStructureMap!=null) {
|
|
|
- //其中有个字段为 职务-->科主任
|
|
|
- String recordDoctor = deathCaseDiscussStructureMap.get("讨论主持人");
|
|
|
- if (CatalogueUtil.isEmpty(recordDoctor)) {
|
|
|
- /* if(!findDirectorDoctor(recordDoctor)) {
|
|
|
- status.set("-1");
|
|
|
- }*/
|
|
|
- Map<String, String> positionMap = Content.positionMap;
|
|
|
- for (String keyStr : positionMap.keySet()) {
|
|
|
- if(recordDoctor.contains(keyStr)){
|
|
|
- String position = positionMap.get(keyStr);
|
|
|
- if(position.equals("科室主任")){
|
|
|
- status.set("-1");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ DeathCaseDiscussDoc deathCaseDiscussDoc = inputInfo.getDeathCaseDiscussDoc();
|
|
|
+ if(deathCaseDiscussDoc==null){
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
- }
|
|
|
- //判断姓名是否为科室主任
|
|
|
- private boolean findDirectorDoctor(String recordDoctor) {
|
|
|
- Map<String, Map<String, Object>> hospitalDoctorMap = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
|
|
|
- if (hospitalDoctorMap == null) {
|
|
|
- return false;
|
|
|
+ Map<String, String> positionMap= Content.positionMap;
|
|
|
+ FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
+ String directorName ="";
|
|
|
+ if (firstPageRecordDoc != null) {
|
|
|
+ directorName = firstPageRecordDoc.getStructureMap().get("科主任");
|
|
|
}
|
|
|
- if (hospitalDoctorMap.containsKey(recordDoctor)) {
|
|
|
- Object professor = hospitalDoctorMap.get(recordDoctor).get("professor");
|
|
|
- if (professor != null) {
|
|
|
- if(professor.toString().contains("主任")) {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ String recordDoctor = deathCaseDiscussDoc.getStructureMap().get("讨论主持人");
|
|
|
+ if(StringUtil.isBlank(recordDoctor)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotBlank(directorName)){
|
|
|
+ if(recordDoctor.equals(directorName)){
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
- return false;
|
|
|
+ if (positionMap.containsKey(recordDoctor)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|