alter table YF_YPZLJCJL add cfdd VARCHAR2(50);
Create table yf_rkzlys(XTXH NUMBER(2) NOT NULL,
XH NUMBER(4) NOT NULL,
RKDH CHAR(10) NOT NULL,
YPXH NUMBER(6) NOT NULL,
YPCDDM NUMBER(4) NOT NULL,
PZWH VARCHAR2(36),
SCPH VARCHAR2(36),
YXRQ DATE,
YSRQ DATE,
RKSL NUMBER(13,4),
BZWGZL VARCHAR2(36),
JKYP_ZCZ VARCHAR2(10),
YSJL VARCHAR2(100),
YSR VARCHAR2(20),
GHDW VARCHAR2(50)
);
alter table yf_rkzlys add
constraint PK_yf_rkzlys primary key (ypxh,ypcddm,xtxh,rkdh,xh)
using index
tablespace TS_YAOKUFANG;
alter table gy_zgxx add zdls_zgid varchar2(5);
alter table my_ypkcz add ypwz varchar2(60);
----2008/04/22 增加原帐面数,增加原结存数
ALTER TABLE MY_PCD ADD YSQSL NUMBER(11,3);
ALTER TABLE MY_PCD ADD YRKSL NUMBER(11,3);
--- 增加盘存库存表 (注意加index)
create table my_kc_pclsk as
select * from my_kc_ymlsk where 1=2;
create table my_kc_pclsk_his as
select * from my_kc_ymlsk_his where 1=2;
/
alter table my_kc_pclsk add
constraint PK_my_kc_pclsk primary key (ypxh,ypcddm,ksdm,xtxh)
using index
tablespace TS_YAOKUFANG;
/
create index idx_ksdm_my_kc_pclsk on my_kc_pclsk (ksdm,ypxh,ypcddm)
tablespace TS_YAOKUFANG;
/
create index idx_my_kc_pclsk on my_kc_pclsk (fzfl)
tablespace TS_YAOKUFANG;
/
----2008/04/07
alter table gy_bqdm add pxxh number(4);
---- 2008/05/12 增加记费模式
alter table by_qld add jfms number(1);
---- 0或null :药房记费 1:医嘱执行时记费;
alter table by_ckd add jfms number(1); ---- 0或null :药房记费 1:医嘱执行时记费;
alter table my_ckd add jfms number(1); ---- 0或null :药房记费 1:医嘱执行时记费;
--2007.9.27
alter table my_ypmxz add skc number(14,3);
----2007/07/23 新增
alter table by_sy_print_end add a1_4 varchar2(20);
----2007/04/03 增加药品限量
Alter table zy_detail_charge add ypxl number(8,2);
alter table ZY_PATIENT_INFORMATION add HMBZ NUMBER(16);
alter table yf_qld add dyxh number(10);
alter table ZY_PATIENT_INFORMATION add HMBZ NUMBER(16);
alter table mz_cfk1 add MZH NUMBER(8);
alter table zy_detail_charge modify je number(10,2);
alter table zy_detail_charge modify zlje number(10,2);
alter table zy_detail_charge modify zfje number(10,2);
ALTER TABLE MY_CKD ADD YPPH VARCHAR2(20);
--2006/9/18 衢江医院 xlts:限量天数,xlsl:限量数量
alter table by_ypkcz add xlts number(3);
alter table by_ypkcz add xlsl number(11,2);
--有效期
alter table by_ckd add YXRQ DATE;
alter table by_ckd add YPPH VARCHAR2(20);
--2006/7/14 衢江医院 xlts:限量天数,xlsl:限量数量
alter table my_ypkcz add xlts number(3);
alter table my_ypkcz add xlsl number(11,2);
create or replace function f_yf_getcfje(arg_cfsb in number)
return number
is
ld_return number(10,2);
begin
begin
Select sum(round(sl*dj,2)) into ld_return from mz_cfk2
Where cfsb=arg_cfsb;
exception
when no_data_found then
ld_return:=0;
end;
return(ld_return);
end;
/
Create table MY_PYR
(
XTXH NUMBER(2),
GH VARCHAR2(5),
ZYPB NUMBER(1),
DQPYBZ NUMBER(1),
CKKSDM VARCHAR2(20)
);
/
-- 2006/08/10 湖州市一 体重
alter table gy_brjbxxk add tz varchar2(20);
--2006/7/14 衢江医院 xlts:限量天数,xlsl:限量数量
alter table my_ypkcz add xlts number(3);
alter table my_ypkcz add xlsl number(11,2);
--- 2006/06/20 用于浙一用的 急诊三天限量
alter table gy_ypmcggzd add jzstxl number(6);
alter table gy_ypcdjg add jzstxl number(6);
/
---- 2006/06/20 增加在用标志
alter table by_ckxh add zybz number(1) ;
---2006/04/12 =====增加group_no
alter table by_qld add group_no number(10);
/
-- 2006/05/01 增加打印标志
alter table mz_cfk1 add dybz number(1);
/
----2006/03/29 特殊方法
Alter table yz_inpatient_order add tsff number(2);
/
--20006.03.24
alter table my_ypkcz add plxs number(10,2);
----2006/02/10
alter table gy_ypmcggzd add YPSXSM varchar2(50);
alter table gy_ypmcggzd add YBYPDM9 varchar2(20);
alter table gy_ypmcggzd add YBYPDJ9 varchar2(3);
alter table gy_ypcdjg add YBYPDM9 varchar2(20);
alter table gy_ypcdjg add YBYPDJ9 varchar2(3);
alter table gy_ylsf add ybyldm9 varchar2(20);
alter table zy_detail_charge add csbz number(1) ;
alter table zy_detail_charge add zlyppb number(1);
alter table zy_detail_charge add ybxx varchar2(100);
alter table zy_detail_charge add ybdm varchar2(20);
alter table zy_detail_charge add je number(10,2);
alter table zy_detail_charge add zlje number(10,2);
alter table zy_detail_charge add zfje number(10,2);
/
---2006/01/06
----建sequence =============================
create sequence seq_yf_cffx_data_jlxh increment by 1 start with 1 maxvalue 999999999;
/
---2005/12/12
alter table by_sy_syd modify yzxx varchar2(220);
alter table by_sy_syd modify yhxx varchar2(220);
alter table by_sy_syd modify ypxx varchar2(220);
alter table by_sy_syd modify jgxhxx varchar2(220);
alter table by_sy_syd modify occ_jlxhxx varchar2(220);
---2005/12/02 增加djxh
alter table yf_cffx_data add djxh number(10);
---2005/11/25 修改剂量单位长度
ALTER TABLE BY_CKD MODIFY JLDW VARCHAR2(10);
/
---2005/10/18
----增加字段
---增加单据审核显示判别,单据分开判别
ALTER TABLE BY_CRKFS ADD DJSHXSPB NUMBER(1) DEFAULT 1;
ALTER TABLE BY_CRKFS ADD DJFKPB NUMBER(1) DEFAULT 0;
/
--2005.09.05 长兴人民医院
--table name : by_qld
--note: 增加新旧医嘱标志 0 旧医嘱,1 新医嘱
Alter table by_qld Add yzpbbz number(1);
/
---2005/08/11 余杭农保
Alter table zy_patient_information Modify (brlb Number(2));
Alter table zy_total_fee Modify (brlb Number(2));
Alter table gy_ylsf add (ybyldm7 varchar(20));
Alter table gy_ypmcggzd add (ybypdm7 varchar(20));
Alter table gy_ypmcggzd add (ybdj7 VARCHAR2(3));
Alter table gy_ypcdjg add (ybypdm7 Varchar(20));
Alter table gy_ypflzd add (ybypdm7 Varchar(20));
/ |