USE [Ehis]
GO

/****** Object:  Table [dbo].[MZYSZ_YSZDK]    Script Date: 02/25/2019 13:20:38 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MZYSZ_YSZDK](
	[Zdxh] [varchar](36) NOT NULL,
	[Zlh] [varchar](36) NOT NULL,
	[Zdrq] [datetime] NOT NULL,
	[Zdys] [int] NOT NULL,
	[Cfzbz] [int] NULL,
	[Zddm] [varchar](20) NOT NULL,
	[Ssy] [int] NULL,
	[Szy] [int] NULL,
	[Xtz] [money] NULL,
	[Sffr] [int] NULL,
	[Fbrq] [datetime] NULL,
	[Mb] [int] NULL,
	[Hx] [int] NULL,
	[Tw] [money] NULL,
	[Sfxysccb] [smallint] NULL,
	[Zs] [text] NULL,
	[Tj] [text] NULL,
	[xbs] [varchar](300) NULL,
	[Jbxxbh] [int] NULL,
	[zdbw] [varchar](30) NULL,
	[Bz] [varchar](255) NULL,
	[Jlzt] [smallint] NULL,
	[othersysbrid] [varchar](36) NOT NULL,
	[othersyszlid] [varchar](36) NOT NULL,
	[othersyssoid] [varchar](36) NOT NULL,
	[ZddmPlus] [smallint] NOT NULL,
	[ztbz] [int] NOT NULL,
	[jymz] [int] NOT NULL,
	[jyxh] [int] NOT NULL,
	[jycs] [varchar](200) NULL,
	[jws] [varchar](300) NULL,
	[gms] [varchar](300) NULL,
	[jcnr] [varchar](200) NULL,
	[xdyw] [varchar](300) NULL,
	[Blxh] [int] NOT NULL,
	[zyzzdm] [varchar](20) NULL,
	[mzzg] [varchar](10) NULL,
	[bldy] [int] NOT NULL,
	[Height] [float] NULL,
	[Weight] [float] NULL,
	[Fjjg] [varchar](200) NULL,
 CONSTRAINT [PK_MZYSZ_YSZDK] PRIMARY KEY CLUSTERED 
(
	[Zdxh] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Zdxh(诊断序号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Zdxh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Zlh(治疗号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Zlh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Zdrq(诊断日期)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Zdrq'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Zdys(诊断医生)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Zdys'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Cfzbz(初复诊标志)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Cfzbz'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Zddm(诊断代码)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Zddm'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ssy(收缩压)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Ssy'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Szy(舒张压)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Szy'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Xtz(血糖值)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Xtz'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Sffr(是否发热)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Sffr'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Fbrq(发病日期)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Fbrq'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Mb(脉搏)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Mb'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Xt(心跳)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Hx'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Tw(体温)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Tw'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Sfxysccb(是否首次发现血压大于等于140/90mmHg)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Sfxysccb'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Zs(主诉)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Zs'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Tj(体检)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Tj'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'xbs(现病史)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'xbs'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Jbxxbh(基本信息编号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Jbxxbh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'zdbw()' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'zdbw'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Bz(备注)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Bz'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Jlzt(记录状态)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'Jlzt'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'othersysbrid(其他系统病人唯一号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'othersysbrid'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'othersyszlid(其他系统挂号唯一号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'othersyszlid'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'othersyssoid(其他系统SO唯一号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK', @level2type=N'COLUMN',@level2name=N'othersyssoid'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MZYSZ_YSZDK(医生诊断库)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_YSZDK'
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [Cfzbz]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [Sffr]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT (getdate()) FOR [Fbrq]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [Sfxysccb]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [Jlzt]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [ZddmPlus]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [ztbz]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [jymz]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [jyxh]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  DEFAULT ((0)) FOR [Blxh]
GO

ALTER TABLE [dbo].[MZYSZ_YSZDK] ADD  CONSTRAINT [bldy]  DEFAULT ((-1)) FOR [bldy]
GO


