USE [Clinica]
GO
/****** Object:  Table [Ficha].[FichaEvolucionMedicamento]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Ficha].[FichaEvolucionMedicamento](
	[IdFichaEvolucionMedicamento] [int] IDENTITY(1,1) NOT NULL,
	[IdFichaEvolucion] [int] NOT NULL,
	[IdMedicamento] [int] NOT NULL,
	[Posologia] [varchar](256) NOT NULL,
	[IndEliminado] [tinyint] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[IdFichaEvolucionMedicamento] 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].[FichaEvolucionMedicamento] ADD  DEFAULT ('') FOR [Posologia]
GO
ALTER TABLE [Ficha].[FichaEvolucionMedicamento] ADD  DEFAULT ((0)) FOR [IndEliminado]
GO
ALTER TABLE [Ficha].[FichaEvolucionMedicamento]  WITH CHECK ADD FOREIGN KEY([IdFichaEvolucion])
REFERENCES [Ficha].[FichaEvolucion] ([IdFichaEvolucion])
GO
ALTER TABLE [Ficha].[FichaEvolucionMedicamento]  WITH CHECK ADD FOREIGN KEY([IdMedicamento])
REFERENCES [Clinica].[Medicamento] ([IdMedicamento])
GO
