From 9345fd3a1bf76a16af388823a16aab24ca4bd993 Mon Sep 17 00:00:00 2001 From: Ray Shaw Date: Wed, 25 Dec 2024 12:36:12 +0800 Subject: [PATCH] develop/hrl_20241223_syjgThread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 三医监管自动任务 医保结算单模板增加自费/医保 宏定义 三监管xml提交 --- .classpath | 2 +- WEB-INF/conf/sysds_openhis_jyjchr.xml | 2805 +++++++++++--------- WEB-INF/src/com/his/thread/HisAutoSyjgThread.java | 2314 ++++++++++++++++ WEB-INF/src/com/his/yb/form/YbTest.java | 2169 ++++++++++++++- WEB-INF/src/com/his/yb/util/GdYbRequest.java | 3 + .../9c9be7170131bc8d50efbcefc4cac5b1.xml | 91 +- .../fb29ff7317cf334bcfec43048825b781.xml | 24 +- .../404e382f8b033f1d45be742dbb49d6bb.xml | 48 +- .../ddd923997ad6faf6591fd52f3166c05a.xml | 14 +- .../9fcbd5aea1f7e55b7db0ef66f1c150a3.xml | 89 +- .../e411e976945a6f6bccd06df5b3324b90.xml | 16 +- hcemr/emrBasePage.html | 4 +- hcemr/emrEditPage.html | 4 +- hcemr/emrShowPage.html | 3 +- release/20241225_1153.text | 5 + 15 files changed, 6219 insertions(+), 1372 deletions(-) create mode 100644 WEB-INF/src/com/his/thread/HisAutoSyjgThread.java diff --git a/.classpath b/.classpath index 9d94b96..84c2518 100644 --- a/.classpath +++ b/.classpath @@ -104,7 +104,6 @@ - @@ -146,5 +145,6 @@ + diff --git a/WEB-INF/conf/sysds_openhis_jyjchr.xml b/WEB-INF/conf/sysds_openhis_jyjchr.xml index 46c4a80..cc0c99d 100644 --- a/WEB-INF/conf/sysds_openhis_jyjchr.xml +++ b/WEB-INF/conf/sysds_openhis_jyjchr.xml @@ -24,7 +24,7 @@ - + select a.COMPANYID,a.YBID,b.USERACCOUNT,a.USERID,a.PKEY,b.NAME from MAIN_USERS a left join MAIN_EMPLOYEES b on a.EMPID=b.EMPID where a.EFFICET='0' and a.COMPANYID=? @@ -39,7 +39,7 @@ - + select a.COMPANYID,a.DPTID,a.DPTNAME,ISJZ from MAIN_DEPARTMENT a where a.COMPANYID=? @@ -51,7 +51,7 @@

12

- + select PKEY,COMPANYID,YWLX,RF1,RF2,RF3,RF4,RF5,SCZT1,SCZT2,SCZT3,SCZT4,SCZT5 from HIS_YB_QTSC where 1=2 @@ -74,7 +74,7 @@ - + 93

- + select HOS_CODE,OUTPATIENT_NO,DEPT_CODE,DOC_NAME,DOC_CODE,PATIENT_NAME,PATIENT_PHONE,CARD_CODE,ORDER_DATE,ORDER_TYPE,CREATE_TIME,HOS_CARD_TYPE,HOS_CARD from GH_RYXXB where HOS_CODE like ? and ORDER_DATE like ? @@ -128,7 +128,7 @@

12

- + select p.PKEY scpkey,a.PKEY ZGBM,b.USERACCOUNT GH,b.NAME XM,b.SEX Xb,b.BIRTHDAY CSRQ,b.MZ MZDM,b.IDTYPE SFBSLBDM,b.IDENTITYID SFBSHM,d.DPTID SSKS,d.DPTNAME SSKSMC,y.VALUE3 SSZXKSDM,'90' RYLB,'0' Ghzt,'2' BZQK,'0' SJTRYBZ,'1' GZZT,'2' PXLB,'0' SFNRQKYSPX,d.DPTYBCODE from MAIN_USERS a left join MAIN_EMPLOYEES b on a.EMPID=b.EMPID @@ -162,7 +162,7 @@

12

- + select YLJGDM,ZGBM,GH,XM,XB,CSRQ,MZDM,SFBSLBDM,SFBSHM,SSKS,SSKSMC,SSZXKSDM,KSLB,ZWDM,ZWMC,ZCDM,ZCHENGMC,ZY,RYLB,EMAIL,JTDZ,YZBM,DHHM,SJHM1,YSJJ,GHZT,WHCD,DYXLDM,DYXLMC,DYXLBYYX,DYXLBYSJ,DYXLZSH,ZGXLBYYX,XWDM,XZGLZWDM,XZGLZWMC,GW,ZYZSH,ZYZGMC,ZYZSZCSJ,QKYSBZ,PXLX,SCPXYLJGDM,SCPXYLJGMC,PXSZYZCDM,PXSZYZCMX,PXJD,PXJGMC,QKYSPXKSSJ,QKYSPXJSSJ,YSZYLBDM,YSZYFWDM,ZCWDDZYYSBZ,D2ZYDWLBDM,DSZYDWLBDM,RYDRQK,RYDCQK,DRSJ,DCSJ,CJGZRQ,BZQK,SJTRYBZ,GZZT,PXLB,SYQBZ,ZZMM,GWJB,JYJGDM,JYJGMC,SFNRQKYSPX,ZGXLDM,ZGXLMC,ZGXLBYSJ,ZGXLBYZSH,QKYSZCZSH,QKYSZCZSSJ,ZCZSH,ZCSJ,YSZP,MJ,TBRQ,XGBZ,SCZT,SJBZ,JYZT,PCH from JC_YHRYXXB where YLJGDM like ? and PCH like ?
@@ -264,7 +264,7 @@

12

- + 93

- + select YLJGDM,JYJLLSH,BGRQ,JZLSH,KH,KLX,ZJHM,ZJLX,XM,XB,NL,SQYSGH,SQYSXM,BGYSGH,BGYSXM,SHYSGH,SHYSXM,DYRQ,SQSJ,CJSJ,JYRQ,SQKSBM,SQKSMC,BQMC,CH,BGBZ,BBDM,BBMC,BGDLBBM,BGDLBMC,YZLSH,YZXMDM,JLLB,ZYH,HZLXDM,DHHM,BFH,MJ,TBRQ,XGBZ,SCZT,SJBZ,JYZT,PCH from SY_JYJLB where YLJGDM like ? and PCH like ?
@@ -373,7 +373,7 @@

12

- + 93

- + select YLJGDM,JYMXLSH,JYLSH,YZLSH,LCXMDM,BGRQ,JCRGH,JCRXM,SHRGH,SHRXM,JYLBDM,JYSFDM,JYSFYBDM,JYBZXMDM,JYXMDM,JYXMMC,LOINC,JYJGDM,JYJGDX,JYJGDL,JYJGLX,JYJLDW,SBLBBM,YQBH,YQMC,CKZFW,CKZSX,CKZXX,JGTS,DYXH,YZID,MJ,TBRQ,XGBZ,SCZT,SJBZ,JYZT,PCH from SY_JYJGZBB where YLJGDM like ? and PCH like ?
@@ -465,1395 +465,1724 @@ + + + = ? AND CJRQ <= ? + ]]> + +
+ PKEY + JGID +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
+ - - select YLJGDM,GRBSLX,GRBSH,JGID,ZJLX,ZJHM,SFZHM,JKDABH,JKKKH,YBKKH,XB,XM,HZLX,HYZK,CSRQ,CSD,MZ,GJ,DHHM,SJHM,GZDWYB,GZDWMC,GZDWDZ,GZDWDHHM,JZDZ,HKDZ,HKDZYB,LXRXM, - LXRGX,LXRDZ,LXRYB,LXRDH,CJGZRQ,DZYJDZ,LXDH_LBDM,LXDH_LB,NLS,NLY,NLT,MJ from TB_HZXX where 1=2 + + + select yljgdm,grbslx,grbsh,zjlx,zjhm,sfzhm,jkdabh,jkkkh,xb,xm,hzlx,hyzk,csrq,csd,mz,gj,dhhm,sjhm,gzdwyb,gzdwmc,gzdwdz,gzdwdhhm,jzdz,hkdz,hkdzyb,lxrxm,lxrgx,lxrdz,lxryb,lxrdh,cjgzrq,dzyjdz,lxdh_lbdm,lxdh_lb,nls,nly,mj,xgbz,tbrq,crt_tm_zdsc from tb_hzxx WHERE 1=2 + - - YLJGDM - GRBSLX +
+ yljgdm + grbslx + grbsh
+ //yljgdm,grbslx,grbsh,zjlx,zjhm,sfzhm,jkdabh,jkkkh,xb,xm,hzlx,hyzk,csrq,csd,mz,gj,dhhm,sjhm,gzdwyb,gzdwmc,gzdwdz,gzdwdhhm,jzdz,hkdz,hkdzyb,lxrxm,lxrgx,lxrdz,lxryb,lxrdh,cjgzrq,dzyjdz,lxdh_lbdm,lxdh_lb,nls,nly,mj,xgbz,tbrq,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ - - select YLJGDM,GHJLID,JGID,JZLSH,YNLSH,GRBSLX,GRBSH,GTHBZ,STFBH,GTHSJ,GHLB,SFJZ,JZXZ, - GHTJBM,BXLX,KSBM,KSMC,LCYXLXDM,GHYSBH,GHYSXM,GHYSSFZHM,TXBZ,WDBZ,GHZFY,XGBZ from TB_MZ_GHMXB where 1=2 + + + select yljgdm,ghjlid,jzlsh,grbslx,grbsh,gthbz,stfbh,gthsj,ghlb,sfjz,jzxz,ghtjbm,bxlx,ksbm,ksmc,lcyxlxdm,ghysbh,ghysxm,txbz,wdbz,ghzfy,xgbz,crt_tm_zdsc from tb_mz_ghmxb WHERE 1=2 + - - YLJGDM - GHJLID +
+ yljgdm + ghjlid
+//yljgdm,ghjlid,jzlsh,grbslx,grbsh,gthbz,stfbh,gthsj,ghlb,sfjz,jzxz,ghtjbm,bxlx,ksbm,ksmc,lcyxlxdm,ghysbh,ghysxm,txbz,wdbz,ghzfy,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
- - select YLJGDM,JGID,YNLSH,JZMXID,GRBSLX,GRBSH,JZLSH,SFFZ,LCYXLXDM,MJZH,HZXM,HZSX,JZLX, - SFJZ,JZXZ,JZKSBM,JZKSMC,JZKSRQ,JZSJ,WCJZSJ,ZZYSBH,ZZYSXM,ZZYSSFZHM,MZZDDM,MZZDMC,ZXDM, - ZXMC,ZFMC,BMLX,JZZDSM,ZS,MZZZMC,MZZZZDDM,LGGC,ZZMS,FBRQSJ,SSY,SZY, - TW,ZZCXSJ,ZZCXSJDW,XGBZ,MJ from TB_MZ_JZMXB where 1=2 + + + select yljgdm,jzmxid,grbslx,grbsh,jzlsh,sffz,lcyxlxdm,mjzh,hzxm,hzsx,jzlx,sfjz,jzxz,jzksbm,jzksmc,jzksrq,jzsj,wcjzsj,zzysbh,zzysxm,mzzddm,mzzdmc,zxdm,zxmc,zfmc,bmlx,jzzdsm,zs,mzzzmc,mzzzzddm,lggc,zzms,fbrqsj,ssy,szy,tw,zzcxsj,xgbz,mj,crt_tm_zdsc from TB_MZ_JZMXB WHERE 1=2 + - YLJGDM - JZMXID + yljgdm + jzmxid
+//yljgdm,jzmxid,grbslx,grbsh,jzlsh,sffz,lcyxlxdm,mjzh,hzxm,hzsx,jzlx,sfjz,jzxz,jzksbm,jzksmc,jzksrq,jzsj,wcjzsj,zzysbh,zzysxm,mzzddm,mzzdmc,zxdm,zxmc,zfmc,bmlx,jzzdsm,zs,mzzzmc,mzzzzddm,lggc,zzms,fbrqsj,ssy,szy,tw,zzcxsj,xgbz,mj,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + = ? + AND JJRQ <= ? + AND B.JZLX = 'M' + AND B.JZZT != 'T' + AND B.JZZT != 'F' + ]]> + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
+ + + select + PKEY,HZPKEY,JZPKEY,CARDPKEY,JBLX,JBBM,JBMC,JBZS,JZZT,FBSJ,JZSJ,ZYZX,SFZZD,XH,CJR,CJRQ,JGID,YBJBBM,YBJBMC,ZDYS,ZDLX,ZDJB,ZDKS,YBZHBM,YBZHMC,YBJBLX + from HIS_JZ_MZZD where JGID=? AND (SFZZD='0' OR SFZZD IS NULL) order by + sfzzd desc,xh + + + PKEY + JGID + HZPKEY + JZPKEY +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

12

+
+
+ - - select YLJGDM,JGID,YNLSH,JZLSH,GRBSLX,GRBSH,MJZH,CFDL,CFLX,CFHM,KFKSDM,KFKSMC, - KFYSBH,KFYSXM,KFYSSFZHM,KFSJ,HZBSH,HZXM,HZXBDM,HZXB,HZNL,HZTZ,FYLX,XYZDDM,XYZDMC,ZYBMDM, - ZYBMMC,ZYZHDM,ZYZHMC,CFJE,CFYXTS,CFBZXX,ZZZF,WDBGJGMC,WDBGJGDZ,CFSHYJSBH, - CFSHYJSQM,CFSHYJSSFZHM,CFTPYJSBH,CFTPYJSQM,CFTPYJSSFZHM,CFFYYJSBH,CFFYYJSQM,CFFYYJSSFZHM, - CFHDYJSBH,CFHDYJSQM,CFHDYJSSFZHM,ZYYPJSJ,ZYJZPC,ZYYPJZF,ZYYPFF,ZYYYFF,ZYYPCF,BZ,XGBZ from TB_MZ_CFZB where 1=2 + + + select yljgdm,cfzid,jzlsh,grbslx,grbsh,mjzh,cfdl,cflx,cfhm,kfksdm,kfksmc,kfysbh,kfysxm,kfsj,hzbsh,hzxm,hzxbdm,hzxb,hznl,hztz,fylx,xyzddm,xyzdmc,zybmdm,zybmmc,zyzhdm,zyzhmc,cfje,cfyxts,cfbzxx,zzzf,wdbgjgmc,wdbgjgdz,cfshyjsbh,cfshyjsqm,cftpyjsbh,cftpyjsqm,cffyyjsbh,cffyyjsqm,cfhdyjsbh,cfhdyjsqm,zyypjsj,zyjzpc,zyypjzf,zyypff,zyyyff,zyypcf,bz,xgbz,posid,jlgxsj,llbz,jybz,crt_tm_zdsc + from TB_MZ_CFZB WHERE 1=2 + - YLJGDM - CFZID + yljgdm + cfzid
+//yljgdm,cfzid,jzlsh,grbslx,grbsh,mjzh,cfdl,cflx,cfhm,kfksdm,kfksmc,kfysbh,kfysxm,kfsj,hzbsh,hzxm,hzxbdm,hzxb,hznl,hztz,fylx,xyzddm,xyzdmc,zybmdm,zybmmc,zyzhdm,zyzhmc,cfje,cfyxts,cfbzxx,zzzf,wdbgjgmc,wdbgjgdz,cfshyjsbh,cfshyjsqm,cftpyjsbh,cftpyjsqm,cffyyjsbh,cffyyjsqm,cfhdyjsbh,cfhdyjsqm,zyypjsj,zyjzpc,zyypjzf,zyypff,zyyyff,zyypcf,bz,xgbz,posid,jlgxsj,llbz,jybz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + = ? AND a.CJRQ <= ? and b.JZLX = 'M' group by a.CFH,a.JZPKEY,a.HZPKEY,a.JZH,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL + ]]> + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
+ + + + =? + AND a.CJRQ <= ? and b.JZLX = 'M' group by a.PKEY,a.CFH,a.JZPKEY,a.HZPKEY,a.JZH,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,a.yzje,a.YZLB,a.YZZL,a.YZTZH,e.GG,a.YZPC,a.YZJLDW,a.YPYZJBDW,a.YZJL,a.YZSL,a.YZSFZT,a.YZCXBZ,f.VALUE1 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
+ + + = ? AND a.CJRQ <= ? and a.YZLX = '5' and a.YZSHZT='1' AND a.YZSFZT = '1' AND a.YZCXBZ = '0' and b.JZLX = 'M' group by a.PKEY,a.CFH,a.JZPKEY,a.HZPKEY, +a.JZH,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,a.yzje,a.YZLB,a.YZZL,a.YZTZH,a.YZSFZT,a.YZCXBZ,a.YZXPKEY,a.YZMC,a.CJRQ + ]]> + + + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
+ - - select YLJGDM,CFMXID,JGID,YNLSH,JZLSH,GRBSLX,GRBSH,CFZID,CFYZXH,CFYZZH,ZLXMLBBM, - XMBM,XMMC,XMFLBM,XMFLMC,YNSFXMBM,YNSFXMMC,YBSFXMBM,YBSFXMMC,JXDM,YPGG,YYTJDM,SYPCDM, - YYPC,SYCJL,SYJLDW,SYZJL,ZYYYFF,FYSL,FYSLDW,YYTS,YWLX,CFKSSJ,CFTZSJ,PSPB, - SFCGYP,SFJY,SFZBY,ZXKSBM,ZXKSMC,ZXRBH,ZXRXM,ZXRSFZHM,CFZXSJ,BZ,MJ,XGBZ from TB_MZ_YPCFMXB where 1=2 + + + select yljgdm,cfmxid,jzlsh,grbslx,grbsh,cfzid,cfyzxh,cfyzzh,zlxmlbbm,xmbm,xmmc,xmflbm,xmflmc,jxdm,ypgg,yytjdm,sypcdm,yypc,sycjl,syjldw,syzjl,zyyyff,fysl,fysldw,yyts,ywlx,cfkssj,cftzsj,zxksbm,zxksmc,zxrbh,zxrxm,cfzxsj,bz,mj,xgbz,crt_tm_zdsc from TB_MZ_YPCFMXB WHERE 1=2 + - YLJGDM - CFMXID + yljgdm + cfmxid
+//yljgdm,cfmxid,jzlsh,grbslx,grbsh,cfzid,cfyzxh,cfyzzh,zlxmlbbm,xmbm,xmmc,xmflbm,xmflmc,jxdm,ypgg,yytjdm,sypcdm,yypc,sycjl,syjldw,syzjl,zyyyff,fysl,fysldw,yyts,ywlx,cfkssj,cftzsj,zxksbm,zxksmc,zxrbh,zxrxm,cfzxsj,bz,mj,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
- - select YLJGDM,CFMXID,JGID,YNLSH,JZLSH,GRBSLX,GRBSH,CFZID,YZXH,YZZH,ZLXMLBBM,XMBM, - XMMC,XMFLBM,XMFLMC,YBSFXMBM,YBSFXMMC,ZXPL,CJFX,CJBB,JCBW,MZFS,CFKSSJ,CFTZSJ,ZXKSBM,ZXKSMC, - ZXRBH,ZXRXM,CFZXRSFZHM,CFZXSJ,WSFWYQ,QTYXCZ,ZZBZ,JKWTPG,JZJGMC,ZWT,CZJH, - KFCSZD,BZ,MJ,XGBZ from TB_MZ_QTCFMX where 1=2 + + + select yljgdm,cfmxid,jzlsh,grbslx,grbsh,cfzid,yzxh,yzzh,zlxmlbbm,xmbm,xmmc,xmflbm,xmflmc,zxpl,cjfx,cjbb,jcbw,mzfs,cfkssj,cftzsj,zxksbm,zxksmc,zxrbh,zxrxm,cfzxsj,wsfwyq,qtyxcz,zzbz,jkwtpg,jzjgmc,zwt,czjh,kfcszd,bz,mj,xgbz,posid,jlgxsj,llbz,jybz,crt_tm_zdsc from TB_MZ_QTCFMX WHERE 1=2 + - YLJGDM - CFMXID + yljgdm + cfmxid
+//yljgdm,cfmxid,jzlsh,grbslx,grbsh,cfzid,yzxh,yzzh,zlxmlbbm,xmbm,xmmc,xmflbm,xmflmc,zxpl,cjfx,cjbb,jcbw,mzfs,cfkssj,cftzsj,zxksbm,zxksmc,zxrbh,zxrxm,cfzxsj,wsfwyq,qtyxcz,zzbz,jkwtpg,jzjgmc,zwt,czjh,kfcszd,bz,mj,xgbz,posid,jlgxsj,llbz,jybz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
- - select YLJGDM,SFMXID,JGID,YNLSH,GRBSLX,GRBSH,JZLSH,BTFMXID,TFBZ,SFCJBM,YZMXID,SFXMLBBM, - FYSRGLBM,FYSRGLMC,FYFSSJ,SYJSID,SFJSSJ,KDKSBM,KDKSMC,KDYSBH,KDYSXM,KDYSSFZHM,ZXKSBM,ZXKSMC, - ZXRYBH,ZXRYXM,ZXRYSFZHM,MXXMBM,MXXMMC,MXXMDW,MXXMDJ,XMFLBM,XMFLMC,MXXMSL,MXXMYSJE,MXXMSSJE, - XGBZ from TB_MZ_SFMXB where 1=2 + + + select yljgdm,sfmxid,grbslx,grbsh,jzlsh,btfmxid,tfbz,sfcjbm,yzmxid,sfxmlbbm,fysrglbm,fysrglmc,fyfssj,syjsid,sfjssj,kdksbm,kdksmc,kdysbh,kdysxm,zxksbm,zxksmc,zxrybh,zxryxm,mxxmbm,mxxmmc,mxxmdw,mxxmdj,xmflbm,xmflmc,mxxmsl,mxxmysje,mxxmssje,crt_tm_zdsc,xgbz from TB_MZ_SFMXB WHERE 1=2 + - YLJGDM - CFMXID + yljgdm + sfmxid
+//yljgdm,sfmxid,grbslx,grbsh,jzlsh,btfmxid,tfbz,sfcjbm,yzmxid,sfxmlbbm,fysrglbm,fysrglmc,fyfssj,syjsid,sfjssj,kdksbm,kdksmc,kdysbh,kdysxm,zxksbm,zxksmc,zxrybh,zxryxm,mxxmbm,mxxmmc,mxxmdw,mxxmdj,xmflbm,xmflmc,mxxmsl,mxxmysje,mxxmssje,crt_tm_zdsc,xgbz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
+ + + = ? AND a.CJRQ <= ? + and a.YZSHZT='1' AND a.YZSFZT = '1' and c.JZLX = 'M' and b.PKEY IS NOT NULL AND e.JSZT IS NOT NULL + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,JSJLID,JGID,YNLSH,GRBSLX,GRBSH,JZLSH,JSFPH,SFCJBM,JLSFZT,FYJSSJ,HZLYSX, - YLFFFSDM,FYJSZJE,GRCDFYJE,JSRYBH,JSRYXM,JSRYSFZHM,XGBZ from TB_MZ_JSMXB where 1=2 + + + select yljgdm,jsjlid,grbslx,grbsh,jzlsh,jsfph,sfcjbm,jlsfzt,fyjssj,hzlysx,ylfffsdm,fyjszje,grcdfyje,jsrybh,jsryxm,xgbz,crt_tm_zdsc from TB_MZ_JSMXB WHERE 1=2 + - YLJGDM - JSJLID + yljgdm + jsjlid
+//yljgdm,jsjlid,grbslx,grbsh,jzlsh,jsfph,sfcjbm,jlsfzt,fyjssj,hzlysx,ylfffsdm,fyjszje,grcdfyje,jsrybh,jsryxm,xgbz,crt_tm_zdsc + + + + + + + + + + + + + + + + + + + +
+ + + = ? AND a.CJRQ <= ? + and a.YZSHZT='1' AND a.YZSFZT = '1' and c.JZLX = 'M' and b.PKEY IS NOT NULL AND e.JSZT IS NOT NULL group by e.PKEY,a.JZPKEY,a.HZPKEY,e.ZDJFLX,e.ISHC,e.HCDJPKEY,JSSJ,e.JSZT,e.JFZJE,f.SFRY + ,f.FPHM + ]]> - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,ZFFSJLID,JGID,YNLSH,GRBSLX,GRBSH,JZLSH,JSJLID,JLSFZT,ZFFSDM, - ZFFSJE,FYJSSJ,JSRYBH,JSRYXM,JSRYSFZHM,XGBZ from TB_MZ_JSZFFSMXB where 1=2 + + + select yljgdm,zffsjlid,grbslx,grbsh,jzlsh,jsjlid,jlsfzt,zffsdm,zffsje,fyjssj,jsrybh,jsryxm,xgbz,crt_tm_zdsc from TB_MZ_JSZFFSMXB WHERE 1=2 + - YLJGDM - ZFFSJLID + yljgdm + zffsjlid
+//yljgdm,zffsjlid,grbslx,grbsh,jzlsh,jsjlid,jlsfzt,zffsdm,zffsje,fyjssj,jsrybh,jsryxm,xgbz,crt_tm_zdsc + + + + + + + + + + + + + + + + +
+ + + = ? AND a.CJRQ <= ? and (a.SFZT = '1' or a.SFZT = '3') and (a.PJLX = 'MG' OR a.PJLX = 'MS') and b.PKEY is not null + ]]> - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + +

