|
@@ -1,11 +1,15 @@
|
|
package com.lantone.qc.trans.yiwu;
|
|
package com.lantone.qc.trans.yiwu;
|
|
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
|
+import com.lantone.qc.dbanaly.facade.yiwu.YiWuXmlUtil;
|
|
import com.lantone.qc.pub.model.doc.InformedConsentDoc;
|
|
import com.lantone.qc.pub.model.doc.InformedConsentDoc;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
|
|
+import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description: 知情同意书
|
|
* @Description: 知情同意书
|
|
@@ -13,11 +17,36 @@ import java.util.List;
|
|
* @time: 2020/4/20 17:48
|
|
* @time: 2020/4/20 17:48
|
|
*/
|
|
*/
|
|
public class YiWuInformedConsentDocTrans extends ModelDocTrans {
|
|
public class YiWuInformedConsentDocTrans extends ModelDocTrans {
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public List<InformedConsentDoc> extract(MedrecVo medrecVo) {
|
|
public List<InformedConsentDoc> extract(MedrecVo medrecVo) {
|
|
List<InformedConsentDoc> retList = new ArrayList<>();
|
|
List<InformedConsentDoc> retList = new ArrayList<>();
|
|
|
|
+ List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
|
|
|
|
+ contentMaps.forEach(contentMap -> {
|
|
|
|
+ retList.add(getInformedConsentDoc(contentMap));
|
|
|
|
+ });
|
|
InformedConsentDoc informedConsentDoc = new InformedConsentDoc();
|
|
InformedConsentDoc informedConsentDoc = new InformedConsentDoc();
|
|
retList.add(informedConsentDoc);
|
|
retList.add(informedConsentDoc);
|
|
return retList;
|
|
return retList;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private InformedConsentDoc getInformedConsentDoc(Map<String, Object> contentMap) {
|
|
|
|
+ String content = contentMap.get("xmlText").toString();
|
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
|
+
|
|
|
|
+ Map<String, String> sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
|
+ sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
|
|
+
|
|
|
|
+ InformedConsentDoc informedConsentDoc = new InformedConsentDoc();
|
|
|
|
+ informedConsentDoc.setStructureMap(structureMap);
|
|
|
|
+ informedConsentDoc.setPageData((Map) structureMap);
|
|
|
|
+
|
|
|
|
+ return informedConsentDoc;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private List<String> keyContrasts = Lists.newArrayList(
|
|
|
|
+ "患者签名=患方签名",
|
|
|
|
+ "患者或代理人签名=患方签名"
|
|
|
|
+ );
|
|
}
|
|
}
|