-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-06-2022 a las 00:44:21
-- Versión del servidor: 10.4.16-MariaDB
-- Versión de PHP: 7.4.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `bdfichapaini`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `archivos`
--

CREATE TABLE `archivos` (
  `id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(11) DEFAULT NULL,
  `archivo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ext` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo_formato` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `archivo_bin` blob DEFAULT NULL,
  `nota_general` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `archivoscreados`
--

CREATE TABLE `archivoscreados` (
  `id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(11) DEFAULT NULL,
  `info` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo_doc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `areas`
--

CREATE TABLE `areas` (
  `id` int(10) UNSIGNED NOT NULL,
  `sucursal_id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `boxs`
--

CREATE TABLE `boxs` (
  `id` int(10) UNSIGNED NOT NULL,
  `area_id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `citas`
--

CREATE TABLE `citas` (
  `id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) DEFAULT NULL,
  `sucursal_id` int(11) DEFAULT NULL,
  `fecha` date NOT NULL,
  `hora_ini` time DEFAULT NULL,
  `hora_fin` time DEFAULT NULL,
  `nota` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `confirmacion` int(11) DEFAULT NULL,
  `asistencia` int(11) DEFAULT NULL,
  `estado` int(11) DEFAULT NULL,
  `linkzoom` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `ciudades`
--

CREATE TABLE `ciudades` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `comunas`
--

CREATE TABLE `comunas` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `comunas`
--

INSERT INTO `comunas` (`id`, `nombre`) VALUES
(1, 'Santiago'),
(2, 'Providencia'),
(3, 'Huechuraba'),
(4, 'San Ramón');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `configuraciones`
--

CREATE TABLE `configuraciones` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `numbox` int(11) NOT NULL,
  `inicioatenAM` varchar(6) COLLATE utf8mb4_unicode_ci NOT NULL,
  `finalatenAM` varchar(6) COLLATE utf8mb4_unicode_ci NOT NULL,
  `inicioatenPM` varchar(6) COLLATE utf8mb4_unicode_ci NOT NULL,
  `finalatenPM` varchar(6) COLLATE utf8mb4_unicode_ci NOT NULL,
  `bloquemintiempo` int(11) NOT NULL,
  `numbloquesdefecto` int(11) NOT NULL,
  `formatohorario` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL,
  `profecambiabloque` int(11) NOT NULL,
  `emailnotificaciones` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `recordatoriocita` int(11) NOT NULL,
  `diasantesrecordatorio` int(11) DEFAULT NULL,
  `antelaagendamiento` int(11) NOT NULL,
  `anularcobrohorasantes` int(11) NOT NULL,
  `valor` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `valor_default` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `configuracionesfinanciera`
--

CREATE TABLE `configuracionesfinanciera` (
  `id` int(10) UNSIGNED NOT NULL,
  `monedauso` int(11) NOT NULL,
  `permitedescuento` int(11) NOT NULL,
  `porcentajedescuento` int(11) DEFAULT NULL,
  `otorgoracredito` int(11) NOT NULL,
  `numcuotasmaxcredito` int(11) DEFAULT NULL,
  `solicitapie` int(11) DEFAULT NULL,
  `porcentajepie` int(11) DEFAULT NULL,
  `permitiraconvenios` int(11) NOT NULL,
  `convenioarmada` int(11) NOT NULL,
  `porcentajeconvenioarmada` int(11) DEFAULT NULL,
  `conveniocarabineros` int(11) NOT NULL,
  `porcentajeconveniocarabineros` int(11) DEFAULT NULL,
  `conveniocajaandes` int(11) NOT NULL,
  `porcentajeconveniocajaandes` int(11) DEFAULT NULL,
  `conveniobomberos` int(11) NOT NULL,
  `porcentajeconveniobomberos` int(11) DEFAULT NULL,
  `formaspagoefectivo` int(11) NOT NULL,
  `formaspagotcredito` int(11) NOT NULL,
  `formaspagopreabono` int(11) NOT NULL,
  `formaspagotdebito` int(11) NOT NULL,
  `formaspagocheque` int(11) NOT NULL,
  `formaspagogiftcard` int(11) NOT NULL,
  `validezpresupuesto` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `cotizaciones`
--

CREATE TABLE `cotizaciones` (
  `id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(10) UNSIGNED NOT NULL,
  `estado` int(11) NOT NULL,
  `vigencia` date DEFAULT NULL,
  `nota_general` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `detalle_cotizacion`
--

CREATE TABLE `detalle_cotizacion` (
  `id` int(10) UNSIGNED NOT NULL,
  `cotizacion_id` int(10) UNSIGNED NOT NULL,
  `detalle` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` int(11) NOT NULL,
  `idservicio` int(11) DEFAULT NULL,
  `idsubservicio` int(11) DEFAULT NULL,
  `iddetallesubserv` int(11) DEFAULT NULL,
  `otroservicio` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `piezadental` int(11) DEFAULT NULL,
  `cantidad` int(11) DEFAULT NULL,
  `valor` int(11) DEFAULT NULL,
  `descuento` int(11) DEFAULT NULL,
  `nota_asociada` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `detalle_subservicio`
--

CREATE TABLE `detalle_subservicio` (
  `id` int(10) UNSIGNED NOT NULL,
  `subservicio_id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `piezadental` int(11) DEFAULT NULL,
  `estado` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `empresa`
--

CREATE TABLE `empresa` (
  `id` int(10) UNSIGNED NOT NULL,
  `rut` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `direccion` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `pais` int(11) DEFAULT NULL,
  `email` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rutreprelegal` varchar(12) NOT NULL,
  `reprelegal` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `telefonoreprelegal` varchar(12) NOT NULL,
  `emailreprelegal` varchar(200) NOT NULL,
  `logo` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` int(11) DEFAULT NULL,
  `plan` int(11) DEFAULT NULL,
  `fechasolicitud` date NOT NULL,
  `fechainicio` date DEFAULT NULL,
  `meses` int(11) DEFAULT NULL,
  `cantprofe` int(11) DEFAULT NULL,
  `rutadmin` varchar(191) DEFAULT NULL,
  `nombreadmin` varchar(200) NOT NULL,
  `telefonoadmin` varchar(12) NOT NULL,
  `admin` varchar(191) DEFAULT NULL,
  `psicologia` int(11) DEFAULT NULL,
  `nutricion` varchar(191) DEFAULT NULL,
  `kinesiologia` int(11) DEFAULT NULL,
  `fonoaudiologia` int(11) DEFAULT NULL,
  `cantsucursal` int(11) DEFAULT NULL,
  `pago` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `especialidades`
--

CREATE TABLE `especialidades` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_profesion` int(11) NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `estado_cotizacion`
--

CREATE TABLE `estado_cotizacion` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `estado_servicio`
--

CREATE TABLE `estado_servicio` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `estado_servicio`
--

INSERT INTO `estado_servicio` (`id`, `nombre`) VALUES
(1, 'activo'),
(2, 'hecho'),
(3, 'abonado'),
(4, 'pagado');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `ficha`
--

CREATE TABLE `ficha` (
  `id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) DEFAULT NULL,
  `cita_id` int(11) DEFAULT NULL,
  `fecha` date NOT NULL,
  `fi1` text DEFAULT NULL,
  `fi2` text DEFAULT NULL,
  `fi3` text DEFAULT NULL,
  `fi4` text DEFAULT NULL,
  `fi5` text DEFAULT NULL,
  `at1` text DEFAULT NULL,
  `at2` text DEFAULT NULL,
  `at3` text DEFAULT NULL,
  `at4` text DEFAULT NULL,
  `infoantro1` varchar(10) DEFAULT NULL,
  `infoantro2` varchar(10) DEFAULT NULL,
  `infoantro3` varchar(10) DEFAULT NULL,
  `infoantro4` varchar(10) DEFAULT NULL,
  `evanutri1` text DEFAULT NULL,
  `evanutri2` text DEFAULT NULL,
  `evanutri3` text DEFAULT NULL,
  `evanutri4` text DEFAULT NULL,
  `evanutri5` text DEFAULT NULL,
  `evanutri6` text DEFAULT NULL,
  `evanutri7` text DEFAULT NULL,
  `evanutri8` text DEFAULT NULL,
  `evanutri9` text DEFAULT NULL,
  `evanutri10` text DEFAULT NULL,
  `evanutri11` text DEFAULT NULL,
  `evanutri12` text DEFAULT NULL,
  `evanutri13` text DEFAULT NULL,
  `opc1desahora` varchar(20) DEFAULT NULL,
  `opc1desaopc1` varchar(200) DEFAULT NULL,
  `opc1desa1` text DEFAULT NULL,
  `opc1desa2` text DEFAULT NULL,
  `opc1desa3` text DEFAULT NULL,
  `opc1desa4` text DEFAULT NULL,
  `opc1desa5` text DEFAULT NULL,
  `opc1desa6` text DEFAULT NULL,
  `opc1desa7` text DEFAULT NULL,
  `opc1desa8` text DEFAULT NULL,
  `opc1desa9` text DEFAULT NULL,
  `opc1desa10` text DEFAULT NULL,
  `opc1desa11` text DEFAULT NULL,
  `opc1desa12` text DEFAULT NULL,
  `opc1desa13` text DEFAULT NULL,
  `opc1desa14` text DEFAULT NULL,
  `opc1desa15` text DEFAULT NULL,
  `opc1desa16` text DEFAULT NULL,
  `opc1desa17` text DEFAULT NULL,
  `opc1desa18` text DEFAULT NULL,
  `opc1desa19` text DEFAULT NULL,
  `opc1desa20` text DEFAULT NULL,
  `opc1desa21` text DEFAULT NULL,
  `opc1desa22` text DEFAULT NULL,
  `opc1desaobserva` text DEFAULT NULL,
  `opc2desahora` varchar(20) DEFAULT NULL,
  `opc2desaopc2` varchar(200) DEFAULT NULL,
  `opc2desa1` text DEFAULT NULL,
  `opc2desa2` text DEFAULT NULL,
  `opc2desa3` text DEFAULT NULL,
  `opc2desa4` text DEFAULT NULL,
  `opc2desa5` text DEFAULT NULL,
  `opc2desa6` text DEFAULT NULL,
  `opc2desa7` text DEFAULT NULL,
  `opc2desa8` text DEFAULT NULL,
  `opc2desa9` text DEFAULT NULL,
  `opc2desa10` text DEFAULT NULL,
  `opc2desa11` text DEFAULT NULL,
  `opc2desa12` text DEFAULT NULL,
  `opc2desa13` text DEFAULT NULL,
  `opc2desa14` text DEFAULT NULL,
  `opc2desa15` text DEFAULT NULL,
  `opc2desa16` text DEFAULT NULL,
  `opc2desa17` text DEFAULT NULL,
  `opc2desa18` text DEFAULT NULL,
  `opc2desa19` text DEFAULT NULL,
  `opc2desa20` text DEFAULT NULL,
  `opc2desa21` text DEFAULT NULL,
  `opc2desa22` text DEFAULT NULL,
  `opc2desa23` text DEFAULT NULL,
  `opc2desa24` text DEFAULT NULL,
  `opc2desaobserva` text DEFAULT NULL,
  `colamhora` varchar(20) DEFAULT NULL,
  `colamopc` varchar(200) DEFAULT NULL,
  `colam1` text DEFAULT NULL,
  `colam2` text DEFAULT NULL,
  `colam3` text DEFAULT NULL,
  `colam4` text DEFAULT NULL,
  `colam5` text DEFAULT NULL,
  `colam6` text DEFAULT NULL,
  `colam7` text DEFAULT NULL,
  `colam8` text DEFAULT NULL,
  `colam9` text DEFAULT NULL,
  `colam10` text DEFAULT NULL,
  `colam11` text DEFAULT NULL,
  `colam12` text DEFAULT NULL,
  `colam13` text DEFAULT NULL,
  `colam14` text DEFAULT NULL,
  `colam15` text DEFAULT NULL,
  `colam16` text DEFAULT NULL,
  `colam17` text DEFAULT NULL,
  `colam18` text DEFAULT NULL,
  `almuhora` varchar(20) DEFAULT NULL,
  `almuopc` varchar(200) DEFAULT NULL,
  `almu1` text DEFAULT NULL,
  `almu2` text DEFAULT NULL,
  `almu3` text DEFAULT NULL,
  `almu4` text DEFAULT NULL,
  `almu5` text DEFAULT NULL,
  `almu6` text DEFAULT NULL,
  `almu7` text DEFAULT NULL,
  `almu8` text DEFAULT NULL,
  `almu9` text DEFAULT NULL,
  `almu10` text DEFAULT NULL,
  `almu11` text DEFAULT NULL,
  `almu12` text DEFAULT NULL,
  `almu13` text DEFAULT NULL,
  `almu14` text DEFAULT NULL,
  `almu15` text DEFAULT NULL,
  `almu16` text DEFAULT NULL,
  `almu17` text DEFAULT NULL,
  `almu18` text DEFAULT NULL,
  `almu19` text DEFAULT NULL,
  `almu20` text DEFAULT NULL,
  `almu21` text DEFAULT NULL,
  `almu22` text DEFAULT NULL,
  `almuespeciales` text DEFAULT NULL,
  `colpmhora` varchar(20) DEFAULT NULL,
  `colpmopc` varchar(200) DEFAULT NULL,
  `colpm1` text DEFAULT NULL,
  `colpm2` text DEFAULT NULL,
  `colpm3` text DEFAULT NULL,
  `colpm4` text DEFAULT NULL,
  `colpm5` text DEFAULT NULL,
  `colpm6` text DEFAULT NULL,
  `colpm7` text DEFAULT NULL,
  `colpm8` text DEFAULT NULL,
  `colpm9` text DEFAULT NULL,
  `colpm10` text DEFAULT NULL,
  `colpm11` text DEFAULT NULL,
  `colpm12` text DEFAULT NULL,
  `colpm13` text DEFAULT NULL,
  `colpm14` text DEFAULT NULL,
  `colpm15` text DEFAULT NULL,
  `colpm16` text DEFAULT NULL,
  `colpm17` text DEFAULT NULL,
  `colpm18` text DEFAULT NULL,
  `oncehora` varchar(20) DEFAULT NULL,
  `onceopc` varchar(200) DEFAULT NULL,
  `once1` text DEFAULT NULL,
  `once2` text DEFAULT NULL,
  `once3` text DEFAULT NULL,
  `once4` text DEFAULT NULL,
  `once5` text DEFAULT NULL,
  `once6` text DEFAULT NULL,
  `once7` text DEFAULT NULL,
  `once8` text DEFAULT NULL,
  `once9` text DEFAULT NULL,
  `once10` text DEFAULT NULL,
  `once11` text DEFAULT NULL,
  `once12` text DEFAULT NULL,
  `once13` text DEFAULT NULL,
  `once14` text DEFAULT NULL,
  `once15` text DEFAULT NULL,
  `once16` text DEFAULT NULL,
  `once17` text DEFAULT NULL,
  `once18` text DEFAULT NULL,
  `onceobservacion` text DEFAULT NULL,
  `cenahora` varchar(20) DEFAULT NULL,
  `cenaopc` varchar(200) DEFAULT NULL,
  `cena1` text DEFAULT NULL,
  `cena2` text DEFAULT NULL,
  `cena3` text DEFAULT NULL,
  `cena4` text DEFAULT NULL,
  `cena5` text DEFAULT NULL,
  `cena6` text DEFAULT NULL,
  `cena7` text DEFAULT NULL,
  `cena8` text DEFAULT NULL,
  `cena9` text DEFAULT NULL,
  `cena10` text DEFAULT NULL,
  `cena11` text DEFAULT NULL,
  `cena12` text DEFAULT NULL,
  `cena13` text DEFAULT NULL,
  `cena14` text DEFAULT NULL,
  `cena15` text DEFAULT NULL,
  `cena16` text DEFAULT NULL,
  `cena17` text DEFAULT NULL,
  `cena18` text DEFAULT NULL,
  `cena19` text DEFAULT NULL,
  `cena20` text DEFAULT NULL,
  `cena21` text DEFAULT NULL,
  `cena22` text DEFAULT NULL,
  `cenaespeciales` text DEFAULT NULL,
  `colnocturnahora` varchar(20) DEFAULT NULL,
  `colnocturnaopc` varchar(200) DEFAULT NULL,
  `colnocturna1` text DEFAULT NULL,
  `colnocturna2` text DEFAULT NULL,
  `colnocturna3` text DEFAULT NULL,
  `colnocturna4` text DEFAULT NULL,
  `indicaciones1` text DEFAULT NULL,
  `indicaciones2` text DEFAULT NULL,
  `indicaciones3` text DEFAULT NULL,
  `indicaciones4` text DEFAULT NULL,
  `indicaciones5` text DEFAULT NULL,
  `indicaciones6` text DEFAULT NULL,
  `indicaciones7` text DEFAULT NULL,
  `indicaciones8` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `funcionarios`
--

CREATE TABLE `funcionarios` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `apaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nacionalidad` int(11) DEFAULT NULL,
  `direccion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `genero` varchar(9) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fnacimiento` date DEFAULT NULL,
  `estado` int(11) DEFAULT NULL,
  `tipo` int(11) NOT NULL,
  `ciudad` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `inventario_boxs`
--

CREATE TABLE `inventario_boxs` (
  `id` int(10) UNSIGNED NOT NULL,
  `box_id` int(10) UNSIGNED NOT NULL,
  `insumo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cantidad` int(11) NOT NULL,
  `cant_utilizada` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `isapres`
--

CREATE TABLE `isapres` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `isapres`
--

INSERT INTO `isapres` (`id`, `nombre`, `estado`) VALUES
(1, 'Fondo nacional de salud (Fonasa)', 1),
(2, 'Isapre Banmedica', 1),
(3, 'Isapre Cruz Blanca', 1),
(4, 'Isapre Colmena', 1),
(5, 'Isapre Consalud', 1),
(6, 'Isapre Cruz del norte', 1),
(7, 'Isapre Fundacion Banco Estado', 0),
(8, 'Isapre Fusat', 0),
(9, 'Isapre Nueva Másvida', 1),
(10, 'Isapre Rio Blanco', 1),
(11, 'Isapre San Lorenzo', 1),
(12, 'Isapre Vida tres', 1),
(13, 'Isapres Chuquicamata', 1),
(14, 'Particular', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `laboratorios`
--

CREATE TABLE `laboratorios` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_12_29_181314_create_pacientes_table', 1),
(4, '2019_12_30_155541_add_user_id_column_to_pacientes_table', 1),
(5, '2019_12_30_190100_create_roles_table', 1),
(6, '2019_12_31_163101_add_rol_id_column_to_users_table', 1),
(7, '2019_12_31_163828_create_modulos_table', 1),
(8, '2019_12_31_163947_create_roles_modulos_table', 1),
(9, '2019_12_31_170325_add_rol_id_column_to_roles_modulos_table', 1),
(10, '2019_12_31_171138_add_modulo_id_column_to_roles_modulos_table', 1),
(11, '2019_12_31_171436_create_notas_medicas_table', 1),
(12, '2020_01_02_183512_create_tipo_notas_medicas_table', 1),
(13, '2020_01_02_184036_add_tnm_id_column_to_notas_medicas_table', 1),
(14, '2020_01_02_202510_create_paises_table', 1),
(15, '2020_01_02_202542_create_citas_table', 1),
(16, '2020_01_02_203550_create_sucursales_table', 1),
(17, '2020_01_02_203621_create_areas_table', 1),
(18, '2020_01_02_203655_create_boxs_table', 1),
(19, '2020_01_02_203856_create_cotizaciones_table', 1),
(20, '2020_01_02_203927_create_isapres_table', 1),
(21, '2020_01_02_204144_create_detalle_cotizacion_table', 1),
(22, '2020_01_02_204256_create_servicios_table', 1),
(23, '2020_01_02_204338_create_monedas_table', 1),
(24, '2020_01_02_204405_create_laboratorios_table', 1),
(25, '2020_01_02_210053_create_inventario_boxs_table', 1),
(26, '2020_01_02_214404_add_sucursal_id_column_to_areas_table', 1),
(27, '2020_01_02_214537_add_areas_id_column_to_boxs_table', 1),
(28, '2020_01_02_214643_add_box_id_column_to_inventario_boxs_table', 1),
(29, '2020_01_02_214752_add_pac_id_column_to_citas_table', 1),
(30, '2020_01_02_215150_add_pac_id_column_to_cotizaciones_table', 1),
(31, '2020_01_02_215406_add_moneda_id_column_to_servicios_table', 1),
(32, '2020_01_02_215643_add_cotizacion_id_column_to_detalle_cotizacion_table', 1),
(33, '2020_01_06_195641_create_estado_cotizacion_table', 1),
(34, '2020_01_06_200355_create_subservicios_table', 1),
(35, '2020_01_06_200636_add_servicio_id_column_to_subservicios_table', 1),
(36, '2020_01_07_012952_create_comunas_table', 1),
(37, '2020_01_13_150821_create_detalle_subservicio_table', 1),
(38, '2020_01_13_153125_create_piezas_dentales_table', 1),
(39, '2020_01_13_153624_add_subservicio_id_column_to_detalle_subservicio_table', 1),
(40, '2020_01_20_190403_create_archivos_table', 1),
(41, '2020_01_29_200227_create_estado_servicio_table', 1),
(42, '2020_01_30_131704_create_pagos_table', 1),
(43, '2020_02_10_235009_create_configuraciones_table', 1),
(44, '2020_02_18_055725_create_sucursal_profesional_table', 1),
(45, '2020_02_21_003611_create_profesional_horario_table', 1),
(46, '2020_03_16_205006_create_notas_table', 1),
(47, '2020_03_18_210442_create_sesionasistente_table', 1),
(48, '2020_04_13_174246_create_responsable_financiero_table', 1),
(49, '2020_04_20_050135_create_notificaciones_table', 1),
(50, '2020_04_24_201122_create_profesionales_table', 1),
(51, '2020_04_24_201658_create_funcionarios_table', 1),
(52, '2020_04_24_204819_add_user_id_column_to_profesionales_table', 1),
(53, '2020_04_24_204904_add_user_id_column_to_funcionarios_table', 1),
(54, '2020_04_24_211855_add_pac_id_column_to_responsable_financiero_table', 1),
(55, '2020_04_30_000631_create_especialidades_table', 1),
(56, '2020_04_30_001021_create_prof_espec_table', 1),
(57, '2020_04_30_001138_create_prof_servicio_table', 1),
(58, '2020_04_30_010439_create_sesion_usuario_table', 1),
(59, '2020_05_05_043300_create_archivoscreados_table', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `modulos`
--

CREATE TABLE `modulos` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `modulos`
--

INSERT INTO `modulos` (`id`, `nombre`, `estado`) VALUES
(1, 'Profesionales', 1),
(2, 'Funcionarios  ', 1),
(3, 'Especialidades', 0),
(4, 'Roles', 1),
(5, 'Modulos', 1),
(6, 'Servicios', 0),
(7, 'Isapres', 1),
(8, 'Sucursales', 0),
(9, 'Laboratorios', 0),
(10, 'Monedas', 0),
(11, 'Piezas dentales', 0),
(12, 'Tipo notas medicas', 0),
(13, 'Configuraciones', 0),
(14, 'Agenda', 1),
(15, 'Agenda diaria', 1),
(16, 'Pacientes', 1),
(17, 'Sesión del asistente', 0),
(18, 'Reservar hora', 0),
(19, 'Notas profesionales', 0),
(20, 'Pagos', 0),
(21, 'Cotizaciones', 0),
(22, 'Notificaciones funcionario', 0),
(23, 'Notificaciones profesional', 0),
(24, 'Datos del paciente', 1),
(25, 'Configurar apariencia', 1),
(26, 'Pacientes secretaria', 1),
(27, 'Paises', 1),
(28, 'Comunas', 1),
(29, 'Tipos De Cancer', 0),
(30, 'Agendar Paciente', 1),
(31, 'Tipo Profesión', 1),
(32, 'Tipo Funcionario', 1),
(33, 'Datos Empresa', 1),
(34, 'Ingreso llave empresa', 1),
(35, 'Usuarios', 1),
(36, 'Ciudades', 1),
(37, 'Perfil', 1),
(39, 'Mantenedores Tabla', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `monedas`
--

CREATE TABLE `monedas` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_pais` int(11) NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `simbolo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `abrev` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `monedas`
--

INSERT INTO `monedas` (`id`, `id_pais`, `nombre`, `simbolo`, `abrev`) VALUES
(1, 1, 'Peso chileno', '$', 'CL'),
(2, 4, 'Peso argentino', '$', 'ARS'),
(3, 3, 'Bolivares', 'Bs.', 'VEL'),
(4, 2, 'Soles', 'S/.', 'PEN');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `notas`
--

CREATE TABLE `notas` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `texto` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vigencia` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `notas_medicas`
--

CREATE TABLE `notas_medicas` (
  `id` int(10) UNSIGNED NOT NULL,
  `tnm_id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) NOT NULL,
  `pac_id` int(11) NOT NULL,
  `detalle` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `notificaciones`
--

CREATE TABLE `notificaciones` (
  `id` int(10) UNSIGNED NOT NULL,
  `asignacion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `texto` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vigencia` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `pacientes`
--

CREATE TABLE `pacientes` (
  `pac_id` int(10) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `apaterno` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amaterno` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nacionalidad` int(11) DEFAULT NULL,
  `direccion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `telefono1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `genero` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fnacimiento` date NOT NULL,
  `prevision` int(11) DEFAULT NULL,
  `estado` int(11) NOT NULL,
  `codinterno` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fprimeconsulta` date NOT NULL,
  `motivoprimeconsulta` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  `foto` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ingprof` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `pagos`
--

CREATE TABLE `pagos` (
  `id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(11) DEFAULT NULL,
  `tipopago` int(11) DEFAULT NULL,
  `monto` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `paises`
--

CREATE TABLE `paises` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nacionalidad` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `paises`
--

INSERT INTO `paises` (`id`, `nombre`, `nacionalidad`) VALUES
(3, 'Venezuela', 'Venezolano'),
(2, 'Perú', 'Peruano'),
(1, 'Chile', 'Chileno'),
(4, 'Argentina', 'Argentino');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `piezas_dentales`
--

CREATE TABLE `piezas_dentales` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nro` int(11) NOT NULL,
  `info` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `piezas_dentales`
--

INSERT INTO `piezas_dentales` (`id`, `nombre`, `nro`, `info`) VALUES
(1, 'tercer molar superior derecha', 1, 'chilena'),
(2, 'segundo molar superior derecha', 2, 'chilena'),
(3, 'primer molar superior derecha', 3, 'chilena'),
(4, 'segundo premolar superior derecha', 4, 'chilena'),
(5, 'primer premolar superior derecha', 5, 'chilena'),
(6, 'canino superior derecha', 6, 'chilena'),
(7, 'incisivo lateral superior derecha', 7, 'chilena'),
(8, 'incisivo central superior derecha', 8, 'chilena'),
(9, 'incisivo central superior izquierda', 9, 'chilena'),
(10, 'incisivo lateral superior izquierda', 10, 'chilena'),
(11, 'canino superior izquierda', 11, 'chilena'),
(12, 'primer premolar superior izquierda', 12, 'chilena'),
(13, 'segundo premolar superior izquierda', 13, 'chilena'),
(14, 'primer molar superior izquierda', 14, 'chilena'),
(15, 'segundo molar superior izquierda', 15, 'chilena'),
(16, 'tercer molar superior izquierda', 16, 'chilena'),
(17, 'tercer molar inferior derecha', 17, 'chilena'),
(18, 'segundo molar inferior derecha', 18, 'chilena'),
(19, 'primer molar izquierdo derecha', 19, 'chilena'),
(20, 'segundo premolar inferior derecha', 20, 'chilena'),
(21, 'primer premolar inferior derecha', 21, 'chilena'),
(22, 'canino inferior derecha', 22, 'chilena'),
(23, 'incisivo lateral inferior derecha', 23, 'chilena'),
(24, 'incisivo central inferior derecha', 24, 'chilena'),
(25, 'incisivo central inferior izquierda', 25, 'chilena'),
(26, 'incisivo lateral inferior izquierda', 26, 'chilena'),
(27, 'canino inferior izquierda', 27, 'chilena'),
(28, 'primer premolar inferior izquierda', 28, 'chilena'),
(29, 'segundo premolar inferior izquierda', 29, 'chilena'),
(30, 'primer molar inferior izquierda', 30, 'chilena'),
(31, 'segundo molar inferior izquierda', 31, 'chilena'),
(32, 'tercer molar inferior izquierda', 32, 'chilena');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `profesion`
--

CREATE TABLE `profesion` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` varchar(200) DEFAULT NULL,
  `rol_id` int(11) DEFAULT NULL,
  `creado` varchar(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `profesion`
--

INSERT INTO `profesion` (`id`, `nombre`, `descripcion`, `rol_id`, `creado`) VALUES
(1, 'Psicologo', NULL, 3, 'N'),
(2, 'Nutricionista', NULL, 3, 'N');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `profesionales`
--

CREATE TABLE `profesionales` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `apaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nacionalidad` int(11) DEFAULT NULL,
  `direccion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `genero` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fnacimiento` date DEFAULT NULL,
  `gradoacademico` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `anotitulo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `universidad` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `especialidades` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` int(11) DEFAULT NULL,
  `profesion` int(11) NOT NULL,
  `ciudad` int(11) DEFAULT NULL,
  `apykey` varchar(22) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `apysecret` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `profesional_horario`
--

CREATE TABLE `profesional_horario` (
  `id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) DEFAULT NULL,
  `lun_estado` int(11) DEFAULT NULL,
  `lun_ini` time DEFAULT NULL,
  `lun_fin` time DEFAULT NULL,
  `lun_colacion` int(11) DEFAULT NULL,
  `lun_col1` time DEFAULT NULL,
  `lun_col2` time DEFAULT NULL,
  `mar_estado` int(11) DEFAULT NULL,
  `mar_ini` time DEFAULT NULL,
  `mar_fin` time DEFAULT NULL,
  `mar_colacion` int(11) DEFAULT NULL,
  `mar_col1` time DEFAULT NULL,
  `mar_col2` time DEFAULT NULL,
  `mie_estado` int(11) DEFAULT NULL,
  `mie_ini` time DEFAULT NULL,
  `mie_fin` time DEFAULT NULL,
  `mie_colacion` int(11) DEFAULT NULL,
  `mie_col1` time DEFAULT NULL,
  `mie_col2` time DEFAULT NULL,
  `jue_estado` int(11) DEFAULT NULL,
  `jue_ini` time DEFAULT NULL,
  `jue_fin` time DEFAULT NULL,
  `jue_colacion` int(11) DEFAULT NULL,
  `jue_col1` time DEFAULT NULL,
  `jue_col2` time DEFAULT NULL,
  `vie_estado` int(11) DEFAULT NULL,
  `vie_ini` time DEFAULT NULL,
  `vie_fin` time DEFAULT NULL,
  `vie_colacion` int(11) DEFAULT NULL,
  `vie_col1` time DEFAULT NULL,
  `vie_col2` time DEFAULT NULL,
  `sab_estado` int(11) DEFAULT NULL,
  `sab_ini` time DEFAULT NULL,
  `sab_fin` time DEFAULT NULL,
  `sab_colacion` int(11) DEFAULT NULL,
  `sab_col1` time DEFAULT NULL,
  `sab_col2` time DEFAULT NULL,
  `dom_estado` int(11) DEFAULT NULL,
  `dom_ini` time DEFAULT NULL,
  `dom_fin` time DEFAULT NULL,
  `dom_colacion` int(11) DEFAULT NULL,
  `dom_col1` time DEFAULT NULL,
  `dom_col2` time DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `prof_espec`
--

CREATE TABLE `prof_espec` (
  `id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) NOT NULL,
  `espec_id` int(11) NOT NULL,
  `estado` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `prof_servicio`
--

CREATE TABLE `prof_servicio` (
  `id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) NOT NULL,
  `servicio_id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `responsable_financiero`
--

CREATE TABLE `responsable_financiero` (
  `rf_id` int(10) UNSIGNED NOT NULL,
  `pac_id` int(10) UNSIGNED NOT NULL,
  `apaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nacionalidad` int(11) DEFAULT NULL,
  `direccion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `genero` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fnacimiento` date DEFAULT NULL,
  `prevision` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `roles`
--

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipo_rol` int(11) DEFAULT NULL,
  `estado` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `roles`
--

INSERT INTO `roles` (`id`, `nombre`, `descripcion`, `tipo_rol`, `estado`) VALUES
(3, 'Profesional', 'Profesional', 1, 1),
(2, 'Funcionario', 'Funcionario', 0, 1),
(4, 'Paciente', 'Paciente', 2, 1),
(5, 'Técnicos', 'Técnicos', 3, 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `roles_modulos`
--

CREATE TABLE `roles_modulos` (
  `id` int(10) UNSIGNED NOT NULL,
  `rol_id` int(10) UNSIGNED NOT NULL,
  `modulo_id` int(10) UNSIGNED NOT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipoperfil` int(11) NOT NULL,
  `estado` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `roles_modulos`
--

INSERT INTO `roles_modulos` (`id`, `rol_id`, `modulo_id`, `descripcion`, `tipoperfil`, `estado`) VALUES
(1, 2, 1, 'Administrador profesionales', 2, 1),
(2, 2, 2, 'Administrador funcionarios', 2, 1),
(50, 2, 26, 'Paciente Secretaria', 3, 1),
(4, 2, 4, 'Administrador roles', 2, 1),
(16, 2, 25, 'Administrador configurar apariencia', 2, 1),
(17, 3, 14, 'Nutricionista index', 2, 1),
(73, 3, 15, 'agenda diaria', 4, 1),
(19, 3, 16, 'Nutricionista pacientes', 2, 1),
(22, 3, 25, 'Nutricionista configurar apariencia', 2, 1),
(42, 2, 14, 'Index', 3, 1),
(72, 3, 16, 'pac', 4, 1),
(45, 2, 25, 'Configuracion', 3, 1),
(46, 2, 29, 'Tipo De Cancer', 2, 1),
(47, 2, 30, 'Agenda Paciente Secretaria', 3, 0),
(40, 2, 27, 'Administrador paises', 2, 1),
(41, 2, 28, 'Administrador comunas', 2, 1),
(59, 3, 28, 'descr comunas', 4, 1),
(74, 3, 24, 'datom', 4, 1),
(55, 3, 14, 'Psicologo Index', 1, 1),
(71, 3, 14, 'Su agenda', 4, 1),
(57, 3, 16, 'Psicologo Pacientes', 1, 1),
(58, 3, 25, 'Psicologo Configurar Apariencia', 1, 1),
(60, 2, 1, 'Super Administrador profesionales', 1, 1),
(61, 2, 2, 'Super Administrador funcionarios', 1, 1),
(62, 2, 4, 'Super Administrador roles', 1, 1),
(63, 2, 5, 'Super Administrador modulos', 1, 1),
(64, 2, 25, 'Super Administrador configurar apariencia', 1, 1),
(65, 2, 29, 'Super Administrador Tipo De Cancer', 1, 1),
(66, 2, 31, 'Super Administrador Profesion', 1, 1),
(67, 2, 27, 'Super Administrador paises', 1, 1),
(68, 2, 28, 'Super Administrador comunas', 1, 1),
(69, 2, 32, 'Super Administrador Tipo Funcionario', 1, 1),
(75, 2, 33, 'Administrador datos empresa', 2, 1),
(76, 2, 34, 'Administrador ingreso llave empresa', 2, 1),
(77, 2, 35, 'Administrador usuarios', 2, 1),
(78, 2, 7, 'Administrador isapres', 2, 1),
(79, 2, 36, 'Administrador ciudades', 2, 1),
(80, 2, 37, 'Administrador perfil', 2, 1),
(81, 2, 42, 'Index', 11, 1),
(82, 2, 45, 'Configuracion', 11, 1),
(83, 2, 47, 'Agenda Paciente Secretaria', 11, 1),
(84, 2, 50, 'Paciente Secretaria', 11, 0),
(85, 2, 42, 'Index', 12, 1),
(86, 2, 45, 'Configuracion', 12, 0),
(87, 2, 47, 'Agenda Paciente Secretaria', 12, 0),
(88, 2, 50, 'Paciente Secretaria', 12, 1),
(95, 2, 47, 'Agenda Paciente Secretaria', 15, 0),
(94, 2, 45, 'Configuracion', 15, 1),
(93, 2, 42, 'Index', 15, 1),
(96, 2, 50, 'Paciente Secretaria', 15, 1),
(97, 2, 39, 'Administrador mantenedor tablas', 2, 1),
(98, 2, 8, 'Administrador sucursales', 2, 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `servicios`
--

CREATE TABLE `servicios` (
  `id` int(10) UNSIGNED NOT NULL,
  `id_profesion` int(11) NOT NULL,
  `id_especialidad` int(11) NOT NULL,
  `moneda_id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `valor` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descuento` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `maxvalordscto` int(11) DEFAULT NULL,
  `convenio` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `sesionasistente`
--

CREATE TABLE `sesionasistente` (
  `id` int(10) UNSIGNED NOT NULL,
  `profesional_id` int(11) NOT NULL,
  `asistente_id` int(11) NOT NULL,
  `estado` int(11) NOT NULL,
  `fecha` date NOT NULL,
  `hora_ini` time DEFAULT NULL,
  `hora_fin` time DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `sesion_usuario`
--

CREATE TABLE `sesion_usuario` (
  `id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `subservicios`
--

CREATE TABLE `subservicios` (
  `id` int(10) UNSIGNED NOT NULL,
  `servicio_id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `precio` int(11) DEFAULT NULL,
  `descuento` int(11) DEFAULT NULL,
  `piezadental` int(11) DEFAULT NULL,
  `estado` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `sucursales`
--

CREATE TABLE `sucursales` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `direccion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `pais` int(11) NOT NULL,
  `telefono` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado` int(11) DEFAULT NULL,
  `luinicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lufinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mainicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mafinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `miinicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mifinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `juinicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jufinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `viinicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vifinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sainicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `safinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `doinicioAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dofinalAM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `luinicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lufinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mainicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mafinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `miinicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mifinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `juinicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `jufinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `viinicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vifinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sainicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `safinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `doinicioPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dofinalPM` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `sucursales`
--

INSERT INTO `sucursales` (`id`, `nombre`, `rut`, `direccion`, `comuna`, `pais`, `telefono`, `estado`, `luinicioAM`, `lufinalAM`, `mainicioAM`, `mafinalAM`, `miinicioAM`, `mifinalAM`, `juinicioAM`, `jufinalAM`, `viinicioAM`, `vifinalAM`, `sainicioAM`, `safinalAM`, `doinicioAM`, `dofinalAM`, `luinicioPM`, `lufinalPM`, `mainicioPM`, `mafinalPM`, `miinicioPM`, `mifinalPM`, `juinicioPM`, `jufinalPM`, `viinicioPM`, `vifinalPM`, `sainicioPM`, `safinalPM`, `doinicioPM`, `dofinalPM`) VALUES
(1, 'Casa Matriz', NULL, '', 0, 0, '', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `sucursal_profesional`
--

CREATE TABLE `sucursal_profesional` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `sucursal_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `sucursal_profesional`
--

INSERT INTO `sucursal_profesional` (`id`, `user_id`, `sucursal_id`, `created_at`, `updated_at`) VALUES
(1, 2, 1, '2020-05-12 01:05:35', '2021-11-30 02:11:10'),
(2, 3, 1, '2020-05-12 02:05:58', '2021-11-30 02:11:49');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tecnicos`
--

CREATE TABLE `tecnicos` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombre` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `apaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nacionalidad` int(11) DEFAULT NULL,
  `direccion` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `comuna` int(11) DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telefono2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `genero` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fnacimiento` date DEFAULT NULL,
  `gradoacademico` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `anotitulo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `universidad` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `especialidades` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` int(11) DEFAULT NULL,
  `ciudad` int(11) DEFAULT NULL,
  `tipo` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tipo_cancer`
--

CREATE TABLE `tipo_cancer` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tipo_funcionario`
--

CREATE TABLE `tipo_funcionario` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` varchar(200) DEFAULT NULL,
  `rol_id` int(11) DEFAULT NULL,
  `creado` varchar(1) DEFAULT NULL,
  `estado` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `tipo_funcionario`
--

INSERT INTO `tipo_funcionario` (`id`, `nombre`, `descripcion`, `rol_id`, `creado`, `estado`) VALUES
(1, 'SuperAdmin', NULL, 2, 'N', 1),
(2, 'Administrador', NULL, 2, 'N', 1),
(3, 'Secretaria', NULL, 2, 'N', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tipo_notas_medicas`
--

CREATE TABLE `tipo_notas_medicas` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tipo` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `datajson` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `tipo_notas_medicas`
--

INSERT INTO `tipo_notas_medicas` (`id`, `nombre`, `tipo`, `datajson`) VALUES
(1, 'Bitácora', 'text', ''),
(2, 'Medicamentos', 'text', ''),
(3, 'Alergias', 'text', '');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tipo_tecnicos`
--

CREATE TABLE `tipo_tecnicos` (
  `id` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` varchar(200) DEFAULT NULL,
  `rol_id` int(11) DEFAULT NULL,
  `creado` varchar(1) DEFAULT NULL,
  `estado` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `users`
--

CREATE TABLE `users` (
  `id` int(10) UNSIGNED NOT NULL,
  `rol_id` bigint(20) UNSIGNED NOT NULL,
  `rut` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `apaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amaterno` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `apariencia` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `menu_a` int(11) DEFAULT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tipoperfil` int(11) NOT NULL,
  `estado` int(11) NOT NULL,
  `rutempresa` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `archivos`
--
ALTER TABLE `archivos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `archivoscreados`
--
ALTER TABLE `archivoscreados`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `areas`
--
ALTER TABLE `areas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `areas_sucursal_id_foreign` (`sucursal_id`);

--
-- Indices de la tabla `boxs`
--
ALTER TABLE `boxs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `boxs_area_id_foreign` (`area_id`);

--
-- Indices de la tabla `citas`
--
ALTER TABLE `citas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `citas_pac_id_foreign` (`pac_id`);

--
-- Indices de la tabla `ciudades`
--
ALTER TABLE `ciudades`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `comunas`
--
ALTER TABLE `comunas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `configuraciones`
--
ALTER TABLE `configuraciones`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `configuracionesfinanciera`
--
ALTER TABLE `configuracionesfinanciera`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `cotizaciones`
--
ALTER TABLE `cotizaciones`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cotizaciones_pac_id_foreign` (`pac_id`);

--
-- Indices de la tabla `detalle_cotizacion`
--
ALTER TABLE `detalle_cotizacion`
  ADD PRIMARY KEY (`id`),
  ADD KEY `detalle_cotizacion_cotizacion_id_foreign` (`cotizacion_id`);

--
-- Indices de la tabla `detalle_subservicio`
--
ALTER TABLE `detalle_subservicio`
  ADD PRIMARY KEY (`id`),
  ADD KEY `detalle_subservicio_subservicio_id_foreign` (`subservicio_id`);

--
-- Indices de la tabla `empresa`
--
ALTER TABLE `empresa`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `especialidades`
--
ALTER TABLE `especialidades`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `estado_cotizacion`
--
ALTER TABLE `estado_cotizacion`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `estado_servicio`
--
ALTER TABLE `estado_servicio`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `ficha`
--
ALTER TABLE `ficha`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `funcionarios`
--
ALTER TABLE `funcionarios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `funcionarios_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `inventario_boxs`
--
ALTER TABLE `inventario_boxs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `inventario_boxs_box_id_foreign` (`box_id`);

--
-- Indices de la tabla `isapres`
--
ALTER TABLE `isapres`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `laboratorios`
--
ALTER TABLE `laboratorios`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `modulos`
--
ALTER TABLE `modulos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `monedas`
--
ALTER TABLE `monedas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `notas`
--
ALTER TABLE `notas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `notas_medicas`
--
ALTER TABLE `notas_medicas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notas_medicas_tnm_id_foreign` (`tnm_id`);

--
-- Indices de la tabla `notificaciones`
--
ALTER TABLE `notificaciones`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `pacientes`
--
ALTER TABLE `pacientes`
  ADD PRIMARY KEY (`pac_id`),
  ADD KEY `pacientes_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `pagos`
--
ALTER TABLE `pagos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `paises`
--
ALTER TABLE `paises`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

--
-- Indices de la tabla `piezas_dentales`
--
ALTER TABLE `piezas_dentales`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `profesion`
--
ALTER TABLE `profesion`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `profesionales`
--
ALTER TABLE `profesionales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `profesionales_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `profesional_horario`
--
ALTER TABLE `profesional_horario`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `prof_espec`
--
ALTER TABLE `prof_espec`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `prof_servicio`
--
ALTER TABLE `prof_servicio`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `responsable_financiero`
--
ALTER TABLE `responsable_financiero`
  ADD PRIMARY KEY (`rf_id`),
  ADD KEY `responsable_financiero_pac_id_foreign` (`pac_id`);

--
-- Indices de la tabla `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `roles_modulos`
--
ALTER TABLE `roles_modulos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `roles_modulos_rol_id_foreign` (`rol_id`),
  ADD KEY `roles_modulos_modulo_id_foreign` (`modulo_id`);

--
-- Indices de la tabla `servicios`
--
ALTER TABLE `servicios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `servicios_moneda_id_foreign` (`moneda_id`);

--
-- Indices de la tabla `sesionasistente`
--
ALTER TABLE `sesionasistente`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `sesion_usuario`
--
ALTER TABLE `sesion_usuario`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `subservicios`
--
ALTER TABLE `subservicios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subservicios_servicio_id_foreign` (`servicio_id`);

--
-- Indices de la tabla `sucursales`
--
ALTER TABLE `sucursales`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `sucursal_profesional`
--
ALTER TABLE `sucursal_profesional`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `tecnicos`
--
ALTER TABLE `tecnicos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `tipo_cancer`
--
ALTER TABLE `tipo_cancer`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `tipo_funcionario`
--
ALTER TABLE `tipo_funcionario`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `tipo_notas_medicas`
--
ALTER TABLE `tipo_notas_medicas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `tipo_tecnicos`
--
ALTER TABLE `tipo_tecnicos`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD KEY `users_rol_id_foreign` (`rol_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `archivos`
--
ALTER TABLE `archivos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `archivoscreados`
--
ALTER TABLE `archivoscreados`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `areas`
--
ALTER TABLE `areas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `boxs`
--
ALTER TABLE `boxs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `citas`
--
ALTER TABLE `citas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `ciudades`
--
ALTER TABLE `ciudades`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `comunas`
--
ALTER TABLE `comunas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `configuraciones`
--
ALTER TABLE `configuraciones`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `configuracionesfinanciera`
--
ALTER TABLE `configuracionesfinanciera`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `cotizaciones`
--
ALTER TABLE `cotizaciones`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `detalle_cotizacion`
--
ALTER TABLE `detalle_cotizacion`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `detalle_subservicio`
--
ALTER TABLE `detalle_subservicio`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `especialidades`
--
ALTER TABLE `especialidades`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `estado_cotizacion`
--
ALTER TABLE `estado_cotizacion`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `estado_servicio`
--
ALTER TABLE `estado_servicio`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `funcionarios`
--
ALTER TABLE `funcionarios`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `inventario_boxs`
--
ALTER TABLE `inventario_boxs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `isapres`
--
ALTER TABLE `isapres`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT de la tabla `laboratorios`
--
ALTER TABLE `laboratorios`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60;

--
-- AUTO_INCREMENT de la tabla `modulos`
--
ALTER TABLE `modulos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;

--
-- AUTO_INCREMENT de la tabla `monedas`
--
ALTER TABLE `monedas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `notas`
--
ALTER TABLE `notas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `notas_medicas`
--
ALTER TABLE `notas_medicas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `notificaciones`
--
ALTER TABLE `notificaciones`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `pacientes`
--
ALTER TABLE `pacientes`
  MODIFY `pac_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `pagos`
--
ALTER TABLE `pagos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `paises`
--
ALTER TABLE `paises`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `piezas_dentales`
--
ALTER TABLE `piezas_dentales`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT de la tabla `profesion`
--
ALTER TABLE `profesion`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `profesionales`
--
ALTER TABLE `profesionales`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `profesional_horario`
--
ALTER TABLE `profesional_horario`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `prof_espec`
--
ALTER TABLE `prof_espec`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `prof_servicio`
--
ALTER TABLE `prof_servicio`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `responsable_financiero`
--
ALTER TABLE `responsable_financiero`
  MODIFY `rf_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT de la tabla `roles_modulos`
--
ALTER TABLE `roles_modulos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=99;

--
-- AUTO_INCREMENT de la tabla `servicios`
--
ALTER TABLE `servicios`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `sesionasistente`
--
ALTER TABLE `sesionasistente`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `sesion_usuario`
--
ALTER TABLE `sesion_usuario`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `subservicios`
--
ALTER TABLE `subservicios`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `sucursales`
--
ALTER TABLE `sucursales`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `sucursal_profesional`
--
ALTER TABLE `sucursal_profesional`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `tecnicos`
--
ALTER TABLE `tecnicos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `tipo_cancer`
--
ALTER TABLE `tipo_cancer`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT de la tabla `tipo_funcionario`
--
ALTER TABLE `tipo_funcionario`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `tipo_notas_medicas`
--
ALTER TABLE `tipo_notas_medicas`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `tipo_tecnicos`
--
ALTER TABLE `tipo_tecnicos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