12

+

93

+

93

+
+
- - select YLJGDM,ZDID,JGID,YNLSH,ZYJZLSH,GRBSLX,GRBSH,XGBZ,ZDRQSJ,ZDFFBM, - ZDBZBM,ZDLBBM,BZQBDM,ZDYBID,ZDZCBM,ZDSX,ZDBM,ZDMC,SFYZ,CYQKBM,ZDLX, - JLSJ_YWK,CXSJ_YWK,BJSJ_YWK from TB_MZ_ZDMXB where 1=2 + + + select yljgdm,zdid,zyjzlsh,grbslx,grbsh,xgbz,zdrqsj,zdffbm,zdbzbm,zdlbbm,bzqbdm,zdybid,zdzcbm,zdsx,zdbm,zdmc,sfyz,cyqkbm,zdlx,jlsj_ywk,cxsj_ywk,bjsj_ywk,crt_tm_zdsc from TB_MZ_ZDMXB WHERE 1=2 + - YLJGDM - ZFFSJLID + yljgdm + zdid
+//yljgdm,zdid,zyjzlsh,grbslx,grbsh,xgbz,zdrqsj,zdffbm,zdbzbm,zdlbbm,bzqbdm,zdybid,zdzcbm,zdsx,zdbm,zdmc,sfyz,cyqkbm,zdlx,jlsj_ywk,cxsj_ywk,bjsj_ywk,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + -
+
+ + + + = ? and a.JJRQ <= ? AND a.JZLX = 'M' AND a.JZZT = 'J' and b.PKEY IS NOT NULL + ]]> +//yljgdm,zdid,zyjzlsh,grbslx,grbsh,xgbz,zdrqsj,zdffbm,zdbzbm,zdlbbm,bzqbdm,zdybid,zdzcbm,zdsx,zdbm,zdmc,sfyz,cyqkbm,zdlx,jlsj_ywk,cxsj_ywk,bjsj_ywk,crt_tm_zdsc + + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,RYJLID,JGID,YNLSH,GRBSLX,GRBSH,SJJLZT,ZYJZLSH,ZYH,ZYCS, - MZYSBH,MZYSXM,MZYSSFZHM,ZYYSBH,ZYYSXM,ZYYSSFZHM,RYBQDM,RYTJBM,RYYYBM,YLFFFS,ZYYYSJ, - RYKSBM,RYKSMC,KJRYZRQ,RYSJ,RYDJYBH,RYDJYXM,RYDJYSFZHM,LGBZ,XGBZ from TB_ZY_RYDJMXB where 1=2 + + + select yljgdm,ryjlid,grbslx,grbsh,sjjlzt,zyjzlsh,zyh,mzysbh,mzysxm,zyysbh,zyysxm,rybqdm,rytjbm,ryyybm,ryksbm,ryksmc,rysj,rydjybh,rydjyxm,lgbz,xgbz,crt_tm_zdsc from TB_ZY_RYDJMXB WHERE 1=2 + - YLJGDM - RYJLID + yljgdm + ryjlid
+//yljgdm,ryjlid,grbslx,grbsh,sjjlzt,zyjzlsh,zyh,mzysbh,mzysxm,zyysbh,zyysxm,rybqdm,rytjbm,ryyybm,ryksbm,ryksmc,rysj,rydjybh,rydjyxm,lgbz,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + = ? and a.JJRQ <= ? AND a.JZLX = 'Z' AND (a.JZZT = 'Z' OR a.JZZT = 'C') AND a.MOTHERJZPKEY is null + ]]> +//yljgdm,ryjlid,grbslx,grbsh,sjjlzt,zyjzlsh,zyh,mzysbh,mzysxm,zyysbh,zyysxm,rybqdm,rytjbm,ryyybm,ryksbm,ryksmc,rysj,rydjybh,rydjyxm,lgbz,xgbz,crt_tm_zdsc + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,YZZID,JGID,YNLSH,GRBSLX,GRBSH,JZLSH,CFDL,CXBZ,YZXQ,DJBH, - HZXM,HZXB,HZNL,HZKS,HZBQ,HZBSH,ZYCS,XDKSBM,XDKSMC,YZXDYSBH,YZXDYSXM,YZXDYSSFZHM, - YZXDSJ,YZJHZXSJ,QTYXCZ,ZZBZ,JKWTPG,CZJH,ZYFA,KFCSZD,BZ,MJ,XGBZ from TB_ZY_YZZB where 1=2 + + + select yljgdm,yzzid,grbslx,grbsh,jzlsh,cfdl,cxbz,yzxq,djbh,hzxm,hzxb,hznl,hzks,hzbq,hzbsh,xdksbm,xdksmc,yzxdysbh,yzxdysxm,yzxdsj,qtyxcz,zzbz,jkwtpg,czjh,zyfa,kfcszd,bz,mj,xgbz,crt_tm_zdsc from TB_ZY_YZZB WHERE 1=2 + - YLJGDM - YZZID + yljgdm + yzzid
+//yljgdm,yzzid,grbslx,grbsh,jzlsh,cfdl,cxbz,yzxq,djbh,hzxm,hzxb,hznl,hzks,hzbq,hzbsh,xdksbm,xdksmc,yzxdysbh,yzxdysxm,yzxdsj,qtyxcz,zzbz,jkwtpg,czjh,zyfa,kfcszd,bz,mj,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + = ? and b.CJRQ <= ? +AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null AND (a.YZZT = 3 or a.YZZT = 6) and a.YZLX IN (0,3,5,6,7,9) group by a.CFH,a.JZPKEY,a.HZPKEY,a.YZXZKS,c.XM,c.XB,c.NL,b.JJKS,b.WARD,a.YZZT,a.YZCL +,a.YZSHRQ,b.ZYNO + ]]> + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,YZID,JGID,YNLSH,GRBSLX,GRBSH,JZLSH,YZZID,CXBZ,YZKSSJ, - YZJDHSBH,YZJDHSXM,YZJDHSSFZHM,YZJDSJ,TZYSBH,TZYSXM,TZYSSFZHM,YSTZSJ,QRTZHSBH, - QRTZHSXM,QRTZHSSFZHM,HSQRTZSJ,ZXKSBM,ZXKSMC,ZXRBH,ZXRXM,ZXRSFZHM,YZZXSJ,YZZZSJ, - YZSM,YZXH,YZZH,YZMXBM,YZMXMC,YZXMFLDM,YZXMFLMC,ZLXMLBBM,YNSFXMBM,YNSFXMMC,YBSFXMBM, - YBSFXMMC,YPGG,JXDM,YZYF,YZPD,YYTJDM,MCSYJL,MCSYJLDW,SYZJL,MCSL,MCDW,FYSL,FYSLDW, - YYTS,ZYJZF,PSPB,SFCGYP,SFJY,CYDYBZ,WGYWBZ,BZ,MJ,XGBZ from TB_ZY_YPYZMX where 1=2 + + + select yljgdm,yzid,grbslx,grbsh,jzlsh,yzzid,cxbz,yzkssj,yzjdhsbh,yzjdhsxm,yzjdsj,tzysbh,tzysxm,ystzsj,qrtzhsbh,qrtzhsxm,hsqrtzsj,zxksbm,zxksmc,zxrbh,zxrxm,yzzxsj,yzzzsj,yzsm,yzxh,yzzh,yzmxbm,yzmxmc,yzxmfldm,yzxmflmc,zlxmlbbm,ypgg,yzyf,yzpd,mcsyjl,mcsyjldw,mcsl,mcdw,fysl,fysldw,yyts,sfpb,zyjzf,bz,mj,xgbz,crt_tm_zdsc from TB_ZY_YPYZMX WHERE 1=2 + - YLJGDM - YZZID + yljgdm + yzid
+//yljgdm,yzid,grbslx,grbsh,jzlsh,yzzid,cxbz,yzkssj,yzjdhsbh,yzjdhsxm,yzjdsj,tzysbh,tzysxm,ystzsj,qrtzhsbh,qrtzhsxm,hsqrtzsj,zxksbm,zxksmc,zxrbh,zxrxm,yzzxsj,yzzzsj,yzsm,yzxh,yzzh,yzmxbm,yzmxmc,yzxmfldm,yzxmflmc,zlxmlbbm,ypgg,yzyf,yzpd,mcsyjl,mcsyjldw,mcsl,mcdw,fysl,fysldw,yyts,sfpb,zyjzf,bz,mj,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
- +
+ + + + = ? and a.CJRQ <= ? +AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null AND (a.YZZT = 3 or a.YZZT = 6 or a.YZZT = 40 or a.YZZT = 41 OR a.YZZT = 6) and a.YZLX IN (0,3,5,6,7,9) AND a.YZLB in ('01','02','03') +group by a.CFH,a.JZPKEY,a.HZPKEY,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL, + b.JJKS,b.WARD,a.YZZT,a.YZCL,a.YZSHRQ,b.ZYNO,a.PKEY,a.YZBEGINJDHS,a.YZBEGINJDSJ,a.YZTZYS,a.YZTZSJ,a.YZTZSXYS,a.YZZXSJ,a.YZFJSM,a.YZXH,a.YZTZH,a.YZMC,a.YZLB,a.YZZL,a.YZGG,a.YZYF,a.YZPC, + a.YZJLDW,a.YPYZJBDW,a.YZSL,a.YZJL,a.YZTS,a.YZENDJDHS,a.YZENDJDSJ + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,YZID,JGID,YNLSH,GRBSLX,GRBSH,JZLSH,YZZID,CXBZ,YZKSSJ,YZJDHSBH, - YZJDHSXM,YZJDHSSFZHM,YZJDSJ,TZYSBH,TZYSXM,TZYSSFZHM,YSTZSJ,QRTZHSBH,QRTZHSXM, - QRTZHSSFZHM,HSQRTZSJ,ZXKSBM,ZXKSMC,XZKS,XZKSMC,ZXRBH,ZXRXM,YZZXRSFZHM,YZZXSJ,YZZZSJ, - YZSM,YZXH,YZZH,YZMXBM,YZMXMC,YZXMFLDM,YZXMFLMC,ZLXMLBBM,YBSFXMBM,YBSFXMMC, - ZXPL,CJFX,CJBB,JCBW,MZFS,BZ,MJ,XGBZ from TB_ZY_QTYZMX where 1=2 + + + select yljgdm,yzid,grbslx,grbsh,jzlsh,yzzid,cxbz,yzkssj,yzjdhsbh,yzjdhsxm,yzjdsj,tzysbh,tzysxm,ystzsj,qrtzhsbh,qrtzhsxm,hsqrtzsj,zxksbm,zxksmc,zxrbh,zxrxm,yzzxsj,yzzzsj,yzsm,yzxh,yzzh,yzmxbm,yzmxmc,yzxmfldm,yzxmflmc, + zlxmlbbm,zxpl,cjfx,cjbb,jcbw,mzfs,bz,mj,xgbz,crt_tm_zdsc from TB_ZY_QTYZMX WHERE 1=2 + - YLJGDM - YZID + yljgdm + yzid
+//yljgdm,yzid,grbslx,grbsh,jzlsh,yzzid,cxbz,yzkssj,yzjdhsbh,yzjdhsxm,yzjdsj,tzysbh,tzysxm,ystzsj,qrtzhsbh,qrtzhsxm,hsqrtzsj,zxksbm,zxksmc,zxrbh,zxrxm,yzzxsj,yzzzsj,yzsm,yzxh,yzzh,yzmxbm,yzmxmc,yzxmfldm,yzxmflmc,zlxmlbbm,zxpl,cjfx,cjbb,jcbw,mzfs,bz,mj,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
+ + + + = ? and a.CJRQ <= ? +AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null AND (a.YZZT = 3 or a.YZZT = 6 or a.YZZT = 40 or a.YZZT = 41 OR a.YZZT = 6) and a.YZLX IN (0,3,5,6,7,9) AND a.YZLB NOT in ('01','02','03') +group by a.CFH,a.JZPKEY,a.HZPKEY,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL, + b.JJKS,b.WARD,a.YZZT,a.YZCL,a.YZSHRQ,b.ZYNO,a.PKEY,a.YZBEGINJDHS,a.YZBEGINJDSJ,a.YZTZYS,a.YZTZSJ,a.YZTZSXYS,a.YZZXSJ,a.YZFJSM,a.YZXH,a.YZTZH,a.YZMC,a.YZLB,a.YZZL,a.YZGG,a.YZYF,a.YZPC, + a.YZJLDW,a.YPYZJBDW,a.YZSL,a.YZJL,a.YZTS,a.CJRQ,a.YZENDJDHS,a.YZENDJDSJ + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

12

+

93

+

93

+
+
- - select YLJGDM,SFMXID,JGID,YNLSH,JZLSH,GRBSLX,GRBSH,TFBZ,YZMXID,SYJSID,SFJSSJ, - KDKSBM,KDKSMC,KDYSBH,KDYSXM,KDSFZHM,ZXKSBM,ZXKSMC,XZKS,XZKSMC,ZXRYBH,ZXRYXM,ZXRYSFZHM, - SFXMLBBM,FYSRGLBM,FYSRGLMC,FYFSSJ,MXXMBM,MXXMMC,XMFLBM,XMFLMC,MXXMDW,MXXMDJ,MXXMSL, - MXXMYSJE,MXXMSSJE,XGBZ from TB_ZY_SFMXB where 1=2 + + + select yljgdm,sfmxid,jzlsh,grbslx,grbsh,tfbz,yzmxid,syjsid,sfjssj,kdksbm,kdksmc,kdysbh,kdysxm,zxksbm,zxksmc,zxrybh,zxryxm,sfxmlbbm,fysrglbm,fysrglmc,fyfssj,mxxmbm,mxxmmc,xmflbm,xmflmc, + mxxmdw,mxxmdj,mxxmsl,mxxmysje,mxxmssje,llbz,crt_tm_zdsc,xgbz from TB_ZY_SFMXB WHERE 1=2 + - YLJGDM - YZID + yljgdm + sfmxid
+//yljgdm,sfmxid,jzlsh,grbslx,grbsh,tfbz,yzmxid,syjsid,sfjssj,kdksbm,kdksmc,kdysbh,kdysxm,zxksbm,zxksmc,zxrybh,zxryxm,sfxmlbbm,fysrglbm,fysrglmc,fyfssj,mxxmbm,mxxmmc,xmflbm,xmflmc,mxxmdw,mxxmdj,mxxmsl,mxxmysje,mxxmssje,llbz,crt_tm_zdsc,xgbz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
- - select YLJGDM,CYJLID,JGID,YNLSH,GRBSLX,GRBSH,SJJLZT,ZYJZLSH,CYKSBM,CYKSMC,ZYYSBH, - ZYYSXM,ZYYSSFZHM,SFLCLJ,LCLJLX,CYSJ,LCYXLXDM,RYQK,SQSHZDFHQK,MZCYZDFHQK,RYCYZDFHQK, - FSBLZDFHQK,BLJCLCZDFHQK,YYGRQK,GRBW,YYGRMC,QJCS,QJCGCS,LGBZ,BXLX,WDBZ,TXBZ,XGBZ from TB_ZY_CYDJMXB where 1=2 + + + select yljgdm,cyjlid,grbslx,grbsh,sjjlzt,zyjzlsh,cyksbm,cyksmc,zyysbh,zyysxm,sflclj,lcljlx,cysj,lcyxlxdm,ryqk,sqshzdfhqk,mzcyzdfhqk,rycyzdfhqk,fsblzdfhqk,bljclczdfhqk,yygrqk,grbw, + yygrmc,qjcs,qjcgcs,lgbz,bxlx,wdbz,txbz,xgbz,crt_tm_zdsc from TB_ZY_CYDJMXB WHERE 1=2 + - YLJGDM - CYJLID + yljgdm + cyjlid
+//yljgdm,cyjlid,grbslx,grbsh,sjjlzt,zyjzlsh,cyksbm,cyksmc,zyysbh,zyysxm,sflclj,lcljlx,cysj,lcyxlxdm,ryqk,sqshzdfhqk,mzcyzdfhqk,rycyzdfhqk,fsblzdfhqk,bljclczdfhqk,yygrqk,grbw,yygrmc,qjcs,qjcgcs,lgbz,bxlx,wdbz,txbz,xgbz,crt_tm_zdsc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + = ? AND a.CJRQ <= ? AND a.JZLX = 'Z' AND a.JZZT = 'C' AND a.MOTHERJZPKEY is null AND c.PKEY IS NOT NULL GROUP BY a.PKEY,a.HZPKEY,a.JZZT,c.PKEY,c.DSCG_DEPT_CODG,c.ATDDR_NO,b.SSLCLJ,c.ENDTIME,a.RYQK,b.YYGRQK, +a.ISLG,c.DJCXZT + ]]> +//yljgdm,cyjlid,grbslx,grbsh,sjjlzt,zyjzlsh,cyksbm,cyksmc,zyysbh,zyysxm,sflclj,lcljlx,cysj,lcyxlxdm,ryqk,sqshzdfhqk,mzcyzdfhqk,rycyzdfhqk,fsblzdfhqk,bljclczdfhqk,yygrqk,grbw,yygrmc,qjcs,qjcgcs,lgbz,bxlx,wdbz,txbz,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + +

