LEAD存储服务器的示例数据库

步骤1:使用Shipping Database Schema配置LEAD存储服务器

步骤2:创建自定义存储数据访问层和配置程序集

步骤3:创建示例数据库

本教程使用Microsoft SQL Server 2008而且SQL Server Management Studio.您也可以使用SQL精简版,它是在安装Visual Studio时默认安装的。如果您使用SQL精简版,您可以下载SQL Server Management Studio Express(从Microsoft免费下载)。

脚本生成SQL Server 2008教程数据库

使用(主)/******对象:数据库[MyDicomDb]脚本日期:07/15/2013 13:02:13 ******/创建数据库[MyDicomDb]ALTER DATABASE [MyDicomDb] SET compatible level = 100If (1 = fulltextserviceproperty (“IsFullTextInstalled”))开始EXEC [MyDicomDb]。[dbo]。[sp_fulltext_database] @action =“启用”结束SET ANSI_NULL_DEFAULT OFF [MyDicomDbSET ANSI_NULLS OFF [MyDicomDbALTER DATABASE [MyDicomDb] SET ANSI_PADDING OFFALTER DATABASE [MyDicomDb] SET ANSI_WARNINGS OFF设置数据库的算术中止设置数据库自动关闭SET AUTO_CREATE_STATISTICS ON设置数据库自动收缩关闭SET AUTO_UPDATE_STATISTICS ONSET CURSOR_CLOSE_ON_COMMIT OFF设置数据库的全局默认值SET CONCAT_NULL_YIELDS_NULL OFF更改数据库[MyDicomDb]关闭数字中止ALTER DATABASE [MyDicomDb] SET QUOTED_IDENTIFIER OFF更改数据库[MyDicomDb]关闭递归触发器ALTER DATABASE [MyDicomDb] SET DISABLE_BROKER设置自动更新统计异步关闭设置数据库DATE_CORRELATION_OPTIMIZATION关闭取消数据库的可信赖性设置ALLOW_SNAPSHOT_ISOLATION关闭修改数据库参数关闭数据库的只读快照更改数据库[MyDicomDb]ALTER DATABASE [MyDicomDbALTER DATABASE [MyDicomDb] SET RECOVERY FULLSET MULTI_USER [MyDicomDb设置PAGE_VERIFY校验和ALTER DATABASE [MyDicomDb] SET db_chains OFF执行系统。sp_db_vardecimal_storage_format N“MyDicomDb”N“上”使用[MyDicomDb]/******对象:表[dbo]。[MyPatientTable]脚本日期:07/01/2013 17:44:15 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MyPatientTable]([PatientId] [int[id (1,1) not null][PatientIdentification] [nvarchar](70) NOT NULL,[PatientName] [nvarchar](max) NOT NULL,[病人生日][日期]NULL,[患者性别][nvarchar](50) NULL,[病人评论][nvarchar](200) NULL,约束[PK_Patient]主键聚集[PatientId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [uc_patientidentiid] UNIQUE非聚类[PatientIdentification] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:表[dbo]。[MyStudyTable]脚本日期:07/01/2013 17:44:15 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MyStudyTable]([StudyId] [int[id (1,1) not null][StudyPatientId] [int不是空的,[StudyStudyInstanceUID] [nvarchar](64) NOT NULL,[studydate] [date] NULL[StudyAccessionNumber] [nvarchar](64) NULL,[StudyStudyDescription] [nvarchar](256) NULL,[StudyReferringPhysiciansName] [nvarchar](50) NULL,[StudyStudyId] [nvarchar](16) NULL,约束[PK_Study]主键聚集[StudyId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [uc_StudyStudyInstanceUID] UNIQUE非聚类[StudyStudyInstanceUID] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:表[dbo]。[MySeriesTable]脚本日期:07/01/2013 17:44:15 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MySeriesTable]([SeriesId] [int[id (1,1) not null][SeriesStudyId] [int不是空的,[SeriesSeriesInstanceUID] [nvarchar](64) NOT NULL,[seriesbodypartdetected] [nvarchar](16) NULL,[SeriesSeriesNumber] [int空,[SeriesSeriesDescription] [nvarchar](300) NULL,[SeriesSeriesDate] [date] NULL,[SeriesModality] [nvarchar](50) NULL,约束[PK_Series]主键聚集[SeriesId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [uc_SerieSeriesInstanceUID] UNIQUE非集群SeriesSeriesInstanceUID ASC,[SeriesStudyId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:表[dbo]。[MyInstanceTable]脚本日期:07/01/2013 17:44:15 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MyInstanceTable]([ImageId] [bigint] id (1,1) NOT NULL,[ImageSeriesId] [int不是空的,[SOPInstanceUID] [nvarchar](64) NOT NULL,[ImageImageNumber] [int不是空的,[ImageLastStoreDate] [date] NULL,[ImageFilename] [nvarchar](400) NOT NULL,[ImageUniqueSOPClassUID] [nvarchar](64) NULL,[ImageRows] [bigint] NULL,[ImageColumns] [bigint] NULL,[imagebitsallocate] [bigint] NULL,约束[PK_Image]主键已聚集[ImageId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [IX_Image_SOPInstanceUID] UNIQUE非集群[SOPInstanceUID] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:ForeignKey [FK_DImage_Series]脚本日期:07/01/2013 17:44:15 ******/修改表[dbo]。[MyInstanceTable] WITH CHECK ADD CONSTRAINT [FK_DImage_Series]外键([ImageSeriesId])引用(dbo)。[MySeriesTable] ([SeriesId])删除级联修改表[dbo]。[MyInstanceTable]检查约束[FK_DImage_Series]/******对象:ForeignKey [FK_Series_Study]脚本日期:07/01/2013 17:44:15 ******/修改表[dbo]。[MySeriesTable] WITH CHECK ADD CONSTRAINT [FK_Series_Study]外键([SeriesStudyId])引用(dbo)。[MyStudyTable] ([StudyId])修改表[dbo]。[MySeriesTable]检查约束[FK_Series_Study]/******对象:ForeignKey [FK_Study_Patient]脚本日期:07/01/2013 17:44:15 ******/修改表[dbo]。[MyStudyTable] WITH CHECK ADD CONSTRAINT [FK_Study_Patient]外键([StudyPatientId])引用(dbo)。[MyPatientTable] ([PatientId])修改表[dbo]。[MyStudyTable]检查约束[FK_Study_Patient]

注意:

对于早期版本的SQL Server(即SQL Server 2005),不支持数据类型SqlDbType。日期

如果您使用的是SQL Server 2005,则可以使用以下脚本生成数据库,而不是使用数据类型SqlDbType。DateTime

脚本为SQL Server 2005生成教程数据库

使用(主)/******对象:数据库[MyDicomDb]脚本日期:08/12/2013 10:39:18 ******/创建数据库[MyDicomDb]If (1 = fulltextserviceproperty (“IsFullTextInstalled”))开始EXEC [MyDicomDb]。[dbo]。[sp_fulltext_database] @action =“启用”结束SET ANSI_NULL_DEFAULT OFF [MyDicomDbSET ANSI_NULLS OFF [MyDicomDbALTER DATABASE [MyDicomDb] SET ANSI_PADDING OFFALTER DATABASE [MyDicomDb] SET ANSI_WARNINGS OFF设置数据库的算术中止设置数据库自动关闭SET AUTO_CREATE_STATISTICS ON设置数据库自动收缩关闭SET AUTO_UPDATE_STATISTICS ONSET CURSOR_CLOSE_ON_COMMIT OFF设置数据库的全局默认值SET CONCAT_NULL_YIELDS_NULL OFF更改数据库[MyDicomDb]关闭数字中止ALTER DATABASE [MyDicomDb] SET QUOTED_IDENTIFIER OFF更改数据库[MyDicomDb]关闭递归触发器ALTER DATABASE [MyDicomDb] SET DISABLE_BROKER设置自动更新统计异步关闭设置数据库DATE_CORRELATION_OPTIMIZATION关闭取消数据库的可信赖性设置ALLOW_SNAPSHOT_ISOLATION关闭修改数据库参数关闭数据库的只读快照ALTER DATABASE [MyDicomDbALTER DATABASE [MyDicomDb] SET RECOVERY FULLSET MULTI_USER [MyDicomDb设置PAGE_VERIFY校验和ALTER DATABASE [MyDicomDb] SET db_chains OFF使用[MyDicomDb]/******对象:表[dbo]。[MyPatientTable]脚本日期:08/12/2013 10:39:19 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MyPatientTable]([PatientId] [int[id (1,1) not null][PatientIdentification] [nvarchar](70) NOT NULL,[PatientName] [nvarchar](max) NOT NULL,[病人生日][日期时间]NULL,[患者性别][nvarchar](50) NULL,[病人评论][nvarchar](200) NULL,约束[PK_Patient]主键聚集[PatientId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [uc_patientidentiid] UNIQUE非聚类[PatientIdentification] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:表[dbo]。[MyStudyTable]脚本日期:08/12/2013 10:39:19 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MyStudyTable]([StudyId] [int[id (1,1) not null][StudyPatientId] [int不是空的,[StudyStudyInstanceUID] [nvarchar](64) NOT NULL,[StudyStudyDate] [datetime] NULL[StudyAccessionNumber] [nvarchar](64) NULL,[StudyStudyDescription] [nvarchar](256) NULL,[StudyReferringPhysiciansName] [nvarchar](50) NULL,[StudyStudyId] [nvarchar](16) NULL,约束[PK_Study]主键聚集[StudyId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [uc_StudyStudyInstanceUID] UNIQUE非聚类[StudyStudyInstanceUID] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:表[dbo]。[MySeriesTable]脚本日期:08/12/2013 10:39:19 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MySeriesTable]([SeriesId] [int[id (1,1) not null][SeriesStudyId] [int不是空的,[SeriesSeriesInstanceUID] [nvarchar](64) NOT NULL,[seriesbodypartdetected] [nvarchar](16) NULL,[SeriesSeriesNumber] [int空,[SeriesSeriesDescription] [nvarchar](300) NULL,[SeriesSeriesDate] [datetime] NULL,[SeriesModality] [nvarchar](50) NULL,约束[PK_Series]主键聚集[SeriesId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [uc_SerieSeriesInstanceUID] UNIQUE非集群SeriesSeriesInstanceUID ASC,[SeriesStudyId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:表[dbo]。[MyInstanceTable]脚本日期:08/12/2013 10:39:19 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[MyInstanceTable]([ImageId] [bigint] id (1,1) NOT NULL,[ImageSeriesId] [int不是空的,[SOPInstanceUID] [nvarchar](64) NOT NULL,[ImageImageNumber] [int不是空的,[ImageLastStoreDate] [datetime] NULL,[ImageFilename] [nvarchar](400) NOT NULL,[ImageUniqueSOPClassUID] [nvarchar](64) NULL,[ImageRows] [bigint] NULL,[ImageColumns] [bigint] NULL,[imagebitsallocate] [bigint] NULL,约束[PK_Image]主键已聚集[ImageId] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary],CONSTRAINT [IX_Image_SOPInstanceUID] UNIQUE非集群[SOPInstanceUID] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]/******对象:ForeignKey [FK_Study_Patient]脚本日期:08/12/2013 10:39:19 ******/修改表[dbo]。[MyStudyTable] WITH CHECK ADD CONSTRAINT [FK_Study_Patient]外键([StudyPatientId])引用(dbo)。[MyPatientTable] ([PatientId])修改表[dbo]。[MyStudyTable]检查约束[FK_Study_Patient]/******对象:ForeignKey [FK_Series_Study]脚本日期:08/12/2013 10:39:19 ******/修改表[dbo]。[MySeriesTable] WITH CHECK ADD CONSTRAINT [FK_Series_Study]外键([SeriesStudyId])引用(dbo)。[MyStudyTable] ([StudyId])修改表[dbo]。[MySeriesTable]检查约束[FK_Series_Study]/******对象:ForeignKey [FK_DImage_Series]脚本日期:08/12/2013 10:39:19 ******/修改表[dbo]。[MyInstanceTable] WITH CHECK ADD CONSTRAINT [FK_DImage_Series]外键([ImageSeriesId])引用(dbo)。[MySeriesTable] ([SeriesId])删除级联修改表[dbo]。[MyInstanceTable]检查约束[FK_DImage_Series]

第四步:修改GlobalPacs.config使用新数据库

步骤5:将以下文件复制到{LEAD安装BIN}

步骤6:重新构建StorageServerManagerDemo_Original.exe

步骤7:修改应用程序配置文件以使用存储目录和数据集架构

步骤8:配置存储服务器管理器使用MyQueryIOD.xml

步骤9(可选)配置前转特性

脚本创建Forward表

使用[MyDicomDb]/******对象:表[dbo]。[Forward]脚本日期:09/04/2013 15:55:39 ******/设置ansi_nulls为on设置quoted_identifier为onCREATE TABLE [dbo].[Forward]([SOPInstanceUID] [nvarchar](64) NOT NULL,[ForwardDate] [datetime] NULL,[过期时间][日期时间]NULL,约束[PK_Forward]主键已聚集[SOPInstanceUID] ASC(pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary])在[主要的]修改表[dbo]。[Forward] WITH CHECK ADD CONSTRAINT [FK_Forward_Instance]外键([SOPInstanceUID])引用(dbo)。[MyInstanceTable] ([SOPInstanceUID])在级联更新时删除级联修改表[dbo]。[Forward]检查约束[FK_Forward_Instance]

步骤10:验证存储服务器管理器正在使用自定义数据库

帮助版本22.0.2023.2.17
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2023领德科技有限公司版权所有。<!--END Copyright notice-->
LEADTOOLS成像、医疗和文档
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2023领德科技有限公司版权所有。<!--END Copyright notice-->