-- Create table create table BM_BRXXB0 ( brid00 NUMBER(10) not null, mrn000 VARCHAR2(30) default '0' not null, brblh0 VARCHAR2(30) default '0' not null, ybkh00 VARCHAR2(30) default '0' not null, ybid00 VARCHAR2(30) default '0' not null, yblb00 VARCHAR2(30) default '0' not null, brxm00 VARCHAR2(40) not null, brxb00 VARCHAR2(10), brxx00 VARCHAR2(30), brcsrq CHAR(8), brhyzk VARCHAR2(30), brzy00 VARCHAR2(30), brmz00 VARCHAR2(30), brgj00 VARCHAR2(30), brzjlx VARCHAR2(30) default '身份证' not null, brzjbh VARCHAR2(30), fbbh00 NUMBER(5) not null, brgfzh VARCHAR2(30) default '0' not null, brdyfw VARCHAR2(30) default '本市(县)', brdh00 VARCHAR2(40), brjtdz VARCHAR2(200), bryb00 VARCHAR2(30), tydwid NUMBER(5), tydwmc VARCHAR2(200), brlxgx VARCHAR2(30), brlxxm VARCHAR2(40), brlxdz VARCHAR2(200), brlxdh VARCHAR2(40), brztqk VARCHAR2(30), brjkqk VARCHAR2(100), brlx00 VARCHAR2(30) default '初诊' not null, czy000 NUMBER(5) not null, czrq00 CHAR(8) not null, czsj00 CHAR(8) not null, shr000 VARCHAR2(20), shrq00 CHAR(8), rycs00 NUMBER(10) default 0 not null, cyqkje NUMBER(12,2), zyzt00 CHAR(1) default '0' not null, sfyx00 CHAR(1) default 'Y' not null, bz0000 VARCHAR2(200), ybbrlb CHAR(1) default '0' not null, lbbh00 NUMBER(5), sfyd00 CHAR(1) default '0' not null, dwzbid NUMBER(10) default 0, brszsf VARCHAR2(200), brszs0 VARCHAR2(30), brszz0 VARCHAR2(60), sfyxjb CHAR(1) default '0' not null, bryb01 VARCHAR2(30), bmmc00 VARCHAR2(50) default '未填报', pysm00 VARCHAR2(40), wbsm00 VARCHAR2(40), lxrxb0 VARCHAR2(10), lxrsfz VARCHAR2(30), brtz00 NUMBER(8,2), email0 VARCHAR2(100), ephoto BLOB, bjjbie VARCHAR2(2) default '04', tssxmc VARCHAR2(40) default '普通' not null, fwbj00 VARCHAR2(20), sfydy0 CHAR(1) default 'N', brszc0 VARCHAR2(60), brszqy CHAR(1) default '0', sfsd00 VARCHAR2(1), tydwyb VARCHAR2(30), xzqh00 VARCHAR2(10), rh0000 VARCHAR2(10), grsfen VARCHAR2(20), grsfmc VARCHAR2(50), sfblwt VARCHAR2(10), mzzhid NUMBER(11), fbbh01 NUMBER(5), ybbrl1 CHAR(1), yblb01 VARCHAR2(30), daid00 NUMBER(10), card16 VARCHAR2(20), wdwid0 VARCHAR2(20), ygbh00 NUMBER(5), brszds VARCHAR2(60), ndtcxe NUMBER(12,2) default 0 not null, zyh000 VARCHAR2(12), brxzdz VARCHAR2(200), brxzsf VARCHAR2(30), brxzs0 VARCHAR2(30), brxzz0 VARCHAR2(30), brxzc0 VARCHAR2(60), xgrq00 VARCHAR2(8) default to_char(sysdate,'yyyymmdd') not null, brcssj VARCHAR2(8), sftjbr CHAR(1) default '0' ) tablespace TS_YY pctfree 10 initrans 1 maxtrans 255 storage ( initial 832K next 1M minextents 1 maxextents unlimited ); -- Add comments to the table comment on table BM_BRXXB0 is '病人信息表'; -- Add comments to the columns comment on column BM_BRXXB0.brid00 is '病人的唯一标识号 SQ_BM_BRXXB0_BRID00'; comment on column BM_BRXXB0.mrn000 is '病案号'; comment on column BM_BRXXB0.brblh0 is '门诊病历号'; comment on column BM_BRXXB0.ybkh00 is '病人医保卡号'; comment on column BM_BRXXB0.ybid00 is '病人医疗保险号(医保ID)'; comment on column BM_BRXXB0.yblb00 is '病人医保类别,''0'':非医保''1'':省直医保,''2'':市医保(对应病人所属分中心名称)'; comment on column BM_BRXXB0.brxm00 is '姓名'; comment on column BM_BRXXB0.brxb00 is '性别'; comment on column BM_BRXXB0.brxx00 is '血型'; comment on column BM_BRXXB0.brcsrq is '出生日期'; comment on column BM_BRXXB0.brhyzk is '婚姻状况'; comment on column BM_BRXXB0.brzy00 is '职业'; comment on column BM_BRXXB0.brmz00 is '民族'; comment on column BM_BRXXB0.brgj00 is '国籍'; comment on column BM_BRXXB0.brzjlx is '证件类型'; comment on column BM_BRXXB0.brzjbh is '证件编号'; comment on column BM_BRXXB0.fbbh00 is '费别 F.K=BM_BRFBB0.FBBH00'; comment on column BM_BRXXB0.brgfzh is '凭证号/公费证号'; comment on column BM_BRXXB0.brdyfw is '地域范围;本市、外地(对应病人所属地区名称)'; comment on column BM_BRXXB0.brdh00 is '电话'; comment on column BM_BRXXB0.brjtdz is '家庭地址/通信地址'; comment on column BM_BRXXB0.bryb00 is '邮编'; comment on column BM_BRXXB0.tydwid is '单位ID'; comment on column BM_BRXXB0.tydwmc is '单位名称'; comment on column BM_BRXXB0.brlxgx is '联系人关系'; comment on column BM_BRXXB0.brlxxm is '联系人姓名'; comment on column BM_BRXXB0.brlxdz is '联系人地址'; comment on column BM_BRXXB0.brlxdh is '联系人电话'; comment on column BM_BRXXB0.brztqk is '职退情况'; comment on column BM_BRXXB0.brjkqk is '健康状况'; comment on column BM_BRXXB0.brlx00 is '病人类型'; comment on column BM_BRXXB0.czy000 is '操作员ID'; comment on column BM_BRXXB0.czrq00 is '操作日期'; comment on column BM_BRXXB0.czsj00 is '操作时间'; comment on column BM_BRXXB0.shr000 is '审核人姓名'; comment on column BM_BRXXB0.shrq00 is '审核日期'; comment on column BM_BRXXB0.rycs00 is '入院次数'; comment on column BM_BRXXB0.cyqkje is '病人出院后的欠款数额,供病人再次入院是查询提示'; comment on column BM_BRXXB0.zyzt00 is '病人在院状态,''0'':门诊,''1'':住院,''2'':其它,''3'':出院(在住院收费处入、出院时修改)'; comment on column BM_BRXXB0.sfyx00 is '状态 ''Y'':有效,''N'':停用'; comment on column BM_BRXXB0.bz0000 is '备注'; comment on column BM_BRXXB0.ybbrlb is '医保病人类别'; comment on column BM_BRXXB0.lbbh00 is '类别编号'; comment on column BM_BRXXB0.sfyd00 is '是否属于优待病人(挂号用,费用优待)'; comment on column BM_BRXXB0.dwzbid is '单位组别ID -->BM_DWZB00.DWZBID(体检系统用)'; comment on column BM_BRXXB0.brszsf is '病人所在省份'; comment on column BM_BRXXB0.brszs0 is '病人所在市(县、区)'; comment on column BM_BRXXB0.brszz0 is '病人所在镇(办事处)'; comment on column BM_BRXXB0.sfyxjb is '是否优先级别,挂号时使用(优先就诊)'; comment on column BM_BRXXB0.pysm00 is '拼音首码'; comment on column BM_BRXXB0.wbsm00 is '五笔首码'; comment on column BM_BRXXB0.lxrxb0 is '联系人性别'; comment on column BM_BRXXB0.lxrsfz is '联系人身份证'; comment on column BM_BRXXB0.brtz00 is '病人体重(单位:kg)'; comment on column BM_BRXXB0.fwbj00 is '病人服务半径'; comment on column BM_BRXXB0.sfydy0 is '是否运动员'; comment on column BM_BRXXB0.brszqy is '所在区域 ''0''区域内 ''1''区域外'; comment on column BM_BRXXB0.sfsd00 is '所否锁定'; comment on column BM_BRXXB0.tydwyb is '单位邮编'; comment on column BM_BRXXB0.rh0000 is 'RH血型'; comment on column BM_BRXXB0.grsfen is '个人身份类型'; comment on column BM_BRXXB0.grsfmc is '个人身份名称'; comment on column BM_BRXXB0.sfblwt is '是否办理委托0未办理1已办理'; comment on column BM_BRXXB0.mzzhid is '预交金时,扣款账户ID'; comment on column BM_BRXXB0.fbbh01 is '住院费别 F.K=BM_BRFBB0.FBBH00'; comment on column BM_BRXXB0.ybbrl1 is '住院医保病人类别,-->BM_YBBRLB.YBBRLB'; comment on column BM_BRXXB0.yblb01 is '住院病人医保类别,-->IC_YBBRLB.YBLB00'; comment on column BM_BRXXB0.daid00 is '档案ID'; comment on column BM_BRXXB0.card16 is 'CARD16'; comment on column BM_BRXXB0.wdwid0 is '外单位(系统)BRID00'; comment on column BM_BRXXB0.ygbh00 is '员工编号'; comment on column BM_BRXXB0.brszds is '病人所在地级市'; comment on column BM_BRXXB0.ndtcxe is '年度统筹限额(医保病人设定年度最高统筹支付金额)'; comment on column BM_BRXXB0.zyh000 is '住院号'; comment on column BM_BRXXB0.brxzdz is '病人现住址'; comment on column BM_BRXXB0.brxzsf is '现住省份'; comment on column BM_BRXXB0.brxzs0 is '现住市(县)'; comment on column BM_BRXXB0.brxzz0 is '现住镇乡1'; comment on column BM_BRXXB0.brxzc0 is '现住村'; comment on column BM_BRXXB0.xgrq00 is '修改日期'; -- Create/Recreate indexes create index INDEX_BM_BRXXB0_BMMC00 on BM_BRXXB0 (BMMC00) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 192K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_BRBLH0 on BM_BRXXB0 (BRBLH0) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 128K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_BRDH00 on BM_BRXXB0 (BRDH00) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_BRLXDH on BM_BRXXB0 (BRLXDH) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_BRXM00 on BM_BRXXB0 (BRXM00) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 192K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_BRZJBH on BM_BRXXB0 (BRZJBH) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_CZRQ00 on BM_BRXXB0 (CZRQ00) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 192K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_DWID00 on BM_BRXXB0 (TYDWID) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_MRN000 on BM_BRXXB0 (MRN000) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 128K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_WDWID0 on BM_BRXXB0 (WDWID0) tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_XGRQ00 on BM_BRXXB0 (XGRQ00) tablespace TS_YY_INDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 192K next 1M minextents 1 maxextents unlimited ); create index INDEX_BM_BRXXB0_YBKH00 on BM_BRXXB0 (YBKH00) tablespace TS_YY_INDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 128K next 1M minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table BM_BRXXB0 add constraint PK_BM_BRXXB0_BRID00 primary key (BRID00) using index tablespace TS_YY pctfree 10 initrans 2 maxtrans 255 storage ( initial 128K next 1M minextents 1 maxextents unlimited ); alter table BM_BRXXB0 add constraint FK_BM_BRXXB0_FBBH00 foreign key (FBBH00) references BM_BRFBB0 (FBBH00); alter table BM_BRXXB0 add constraint FK_BM_BRXXB0_TYDWID foreign key (TYDWID) references BM_TYDWB0 (DWID00);