12

+

93

+

93

+
+
- - select YLJGDM,JSJLID,JGID,YNLSH,ZYJZLSH,GRBSLX,GRBSH,JLSFZT,JSFPH,SFCJBM,FYJSSJ, - HZLYSX,YLFFFSDM,FYJSZJE,GRCDFYJE,JSRYBH,JSRYXM from TB_ZY_JSMXB where 1=2 + + + select yljgdm,jsjlid,zyjzlsh,grbslx,grbsh,jlsfzt,jsfph,sfcjbm,fyjssj,hzlysx,ylfffsdm,fyjszje,grcdfyje,jsrybh,jsryxm,xgbz,crt_tm_zdsc from TB_ZY_JSMXB WHERE 1=2 + - YLJGDM - JSJLID + yljgdm + jsjlid
+//yljgdm,jsjlid,zyjzlsh,grbslx,grbsh,jlsfzt,jsfph,sfcjbm,fyjssj,hzlysx,ylfffsdm,fyjszje,grcdfyje,jsrybh,jsryxm,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - -
- - - - select YLJGDM,ZFFSJLID,JGID,YNLSH,ZYJZLSH,GRBSLX,GRBSH,JSJLID,JLSFZT, - ZFFSDM,ZFFSJE,FYJSSJ,JSRYBH,JSRYXM,JSRYSFZHM,XGBZ from TB_ZY_JSZFFSMXB where 1=2 - - - YLJGDM - ZFFSJLID -
-
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -
- - - - select YLJGDM,ZDID,JGID,YNLSH,ZYJZLSH,GRBSLX,GRBSH,XGBZ,ZDRQSJ,ZDFFBM,ZDBZBM, - ZDLBBM,BZQBDM,ZDYBID,ZDZCBM,ZDSX,ZDBM,ZDMC,SFYZ,CYQKBM,ZDLX,JLSJ_YWK,CXSJ_YWK, - BJSJ_YWK from TB_ZY_ZDMXB where 1=2 - - - YLJGDM - ZDID -
-
+
+ + + =? AND a.CJRQ <= ? + and a.YZSHZT='1' AND a.YZSFZT = '1' and c.JZLX = 'Z' AND c.MOTHERJZPKEY is null and b.PKEY IS NOT NULL AND e.JSZT IS NOT NULL group by e.PKEY,a.JZPKEY,a.HZPKEY,e.ZDJFLX,e.ISHC,e.HCDJPKEY,JSSJ,e.JSZT,e.JFZJE,f.SFRY,f.FPHM + ]]> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - + +

12

+

93

+

93

+
+
- - - select YLJGDM,DDYLJGDM,YBQDJSLSH,JGID,BAH,SFZHM,JZLSH,YNLSH,YBKKH,GRBSLX,GRBSH, - YBJSDJ,SBSJ,YBLX,TSRYLX,XSRRYLX,RYSJ,CBD,BZDM,BZMC,SSJCZDM,SSJCZMC,YBFPDH,YBFPHM, - YBJSQSSJ,YBJSZZSJ,YBZFFS,ZJE,YBTCJJZFJE,ZGDEBZ,JMDBBX,GWYYLBZ,YLJZZFJE,QTZFQYBC, - QTZFSYBX,GRZHZFJE,GRXJZFJE,GRZFJE,GRYBZFJE,ZYYLLB,ZLLB,HXJSYJS,ZZJHBFLX from TB_ZY_FYJSJLB where 1=2 + + + + select yljgdm,zffsjlid,zyjzlsh,grbslx,grbsh,jsjlid,jlsfzt,zffsdm,zffsje,fyjssj,jsrybh,jsryxm,xgbz,crt_tm_zdsc from TB_ZY_JSZFFSMXB WHERE 1=2 + - - YLJGDM - ZDID +
+ yljgdm + zffsjlid
+//yljgdm,zffsjlid,zyjzlsh,grbslx,grbsh,jsjlid,jlsfzt,zffsdm,zffsje,fyjssj,jsrybh,jsryxm,xgbz,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + -
- - - - - select YLJGDM,JYBGID,JGID,YNLSH,JZLSH,GRBSLX,GRBSH,MZZYBZ,MJZH,ZYH,HZLXDM, - HZXM,HZXB,HZNL,DHHM,HZKSDM,HZKSMC,HZBQMC,HZBFH,BZBCH,SQDBH,SQJGDM,SQJGMC,SQKSDM,SQKSMC, - SQRQSJ,SQRBH,SQRXM,SQRSFZHM,XYZDDM,XYZDMC,ZDJGDM,ZDJGMC,ZDRQ,BBLX,JYBBH,BBZT,CYRQSJ, - JSRQSJ,JYXMDM,JYXMMC,JYJSBH,JYJSQM,JYYSBH,JYYSQM,JYYSSFZHM,JYRQ,JYBGDH,BGKSBH, - BGKSMC,JYBGJG,JYBGBZ,JYBGRQ,BGYSBH,BGYSQM,BGYSSFZHM,SHYSBH,SHYSQM,SHYSSFZHM,DYRQ,SQRQ, - BBDM,BBMC,WJZ,BGDLBBM,BGDLB,WJLJ,JLYSBH,DABCJGBM,DABCJGMC,DABCJGDZ,MJ,XGBZ from TB_JY_JYBGZB where 1=2 + + + + ? and CJRQ <=?]]> - - YLJGDM - JYBGID +
+ GHZT + PKEY + JZPKEY + HZPKEY + JGID
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
- - - - - select JYZBLSH,YLJGDM,JYBGID,JGID,YNLSH,DYXH,BGRQ,JCRBH,JCRXM,JCRSFZHM,SHRBH, - SHRXM,SHRSFZHM,YBSFDM,JCFFMC,JCLB,LOINCDM,JCZBDM,JCZBMC,ZBJGLX,JCZBJG,JYDLJGJSDW,YCTS, - CKZFW,SBBM,YQBH,YQMC,JLDW,YZID,XGBZ from TB_JY_JYJGZBB where 1=2 - - - JYZBLSH - YLJGDM -
-
+ +

12

+

93

+

93

+
+
+ + + + =? AND a.CJRQ <= ? and (a.SFZT = '1' or a.SFZT = '3') and a.PJLX = 'ZS' and b.PKEY is not null + ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + +

12

+

93

+

93

+
+
- - + + + select yljgdm,zdid,zyjzlsh,grbslx,grbsh,xgbz,zdrqsj,zdffbm,zdbzbm,zdlbbm,bzqbdm,zdybid,zdzcbm,zdsx,zdbm,zdmc,sfyz,cyqkbm,zdlx,jlsj_ywk,cxsj_ywk,bjsj_ywk,crt_tm_zdsc from TB_ZY_ZDMXB WHERE 1=2 + - - YLJGDM - JCBGID +
+ yljgdm + zdid
+//yljgdm,zdid,zyjzlsh,grbslx,grbsh,xgbz,zdrqsj,zdffbm,zdbzbm,zdlbbm,bzqbdm,zdybid,zdzcbm,zdsx,zdbm,zdmc,sfyz,cyqkbm,zdlx,jlsj_ywk,cxsj_ywk,bjsj_ywk,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + -
--> - - - - - select SSID,YLJGDM,JGID,YNLSH,MZZYBZ,JZLSH,GRBSLX,GRBSH,SQRYBH,SQRYXM,DJRYBH, - DJRYXM,SQKSDM,SQKSMC,SSKS,SSKSMC,SQYSBH,SQYSXM,SQYSSFZHM,SSYSBH,SSYSXM,SSYSSFZHM, - SSMC,SSCZMBBW,SSYYRQ,SSSQRQ,MZSSBZ,RJSSBZ,XGBZ from TB_SS_SSJLB where 1=2 - - - SSID - YLJGDM -
-
+
+ + + + =? AND a.CJRQ <= ? AND a.JZLX = 'Z' AND (a.JZZT = 'Z' or a.JZZT = 'C' ) and b.PKEY IS NOT NULL AND a.MOTHERJZPKEY is null + ]]> +//yljgdm,zdid,zyjzlsh,grbslx,grbsh,xgbz,zdrqsj,zdffbm,zdbzbm,zdlbbm,bzqbdm,zdybid,zdzcbm,zdsx,zdbm,zdmc,sfyz,cyqkbm,zdlx,jlsj_ywk,cxsj_ywk,bjsj_ywk,crt_tm_zdsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - select YLJGDM,SSMXLSH,YNLSH,SSID,JZLSH,GRBSLX,GRBSH,MZZYBZ,RJSSBZ,SSLX,SSCZDM, - SSCZMC,SSQZD,SSHZD,SSKSSJ,SSJSSJ,SSJB,SSYSBH,SSYSXM,SSYSSFZHM,SSYSZ1BH,SSYSZ1XM, - SSYSZ2BH,SSYSZ2XM,SSHS,MZYSBH,MZYSSFZH,MZYSXM,MZFF,MZFS,MZFJDM,SSCZBWDM,SSCZBW, - SSHZLX,QKYHDJ,MJ,XGBZ from TB_SS_SSMXB where 1=2 - - - YLJGDM - SSMXLSH -
-
+ +

12

+

93

+

93

+
+
+ + + = ? AND a.CJRQ <= ? + and a.YZSHZT='1' AND a.YZSFZT = '1' and c.JZLX = 'Z' and b.PKEY IS NOT NULL AND e.JSZT IS NOT NULL + ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + +

12

+

93

+

93

