CREATE TABLE `ordenes_facts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `laboratorio` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
  `cia` varchar(40) COLLATE latin1_general_ci DEFAULT NULL,
  `medico` varchar(60) COLLATE latin1_general_ci DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `status` char(1) COLLATE latin1_general_ci DEFAULT 'E',
  `cuantos` bigint(21) NOT NULL DEFAULT '0',
  `totalpagar` double(19,2) DEFAULT NULL,
  `pagado` double(19,2) DEFAULT NULL,
  `saldo` double(19,2) DEFAULT NULL,
  `totalpagarcli` double(19,2) DEFAULT NULL,
  `pagadocli` double(19,2) DEFAULT NULL,
  `saldocli` double(19,2) DEFAULT NULL,
  `totalpagarcia` double(19,2) DEFAULT NULL,
  `pagadocia` double(19,2) DEFAULT NULL,
  `saldocia` double(19,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `of_labid` (`laboratorio`),
  KEY `of_medico` (`medico`),
  KEY `of_cia` (`cia`),
  KEY `of_fechares` (`fecha`)
) ENGINE=MyISAM AUTO_INCREMENT=622 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

CREATE TABLE `pruebas_facts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `laboratorio` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
  `cia` varchar(40) COLLATE latin1_general_ci DEFAULT NULL,
  `medico` varchar(60) COLLATE latin1_general_ci DEFAULT NULL,
  `departamento` varchar(25) COLLATE latin1_general_ci DEFAULT NULL,
  `fechares` date DEFAULT NULL,
  `codiex` char(4) COLLATE latin1_general_ci DEFAULT NULL,
  `status` char(1) COLLATE latin1_general_ci DEFAULT 'E',
  `nombrexa` varchar(30) COLLATE latin1_general_ci DEFAULT NULL,
  `cpt` varchar(10) COLLATE latin1_general_ci DEFAULT NULL,
  `Cuantos` int(21) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `pv_laboratorio` (`laboratorio`),
  KEY `pv_cia` (`cia`),
  KEY `pv_medico` (`medico`),
  KEY `pv_fechares` (`fechares`),
  KEY `pv_codiex` (`codiex`),
  KEY `pv_nombrexa` (`nombrexa`),
  KEY `pv_status` (`status`),
  KEY `pv_departamentos` (`departamento`)
) ENGINE=MyISAM AUTO_INCREMENT=5617 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

