Commit 776d81691ada8e021f813dad4a0e02f8a51bb9f0
1 parent
a88b5ad54e
Exists in
master
and in
6 other branches
his
Showing 1 changed file with 33 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/lcdcf/LcdcfHisService.java
View file @
776d816
| ... | ... | @@ -50,27 +50,52 @@ |
| 50 | 50 | * @param vcCardNo |
| 51 | 51 | * @return |
| 52 | 52 | */ |
| 53 | - public List<HisCheckItems> getPatientCheckLisItems(String vcCardNo) | |
| 53 | + public String getPatientCheckLisItems(String vcCardNo) | |
| 54 | 54 | { |
| 55 | 55 | String time = DateUtil.getyyyy_MM_dd(new Date()); |
| 56 | 56 | Connection connection = null; |
| 57 | 57 | try { |
| 58 | - String sql = "select ID as id,就诊卡号 as vcCardNo,医嘱内容 as content,开嘱时间 as time,诊疗项目ID as itemId from v_check_items where 就诊卡号='"+vcCardNo+"' and 开嘱时间 like '"+time+"%'"; | |
| 59 | - connection = ConnTools.makeHisConnection(); | |
| 60 | - QueryRunner queryRunner = new QueryRunner(true); | |
| 61 | - List<HisCheckItems> hisCheckItems = queryRunner.query(connection,sql,new BeanListHandler<HisCheckItems>(HisCheckItems.class)); | |
| 58 | +// String sql = "select ID as id,就诊卡号 as vcCardNo,医嘱内容 as content,开嘱时间 as time,诊疗项目ID as itemId from v_check_items where 就诊卡号='"+vcCardNo+"' and 开嘱时间 like '"+time+"%'"; | |
| 59 | +// connection = ConnTools.makeHisConnection(); | |
| 60 | +// QueryRunner queryRunner = new QueryRunner(true); | |
| 61 | +// List<HisCheckItems> hisCheckItems = queryRunner.query(connection,sql,new BeanListHandler<HisCheckItems>(HisCheckItems.class)); | |
| 62 | + | |
| 63 | + | |
| 64 | + List<HisCheckItems> hisCheckItems = new ArrayList<>(); | |
| 65 | + | |
| 66 | + HisCheckItems item1 = new HisCheckItems(); | |
| 67 | + item1.setContent("血常规检查"); | |
| 68 | + hisCheckItems.add(item1); | |
| 69 | + HisCheckItems item2 = new HisCheckItems(); | |
| 70 | + item2.setContent("尿常规检查"); | |
| 71 | + | |
| 72 | + | |
| 73 | + StringBuffer sb = new StringBuffer(); | |
| 62 | 74 | if(CollectionUtils.isNotEmpty(hisCheckItems)) |
| 63 | 75 | { |
| 64 | - return hisCheckItems; | |
| 76 | + for (int i = 0 ; i < hisCheckItems.size() ; i++) | |
| 77 | + { | |
| 78 | + HisCheckItems item = hisCheckItems.get(0); | |
| 79 | + if (i != (hisCheckItems.size() - 1)) | |
| 80 | + { | |
| 81 | + sb.append(item.getContent()); | |
| 82 | + sb.append(","); | |
| 83 | + } | |
| 84 | + else | |
| 85 | + { | |
| 86 | + sb.append(item.getContent()); | |
| 87 | + } | |
| 88 | + } | |
| 89 | + return sb.toString(); | |
| 65 | 90 | } |
| 66 | - } catch (SQLException e) { | |
| 91 | + } catch (Exception e) { | |
| 67 | 92 | e.printStackTrace(); |
| 68 | 93 | } |
| 69 | 94 | finally |
| 70 | 95 | { |
| 71 | 96 | DbUtils.closeQuietly(connection); |
| 72 | 97 | } |
| 73 | - return null; | |
| 98 | + return ""; | |
| 74 | 99 | } |
| 75 | 100 | |
| 76 | 101 | } |