/*
SQLyog Enterprise - MySQL GUI v8.12 
MySQL - 5.5.18 : Database - xlab
*********************************************************************
*/





CREATE TABLE `samplereports` (
  `idx` INT(11) NOT NULL AUTO_INCREMENT,
  `accno` VARCHAR(20) DEFAULT NULL,
  `report` MEDIUMBLOB,
  PRIMARY KEY (`idx`),
  KEY `accno_idx` (`accno`)
) ENGINE=INNODB DEFAULT CHARSET=latin1;


CREATE TABLE `xportalrequired` (
  `idx` INT(11) NOT NULL AUTO_INCREMENT,
  `clientUid` VARCHAR(38) DEFAULT NULL,
  `fdto` VARCHAR(10) DEFAULT NULL,
  `field_description` VARCHAR(50) DEFAULT NULL,
  `ftag` VARCHAR(30) DEFAULT NULL,
  `fdefault` VARCHAR(20) DEFAULT NULL,
  `frequired` TINYINT(1) DEFAULT NULL,
  `fvisible` TINYINT(1) DEFAULT NULL,
  `fid` VARCHAR(30) DEFAULT NULL,
  PRIMARY KEY (`idx`)
) ENGINE=INNODB AUTO_INCREMENT=953 DEFAULT CHARSET=latin1;
/*Table structure for table `xportalrequireddefault` */


CREATE TABLE `xportalrequireddefault` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `clientUid` varchar(38) DEFAULT NULL,
  `field_description` varchar(50) DEFAULT NULL,
  `fdto` varchar(10) DEFAULT NULL,
  `ftag` varchar(30) DEFAULT NULL,
  `fdefault` varchar(20) DEFAULT NULL,
  `frequired` tinyint(1) DEFAULT NULL,
  `fvisible` tinyint(1) DEFAULT NULL,
  `fid` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=1204 DEFAULT CHARSET=latin1;

/*Data for the table `xportalrequireddefault` */

insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Address','Patient','pt_addr1','',0,1,'Patient_Addr1');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Suite/Apt','Patient','pt_addr2','',0,1,'Patient_Addr2');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Cell Phone','Patient','pt_cell','',0,1,'Patient_Cellphone');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'City','Patient','pt_city','',0,1,'Patient_City');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Provence/Island','Patient','pt_city2','',0,1,'Patient_Island');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Country','Patient','pt_country','',0,1,'Patient_Country');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'DOB','Patient','pt_dob','',1,1,'Patient_Patient_dob');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Email Address','Patient','pt_email','',0,1,'Patient_Email');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'First Name','Patient','pt_fname','',1,1,'Patient_Patient_fname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Home Phone','Patient','pt_hphone','',0,1,'Patient_Homephone');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Last Name','Patient','pt_lname','',1,1,'Patient_Patient_lname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Middle Initial','Patient','pt_mi','',0,1,'Patient_Patient_initial');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Mothers Maiden Name','Patient','pt_mmn','',0,1,'Patient_Patient_maiden');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'MRN','Patient','pt_mrn','<AUTO>',1,1,'Patient_Patient_mrn');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Race','Patient','pt_race','',0,1,'Patient_Patient_race');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Sex','Patient','pt_sex','',1,1,'Patient_Patient_sex');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'SSN','Patient','pt_ssn','',0,1,'Patient_Patient_ssn');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'State','Patient','pt_state','',0,1,'Patient_State');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Work Phone','Patient','pt_wphone','',0,1,'Patient_Workphone');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Zip Code','Patient','pt_zip','',0,1,'Patient_Zip');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Collected Date Time','Sample','Dtcollected','<NOW>',1,1,'Sample_Dtcollected');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Fasting?','Sample','Fasting','',0,1,'Sample_Fasting');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Ordering Provider','Sample','Ordering_Provider','',1,1,'Sample_Ordering_provider');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Accession','Sample','Sample_id','<AUTO>',1,1,'Sample_Sample_id');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Billing Type','Visit','v_billtype','',1,1,'Visit_Billingcode');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Height','Visit','v_Height','',0,1,'Visit_Height');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Height Units','Visit','v_heightunits','',0,1,'Visit_HeightUnits');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Visit ID','Visit','v_id','<AUTO>',1,1,'Visit_Visitid');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Weight','Visit','v_weight','',0,1,'Visit_Weight');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Weight Units','Visit','v_weightunits','',0,1,'Visit_WeightUnits');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Address','VisitIns','vins_gaddr1','',0,1,'VisitIns_gaddr1');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Suite/Apt','VisitIns','vins_gaddr2','',0,1,'VisitIns_gaddr2');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'City','VisitIns','vins_gcity','',0,1,'VisitIns_gcity');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'First Name','VisitIns','vins_gfname','',0,1,'VisitIns_gfirstname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Last Name','VisitIns','vins_glname','',0,1,'VisitIns_glastname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Middle Initial','VisitIns','vins_gmi','',0,1,'VisitIns_gmi');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Relationsip','VisitIns','vins_grelationship','',0,1,'VisitIns_grelationship');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'State','VisitIns','vins_gstate','',0,1,'VisitIns_gstate');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Zip','VisitIns','vins_gzip','',0,1,'VisitIns_gzip');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary First Name','VisitIns','vins_pfname','',0,1,'VisitIns_pfname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Group Number','VisitIns','vins_pgroup','',0,1,'VisitIns_pgroupnumber');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Insurance ID','VisitIns','vins_pinsurance','',0,1,'VisitIns_pinsid');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Last Name','VisitIns','vins_plname','',0,1,'VisitIns_plastname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Middle Initial','VisitIns','vins_pmi','',0,1,'VisitIns_pmi');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Plan Code','VisitIns','vins_pplancode','',0,1,'VisitIns_pplancode');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Policy Number','VisitIns','vins_ppolicy','',0,1,'VisitIns_ppolicynumber');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Primary Relationship','VisitIns','vins_prelationship','',0,1,'VisitIns_prelationship');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary First Name','VisitIns','vins_sfname','',0,1,'VisitIns_sfirstname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Group Number','VisitIns','vins_sgroup','',0,1,'VisitIns_sgroupnumber');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Insurance ID','VisitIns','vins_sinsurance','',0,1,'VisitIns_sinsid');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Last Name','VisitIns','vins_slname','',0,1,'VisitIns_slname');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Midle Initial','VisitIns','vins_smi','',0,1,'VisitIns_smi');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Plan Code','VisitIns','vins_splancode','',0,1,'VisitIns_splancode');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Policy Number','VisitIns','vins_spolicy','',0,1,'VisitIns_spolicy');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Secondary Relationship','VisitIns','vins_srelationship','',0,1,'VisitIns_srelationship');
insert  into `xportalrequireddefault`(`clientUid`,`field_description`,`fdto`,`ftag`,`fdefault`,`frequired`,`fvisible`,`fid`) values (NULL,'Workmans Comp?','VisitIns','vins_workmanscomp','',0,1,'VisitIns_workmanscomp');

INSERT IGNORE INTO `versions` SET ver_type = 0, ver_dt = NOW(), ver_who = 'Script Update', ver_major = '19', ver_minor = '10', ver_build = '2', ver_revision= '0'; 
