|
@@ -6,6 +6,7 @@ import com.diagbot.enums.SysTypeEnum;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.ReadProperties;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.ConceptIntroduceVO;
|
|
|
import com.diagbot.vo.PushJoinVO;
|
|
|
import com.diagbot.vo.PushVO;
|
|
@@ -15,6 +16,7 @@ import org.springframework.stereotype.Component;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* HIS接口对接业务
|
|
@@ -60,6 +62,23 @@ public class PushFacade {
|
|
|
BeanUtil.copyProperties(pushVO, pushJoinVO);
|
|
|
|
|
|
List<ConceptIntroduceVO> conceptIntroduceVOList = new ArrayList<ConceptIntroduceVO>();
|
|
|
+ if("6".equals(pushVO.getCode())){
|
|
|
+ if(pushVO.getPacsOrder().size()>0){
|
|
|
+ pushVO.getPacsOrder().forEach(i->{
|
|
|
+ if(StringUtil.isNotEmpty(i.getName())){
|
|
|
+ getPacsConfig(conceptIntroduceVOList,i.getName(),pushVO.getHosCode());
|
|
|
+ }
|
|
|
+ } );
|
|
|
+ }
|
|
|
+ }else if("7".equals(pushVO.getCode())){
|
|
|
+ if(pushVO.getLisOrder().size()>0){
|
|
|
+ pushVO.getLisOrder().forEach(i->{
|
|
|
+ if(StringUtil.isNotEmpty(i.getName())){
|
|
|
+ getLisConfig(conceptIntroduceVOList,i.getName(),pushVO.getHosCode());
|
|
|
+ }
|
|
|
+ } );
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//病史
|
|
|
if(pushVO.getMedicalHistory()!=null){
|
|
@@ -113,4 +132,50 @@ public class PushFacade {
|
|
|
inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取公表项中对应的辅检,未查询到时去化验公表项再查
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ */
|
|
|
+ private void getPacsConfig(List<ConceptIntroduceVO> conceptIntroduceVOList,String pacsName,String hosCode) {
|
|
|
+ // 比对映射表中的辅检项
|
|
|
+ Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(hosCode,pacsName);
|
|
|
+ if (pacsMap!=null) {
|
|
|
+ String uniqueName = pacsMap.get("unique_name").toString();
|
|
|
+ if (!"".equals(uniqueName) && uniqueName != null) {
|
|
|
+ String[] uniqueNames = uniqueName.split("、");
|
|
|
+ for (int i = 0; i < uniqueNames.length; i++) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ conceptIntroduceVO.setName(uniqueNames[i]);
|
|
|
+ conceptIntroduceVO.setType(6);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
+ conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
|
|
|
+ conceptIntroduceVOList.add(conceptIntroduceVO);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取公表项中对应的化验,未查询到时去辅检公表项再查
|
|
|
+ *
|
|
|
+ * @param conceptIntroduceVOList
|
|
|
+ * @param
|
|
|
+ */
|
|
|
+ private void getLisConfig(List<ConceptIntroduceVO> conceptIntroduceVOList,String lisName,String hosCode) {
|
|
|
+ // 比对映射表中的化验项
|
|
|
+ Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(hosCode,lisName);
|
|
|
+ if (lisMap!=null) {
|
|
|
+ String uniqueName = lisMap.get("unique_name").toString();
|
|
|
+ String[] uniqueNames = uniqueName.split("、");
|
|
|
+ for (int i = 0; i < uniqueNames.length; i++) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ conceptIntroduceVO.setName(uniqueNames[i]);
|
|
|
+ conceptIntroduceVO.setType(12);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
+ conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
|
|
|
+ conceptIntroduceVOList.add(conceptIntroduceVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|