我的数据仓库中有两张表,需要在多个级别上进行审计。第一个表的结构如下:
CREATE TABLE [dbo].[EnctrAPR](
[EncounterNumber] [varchar](50) NOT NULL,
[MedRec] [varchar](50) NULL,
[AdmitDate ] [datetime] NULL,
[DischargeDate ] [datetime] NULL,
[Age ] [varchar](50) NULL,
[Disposition ] [varchar](50) NULL,
[DRG ] [varchar](50) NULL,
[APRDRG ] [varchar](50) NULL,
[APRDRGWeight] [varchar](50) NULL,
[SOI] [varchar](50) NULL,
[ROM] [varchar](50) NULL,
[Age18] [bit] NULL,
[Age18To64] [bit] NULL,
[Age65] [bit] NULL,
[BowelObstruction] [bit] NULL,
[AMI] [bit] NULL,
[CABG] [bit] NULL,
[Valve] [bit] NULL,
[PCI] [bit] NULL,
[Sepsis] [bit] NULL,
[GSP] [bit] NULL,
[HF] [bit] NULL,
[Stroke] [bit] NULL,
[Pneumonia] [bit] NULL,
[DKA] [bit] NULL,
[GIBleed] [bit] NULL,
[Pancreatitis] [bit] NULL,
[RF] [bit] NULL,
[PE] [bit] NULL,
[COPD] [bit] NULL,
CONSTRAINT [PK_EnctrAPR] PRIMARY KEY CLUSTERED
(
[EncounterNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
我需要对数据仓库中的另一个表进行几次审计。它们是: 识别上表中不在 DWH 表中的记录。识别 DWH 表中不在上表中的记录。记录上面每个位字段为 TRUE 但在 DWH 中为 FALSE 的记录。确认给定日期范围内的总记录数。
我可以使用 SSIS 来完成这些审核吗?或者,存储过程和 SSIS 的组合是最好的选择吗?请向我提供一些关于如何最好地自动化此类审计的建议。