+
+
+ + \ No newline at end of file diff --git a/WEB-INF/src/com/his/thread/HisAutoSyjgThread.java b/WEB-INF/src/com/his/thread/HisAutoSyjgThread.java new file mode 100644 index 0000000..a2d1eed --- /dev/null +++ b/WEB-INF/src/com/his/thread/HisAutoSyjgThread.java @@ -0,0 +1,2314 @@ +package com.his.thread; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import com.mms.service.ZyAutoFwzService; +import com.util.MainUtil; +import com.wat.component.DxDateTimePick; +import com.wat.component.DxThreadOperate; +import com.wat.core.config.DaoCreator; +import com.wat.core.dal.DxDataManager; +import com.wat.core.dal.DxNormalDataManager; +import com.wat.core.dal.DxProxoolDataSourceFactory; +import com.wat.delphi.util.Delphi; + +/** + * 每日进行三医监管前一日数据上传 + * + */ + +public class HisAutoSyjgThread implements DxThreadOperate{ + public void start() { + syjgAction(); + } + + public static DxNormalDataManager setYwdzSource(DxNormalDataManager dao){ + DxProxoolDataSourceFactory ds = new DxProxoolDataSourceFactory("mysql_lei"); + dao.setDataSourceFactory(ds); + return dao; + } + + public void syjgAction() { + DxNormalDataManager yljgusedao = new DxNormalDataManager("select PKEY,JGMC from MAIN_YLJG where ZT='1' "); + yljgusedao.reload(); + Calendar begin = Calendar.getInstance(); + begin.set(Calendar.HOUR_OF_DAY, 0); + begin.set(Calendar.MINUTE, 0); + begin.set(Calendar.SECOND, 0); + begin.add(Calendar.DATE, -1); + Timestamp biginTimestamp = new Timestamp(begin.getTimeInMillis()); +// Timestamp biginTimestamp = new Timestamp(Long.valueOf("1734451200000")); + + Calendar end = Calendar.getInstance(); + end.set(Calendar.HOUR_OF_DAY, 23); + end.set(Calendar.MINUTE, 59); + end.set(Calendar.SECOND, 59); + end.add(Calendar.DATE, -1); + Timestamp enTimestamp = new Timestamp(end.getTimeInMillis()); + //Timestamp enTimestamp = new Timestamp(Long.valueOf("1734883199000")); + List dataList = new ArrayList(); + String message = ""; + + String companyid = "C903C18E-27EB-A242-6306-E301CB3E6AC9"; + syjgHzxxAction(companyid,biginTimestamp,enTimestamp); + sdgghmxbAction(companyid,biginTimestamp,enTimestamp); + sdgmhzjzmxAction(companyid,biginTimestamp,enTimestamp); + sdgMjzcfzbAction(companyid,biginTimestamp,enTimestamp); + sdgMjzcfmxbAction(companyid,biginTimestamp,enTimestamp); + sdgMjzQtcfmxbAction(companyid,biginTimestamp,enTimestamp); + sdgMjzFymxbAction(companyid,biginTimestamp,enTimestamp); + sdgMjzJsmxbAction(companyid,biginTimestamp,enTimestamp); + sdgMjzJsZffsmxbAction(companyid,biginTimestamp,enTimestamp); + sdgMjzZdmxbAction(companyid,biginTimestamp,enTimestamp); + sjgRydjmxbAction(companyid,biginTimestamp,enTimestamp); + sdgZycfzbAction(companyid,biginTimestamp,enTimestamp); + sdgZycfmxbAction(companyid,biginTimestamp,enTimestamp); + sdgZyQtcfmxbAction(companyid,biginTimestamp,enTimestamp); + sdgZyFymxbAction(companyid,biginTimestamp,enTimestamp); + sdgZyCydjmxbAction(companyid,biginTimestamp,enTimestamp); + sdgZyJsmxbAction(companyid,biginTimestamp,enTimestamp); + sdgZyJsZffsmxbAction(companyid,biginTimestamp,enTimestamp); + sdgZyZdmxbAction(companyid,biginTimestamp,enTimestamp); + + + } + + + public void syjgHzxxAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_患者信息 + DxNormalDataManager hzinfoTestDao=DaoCreator.getNormalDao("Sjg_hzinfoTestDao"); + hzinfoTestDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_患者信息 + DxNormalDataManager sjghzjbxxbdao=DaoCreator.getNormalDao("sjghzjbxxbdao"); + sjghzjbxxbdao=setYwdzSource(sjghzjbxxbdao); + sjghzjbxxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + String LXDH_LBDM = ""; + String LXDH_LB = ""; + long datatime = System.currentTimeMillis(); + for (int i = 0; i < hzinfoTestDao.getRowCount(); i++) { + sjghzjbxxbdao.absoluteInSert(); + sjghzjbxxbdao.setColumnValue("YLJGDM", "452894746"); + sjghzjbxxbdao.setColumnValue("GRBSLX", "09");//个人标识类型 09:医疗机构内部患者唯一索引码 + sjghzjbxxbdao.setColumnValue("GRBSH", hzinfoTestDao.getColumnValueAsString(i,"PKEY"));//个人标识号 + sjghzjbxxbdao.setColumnValue("ZJLX", hzinfoTestDao.getColumnValueAsString(i,"ZJLX"));//证件类型 + sjghzjbxxbdao.setColumnValue("ZJHM", hzinfoTestDao.getColumnValueAsString(i,"ZJHM"));//证件号码 + sjghzjbxxbdao.setColumnValue("SFZHM", hzinfoTestDao.getColumnValueAsString(i,"SFZH"));//居民身份证号码 + sjghzjbxxbdao.setColumnValue("JKDABH", "");//健康档案编号 + sjghzjbxxbdao.setColumnValue("JKKKH", "");//居民健康卡卡号 +// if(!Delphi.isNullString(hzinfoTestDao.getColumnValueAsString(i,"YBKH")) && hzinfoTestDao.getColumnValueAsString(i,"YBKH").length() < 30) { +// sjghzjbxxbdao.setColumnValue("YBKKH", hzinfoTestDao.getColumnValueAsString(i,"YBKH"));//医保卡号 +// }else { +// sjghzjbxxbdao.setColumnValue("YBKKH", "");//医保卡号 +// } + sjghzjbxxbdao.setColumnValue("XB", hzinfoTestDao.getColumnValueAsString(i,"XB"));//性别 + sjghzjbxxbdao.setColumnValue("XM", hzinfoTestDao.getColumnValueAsString(i,"XM"));//患者姓名 + sjghzjbxxbdao.setColumnValue("HZLX", "");//患者类型 + sjghzjbxxbdao.setColumnValue("HYZK", hzinfoTestDao.getColumnValueAsString(i,"HYZK"));//婚姻状况 + sjghzjbxxbdao.setColumnValue("CSRQ",new Timestamp(hzinfoTestDao.getColumnValueAsLong(i,"CSRQ")) );//出生日期 + sjghzjbxxbdao.setColumnValue("CSD","");//出生地 + sjghzjbxxbdao.setColumnValue("MZ", hzinfoTestDao.getColumnValueAsString(i,"MZ"));//民族 + sjghzjbxxbdao.setColumnValue("GJ", hzinfoTestDao.getColumnValueAsString(i,"GJ"));//国籍 + sjghzjbxxbdao.setColumnValue("DHHM", hzinfoTestDao.getColumnValueAsString(i,"PHONE"));//电话号码 + sjghzjbxxbdao.setColumnValue("SJHM", hzinfoTestDao.getColumnValueAsString(i,"PHONE"));//手机号码 + sjghzjbxxbdao.setColumnValue("GZDWYB", "");//工作单位邮编 + sjghzjbxxbdao.setColumnValue("GZDWMC", "");//工作单位名称 + sjghzjbxxbdao.setColumnValue("GZDWDZ", "");//工作单位地址 + sjghzjbxxbdao.setColumnValue("GZDWDHHM", "");//工作单位电话号码 + sjghzjbxxbdao.setColumnValue("JZDZ", hzinfoTestDao.getColumnValueAsString(i,"XZDZ"));//居住地址 + sjghzjbxxbdao.setColumnValue("HKDZ", hzinfoTestDao.getColumnValueAsString(i,"JGDZ"));//户口地址 + sjghzjbxxbdao.setColumnValue("HKDZYB", hzinfoTestDao.getColumnValueAsString(i,"JGDZJGH"));//户口地址邮编 + sjghzjbxxbdao.setColumnValue("LXRXM", hzinfoTestDao.getColumnValueAsString(i,"LXR"));//联系人姓名 + sjghzjbxxbdao.setColumnValue("LXRGX", hzinfoTestDao.getColumnValueAsString(i,"LXRGX"));//联系人关系 + sjghzjbxxbdao.setColumnValue("LXRDZ","");//联系人地址 + sjghzjbxxbdao.setColumnValue("LXRYB","");//联系人邮编 + sjghzjbxxbdao.setColumnValue("LXRDH", hzinfoTestDao.getColumnValueAsString(i,"LXRDH"));//联系人电话 + sjghzjbxxbdao.setColumnValue("CJGZRQ", "");//参加工作日期 + sjghzjbxxbdao.setColumnValue("DZYJDZ", "");//电子邮件地址 + if("01".equals(hzinfoTestDao.getColumnValueAsString(i,"LXRGX"))) { + LXDH_LBDM = "01"; + LXDH_LB = "本人"; + }else if ("10".equals(hzinfoTestDao.getColumnValueAsString(i,"LXRGX"))) { + LXDH_LBDM = "02"; + LXDH_LB = "配偶"; + }else { + LXDH_LBDM = "99"; + LXDH_LB = "其他"; + } + sjghzjbxxbdao.setColumnValue("LXDH_LBDM", LXDH_LBDM);//联系电话-类别代码 + sjghzjbxxbdao.setColumnValue("LXDH_LB", LXDH_LB);//联系电话-类别 + int[] arr = getAgeIntArray(hzinfoTestDao.getColumnValueAsLong(i,"CSRQ")); + sjghzjbxxbdao.setColumnValue("NLS", arr[0]);//年龄(岁) + sjghzjbxxbdao.setColumnValue("NLY", arr[1]);//年龄(月) +// sjghzjbxxbdao.setColumnValue("NLT", arr[2]);//年龄(天) + sjghzjbxxbdao.setColumnValue("MJ", "");//密级 + sjghzjbxxbdao.setColumnValue("XGBZ", "");//修改标志 + sjghzjbxxbdao.setColumnValue("TBRQ",new Timestamp(hzinfoTestDao.getColumnValueAsLong(i,"CJRQ")));//数据生成时间 + Timestamp timestamp = new Timestamp(datatime); + timestamp.setNanos(0); + sjghzjbxxbdao.setColumnValue("CRT_TM_ZDSC",timestamp);//数据上传时间 + + } + if(sjghzjbxxbdao.commit()){ + System.out.println("====【患者信息TB_HZXX】更新成功=="); + } + + } + + /** + * 返回年龄数组 + * @param lBirthday 出生日期Long值 + * @return 年龄整数数组 {年,月,日} + */ + public static int[] getAgeIntArray(Long lBirthday) { + try{ + if(lBirthday==0L){ + //输入lBirthday为0L时表示未输入 + throw new Exception("输入日期错误"); + } + Date dateBirthday=new Date(lBirthday); + return getAgeIntArray(dateBirthday, null); + }catch (Exception e) { + return new int[] { 0, 0, 0 }; + } + } + + /** + * 返回年龄数组 + * @param dateBirthday 出生日期 + * @param dateCalculate 计算日期 如传入值为NULL,则表示当时。 + * @return 年龄整数数组 {年,月,日} + */ + public static int[] getAgeIntArray(Date dateBirthday, Date dateCalculate) { + //年龄数组 + int[] aIntAge = new int[] { 0, 0, 0 }; + Calendar calAge = Calendar.getInstance(); + if (dateCalculate != null) { + calAge.setTime(dateCalculate); + } + aIntAge[0] = calAge.get(Calendar.YEAR); + aIntAge[1] = calAge.get(Calendar.MONTH) + 1; + aIntAge[2] = calAge.get(Calendar.DAY_OF_MONTH); + //出生日期数组 + int[] aIntBirth = new int[] { 0, 0, 0 }; + Calendar calBirthday = Calendar.getInstance(); + if (dateBirthday != null) { + calBirthday.setTime(dateBirthday); + } + aIntBirth[0] = calBirthday.get(Calendar.YEAR); + aIntBirth[1] = calBirthday.get(Calendar.MONTH) + 1; + aIntBirth[2] = calBirthday.get(Calendar.DAY_OF_MONTH); + //进行加减计算 + aIntAge[0] -= aIntBirth[0]; + aIntAge[1] -= aIntBirth[1]; + aIntAge[2] -= aIntBirth[2]; + //进行日补齐计算 + if (aIntAge[2] < 0) { + Calendar calCal = Calendar.getInstance(); + if (dateCalculate != null) { + calCal.setTime(dateCalculate); + } + calCal.set(Calendar.DAY_OF_MONTH, 1); + calCal.set(Calendar.DAY_OF_YEAR, calCal.get(Calendar.DAY_OF_YEAR) - 1); + aIntAge[2] += calCal.get(Calendar.DAY_OF_MONTH); + aIntAge[1]--; + } + //进行月补齐计算 + if (aIntAge[1] < 0) { + aIntAge[1] += 12; + aIntAge[0]--; + } + //进行年补齐计算 + if (aIntAge[0] < 0) { + aIntAge[0] = 0; + aIntAge[1] = 0; + aIntAge[2] = 0; + } + return aIntAge; + } + + /* 4.3.1.1挂号明细表 */ + public void sdgghmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_挂号明细表 + DxNormalDataManager mzghJzGhbAllDao=DaoCreator.getNormalDao("sjg_mzghJzGhbAllDao"); + mzghJzGhbAllDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + DxNormalDataManager mzsffpzbAllDao=DaoCreator.getNormalDao("mzsffpzbAllDao"); + mzsffpzbAllDao.reload(new Object[] {companyid}); + + //中心_挂号明细表 + DxNormalDataManager sdgghmxbdao=DaoCreator.getNormalDao("sdgghmxbdao"); + sdgghmxbdao=setYwdzSource(sdgghmxbdao); + sdgghmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao("ksdic"); + ksdic.setNormalParameters(new Object[]{companyid}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + long datatime = System.currentTimeMillis(); + for (int i = 0; i < mzghJzGhbAllDao.getRowCount(); i++) { + sdgghmxbdao.absoluteInSert(); + sdgghmxbdao.setColumnValue("YLJGDM", "452894746");//医疗机构代码 + sdgghmxbdao.setColumnValue("GHJLID", mzghJzGhbAllDao.getColumnValueAsString(i,"PKEY"));//挂号记录ID + sdgghmxbdao.setColumnValue("JZLSH", mzghJzGhbAllDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 +// sdgghmxbdao.setColumnValue("YNLSH", mzghJzGhbAllDao.getColumnValueAsString(i,"JZPKEY"));//院内流水号 + sdgghmxbdao.setColumnValue("GRBSLX", "09");//个人标识类型 09:医疗机构内部患者唯一索引码 + sdgghmxbdao.setColumnValue("GRBSH", mzghJzGhbAllDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + String thbz = "01"; + Timestamp gtjtime = new Timestamp(mzghJzGhbAllDao.getColumnValueAsLong(i,"GHSJ")); + if("T".equals(mzghJzGhbAllDao.getColumnValueAsString(i,"GHZT"))) { + thbz = "02"; + if(Delphi.isNullString(mzghJzGhbAllDao.getColumnValueAsString(i,"THSJ"))) { + gtjtime = new Timestamp(mzghJzGhbAllDao.getColumnValueAsLong(i,"CJRQ")); + }else { + gtjtime = new Timestamp( mzghJzGhbAllDao.getColumnValueAsLong(i,"THSJ")); + } + } + sdgghmxbdao.setColumnValue("GTHBZ", thbz);//退号标志 + sdgghmxbdao.setColumnValue("STFBH", "");//收/退费编号 + sdgghmxbdao.setColumnValue("GTHSJ", gtjtime);//挂/退号时间 + sdgghmxbdao.setColumnValue("GHLB", "100");//挂号类别 100普通门诊 + sdgghmxbdao.setColumnValue("SFJZ", mzghJzGhbAllDao.getColumnValueAsString(i,"SFJZ"));//是否急诊 + sdgghmxbdao.setColumnValue("JZXZ", "0201");//就诊性质 0201医院就诊 + sdgghmxbdao.setColumnValue("GHTJBM", "0101");//挂号途径代码 0101医院窗口就诊挂号 + sdgghmxbdao.setColumnValue("BXLX", "99");//保险类型(患者属性) 99其他 + sdgghmxbdao.setColumnValue("KSBM", mzghJzGhbAllDao.getColumnValueAsString(i,"GHKS"));//科室编码 + sdgghmxbdao.setColumnValue("KSMC", ksdic.getDicValue(mzghJzGhbAllDao.getColumnValueAsString(i,"GHKS")));//科室名称 + sdgghmxbdao.setColumnValue("LCYXLXDM", "01");//临床医学类型代码 01西医 + + if(jgrydicdao.local("USERACCOUNT", mzghJzGhbAllDao.getColumnValueAsString(i,"GHYS"))){ + sdgghmxbdao.setColumnValue("GHYSBH",jgrydicdao.getColumnValueAsString("YBID"));//挂号医生编号 + sdgghmxbdao.setColumnValue("GHYSXM", jgrydicdao.getColumnValueAsString("YBNAME"));//挂号医生姓名 +// sdgghmxbdao.setColumnValue("GHYSSFZHM", jgrydicdao.getColumnValueAsString("IDENTITYID"));//挂号医生身份证号码 + } + sdgghmxbdao.setColumnValue("TXBZ", "");//特需标志 + sdgghmxbdao.setColumnValue("WDBZ", "9");//外地标志 9未知 + + mzsffpzbAllDao.local("PKEY", mzghJzGhbAllDao.getColumnValueAsString(i,"MZJSPKEY")); + if(Delphi.isNullString(mzsffpzbAllDao.getColumnValueAsString("SFJE"))) { + System.err.println("=========="+mzsffpzbAllDao.getColumnValueAsString("SFJE")); + + }else { + sdgghmxbdao.setColumnValue("GHZFY", mzsffpzbAllDao.getColumnValueAsString("SFJE"));//挂号总费用 + } + sdgghmxbdao.setColumnValue("XGBZ", "");//修改标志 + Timestamp timestamp = new Timestamp(datatime); + timestamp.setNanos(0); + sdgghmxbdao.setColumnValue("CRT_TM_ZDSC",timestamp);//数据上传时间 + } + + if(sdgghmxbdao.commit()){ + System.out.println("====【挂号明细表TB_MZ_GHMXB】更新成功=="); + } + + } + + /*4.3.1.2门急诊就诊明细表*/ + public void sdgmhzjzmxAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊就诊明细表 + DxNormalDataManager sjgmjzjzmxbdao_his=DaoCreator.getNormalDao("sjgmjzjzmxbdao_his"); + sjgmjzjzmxbdao_his.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊就诊明细表 + DxNormalDataManager sjgmjzjzmxbdao=DaoCreator.getNormalDao("sjgmjzjzmxbdao"); + sjgmjzjzmxbdao=setYwdzSource(sjgmjzjzmxbdao); + sjgmjzjzmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + long datatime = System.currentTimeMillis(); + DxNormalDataManager gzzMzQtjbzdDao = DaoCreator.getNormalDao("gzzMzQtjbzdDao"); + gzzMzQtjbzdDao.reload(new Object[] {companyid}); + for (int i = 0; i < sjgmjzjzmxbdao_his.getRowCount(); i++) { + sjgmjzjzmxbdao.absoluteInSert(); + sjgmjzjzmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzjzmxbdao.setColumnValue("jzmxid", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JZPKEY"));//就诊明细ID + sjgmjzjzmxbdao.setColumnValue("grbslx", "09");//个人标识类型 09:医疗机构内部患者唯一索引码 + sjgmjzjzmxbdao.setColumnValue("grbsh", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzjzmxbdao.setColumnValue("jzlsh", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzjzmxbdao.setColumnValue("sffz", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JZZB"));//是否复诊 + sjgmjzjzmxbdao.setColumnValue("lcyxlxdm","01");//临床医学类型代码 + sjgmjzjzmxbdao.setColumnValue("mjzh",sjgmjzjzmxbdao_his.getColumnValueAsString(i,"MZNO"));//门(急)诊号 + sjgmjzjzmxbdao.setColumnValue("hzxm",sjgmjzjzmxbdao_his.getColumnValueAsString(i,"XM"));//患者姓名 + sjgmjzjzmxbdao.setColumnValue("hzsx","99");//患者属性 99.其他 + sjgmjzjzmxbdao.setColumnValue("jzlx","100");//就诊类型 100:普通门诊 + String isjz = "0"; + if(Delphi.isNullString(sjgmjzjzmxbdao_his.getColumnValueAsString(i,"ISJZ"))) { + isjz = "1"; + } + sjgmjzjzmxbdao.setColumnValue("sfjz",isjz);//是否急诊 + sjgmjzjzmxbdao.setColumnValue("jzxz","0201");//就诊性质 0201医院就诊 + sjgmjzjzmxbdao.setColumnValue("jzksbm",sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JJKS"));//就诊科室编码 + sjgmjzjzmxbdao.setColumnValue("jzksmc",dpdicdao.getDicValue(sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JJKS")));//就诊科室名称 + sjgmjzjzmxbdao.setColumnValue("jzksrq",new Timestamp(sjgmjzjzmxbdao_his.getColumnValueAsLong(i,"JJRQ")));//门诊就诊日期 + + if(jgrydicdao.local("USERACCOUNT", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JJYS"))){ + sjgmjzjzmxbdao.setColumnValue("zzysbh",jgrydicdao.getColumnValueAsString("YBID"));//主诊医生编号 + sjgmjzjzmxbdao.setColumnValue("zzysxm", jgrydicdao.getColumnValueAsString("YBNAME"));//主诊医生姓名 + } + sjgmjzjzmxbdao.setColumnValue("mzzddm", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JBBM"));//门诊诊断代码(主要诊断) + sjgmjzjzmxbdao.setColumnValue("mzzdmc", sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JBMC"));//门诊诊断名称(主要诊断) + sjgmjzjzmxbdao.setColumnValue("zxdm","");//证型代码 + sjgmjzjzmxbdao.setColumnValue("zxmc","");//证型名称 + sjgmjzjzmxbdao.setColumnValue("zfmc","");//治法名称 + sjgmjzjzmxbdao.setColumnValue("bmlx","");//代码类型 + sjgmjzjzmxbdao.setColumnValue("jzzdsm","");//门诊诊断说明 + sjgmjzjzmxbdao.setColumnValue("zs","");//主诉 + + + String jbmc = ""; + String jbbm = ""; + gzzMzQtjbzdDao.setFilter(" JGID LIKE '"+companyid+"' AND HZPKEY LIKE '"+sjgmjzjzmxbdao_his.getColumnValueAsString(i,"HZPKEY")+"' AND JZPKEY LIKE '"+sjgmjzjzmxbdao_his.getColumnValueAsString(i,"JZPKEY")+"'" ); + gzzMzQtjbzdDao.filter(); + + if(gzzMzQtjbzdDao.getRowCount() > 0) { + jbmc = ""; + jbbm = ""; + for (int j = 0; j < gzzMzQtjbzdDao.getRowCount(); j++) { + jbmc += gzzMzQtjbzdDao.getColumnValueAsString(j,"JBMC"); + jbbm += gzzMzQtjbzdDao.getColumnValueAsString(j,"JBBM"); + if(j < gzzMzQtjbzdDao.getRowCount()-1) { + jbmc += ";"; + jbbm += ";"; + } + } + } + sjgmjzjzmxbdao.setColumnValue("mzzzmc",jbmc);//门诊症状-名称 + sjgmjzjzmxbdao.setColumnValue("mzzzzddm",jbbm);//门诊症状- 诊断代码 + sjgmjzjzmxbdao.setColumnValue("lggc",sjgmjzjzmxbdao_his.getColumnValueAsString(i,"ISLG"));//留观观察 + sjgmjzjzmxbdao.setColumnValue("zzms","");//症状描述 + // sjgmjzjzmxbdao.setColumnValue("fbrqsj","");//发病日期时间 + //sjgmjzjzmxbdao.setColumnValue("ssy","");//收缩压 + //sjgmjzjzmxbdao.setColumnValue("szy","");//舒张压 + //sjgmjzjzmxbdao.setColumnValue("tw","");//体温 + sjgmjzjzmxbdao.setColumnValue("zzcxsj","");//症状持续时间 + sjgmjzjzmxbdao.setColumnValue("xgbz",0);//修改标志 + sjgmjzjzmxbdao.setColumnValue("mj","");//密级 + Timestamp timestamp = new Timestamp(datatime); + timestamp.setNanos(0); + sjgmjzjzmxbdao.setColumnValue("crt_tm_zdsc",timestamp);//数据上传时间 + } + + if(sjgmjzjzmxbdao.commit()){ + System.out.println("====【门急诊就诊明细表】更新成功=="); + } + } + + /*4.3.1.3门急诊处方主表*/ + public void sdgMjzcfzbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊处方主表 + DxNormalDataManager his_mzCfallDao=DaoCreator.getNormalDao("his_mzCfallDao"); + his_mzCfallDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊处方主表 + DxNormalDataManager sjgmjzCfzbdao=DaoCreator.getNormalDao("sjgmjzCfzbdao"); + sjgmjzCfzbdao=setYwdzSource(sjgmjzCfzbdao); + sjgmjzCfzbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxDataManager xbdao = DaoCreator.getNormalDao("xbdao"); + xbdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_mzCfallDao.getRowCount(); i++) { + sjgmjzCfzbdao.absoluteInSert(); + sjgmjzCfzbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzCfzbdao.setColumnValue("cfzid",his_mzCfallDao.getColumnValueAsString(i,"CFH"));//处方主ID + sjgmjzCfzbdao.setColumnValue("jzlsh",his_mzCfallDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzCfzbdao.setColumnValue("grbslx", "09");//个人标识类型 09:医疗机构内部患者唯一索引码 + sjgmjzCfzbdao.setColumnValue("grbsh", his_mzCfallDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzCfzbdao.setColumnValue("mjzh", his_mzCfallDao.getColumnValueAsString(i,"JZH"));//门(急)诊号 + String cfdl = "99"; + String cfh = his_mzCfallDao.getColumnValueAsString(i,"CFH"); + if(cfh.startsWith("D")) { + cfdl = "01"; + }else if (cfh.startsWith("S")) { + cfdl = "02"; + } +// else if ("05".equals(yzdl)) { +// cfdl = "02"; +// }else if ("08".equals(yzdl)) { +// cfdl = "04"; +// } + sjgmjzCfzbdao.setColumnValue("cfdl", cfdl);//处方大类 + String cflx = "99"; + if(cfh.startsWith("D")) { + cflx = "01"; + }else if (cfh.startsWith("J")) { + cflx = "04"; + } + sjgmjzCfzbdao.setColumnValue("cflx", cflx);//处方类型 + + sjgmjzCfzbdao.setColumnValue("cfhm", his_mzCfallDao.getColumnValueAsString(i,"CFH"));//处方号码 + + String yzxzks = his_mzCfallDao.getColumnValueAsString(i,"YZXZKS"); + String yzxzksname = dpdicdao.getDicValue(his_mzCfallDao.getColumnValueAsString(i,"YZXZKS")); + sjgmjzCfzbdao.setColumnValue("kfksdm", yzxzks);//开方科室代码 + sjgmjzCfzbdao.setColumnValue("kfksmc", yzxzksname);//开方科室名称 + + if(jgrydicdao.local("USERACCOUNT", his_mzCfallDao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzCfzbdao.setColumnValue("kfysbh",jgrydicdao.getColumnValueAsString("YBID"));//开方医生编号 + sjgmjzCfzbdao.setColumnValue("kfysxm", jgrydicdao.getColumnValueAsString("YBNAME"));//开方医生姓名 + } + + sjgmjzCfzbdao.setColumnValue("kfsj", new Timestamp(his_mzCfallDao.getColumnValueAsLong(i,"YZXZSJ")));//开方时间 + sjgmjzCfzbdao.setColumnValue("hzbsh", his_mzCfallDao.getColumnValueAsString(i,"JZH"));//患者标识号 + sjgmjzCfzbdao.setColumnValue("hzxm",his_mzCfallDao.getColumnValueAsString(i,"XM"));//患者姓名 + sjgmjzCfzbdao.setColumnValue("hzxbdm", his_mzCfallDao.getColumnValueAsString(i,"XB"));//患者性别代码 + sjgmjzCfzbdao.setColumnValue("hzxb", xbdao.getDicValue(his_mzCfallDao.getColumnValueAsString(i,"XB")));//患者性别 + sjgmjzCfzbdao.setColumnValue("hznl", his_mzCfallDao.getColumnValueAsString(i,"JZNL"));//患者年龄 + sjgmjzCfzbdao.setColumnValue("hztz", "");//患者体重 + String yzlb = his_mzCfallDao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_mzCfallDao.getColumnValueAsString(i,"YZZL"); + String fylx = "99"; + String fylxname = "其他"; + + if("01".equals(yzlb)) { + if("01".equals(yzzl)) { + fylx = "01"; + fylxname = "西药"; + }else if ("02".equals(yzzl)) { + fylx = "02"; + fylxname = "中成药"; + }else if ("03".equals(yzzl)) { + fylx = "03"; + fylxname = "中草药"; + } + }else if ("12".equals(yzlb)) { + fylx = "04"; + fylxname = "诊察费"; + }else if ("04".equals(yzlb)) { + fylx = "05"; + fylxname = "检查费"; + }else if ("05".equals(yzlb)) { + fylx = "06"; + fylxname = "检验费"; + }else if ("06".equals(yzlb)) { + fylx = "08"; + fylxname = "治疗费"; + }else if ("08".equals(yzlb)) { + fylx = "09"; + fylxname = "手术费"; + }else if ("10".equals(yzlb)) { + fylx = "10"; + fylxname = "材料费"; + }else if ("09".equals(yzlb)) { + fylx = "13"; + fylxname = "护理费"; + } + + sjgmjzCfzbdao.setColumnValue("fylx", fylx);//费用类型 + sjgmjzCfzbdao.setColumnValue("xyzddm", "");//西医诊断代码 + sjgmjzCfzbdao.setColumnValue("xyzdmc", "");//西医诊断名称 + sjgmjzCfzbdao.setColumnValue("zybmdm", "");//中医病名代码 + sjgmjzCfzbdao.setColumnValue("zybmmc", "");//中医证候名称 + sjgmjzCfzbdao.setColumnValue("zyzhdm", "");//中医证候代码 + sjgmjzCfzbdao.setColumnValue("zyzhmc", "");//中医证候名称 + sjgmjzCfzbdao.setColumnValue("cfje", his_mzCfallDao.getColumnValueAsDouble(i,"YZJE"));//处方金额 + //sjgmjzCfzbdao.setColumnValue("cfyxts", "");//处方有效天数 + sjgmjzCfzbdao.setColumnValue("cfbzxx", "");//处方备注信息 + sjgmjzCfzbdao.setColumnValue("zzzf", "");//治则治法 + sjgmjzCfzbdao.setColumnValue("wdbgjgmc", "");//文档保管的医疗机构名称 + sjgmjzCfzbdao.setColumnValue("wdbgjgdz", "");//文档保管的医疗机构地址 + sjgmjzCfzbdao.setColumnValue("cfshyjsbh", "");//处方审核药剂师编号 + sjgmjzCfzbdao.setColumnValue("cfshyjsqm", "");//处方审核药剂师签名 + sjgmjzCfzbdao.setColumnValue("cftpyjsbh", "");//处方调配药剂师编号 + sjgmjzCfzbdao.setColumnValue("cftpyjsqm", "");//处方调配药剂师签名 + sjgmjzCfzbdao.setColumnValue("cffyyjsbh", "");//处方发药药剂师编号 + sjgmjzCfzbdao.setColumnValue("cffyyjsqm", "");//处方发药药剂师签名 + sjgmjzCfzbdao.setColumnValue("cfhdyjsbh", "");//处方核对药剂师编号 + sjgmjzCfzbdao.setColumnValue("cfhdyjsqm", "");//处方核对药剂师签名 + //sjgmjzCfzbdao.setColumnValue("zyypjsj", "");//中药饮片剂数 + sjgmjzCfzbdao.setColumnValue("zyjzpc", "");//中药饮片煎煮频次 + sjgmjzCfzbdao.setColumnValue("zyypjzf", "");//中药饮片煎煮法 + sjgmjzCfzbdao.setColumnValue("zyypff", "");//中药饮片服法 + sjgmjzCfzbdao.setColumnValue("zyyyff", "");//中药饮片用药方法 + sjgmjzCfzbdao.setColumnValue("zyypcf", "");//中药饮片处方 + sjgmjzCfzbdao.setColumnValue("bz", "无");//备注 + sjgmjzCfzbdao.setColumnValue("xgbz", 0);//修改标志 + sjgmjzCfzbdao.setColumnValue("posid", "");// + sjgmjzCfzbdao.setColumnValue("jlgxsj", "");// + sjgmjzCfzbdao.setColumnValue("llbz", "");// + sjgmjzCfzbdao.setColumnValue("jybz", "");// + + timestamp.setNanos(0); + sjgmjzCfzbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzCfzbdao.commit()){ + System.out.println("====【门急诊处方主表】更新成功=="); + } + } + + + /*4.3.1.4门急诊药品处方明细表*/ + public void sdgMjzcfmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊药品处方明细表 + DxNormalDataManager his_mzYpmxbDao=DaoCreator.getNormalDao("his_mzYpmxbDao"); + his_mzYpmxbDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊药品处方明细表 + DxNormalDataManager sjgmjzypcdmxbdao=DaoCreator.getNormalDao("sjgmjzypcdmxbdao"); + sjgmjzypcdmxbdao=setYwdzSource(sjgmjzypcdmxbdao); + sjgmjzypcdmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao("yyyfDic"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao("dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_mzYpmxbDao.getRowCount(); i++) { + sjgmjzypcdmxbdao.absoluteInSert(); + sjgmjzypcdmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzypcdmxbdao.setColumnValue("cfmxid", his_mzYpmxbDao.getColumnValueAsString(i,"PKEY"));//处方明细ID + sjgmjzypcdmxbdao.setColumnValue("jzlsh", his_mzYpmxbDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzypcdmxbdao.setColumnValue("grbslx", "09");//个人标识类型 09:医疗机构内部患者唯一索引码);//个人标识类型 + sjgmjzypcdmxbdao.setColumnValue("grbsh", his_mzYpmxbDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzypcdmxbdao.setColumnValue("cfzid", his_mzYpmxbDao.getColumnValueAsString(i,"CFH"));//处方主ID + // sjgmjzypcdmxbdao.setColumnValue("cfyzxh", his_mzYpmxbDao.getColumnValueAsString(i,"YZXH"));//处方医嘱序号 + sjgmjzypcdmxbdao.setColumnValue("cfyzzh", his_mzYpmxbDao.getColumnValueAsString(i,"YZTZH"));//处方医嘱组号 + String yzdl = his_mzYpmxbDao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_mzYpmxbDao.getColumnValueAsString(i,"YZZL"); + String zlxmlbbm = "99"; + if("01".equals(yzdl)) { + if("01".equals(yzzl)) { + zlxmlbbm = "01"; + }else if ("02".equals(yzzl)) { + zlxmlbbm = "02"; + }else if ("03".equals(yzzl)) { + zlxmlbbm = "03"; + } + + }else if ("10".equals(yzdl)) { + zlxmlbbm = "04"; + }else if ("05".equals(yzdl)) { + zlxmlbbm = "05"; + }else if ("04".equals(yzdl)) { + zlxmlbbm = "06"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "07"; + }else if ("09".equals(yzdl)) { + zlxmlbbm = "08"; + }else if ("14".equals(yzdl)) { + zlxmlbbm = "09"; + }else if ("06".equals(yzdl)) { + zlxmlbbm = "10"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "11"; + } + sjgmjzypcdmxbdao.setColumnValue("zlxmlbbm", zlxmlbbm);//诊疗项目类别编码 + sjgmjzypcdmxbdao.setColumnValue("xmbm", "");//项目代码 + sjgmjzypcdmxbdao.setColumnValue("xmmc", "");//项目名称 + sjgmjzypcdmxbdao.setColumnValue("xmflbm", "");//项目分类 + sjgmjzypcdmxbdao.setColumnValue("xmflmc", "");//项目分类名称 + + sjgmjzypcdmxbdao.setColumnValue("jxdm", his_mzYpmxbDao.getColumnValueAsString(i,"JX"));//剂型代码 + sjgmjzypcdmxbdao.setColumnValue("ypgg", his_mzYpmxbDao.getColumnValueAsString(i,"GG"));//药品规格 + //sjgmjzypcdmxbdao.setColumnValue("yytjdm", his_mzYpmxbDao.getColumnValueAsString(i,"YBBM"));//用药途径代码 + + //sjgmjzypcdmxbdao.setColumnValue("sypcdm", his_mzYpmxbDao.getColumnValueAsString(i,"PRINTNAME"));//使用频次代码 + sjgmjzypcdmxbdao.setColumnValue("yypc", his_mzYpmxbDao.getColumnValueAsString(i,"MC"));//用药频次 ! + //sjgmjzypcdmxbdao.setColumnValue("sycjl", his_mzYpmxbDao.getColumnValueAsString(i,"YZJL"));//使用次剂量 + sjgmjzypcdmxbdao.setColumnValue("syjldw", dwdicdao.getDicValue(his_mzYpmxbDao.getColumnValueAsString(i,"YZJLDW")));//使用剂量单位 + //sjgmjzypcdmxbdao.setColumnValue("syzjl", "");//使用总剂量 + //sjgmjzypcdmxbdao.setColumnValue("zyyyff", "");//中药用药方法 + sjgmjzypcdmxbdao.setColumnValue("fysl", his_mzYpmxbDao.getColumnValueAsString(i,"YZSL"));//发药数量 + sjgmjzypcdmxbdao.setColumnValue("fysldw", dwdicdao.getDicValue(his_mzYpmxbDao.getColumnValueAsString(i,"YPYZJBDW")));//发药数量单位 + //sjgmjzypcdmxbdao.setColumnValue("yyts", his_mzYpmxbDao.getColumnValueAsString(i,"YZTS"));//用药天数 + //sjgmjzypcdmxbdao.setColumnValue("ywlx", "");//药物类型 + sjgmjzypcdmxbdao.setColumnValue("cfkssj", new Timestamp(his_mzYpmxbDao.getColumnValueAsLong(i,"YZXZSJ")));//处方开始时间 + // sjgmjzypcdmxbdao.setColumnValue("cftzsj", "");//处方停止时间 + sjgmjzypcdmxbdao.setColumnValue("zxksbm", his_mzYpmxbDao.getColumnValueAsString(i,"YZXZKS"));//执行科室编码 + sjgmjzypcdmxbdao.setColumnValue("zxksmc", dpdicdao.getDicValue(his_mzYpmxbDao.getColumnValueAsString(i,"YZXZKS")));//执行科室名称 + + if(jgrydicdao.local("USERACCOUNT", his_mzYpmxbDao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzypcdmxbdao.setColumnValue("zxrbh",jgrydicdao.getColumnValueAsString("YBID"));//处方执行人编号 + sjgmjzypcdmxbdao.setColumnValue("zxrxm", jgrydicdao.getColumnValueAsString("YBNAME"));//处方执行人姓名 + } + sjgmjzypcdmxbdao.setColumnValue("cfzxsj", new Timestamp(his_mzYpmxbDao.getColumnValueAsLong(i,"YZXZSJ")));//处方执行时间 + sjgmjzypcdmxbdao.setColumnValue("bz", "");//备注 + sjgmjzypcdmxbdao.setColumnValue("mj", "");//密级 + String yzsfzt = his_mzYpmxbDao.getColumnValueAsString(i,"YZSFZT"); + String yzcxbz = his_mzYpmxbDao.getColumnValueAsString(i,"YZCXBZ"); + int xgbz = 9; + if("1".equals(yzsfzt)) { + if("0".equals(yzcxbz)) { + xgbz = 0; + }else if ("1".equals(yzcxbz)) { + xgbz = 1; + } + }else{ + xgbz = 0; + } + sjgmjzypcdmxbdao.setColumnValue("xgbz", xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzypcdmxbdao.setColumnValue("crt_tm_zdsc", timestamp);// + } + if(sjgmjzypcdmxbdao.commit()){ + System.out.println("====【门急诊药品处方明细表】更新成功=="); + } + } + + /*4.3.1.5门急诊其他处方明细表*/ + public void sdgMjzQtcfmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊其他处方明细 + DxNormalDataManager his_mzQtmxbDao=DaoCreator.getNormalDao("his_mzQtmxbDao"); + his_mzQtmxbDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊其他处方明细 + DxNormalDataManager sjgmjzqtcfmxbdao=DaoCreator.getNormalDao("sjgmjzqtcfmxbdao"); + sjgmjzqtcfmxbdao=setYwdzSource(sjgmjzqtcfmxbdao); + sjgmjzqtcfmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao("yyyfDic"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao("dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_mzQtmxbDao.getRowCount(); i++) { + sjgmjzqtcfmxbdao.absoluteInSert(); + sjgmjzqtcfmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzqtcfmxbdao.setColumnValue("cfmxid", his_mzQtmxbDao.getColumnValueAsString(i,"PKEY"));//处方明细ID + sjgmjzqtcfmxbdao.setColumnValue("jzlsh", his_mzQtmxbDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzqtcfmxbdao.setColumnValue("grbslx", "09");//个人标识类型 + sjgmjzqtcfmxbdao.setColumnValue("grbsh", his_mzQtmxbDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzqtcfmxbdao.setColumnValue("cfzid", his_mzQtmxbDao.getColumnValueAsString(i,"CFH"));//处方主ID +// sjgmjzqtcfmxbdao.setColumnValue("yzxh", his_mzQtmxbDao.getColumnValueAsString(i,"YZXH"));//处方序号 + sjgmjzqtcfmxbdao.setColumnValue("yzzh", his_mzQtmxbDao.getColumnValueAsString(i,"YZTZH"));//处方组号 + String yzdl = his_mzQtmxbDao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_mzQtmxbDao.getColumnValueAsString(i,"YZZL"); + String zlxmlbbm = "99"; + if("01".equals(yzdl)) { + if("01".equals(yzzl)) { + zlxmlbbm = "01"; + }else if ("02".equals(yzzl)) { + zlxmlbbm = "02"; + }else if ("03".equals(yzzl)) { + zlxmlbbm = "03"; + } + + }else if ("10".equals(yzdl)) { + zlxmlbbm = "04"; + }else if ("05".equals(yzdl)) { + zlxmlbbm = "05"; + }else if ("04".equals(yzdl)) { + zlxmlbbm = "06"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "07"; + }else if ("09".equals(yzdl)) { + zlxmlbbm = "08"; + }else if ("14".equals(yzdl)) { + zlxmlbbm = "09"; + }else if ("06".equals(yzdl)) { + zlxmlbbm = "10"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "11"; + } + sjgmjzqtcfmxbdao.setColumnValue("zlxmlbbm", zlxmlbbm);//诊疗项目类别编码 + sjgmjzqtcfmxbdao.setColumnValue("xmbm", his_mzQtmxbDao.getColumnValueAsString(i,"YZXPKEY"));//项目代码 + sjgmjzqtcfmxbdao.setColumnValue("xmmc", his_mzQtmxbDao.getColumnValueAsString(i,"YZMC"));//项目名称 + sjgmjzqtcfmxbdao.setColumnValue("xmflbm", "");//项目分类代码 + sjgmjzqtcfmxbdao.setColumnValue("xmflmc", "");//项目分类名称 + sjgmjzqtcfmxbdao.setColumnValue("zxpl", "");//执行频率 + sjgmjzqtcfmxbdao.setColumnValue("cjfx", "");//采集方式 + sjgmjzqtcfmxbdao.setColumnValue("cjbb", "");//采集标本 + sjgmjzqtcfmxbdao.setColumnValue("jcbw", "");//检查部位 + sjgmjzqtcfmxbdao.setColumnValue("mzfs", "");//麻醉方式 + sjgmjzqtcfmxbdao.setColumnValue("cfkssj", new Timestamp(his_mzQtmxbDao.getColumnValueAsLong(i,"CJRQ")));//处方开始时间 + sjgmjzqtcfmxbdao.setColumnValue("cftzsj", "");//处方停止时间 + sjgmjzqtcfmxbdao.setColumnValue("zxksbm", "");//执行科室编码 + sjgmjzqtcfmxbdao.setColumnValue("zxksmc", "");//执行科室名称 + if(jgrydicdao.local("USERACCOUNT", his_mzQtmxbDao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzqtcfmxbdao.setColumnValue("zxrbh",jgrydicdao.getColumnValueAsString("YBID"));//处方执行人编号 + sjgmjzqtcfmxbdao.setColumnValue("zxrxm", jgrydicdao.getColumnValueAsString("YBNAME"));//处方执行人姓名 + } + sjgmjzqtcfmxbdao.setColumnValue("zxksbm", his_mzQtmxbDao.getColumnValueAsString(i,"YZXZKS"));//执行科室编码 + sjgmjzqtcfmxbdao.setColumnValue("zxksmc", dpdicdao.getDicValue(his_mzQtmxbDao.getColumnValueAsString(i,"YZXZKS")));//执行科室名称 + sjgmjzqtcfmxbdao.setColumnValue("jzjgmc", "越西县妇幼保健院");//执行科室名称 + sjgmjzqtcfmxbdao.setColumnValue("cfzxsj", new Timestamp(his_mzQtmxbDao.getColumnValueAsLong(i,"CJRQ")));//处方执行时间 + sjgmjzqtcfmxbdao.setColumnValue("wsfwyq", "");//卫生服务要求 + sjgmjzqtcfmxbdao.setColumnValue("qtyxcz", "");//其它医学处置 + sjgmjzqtcfmxbdao.setColumnValue("zzbz", "");//转诊标志 + sjgmjzqtcfmxbdao.setColumnValue("jkwtpg", "");//健康问题评估 + sjgmjzqtcfmxbdao.setColumnValue("jzjgmc", "");//就诊机构名称 + sjgmjzqtcfmxbdao.setColumnValue("zwt", "");//咨询问题 + sjgmjzqtcfmxbdao.setColumnValue("czjh", "");//处置计划 + sjgmjzqtcfmxbdao.setColumnValue("kfcszd", "");//康复措施指导 + sjgmjzqtcfmxbdao.setColumnValue("bz", "");//备注 + sjgmjzqtcfmxbdao.setColumnValue("mj", "");//密级 + String jszt = his_mzQtmxbDao.getColumnValueAsString(i,"JSZT"); + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzqtcfmxbdao.setColumnValue("xgbz", xgbz);//修改标志 + sjgmjzqtcfmxbdao.setColumnValue("posid", "");// + sjgmjzqtcfmxbdao.setColumnValue("jlgxsj", "");// + sjgmjzqtcfmxbdao.setColumnValue("llbz", "");// + sjgmjzqtcfmxbdao.setColumnValue("jybz", "");// + timestamp.setNanos(0); + sjgmjzqtcfmxbdao.setColumnValue("crt_tm_zdsc", timestamp);// + + } + if(sjgmjzqtcfmxbdao.commit()){ + System.out.println("====【门急诊其他处方明细表】更新成功=="); + } + } + + /*4.3.1.6门急诊费用明细表 */ + public void sdgMjzFymxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊费用明细表 + DxNormalDataManager his_sjgmjzfymxbdao=DaoCreator.getNormalDao("his_sjgmjzfymxbdao"); + his_sjgmjzfymxbdao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊费用明细表 + DxNormalDataManager sjgmjzfymxbdao=DaoCreator.getNormalDao("sjgmjzfymxbdao"); + sjgmjzfymxbdao=setYwdzSource(sjgmjzfymxbdao); + sjgmjzfymxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao("yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao("ksdic"); + ksdic.setNormalParameters(new Object[]{companyid}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao("dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_sjgmjzfymxbdao.getRowCount(); i++) { + sjgmjzfymxbdao.absoluteInSert(); + sjgmjzfymxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + if("660928538879070208".equals(his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFMXPKEY"))) { + System.err.println("==========="); + } + sjgmjzfymxbdao.setColumnValue("sfmxid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFMXPKEY"));//收费明细ID + sjgmjzfymxbdao.setColumnValue("grbslx", "09");//个人标识类型 + sjgmjzfymxbdao.setColumnValue("grbsh", his_sjgmjzfymxbdao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzfymxbdao.setColumnValue("YNLSH", his_sjgmjzfymxbdao.getColumnValueAsString(i,"JZPKEY"));//院内流水号 + sjgmjzfymxbdao.setColumnValue("jzlsh", his_sjgmjzfymxbdao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzfymxbdao.setColumnValue("btfmxid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"HCDJPKEY"));//被退费明细ID + String ishc = his_sjgmjzfymxbdao.getColumnValueAsString(i,"ISHC"); + String jszt = his_sjgmjzfymxbdao.getColumnValueAsString(i,"JSZT"); + String tfbz = "1"; + if("3".equals(jszt) && Delphi.isNullString(his_sjgmjzfymxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "3"; + }else if ("3".equals(jszt) && !Delphi.isNullString(his_sjgmjzfymxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "2"; + } + sjgmjzfymxbdao.setColumnValue("tfbz", tfbz);//退费标志 + String sfcjbm = "2"; + if("M".equals(his_sjgmjzfymxbdao.getColumnValueAsString(i,"ZDJFLX")) ) { + sfcjbm = "2"; + }else if ("G".equals(his_sjgmjzfymxbdao.getColumnValueAsString(i,"ZDJFLX")) ){ + sfcjbm = "1"; + } + sjgmjzfymxbdao.setColumnValue("sfcjbm", sfcjbm);//收费场景代码 + sjgmjzfymxbdao.setColumnValue("yzmxid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZMX"));//处方明细ID + String yzdl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZZL"); + String zlxmlbbm = "99"; + if("01".equals(yzdl)) { + if("01".equals(yzzl)) { + zlxmlbbm = "01"; + }else if ("02".equals(yzzl)) { + zlxmlbbm = "02"; + }else if ("03".equals(yzzl)) { + zlxmlbbm = "03"; + } + + }else if ("10".equals(yzdl)) { + zlxmlbbm = "04"; + }else if ("05".equals(yzdl)) { + zlxmlbbm = "05"; + }else if ("04".equals(yzdl)) { + zlxmlbbm = "06"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "07"; + }else if ("09".equals(yzdl)) { + zlxmlbbm = "08"; + }else if ("14".equals(yzdl)) { + zlxmlbbm = "09"; + }else if ("06".equals(yzdl)) { + zlxmlbbm = "10"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "11"; + } + sjgmjzfymxbdao.setColumnValue("sfxmlbbm", zlxmlbbm);//收费项目类别代码 + + String his_fyzl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"FYZL"); + String fydl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"FYDL"); + String fylx = "99"; + String fylxname = "其他"; + if("01".equals(fydl)) { + if("01".equals(his_fyzl)) { + fylx = "01"; + fylxname = "西药"; + }else if ("02".equals(his_fyzl)) { + fylx = "02"; + fylxname = "中成药"; + }else if ("03".equals(his_fyzl)) { + fylx = "03"; + fylxname = "中草药"; + } + }else if ("10".equals(fydl)) { + fylx = "04"; + fylxname = "诊察费"; + }else if ("03".equals(fydl)) { + fylx = "05"; + fylxname = "检查费"; + }else if ("04".equals(fydl)) { + fylx = "06"; + fylxname = "检验费"; + }else if ("05".equals(fydl)) { + fylx = "08"; + fylxname = "治疗费"; + }else if ("06".equals(fydl)) { + fylx = "09"; + fylxname = "手术费"; + }else if ("02".equals(fydl)) { + fylx = "10"; + fylxname = "材料费"; + }else if ("19".equals(fydl)) { + fylx = "11"; + fylxname = "麻醉费"; + }else if ("07".equals(fydl)) { + fylx = "13"; + fylxname = "护理费"; + }else if ("16".equals(fydl)) { + fylx = "14"; + fylxname = "抢救费"; + }else if ("17".equals(fydl)) { + fylx = "16"; + fylxname = "床位费"; + }else if ("15".equals(fydl)) { + fylx = "17"; + fylxname = "输氧费"; + } + sjgmjzfymxbdao.setColumnValue("fysrglbm", fylx);//费用收入归类代码 + sjgmjzfymxbdao.setColumnValue("fysrglmc", fylxname);//费用收入归类名称 + sjgmjzfymxbdao.setColumnValue("fyfssj", new Timestamp(his_sjgmjzfymxbdao.getColumnValueAsLong(i,"JFRQ")));//费用发生时间 + sjgmjzfymxbdao.setColumnValue("syjsid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"ZDZBPKEY"));//费用结算ID + sjgmjzfymxbdao.setColumnValue("sfjssj", new Timestamp(his_sjgmjzfymxbdao.getColumnValueAsLong(i,"JSSJ")));//费用结算时间 + sjgmjzfymxbdao.setColumnValue("kdksbm", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZKS"));//开单科室编码 + sjgmjzfymxbdao.setColumnValue("kdksmc", ksdic.getDicValue(his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZKS")));//开单科室名称 + + + if(jgrydicdao.local("USERACCOUNT", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzfymxbdao.setColumnValue("kdysbh",jgrydicdao.getColumnValueAsString("YBID"));//开单医生编号 + sjgmjzfymxbdao.setColumnValue("kdysxm", jgrydicdao.getColumnValueAsString("YBNAME"));//开单医生姓名 +// sdgghmxbdao.setColumnValue("GHYSSFZHM", jgrydicdao.getColumnValueAsString("IDENTITYID"));//挂号医生身份证号码 + }else { + if("1".equals(sfcjbm)) { + sjgmjzfymxbdao.setColumnValue("kdysbh","挂号费用");//开单医生编号 + sjgmjzfymxbdao.setColumnValue("kdysxm", "挂号费用");//开单医生姓名 + }else { + sjgmjzfymxbdao.setColumnValue("kdysbh","");//开单医生编号 + sjgmjzfymxbdao.setColumnValue("kdysxm", "");//开单医生姓名 + } + } + if(Delphi.isNullString(his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZKS") )) { + sjgmjzfymxbdao.setColumnValue("kdksbm", "挂号科室编码"); + sjgmjzfymxbdao.setColumnValue("kdksmc", "挂号科室"); + } + sjgmjzfymxbdao.setColumnValue("zxksbm", "");//执行科室编码 非 + sjgmjzfymxbdao.setColumnValue("zxksmc", "");//执行科室名称 非 + sjgmjzfymxbdao.setColumnValue("zxrybh", "");//执行人员编号 非 + sjgmjzfymxbdao.setColumnValue("zxryxm", "");//执行人员姓名 非 + sjgmjzfymxbdao.setColumnValue("mxxmbm", "");//明细项目代码 + sjgmjzfymxbdao.setColumnValue("mxxmmc", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZMC"));//明细项目名称 + + sjgmjzfymxbdao.setColumnValue("mxxmdw", dwdicdao.getDicValue(his_sjgmjzfymxbdao.getColumnValueAsString(i,"YPYZJBDW")));//明细项目单位 + sjgmjzfymxbdao.setColumnValue("mxxmdj", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXDJ"));//明细项目单价 非 + sjgmjzfymxbdao.setColumnValue("xmflbm", "");//项目分类代码 非 + sjgmjzfymxbdao.setColumnValue("xmflmc", "");//项目分类名称 非 + sjgmjzfymxbdao.setColumnValue("mxxmsl", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXSL"));//明细项目数量 非 + sjgmjzfymxbdao.setColumnValue("mxxmysje", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXZFY"));//明细项目应收金额 + sjgmjzfymxbdao.setColumnValue("mxxmssje", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXSJZFY"));//明细项目实收金额 + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzfymxbdao.setColumnValue("xgbz", xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzfymxbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzfymxbdao.commit()){ + System.out.println("====【门急诊费用明细表】更新成功=="); + } + } + + /*4.3.1.7门急诊结算明细表*/ + public void sdgMjzJsmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊结算明细表 + DxNormalDataManager his_sjgmjzJsmxbdao=DaoCreator.getNormalDao("his_sjgmjzJsmxbdao"); + his_sjgmjzJsmxbdao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊结算明细表 + DxNormalDataManager sjgmjzjsmxbdao=DaoCreator.getNormalDao("sjgmjzjsmxbdao"); + sjgmjzjsmxbdao=setYwdzSource(sjgmjzjsmxbdao); + sjgmjzjsmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao("yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao("ksdic"); + ksdic.setNormalParameters(new Object[]{companyid}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao("dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + + for (int i = 0; i < his_sjgmjzJsmxbdao.getRowCount(); i++) { + sjgmjzjsmxbdao.absoluteInSert(); + sjgmjzjsmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzjsmxbdao.setColumnValue("jsjlid", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"PKEY"));//结算记录ID + sjgmjzjsmxbdao.setColumnValue("grbslx", "09");//个人标识类型 + sjgmjzjsmxbdao.setColumnValue("grbsh", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzjsmxbdao.setColumnValue("jzlsh", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzjsmxbdao.setColumnValue("jsfph", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"FPHM"));//结算发票号 + + String ishc = his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ISHC"); + String jszt = his_sjgmjzJsmxbdao.getColumnValueAsString(i,"JSZT"); + String tfbz = "1"; + if("3".equals(jszt) && Delphi.isNullString(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "3"; + }else if ("3".equals(jszt) && !Delphi.isNullString(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "2"; + } + //sjgmjzjsmxbdao.setColumnValue("tfbz", tfbz);//退费标志 + String sfcjbm = "2"; + if("M".equals(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ZDJFLX")) ) { + sfcjbm = "2"; + }else if ("G".equals(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ZDJFLX")) ){ + sfcjbm = "1"; + } + sjgmjzjsmxbdao.setColumnValue("sfcjbm", sfcjbm);//收费场景代码 + sjgmjzjsmxbdao.setColumnValue("jlsfzt", tfbz);//记录收费状态 + sjgmjzjsmxbdao.setColumnValue("fyjssj",new Timestamp(his_sjgmjzJsmxbdao.getColumnValueAsLong(i,"JSSJ")));//费用结算时间 + sjgmjzjsmxbdao.setColumnValue("hzlysx","99" );//患者来源属性 99.其他 + String zflx =his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ZFLX"); + String ylfffsdm = "99"; +// if("1".equals(zflx)) { +// ylfffsdm = "01"; +// }else if ("2".equals(zflx) || "3".equals(zflx) || "4".equals(zflx)) { +// ylfffsdm = "09"; +// }else if ("99".equals(zflx)) { +// ylfffsdm = "06"; +// }else if ("100".equals(zflx)) { +// ylfffsdm = "07"; +// } + sjgmjzjsmxbdao.setColumnValue("ylfffsdm", ylfffsdm);//医疗付费方式代码 + sjgmjzjsmxbdao.setColumnValue("fyjszje", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"JFZJE"));//费用结算总金额 + //sjgmjzjsmxbdao.setColumnValue("grcdfyje", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HZPAYSELF"));//个人承担费用金额 + + + sjgmjzjsmxbdao.setColumnValue("jsrybh", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"SFRY"));//结算人员编号 + sjgmjzjsmxbdao.setColumnValue("jsryxm", jgrydicdao.getDicValue(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"SFRY")));//结算人员姓名 + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzjsmxbdao.setColumnValue("xgbz", xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzjsmxbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzjsmxbdao.commit()){ + System.out.println("====【门急诊结算明细表】更新成功=="); + } + } + + /*4.3.1.8门急诊结算支付方式明细表*/ + public void sdgMjzJsZffsmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊结算支付方式明细表 + DxNormalDataManager his_sjgmjzjszffsmxbdao=DaoCreator.getNormalDao("his_sjgmjzjszffsmxbdao"); + his_sjgmjzjszffsmxbdao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊结算支付方式明细表 + DxNormalDataManager sjgmjzjszffsmxbdao=DaoCreator.getNormalDao("sjgmjzjszffsmxbdao"); + sjgmjzjszffsmxbdao=setYwdzSource(sjgmjzjszffsmxbdao); + sjgmjzjszffsmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao("yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao("ksdic"); + ksdic.setNormalParameters(new Object[]{companyid}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao("dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_sjgmjzjszffsmxbdao.getRowCount(); i++) { + sjgmjzjszffsmxbdao.absoluteInSert(); + sjgmjzjszffsmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzjszffsmxbdao.setColumnValue("zffsjlid",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"ZFFSID"));//支付方式记录ID + sjgmjzjszffsmxbdao.setColumnValue("grbslx","09");//个人标识类型 + sjgmjzjszffsmxbdao.setColumnValue("grbsh",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzjszffsmxbdao.setColumnValue("jzlsh",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzjszffsmxbdao.setColumnValue("jsjlid",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"GLZDBPKEY"));//结算记录ID + String pjzt = his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"PJZT"); + String jlsfzt = "1"; + if("3".equals(pjzt)) { + jlsfzt = "2"; + } + sjgmjzjszffsmxbdao.setColumnValue("jlsfzt",jlsfzt);//记录收费状态 + String zflx =his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"ZFLX"); + String ylfffsdm = "99"; + if("1".equals(zflx)) { + ylfffsdm = "01"; + }else if ("2".equals(zflx) || "3".equals(zflx) || "4".equals(zflx)) { + ylfffsdm = "09"; + }else if ("99".equals(zflx)) { + ylfffsdm = "06"; + }else if ("100".equals(zflx)) { + ylfffsdm = "07"; + } + sjgmjzjszffsmxbdao.setColumnValue("zffsdm",ylfffsdm);//支付方式代码 + sjgmjzjszffsmxbdao.setColumnValue("zffsje",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"ZFJE"));//支付金额 + sjgmjzjszffsmxbdao.setColumnValue("fyjssj",new Timestamp(his_sjgmjzjszffsmxbdao.getColumnValueAsLong(i,"SFRQ")));//费用结算时间 + sjgmjzjszffsmxbdao.setColumnValue("jsrybh",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"SFRY"));//结算人员编号 + sjgmjzjszffsmxbdao.setColumnValue("jsryxm",jgrydicdao.getDicValue(his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"SFRY")));//结算人员姓名 + String jszt = his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"JSZT"); + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzjszffsmxbdao.setColumnValue("xgbz",xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzjszffsmxbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzjszffsmxbdao.commit()){ + System.out.println("====【门急诊结算支付方式明细表】更新成功=="); + } + } + + /*4.3.1.9门急诊诊断明细表*/ + public void sdgMjzZdmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊诊断明细表 + DxNormalDataManager sjgmjzjzmxbdao_his=DaoCreator.getNormalDao("his_sjgmjzzdmxbdao"); + sjgmjzjzmxbdao_his.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊诊断明细表 + DxNormalDataManager sjgmjzzdmxbdao=DaoCreator.getNormalDao("sjgmjzzdmxbdao"); + sjgmjzzdmxbdao=setYwdzSource(sjgmjzzdmxbdao); + sjgmjzzdmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{companyid}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{companyid}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{companyid}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao("yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao("ksdic"); + ksdic.setNormalParameters(new Object[]{companyid}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao("dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i 0) { + jbmc = ""; + jbbm = ""; + for (int j = 0; j < gzzMzQtjbzdDao.getRowCount(); j++) { + jbmc += gzzMzQtjbzdDao.getColumnValueAsString(j,"JBMC"); + jbbm += gzzMzQtjbzdDao.getColumnValueAsString(j,"JBBM"); + if(j < gzzMzQtjbzdDao.getRowCount()-1) { + jbmc += ";"; + jbbm += ";"; + } + } + } + sjgmjzjzmxbdao.setColumnValue("mzzzmc",jbmc);//门诊症状-名称 + sjgmjzjzmxbdao.setColumnValue("mzzzzddm",jbbm);//门诊症状- 诊断代码 + sjgmjzjzmxbdao.setColumnValue("lggc",sjgmjzjzmxbdao_his.getColumnValueAsString(i,"ISLG"));//留观观察 + sjgmjzjzmxbdao.setColumnValue("zzms","");//症状描述 + // sjgmjzjzmxbdao.setColumnValue("fbrqsj","");//发病日期时间 + //sjgmjzjzmxbdao.setColumnValue("ssy","");//收缩压 + //sjgmjzjzmxbdao.setColumnValue("szy","");//舒张压 + //sjgmjzjzmxbdao.setColumnValue("tw","");//体温 + sjgmjzjzmxbdao.setColumnValue("zzcxsj","");//症状持续时间 + sjgmjzjzmxbdao.setColumnValue("xgbz",0);//修改标志 + sjgmjzjzmxbdao.setColumnValue("mj","");//密级 + Timestamp timestamp = new Timestamp(datatime); + timestamp.setNanos(0); + sjgmjzjzmxbdao.setColumnValue("crt_tm_zdsc",timestamp);//数据上传时间 + } + + if(sjgmjzjzmxbdao.commit()){ + System.out.println("====【门急诊就诊明细表】更新成功=="); + } + } + + /*4.3.1.3门急诊处方主表*/ + public void sdgMjzcfzbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊处方主表 + DxNormalDataManager his_mzCfallDao=DaoCreator.getNormalDao("his_mzCfallDao"); + his_mzCfallDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊处方主表 + DxNormalDataManager sjgmjzCfzbdao=DaoCreator.getNormalDao("sjgmjzCfzbdao"); + sjgmjzCfzbdao=setYwdzSource(sjgmjzCfzbdao); + sjgmjzCfzbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxDataManager xbdao = DaoCreator.getNormalDao(this,"xbdao"); + xbdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_mzCfallDao.getRowCount(); i++) { + sjgmjzCfzbdao.absoluteInSert(); + sjgmjzCfzbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzCfzbdao.setColumnValue("cfzid",his_mzCfallDao.getColumnValueAsString(i,"CFH"));//处方主ID + sjgmjzCfzbdao.setColumnValue("jzlsh",his_mzCfallDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzCfzbdao.setColumnValue("grbslx", "09");//个人标识类型 09:医疗机构内部患者唯一索引码 + sjgmjzCfzbdao.setColumnValue("grbsh", his_mzCfallDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzCfzbdao.setColumnValue("mjzh", his_mzCfallDao.getColumnValueAsString(i,"JZH"));//门(急)诊号 + String cfdl = "99"; + String cfh = his_mzCfallDao.getColumnValueAsString(i,"CFH"); + if(cfh.startsWith("D")) { + cfdl = "01"; + }else if (cfh.startsWith("S")) { + cfdl = "02"; + } +// else if ("05".equals(yzdl)) { +// cfdl = "02"; +// }else if ("08".equals(yzdl)) { +// cfdl = "04"; +// } + sjgmjzCfzbdao.setColumnValue("cfdl", cfdl);//处方大类 + String cflx = "99"; + if(cfh.startsWith("D")) { + cflx = "01"; + }else if (cfh.startsWith("J")) { + cflx = "04"; + } + sjgmjzCfzbdao.setColumnValue("cflx", cflx);//处方类型 + + sjgmjzCfzbdao.setColumnValue("cfhm", his_mzCfallDao.getColumnValueAsString(i,"CFH"));//处方号码 + + String yzxzks = his_mzCfallDao.getColumnValueAsString(i,"YZXZKS"); + String yzxzksname = dpdicdao.getDicValue(his_mzCfallDao.getColumnValueAsString(i,"YZXZKS")); + sjgmjzCfzbdao.setColumnValue("kfksdm", yzxzks);//开方科室代码 + sjgmjzCfzbdao.setColumnValue("kfksmc", yzxzksname);//开方科室名称 + + if(jgrydicdao.local("USERACCOUNT", his_mzCfallDao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzCfzbdao.setColumnValue("kfysbh",jgrydicdao.getColumnValueAsString("YBID"));//开方医生编号 + sjgmjzCfzbdao.setColumnValue("kfysxm", jgrydicdao.getColumnValueAsString("YBNAME"));//开方医生姓名 + } + + sjgmjzCfzbdao.setColumnValue("kfsj", new Timestamp(his_mzCfallDao.getColumnValueAsLong(i,"YZXZSJ")));//开方时间 + sjgmjzCfzbdao.setColumnValue("hzbsh", his_mzCfallDao.getColumnValueAsString(i,"JZH"));//患者标识号 + sjgmjzCfzbdao.setColumnValue("hzxm",his_mzCfallDao.getColumnValueAsString(i,"XM"));//患者姓名 + sjgmjzCfzbdao.setColumnValue("hzxbdm", his_mzCfallDao.getColumnValueAsString(i,"XB"));//患者性别代码 + sjgmjzCfzbdao.setColumnValue("hzxb", xbdao.getDicValue(his_mzCfallDao.getColumnValueAsString(i,"XB")));//患者性别 + sjgmjzCfzbdao.setColumnValue("hznl", his_mzCfallDao.getColumnValueAsString(i,"JZNL"));//患者年龄 + sjgmjzCfzbdao.setColumnValue("hztz", "");//患者体重 + String yzlb = his_mzCfallDao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_mzCfallDao.getColumnValueAsString(i,"YZZL"); + String fylx = "99"; + String fylxname = "其他"; + + if("01".equals(yzlb)) { + if("01".equals(yzzl)) { + fylx = "01"; + fylxname = "西药"; + }else if ("02".equals(yzzl)) { + fylx = "02"; + fylxname = "中成药"; + }else if ("03".equals(yzzl)) { + fylx = "03"; + fylxname = "中草药"; + } + }else if ("12".equals(yzlb)) { + fylx = "04"; + fylxname = "诊察费"; + }else if ("04".equals(yzlb)) { + fylx = "05"; + fylxname = "检查费"; + }else if ("05".equals(yzlb)) { + fylx = "06"; + fylxname = "检验费"; + }else if ("06".equals(yzlb)) { + fylx = "08"; + fylxname = "治疗费"; + }else if ("08".equals(yzlb)) { + fylx = "09"; + fylxname = "手术费"; + }else if ("10".equals(yzlb)) { + fylx = "10"; + fylxname = "材料费"; + }else if ("09".equals(yzlb)) { + fylx = "13"; + fylxname = "护理费"; + } + + sjgmjzCfzbdao.setColumnValue("fylx", fylx);//费用类型 + sjgmjzCfzbdao.setColumnValue("xyzddm", "");//西医诊断代码 + sjgmjzCfzbdao.setColumnValue("xyzdmc", "");//西医诊断名称 + sjgmjzCfzbdao.setColumnValue("zybmdm", "");//中医病名代码 + sjgmjzCfzbdao.setColumnValue("zybmmc", "");//中医证候名称 + sjgmjzCfzbdao.setColumnValue("zyzhdm", "");//中医证候代码 + sjgmjzCfzbdao.setColumnValue("zyzhmc", "");//中医证候名称 + sjgmjzCfzbdao.setColumnValue("cfje", his_mzCfallDao.getColumnValueAsDouble(i,"YZJE"));//处方金额 + //sjgmjzCfzbdao.setColumnValue("cfyxts", "");//处方有效天数 + sjgmjzCfzbdao.setColumnValue("cfbzxx", "");//处方备注信息 + sjgmjzCfzbdao.setColumnValue("zzzf", "");//治则治法 + sjgmjzCfzbdao.setColumnValue("wdbgjgmc", "");//文档保管的医疗机构名称 + sjgmjzCfzbdao.setColumnValue("wdbgjgdz", "");//文档保管的医疗机构地址 + sjgmjzCfzbdao.setColumnValue("cfshyjsbh", "");//处方审核药剂师编号 + sjgmjzCfzbdao.setColumnValue("cfshyjsqm", "");//处方审核药剂师签名 + sjgmjzCfzbdao.setColumnValue("cftpyjsbh", "");//处方调配药剂师编号 + sjgmjzCfzbdao.setColumnValue("cftpyjsqm", "");//处方调配药剂师签名 + sjgmjzCfzbdao.setColumnValue("cffyyjsbh", "");//处方发药药剂师编号 + sjgmjzCfzbdao.setColumnValue("cffyyjsqm", "");//处方发药药剂师签名 + sjgmjzCfzbdao.setColumnValue("cfhdyjsbh", "");//处方核对药剂师编号 + sjgmjzCfzbdao.setColumnValue("cfhdyjsqm", "");//处方核对药剂师签名 + //sjgmjzCfzbdao.setColumnValue("zyypjsj", "");//中药饮片剂数 + sjgmjzCfzbdao.setColumnValue("zyjzpc", "");//中药饮片煎煮频次 + sjgmjzCfzbdao.setColumnValue("zyypjzf", "");//中药饮片煎煮法 + sjgmjzCfzbdao.setColumnValue("zyypff", "");//中药饮片服法 + sjgmjzCfzbdao.setColumnValue("zyyyff", "");//中药饮片用药方法 + sjgmjzCfzbdao.setColumnValue("zyypcf", "");//中药饮片处方 + sjgmjzCfzbdao.setColumnValue("bz", "无");//备注 + sjgmjzCfzbdao.setColumnValue("xgbz", 0);//修改标志 + sjgmjzCfzbdao.setColumnValue("posid", "");// + sjgmjzCfzbdao.setColumnValue("jlgxsj", "");// + sjgmjzCfzbdao.setColumnValue("llbz", "");// + sjgmjzCfzbdao.setColumnValue("jybz", "");// + + timestamp.setNanos(0); + sjgmjzCfzbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzCfzbdao.commit()){ + System.out.println("====【门急诊处方主表】更新成功=="); + } + } + + + /*4.3.1.4门急诊药品处方明细表*/ + public void sdgMjzcfmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊药品处方明细表 + DxNormalDataManager his_mzYpmxbDao=DaoCreator.getNormalDao("his_mzYpmxbDao"); + his_mzYpmxbDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊药品处方明细表 + DxNormalDataManager sjgmjzypcdmxbdao=DaoCreator.getNormalDao("sjgmjzypcdmxbdao"); + sjgmjzypcdmxbdao=setYwdzSource(sjgmjzypcdmxbdao); + sjgmjzypcdmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao(this,"yyyfDic"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao(this,"dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_mzYpmxbDao.getRowCount(); i++) { + sjgmjzypcdmxbdao.absoluteInSert(); + sjgmjzypcdmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzypcdmxbdao.setColumnValue("cfmxid", his_mzYpmxbDao.getColumnValueAsString(i,"PKEY"));//处方明细ID + sjgmjzypcdmxbdao.setColumnValue("jzlsh", his_mzYpmxbDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzypcdmxbdao.setColumnValue("grbslx", "09");//个人标识类型 09:医疗机构内部患者唯一索引码);//个人标识类型 + sjgmjzypcdmxbdao.setColumnValue("grbsh", his_mzYpmxbDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzypcdmxbdao.setColumnValue("cfzid", his_mzYpmxbDao.getColumnValueAsString(i,"CFH"));//处方主ID + // sjgmjzypcdmxbdao.setColumnValue("cfyzxh", his_mzYpmxbDao.getColumnValueAsString(i,"YZXH"));//处方医嘱序号 + sjgmjzypcdmxbdao.setColumnValue("cfyzzh", his_mzYpmxbDao.getColumnValueAsString(i,"YZTZH"));//处方医嘱组号 + String yzdl = his_mzYpmxbDao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_mzYpmxbDao.getColumnValueAsString(i,"YZZL"); + String zlxmlbbm = "99"; + if("01".equals(yzdl)) { + if("01".equals(yzzl)) { + zlxmlbbm = "01"; + }else if ("02".equals(yzzl)) { + zlxmlbbm = "02"; + }else if ("03".equals(yzzl)) { + zlxmlbbm = "03"; + } + + }else if ("10".equals(yzdl)) { + zlxmlbbm = "04"; + }else if ("05".equals(yzdl)) { + zlxmlbbm = "05"; + }else if ("04".equals(yzdl)) { + zlxmlbbm = "06"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "07"; + }else if ("09".equals(yzdl)) { + zlxmlbbm = "08"; + }else if ("14".equals(yzdl)) { + zlxmlbbm = "09"; + }else if ("06".equals(yzdl)) { + zlxmlbbm = "10"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "11"; + } + sjgmjzypcdmxbdao.setColumnValue("zlxmlbbm", zlxmlbbm);//诊疗项目类别编码 + sjgmjzypcdmxbdao.setColumnValue("xmbm", "");//项目代码 + sjgmjzypcdmxbdao.setColumnValue("xmmc", "");//项目名称 + sjgmjzypcdmxbdao.setColumnValue("xmflbm", "");//项目分类 + sjgmjzypcdmxbdao.setColumnValue("xmflmc", "");//项目分类名称 + + sjgmjzypcdmxbdao.setColumnValue("jxdm", his_mzYpmxbDao.getColumnValueAsString(i,"JX"));//剂型代码 + sjgmjzypcdmxbdao.setColumnValue("ypgg", his_mzYpmxbDao.getColumnValueAsString(i,"GG"));//药品规格 + //sjgmjzypcdmxbdao.setColumnValue("yytjdm", his_mzYpmxbDao.getColumnValueAsString(i,"YBBM"));//用药途径代码 + + //sjgmjzypcdmxbdao.setColumnValue("sypcdm", his_mzYpmxbDao.getColumnValueAsString(i,"PRINTNAME"));//使用频次代码 + sjgmjzypcdmxbdao.setColumnValue("yypc", his_mzYpmxbDao.getColumnValueAsString(i,"MC"));//用药频次 ! + //sjgmjzypcdmxbdao.setColumnValue("sycjl", his_mzYpmxbDao.getColumnValueAsString(i,"YZJL"));//使用次剂量 + sjgmjzypcdmxbdao.setColumnValue("syjldw", dwdicdao.getDicValue(his_mzYpmxbDao.getColumnValueAsString(i,"YZJLDW")));//使用剂量单位 + //sjgmjzypcdmxbdao.setColumnValue("syzjl", "");//使用总剂量 + //sjgmjzypcdmxbdao.setColumnValue("zyyyff", "");//中药用药方法 + sjgmjzypcdmxbdao.setColumnValue("fysl", his_mzYpmxbDao.getColumnValueAsString(i,"YZSL"));//发药数量 + sjgmjzypcdmxbdao.setColumnValue("fysldw", dwdicdao.getDicValue(his_mzYpmxbDao.getColumnValueAsString(i,"YPYZJBDW")));//发药数量单位 + //sjgmjzypcdmxbdao.setColumnValue("yyts", his_mzYpmxbDao.getColumnValueAsString(i,"YZTS"));//用药天数 + //sjgmjzypcdmxbdao.setColumnValue("ywlx", "");//药物类型 + sjgmjzypcdmxbdao.setColumnValue("cfkssj", new Timestamp(his_mzYpmxbDao.getColumnValueAsLong(i,"YZXZSJ")));//处方开始时间 + // sjgmjzypcdmxbdao.setColumnValue("cftzsj", "");//处方停止时间 + sjgmjzypcdmxbdao.setColumnValue("zxksbm", his_mzYpmxbDao.getColumnValueAsString(i,"YZXZKS"));//执行科室编码 + sjgmjzypcdmxbdao.setColumnValue("zxksmc", dpdicdao.getDicValue(his_mzYpmxbDao.getColumnValueAsString(i,"YZXZKS")));//执行科室名称 + + if(jgrydicdao.local("USERACCOUNT", his_mzYpmxbDao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzypcdmxbdao.setColumnValue("zxrbh",jgrydicdao.getColumnValueAsString("YBID"));//处方执行人编号 + sjgmjzypcdmxbdao.setColumnValue("zxrxm", jgrydicdao.getColumnValueAsString("YBNAME"));//处方执行人姓名 + } + sjgmjzypcdmxbdao.setColumnValue("cfzxsj", new Timestamp(his_mzYpmxbDao.getColumnValueAsLong(i,"YZXZSJ")));//处方执行时间 + sjgmjzypcdmxbdao.setColumnValue("bz", "");//备注 + sjgmjzypcdmxbdao.setColumnValue("mj", "");//密级 + String yzsfzt = his_mzYpmxbDao.getColumnValueAsString(i,"YZSFZT"); + String yzcxbz = his_mzYpmxbDao.getColumnValueAsString(i,"YZCXBZ"); + int xgbz = 9; + if("1".equals(yzsfzt)) { + if("0".equals(yzcxbz)) { + xgbz = 0; + }else if ("1".equals(yzcxbz)) { + xgbz = 1; + } + }else{ + xgbz = 0; + } + sjgmjzypcdmxbdao.setColumnValue("xgbz", xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzypcdmxbdao.setColumnValue("crt_tm_zdsc", timestamp);// + } + if(sjgmjzypcdmxbdao.commit()){ + System.out.println("====【门急诊药品处方明细表】更新成功=="); + } + } + + /*4.3.1.5门急诊其他处方明细表*/ + public void sdgMjzQtcfmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊其他处方明细 + DxNormalDataManager his_mzQtmxbDao=DaoCreator.getNormalDao("his_mzQtmxbDao"); + his_mzQtmxbDao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊其他处方明细 + DxNormalDataManager sjgmjzqtcfmxbdao=DaoCreator.getNormalDao("sjgmjzqtcfmxbdao"); + sjgmjzqtcfmxbdao=setYwdzSource(sjgmjzqtcfmxbdao); + sjgmjzqtcfmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao(this,"yyyfDic"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao(this,"dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_mzQtmxbDao.getRowCount(); i++) { + sjgmjzqtcfmxbdao.absoluteInSert(); + sjgmjzqtcfmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzqtcfmxbdao.setColumnValue("cfmxid", his_mzQtmxbDao.getColumnValueAsString(i,"PKEY"));//处方明细ID + sjgmjzqtcfmxbdao.setColumnValue("jzlsh", his_mzQtmxbDao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzqtcfmxbdao.setColumnValue("grbslx", "09");//个人标识类型 + sjgmjzqtcfmxbdao.setColumnValue("grbsh", his_mzQtmxbDao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzqtcfmxbdao.setColumnValue("cfzid", his_mzQtmxbDao.getColumnValueAsString(i,"CFH"));//处方主ID +// sjgmjzqtcfmxbdao.setColumnValue("yzxh", his_mzQtmxbDao.getColumnValueAsString(i,"YZXH"));//处方序号 + sjgmjzqtcfmxbdao.setColumnValue("yzzh", his_mzQtmxbDao.getColumnValueAsString(i,"YZTZH"));//处方组号 + String yzdl = his_mzQtmxbDao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_mzQtmxbDao.getColumnValueAsString(i,"YZZL"); + String zlxmlbbm = "99"; + if("01".equals(yzdl)) { + if("01".equals(yzzl)) { + zlxmlbbm = "01"; + }else if ("02".equals(yzzl)) { + zlxmlbbm = "02"; + }else if ("03".equals(yzzl)) { + zlxmlbbm = "03"; + } + + }else if ("10".equals(yzdl)) { + zlxmlbbm = "04"; + }else if ("05".equals(yzdl)) { + zlxmlbbm = "05"; + }else if ("04".equals(yzdl)) { + zlxmlbbm = "06"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "07"; + }else if ("09".equals(yzdl)) { + zlxmlbbm = "08"; + }else if ("14".equals(yzdl)) { + zlxmlbbm = "09"; + }else if ("06".equals(yzdl)) { + zlxmlbbm = "10"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "11"; + } + sjgmjzqtcfmxbdao.setColumnValue("zlxmlbbm", zlxmlbbm);//诊疗项目类别编码 + sjgmjzqtcfmxbdao.setColumnValue("xmbm", his_mzQtmxbDao.getColumnValueAsString(i,"YZXPKEY"));//项目代码 + sjgmjzqtcfmxbdao.setColumnValue("xmmc", his_mzQtmxbDao.getColumnValueAsString(i,"YZMC"));//项目名称 + sjgmjzqtcfmxbdao.setColumnValue("xmflbm", "");//项目分类代码 + sjgmjzqtcfmxbdao.setColumnValue("xmflmc", "");//项目分类名称 + sjgmjzqtcfmxbdao.setColumnValue("zxpl", "");//执行频率 + sjgmjzqtcfmxbdao.setColumnValue("cjfx", "");//采集方式 + sjgmjzqtcfmxbdao.setColumnValue("cjbb", "");//采集标本 + sjgmjzqtcfmxbdao.setColumnValue("jcbw", "");//检查部位 + sjgmjzqtcfmxbdao.setColumnValue("mzfs", "");//麻醉方式 + sjgmjzqtcfmxbdao.setColumnValue("cfkssj", new Timestamp(his_mzQtmxbDao.getColumnValueAsLong(i,"CJRQ")));//处方开始时间 + sjgmjzqtcfmxbdao.setColumnValue("cftzsj", "");//处方停止时间 + sjgmjzqtcfmxbdao.setColumnValue("zxksbm", "");//执行科室编码 + sjgmjzqtcfmxbdao.setColumnValue("zxksmc", "");//执行科室名称 + if(jgrydicdao.local("USERACCOUNT", his_mzQtmxbDao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzqtcfmxbdao.setColumnValue("zxrbh",jgrydicdao.getColumnValueAsString("YBID"));//处方执行人编号 + sjgmjzqtcfmxbdao.setColumnValue("zxrxm", jgrydicdao.getColumnValueAsString("YBNAME"));//处方执行人姓名 + } + sjgmjzqtcfmxbdao.setColumnValue("zxksbm", his_mzQtmxbDao.getColumnValueAsString(i,"YZXZKS"));//执行科室编码 + sjgmjzqtcfmxbdao.setColumnValue("zxksmc", dpdicdao.getDicValue(his_mzQtmxbDao.getColumnValueAsString(i,"YZXZKS")));//执行科室名称 + sjgmjzqtcfmxbdao.setColumnValue("jzjgmc", MainUtil.getCurCompanyName());//执行科室名称 + sjgmjzqtcfmxbdao.setColumnValue("cfzxsj", new Timestamp(his_mzQtmxbDao.getColumnValueAsLong(i,"CJRQ")));//处方执行时间 + sjgmjzqtcfmxbdao.setColumnValue("wsfwyq", "");//卫生服务要求 + sjgmjzqtcfmxbdao.setColumnValue("qtyxcz", "");//其它医学处置 + sjgmjzqtcfmxbdao.setColumnValue("zzbz", "");//转诊标志 + sjgmjzqtcfmxbdao.setColumnValue("jkwtpg", "");//健康问题评估 + sjgmjzqtcfmxbdao.setColumnValue("jzjgmc", "");//就诊机构名称 + sjgmjzqtcfmxbdao.setColumnValue("zwt", "");//咨询问题 + sjgmjzqtcfmxbdao.setColumnValue("czjh", "");//处置计划 + sjgmjzqtcfmxbdao.setColumnValue("kfcszd", "");//康复措施指导 + sjgmjzqtcfmxbdao.setColumnValue("bz", "");//备注 + sjgmjzqtcfmxbdao.setColumnValue("mj", "");//密级 + String jszt = his_mzQtmxbDao.getColumnValueAsString(i,"JSZT"); + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzqtcfmxbdao.setColumnValue("xgbz", xgbz);//修改标志 + sjgmjzqtcfmxbdao.setColumnValue("posid", "");// + sjgmjzqtcfmxbdao.setColumnValue("jlgxsj", "");// + sjgmjzqtcfmxbdao.setColumnValue("llbz", "");// + sjgmjzqtcfmxbdao.setColumnValue("jybz", "");// + timestamp.setNanos(0); + sjgmjzqtcfmxbdao.setColumnValue("crt_tm_zdsc", timestamp);// + + } + if(sjgmjzqtcfmxbdao.commit()){ + System.out.println("====【门急诊其他处方明细表】更新成功=="); + } + } + + /*4.3.1.6门急诊费用明细表 */ + public void sdgMjzFymxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊费用明细表 + DxNormalDataManager his_sjgmjzfymxbdao=DaoCreator.getNormalDao("his_sjgmjzfymxbdao"); + his_sjgmjzfymxbdao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊费用明细表 + DxNormalDataManager sjgmjzfymxbdao=DaoCreator.getNormalDao("sjgmjzfymxbdao"); + sjgmjzfymxbdao=setYwdzSource(sjgmjzfymxbdao); + sjgmjzfymxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao(this,"yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao(this,"ksdic"); + ksdic.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao(this,"dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_sjgmjzfymxbdao.getRowCount(); i++) { + sjgmjzfymxbdao.absoluteInSert(); + sjgmjzfymxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + if("660928538879070208".equals(his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFMXPKEY"))) { + System.err.println("==========="); + } + sjgmjzfymxbdao.setColumnValue("sfmxid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFMXPKEY"));//收费明细ID + sjgmjzfymxbdao.setColumnValue("grbslx", "09");//个人标识类型 + sjgmjzfymxbdao.setColumnValue("grbsh", his_sjgmjzfymxbdao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzfymxbdao.setColumnValue("YNLSH", his_sjgmjzfymxbdao.getColumnValueAsString(i,"JZPKEY"));//院内流水号 + sjgmjzfymxbdao.setColumnValue("jzlsh", his_sjgmjzfymxbdao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzfymxbdao.setColumnValue("btfmxid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"HCDJPKEY"));//被退费明细ID + String ishc = his_sjgmjzfymxbdao.getColumnValueAsString(i,"ISHC"); + String jszt = his_sjgmjzfymxbdao.getColumnValueAsString(i,"JSZT"); + String tfbz = "1"; + if("3".equals(jszt) && Delphi.isNullString(his_sjgmjzfymxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "3"; + }else if ("3".equals(jszt) && !Delphi.isNullString(his_sjgmjzfymxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "2"; + } + sjgmjzfymxbdao.setColumnValue("tfbz", tfbz);//退费标志 + String sfcjbm = "2"; + if("M".equals(his_sjgmjzfymxbdao.getColumnValueAsString(i,"ZDJFLX")) ) { + sfcjbm = "2"; + }else if ("G".equals(his_sjgmjzfymxbdao.getColumnValueAsString(i,"ZDJFLX")) ){ + sfcjbm = "1"; + } + sjgmjzfymxbdao.setColumnValue("sfcjbm", sfcjbm);//收费场景代码 + sjgmjzfymxbdao.setColumnValue("yzmxid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZMX"));//处方明细ID + String yzdl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZLB"); + String yzzl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZZL"); + String zlxmlbbm = "99"; + if("01".equals(yzdl)) { + if("01".equals(yzzl)) { + zlxmlbbm = "01"; + }else if ("02".equals(yzzl)) { + zlxmlbbm = "02"; + }else if ("03".equals(yzzl)) { + zlxmlbbm = "03"; + } + + }else if ("10".equals(yzdl)) { + zlxmlbbm = "04"; + }else if ("05".equals(yzdl)) { + zlxmlbbm = "05"; + }else if ("04".equals(yzdl)) { + zlxmlbbm = "06"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "07"; + }else if ("09".equals(yzdl)) { + zlxmlbbm = "08"; + }else if ("14".equals(yzdl)) { + zlxmlbbm = "09"; + }else if ("06".equals(yzdl)) { + zlxmlbbm = "10"; + }else if ("08".equals(yzdl)) { + zlxmlbbm = "11"; + } + sjgmjzfymxbdao.setColumnValue("sfxmlbbm", zlxmlbbm);//收费项目类别代码 + + String his_fyzl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"FYZL"); + String fydl = his_sjgmjzfymxbdao.getColumnValueAsString(i,"FYDL"); + String fylx = "99"; + String fylxname = "其他"; + if("01".equals(fydl)) { + if("01".equals(his_fyzl)) { + fylx = "01"; + fylxname = "西药"; + }else if ("02".equals(his_fyzl)) { + fylx = "02"; + fylxname = "中成药"; + }else if ("03".equals(his_fyzl)) { + fylx = "03"; + fylxname = "中草药"; + } + }else if ("10".equals(fydl)) { + fylx = "04"; + fylxname = "诊察费"; + }else if ("03".equals(fydl)) { + fylx = "05"; + fylxname = "检查费"; + }else if ("04".equals(fydl)) { + fylx = "06"; + fylxname = "检验费"; + }else if ("05".equals(fydl)) { + fylx = "08"; + fylxname = "治疗费"; + }else if ("06".equals(fydl)) { + fylx = "09"; + fylxname = "手术费"; + }else if ("02".equals(fydl)) { + fylx = "10"; + fylxname = "材料费"; + }else if ("19".equals(fydl)) { + fylx = "11"; + fylxname = "麻醉费"; + }else if ("07".equals(fydl)) { + fylx = "13"; + fylxname = "护理费"; + }else if ("16".equals(fydl)) { + fylx = "14"; + fylxname = "抢救费"; + }else if ("17".equals(fydl)) { + fylx = "16"; + fylxname = "床位费"; + }else if ("15".equals(fydl)) { + fylx = "17"; + fylxname = "输氧费"; + } + sjgmjzfymxbdao.setColumnValue("fysrglbm", fylx);//费用收入归类代码 + sjgmjzfymxbdao.setColumnValue("fysrglmc", fylxname);//费用收入归类名称 + sjgmjzfymxbdao.setColumnValue("fyfssj", new Timestamp(his_sjgmjzfymxbdao.getColumnValueAsLong(i,"JFRQ")));//费用发生时间 + sjgmjzfymxbdao.setColumnValue("syjsid", his_sjgmjzfymxbdao.getColumnValueAsString(i,"ZDZBPKEY"));//费用结算ID + sjgmjzfymxbdao.setColumnValue("sfjssj", new Timestamp(his_sjgmjzfymxbdao.getColumnValueAsLong(i,"JSSJ")));//费用结算时间 + sjgmjzfymxbdao.setColumnValue("kdksbm", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZKS"));//开单科室编码 + sjgmjzfymxbdao.setColumnValue("kdksmc", ksdic.getDicValue(his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZKS")));//开单科室名称 + + + if(jgrydicdao.local("USERACCOUNT", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZYS"))){ + sjgmjzfymxbdao.setColumnValue("kdysbh",jgrydicdao.getColumnValueAsString("YBID"));//开单医生编号 + sjgmjzfymxbdao.setColumnValue("kdysxm", jgrydicdao.getColumnValueAsString("YBNAME"));//开单医生姓名 +// sdgghmxbdao.setColumnValue("GHYSSFZHM", jgrydicdao.getColumnValueAsString("IDENTITYID"));//挂号医生身份证号码 + }else { + if("1".equals(sfcjbm)) { + sjgmjzfymxbdao.setColumnValue("kdysbh","挂号费用");//开单医生编号 + sjgmjzfymxbdao.setColumnValue("kdysxm", "挂号费用");//开单医生姓名 + }else { + sjgmjzfymxbdao.setColumnValue("kdysbh","");//开单医生编号 + sjgmjzfymxbdao.setColumnValue("kdysxm", "");//开单医生姓名 + } + } + if(Delphi.isNullString(his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZXZKS") )) { + sjgmjzfymxbdao.setColumnValue("kdksbm", "挂号科室编码"); + sjgmjzfymxbdao.setColumnValue("kdksmc", "挂号科室"); + } + sjgmjzfymxbdao.setColumnValue("zxksbm", "");//执行科室编码 非 + sjgmjzfymxbdao.setColumnValue("zxksmc", "");//执行科室名称 非 + sjgmjzfymxbdao.setColumnValue("zxrybh", "");//执行人员编号 非 + sjgmjzfymxbdao.setColumnValue("zxryxm", "");//执行人员姓名 非 + sjgmjzfymxbdao.setColumnValue("mxxmbm", "");//明细项目代码 + sjgmjzfymxbdao.setColumnValue("mxxmmc", his_sjgmjzfymxbdao.getColumnValueAsString(i,"YZMC"));//明细项目名称 + + sjgmjzfymxbdao.setColumnValue("mxxmdw", dwdicdao.getDicValue(his_sjgmjzfymxbdao.getColumnValueAsString(i,"YPYZJBDW")));//明细项目单位 + sjgmjzfymxbdao.setColumnValue("mxxmdj", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXDJ"));//明细项目单价 非 + sjgmjzfymxbdao.setColumnValue("xmflbm", "");//项目分类代码 非 + sjgmjzfymxbdao.setColumnValue("xmflmc", "");//项目分类名称 非 + sjgmjzfymxbdao.setColumnValue("mxxmsl", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXSL"));//明细项目数量 非 + sjgmjzfymxbdao.setColumnValue("mxxmysje", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXZFY"));//明细项目应收金额 + sjgmjzfymxbdao.setColumnValue("mxxmssje", his_sjgmjzfymxbdao.getColumnValueAsString(i,"SFXSJZFY"));//明细项目实收金额 + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzfymxbdao.setColumnValue("xgbz", xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzfymxbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzfymxbdao.commit()){ + System.out.println("====【门急诊费用明细表】更新成功=="); + } + } + + /*4.3.1.7门急诊结算明细表*/ + public void sdgMjzJsmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊结算明细表 + DxNormalDataManager his_sjgmjzJsmxbdao=DaoCreator.getNormalDao("his_sjgmjzJsmxbdao"); + his_sjgmjzJsmxbdao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊结算明细表 + DxNormalDataManager sjgmjzjsmxbdao=DaoCreator.getNormalDao("sjgmjzjsmxbdao"); + sjgmjzjsmxbdao=setYwdzSource(sjgmjzjsmxbdao); + sjgmjzjsmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao(this,"yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao(this,"ksdic"); + ksdic.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao(this,"dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + + for (int i = 0; i < his_sjgmjzJsmxbdao.getRowCount(); i++) { + sjgmjzjsmxbdao.absoluteInSert(); + sjgmjzjsmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzjsmxbdao.setColumnValue("jsjlid", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"PKEY"));//结算记录ID + sjgmjzjsmxbdao.setColumnValue("grbslx", "09");//个人标识类型 + sjgmjzjsmxbdao.setColumnValue("grbsh", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzjsmxbdao.setColumnValue("jzlsh", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzjsmxbdao.setColumnValue("jsfph", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"FPHM"));//结算发票号 + + String ishc = his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ISHC"); + String jszt = his_sjgmjzJsmxbdao.getColumnValueAsString(i,"JSZT"); + String tfbz = "1"; + if("3".equals(jszt) && Delphi.isNullString(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "3"; + }else if ("3".equals(jszt) && !Delphi.isNullString(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HCDJPKEY"))) { + tfbz = "2"; + } + //sjgmjzjsmxbdao.setColumnValue("tfbz", tfbz);//退费标志 + String sfcjbm = "2"; + if("M".equals(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ZDJFLX")) ) { + sfcjbm = "2"; + }else if ("G".equals(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ZDJFLX")) ){ + sfcjbm = "1"; + } + sjgmjzjsmxbdao.setColumnValue("sfcjbm", sfcjbm);//收费场景代码 + sjgmjzjsmxbdao.setColumnValue("jlsfzt", tfbz);//记录收费状态 + sjgmjzjsmxbdao.setColumnValue("fyjssj",new Timestamp(his_sjgmjzJsmxbdao.getColumnValueAsLong(i,"JSSJ")));//费用结算时间 + sjgmjzjsmxbdao.setColumnValue("hzlysx","99" );//患者来源属性 99.其他 + String zflx =his_sjgmjzJsmxbdao.getColumnValueAsString(i,"ZFLX"); + String ylfffsdm = "99"; +// if("1".equals(zflx)) { +// ylfffsdm = "01"; +// }else if ("2".equals(zflx) || "3".equals(zflx) || "4".equals(zflx)) { +// ylfffsdm = "09"; +// }else if ("99".equals(zflx)) { +// ylfffsdm = "06"; +// }else if ("100".equals(zflx)) { +// ylfffsdm = "07"; +// } + sjgmjzjsmxbdao.setColumnValue("ylfffsdm", ylfffsdm);//医疗付费方式代码 + sjgmjzjsmxbdao.setColumnValue("fyjszje", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"JFZJE"));//费用结算总金额 + //sjgmjzjsmxbdao.setColumnValue("grcdfyje", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"HZPAYSELF"));//个人承担费用金额 + + + sjgmjzjsmxbdao.setColumnValue("jsrybh", his_sjgmjzJsmxbdao.getColumnValueAsString(i,"SFRY"));//结算人员编号 + sjgmjzjsmxbdao.setColumnValue("jsryxm", jgrydicdao.getDicValue(his_sjgmjzJsmxbdao.getColumnValueAsString(i,"SFRY")));//结算人员姓名 + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzjsmxbdao.setColumnValue("xgbz", xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzjsmxbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzjsmxbdao.commit()){ + System.out.println("====【门急诊结算明细表】更新成功=="); + } + } + + /*4.3.1.8门急诊结算支付方式明细表*/ + public void sdgMjzJsZffsmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊结算支付方式明细表 + DxNormalDataManager his_sjgmjzjszffsmxbdao=DaoCreator.getNormalDao("his_sjgmjzjszffsmxbdao"); + his_sjgmjzjszffsmxbdao.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊结算支付方式明细表 + DxNormalDataManager sjgmjzjszffsmxbdao=DaoCreator.getNormalDao("sjgmjzjszffsmxbdao"); + sjgmjzjszffsmxbdao=setYwdzSource(sjgmjzjszffsmxbdao); + sjgmjzjszffsmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao(this,"yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao(this,"ksdic"); + ksdic.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao(this,"dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i < his_sjgmjzjszffsmxbdao.getRowCount(); i++) { + sjgmjzjszffsmxbdao.absoluteInSert(); + sjgmjzjszffsmxbdao.setColumnValue("yljgdm", "452894746");//医疗机构代码 + sjgmjzjszffsmxbdao.setColumnValue("zffsjlid",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"ZFFSID"));//支付方式记录ID + sjgmjzjszffsmxbdao.setColumnValue("grbslx","09");//个人标识类型 + sjgmjzjszffsmxbdao.setColumnValue("grbsh",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"HZPKEY"));//个人标识号 + sjgmjzjszffsmxbdao.setColumnValue("jzlsh",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"JZPKEY"));//就诊流水号 + sjgmjzjszffsmxbdao.setColumnValue("jsjlid",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"GLZDBPKEY"));//结算记录ID + String pjzt = his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"PJZT"); + String jlsfzt = "1"; + if("3".equals(pjzt)) { + jlsfzt = "2"; + } + sjgmjzjszffsmxbdao.setColumnValue("jlsfzt",jlsfzt);//记录收费状态 + String zflx =his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"ZFLX"); + String ylfffsdm = "99"; + if("1".equals(zflx)) { + ylfffsdm = "01"; + }else if ("2".equals(zflx) || "3".equals(zflx) || "4".equals(zflx)) { + ylfffsdm = "09"; + }else if ("99".equals(zflx)) { + ylfffsdm = "06"; + }else if ("100".equals(zflx)) { + ylfffsdm = "07"; + } + sjgmjzjszffsmxbdao.setColumnValue("zffsdm",ylfffsdm);//支付方式代码 + sjgmjzjszffsmxbdao.setColumnValue("zffsje",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"ZFJE"));//支付金额 + sjgmjzjszffsmxbdao.setColumnValue("fyjssj",new Timestamp(his_sjgmjzjszffsmxbdao.getColumnValueAsLong(i,"SFRQ")));//费用结算时间 + sjgmjzjszffsmxbdao.setColumnValue("jsrybh",his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"SFRY"));//结算人员编号 + sjgmjzjszffsmxbdao.setColumnValue("jsryxm",jgrydicdao.getDicValue(his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"SFRY")));//结算人员姓名 + String jszt = his_sjgmjzjszffsmxbdao.getColumnValueAsString(i,"JSZT"); + String xgbz = "9"; + if("1".equals(jszt)) { + xgbz = "0"; + }else if ("3".equals(jszt)) { + xgbz = "1"; + } + sjgmjzjszffsmxbdao.setColumnValue("xgbz",xgbz);//修改标志 + timestamp.setNanos(0); + sjgmjzjszffsmxbdao.setColumnValue("crt_tm_zdsc", timestamp);//数据上传时间 + } + if(sjgmjzjszffsmxbdao.commit()){ + System.out.println("====【门急诊结算支付方式明细表】更新成功=="); + } + } + + /*4.3.1.9门急诊诊断明细表*/ + public void sdgMjzZdmxbAction(String companyid,Timestamp biginTimestamp,Timestamp enTimestamp) { + //his_门急诊诊断明细表 + DxNormalDataManager sjgmjzjzmxbdao_his=DaoCreator.getNormalDao("his_sjgmjzzdmxbdao"); + sjgmjzjzmxbdao_his.reload(new Object[] {companyid, biginTimestamp, enTimestamp}); + + //中心_门急诊诊断明细表 + DxNormalDataManager sjgmjzzdmxbdao=DaoCreator.getNormalDao("sjgmjzzdmxbdao"); + sjgmjzzdmxbdao=setYwdzSource(sjgmjzzdmxbdao); + sjgmjzzdmxbdao.reload(); + + DxNormalDataManager ybjgcsdao=DaoCreator.getNormalDao("ybjgcsdao"); + ybjgcsdao.reload(new Object[]{MainUtil.getCurCompanyID()}); + + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + + DxNormalDataManager dpdicdao = DaoCreator.getNormalDao("dpdicdao"); + dpdicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + dpdicdao.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager jgrydicdao = DaoCreator.getNormalDao("jgrydicdao"); + jgrydicdao.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + jgrydicdao.reloadByDictionary("NAME", "USERACCOUNT"); + + DxNormalDataManager yyyfDic = DaoCreator.getNormalDao(this,"yyyfDic"); + + DxNormalDataManager ksdic=DaoCreator.getNormalDao(this,"ksdic"); + ksdic.setNormalParameters(new Object[]{MainUtil.getCurCompanyID()}); + ksdic.reloadByDictionary("DPTNAME", "DPTID"); + + DxNormalDataManager dwdicdao = DaoCreator.getNormalDao(this,"dwdicdao"); + dwdicdao.reloadByDictionary("MC", "BH"); + long datatime = System.currentTimeMillis(); + Timestamp timestamp = new Timestamp(datatime); + for (int i = 0; i $医疗机构$住院药房发药明细单

+

$医疗机构$住院药房发药明细单

- - + + - - -
申请科室:$申请科室$发药类别:$发药类别$
申请科室:$申请科室$发药类别:$发药类别$
单号:$单号$发药时间:$发药日期*yyyy年MM月dd日 HH:mm$打印时间:$打印日期*yyyy年MM月dd日 HH:mm$

+单号:$单号$ +发药时间:$发药日期*yyyy年MM月dd日 HH:mm$ +打印时间:$打印日期*yyyy年MM月dd日 HH:mm$

- - - - - - - - - - - - + + + + + + + + + + + + +

- - - - - - - - - - - - + + + + + + + + + + + + +

- - - + + - - - + -

床号姓名 年龄 诊断药品名称 总量剂量单位频次用法执行时间规格
+

床号

姓名性别年龄诊断药品名称发药数量剂量单位频次用法执行时间规格
^床号^^姓名^$年龄$$诊断$^药品名称^^总量^^剂量^^单位^^频次^^用法^^执行时间^^规格^
^床号^^姓名^$性别$^年龄^^诊断^^药品名称^^发药数量^^剂量^^单位^^频次^^用法^^执行时间^^规格^
发药人:$发药人$             领药人:发药人:$发药人$             领药人:
总金额:$总金额$总金额:$总金额$
+  + 

]]>
@@ -124,6 +133,14 @@ + + + + + + + + ]]> \ No newline at end of file diff --git a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/物资退货制单打印/fb29ff7317cf334bcfec43048825b781.xml b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/物资退货制单打印/fb29ff7317cf334bcfec43048825b781.xml index ad64415..d199b4e 100644 --- a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/物资退货制单打印/fb29ff7317cf334bcfec43048825b781.xml +++ b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/物资退货制单打印/fb29ff7317cf334bcfec43048825b781.xml @@ -11,6 +11,10 @@ + + + + ]]> @@ -27,8 +31,8 @@ 单号:$DJH$ 制单科室:$DPTID$ -制单日期:$ZDRQ*yyyy-MM-dd HH:mm$ -采购金额:$JE$

