USE [Ehis]
GO

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

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MZYSZ_CFMXK](
	[cfmxxh] [varchar](36) NOT NULL,
	[cfxh] [varchar](36) NOT NULL,
	[cfxmdm] [int] NOT NULL,
	[jchyxmxh] [int] NULL,
	[Dldm] [int] NOT NULL,
	[Mzgg] [char](32) NULL,
	[Jl] [char](32) NULL,
	[bxlx] [smallint] NULL,
	[dj] [money] NULL,
	[sl] [smallint] NOT NULL,
	[ypyf] [int] NULL,
	[ypsypldm] [char](10) NULL,
	[ypyl] [real] NULL,
	[ypyldw] [char](8) NULL,
	[ypsyts] [smallint] NULL,
	[cyts] [smallint] NULL,
	[yszt] [char](50) NULL,
	[ypfzbh] [smallint] NULL,
	[Tfsj] [datetime] NULL,
	[Tfczy] [int] NULL,
	[jlzt] [smallint] NOT NULL,
	[pxxh] [int] IDENTITY(1,1) NOT NULL,
	[bkbdj] [money] NULL,
	[ybxybl] [float] NOT NULL,
	[xdcfm] [char](50) NULL,
	[zxbm] [int] NULL,
	[jf] [int] NULL,
	[ds] [varchar](10) NULL,
 CONSTRAINT [PK_MZYSZ_CFMXK] PRIMARY KEY CLUSTERED 
(
	[cfmxxh] 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]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'cfmxxh(处方明细序号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'cfmxxh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'cfxh(处方序号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'cfxh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'cfxmdm(处方项目代码)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'cfxmdm'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'jchyxmxh(检查化验项目序号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'jchyxmxh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Dldm(大类代码)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'Dldm'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Mzgg(门诊规格)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'Mzgg'
GO

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

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'bxlx(报销类型)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'bxlx'
GO

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

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

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ypyf(药品用法)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'ypyf'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ypsypldm(药品使用频次代码)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'ypsypldm'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ypyl(药品用量)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'ypyl'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ypyldw(药品用量单位)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'ypyldw'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ypsyts(药品使用天数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'ypsyts'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'cyts(草药贴数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'cyts'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'yszt(医生嘱托)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'yszt'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ypfzbh(药品分组编号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'ypfzbh'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Tfsj(退费时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'Tfsj'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Tfczy(退费操作员)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK', @level2type=N'COLUMN',@level2name=N'Tfczy'
GO

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

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MZYSZ_CFMXK(处方明细库)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MZYSZ_CFMXK'
GO

ALTER TABLE [dbo].[MZYSZ_CFMXK] ADD  DEFAULT ((1)) FOR [ypsyts]
GO

ALTER TABLE [dbo].[MZYSZ_CFMXK] ADD  DEFAULT ((1)) FOR [ybxybl]
GO


