USE [Clinica]
GO
/****** Object:  Table [Ficha].[FichaEvolucionExamen]    Script Date: 18-08-2025 21:40:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Ficha].[FichaEvolucionExamen](
	[IdFichaEvolucionExamen] [int] IDENTITY(1,1) NOT NULL,
	[IdFichaEvolucion] [int] NOT NULL,
	[IdPrestacion] [int] NOT NULL,
	[IndEliminado] [tinyint] NOT NULL,
	[IdTipoPrestacion] [int] NULL,
PRIMARY KEY CLUSTERED 
(
	[IdFichaEvolucionExamen] 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 [Ficha].[FichaEvolucionExamen] ADD  DEFAULT ((0)) FOR [IndEliminado]
GO
ALTER TABLE [Ficha].[FichaEvolucionExamen]  WITH CHECK ADD FOREIGN KEY([IdFichaEvolucion])
REFERENCES [Ficha].[FichaEvolucion] ([IdFichaEvolucion])
GO
ALTER TABLE [Ficha].[FichaEvolucionExamen]  WITH CHECK ADD  CONSTRAINT [FK__FichaEvol__IdPre__5614BF03] FOREIGN KEY([IdPrestacion])
REFERENCES [Clinica].[Prestacion] ([IdPrestacion])
GO
ALTER TABLE [Ficha].[FichaEvolucionExamen] CHECK CONSTRAINT [FK__FichaEvol__IdPre__5614BF03]
GO
