This is for my personal use and not official in any way.
All tables have an int id column that is converted to a varchar in the named primary key column.
NULL and NOT NULL settings are not consistent with CSV specs to allow construction of records.
Square PEG Data
/****** Object: Table [dbo].[hmis_Affiliation] ******/
CREATE TABLE [dbo].[hmis_Affiliation](
[id] [int] IDENTITY(1,1) NOT NULL,
[AffiliationID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[ResProjectID] [varchar](32) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Affiliation] PRIMARY KEY CLUSTERED
(
[AffiliationID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Client] ******/
CREATE TABLE [dbo].[hmis_Client](
[id] [int] IDENTITY(1,1) NOT NULL,
[PersonalID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[FirstName] [varchar](50) NULL,
[MiddleName] [varchar](50) NULL,
[LastName] [varchar](50) NULL,
[NameSuffix] [varchar](50) NULL,
[NameDataQuality] [int] NOT NULL,
[SSN] [varchar](9) NULL,
[SSNDataQuality] [int] NOT NULL,
[DOB] [date] NOT NULL,
[DOBDataQuality] [int] NOT NULL,
[AmIndAKNative] [int] NOT NULL,
[Asian] [int] NOT NULL,
[BlackAfAmerican] [int] NOT NULL,
[NativeHIOtherPacific] [int] NOT NULL,
[White] [int] NOT NULL,
[RaceNone] [int] NULL,
[Ethnicity] [int] NOT NULL,
[Gender] [int] NOT NULL,
[VeteranStatus] [int] NOT NULL,
[YearEnteredService] [int] NULL,
[YearSeparated] [int] NULL,
[WorldWarII] [int] NULL,
[KoreanWar] [int] NULL,
[VietnamWar] [int] NULL,
[DesertStorm] [int] NULL,
[AfghanistanOEF] [int] NULL,
[IraqOIF] [int] NULL,
[IraqOND] [int] NULL,
[OtherTheater] [int] NULL,
[MilitaryBranch] [int] NULL,
[DischargeStatus] [int] NULL,
[DateCreated] [datetime] NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Client] PRIMARY KEY CLUSTERED
(
[PersonalID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Disabilities] ******/
CREATE TABLE [dbo].[hmis_Disabilities](
[id] [int] IDENTITY(1,1) NOT NULL,
[DisabilitiesID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[EnrollmentID] [varchar](32) NOT NULL,
[PersonalID] [varchar](32) NOT NULL,
[InformationDate] [date] NOT NULL,
[DisabilityType] [int] NOT NULL,
[DisabilityResponse] [int] NOT NULL,
[IndefiniteAndImpairs] [int] NULL,
[TCellCountAvailable] [int] NULL,
[TCellCount] [int] NULL,
[TCellSource] [int] NULL,
[ViralLoadAvailable] [int] NULL,
[ViralLoad] [int] NULL,
[ViralLoadSource] [int] NULL,
[DataCollectionStage] [int] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Disabilities] PRIMARY KEY CLUSTERED
(
[DisabilitiesID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_EmploymentEducation] ******/
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[hmis_EmploymentEducation](
[id] [int] IDENTITY(1,1) NOT NULL,
[EmploymentEducationID] AS (CONVERT([varchar](32),[id])) PERSISTED,
[EnrollmentID] [varchar](32) NOT NULL,
[PersonalID] [varchar](32) NOT NULL,
[InformationDate] [date] NOT NULL,
[LastGradeCompleted] [int] NULL,
[SchoolStatus] [int] NULL,
[Employed] [int] NULL,
[EmploymentType] [int] NULL,
[NotEmployedReason] [int] NULL,
[DataCollectionStage] [int] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_EmploymentEducation] PRIMARY KEY CLUSTERED
(
[id] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Enrollment] ******/
CREATE TABLE [dbo].[hmis_Enrollment](
[id] [int] IDENTITY(1,1) NOT NULL,
[EnrollmentID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[PersonalID] [varchar](32) NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[EntryDate] [date] NOT NULL,
[HouseholdID] [varchar](32) NOT NULL,
[RelationshipToHoH] [int] NOT NULL,
[LivingSituation] [int] NULL,
[LengthOfStay] [int] NULL,
[LOSUnderThreshold] [int] NULL,
[PreviousStreetESSH] [int] NULL,
[DateToStreetESSH] [date] NULL,
[TimesHomelessPastThreeYears] [int] NULL,
[MonthsHomelessPastThreeYears] [int] NULL,
[DisablingCondition] [int] NOT NULL,
[DateOfEngagement] [date] NULL,
[MoveInDate] [date] NULL,
[DateOfPATHStatus] [date] NULL,
[ClientEnrolledInPATH] [int] NULL,
[ReasonNotEnrolled] [int] NULL,
[WorstHousingSituation] [int] NULL,
[PercentAMI] [int] NULL,
[LastPermanentStreet] [varchar](100) NULL,
[LastPermanentCity] [varchar](50) NULL,
[LastPermanentState] [varchar](2) NULL,
[LastPermanentZIP] [varchar](5) NULL,
[AddressDataQuality] [int] NULL,
[DateOfBCPStatus] [date] NULL,
[EligibleForRHY] [int] NULL,
[ReasonNoServices] [int] NULL,
[RunawayYouth] [int] NULL,
[SexualOrientation] [int] NULL,
[FormerWardChildWelfare] [int] NULL,
[ChildWelfareYears] [int] NULL,
[ChildWelfareMonths] [int] NULL,
[FormerWardJuvenileJustice] [int] NULL,
[JuvenileJusticeYears] [int] NULL,
[JuvenileJusticeMonths] [int] NULL,
[UnemploymentFam] [int] NULL,
[MentalHealthIssuesFam] [int] NULL,
[PhysicalDisabilityFam] [int] NULL,
[AlcoholDrugAbuseFam] [int] NULL,
[InsufficientIncome] [int] NULL,
[IncarceratedParent] [int] NULL,
[ReferralSource] [int] NULL,
[CountOutreachReferralApproaches] [int] NULL,
[UrgentReferral] [int] NULL,
[TimeToHousingLoss] [int] NULL,
[ZeroIncome] [int] NULL,
[AnnualPercentAMI] [int] NULL,
[FinancialChange] [int] NULL,
[HouseholdChange] [int] NULL,
[EvictionHistory] [int] NULL,
[SubsidyAtRisk] [int] NULL,
[LiteralHomelessHistory] [int] NULL,
[DisabledHoH] [int] NULL,
[CriminalRecord] [int] NULL,
[SexOffender] [int] NULL,
[DependentUnder6] [int] NULL,
[SingleParent] [int] NULL,
[HH5Plus] [int] NULL,
[IraqAfghanistan] [int] NULL,
[FemVet] [int] NULL,
[HPScreeningScore] [int] NULL,
[ThresholdScore] [int] NULL,
[VAMCStation] [varchar](5) NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Enrollment] PRIMARY KEY CLUSTERED
(
[EnrollmentID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_EnrollmentCoC] ******/
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[hmis_EnrollmentCoC](
[id] [int] IDENTITY(1,1) NOT NULL,
[EnrollmentCoCID] AS (CONVERT([varchar](32),[id])) PERSISTED,
[EnrollmentID] [varchar](32) NOT NULL,
[HouseholdID] [varchar](32) NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[PersonalID] [varchar](32) NOT NULL,
[InformationDate] [date] NOT NULL,
[CoCCode] [varchar](6) NOT NULL,
[DataCollectionStage] [int] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_EnrollmentCoC] PRIMARY KEY CLUSTERED
(
[EnrollmentID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Exit] ******/
CREATE TABLE [dbo].[hmis_Exit](
[id] [int] IDENTITY(1,1) NOT NULL,
[ExitID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[EnrollmentID] [varchar](32) NULL,
[ExitDate] [date] NOT NULL,
[Destination] [int] NOT NULL,
[OtherDestination] [varchar](50) NULL,
[AssessmentDisposition] [int] NULL,
[OtherDisposition] [varchar](50) NULL,
[HousingAssessment] [int] NULL,
[SubsidyInformation] [int] NULL,
[ProjectCompletionStatus] [int] NULL,
[EarlyExitReason] [int] NULL,
[ExchangeForSex] [int] NULL,
[ExchangeForSexPastThreeMonths] [int] NULL,
[CountOfExchangeForSex] [int] NULL,
[AskedOrForcedToExchangeForSex] [int] NULL,
[AskedOrForcedToExchangeForSexPastThreeMonths] [int] NULL,
[WorkPlaceViolenceThreats] [int] NULL,
[WorkplacePromiseDifference] [int] NULL,
[CoercedToContinueWork] [int] NULL,
[LaborExploitPastThreeMonths] [int] NULL,
[CounselingReceived] [int] NULL,
[IndividualCounseling] [int] NULL,
[FamilyCounseling] [int] NULL,
[GroupCounseling] [int] NULL,
[SessionCountAtExit] [int] NULL,
[PostExitCounselingPlan] [int] NULL,
[SessionsInPlan] [int] NULL,
[DestinationSafeClient] [int] NULL,
[DestinationSafeWorker] [int] NULL,
[PosAdultConnections] [int] NULL,
[PosPeerConnections] [int] NULL,
[PosCommunityConnections] [int] NULL,
[AftercareDate] [date] NULL,
[AftercareProvided] [int] NULL,
[EmailSocialMedia] [int] NULL,
[Telephone] [int] NULL,
[InPersonIndividual] [int] NULL,
[InPersonGroup] [int] NULL,
[CMExitReason] [int] NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Exit] PRIMARY KEY CLUSTERED
(
[ExitID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Export] ******/
CREATE TABLE [dbo].[hmis_Export](
[id] [int] IDENTITY(1900,1) NOT NULL,
[ExportID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[SourceType] [int] NOT NULL,
[SourceID] [varchar](32) NULL,
[SourceName] [varchar](50) NULL,
[SourceContactFirst] [varchar](50) NULL,
[SourceContactLast] [varchar](50) NULL,
[SourceContactPhone] [varchar](10) NULL,
[SourceContactExtension] [varchar](5) NULL,
[SourceContactEmail] [varchar](70) NULL,
[ExportDate] [datetime] NOT NULL,
[ExportStartDate] [date] NOT NULL,
[ExportEndDate] [date] NOT NULL,
[SoftwareName] [varchar](50) NOT NULL,
[SoftwareVersion] [varchar](50) NULL,
[ExportPeriodType] [int] NOT NULL,
[ExportDirective] [int] NOT NULL,
[HashStatus] [int] NOT NULL,
CONSTRAINT [pk_Export] PRIMARY KEY CLUSTERED
(
[ExportID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Funder] ******/
CREATE TABLE [dbo].[hmis_Funder](
[id] [int] IDENTITY(1,1) NOT NULL,
[FunderID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[Funder] [int] NOT NULL,
[GrantID] [varchar](32) NOT NULL,
[StartDate] [date] NOT NULL,
[EndDate] [date] NULL,
[DateCreated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Funder] PRIMARY KEY CLUSTERED
(
[FunderID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Geography] ******/
CREATE TABLE [dbo].[hmis_Geography](
[id] [int] IDENTITY(1,1) NOT NULL,
[ProjectCoCID] [varchar](32) NOT NULL,
[GeographyID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[CoCCode] [varchar](6) NOT NULL,
[InformationDate] [date] NOT NULL,
[Geocode] [varchar](6) NOT NULL,
[GeographyType] [int] NOT NULL,
[Address1] [varchar](100) NULL,
[Address2] [varchar](100) NULL,
[City] [varchar](50) NULL,
[State] [varchar](2) NULL,
[ZIP] [varchar](5) NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Geography] PRIMARY KEY CLUSTERED
(
[GeographyID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_HealthAndDV] ******/
CREATE TABLE [dbo].[hmis_HealthAndDV](
[id] [int] IDENTITY(1,1) NOT NULL,
[HealthAndDVID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[EnrollmentID] [varchar](32) NOT NULL,
[InformationDate] [date] NOT NULL,
[DomesticViolenceVictim] [int] NULL,
[WhenOccurred] [int] NULL,
[CurrentlyFleeing] [int] NULL,
[GeneralHealthStatus] [int] NULL,
[DentalHealthStatus] [int] NULL,
[MentalHealthStatus] [int] NULL,
[PregnancyStatus] [int] NULL,
[DueDate] [date] NULL,
[DataCollectionStage] [int] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_HealthAndDV] PRIMARY KEY CLUSTERED
(
[HealthAndDVID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_IncomeBenefits] ******/
CREATE TABLE [dbo].[hmis_IncomeBenefits](
[id] [int] IDENTITY(1,1) NOT NULL,
[IncomeBenefitsID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[EnrollmentID] [varchar](32) NULL,
[PersonalID] [int] NULL,
[InformationDate] [date] NOT NULL,
[IncomeFromAnySource] [int] NULL,
[TotalMonthlyIncome] [money] NULL,
[Earned] [int] NULL,
[EarnedAmount] [money] NULL,
[Unemployment] [int] NULL,
[UnemploymentAmount] [money] NULL,
[SSI] [int] NULL,
[SSIAmount] [money] NULL,
[SSDI] [int] NULL,
[SSDIAmount] [money] NULL,
[VADisabilityService] [int] NULL,
[VADisabilityServiceAmount] [money] NULL,
[VADisabilityNonService] [int] NULL,
[VADisabilityNonServiceAmount] [money] NULL,
[PrivateDisability] [int] NULL,
[PrivateDisabilityAmount] [money] NULL,
[WorkersComp] [int] NULL,
[WorkersCompAmount] [money] NULL,
[TANF] [int] NULL,
[TANFAmount] [money] NULL,
[GA] [int] NULL,
[GAAmount] [money] NULL,
[SocSecRetirement] [int] NULL,
[SocSecRetirementAmount] [money] NULL,
[Pension] [int] NULL,
[PensionAmount] [money] NULL,
[ChildSupport] [int] NULL,
[ChildSupportAmount] [money] NULL,
[Alimony] [int] NULL,
[AlimonyAmount] [money] NULL,
[OtherIncomeSource] [int] NULL,
[OtherIncomeAmount] [money] NULL,
[OtherIncomeSourceIdentify] [varchar](50) NULL,
[BenefitsFromAnySource] [int] NULL,
[SNAP] [int] NULL,
[WIC] [int] NULL,
[TANFChildCare] [int] NULL,
[TANFTransportation] [int] NULL,
[OtherTANF] [int] NULL,
[OtherBenefitsSource] [int] NULL,
[OtherBenefitsSourceIdentify] [varchar](50) NULL,
[InsuranceFromAnySource] [int] NULL,
[Medicaid] [int] NULL,
[NoMedicaidReason] [int] NULL,
[Medicare] [int] NULL,
[NoMedicareReason] [int] NULL,
[SCHIP] [int] NULL,
[NoSCHIPReason] [int] NULL,
[VAMedicalServices] [int] NULL,
[NoVAMedReason] [int] NULL,
[EmployerProvided] [int] NULL,
[NoEmployerProvidedReason] [int] NULL,
[COBRA] [int] NULL,
[NoCOBRAReason] [int] NULL,
[PrivatePay] [int] NULL,
[NoPrivatePayReason] [int] NULL,
[StateHealthIns] [int] NULL,
[NoStateHealthInsReason] [int] NULL,
[IndianHealthServices] [int] NULL,
[NoIndianHealthServicesReason] [int] NULL,
[OtherInsurance] [int] NULL,
[OtherInsuranceIdentify] [varchar](50) NULL,
[HIVAIDSAssistance] [int] NULL,
[NoHIVAIDSAssistanceReason] [int] NULL,
[ADAP] [int] NULL,
[NoADAPReason] [int] NULL,
[ConnectionWithSOAR] [int] NULL,
[DataCollectionStage] [int] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_IncomeBenefits] PRIMARY KEY CLUSTERED
(
[IncomeBenefitsID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Inventory] ******/
CREATE TABLE [dbo].[hmis_Inventory](
[id] [int] IDENTITY(1,1) NOT NULL,
[ProjectCoCID] [varchar](32) NOT NULL,
[InventoryID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[CoCCode] [varchar](6) NOT NULL,
[InformationDate] [date] NOT NULL,
[HouseholdType] [int] NOT NULL,
[Availability] [int] NULL,
[UnitInventory] [int] NOT NULL,
[BedInventory] [int] NOT NULL,
[CHBedInventory] [int] NULL,
[VetBedInventory] [int] NULL,
[YouthBedInventory] [int] NULL,
[BedType] [int] NULL,
[InventoryStartDate] [date] NOT NULL,
[InventoryEndDate] [date] NULL,
[HMISParticipatingBeds] [int] NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Inventory] PRIMARY KEY CLUSTERED
(
[InventoryID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Organization] ******/
CREATE TABLE [dbo].[hmis_Organization](
[id] [int] IDENTITY(1,1) NOT NULL,
[OrganizationID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[OrganizationName] [varchar](50) NOT NULL,
[OrganizationCommonName] [varchar](50) NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Organization] PRIMARY KEY CLUSTERED
(
[OrganizationID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Project] ******/
CREATE TABLE [dbo].[hmis_Project](
[id] [int] IDENTITY(1,1) NOT NULL,
[ProjectID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[OrganizationID] [varchar](32) NULL,
[ProjectName] [varchar](50) NOT NULL,
[ProjectCommonName] [varchar](50) NULL,
[OperatingStartDate] [date] NOT NULL,
[OperatingEndDate] [date] NULL,
[ContinuumProject] [int] NOT NULL,
[ProjectType] [int] NULL,
[ResidentialAffiliation] [int] NULL,
[TrackingMethod] [int] NULL,
[TargetPopulation] [int] NULL,
[VictimServicesProvider] [int] NULL,
[HousingType] [int] NULL,
[PITCount] [int] NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Project] PRIMARY KEY CLUSTERED
(
[ProjectID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_ProjectCoC] ******/
CREATE TABLE [dbo].[hmis_ProjectCoC](
[id] [int] IDENTITY(1,1) NOT NULL,
[ProjectCoCID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[ProjectID] [varchar](32) NOT NULL,
[CoCCode] [varchar](6) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_ProjectCoC] PRIMARY KEY CLUSTERED
(
[ProjectCoCID] ASC
)
) GO
/****** Object: Table [dbo].[hmis_Services] ******/
CREATE TABLE [dbo].[hmis_Services](
[id] [int] IDENTITY(1,1) NOT NULL,
[ServicesID] AS (CONVERT([varchar](32),[id])) PERSISTED NOT NULL,
[EnrollmentID] [varchar](32) NOT NULL,
[PersonalID] [varchar](32) NOT NULL,
[DateProvided] [date] NOT NULL,
[RecordType] [int] NOT NULL,
[TypeProvided] [int] NOT NULL,
[OtherTypeProvided] [varchar](50) NULL,
[SubTypeProvided] [int] NULL,
[FAAmount] [money] NULL,
[ReferralOutcome] [int] NULL,
[DateCreated] [datetime] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[UserID] [varchar](32) NULL,
[DateDeleted] [datetime] NULL,
[ExportID] [varchar](32) NULL,
CONSTRAINT [pk_Services] PRIMARY KEY CLUSTERED
(
[ServicesID] ASC
)
) GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((0)) FOR [AmIndAKNative]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((0)) FOR [Asian]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((0)) FOR [BlackAfAmerican]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((0)) FOR [NativeHIOtherPacific]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((0)) FOR [White]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((99)) FOR [Ethnicity]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((99)) FOR [Gender]
GO
ALTER TABLE [dbo].[hmis_Client] ADD DEFAULT ((99)) FOR [VeteranStatus]
GO
ALTER TABLE [dbo].[hmis_Enrollment] ADD DEFAULT ((99)) FOR [DisablingCondition]
GO
ALTER TABLE [dbo].[hmis_Affiliation] WITH CHECK ADD CONSTRAINT [fk_AffiliationProject] FOREIGN KEY([ProjectID])
REFERENCES [dbo].[hmis_Project] ([ProjectID])
GO
ALTER TABLE [dbo].[hmis_Affiliation] CHECK CONSTRAINT [fk_AffiliationProject]
GO
ALTER TABLE [dbo].[hmis_Disabilities] WITH CHECK ADD CONSTRAINT [fk_DisabilitiesEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_Disabilities] CHECK CONSTRAINT [fk_DisabilitiesEnrollment]
GO
ALTER TABLE [dbo].[hmis_EmploymentEducation] WITH CHECK ADD CONSTRAINT [fk_EmploymentEducationEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_EmploymentEducation] CHECK CONSTRAINT [fk_EmploymentEducationEnrollment]
GO
ALTER TABLE [dbo].[hmis_Enrollment] WITH CHECK ADD CONSTRAINT [fk_EnrollmentClient] FOREIGN KEY([PersonalID])
REFERENCES [dbo].[hmis_Client] ([PersonalID])
GO
ALTER TABLE [dbo].[hmis_Enrollment] CHECK CONSTRAINT [fk_EnrollmentClient]
GO
ALTER TABLE [dbo].[hmis_EnrollmentCoC] WITH CHECK ADD CONSTRAINT [fk_EnrollmentCoCEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_EnrollmentCoC] CHECK CONSTRAINT [fk_EnrollmentCoCEnrollment]
GO
ALTER TABLE [dbo].[hmis_Exit] WITH CHECK ADD CONSTRAINT [fk_ExitEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_Exit] CHECK CONSTRAINT [fk_ExitEnrollment]
GO
ALTER TABLE [dbo].[hmis_Funder] WITH CHECK ADD CONSTRAINT [fk_FunderProject] FOREIGN KEY([ProjectID])
REFERENCES [dbo].[hmis_Project] ([ProjectID])
GO
ALTER TABLE [dbo].[hmis_Funder] CHECK CONSTRAINT [fk_FunderProject]
GO
ALTER TABLE [dbo].[hmis_Geography] WITH CHECK ADD CONSTRAINT [fk_GeographyProjectCoC] FOREIGN KEY([ProjectCoCID])
REFERENCES [dbo].[hmis_ProjectCoC] ([ProjectCoCID])
GO
ALTER TABLE [dbo].[hmis_Geography] CHECK CONSTRAINT [fk_GeographyProjectCoC]
GO
ALTER TABLE [dbo].[hmis_HealthAndDV] WITH CHECK ADD CONSTRAINT [fk_HealthAndDVEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_HealthAndDV] CHECK CONSTRAINT [fk_HealthAndDVEnrollment]
GO
ALTER TABLE [dbo].[hmis_IncomeBenefits] WITH CHECK ADD CONSTRAINT [fk_IncomeBenefitsEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_IncomeBenefits] CHECK CONSTRAINT [fk_IncomeBenefitsEnrollment]
GO
ALTER TABLE [dbo].[hmis_Inventory] WITH CHECK ADD CONSTRAINT [fk_InventoryProjectCoC] FOREIGN KEY([ProjectCoCID])
REFERENCES [dbo].[hmis_ProjectCoC] ([ProjectCoCID])
GO
ALTER TABLE [dbo].[hmis_Inventory] CHECK CONSTRAINT [fk_InventoryProjectCoC]
GO
ALTER TABLE [dbo].[hmis_Project] WITH CHECK ADD CONSTRAINT [fk_ProjectOrganization] FOREIGN KEY([OrganizationID])
REFERENCES [dbo].[hmis_Organization] ([OrganizationID])
GO
ALTER TABLE [dbo].[hmis_Project] CHECK CONSTRAINT [fk_ProjectOrganization]
GO
ALTER TABLE [dbo].[hmis_ProjectCoC] WITH CHECK ADD CONSTRAINT [fk_ProjectCoCProject] FOREIGN KEY([ProjectID])
REFERENCES [dbo].[hmis_Project] ([ProjectID])
GO
ALTER TABLE [dbo].[hmis_ProjectCoC] CHECK CONSTRAINT [fk_ProjectCoCProject]
GO
ALTER TABLE [dbo].[hmis_Services] WITH CHECK ADD CONSTRAINT [fk_ServicesEnrollment] FOREIGN KEY([EnrollmentID])
REFERENCES [dbo].[hmis_Enrollment] ([EnrollmentID])
GO
ALTER TABLE [dbo].[hmis_Services] CHECK CONSTRAINT [fk_ServicesEnrollment]
GO
Type your paragraph here.