USE [Clinica]
GO
/****** Object:  Table [Clinica].[PrestacionSistemaSalud]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Clinica].[PrestacionSistemaSalud](
	[IdPrestacionSistemaSalud] [int] IDENTITY(1,1) NOT NULL,
	[IdPrestacion] [int] NOT NULL,
	[IdSistemaSalud] [int] NOT NULL,
	[IdTipoListaPrecio] [int] NOT NULL,
	[ValorHabil] [decimal](16, 2) NOT NULL,
	[ValorInhabil] [decimal](16, 2) NOT NULL,
	[FechaVigenciaDesde] [date] NULL,
	[FechaVigenciaHasta] [date] NULL,
	[IndVigente] [tinyint] NOT NULL,
	[IndEliminado] [tinyint] NOT NULL,
 CONSTRAINT [PK__Prestaci__EAE5A42D360AF1B0] PRIMARY KEY CLUSTERED 
(
	[IdPrestacionSistemaSalud] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] ADD  CONSTRAINT [DF__Prestacio__Valor__6AEFE058]  DEFAULT ((0)) FOR [ValorHabil]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] ADD  CONSTRAINT [DF__Prestacio__Valor__6BE40491]  DEFAULT ((0)) FOR [ValorInhabil]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] ADD  CONSTRAINT [DF__Prestacio__IndVi__6CD828CA]  DEFAULT ((1)) FOR [IndVigente]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] ADD  CONSTRAINT [DF__Prestacio__IndEl__6DCC4D03]  DEFAULT ((0)) FOR [IndEliminado]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud]  WITH CHECK ADD  CONSTRAINT [FK__Prestacio__IdPre__690797E6] FOREIGN KEY([IdPrestacion])
REFERENCES [Clinica].[Prestacion] ([IdPrestacion])
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] CHECK CONSTRAINT [FK__Prestacio__IdPre__690797E6]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud]  WITH CHECK ADD  CONSTRAINT [FK__Prestacio__IdSis__69FBBC1F] FOREIGN KEY([IdSistemaSalud])
REFERENCES [Clinica].[SistemaSalud] ([IdSistemaSalud])
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] CHECK CONSTRAINT [FK__Prestacio__IdSis__69FBBC1F]
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud]  WITH CHECK ADD  CONSTRAINT [FK_PrestacionSistemaSalud_TipoListaPrecio] FOREIGN KEY([IdTipoListaPrecio])
REFERENCES [Clinica].[TipoListaPrecio] ([IdTipoListaPrecio])
GO
ALTER TABLE [Clinica].[PrestacionSistemaSalud] CHECK CONSTRAINT [FK_PrestacionSistemaSalud_TipoListaPrecio]
GO