+制单日期:$ZDRQ*yyyy-MM-dd HH:mm$          +供应商:$GYS$

@@ -53,9 +57,15 @@
- - -
打印日期:$打印日期*yyyy年MM月dd日 HH:mm$制单人:$ZDR$审核人:$SHR$

+ +

采购金额:$JE*0.0000$

+

打印日期:$打印日期*yyyy年MM月dd日 HH:mm$

+ +

 

+

制单人:$ZDR$

+ +

 

+

审核人:$SHR$

]]>
@@ -69,6 +79,10 @@ + + + + ]]> \ No newline at end of file diff --git a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/药品库存调拨制单打印/404e382f8b033f1d45be742dbb49d6bb.xml b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/药品库存调拨制单打印/404e382f8b033f1d45be742dbb49d6bb.xml index f63d153..5216f1e 100644 --- a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/药品库存调拨制单打印/404e382f8b033f1d45be742dbb49d6bb.xml +++ b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/药品库存调拨制单打印/404e382f8b033f1d45be742dbb49d6bb.xml @@ -7,22 +7,31 @@ + + + + + + + + ]]>

药品库存调拨制单

- - - + + + - -
单号:$DJH$申请科室:$SQKS$接收科室:$JSKS$
单号:$DJH$接受科室:$SQKS$出库科室:$JSKS$
制单日期:$CKRQ*yyyy-MM-dd HH:mm$采购金额:$JE$

