新增限制的字段
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
检验检查的申请理由
create table yj_req_large_scale_project
(
id varchar(18) not null,
req_no int not null,
pat_no varchar(18) not null,
times int not null,
req_tpe varchar not null,
req_instructions nvarchar(500) not null,
create_date datetime default getdate() not null
)
go
exec sp_addextendedproperty 'MS_Description', N'医技大型申请说明', 'SCHEMA', 'dbo', 'TABLE',
'yj_req_large_scale_project'
go
exec sp_addextendedproperty 'MS_Description', N'申请单号', 'SCHEMA', 'dbo', 'TABLE', 'yj_req_large_scale_project',
'COLUMN', 'req_no'
go
exec sp_addextendedproperty 'MS_Description', N'住院号/门诊号', 'SCHEMA', 'dbo', 'TABLE', 'yj_req_large_scale_project',
'COLUMN', 'pat_no'
go
exec sp_addextendedproperty 'MS_Description', N'住院次数门诊次数', 'SCHEMA', 'dbo', 'TABLE',
'yj_req_large_scale_project', 'COLUMN', 'times'
go
exec sp_addextendedproperty 'MS_Description', N'1-门诊 2-住院', 'SCHEMA', 'dbo', 'TABLE', 'yj_req_large_scale_project',
'COLUMN', 'req_tpe'
go
exec sp_addextendedproperty 'MS_Description', N'创建时间', 'SCHEMA', 'dbo', 'TABLE', 'yj_req_large_scale_project',
'COLUMN', 'create_date'
go