---2024-09-19--- Insert into HIS_GZZ_CSGL (PKEY,MC,MS,TYPE,KJTYPE,CJR,CJRQ,XGR,XGRQ,XH,SZ,BM) values ('708505223560040448','是否启动药品追溯码功能','是否启动药品追溯码功能0:否,1:是(注:需联系工程师启用机构参数生效用)','1','1','slmtadmin',to_date('2024-09-15 22:23:24','YYYY-MM-DD HH24:MI:SS'),null,null,144,null,'GZZNP0143'); ALTER TABLE HIS_YFFY_PYB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_YFFY_PYB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_YFFY_MZFYMXB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_YFFY_MZFYMXB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_YFFY_MZTYMXB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_YFFY_MZTYMXB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_YFFY_ZYFYMXB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_YFFY_ZYFYMXB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_MMS_PYB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_MMS_PYB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_MMS_MZFYMXB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_MMS_MZFYMXB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_MMS_MZTYMXB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_MMS_MZTYMXB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_MMS_ZYFYMXB ADD (ZSMCJ VARCHAR2(1000) ); COMMENT ON COLUMN HIS_MMS_ZYFYMXB.ZSMCJ IS '追溯码采集'; ALTER TABLE HIS_YPXX ADD (ISRX VARCHAR2(1) DEFAULT 0 ); COMMENT ON COLUMN HIS_YPXX.ISRX IS '处方药Rx标志1:是,0:否'; ALTER TABLE HIS_YPXX ADD (ISKSS VARCHAR2(1) DEFAULT 0 ); COMMENT ON COLUMN HIS_YPXX.ISKSS IS '抗生素标志1:是,0:否'; ALTER TABLE MAIN_JGYH ADD (YSZGZH VARCHAR2(36) ); ALTER TABLE MAIN_JGYH ADD (YSZGXM VARCHAR2(50) ); COMMENT ON COLUMN MAIN_JGYH.YSZGZH IS '药师执业资格证号'; COMMENT ON COLUMN MAIN_JGYH.YSZGXM IS '药师执业资格证姓名'; ALTER TABLE LIS_ZKXMDY MODIFY (SBH VARCHAR2(30 BYTE) ); ALTER TABLE LIS_ZKXMGZ MODIFY (SBH VARCHAR2(30 BYTE) ); ALTER TABLE LIS_ZKJG MODIFY (SBH VARCHAR2(30 BYTE) ); --2024-09-23-- ALTER TABLE LIS_JYJG ADD (WJZBZ VARCHAR2(1) DEFAULT 0 ); COMMENT ON COLUMN LIS_JYJG.WJZBZ IS '危急值标志0:否,1:是'; ALTER TABLE LIS_BRJYXX MODIFY (XH VARCHAR2(36 BYTE) ); Insert into MAIN_FUNCTION (SYSFUNID,SYSFUNNUMBER,SYSFUNNAME_CN,SYSFUNDESC_CN,SYSFUN_SER,SYSFUN_REMARK,SYSFUN_FLAG,SYSFUN_STATUS,SYSFUN_DIFF,CJR,CJRQ,XGR,XGRQ,JGID,SYS_FUN_HELP,SYSFUN_LOOKVALUE,SYSFUN_ADDVALUE,SYSFUN_EDITVALUE,SYSFUN_DELETEVALUE,SYSFUN_POSTVALUE,SYSFUN_AMOUNTVALUE,SYSFUN_PRINTVALUE,SYSFUN_SELECTVALUE,SYSFUN_AUDITVALUE,SYSFUN_RETURNVALUE,SYSFUN_HELPVALUE,SYSFUN_SPACVALUE1,SYSFUN_SPACVALUE2,SYSFUN_SPACVALUE3,SYSFUN_SPACVALUE4,SYSFUN_SPACVALUE5,SYSFUN_PARENT,SYSFUN_ISGZGN) values ('7F2B679D-0C21-E49D-5FD0-D15118493598','C004-F000-S002-T007','报告录入',null,7,null,3,0,0,'slmtadmin',to_date('2024-09-19 13:51:49','YYYY-MM-DD HH24:MI:SS'),'slmtadmin',to_date('2024-09-23 17:07:52','YYYY-MM-DD HH24:MI:SS'),'0000',null,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,'C004-F000-S002',null); Insert into MAIN_MENU (TYPE,OPEN_TYPE,ALL_CLASSNAME,MENUID,MENU_IMG,IS_REGISTER,PARAMS_KEY,PARAMS_VALUE) values ('SDI','0','com.lis.jygl.LisBgglWindow','C004-F000-S002-T007',null,null,null,null); --2024-09-25-- delete from LIS_RJB; ALTER TABLE LIS_RJB MODIFY (PKEY VARCHAR2(36) ); --2024-09-27-- ALTER TABLE HIS_YZX_JCJY ADD (PX INT DEFAULT 999999 ); COMMENT ON COLUMN HIS_YZX_JCJY.PX IS '排序用'; --2024-10-02-- ALTER TABLE HIS_BQCW ADD (CWBS VARCHAR2(1) DEFAULT 0 ); COMMENT ON COLUMN HIS_BQCW.CWBS IS '床位标识 0:实际床位,1:虚拟床位,2:家庭病床'; Insert into MAIN_FUNCTION (SYSFUNID,SYSFUNNUMBER,SYSFUNNAME_CN,SYSFUNDESC_CN,SYSFUN_SER,SYSFUN_REMARK,SYSFUN_FLAG,SYSFUN_STATUS,SYSFUN_DIFF,CJR,CJRQ,XGR,XGRQ,JGID,SYS_FUN_HELP,SYSFUN_LOOKVALUE,SYSFUN_ADDVALUE,SYSFUN_EDITVALUE,SYSFUN_DELETEVALUE,SYSFUN_POSTVALUE,SYSFUN_AMOUNTVALUE,SYSFUN_PRINTVALUE,SYSFUN_SELECTVALUE,SYSFUN_AUDITVALUE,SYSFUN_RETURNVALUE,SYSFUN_HELPVALUE,SYSFUN_SPACVALUE1,SYSFUN_SPACVALUE2,SYSFUN_SPACVALUE3,SYSFUN_SPACVALUE4,SYSFUN_SPACVALUE5,SYSFUN_PARENT,SYSFUN_ISGZGN) values ('6D56D72E-B055-ECE0-DB7C-927D1180FCD4','C013-F001-S001-T002','妇幼二级指标(部分)',null,2,null,3,0,0,'rmyy001',to_date('2024-10-02 18:08:59','YYYY-MM-DD HH24:MI:SS'),'rmyy001',to_date('2024-10-02 18:10:10','YYYY-MM-DD HH24:MI:SS'),'0000',null,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,'C013-F001-S001',null); Insert into MAIN_MENU (TYPE,OPEN_TYPE,ALL_CLASSNAME,MENUID,MENU_IMG,IS_REGISTER,PARAMS_KEY,PARAMS_VALUE) values ('SDI','0','com.his.Tj.FyEjzbtjWindow','C013-F001-S001-T002',null,null,null,null); --2024-10-02-2-- Insert into MAIN_ZDZB (BH,MC,BZ) values ('000030','床位标识',null); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000030','0','实际床位','SJCW','PBYW',null,null,1,'1'); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000030','1','虚拟床位','XNCW','HRYW',null,null,2,'1'); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000030','2','家庭病床','JTBC','PYUY',null,null,3,'1'); --2024-10-07-- CREATE OR REPLACE VIEW CHECKAPPLY AS select jg.ZZJGBM hospCode,sf.PKEY applicationNo,nvl(b.zjhm,b.SFZH) cardNum,b.ZJLX cardType,jg.JGMC orgName,b.PKEY PatientId,a.JZNO treatmentNo,(case when a.JZLX='M' then '1' when a.JZLX='J' then '2' when a.JZLX='Z' then '3' else '9' end) sourceCode, (case when a.JZLX='M' then '门诊' when a.JZLX='J' then '急诊' when a.JZLX='Z' then '住院' else '其它' end) sourceName,b.XM patientName,b.XB genderCode,(case when b.XB='0' then '未知的性别' when b.XB='1' then '男' when b.XB='2' then '女' else '未说明的性别' end) genderName, to_char(b.csrq,'yyyy-MM-dd') birthday,b.phone telephone,a.JJKS deptCode,ks.DPTNAME deptName,a.WARD wardCode,bq.MC wardName,cw.MC bedNumber,nvl(bl.ZS,'-') complaints,to_char(zd.FBSJ,'yyyy-MM-dd hh24:mi:ss') startDate,to_char(bl.JZRQ,'yyyy-MM-dd hh24:mi:ss') stopDate, '' "desc",zd.JBBM icdCode,zd.JBMC icdName,nvl(bl.ZS,'-') clinical,to_char(sf.JFRQ,'yyyy-MM-dd hh24:mi:ss') applicationDate,'' appointmentDate,a.JJKS applyDeptCode,ks.DPTNAME applyDeptName,a.JJYS applyDoctorNumber,e.NAME applyDoctorName,zx.ZXRKS executionDeptCode, zxks.DPTNAME executiveDeptName,zx.ZXR executiveDoctorNumber,zxe.NAME executiveDoctorName,(case when a.JZLX='J' then '1' else '2' end) IsUrgent,j.JCLX typeCode, (case when j.JCLX='01' then '计算机X线断层摄影' when j.JCLX='02' then '核磁共振成像' when j.JCLX='03' then '整数减影血管造影' when j.JCLX='04' then '普通X光摄影' when j.JCLX='05' then '特殊X光摄影' when j.JCLX='06' then '超声检查' when j.JCLX='07' then '病理检查' when j.JCLX='08' then '内镜检查' when j.JCLX='09' then '核医学检查' when j.JCLX='10' then '其他检查' when j.JCLX='11' then '心电检查' else '其它' end) typeName, sf.SFX itemCode,yz.YZMC itemName,'' methodCode,'' methodName,'' siteCode,'' siteName,'' deviceCode,'' deviceName,'-' reason,'1' chargeStatus,'' attention,'2' obsolete,sf.SFXZFY charge from HIS_SFZD_SFXMXB sf left join HIS_YZX_JCJY j on sf.JGID=j.JGID and sf.YZX=j.YZXPKEY left join HIS_YZ_MXB yz on sf.JGID=yz.JGID and sf.YZMX=yz.PKEY left join HIS_YZ_EXEC zx on zx.JGID=yz.JGID and zx.yzmx=yz.pkey and zx.jzpkey=yz.jzpkey left join HIS_JZ_BASEINFO a on a.JGID=yz.JGID and a.HZPKEY=yz.HZPKEY and a.PKEY=yz.JZPKEY left join HIS_HZINFO b on a.hzpkey = b.pkey and a.JGID=b.JGID left join MAIN_YLJG jg on jg.PKEY=sf.JGID left join MAIN_KS ks on a.JGID=ks.JGID and a.JJKS=ks.DPTID left join MAIN_KS zxks on zx.JGID=zxks.JGID and zx.ZXRKS=zxks.DPTID left join HIS_BQ bq on a.JGID=bq.JGID and a.WARD=bq.PKEY left join HIS_BQCW cw on a.JGID=cw.JGID and a.BED=cw.PKEY left join MAIN_YHXX e on a.JJYS=e.USERACCOUNT left join MAIN_YHXX zxe on zx.ZXR=zxe.USERACCOUNT left join HIS_JZ_MZBL bl on a.JGID=bl.JGID and a.PKEY=bl.JZPKEY left join HIS_JZ_MZZD zd on a.JGID=zd.JGID and a.PKEY=zd.JZPKEY and zd.SFZZD='1' and nvl(zd.ZDLX,'001')!='002' where j.JCLX is not null and ((sf.JSZT='1' AND (a.JZLX='M' or a.JZLX='J') and sf.ishc='0') or a.JZLX='Z'); --2024-10-09-- CREATE OR REPLACE VIEW CHECKAPPLY AS select jg.ZZJGBM hospCode,zx.PKEY applicationNo,nvl(b.zjhm,b.SFZH) cardNum,b.ZJLX cardType,jg.JGMC orgName,b.PKEY PatientId,a.JZNO treatmentNo,(case when a.JZLX='M' then '1' when a.JZLX='J' then '2' when a.JZLX='Z' then '3' else '9' end) sourceCode, (case when a.JZLX='M' then '门诊' when a.JZLX='J' then '急诊' when a.JZLX='Z' then '住院' else '其它' end) sourceName,b.XM patientName,b.XB genderCode,(case when b.XB='0' then '未知的性别' when b.XB='1' then '男' when b.XB='2' then '女' else '未说明的性别' end) genderName, to_char(b.csrq,'yyyy-MM-dd') birthday,b.phone telephone,a.JJKS deptCode,ks.DPTNAME deptName,a.WARD wardCode,bq.MC wardName,cw.MC bedNumber,nvl(bl.ZS,'-') complaints,to_char(zd.FBSJ,'yyyy-MM-dd hh24:mi:ss') startDate,to_char(bl.JZRQ,'yyyy-MM-dd hh24:mi:ss') stopDate, '' "desc",zd.JBBM icdCode,zd.JBMC icdName,nvl(bl.ZS,'-') clinical,to_char(zx.ZXTIME,'yyyy-MM-dd hh24:mi:ss') applicationDate,'' appointmentDate,a.JJKS applyDeptCode,ks.DPTNAME applyDeptName,a.JJYS applyDoctorNumber,e.NAME applyDoctorName,zx.ZXRKS executionDeptCode, zxks.DPTNAME executiveDeptName,zx.ZXR executiveDoctorNumber,zxe.NAME executiveDoctorName,(case when a.JZLX='J' then '1' else '2' end) IsUrgent,j.JCLX typeCode, (case when j.JCLX='01' then '计算机X线断层摄影' when j.JCLX='02' then '核磁共振成像' when j.JCLX='03' then '整数减影血管造影' when j.JCLX='04' then '普通X光摄影' when j.JCLX='05' then '特殊X光摄影' when j.JCLX='06' then '超声检查' when j.JCLX='07' then '病理检查' when j.JCLX='08' then '内镜检查' when j.JCLX='09' then '核医学检查' when j.JCLX='10' then '其他检查' when j.JCLX='11' then '心电检查' else '其它' end) typeName, yz.YZXPKEY itemCode,yz.YZMC itemName,'' methodCode,'' methodName,'' siteCode,'' siteName,'' deviceCode,'' deviceName,'-' reason,'1' chargeStatus,'' attention,'2' obsolete,yz.YZJE charge from HIS_YZ_MXB yz left join HIS_YZ_EXEC zx on zx.JGID=yz.JGID and zx.yzmx=yz.pkey and zx.jzpkey=yz.jzpkey --left join HIS_SFZD_SFXMXB sf on sf.JGID=zx.JGID and sf.EXEPKEY=zx.PKEY left join HIS_YZX_JCJY j on yz.JGID=j.JGID and yz.YZXPKEY=j.YZXPKEY left join HIS_JZ_BASEINFO a on a.JGID=yz.JGID and a.HZPKEY=yz.HZPKEY and a.PKEY=yz.JZPKEY left join HIS_HZINFO b on a.hzpkey = b.pkey and a.JGID=b.JGID left join MAIN_YLJG jg on jg.PKEY=yz.JGID left join MAIN_KS ks on a.JGID=ks.JGID and a.JJKS=ks.DPTID left join MAIN_KS zxks on zx.JGID=zxks.JGID and zx.ZXRKS=zxks.DPTID left join HIS_BQ bq on a.JGID=bq.JGID and a.WARD=bq.PKEY left join HIS_BQCW cw on a.JGID=cw.JGID and a.BED=cw.PKEY left join MAIN_YHXX e on a.JJYS=e.USERACCOUNT left join MAIN_YHXX zxe on zx.ZXR=zxe.USERACCOUNT left join HIS_JZ_MZBL bl on a.JGID=bl.JGID and a.PKEY=bl.JZPKEY left join HIS_JZ_MZZD zd on a.JGID=zd.JGID and a.PKEY=zd.JZPKEY and zd.SFZZD='1' and nvl(zd.ZDLX,'001')!='002' where j.JCLX is not null and ((zx.SFFLAG='1' AND (a.JZLX='M' or a.JZLX='J')) or a.JZLX='Z') and zx.PKEY is not null --2024-10-12-- Insert into HIS_MESSAGE_TYPE (PKEY,BM,MC,JSDX,FSFS,ZYX,YXTS,TDXX,ZYZDCL,SFQY,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,VOICE) values ('718235298891173888','M0005','危急值消息','ksysbqhs','001','001',1,'001',null,'1','slmtadmin',to_date('2024-10-12 18:47:14','YYYY-MM-DD HH24:MI:SS'),'slmtadmin',to_date('2024-10-12 18:49:50','YYYY-MM-DD HH24:MI:SS'),'C903C18E-27EB-A242-6306-E301CB3E6AC9',1,'0'); Insert into MAIN_ZDZB (BH,MC,BZ) values ('000031','LIS危急值状态',null); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000031','-1','已取消','QX','BCIE',null,null,1,'1'); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000031','0','已登记','DJ','WGYN',null,null,2,'1'); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000031','1','已报告','BG','RBTF',null,null,3,'1'); Insert into MAIN_ZDB (ZDZB_BH,BH,MC,PYM,WBM,VALUE1,VALUE2,XH,ZT) values ('000031','2','已处理','YCL','NCL',null,null,4,'1'); CREATE TABLE LIS_WJZ( PKEY VARCHAR2(20) NOT NULL, JGID VARCHAR2(36) NOT NULL, rkey VARCHAR2(36) NOT NULL, BGR VARCHAR2(36), BGSJ DATE, LXR VARCHAR2(36), LXDH VARCHAR2(36), LXSJ DATE, JSR VARCHAR2(36), JSSJ DATE, memo VARCHAR2(500), zt VARCHAR2(2) DEFAULT 0, CJR VARCHAR2(36), CJRQ DATE, qxr VARCHAR2(36), qxsj DATE, LOCKFLAG INT DEFAULT 0 NOT NULL, PRIMARY KEY (PKEY) ); COMMENT ON TABLE LIS_WJZ IS 'LIS危急值记录'; COMMENT ON COLUMN LIS_WJZ.PKEY IS '主键'; COMMENT ON COLUMN LIS_WJZ.JGID IS '所属机构'; COMMENT ON COLUMN LIS_WJZ.rkey IS 'LIS_BRJYXX主键'; COMMENT ON COLUMN LIS_WJZ.BGR IS '报告人'; COMMENT ON COLUMN LIS_WJZ.BGSJ IS '报告时间'; COMMENT ON COLUMN LIS_WJZ.LXR IS '临床联系人'; COMMENT ON COLUMN LIS_WJZ.LXDH IS '联系电话'; COMMENT ON COLUMN LIS_WJZ.LXSJ IS '联系时间'; COMMENT ON COLUMN LIS_WJZ.JSR IS '接收人'; COMMENT ON COLUMN LIS_WJZ.JSSJ IS '接收时间'; COMMENT ON COLUMN LIS_WJZ.memo IS '危急值内容'; COMMENT ON COLUMN LIS_WJZ.zt IS '报告状态'; COMMENT ON COLUMN LIS_WJZ.CJR IS '创建者'; COMMENT ON COLUMN LIS_WJZ.CJRQ IS '创建日期'; COMMENT ON COLUMN LIS_WJZ.qxr IS '取消人'; COMMENT ON COLUMN LIS_WJZ.qxsj IS '取消时间'; COMMENT ON COLUMN LIS_WJZ.LOCKFLAG IS '乐观锁计数器'; CREATE TABLE LIS_WJZMX( PKEY VARCHAR2(20) NOT NULL, JGID VARCHAR2(36) NOT NULL, rkey VARCHAR2(36) NOT NULL, xmbh VARCHAR2(36) NOT NULL, xmmc VARCHAR2(100), jg VARCHAR2(100), ckz VARCHAR2(100), tsxx VARCHAR2(50), jydw VARCHAR2(36), LOCKFLAG INT DEFAULT 0 NOT NULL, PRIMARY KEY (PKEY) ); COMMENT ON TABLE LIS_WJZMX IS 'LIS危急值明细记录'; COMMENT ON COLUMN LIS_WJZMX.PKEY IS '主键'; COMMENT ON COLUMN LIS_WJZMX.JGID IS '所属机构'; COMMENT ON COLUMN LIS_WJZMX.rkey IS 'LIS_WJZ的主键'; COMMENT ON COLUMN LIS_WJZMX.xmbh IS '项目编号'; COMMENT ON COLUMN LIS_WJZMX.xmmc IS '项目名称'; COMMENT ON COLUMN LIS_WJZMX.jg IS '结果'; COMMENT ON COLUMN LIS_WJZMX.ckz IS '参考值'; COMMENT ON COLUMN LIS_WJZMX.tsxx IS '提示信息'; COMMENT ON COLUMN LIS_WJZMX.jydw IS '检验单位'; COMMENT ON COLUMN LIS_WJZMX.LOCKFLAG IS '乐观锁计数器';