+制单日期:$CKRQ*yyyy-MM-dd HH:mm$ +采购金额:$JE$

@@ -35,22 +44,21 @@

- - - - - - + + + + + +

-

厂商
^MC^^SL^^DW^^DJ^^JE^^CSXX^
^MC^^SL^^DW^^DJ^^JE^^CSXX^
采购大写总金额:$大写总金额$
+采购大写总金额:$大写总金额$

- - -
打印日期:$打印日期*yyyy年MM月dd日 HH:mm$制单人:$CKR$审核人:$CKSHR$

- +打印日期:$打印日期*yyyy年MM月dd日 HH:mm$ +制单人:$CKR$ +审核人:$CKSHR$

]]>
@@ -59,6 +67,14 @@ + + + + + + + + ]]> \ No newline at end of file diff --git a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊护士注射单瓶签打印/ddd923997ad6faf6591fd52f3166c05a.xml b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊护士注射单瓶签打印/ddd923997ad6faf6591fd52f3166c05a.xml index 2233ccf..35d4c17 100644 --- a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊护士注射单瓶签打印/ddd923997ad6faf6591fd52f3166c05a.xml +++ b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊护士注射单瓶签打印/ddd923997ad6faf6591fd52f3166c05a.xml @@ -1,6 +1,6 @@ - + @@ -48,6 +54,8 @@

