新增限制的字段
alter table yp_zd_dict
add restriction_frequency varchar(8)
go
alter table yp_zd_dict
add restriction_quantity decimal(10, 2)
go
exec sp_addextendedproperty 'MS_Description', N'限制给药方式', 'SCHEMA', 'dbo', 'TABLE', 'yp_zd_dict', 'COLUMN',
'restriction_frequency'
go
exec sp_addextendedproperty 'MS_Description', N'限制一次用药数量', 'SCHEMA', 'dbo', 'TABLE', 'yp_zd_dict', 'COLUMN',
'restriction_quantity'
go
新增医嘱相互排斥表
-- auto-generated definition
create table repel_order
(
id varchar(18) not null
constraint repel_order_pk
primary key,
order_code varchar(12) not null,
repel_order varchar(12) not null
)
go
exec sp_addextendedproperty 'MS_Description', N'医嘱相互排斥', 'SCHEMA', 'dbo', 'TABLE', 'repel_order'
go
exec sp_addextendedproperty 'MS_Description', N'主键', 'SCHEMA', 'dbo', 'TABLE', 'repel_order', 'COLUMN', 'id'
go
exec sp_addextendedproperty 'MS_Description', N'医嘱编码', 'SCHEMA', 'dbo', 'TABLE', 'repel_order', 'COLUMN',
'order_code'
go
exec sp_addextendedproperty 'MS_Description', N'排斥哪些医嘱', 'SCHEMA', 'dbo', 'TABLE', 'repel_order', 'COLUMN',
'repel_order'
go
create index repel_order_order_code_index
on repel_order (order_code)
go
create index repel_order_repel_order_index
on repel_order (repel_order)
go
检验检查排斥
-- auto-generated definition
create table repel_jy_jc
(
id varchar(18) not null
constraint repel_jy_jc_pk
primary key,
order_code varchar(20) not null,
repel_code varchar(18) not null,
repel_hour int not null
)
go
exec sp_addextendedproperty 'MS_Description', N'检验检查配置', 'SCHEMA', 'dbo', 'TABLE', 'repel_jy_jc'
go
exec sp_addextendedproperty 'MS_Description', N'主键', 'SCHEMA', 'dbo', 'TABLE', 'repel_jy_jc', 'COLUMN', 'id'
go
exec sp_addextendedproperty 'MS_Description', N'排斥线吗', 'SCHEMA', 'dbo', 'TABLE', 'repel_jy_jc', 'COLUMN',
'repel_code'
go
exec sp_addextendedproperty 'MS_Description', N'多少个小时后可以开', 'SCHEMA', 'dbo', 'TABLE', 'repel_jy_jc', 'COLUMN',
'repel_hour'
go
create index repel_jy_jc_order_code_index
on repel_jy_jc (order_code)
go
create index repel_jy_jc_repel_code_index
on repel_jy_jc (repel_code)
go