Commit d0b1f5c3cf7fea371f422f4cda1af44841937ecf
1 parent
a39b96fcba
Exists in
master
and in
1 other branch
add kids his patient
Showing 2 changed files with 34 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/mmbb21/MmbbService.java
View file @
d0b1f5c
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.lyms.platform.common.utils.JsonUtil; |
| 5 | 5 | import com.lyms.platform.common.utils.PropertiesUtils; |
| 6 | 6 | import com.lyms.platform.common.utils.SystemConfig; |
| 7 | +import com.lyms.platform.pojo.BabyModel; | |
| 7 | 8 | import org.apache.commons.beanutils.BeanUtils; |
| 8 | 9 | import org.apache.commons.beanutils.BeanUtilsBean; |
| 9 | 10 | import org.apache.commons.dbutils.DbUtils; |
| ... | ... | @@ -14,6 +15,7 @@ |
| 14 | 15 | import org.springframework.stereotype.Service; |
| 15 | 16 | |
| 16 | 17 | import java.sql.Connection; |
| 18 | +import java.util.Date; | |
| 17 | 19 | import java.util.List; |
| 18 | 20 | import java.util.Map; |
| 19 | 21 | |
| 20 | 22 | |
| ... | ... | @@ -60,18 +62,21 @@ |
| 60 | 62 | Connection conn = ConnTools.makeHisConnection(); |
| 61 | 63 | QueryRunner queryRunner = new QueryRunner(); |
| 62 | 64 | try { |
| 63 | - List<Map<String, Object>> list = queryRunner.query(conn, " select PI_ID,PI_NAME,PI_SEX,PI_KIDSTYPE,PI_BIRTHDAY,PI_MOTHERPHONE,PI_OPERUSER,PI_PLATPATIENTID,PI_ISDELETE,PI_SERVICETYPE,PI_ISVIP,PI_BOOKBUILDINGHOSPITALID" + | |
| 64 | - " from MOMMY_PATIENTINFO where PI_BOOKBUILDINGHOSPITALID = '"+hid+"'", new MapListHandler()); | |
| 65 | + List<Map<String, Object>> list = queryRunner.query(conn, " select * from MOMMY_PATIENTINFO where PI_BOOKBUILDINGHOSPITALID = '"+hid+"'", new MapListHandler()); | |
| 65 | 66 | DbUtils.closeQuietly(conn); |
| 66 | 67 | for (Map<String, Object> map:list) { |
| 67 | - for (String key:map.keySet()) { | |
| 68 | - System.out.print(key); | |
| 69 | - System.out.print(":"); | |
| 70 | - System.out.print(map.get(key)); | |
| 71 | - System.out.print(","); | |
| 72 | - | |
| 73 | - } | |
| 74 | - System.out.println(); | |
| 68 | + BabyModel baby = new BabyModel(); | |
| 69 | + baby.setModified((Date)map.get("PI_OPERTIME")); | |
| 70 | + baby.setCreated((Date)map.get("PI_CREATETIME")); | |
| 71 | + baby.setBirth((Date)map.get("PI_BIRTHDAY")); | |
| 72 | + baby.setId(map.get("PI_PLATPATIENTID").toString().replace("-", "")); | |
| 73 | + baby.setMcertTypeId("PI_PLATPATIENTID"); | |
| 74 | + baby.setMcertNo(map.get("PI_MOTHERPHONE").toString()); | |
| 75 | + baby.setHospitalId("204"); | |
| 76 | + baby.setBuildType(1); | |
| 77 | + baby.setVisitstatus(-1); | |
| 78 | + baby.setYn(1); | |
| 79 | + baby.setSex(Integer.valueOf(map.get("PI_SEX").toString())); | |
| 75 | 80 | } |
| 76 | 81 | return ""+list.size(); |
| 77 | 82 | } catch (Exception e) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
d0b1f5c
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | +import com.lyms.hospitalapi.qinglongxian.QingLongXianHisService; | |
| 4 | +import com.lyms.hospitalapi.v2.HisService; | |
| 3 | 5 | import com.lyms.platform.biz.service.*; |
| 4 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | 7 | import com.lyms.platform.common.enums.*; |
| 6 | 8 | |
| ... | ... | @@ -33,7 +35,16 @@ |
| 33 | 35 | @Component |
| 34 | 36 | public class BabyBookbuildingFacade { |
| 35 | 37 | |
| 38 | + public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); | |
| 39 | + | |
| 36 | 40 | @Autowired |
| 41 | + private HisService hisServiceV2; | |
| 42 | + | |
| 43 | + @Autowired | |
| 44 | + private QingLongXianHisService qingLongXianHisService; | |
| 45 | + | |
| 46 | + | |
| 47 | + @Autowired | |
| 37 | 48 | private BabyBookbuildingService babyBookbuildingService; |
| 38 | 49 | |
| 39 | 50 | @Autowired |
| ... | ... | @@ -1314,6 +1325,14 @@ |
| 1314 | 1325 | results.add(result); |
| 1315 | 1326 | } |
| 1316 | 1327 | |
| 1328 | + } | |
| 1329 | + // 如果为空,初次建档,根据就诊卡号从HIS库取患者信息 | |
| 1330 | + else { | |
| 1331 | + if ("2".equals(HIS_VERSION)) { | |
| 1332 | + map.put("hisPatient", hisServiceV2.getPatientInfoList(param.getVcCardNo())); | |
| 1333 | + } else if ("3".equals(HIS_VERSION)) { | |
| 1334 | + map.put("hisPatient", qingLongXianHisService.getPatientInfoList(param.getVcCardNo())); | |
| 1335 | + } | |
| 1317 | 1336 | } |
| 1318 | 1337 | } |
| 1319 | 1338 |