Commit d58559ba59af45c0a21e6eb5215a1bfc71228880

Authored by gengxiaokai
1 parent bc8731643b

乐陵分娩

Showing 2 changed files with 27 additions and 22 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/LlfyFmService.java View file @ d58559b
... ... @@ -56,7 +56,7 @@
56 56  
57 57 private static Map<String, List> babyMap = new HashMap<>();
58 58  
59   - private static final String HOSPITALID = "1000000114";
  59 + private static final String HOSPITALID = "216";
60 60 static {
61 61 ONE_ENUMS.put(0, "长");
62 62 ONE_ENUMS.put(1, "次");
63 63  
64 64  
65 65  
... ... @@ -119,30 +119,30 @@
119 119 " 姓名 as NAME,\n" +
120 120 " 身份证号 as IDCARD,\n" +
121 121 " CREATED as CREATED,\t\n" +
122   - " 婴儿产出时日 as BABY_DELIVERY_TIME,\n" +
  122 + " CONVERT(char(19),婴儿产出时日,120) as BABY_DELIVERY_TIME,\n" +
123 123 " 婴儿性别 as BABY_SEX,\n" +
124 124 " 孕周 as DUE_WEEK,\n" +
125 125 // " DUE_DAY as DUE_DAY,\n" +
126 126 " 胎次 as FETUS_NUM,\n" +
127 127 " 窒息 as BABY_ASPHYXIAM,\n" +
128   - " 体重 as BABY_WEIGHT,\n" +
129   - " 身长 as BABY_HEIGHT,\n" +
130   - " Apgar评分1 as BABY_APGAR_SCORE_ONE,\n" +
131   - " Apgar评分5 as BABY_APGAR_SCORE_FIVE,\n" +
132   - " Apgar评分10 as BABY_APGAR_SCORE_TEN,\n" +
  128 + " CONVERT(int,left(体重,len(体重)-1)) as BABY_WEIGHT,\n" +
  129 + " CONVERT(int,left(身长,len(身长)-2)) as BABY_HEIGHT,\n" +
  130 + " CONVERT(int,left(Apgar评分1,len(Apgar评分1)-1)) as BABY_APGAR_SCORE_ONE,\n" +
  131 + " CONVERT(int,left(Apgar评分5,len(Apgar评分5)-1)) as BABY_APGAR_SCORE_FIVE,\n" +
  132 + " CONVERT(int,left(Apgar评分10,len(Apgar评分10)-1)) as BABY_APGAR_SCORE_TEN,\n" +
133 133 " 妊娠结局 as BABY_PREGNANCY_OUT,\n" +
134 134 " 分娩方式 as TMCSIDE,\n" +
135 135 // " TMCTYPE as TMCTYPE,\n" +
136 136 " 产妇离开产室情况 as MATERNAL_INFO,\n" +
137 137 " 会阴切开术 as PERINEAL_CONDITION,\n" +
138   - " 失血量 as SH_LOSE_BLOOD,\n" +
  138 + //" 失血量 as SH_LOSE_BLOOD,\n" +
139 139 // " TH_LOSE_BLOOD as TH_LOSE_BLOOD,\n" +
140 140 // " 接生者 as DELIVER_DOCTOR,\n" +
141   - " 产程第一期 as PROD_PROCESS_ONE,\n" +
142   - " 第二期 as PROD_PROCESS_TWO,\n" +
143   - " 第三期 as PROD_PROCESS_THREE,\n" +
144   - " 总计 as TOTAL_PROCESS,\n" +
145   - " 胎盘数量 as PLACENTA_NUM,\n" +
  141 + // " 产程第一期 as PROD_PROCESS_ONE,\n" +
  142 + // " 第二期 as PROD_PROCESS_TWO,\n" +
  143 + // " 第三期 as PROD_PROCESS_THREE,\n" +
  144 + //" 总计 as TOTAL_PROCESS,\n" +
  145 + " CONVERT(int,胎盘数量) as PLACENTA_NUM,\n" +
146 146 //" DELIVER_HOSPITAL as DELIVER_HOSPITAL,\n" +
147 147 " 产妇居住地址 as ADDR,\n"+
148 148 " 接生者 as DELIVER_DOCTOR";
... ... @@ -155,7 +155,7 @@
155 155 try {
156 156  
157 157 String sql ="select "+cloumns+" from xlhhis..v_fmjl where " +
158   - " CREATED > CONVERT(varchar(100), '"+start+"', 120) and CREATED <= CONVERT(varchar(100), '"+start+"', 120)" ;
  158 + " CREATED > CONVERT(char(19), '"+start+"', 120) and CREATED <= CONVERT(char(19), '"+start+"', 120)" ;
159 159 if (phone != null)
160 160 {
161 161 sql+=" and 手机号码 = '"+phone+"'";
... ... @@ -163,6 +163,8 @@
163 163 List<Fm> list = queryRunner.query(conn, sql, new BeanListHandler<Fm>(Fm.class));
164 164 ExceptionUtils.catchException("size====" + list.size());
165 165  
  166 + /* List<Fm> list=new ArrayList<Fm>();
  167 + list.add(fm1);*/
166 168 if(CollectionUtils.isNotEmpty(list)){
167 169  
168 170 for(Fm fm:list){
169 171  
... ... @@ -173,13 +175,13 @@
173 175 String id = fm.getID();//获取所有的孕妇ID,方便孕妇产下双胞胎而用
174 176  
175 177 //用来查询这个孕妇分娩的最近日期的sql
176   - String dateSql = "select max(to_char(CREATED,'yyyy-mm-dd hh24:mi:ss')) as babyDate from xlhhis..v_fmjl where " +
  178 + String dateSql = "select max(CONVERT(char(19),CREATED,120)) as babyDate from xlhhis..v_fmjl where " +
177 179 " ID='"+id+"'" ;
178 180  
179 181 //获取到这个孕妇的最近的分娩日期
180 182 List<Fm> dateList = queryRunner.query(conn, dateSql, new BeanListHandler<Fm>(Fm.class));
181 183 Calendar calendar = Calendar.getInstance();
182   - calendar.setTime(fmt.parse(dateList.get(0).getBabyDate()));
  184 + calendar.setTime(fmt.parse(dateList.get(0).getBabyDate()));
183 185 calendar.add(Calendar.DAY_OF_MONTH, -1);
184 186 Date sDate = calendar.getTime();
185 187 String startDate = fmt.format(sDate);
186 188  
... ... @@ -187,14 +189,14 @@
187 189  
188 190 //查询这个孕妇最近日期所有分娩记录的sql
189 191 String allSql = "select "+cloumns+" from xlhhis..v_fmjl where " +
190   - " CREATED > to_date('"+startDate+"', 'yyyy-mm-dd hh24:mi:ss') and CREATED <= to_date('"+endDate+"', 'yyyy-mm-dd hh24:mi:ss')" +
  192 + " CREATED > CONVERT(char(19),'"+startDate+"',120) and CREATED <= CONVERT(char(19),'"+endDate+"',120)" +
191 193 " and ID='"+id+"'" ;
192 194  
193 195 //查出这个ID对应孕妇在这个时间段的分娩记录
194 196 List<Fm> allList = queryRunner.query(conn, allSql, new BeanListHandler<Fm>(Fm.class));
195 197  
196   - //List<Fm> allList = new ArrayList<Fm>();
197   - //allList.add(fm);
  198 + /*List<Fm> allList = new ArrayList<Fm>();
  199 + allList.add(fm);*/
198 200  
199 201 Date dueDate = null;
200 202 List<MatDeliverAddRequest.Baby> babies = new ArrayList<>();
... ... @@ -614,7 +616,7 @@
614 616 request.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); //标准服务
615 617 request.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); //开通
616 618  
617   - if (patInfo != null && StringUtils.isNotEmpty(fm.getBHNUM()))
  619 + /*if (patInfo != null && StringUtils.isNotEmpty(fm.getBHNUM()))
618 620 {
619 621 Map<String,Object> diags = dzfyHisService.queryHisBabyDiagnosis(fm.getBHNUM());
620 622 if (diags != null && diags.size() > 0)
... ... @@ -622,7 +624,7 @@
622 624 request.setBlNo(fm.getBHNUM());
623 625 request.setBabyDiagnosis(diags.get("diagnosisItem") == null ? "" : diags.get("diagnosisItem").toString());
624 626 }
625   - }
  627 + }*/
626 628 babyBookbuildingFacade.addBabyBookbuilding(request, users.get(0).getId());
627 629  
628 630 }catch (Exception e)
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java View file @ d58559b
... ... @@ -3,6 +3,7 @@
3 3 import com.lyms.hospitalapi.Nczxyy.NczxyyLisService;
4 4 import com.lyms.hospitalapi.dzfy.DzfyFmService;
5 5 import com.lyms.hospitalapi.dzfy.DzfyHisService;
  6 +import com.lyms.hospitalapi.llfy.LlfyFmService;
6 7 import com.lyms.hospitalapi.qhdfy.QhdfyHisService;
7 8 import com.lyms.hospitalapi.v1.HisService;
8 9 import com.lyms.platform.biz.service.PatientCheckTicketService;
... ... @@ -54,6 +55,8 @@
54 55 private DzfyHisService dzfyHisService;
55 56 @Autowired
56 57 private DzfyFmService dzfyFmService;
  58 + @Autowired
  59 + private LlfyFmService llfyFmService;
57 60  
58 61 @Autowired
59 62 private NczxyyLisService nczxyyLisService;
... ... @@ -98,7 +101,7 @@
98 101 @RequestMapping(method = RequestMethod.GET, value = "/fm")
99 102 @ResponseBody
100 103 public String getFm(String start,String end,String syxh){
101   - dzfyFmService.queryFmPatient(start,end,syxh);
  104 + llfyFmService.queryFmPatient(start,end,syxh);
102 105 return "1";
103 106 }
104 107