频次:$频次$ 用法:$用法途径$$贴序$

签名:

备注 + + ]]>
@@ -80,6 +88,10 @@ + + + + ]]>
\ No newline at end of file diff --git a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊收费发票打印/9fcbd5aea1f7e55b7db0ef66f1c150a3.xml b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊收费发票打印/9fcbd5aea1f7e55b7db0ef66f1c150a3.xml index 5b38d01..5dbce3c 100644 --- a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊收费发票打印/9fcbd5aea1f7e55b7db0ef66f1c150a3.xml +++ b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊收费发票打印/9fcbd5aea1f7e55b7db0ef66f1c150a3.xml @@ -51,57 +51,66 @@ + + + + + + + + ]]> $JGID$医院 +           $JGID$医院

门诊单据

- +
- - - - - - - - -
门诊号:$MZNO$科室:$JJKS$
单据号:$发票号码$医生:$JJYS$
姓 名:$XM$类型:$结算类型$

+ +门诊号:$MZNO$ +科室:$JJKS$ + +单据号:$发票号码$ +医生:$JJYS$ + +姓 名:$XM$ +类型:$结算类型$

- +
- - - + + +

-

- - + + +

项目金额
项目金额
^FYLBBM^^FYLBJE^
^FYLBBM^^FYLBJE^

