This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "SqlServer RIMBAA script"

From HL7Wiki
Jump to navigation Jump to search
(New page: USE [HL7RimJavaSig] GO →‎***** Object: Table [dbo].[Act] Script Date: 02/03/2009 15:34:46 *****: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [...)
 
Line 1: Line 1:
 +
<pre><code>
 
USE [HL7RimJavaSig]
 
USE [HL7RimJavaSig]
 
GO
 
GO
Line 1,228: Line 1,229:
 
ALTER TABLE [dbo].[SubstanceAdministration_maxDoseQuantity] CHECK CONSTRAINT [FK1F6822DB3527D223]
 
ALTER TABLE [dbo].[SubstanceAdministration_maxDoseQuantity] CHECK CONSTRAINT [FK1F6822DB3527D223]
 
GO
 
GO
 +
</code></pre>

Revision as of 14:36, 3 February 2009

<code>
USE [HL7RimJavaSig]
GO
/****** Object:  Table [dbo].[Act]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Act](
	[internalId] [varchar](255) NOT NULL,
	[internalDiscriminator] [varchar](255) NOT NULL,
	[internalVersionNumber] [bigint] NOT NULL,
	[classCode] [varchar](32) NULL,
	[moodCode] [varchar](32) NULL,
	[cloneCode_code] [varchar](400) NULL,
	[code_code] [varchar](400) NULL,
	[code_codeSystem] [varchar](400) NULL,
	[code_displayName] [varchar](400) NULL,
	[code_xml] [nvarchar](max) NULL,
	[negationInd] [varchar](255) NULL,
	[derivationExpr] [varchar](255) NULL,
	[title] [nvarchar](max) NULL,
	[text] [nvarchar](max) NULL,
	[statusCode_code] [varchar](400) NULL,
	[statusCode_codeSystem] [varchar](400) NULL,
	[effectiveTime_low] [varchar](400) NULL,
	[effectiveTime_high] [varchar](400) NULL,
	[effectiveTime_xml] [nvarchar](max) NULL,
	[activityTime_low] [varchar](400) NULL,
	[activityTime_high] [varchar](400) NULL,
	[activityTime_xml] [nvarchar](max) NULL,
	[availabilityTime] [varchar](255) NULL,
	[repeatNumber] [nvarchar](max) NULL,
	[interruptibleInd] [varchar](255) NULL,
	[levelCode_code] [varchar](400) NULL,
	[levelCode_codeSystem] [varchar](400) NULL,
	[levelCode_displayName] [varchar](400) NULL,
	[levelCode_xml] [nvarchar](max) NULL,
	[independentInd] [varchar](255) NULL,
	[uncertaintyCode_code] [varchar](400) NULL,
	[uncertaintyCode_codeSystem] [varchar](400) NULL,
	[uncertaintyCode_displayName] [varchar](400) NULL,
	[uncertaintyCode_xml] [nvarchar](max) NULL,
	[languageCode_code] [varchar](400) NULL,
	[languageCode_codeSystem] [varchar](400) NULL,
	[languageCode_displayName] [varchar](400) NULL,
	[languageCode_xml] [nvarchar](max) NULL,
	[balanceAmt] [nvarchar](max) NULL,
	[currencyCode_code] [varchar](400) NULL,
	[currencyCode_codeSystem] [varchar](400) NULL,
	[currencyCode_displayName] [varchar](400) NULL,
	[currencyCode_xml] [nvarchar](max) NULL,
	[interestRateQuantity_numeratorNumber] [varchar](400) NULL,
	[interestRateQuantity_numeratorUnit] [varchar](400) NULL,
	[interestRateQuantity_denominatorNumber] [varchar](400) NULL,
	[interestRateQuantity_denominatorUnit] [varchar](400) NULL,
	[interestRateQuantity_xml] [nvarchar](max) NULL,
	[allowedBalanceQuantity] [nvarchar](max) NULL,
	[parameterValue] [nvarchar](max) NULL,
	[paymentTermsCode_code] [varchar](400) NULL,
	[paymentTermsCode_codeSystem] [varchar](400) NULL,
	[paymentTermsCode_displayName] [varchar](400) NULL,
	[paymentTermsCode_xml] [nvarchar](max) NULL,
	[amt] [nvarchar](max) NULL,
	[creditExchangeRateQuantity] [varchar](255) NULL,
	[debitExchangeRateQuantity] [varchar](255) NULL,
	[unitQuantity_numeratorNumber] [varchar](400) NULL,
	[unitQuantity_numeratorUnit] [varchar](400) NULL,
	[unitQuantity_denominatorNumber] [varchar](400) NULL,
	[unitQuantity_denominatorUnit] [varchar](400) NULL,
	[unitQuantity_xml] [nvarchar](max) NULL,
	[unitPriceAmt_numeratorNumber] [varchar](400) NULL,
	[unitPriceAmt_numeratorUnit] [varchar](400) NULL,
	[unitPriceAmt_denominatorNumber] [varchar](400) NULL,
	[unitPriceAmt_denominatorUnit] [varchar](400) NULL,
	[unitPriceAmt_xml] [nvarchar](max) NULL,
	[netAmt] [nvarchar](max) NULL,
	[factorNumber] [varchar](255) NULL,
	[pointsNumber] [varchar](255) NULL,
	[value_displayName] [varchar](400) NULL,
	[value_code] [varchar](400) NULL,
	[value_codeSystem] [varchar](400) NULL,
	[value_number] [varchar](400) NULL,
	[value_unit] [varchar](400) NULL,
	[value_xml] [nvarchar](max) NULL,
	[subjectOrientationCode_code] [varchar](400) NULL,
	[subjectOrientationCode_codeSystem] [varchar](400) NULL,
	[subjectOrientationCode_displayName] [varchar](400) NULL,
	[subjectOrientationCode_xml] [nvarchar](max) NULL,
	[detectionMethodCode_code] [varchar](400) NULL,
	[detectionMethodCode_codeSystem] [varchar](400) NULL,
	[detectionMethodCode_displayName] [varchar](400) NULL,
	[detectionMethodCode_xml] [nvarchar](max) NULL,
	[transmissionModeCode_code] [varchar](400) NULL,
	[transmissionModeCode_codeSystem] [varchar](400) NULL,
	[transmissionModeCode_displayName] [varchar](400) NULL,
	[transmissionModeCode_xml] [nvarchar](max) NULL,
	[diseaseImportedCode_code] [varchar](400) NULL,
	[diseaseImportedCode_codeSystem] [varchar](400) NULL,
	[diseaseImportedCode_displayName] [varchar](400) NULL,
	[diseaseImportedCode_xml] [nvarchar](max) NULL,
	[admissionReferralSourceCode_code] [varchar](400) NULL,
	[admissionReferralSourceCode_codeSystem] [varchar](400) NULL,
	[admissionReferralSourceCode_displayName] [varchar](400) NULL,
	[admissionReferralSourceCode_xml] [nvarchar](max) NULL,
	[lengthOfStayQuantity] [nvarchar](max) NULL,
	[dischargeDispositionCode_code] [varchar](400) NULL,
	[dischargeDispositionCode_codeSystem] [varchar](400) NULL,
	[dischargeDispositionCode_displayName] [varchar](400) NULL,
	[dischargeDispositionCode_xml] [nvarchar](max) NULL,
	[preAdmitTestInd] [varchar](255) NULL,
	[routeCode_code] [varchar](400) NULL,
	[routeCode_codeSystem] [varchar](400) NULL,
	[routeCode_displayName] [varchar](400) NULL,
	[routeCode_xml] [nvarchar](max) NULL,
	[doseQuantity] [nvarchar](max) NULL,
	[rateQuantity] [nvarchar](max) NULL,
	[administrationUnitCode_code] [varchar](400) NULL,
	[administrationUnitCode_codeSystem] [varchar](400) NULL,
	[administrationUnitCode_displayName] [varchar](400) NULL,
	[administrationUnitCode_xml] [nvarchar](max) NULL,
	[quantity] [nvarchar](max) NULL,
	[expectedUseTime] [nvarchar](max) NULL,
	[energyQuantity] [nvarchar](max) NULL,
	[carbohydrateQuantity] [nvarchar](max) NULL,
	[ownershipLevelCode_code] [varchar](400) NULL,
	[ownershipLevelCode_codeSystem] [varchar](400) NULL,
	[ownershipLevelCode_displayName] [varchar](400) NULL,
	[ownershipLevelCode_xml] [nvarchar](max) NULL,
	[setId_root] [varchar](400) NULL,
	[setId_extension] [varchar](400) NULL,
	[versionNumber] [varchar](255) NULL,
	[completionCode_code] [varchar](400) NULL,
	[completionCode_codeSystem] [varchar](400) NULL,
	[completionCode_displayName] [varchar](400) NULL,
	[completionCode_xml] [nvarchar](max) NULL,
	[storageCode_code] [varchar](400) NULL,
	[storageCode_codeSystem] [varchar](400) NULL,
	[storageCode_displayName] [varchar](400) NULL,
	[storageCode_xml] [nvarchar](max) NULL,
	[copyTime] [varchar](255) NULL,
	[bibliographicDesignationText] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED 
(
	[internalId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[entity]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[entity](
	[internalId] [varchar](255) NOT NULL,
	[internalDiscriminator] [varchar](255) NOT NULL,
	[internalVersionNumber] [bigint] NOT NULL,
	[classCode] [varchar](32) NULL,
	[determinerCode] [varchar](32) NULL,
	[cloneCode_code] [varchar](400) NULL,
	[code_code] [varchar](400) NULL,
	[code_codeSystem] [varchar](400) NULL,
	[code_displayName] [varchar](400) NULL,
	[code_xml] [varchar](400) NULL,
	[quantity] [nvarchar](max) NULL,
	[desc] [nvarchar](max) NULL,
	[statusCode_code] [varchar](400) NULL,
	[statusCode_codeSystem] [varchar](400) NULL,
	[existenceTime] [nvarchar](max) NULL,
	[riskCode_code] [varchar](400) NULL,
	[riskCode_codeSystem] [varchar](400) NULL,
	[riskCode_displayName] [varchar](400) NULL,
	[riskCode_xml] [nvarchar](max) NULL,
	[handlingCode_code] [varchar](400) NULL,
	[handlingCode_codeSystem] [varchar](400) NULL,
	[handlingCode_displayName] [varchar](400) NULL,
	[handlingCode_xml] [nvarchar](max) NULL,
	[administrativeGenderCode_code] [varchar](400) NULL,
	[administrativeGenderCode_codeSystem] [varchar](400) NULL,
	[administrativeGenderCode_displayName] [varchar](400) NULL,
	[administrativeGenderCode_xml] [nvarchar](max) NULL,
	[birthTime] [varchar](255) NULL,
	[deceasedInd] [varchar](255) NULL,
	[deceasedTime] [varchar](255) NULL,
	[multipleBirthInd] [varchar](255) NULL,
	[multipleBirthOrderNumber] [varchar](255) NULL,
	[organDonorInd] [varchar](255) NULL,
	[strainText] [nvarchar](max) NULL,
	[genderStatusCode_code] [varchar](400) NULL,
	[genderStatusCode_codeSystem] [varchar](400) NULL,
	[genderStatusCode_displayName] [varchar](400) NULL,
	[genderStatusCode_xml] [nvarchar](max) NULL,
	[maritalStatusCode_code] [varchar](400) NULL,
	[maritalStatusCode_codeSystem] [varchar](400) NULL,
	[maritalStatusCode_displayName] [varchar](400) NULL,
	[maritalStatusCode_xml] [nvarchar](max) NULL,
	[educationLevelCode_code] [varchar](400) NULL,
	[educationLevelCode_codeSystem] [varchar](400) NULL,
	[educationLevelCode_displayName] [varchar](400) NULL,
	[educationLevelCode_xml] [nvarchar](max) NULL,
	[livingArrangementCode_code] [varchar](400) NULL,
	[livingArrangementCode_codeSystem] [varchar](400) NULL,
	[livingArrangementCode_displayName] [varchar](400) NULL,
	[livingArrangementCode_xml] [nvarchar](max) NULL,
	[religiousAffiliationCode_code] [varchar](400) NULL,
	[religiousAffiliationCode_codeSystem] [varchar](400) NULL,
	[religiousAffiliationCode_displayName] [varchar](400) NULL,
	[religiousAffiliationCode_xml] [nvarchar](max) NULL,
	[formCode_code] [varchar](400) NULL,
	[formCode_codeSystem] [varchar](400) NULL,
	[formCode_displayName] [varchar](400) NULL,
	[formCode_xml] [nvarchar](max) NULL,
	[lotNumberText] [varchar](255) NULL,
	[expirationTime] [nvarchar](max) NULL,
	[stabilityTime] [nvarchar](max) NULL,
	[capacityQuantity] [nvarchar](max) NULL,
	[heightQuantity] [nvarchar](max) NULL,
	[diameterQuantity] [nvarchar](max) NULL,
	[capTypeCode_code] [varchar](400) NULL,
	[capTypeCode_codeSystem] [varchar](400) NULL,
	[capTypeCode_displayName] [varchar](400) NULL,
	[capTypeCode_xml] [nvarchar](max) NULL,
	[separatorTypeCode_code] [varchar](400) NULL,
	[separatorTypeCode_codeSystem] [varchar](400) NULL,
	[separatorTypeCode_displayName] [varchar](400) NULL,
	[separatorTypeCode_xml] [nvarchar](max) NULL,
	[barrierDeltaQuantity] [nvarchar](max) NULL,
	[bottomDeltaQuantity] [nvarchar](max) NULL,
	[manufacturerModelName] [nvarchar](max) NULL,
	[softwareName] [nvarchar](max) NULL,
	[localRemoteControlStateCode_code] [varchar](400) NULL,
	[localRemoteControlStateCode_codeSystem] [varchar](400) NULL,
	[localRemoteControlStateCode_displayName] [varchar](400) NULL,
	[localRemoteControlStateCode_xml] [nvarchar](max) NULL,
	[alertLevelCode_code] [varchar](400) NULL,
	[alertLevelCode_codeSystem] [varchar](400) NULL,
	[alertLevelCode_displayName] [varchar](400) NULL,
	[alertLevelCode_xml] [nvarchar](max) NULL,
	[lastCalibrationTime] [varchar](255) NULL,
	[standardIndustryClassCode_code] [varchar](400) NULL,
	[standardIndustryClassCode_codeSystem] [varchar](400) NULL,
	[standardIndustryClassCode_displayName] [varchar](400) NULL,
	[standardIndustryClassCode_xml] [nvarchar](max) NULL,
	[mobileInd] [varchar](255) NULL,
	[addr] [nvarchar](max) NULL,
	[directionsText] [nvarchar](max) NULL,
	[positionText] [nvarchar](max) NULL,
	[gpsText] [varchar](255) NULL,
PRIMARY KEY CLUSTERED 
(
	[internalId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[actrelationship]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[actrelationship](
	[internalId] [varchar](255) NOT NULL,
	[internalDiscriminator] [varchar](255) NOT NULL,
	[internalVersionNumber] [bigint] NOT NULL,
	[typeCode] [varchar](32) NULL,
	[cloneCode_code] [varchar](400) NULL,
	[SourceInternalId] [varchar](255) NULL,
	[TargetInternalId] [varchar](255) NULL,
	[inversionInd] [varchar](255) NULL,
	[contextControlCode_code] [varchar](400) NULL,
	[contextControlCode_codeSystem] [varchar](400) NULL,
	[contextConductionInd] [varchar](255) NULL,
	[sequenceNumber] [varchar](255) NULL,
	[priorityNumber] [varchar](255) NULL,
	[pauseQuantity] [nvarchar](max) NULL,
	[checkpointCode_code] [varchar](400) NULL,
	[checkpointCode_codeSystem] [varchar](400) NULL,
	[splitCode_code] [varchar](400) NULL,
	[splitCode_codeSystem] [varchar](400) NULL,
	[joinCode_code] [varchar](400) NULL,
	[joinCode_codeSystem] [varchar](400) NULL,
	[negationInd] [varchar](255) NULL,
	[conjunctionCode_code] [varchar](400) NULL,
	[conjunctionCode_codeSystem] [varchar](400) NULL,
	[localVariableName] [varchar](255) NULL,
	[seperatableInd] [varchar](255) NULL,
	[subsetCode_code] [varchar](400) NULL,
	[subsetCode_codeSystem] [varchar](400) NULL,
	[uncertaintyCode_code] [varchar](400) NULL,
	[uncertaintyCode_codeSystem] [varchar](400) NULL,
	[uncertaintyCode_displayName] [varchar](400) NULL,
	[uncertaintyCode_xml] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED 
(
	[internalId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Act_reasonCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Act_reasonCode](
	[ActInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Act_priorityCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Act_priorityCode](
	[ActInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Act_id]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Act_id](
	[actInternalId] [varchar](255) NOT NULL,
	[root] [varchar](400) NULL,
	[extension] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Act_confidentialityCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Act_confidentialityCode](
	[ActInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[InvoiceElement_modifierCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[InvoiceElement_modifierCode](
	[InvoiceElementInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Entity_telecom]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Entity_telecom](
	[EntityInternalId] [varchar](255) NOT NULL,
	[url] [varchar](400) NULL,
	[use_] [varchar](400) NULL,
	[useablePeriod] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Entity_name]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Entity_name](
	[EntityInternalId] [varchar](255) NOT NULL,
	[familyName] [varchar](400) NULL,
	[givenName] [varchar](400) NULL,
	[trivialName] [varchar](400) NULL,
	[xml] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Entity_id]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Entity_id](
	[entityInternalId] [varchar](255) NOT NULL,
	[root] [varchar](400) NULL,
	[extension] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Organization_addr]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Organization_addr](
	[OrganizationInternalId] [varchar](255) NOT NULL,
	[elt] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Observation_targetSiteCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Observation_targetSiteCode](
	[ObservationInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Observation_methodCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Observation_methodCode](
	[ObservationInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Observation_interpretationCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Observation_interpretationCode](
	[ObservationInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[role_]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[role_](
	[internalId] [varchar](255) NOT NULL,
	[internalDiscriminator] [varchar](255) NOT NULL,
	[internalVersionNumber] [bigint] NOT NULL,
	[classCode] [varchar](32) NULL,
	[cloneCode_code] [varchar](400) NULL,
	[PlayerInternalId] [varchar](255) NULL,
	[ScoperInternalId] [varchar](255) NULL,
	[code_code] [varchar](400) NULL,
	[code_codeSystem] [varchar](400) NULL,
	[code_displayName] [varchar](400) NULL,
	[code_xml] [nvarchar](max) NULL,
	[negationInd] [varchar](255) NULL,
	[statusCode_code] [varchar](400) NULL,
	[statusCode_codeSystem] [varchar](400) NULL,
	[effectiveTime] [nvarchar](max) NULL,
	[certificateText] [nvarchar](max) NULL,
	[quantity_numeratorNumber] [varchar](400) NULL,
	[quantity_numeratorUnit] [varchar](400) NULL,
	[quantity_denominatorNumber] [varchar](400) NULL,
	[quantity_denominatorUnit] [varchar](400) NULL,
	[quantity_xml] [nvarchar](max) NULL,
	[positionNumber] [nvarchar](max) NULL,
	[approachSiteCode_code] [varchar](400) NULL,
	[approachSiteCode_codeSystem] [varchar](400) NULL,
	[approachSiteCode_displayName] [varchar](400) NULL,
	[approachSiteCode_xml] [nvarchar](max) NULL,
	[targetSiteCode_code] [varchar](400) NULL,
	[targetSiteCode_codeSystem] [varchar](400) NULL,
	[targetSiteCode_displayName] [varchar](400) NULL,
	[targetSiteCode_xml] [nvarchar](max) NULL,
	[gaugeQuantity] [nvarchar](max) NULL,
	[jobCode_code] [varchar](400) NULL,
	[jobCode_codeSystem] [varchar](400) NULL,
	[jobCode_displayName] [varchar](400) NULL,
	[jobCode_xml] [nvarchar](max) NULL,
	[jobTitleName] [nvarchar](max) NULL,
	[jobClassCode_code] [varchar](400) NULL,
	[jobClassCode_codeSystem] [varchar](400) NULL,
	[jobClassCode_displayName] [varchar](400) NULL,
	[jobClassCode_xml] [nvarchar](max) NULL,
	[occupationCode_code] [varchar](400) NULL,
	[occupationCode_codeSystem] [varchar](400) NULL,
	[occupationCode_displayName] [varchar](400) NULL,
	[occupationCode_xml] [nvarchar](max) NULL,
	[salaryTypeCode_code] [varchar](400) NULL,
	[salaryTypeCode_codeSystem] [varchar](400) NULL,
	[salaryTypeCode_displayName] [varchar](400) NULL,
	[salaryTypeCode_xml] [nvarchar](max) NULL,
	[salaryQuantity] [nvarchar](max) NULL,
	[hazardExposureText] [nvarchar](max) NULL,
	[protectiveEquipmentText] [nvarchar](max) NULL,
	[recertificationTime] [varchar](255) NULL,
	[veryImportantPersonCode_code] [varchar](400) NULL,
	[veryImportantPersonCode_codeSystem] [varchar](400) NULL,
	[veryImportantPersonCode_displayName] [varchar](400) NULL,
	[veryImportantPersonCode_xml] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED 
(
	[internalId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Procedure_targetSiteCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Procedure_targetSiteCode](
	[ProcedureInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Procedure_methodCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Procedure_methodCode](
	[ProcedureInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Procedure_approachSiteCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Procedure_approachSiteCode](
	[ProcedureInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Person_raceCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Person_raceCode](
	[PersonInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Person_ethnicGroupCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Person_ethnicGroupCode](
	[PersonInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Person_disabilityCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Person_disabilityCode](
	[PersonInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Person_addr]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Person_addr](
	[PersonInternalId] [varchar](255) NOT NULL,
	[elt] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PatientEncounter_specialCourtesiesCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PatientEncounter_specialCourtesiesCode](
	[PatientEncounterInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PatientEncounter_specialArrangementCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PatientEncounter_specialArrangementCode](
	[PatientEncounterInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SubstanceAdministration_maxDoseQuantity]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SubstanceAdministration_maxDoseQuantity](
	[SubstanceAdministrationInternalId] [varchar](255) NOT NULL,
	[numeratorNumber] [varchar](400) NULL,
	[numeratorUnit] [varchar](400) NULL,
	[denominatorNumber] [varchar](400) NULL,
	[denominatorUnit] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SubstanceAdministration_doseCheckQuantity]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SubstanceAdministration_doseCheckQuantity](
	[SubstanceAdministrationInternalId] [varchar](255) NOT NULL,
	[numeratorNumber] [varchar](400) NULL,
	[numeratorUnit] [varchar](400) NULL,
	[denominatorNumber] [varchar](400) NULL,
	[denominatorUnit] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SubstanceAdministration_approachSiteCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SubstanceAdministration_approachSiteCode](
	[SubstanceAdministrationInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[rolelink]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[rolelink](
	[internalId] [varchar](255) NOT NULL,
	[internalDiscriminator] [varchar](255) NOT NULL,
	[internalVersionNumber] [bigint] NOT NULL,
	[typeCode] [varchar](32) NULL,
	[cloneCode_code] [varchar](400) NULL,
	[SourceInternalId] [varchar](255) NULL,
	[TargetInternalId] [varchar](255) NULL,
	[priorityNumber] [varchar](255) NULL,
	[effectiveTime] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED 
(
	[internalId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Role_telecom]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Role_telecom](
	[RoleInternalId] [varchar](255) NOT NULL,
	[url] [varchar](400) NULL,
	[use_] [varchar](400) NULL,
	[useablePeriod] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Role_name]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Role_name](
	[RoleInternalId] [varchar](255) NOT NULL,
	[familyName] [varchar](400) NULL,
	[givenName] [varchar](400) NULL,
	[trivialName] [varchar](400) NULL,
	[xml] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Role_id]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Role_id](
	[roleInternalId] [varchar](255) NOT NULL,
	[root] [varchar](400) NULL,
	[extension] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Role_confidentialityCode]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Role_confidentialityCode](
	[RoleInternalId] [varchar](255) NOT NULL,
	[code] [varchar](400) NULL,
	[codeSystem] [varchar](400) NULL,
	[displayName] [varchar](400) NULL,
	[xml] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Role_addr]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Role_addr](
	[RoleInternalId] [varchar](255) NOT NULL,
	[elt] [nvarchar](max) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[participation]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[participation](
	[internalId] [varchar](255) NOT NULL,
	[internalDiscriminator] [varchar](255) NOT NULL,
	[internalVersionNumber] [bigint] NOT NULL,
	[typeCode] [varchar](32) NULL,
	[cloneCode_code] [varchar](400) NULL,
	[ActInternalId] [varchar](255) NULL,
	[RoleInternalId] [varchar](255) NULL,
	[functionCode_code] [varchar](400) NULL,
	[functionCode_codeSystem] [varchar](400) NULL,
	[functionCode_displayName] [varchar](400) NULL,
	[functionCode_xml] [nvarchar](max) NULL,
	[contextControlCode_code] [varchar](400) NULL,
	[contextControlCode_codeSystem] [varchar](400) NULL,
	[sequenceNumber] [varchar](255) NULL,
	[negationInd] [varchar](255) NULL,
	[noteText] [nvarchar](max) NULL,
	[time] [nvarchar](max) NULL,
	[modeCode_code] [varchar](400) NULL,
	[modeCode_codeSystem] [varchar](400) NULL,
	[modeCode_displayName] [varchar](400) NULL,
	[modeCode_xml] [nvarchar](max) NULL,
	[awarenessCode_code] [varchar](400) NULL,
	[awarenessCode_codeSystem] [varchar](400) NULL,
	[awarenessCode_displayName] [varchar](400) NULL,
	[awarenessCode_xml] [nvarchar](max) NULL,
	[signatureCode_code] [varchar](400) NULL,
	[signatureCode_codeSystem] [varchar](400) NULL,
	[signatureCode_displayName] [varchar](400) NULL,
	[signatureCode_xml] [nvarchar](max) NULL,
	[signatureText] [nvarchar](max) NULL,
	[performInd] [varchar](255) NULL,
	[substitutionConditionCode_code] [varchar](400) NULL,
	[substitutionConditionCode_codeSystem] [varchar](400) NULL,
	[substitutionConditionCode_displayName] [varchar](400) NULL,
	[substitutionConditionCode_xml] [nvarchar](max) NULL,
	[subsetCode_code] [varchar](400) NULL,
	[subsetCode_codeSystem] [varchar](400) NULL,
	[statusCode_code] [varchar](400) NULL,
	[statusCode_codeSystem] [varchar](400) NULL,
PRIMARY KEY CLUSTERED 
(
	[internalId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ManagedParticipation_id]    Script Date: 02/03/2009 15:34:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ManagedParticipation_id](
	[ManagedParticipationInternalId] [varchar](255) NOT NULL,
	[root] [varchar](400) NULL,
	[extension] [varchar](400) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  ForeignKey [FK7B6C91E6D338BA0B]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Act_confidentialityCode]  WITH CHECK ADD  CONSTRAINT [FK7B6C91E6D338BA0B] FOREIGN KEY([ActInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Act_confidentialityCode] CHECK CONSTRAINT [FK7B6C91E6D338BA0B]
GO
/****** Object:  ForeignKey [FK74944408D338BA0B]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Act_id]  WITH CHECK ADD  CONSTRAINT [FK74944408D338BA0B] FOREIGN KEY([actInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Act_id] CHECK CONSTRAINT [FK74944408D338BA0B]
GO
/****** Object:  ForeignKey [FKC9CD5C5ED338BA0B]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Act_priorityCode]  WITH CHECK ADD  CONSTRAINT [FKC9CD5C5ED338BA0B] FOREIGN KEY([ActInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Act_priorityCode] CHECK CONSTRAINT [FKC9CD5C5ED338BA0B]
GO
/****** Object:  ForeignKey [FK7E63EC3ED338BA0B]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Act_reasonCode]  WITH CHECK ADD  CONSTRAINT [FK7E63EC3ED338BA0B] FOREIGN KEY([ActInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Act_reasonCode] CHECK CONSTRAINT [FK7E63EC3ED338BA0B]
GO
/****** Object:  ForeignKey [FK68ABA3CA3BD6608A]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[actrelationship]  WITH CHECK ADD  CONSTRAINT [FK68ABA3CA3BD6608A] FOREIGN KEY([TargetInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[actrelationship] CHECK CONSTRAINT [FK68ABA3CA3BD6608A]
GO
/****** Object:  ForeignKey [FK68ABA3CA50ADC04A]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[actrelationship]  WITH CHECK ADD  CONSTRAINT [FK68ABA3CA50ADC04A] FOREIGN KEY([TargetInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[actrelationship] CHECK CONSTRAINT [FK68ABA3CA50ADC04A]
GO
/****** Object:  ForeignKey [FK68ABA3CA60B53294]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[actrelationship]  WITH CHECK ADD  CONSTRAINT [FK68ABA3CA60B53294] FOREIGN KEY([SourceInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[actrelationship] CHECK CONSTRAINT [FK68ABA3CA60B53294]
GO
/****** Object:  ForeignKey [FK68ABA3CA758C9254]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[actrelationship]  WITH CHECK ADD  CONSTRAINT [FK68ABA3CA758C9254] FOREIGN KEY([SourceInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[actrelationship] CHECK CONSTRAINT [FK68ABA3CA758C9254]
GO
/****** Object:  ForeignKey [FK4B4DFED73668AD6F]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Entity_id]  WITH CHECK ADD  CONSTRAINT [FK4B4DFED73668AD6F] FOREIGN KEY([entityInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Entity_id] CHECK CONSTRAINT [FK4B4DFED73668AD6F]
GO
/****** Object:  ForeignKey [FKAFCBED473668AD6F]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Entity_name]  WITH CHECK ADD  CONSTRAINT [FKAFCBED473668AD6F] FOREIGN KEY([EntityInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Entity_name] CHECK CONSTRAINT [FKAFCBED473668AD6F]
GO
/****** Object:  ForeignKey [FKE85D695B3668AD6F]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Entity_telecom]  WITH CHECK ADD  CONSTRAINT [FKE85D695B3668AD6F] FOREIGN KEY([EntityInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Entity_telecom] CHECK CONSTRAINT [FKE85D695B3668AD6F]
GO
/****** Object:  ForeignKey [FK2CA16C749B4375E7]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[InvoiceElement_modifierCode]  WITH CHECK ADD  CONSTRAINT [FK2CA16C749B4375E7] FOREIGN KEY([InvoiceElementInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[InvoiceElement_modifierCode] CHECK CONSTRAINT [FK2CA16C749B4375E7]
GO
/****** Object:  ForeignKey [FK53735E782088E18D]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[ManagedParticipation_id]  WITH CHECK ADD  CONSTRAINT [FK53735E782088E18D] FOREIGN KEY([ManagedParticipationInternalId])
REFERENCES [dbo].[participation] ([internalId])
GO
ALTER TABLE [dbo].[ManagedParticipation_id] CHECK CONSTRAINT [FK53735E782088E18D]
GO
/****** Object:  ForeignKey [FK9CF95328AB4FE4BF]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Observation_interpretationCode]  WITH CHECK ADD  CONSTRAINT [FK9CF95328AB4FE4BF] FOREIGN KEY([ObservationInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Observation_interpretationCode] CHECK CONSTRAINT [FK9CF95328AB4FE4BF]
GO
/****** Object:  ForeignKey [FKE18E3081AB4FE4BF]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Observation_methodCode]  WITH CHECK ADD  CONSTRAINT [FKE18E3081AB4FE4BF] FOREIGN KEY([ObservationInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Observation_methodCode] CHECK CONSTRAINT [FKE18E3081AB4FE4BF]
GO
/****** Object:  ForeignKey [FKFA500F18AB4FE4BF]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Observation_targetSiteCode]  WITH CHECK ADD  CONSTRAINT [FKFA500F18AB4FE4BF] FOREIGN KEY([ObservationInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Observation_targetSiteCode] CHECK CONSTRAINT [FKFA500F18AB4FE4BF]
GO
/****** Object:  ForeignKey [FKB7FAEF5D9994234F]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Organization_addr]  WITH CHECK ADD  CONSTRAINT [FKB7FAEF5D9994234F] FOREIGN KEY([OrganizationInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Organization_addr] CHECK CONSTRAINT [FKB7FAEF5D9994234F]
GO
/****** Object:  ForeignKey [FKB6018D41B42BD995]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[participation]  WITH CHECK ADD  CONSTRAINT [FKB6018D41B42BD995] FOREIGN KEY([RoleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[participation] CHECK CONSTRAINT [FKB6018D41B42BD995]
GO
/****** Object:  ForeignKey [FKB6018D41BE615A4B]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[participation]  WITH CHECK ADD  CONSTRAINT [FKB6018D41BE615A4B] FOREIGN KEY([ActInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[participation] CHECK CONSTRAINT [FKB6018D41BE615A4B]
GO
/****** Object:  ForeignKey [FKB6018D41D338BA0B]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[participation]  WITH CHECK ADD  CONSTRAINT [FKB6018D41D338BA0B] FOREIGN KEY([ActInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[participation] CHECK CONSTRAINT [FKB6018D41D338BA0B]
GO
/****** Object:  ForeignKey [FKB6018D41D98D00D5]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[participation]  WITH CHECK ADD  CONSTRAINT [FKB6018D41D98D00D5] FOREIGN KEY([RoleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[participation] CHECK CONSTRAINT [FKB6018D41D98D00D5]
GO
/****** Object:  ForeignKey [FKCB495DAFD3D84A5]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[PatientEncounter_specialArrangementCode]  WITH CHECK ADD  CONSTRAINT [FKCB495DAFD3D84A5] FOREIGN KEY([PatientEncounterInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[PatientEncounter_specialArrangementCode] CHECK CONSTRAINT [FKCB495DAFD3D84A5]
GO
/****** Object:  ForeignKey [FK6D604333D3D84A5]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[PatientEncounter_specialCourtesiesCode]  WITH CHECK ADD  CONSTRAINT [FK6D604333D3D84A5] FOREIGN KEY([PatientEncounterInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[PatientEncounter_specialCourtesiesCode] CHECK CONSTRAINT [FK6D604333D3D84A5]
GO
/****** Object:  ForeignKey [FK4A032E7B40E5ECD3]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Person_addr]  WITH CHECK ADD  CONSTRAINT [FK4A032E7B40E5ECD3] FOREIGN KEY([PersonInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Person_addr] CHECK CONSTRAINT [FK4A032E7B40E5ECD3]
GO
/****** Object:  ForeignKey [FK8FC56F340E5ECD3]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Person_disabilityCode]  WITH CHECK ADD  CONSTRAINT [FK8FC56F340E5ECD3] FOREIGN KEY([PersonInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Person_disabilityCode] CHECK CONSTRAINT [FK8FC56F340E5ECD3]
GO
/****** Object:  ForeignKey [FKCDF83F3340E5ECD3]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Person_ethnicGroupCode]  WITH CHECK ADD  CONSTRAINT [FKCDF83F3340E5ECD3] FOREIGN KEY([PersonInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Person_ethnicGroupCode] CHECK CONSTRAINT [FKCDF83F3340E5ECD3]
GO
/****** Object:  ForeignKey [FK6476D9E840E5ECD3]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Person_raceCode]  WITH CHECK ADD  CONSTRAINT [FK6476D9E840E5ECD3] FOREIGN KEY([PersonInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[Person_raceCode] CHECK CONSTRAINT [FK6476D9E840E5ECD3]
GO
/****** Object:  ForeignKey [FKC5D075A8E769018D]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Procedure_approachSiteCode]  WITH CHECK ADD  CONSTRAINT [FKC5D075A8E769018D] FOREIGN KEY([ProcedureInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Procedure_approachSiteCode] CHECK CONSTRAINT [FKC5D075A8E769018D]
GO
/****** Object:  ForeignKey [FKD31AF7AE769018D]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Procedure_methodCode]  WITH CHECK ADD  CONSTRAINT [FKD31AF7AE769018D] FOREIGN KEY([ProcedureInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Procedure_methodCode] CHECK CONSTRAINT [FKD31AF7AE769018D]
GO
/****** Object:  ForeignKey [FK99B96991E769018D]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Procedure_targetSiteCode]  WITH CHECK ADD  CONSTRAINT [FK99B96991E769018D] FOREIGN KEY([ProcedureInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[Procedure_targetSiteCode] CHECK CONSTRAINT [FK99B96991E769018D]
GO
/****** Object:  ForeignKey [FK67A8EA9216BEE2A]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[role_]  WITH CHECK ADD  CONSTRAINT [FK67A8EA9216BEE2A] FOREIGN KEY([ScoperInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[role_] CHECK CONSTRAINT [FK67A8EA9216BEE2A]
GO
/****** Object:  ForeignKey [FK67A8EA9468BE86A]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[role_]  WITH CHECK ADD  CONSTRAINT [FK67A8EA9468BE86A] FOREIGN KEY([ScoperInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[role_] CHECK CONSTRAINT [FK67A8EA9468BE86A]
GO
/****** Object:  ForeignKey [FK67A8EA9ADE744AD]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[role_]  WITH CHECK ADD  CONSTRAINT [FK67A8EA9ADE744AD] FOREIGN KEY([PlayerInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[role_] CHECK CONSTRAINT [FK67A8EA9ADE744AD]
GO
/****** Object:  ForeignKey [FK67A8EA9D3073EED]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[role_]  WITH CHECK ADD  CONSTRAINT [FK67A8EA9D3073EED] FOREIGN KEY([PlayerInternalId])
REFERENCES [dbo].[entity] ([internalId])
GO
ALTER TABLE [dbo].[role_] CHECK CONSTRAINT [FK67A8EA9D3073EED]
GO
/****** Object:  ForeignKey [FK8B70CDFAB42BD995]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Role_addr]  WITH CHECK ADD  CONSTRAINT [FK8B70CDFAB42BD995] FOREIGN KEY([RoleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[Role_addr] CHECK CONSTRAINT [FK8B70CDFAB42BD995]
GO
/****** Object:  ForeignKey [FK86930C0AB42BD995]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Role_confidentialityCode]  WITH CHECK ADD  CONSTRAINT [FK86930C0AB42BD995] FOREIGN KEY([RoleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[Role_confidentialityCode] CHECK CONSTRAINT [FK86930C0AB42BD995]
GO
/****** Object:  ForeignKey [FKB54A2D64B42BD995]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Role_id]  WITH CHECK ADD  CONSTRAINT [FKB54A2D64B42BD995] FOREIGN KEY([roleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[Role_id] CHECK CONSTRAINT [FKB54A2D64B42BD995]
GO
/****** Object:  ForeignKey [FK8B76AC94B42BD995]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Role_name]  WITH CHECK ADD  CONSTRAINT [FK8B76AC94B42BD995] FOREIGN KEY([RoleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[Role_name] CHECK CONSTRAINT [FK8B76AC94B42BD995]
GO
/****** Object:  ForeignKey [FKCB694AEEB42BD995]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[Role_telecom]  WITH CHECK ADD  CONSTRAINT [FKCB694AEEB42BD995] FOREIGN KEY([RoleInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[Role_telecom] CHECK CONSTRAINT [FKCB694AEEB42BD995]
GO
/****** Object:  ForeignKey [FKF02705702AB936FA]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[rolelink]  WITH CHECK ADD  CONSTRAINT [FKF02705702AB936FA] FOREIGN KEY([SourceInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[rolelink] CHECK CONSTRAINT [FKF02705702AB936FA]
GO
/****** Object:  ForeignKey [FKF02705702B3B8C30]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[rolelink]  WITH CHECK ADD  CONSTRAINT [FKF02705702B3B8C30] FOREIGN KEY([TargetInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[rolelink] CHECK CONSTRAINT [FKF02705702B3B8C30]
GO
/****** Object:  ForeignKey [FKF0270570501A5E3A]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[rolelink]  WITH CHECK ADD  CONSTRAINT [FKF0270570501A5E3A] FOREIGN KEY([SourceInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[rolelink] CHECK CONSTRAINT [FKF0270570501A5E3A]
GO
/****** Object:  ForeignKey [FKF02705705DA64F0]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[rolelink]  WITH CHECK ADD  CONSTRAINT [FKF02705705DA64F0] FOREIGN KEY([TargetInternalId])
REFERENCES [dbo].[role_] ([internalId])
GO
ALTER TABLE [dbo].[rolelink] CHECK CONSTRAINT [FKF02705705DA64F0]
GO
/****** Object:  ForeignKey [FK215EABED3527D223]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[SubstanceAdministration_approachSiteCode]  WITH CHECK ADD  CONSTRAINT [FK215EABED3527D223] FOREIGN KEY([SubstanceAdministrationInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[SubstanceAdministration_approachSiteCode] CHECK CONSTRAINT [FK215EABED3527D223]
GO
/****** Object:  ForeignKey [FKA5A380653527D223]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[SubstanceAdministration_doseCheckQuantity]  WITH CHECK ADD  CONSTRAINT [FKA5A380653527D223] FOREIGN KEY([SubstanceAdministrationInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[SubstanceAdministration_doseCheckQuantity] CHECK CONSTRAINT [FKA5A380653527D223]
GO
/****** Object:  ForeignKey [FK1F6822DB3527D223]    Script Date: 02/03/2009 15:34:46 ******/
ALTER TABLE [dbo].[SubstanceAdministration_maxDoseQuantity]  WITH CHECK ADD  CONSTRAINT [FK1F6822DB3527D223] FOREIGN KEY([SubstanceAdministrationInternalId])
REFERENCES [dbo].[Act] ([internalId])
GO
ALTER TABLE [dbo].[SubstanceAdministration_maxDoseQuantity] CHECK CONSTRAINT [FK1F6822DB3527D223]
GO
</code>