USE [Clinica]
GO
/****** Object:  Table [Imed].[BonoInterfaz]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Imed].[BonoInterfaz](
	[IdBonoInterfaz] [int] IDENTITY(1,1) NOT NULL,
	[IdCita] [int] NOT NULL,
	[CodFinanciador] [int] NOT NULL,
	[RutConvenio] [varchar](15) NOT NULL,
	[CorrConvenio] [int] NOT NULL,
	[RutTratante] [varchar](15) NOT NULL,
	[RutSolic] [varchar](15) NULL,
	[NomSolic] [nvarchar](100) NULL,
	[CodEspecia] [varchar](10) NULL,
	[RutBenef] [varchar](15) NOT NULL,
	[IndUrgencia] [char](1) NOT NULL,
	[CodError] [int] NOT NULL,
	[GloError] [nvarchar](255) NOT NULL,
	[FechaCreacion] [datetime2](0) NOT NULL,
	[UsuarioCreacion] [sysname] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[IdBonoInterfaz] 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 [Imed].[BonoInterfaz] ADD  DEFAULT ('N') FOR [IndUrgencia]
GO
ALTER TABLE [Imed].[BonoInterfaz] ADD  DEFAULT ((0)) FOR [CodError]
GO
ALTER TABLE [Imed].[BonoInterfaz] ADD  DEFAULT ('OK') FOR [GloError]
GO
ALTER TABLE [Imed].[BonoInterfaz] ADD  DEFAULT (sysdatetime()) FOR [FechaCreacion]
GO
ALTER TABLE [Imed].[BonoInterfaz] ADD  DEFAULT (suser_sname()) FOR [UsuarioCreacion]
GO