- +
- - - - - - - - + + + + + + + +

-

收:$医疗费总额$ 优惠:

-

基金支付:$基本医疗保险统筹基金支出$

-

账户支付:$个人账户支出$

-

$个人资金支付方式显示$

-

结算前余额:    结算后余额:

实收金额:$个人现金支出$
人民币:(大写)$个人现金支出大写$
+

收:$医疗费总额$ 优惠:

+

基金支付:$基本医疗保险统筹基金支出$

+

账户支付:$个人账户支出$

+

$个人资金支付方式显示$

+

$医保账户余额$  $结算前账户余额$

+

$共济账户余额$  $共济前账户余额$

实收金额:$个人现金支出$
人民币:(大写)$个人现金支出大写$
- - -
收费员:$收款人$ -

收费时间:$结算日期*yyyy-MM-dd$

+ +收费员:$收款人$ + +

收费时间:$结算日期*yyyy-MM-dd$

]]>
@@ -154,6 +163,14 @@ + + + + + + + + ]]> \ No newline at end of file diff --git a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊检验申请单打印/e411e976945a6f6bccd06df5b3324b90.xml b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊检验申请单打印/e411e976945a6f6bccd06df5b3324b90.xml index 509f2f6..16145e8 100644 --- a/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊检验申请单打印/e411e976945a6f6bccd06df5b3324b90.xml +++ b/file/reporttemplate/DE3C9D58-C91A-459E-74D0-5897CAC5F92B/门诊检验申请单打印/e411e976945a6f6bccd06df5b3324b90.xml @@ -11,13 +11,15 @@ + + + + ]]>

@@ -25,7 +27,9 @@ - + @@ -76,8 +80,6 @@
新和县莎拉麦提医院检验申请单
+

$JGID$

+

检验申请单

申请医生:$BUILDER$ 申请日期:$BUILDDATE*yyyy-MM-dd$

- - ]]>
@@ -90,6 +92,10 @@ + + + + ]]> \ No newline at end of file diff --git a/hcemr/emrBasePage.html b/hcemr/emrBasePage.html index ff35fe8..30a0d1b 100644 --- a/hcemr/emrBasePage.html +++ b/hcemr/emrBasePage.html @@ -122,9 +122,9 @@ function load() { emrView = new THCEmrViewLib({ - //hcServer: "http://127.0.0.1:12880/", // HC服务端IP + hcServer: "http://127.0.0.1:12880/", // HC服务端IP //hcServer: "http://124.71.81.19:12880/", // HC服务端IP - hcServer: "http://192.168.2.111:12880/", // HC服务端IP + //hcServer: "http://192.168.2.111:12880/", // HC服务端IP //hcServer: "http://192.168.1.122:12880/", //hcServer: "http://192.168.5.104:12880/", //hcServer: "http://192.168.20.100:12880/", diff --git a/hcemr/emrEditPage.html b/hcemr/emrEditPage.html index ed84ddd..32bb105 100644 --- a/hcemr/emrEditPage.html +++ b/hcemr/emrEditPage.html @@ -187,12 +187,12 @@ function load() { emrView = new THCEmrViewLib({ debug: false, - hcServer: "http://192.168.2.111:12880/", // HC服务端IP + //hcServer: "http://192.168.2.111:12880/", // HC服务端IP //hcServer: "http://192.168.1.122:12880/", //hcServer: "http://192.168.5.104:12880/", //hcServer: "http://192.168.20.100:12880/", //hcServer: "http://123.206.99.69:12880/", - //hcServer: "http://127.0.0.1:12880/", + hcServer: "http://127.0.0.1:12880/", baseUrl: "./", // 编辑器需要的资源路径 el: "divHCEmrView", // 编辑器父容器的ID defaultFontSize: "小四", // 编辑器默认字号,默认小四 diff --git a/hcemr/emrShowPage.html b/hcemr/emrShowPage.html index 70e4e7d..36f4d72 100644 --- a/hcemr/emrShowPage.html +++ b/hcemr/emrShowPage.html @@ -159,7 +159,8 @@ var TItemStyle = { function load() { emrView = new THCEmrViewLib({ debug: false, - hcServer: "http://192.168.2.111:12880/", // HC服务端IP + hcServer: "http://127.0.0.1:12880/", // + //hcServer: "http://192.168.2.111:12880/", // HC服务端IP baseUrl: "./", // 编辑器需要的资源路径 el: "divHCEmrView", // 编辑器父容器的ID defaultFontSize: "小四", // 编辑器默认字号,默认小四 diff --git a/release/20241225_1153.text b/release/20241225_1153.text index 05a3f45..ad67eb8 100644 --- a/release/20241225_1153.text +++ b/release/20241225_1153.text @@ -7,6 +7,11 @@ ........................................................................................................................................... <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +develop/hrl_20241223_syjgThread + +三医监管自动任务 +医保结算单模板增加自费/医保 宏定义 +三监管xml提交 ........................................................................................................................................... <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<