alphabetize the translated language titles per tracker artifact feature request ...
[openemr.git] / sql / database.sql
blobfe211a2428ad4a738cccb308f228dc507e9b1ce8
1 -- 
2 -- Database: `openemr`
3 -- 
5 -- --------------------------------------------------------
7 -- 
8 -- Table structure for table `addresses`
9 -- 
11 DROP TABLE IF EXISTS `addresses`;
12 CREATE TABLE `addresses` (
13   `id` int(11) NOT NULL default '0',
14   `line1` varchar(255) default NULL,
15   `line2` varchar(255) default NULL,
16   `city` varchar(255) default NULL,
17   `state` varchar(35) default NULL,
18   `zip` varchar(10) default NULL,
19   `plus_four` varchar(4) default NULL,
20   `country` varchar(255) default NULL,
21   `foreign_id` int(11) default NULL,
22   PRIMARY KEY  (`id`),
23   KEY `foreign_id` (`foreign_id`)
24 ) ENGINE=MyISAM;
26 -- --------------------------------------------------------
28 -- 
29 -- Table structure for table `array`
30 -- 
32 DROP TABLE IF EXISTS `array`;
33 CREATE TABLE `array` (
34   `array_key` varchar(255) default NULL,
35   `array_value` longtext
36 ) ENGINE=MyISAM;
38 -- --------------------------------------------------------
40 -- 
41 -- Table structure for table `batchcom`
42 -- 
44 DROP TABLE IF EXISTS `batchcom`;
45 CREATE TABLE `batchcom` (
46   `id` bigint(20) NOT NULL auto_increment,
47   `patient_id` int(11) NOT NULL default '0',
48   `sent_by` bigint(20) NOT NULL default '0',
49   `msg_type` varchar(60) default NULL,
50   `msg_subject` varchar(255) default NULL,
51   `msg_text` mediumtext,
52   `msg_date_sent` datetime NOT NULL default '0000-00-00 00:00:00',
53   PRIMARY KEY  (`id`)
54 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
56 -- --------------------------------------------------------
58 -- 
59 -- Table structure for table `billing`
60 -- 
62 DROP TABLE IF EXISTS `billing`;
63 CREATE TABLE `billing` (
64   `id` int(11) NOT NULL auto_increment,
65   `date` datetime default NULL,
66   `code_type` varchar(7) default NULL,
67   `code` varchar(9) default NULL,
68   `pid` int(11) default NULL,
69   `provider_id` int(11) default NULL,
70   `user` int(11) default NULL,
71   `groupname` varchar(255) default NULL,
72   `authorized` tinyint(1) default NULL,
73   `encounter` int(11) default NULL,
74   `code_text` longtext,
75   `billed` tinyint(1) default NULL,
76   `activity` tinyint(1) default NULL,
77   `payer_id` int(11) default NULL,
78   `bill_process` tinyint(2) NOT NULL default '0',
79   `bill_date` datetime default NULL,
80   `process_date` datetime default NULL,
81   `process_file` varchar(255) default NULL,
82   `modifier` varchar(5) default NULL,
83   `units` tinyint(3) default NULL,
84   `fee` decimal(12,2) default NULL,
85   `justify` varchar(255) default NULL,
86   `target` varchar(30) default NULL,
87   `x12_partner_id` int(11) default NULL,
88   `ndc_info` varchar(255) default NULL,
89   PRIMARY KEY  (`id`),
90   KEY `pid` (`pid`)
91 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
93 -- --------------------------------------------------------
95 -- 
96 -- Table structure for table `categories`
97 -- 
99 DROP TABLE IF EXISTS `categories`;
100 CREATE TABLE `categories` (
101   `id` int(11) NOT NULL default '0',
102   `name` varchar(255) default NULL,
103   `value` varchar(255) default NULL,
104   `parent` int(11) NOT NULL default '0',
105   `lft` int(11) NOT NULL default '0',
106   `rght` int(11) NOT NULL default '0',
107   PRIMARY KEY  (`id`),
108   KEY `parent` (`parent`),
109   KEY `lft` (`lft`,`rght`)
110 ) ENGINE=MyISAM;
112 -- 
113 -- Dumping data for table `categories`
114 -- 
116 INSERT INTO `categories` VALUES (1, 'Categories', '', 0, 0, 9);
117 INSERT INTO `categories` VALUES (2, 'Lab Report', '', 1, 1, 2);
118 INSERT INTO `categories` VALUES (3, 'Medical Record', '', 1, 3, 4);
119 INSERT INTO `categories` VALUES (4, 'Patient Information', '', 1, 5, 8);
120 INSERT INTO `categories` VALUES (5, 'Patient ID card', '', 4, 6, 7);
122 -- --------------------------------------------------------
124 -- 
125 -- Table structure for table `categories_seq`
126 -- 
128 DROP TABLE IF EXISTS `categories_seq`;
129 CREATE TABLE `categories_seq` (
130   `id` int(11) NOT NULL default '0',
131   PRIMARY KEY  (`id`)
132 ) ENGINE=MyISAM;
134 -- 
135 -- Dumping data for table `categories_seq`
136 -- 
138 INSERT INTO `categories_seq` VALUES (5);
140 -- --------------------------------------------------------
142 -- 
143 -- Table structure for table `categories_to_documents`
144 -- 
146 DROP TABLE IF EXISTS `categories_to_documents`;
147 CREATE TABLE `categories_to_documents` (
148   `category_id` int(11) NOT NULL default '0',
149   `document_id` int(11) NOT NULL default '0',
150   PRIMARY KEY  (`category_id`,`document_id`)
151 ) ENGINE=MyISAM;
153 -- --------------------------------------------------------
155 -- 
156 -- Table structure for table `claims`
157 -- 
159 DROP TABLE IF EXISTS `claims`;
160 CREATE TABLE `claims` (
161   `patient_id` int(11) NOT NULL,
162   `encounter_id` int(11) NOT NULL,
163   `version` int(10) unsigned NOT NULL auto_increment,
164   `payer_id` int(11) NOT NULL default '0',
165   `status` tinyint(2) NOT NULL default '0',
166   `payer_type` tinyint(4) NOT NULL default '0',
167   `bill_process` tinyint(2) NOT NULL default '0',
168   `bill_time` datetime default NULL,
169   `process_time` datetime default NULL,
170   `process_file` varchar(255) default NULL,
171   `target` varchar(30) default NULL,
172   `x12_partner_id` int(11) NOT NULL default '0',
173   PRIMARY KEY  (`patient_id`,`encounter_id`,`version`)
174 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
176 -- --------------------------------------------------------
178 -- 
179 -- Table structure for table `codes`
180 -- 
182 DROP TABLE IF EXISTS `codes`;
183 CREATE TABLE `codes` (
184   `id` int(11) NOT NULL auto_increment,
185   `code_text` varchar(255) NOT NULL default '',
186   `code_text_short` varchar(24) NOT NULL default '',
187   `code` varchar(10) NOT NULL default '',
188   `code_type` tinyint(2) default NULL,
189   `modifier` varchar(5) NOT NULL default '',
190   `units` tinyint(3) default NULL,
191   `fee` decimal(12,2) default NULL,
192   `superbill` varchar(31) NOT NULL default '',
193   `related_code` varchar(255) NOT NULL default '',
194   `taxrates` varchar(255) NOT NULL default '',
195   `cyp_factor` float NOT NULL DEFAULT 0 COMMENT 'quantity representing a years supply',
196   `active` TINYINT(1) DEFAULT 1 COMMENT '0 = inactive, 1 = active',
197   PRIMARY KEY  (`id`),
198   KEY `code` (`code`)
199 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
201 -- --------------------------------------------------------
203 -- 
204 -- Table structure for table `config`
205 -- 
207 DROP TABLE IF EXISTS `config`;
208 CREATE TABLE `config` (
209   `id` int(11) NOT NULL default '0',
210   `name` varchar(255) default NULL,
211   `value` varchar(255) default NULL,
212   `parent` int(11) NOT NULL default '0',
213   `lft` int(11) NOT NULL default '0',
214   `rght` int(11) NOT NULL default '0',
215   PRIMARY KEY  (`id`),
216   KEY `parent` (`parent`),
217   KEY `lft` (`lft`,`rght`)
218 ) ENGINE=MyISAM;
220 -- --------------------------------------------------------
222 -- 
223 -- Table structure for table `config_seq`
224 -- 
226 DROP TABLE IF EXISTS `config_seq`;
227 CREATE TABLE `config_seq` (
228   `id` int(11) NOT NULL default '0',
229   PRIMARY KEY  (`id`)
230 ) ENGINE=MyISAM;
232 -- 
233 -- Dumping data for table `config_seq`
234 -- 
236 INSERT INTO `config_seq` VALUES (0);
238 -- --------------------------------------------------------
240 -- 
241 -- Table structure for table `documents`
242 -- 
244 DROP TABLE IF EXISTS `documents`;
245 CREATE TABLE `documents` (
246   `id` int(11) NOT NULL default '0',
247   `type` enum('file_url','blob','web_url') default NULL,
248   `size` int(11) default NULL,
249   `date` datetime default NULL,
250   `url` varchar(255) default NULL,
251   `mimetype` varchar(255) default NULL,
252   `pages` int(11) default NULL,
253   `owner` int(11) default NULL,
254   `revision` timestamp NOT NULL,
255   `foreign_id` int(11) default NULL,
256   `docdate` date default NULL,
257   `list_id` bigint(20) NOT NULL default '0',
258   PRIMARY KEY  (`id`),
259   KEY `revision` (`revision`),
260   KEY `foreign_id` (`foreign_id`),
261   KEY `owner` (`owner`)
262 ) ENGINE=MyISAM;
264 -- --------------------------------------------------------
266 -- 
267 -- Table structure for table `drug_inventory`
268 -- 
270 DROP TABLE IF EXISTS `drug_inventory`;
271 CREATE TABLE `drug_inventory` (
272   `inventory_id` int(11) NOT NULL auto_increment,
273   `drug_id` int(11) NOT NULL,
274   `lot_number` varchar(20) default NULL,
275   `expiration` date default NULL,
276   `manufacturer` varchar(255) default NULL,
277   `on_hand` int(11) NOT NULL default '0',
278   `last_notify` date NOT NULL default '0000-00-00',
279   `destroy_date` date default NULL,
280   `destroy_method` varchar(255) default NULL,
281   `destroy_witness` varchar(255) default NULL,
282   `destroy_notes` varchar(255) default NULL,
283   PRIMARY KEY  (`inventory_id`)
284 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
286 -- --------------------------------------------------------
288 -- 
289 -- Table structure for table `drug_sales`
290 -- 
292 DROP TABLE IF EXISTS `drug_sales`;
293 CREATE TABLE `drug_sales` (
294   `sale_id` int(11) NOT NULL auto_increment,
295   `drug_id` int(11) NOT NULL,
296   `inventory_id` int(11) NOT NULL,
297   `prescription_id` int(11) NOT NULL default '0',
298   `pid` int(11) NOT NULL default '0',
299   `encounter` int(11) NOT NULL default '0',
300   `user` varchar(255) default NULL,
301   `sale_date` date NOT NULL,
302   `quantity` int(11) NOT NULL default '0',
303   `fee` decimal(12,2) NOT NULL default '0.00',
304   `billed` tinyint(1) NOT NULL default '0' COMMENT 'indicates if the sale is posted to accounting',
305   PRIMARY KEY  (`sale_id`)
306 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
308 -- --------------------------------------------------------
310 -- 
311 -- Table structure for table `drug_templates`
312 -- 
314 DROP TABLE IF EXISTS `drug_templates`;
315 CREATE TABLE `drug_templates` (
316   `drug_id` int(11) NOT NULL,
317   `selector` varchar(255) NOT NULL default '',
318   `dosage` varchar(10) default NULL,
319   `period` int(11) NOT NULL default '0',
320   `quantity` int(11) NOT NULL default '0',
321   `refills` int(11) NOT NULL default '0',
322   `taxrates` varchar(255) default NULL,
323   PRIMARY KEY  (`drug_id`,`selector`)
324 ) ENGINE=MyISAM;
326 -- --------------------------------------------------------
328 -- 
329 -- Table structure for table `drugs`
330 -- 
332 DROP TABLE IF EXISTS `drugs`;
333 CREATE TABLE `drugs` (
334   `drug_id` int(11) NOT NULL auto_increment,
335   `name` varchar(255) NOT NULL DEFAULT '',
336   `ndc_number` varchar(20) NOT NULL DEFAULT '',
337   `on_order` int(11) NOT NULL default '0',
338   `reorder_point` int(11) NOT NULL default '0',
339   `last_notify` date NOT NULL default '0000-00-00',
340   `reactions` text,
341   `form` int(3) NOT NULL default '0',
342   `size` float unsigned NOT NULL default '0',
343   `unit` int(11) NOT NULL default '0',
344   `route` int(11) NOT NULL default '0',
345   `substitute` int(11) NOT NULL default '0',
346   `related_code` varchar(255) NOT NULL DEFAULT '' COMMENT 'may reference a related codes.code',
347   `cyp_factor` float NOT NULL DEFAULT 0 COMMENT 'quantity representing a years supply',
348   `active` TINYINT(1) DEFAULT 1 COMMENT '0 = inactive, 1 = active',
349   PRIMARY KEY  (`drug_id`)
350 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
352 -- --------------------------------------------------------
354 -- 
355 -- Table structure for table `employer_data`
356 -- 
358 DROP TABLE IF EXISTS `employer_data`;
359 CREATE TABLE `employer_data` (
360   `id` bigint(20) NOT NULL auto_increment,
361   `name` varchar(255) default NULL,
362   `street` varchar(255) default NULL,
363   `postal_code` varchar(255) default NULL,
364   `city` varchar(255) default NULL,
365   `state` varchar(255) default NULL,
366   `country` varchar(255) default NULL,
367   `date` datetime default NULL,
368   `pid` bigint(20) NOT NULL default '0',
369   PRIMARY KEY  (`id`),
370   KEY `pid` (`pid`)
371 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
373 -- --------------------------------------------------------
375 -- 
376 -- Table structure for table `facility`
377 -- 
379 DROP TABLE IF EXISTS `facility`;
380 CREATE TABLE `facility` (
381   `id` int(11) NOT NULL auto_increment,
382   `name` varchar(255) default NULL,
383   `phone` varchar(30) default NULL,
384   `fax` varchar(30) default NULL,
385   `street` varchar(255) default NULL,
386   `city` varchar(255) default NULL,
387   `state` varchar(50) default NULL,
388   `postal_code` varchar(11) default NULL,
389   `country_code` varchar(10) default NULL,
390   `federal_ein` varchar(15) default NULL,
391   `service_location` tinyint(1) NOT NULL default '1',
392   `billing_location` tinyint(1) NOT NULL default '0',
393   `accepts_assignment` tinyint(1) NOT NULL default '0',
394   `pos_code` tinyint(4) default NULL,
395   `x12_sender_id` varchar(25) default NULL,
396   `attn` varchar(65) default NULL,
397   `domain_identifier` varchar(60) default NULL,
398   `facility_npi` varchar(15) default NULL,
399   PRIMARY KEY  (`id`)
400 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
402 -- 
403 -- Dumping data for table `facility`
404 -- 
406 INSERT INTO `facility` VALUES (3, 'Your Clinic Name Here', '000-000-0000', '000-000-0000', '', '', '', '', '', '', 1, 0, 0, NULL, '', '', '', '');
408 -- --------------------------------------------------------
410 -- 
411 -- Table structure for table `fee_sheet_options`
412 -- 
414 DROP TABLE IF EXISTS `fee_sheet_options`;
415 CREATE TABLE `fee_sheet_options` (
416   `fs_category` varchar(63) default NULL,
417   `fs_option` varchar(63) default NULL,
418   `fs_codes` varchar(255) default NULL
419 ) ENGINE=MyISAM;
421 -- 
422 -- Dumping data for table `fee_sheet_options`
423 -- 
425 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '1Brief', 'CPT4|99201|');
426 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '2Limited', 'CPT4|99202|');
427 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '3Detailed', 'CPT4|99203|');
428 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '4Extended', 'CPT4|99204|');
429 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '5Comprehensive', 'CPT4|99205|');
430 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '1Brief', 'CPT4|99211|');
431 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '2Limited', 'CPT4|99212|');
432 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '3Detailed', 'CPT4|99213|');
433 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '4Extended', 'CPT4|99214|');
434 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '5Comprehensive', 'CPT4|99215|');
436 -- --------------------------------------------------------
438 -- 
439 -- Table structure for table `form_dictation`
440 -- 
442 DROP TABLE IF EXISTS `form_dictation`;
443 CREATE TABLE `form_dictation` (
444   `id` bigint(20) NOT NULL auto_increment,
445   `date` datetime default NULL,
446   `pid` bigint(20) default NULL,
447   `user` varchar(255) default NULL,
448   `groupname` varchar(255) default NULL,
449   `authorized` tinyint(4) default NULL,
450   `activity` tinyint(4) default NULL,
451   `dictation` longtext,
452   `additional_notes` longtext,
453   PRIMARY KEY  (`id`)
454 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
456 -- --------------------------------------------------------
458 -- 
459 -- Table structure for table `form_encounter`
460 -- 
462 DROP TABLE IF EXISTS `form_encounter`;
463 CREATE TABLE `form_encounter` (
464   `id` bigint(20) NOT NULL auto_increment,
465   `date` datetime default NULL,
466   `reason` longtext,
467   `facility` longtext,
468   `facility_id` int(11) NOT NULL default '0',
469   `pid` bigint(20) default NULL,
470   `encounter` bigint(20) default NULL,
471   `onset_date` datetime default NULL,
472   `sensitivity` varchar(30) default NULL,
473   `billing_note` text,
474   `pc_catid` int(11) NOT NULL default '5' COMMENT 'event category from openemr_postcalendar_categories',
475   `last_level_billed` int  NOT NULL DEFAULT 0 COMMENT '0=none, 1=ins1, 2=ins2, etc',
476   `last_level_closed` int  NOT NULL DEFAULT 0 COMMENT '0=none, 1=ins1, 2=ins2, etc',
477   `last_stmt_date`    date DEFAULT NULL,
478   `stmt_count`        int  NOT NULL DEFAULT 0,
479   `provider_id` INT(11) DEFAULT '0' COMMENT 'default and main provider for this visit',
480   `supervisor_id` INT(11) DEFAULT '0' COMMENT 'supervising provider, if any, for this visit',
481   PRIMARY KEY  (`id`),
482   KEY `pid` (`pid`)
483 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
485 -- --------------------------------------------------------
487 -- 
488 -- Table structure for table `form_misc_billing_options`
489 -- 
491 DROP TABLE IF EXISTS `form_misc_billing_options`;
492 CREATE TABLE `form_misc_billing_options` (
493   `id` bigint(20) NOT NULL auto_increment,
494   `date` datetime default NULL,
495   `pid` bigint(20) default NULL,
496   `user` varchar(255) default NULL,
497   `groupname` varchar(255) default NULL,
498   `authorized` tinyint(4) default NULL,
499   `activity` tinyint(4) default NULL,
500   `employment_related` tinyint(1) default NULL,
501   `auto_accident` tinyint(1) default NULL,
502   `accident_state` varchar(2) default NULL,
503   `other_accident` tinyint(1) default NULL,
504   `outside_lab` tinyint(1) default NULL,
505   `lab_amount` decimal(5,2) default NULL,
506   `is_unable_to_work` tinyint(1) default NULL,
507   `off_work_from` date default NULL,
508   `off_work_to` date default NULL,
509   `is_hospitalized` tinyint(1) default NULL,
510   `hospitalization_date_from` date default NULL,
511   `hospitalization_date_to` date default NULL,
512   `medicaid_resubmission_code` varchar(10) default NULL,
513   `medicaid_original_reference` varchar(15) default NULL,
514   `prior_auth_number` varchar(20) default NULL,
515   `comments` varchar(255) default NULL,
516   `replacement_claim` tinyint(1) default 0,
517   PRIMARY KEY  (`id`)
518 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
520 -- --------------------------------------------------------
522 -- 
523 -- Table structure for table `form_reviewofs`
524 -- 
526 DROP TABLE IF EXISTS `form_reviewofs`;
527 CREATE TABLE `form_reviewofs` (
528   `id` bigint(20) NOT NULL auto_increment,
529   `date` datetime default NULL,
530   `pid` bigint(20) default NULL,
531   `user` varchar(255) default NULL,
532   `groupname` varchar(255) default NULL,
533   `authorized` tinyint(4) default NULL,
534   `activity` tinyint(4) default NULL,
535   `fever` varchar(5) default NULL,
536   `chills` varchar(5) default NULL,
537   `night_sweats` varchar(5) default NULL,
538   `weight_loss` varchar(5) default NULL,
539   `poor_appetite` varchar(5) default NULL,
540   `insomnia` varchar(5) default NULL,
541   `fatigued` varchar(5) default NULL,
542   `depressed` varchar(5) default NULL,
543   `hyperactive` varchar(5) default NULL,
544   `exposure_to_foreign_countries` varchar(5) default NULL,
545   `cataracts` varchar(5) default NULL,
546   `cataract_surgery` varchar(5) default NULL,
547   `glaucoma` varchar(5) default NULL,
548   `double_vision` varchar(5) default NULL,
549   `blurred_vision` varchar(5) default NULL,
550   `poor_hearing` varchar(5) default NULL,
551   `headaches` varchar(5) default NULL,
552   `ringing_in_ears` varchar(5) default NULL,
553   `bloody_nose` varchar(5) default NULL,
554   `sinusitis` varchar(5) default NULL,
555   `sinus_surgery` varchar(5) default NULL,
556   `dry_mouth` varchar(5) default NULL,
557   `strep_throat` varchar(5) default NULL,
558   `tonsillectomy` varchar(5) default NULL,
559   `swollen_lymph_nodes` varchar(5) default NULL,
560   `throat_cancer` varchar(5) default NULL,
561   `throat_cancer_surgery` varchar(5) default NULL,
562   `heart_attack` varchar(5) default NULL,
563   `irregular_heart_beat` varchar(5) default NULL,
564   `chest_pains` varchar(5) default NULL,
565   `shortness_of_breath` varchar(5) default NULL,
566   `high_blood_pressure` varchar(5) default NULL,
567   `heart_failure` varchar(5) default NULL,
568   `poor_circulation` varchar(5) default NULL,
569   `vascular_surgery` varchar(5) default NULL,
570   `cardiac_catheterization` varchar(5) default NULL,
571   `coronary_artery_bypass` varchar(5) default NULL,
572   `heart_transplant` varchar(5) default NULL,
573   `stress_test` varchar(5) default NULL,
574   `emphysema` varchar(5) default NULL,
575   `chronic_bronchitis` varchar(5) default NULL,
576   `interstitial_lung_disease` varchar(5) default NULL,
577   `shortness_of_breath_2` varchar(5) default NULL,
578   `lung_cancer` varchar(5) default NULL,
579   `lung_cancer_surgery` varchar(5) default NULL,
580   `pheumothorax` varchar(5) default NULL,
581   `stomach_pains` varchar(5) default NULL,
582   `peptic_ulcer_disease` varchar(5) default NULL,
583   `gastritis` varchar(5) default NULL,
584   `endoscopy` varchar(5) default NULL,
585   `polyps` varchar(5) default NULL,
586   `colonoscopy` varchar(5) default NULL,
587   `colon_cancer` varchar(5) default NULL,
588   `colon_cancer_surgery` varchar(5) default NULL,
589   `ulcerative_colitis` varchar(5) default NULL,
590   `crohns_disease` varchar(5) default NULL,
591   `appendectomy` varchar(5) default NULL,
592   `divirticulitis` varchar(5) default NULL,
593   `divirticulitis_surgery` varchar(5) default NULL,
594   `gall_stones` varchar(5) default NULL,
595   `cholecystectomy` varchar(5) default NULL,
596   `hepatitis` varchar(5) default NULL,
597   `cirrhosis_of_the_liver` varchar(5) default NULL,
598   `splenectomy` varchar(5) default NULL,
599   `kidney_failure` varchar(5) default NULL,
600   `kidney_stones` varchar(5) default NULL,
601   `kidney_cancer` varchar(5) default NULL,
602   `kidney_infections` varchar(5) default NULL,
603   `bladder_infections` varchar(5) default NULL,
604   `bladder_cancer` varchar(5) default NULL,
605   `prostate_problems` varchar(5) default NULL,
606   `prostate_cancer` varchar(5) default NULL,
607   `kidney_transplant` varchar(5) default NULL,
608   `sexually_transmitted_disease` varchar(5) default NULL,
609   `burning_with_urination` varchar(5) default NULL,
610   `discharge_from_urethra` varchar(5) default NULL,
611   `rashes` varchar(5) default NULL,
612   `infections` varchar(5) default NULL,
613   `ulcerations` varchar(5) default NULL,
614   `pemphigus` varchar(5) default NULL,
615   `herpes` varchar(5) default NULL,
616   `osetoarthritis` varchar(5) default NULL,
617   `rheumotoid_arthritis` varchar(5) default NULL,
618   `lupus` varchar(5) default NULL,
619   `ankylosing_sondlilitis` varchar(5) default NULL,
620   `swollen_joints` varchar(5) default NULL,
621   `stiff_joints` varchar(5) default NULL,
622   `broken_bones` varchar(5) default NULL,
623   `neck_problems` varchar(5) default NULL,
624   `back_problems` varchar(5) default NULL,
625   `back_surgery` varchar(5) default NULL,
626   `scoliosis` varchar(5) default NULL,
627   `herniated_disc` varchar(5) default NULL,
628   `shoulder_problems` varchar(5) default NULL,
629   `elbow_problems` varchar(5) default NULL,
630   `wrist_problems` varchar(5) default NULL,
631   `hand_problems` varchar(5) default NULL,
632   `hip_problems` varchar(5) default NULL,
633   `knee_problems` varchar(5) default NULL,
634   `ankle_problems` varchar(5) default NULL,
635   `foot_problems` varchar(5) default NULL,
636   `insulin_dependent_diabetes` varchar(5) default NULL,
637   `noninsulin_dependent_diabetes` varchar(5) default NULL,
638   `hypothyroidism` varchar(5) default NULL,
639   `hyperthyroidism` varchar(5) default NULL,
640   `cushing_syndrom` varchar(5) default NULL,
641   `addison_syndrom` varchar(5) default NULL,
642   `additional_notes` longtext,
643   PRIMARY KEY  (`id`)
644 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
646 -- --------------------------------------------------------
648 -- 
649 -- Table structure for table `form_ros`
650 -- 
652 DROP TABLE IF EXISTS `form_ros`;
653 CREATE TABLE `form_ros` (
654   `id` int(11) NOT NULL auto_increment,
655   `pid` int(11) NOT NULL,
656   `activity` int(11) NOT NULL default '1',
657   `date` datetime default NULL,
658   `weight_change` varchar(3) default NULL,
659   `weakness` varchar(3) default NULL,
660   `fatigue` varchar(3) default NULL,
661   `anorexia` varchar(3) default NULL,
662   `fever` varchar(3) default NULL,
663   `chills` varchar(3) default NULL,
664   `night_sweats` varchar(3) default NULL,
665   `insomnia` varchar(3) default NULL,
666   `irritability` varchar(3) default NULL,
667   `heat_or_cold` varchar(3) default NULL,
668   `intolerance` varchar(3) default NULL,
669   `change_in_vision` varchar(3) default NULL,
670   `glaucoma_history` varchar(3) default NULL,
671   `eye_pain` varchar(3) default NULL,
672   `irritation` varchar(3) default NULL,
673   `redness` varchar(3) default NULL,
674   `excessive_tearing` varchar(3) default NULL,
675   `double_vision` varchar(3) default NULL,
676   `blind_spots` varchar(3) default NULL,
677   `photophobia` varchar(3) default NULL,
678   `hearing_loss` varchar(3) default NULL,
679   `discharge` varchar(3) default NULL,
680   `pain` varchar(3) default NULL,
681   `vertigo` varchar(3) default NULL,
682   `tinnitus` varchar(3) default NULL,
683   `frequent_colds` varchar(3) default NULL,
684   `sore_throat` varchar(3) default NULL,
685   `sinus_problems` varchar(3) default NULL,
686   `post_nasal_drip` varchar(3) default NULL,
687   `nosebleed` varchar(3) default NULL,
688   `snoring` varchar(3) default NULL,
689   `apnea` varchar(3) default NULL,
690   `breast_mass` varchar(3) default NULL,
691   `breast_discharge` varchar(3) default NULL,
692   `biopsy` varchar(3) default NULL,
693   `abnormal_mammogram` varchar(3) default NULL,
694   `cough` varchar(3) default NULL,
695   `sputum` varchar(3) default NULL,
696   `shortness_of_breath` varchar(3) default NULL,
697   `wheezing` varchar(3) default NULL,
698   `hemoptsyis` varchar(3) default NULL,
699   `asthma` varchar(3) default NULL,
700   `copd` varchar(3) default NULL,
701   `chest_pain` varchar(3) default NULL,
702   `palpitation` varchar(3) default NULL,
703   `syncope` varchar(3) default NULL,
704   `pnd` varchar(3) default NULL,
705   `doe` varchar(3) default NULL,
706   `orthopnea` varchar(3) default NULL,
707   `peripheal` varchar(3) default NULL,
708   `edema` varchar(3) default NULL,
709   `legpain_cramping` varchar(3) default NULL,
710   `history_murmur` varchar(3) default NULL,
711   `arrythmia` varchar(3) default NULL,
712   `heart_problem` varchar(3) default NULL,
713   `dysphagia` varchar(3) default NULL,
714   `heartburn` varchar(3) default NULL,
715   `bloating` varchar(3) default NULL,
716   `belching` varchar(3) default NULL,
717   `flatulence` varchar(3) default NULL,
718   `nausea` varchar(3) default NULL,
719   `vomiting` varchar(3) default NULL,
720   `hematemesis` varchar(3) default NULL,
721   `gastro_pain` varchar(3) default NULL,
722   `food_intolerance` varchar(3) default NULL,
723   `hepatitis` varchar(3) default NULL,
724   `jaundice` varchar(3) default NULL,
725   `hematochezia` varchar(3) default NULL,
726   `changed_bowel` varchar(3) default NULL,
727   `diarrhea` varchar(3) default NULL,
728   `constipation` varchar(3) default NULL,
729   `polyuria` varchar(3) default NULL,
730   `polydypsia` varchar(3) default NULL,
731   `dysuria` varchar(3) default NULL,
732   `hematuria` varchar(3) default NULL,
733   `frequency` varchar(3) default NULL,
734   `urgency` varchar(3) default NULL,
735   `incontinence` varchar(3) default NULL,
736   `renal_stones` varchar(3) default NULL,
737   `utis` varchar(3) default NULL,
738   `hesitancy` varchar(3) default NULL,
739   `dribbling` varchar(3) default NULL,
740   `stream` varchar(3) default NULL,
741   `nocturia` varchar(3) default NULL,
742   `erections` varchar(3) default NULL,
743   `ejaculations` varchar(3) default NULL,
744   `g` varchar(3) default NULL,
745   `p` varchar(3) default NULL,
746   `ap` varchar(3) default NULL,
747   `lc` varchar(3) default NULL,
748   `mearche` varchar(3) default NULL,
749   `menopause` varchar(3) default NULL,
750   `lmp` varchar(3) default NULL,
751   `f_frequency` varchar(3) default NULL,
752   `f_flow` varchar(3) default NULL,
753   `f_symptoms` varchar(3) default NULL,
754   `abnormal_hair_growth` varchar(3) default NULL,
755   `f_hirsutism` varchar(3) default NULL,
756   `joint_pain` varchar(3) default NULL,
757   `swelling` varchar(3) default NULL,
758   `m_redness` varchar(3) default NULL,
759   `m_warm` varchar(3) default NULL,
760   `m_stiffness` varchar(3) default NULL,
761   `muscle` varchar(3) default NULL,
762   `m_aches` varchar(3) default NULL,
763   `fms` varchar(3) default NULL,
764   `arthritis` varchar(3) default NULL,
765   `loc` varchar(3) default NULL,
766   `seizures` varchar(3) default NULL,
767   `stroke` varchar(3) default NULL,
768   `tia` varchar(3) default NULL,
769   `n_numbness` varchar(3) default NULL,
770   `n_weakness` varchar(3) default NULL,
771   `paralysis` varchar(3) default NULL,
772   `intellectual_decline` varchar(3) default NULL,
773   `memory_problems` varchar(3) default NULL,
774   `dementia` varchar(3) default NULL,
775   `n_headache` varchar(3) default NULL,
776   `s_cancer` varchar(3) default NULL,
777   `psoriasis` varchar(3) default NULL,
778   `s_acne` varchar(3) default NULL,
779   `s_other` varchar(3) default NULL,
780   `s_disease` varchar(3) default NULL,
781   `p_diagnosis` varchar(3) default NULL,
782   `p_medication` varchar(3) default NULL,
783   `depression` varchar(3) default NULL,
784   `anxiety` varchar(3) default NULL,
785   `social_difficulties` varchar(3) default NULL,
786   `thyroid_problems` varchar(3) default NULL,
787   `diabetes` varchar(3) default NULL,
788   `abnormal_blood` varchar(3) default NULL,
789   `anemia` varchar(3) default NULL,
790   `fh_blood_problems` varchar(3) default NULL,
791   `bleeding_problems` varchar(3) default NULL,
792   `allergies` varchar(3) default NULL,
793   `frequent_illness` varchar(3) default NULL,
794   `hiv` varchar(3) default NULL,
795   `hai_status` varchar(3) default NULL,
796   PRIMARY KEY  (`id`)
797 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
799 -- --------------------------------------------------------
801 -- 
802 -- Table structure for table `form_soap`
803 -- 
805 DROP TABLE IF EXISTS `form_soap`;
806 CREATE TABLE `form_soap` (
807   `id` bigint(20) NOT NULL auto_increment,
808   `date` datetime default NULL,
809   `pid` bigint(20) default '0',
810   `user` varchar(255) default NULL,
811   `groupname` varchar(255) default NULL,
812   `authorized` tinyint(4) default '0',
813   `activity` tinyint(4) default '0',
814   `subjective` text,
815   `objective` text,
816   `assessment` text,
817   `plan` text,
818   PRIMARY KEY  (`id`)
819 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
821 -- --------------------------------------------------------
823 -- 
824 -- Table structure for table `form_vitals`
825 -- 
827 DROP TABLE IF EXISTS `form_vitals`;
828 CREATE TABLE `form_vitals` (
829   `id` bigint(20) NOT NULL auto_increment,
830   `date` datetime default NULL,
831   `pid` bigint(20) default '0',
832   `user` varchar(255) default NULL,
833   `groupname` varchar(255) default NULL,
834   `authorized` tinyint(4) default '0',
835   `activity` tinyint(4) default '0',
836   `bps` varchar(40) default NULL,
837   `bpd` varchar(40) default NULL,
838   `weight` float(5,2) default '0.00',
839   `height` float(5,2) default '0.00',
840   `temperature` float(5,2) default '0.00',
841   `temp_method` varchar(255) default NULL,
842   `pulse` float(5,2) default '0.00',
843   `respiration` float(5,2) default '0.00',
844   `note` varchar(255) default NULL,
845   `BMI` float(4,1) default '0.0',
846   `BMI_status` varchar(255) default NULL,
847   `waist_circ` float(5,2) default '0.00',
848   `head_circ` float(4,2) default '0.00',
849   `oxygen_saturation` float(5,2) default '0.00',
850   PRIMARY KEY  (`id`)
851 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
853 -- --------------------------------------------------------
855 -- 
856 -- Table structure for table `forms`
857 -- 
859 DROP TABLE IF EXISTS `forms`;
860 CREATE TABLE `forms` (
861   `id` bigint(20) NOT NULL auto_increment,
862   `date` datetime default NULL,
863   `encounter` bigint(20) default NULL,
864   `form_name` longtext,
865   `form_id` bigint(20) default NULL,
866   `pid` bigint(20) default NULL,
867   `user` varchar(255) default NULL,
868   `groupname` varchar(255) default NULL,
869   `authorized` tinyint(4) default NULL,
870   `deleted` tinyint(4) DEFAULT '0' NOT NULL COMMENT 'flag indicates form has been deleted',
871   `formdir` longtext,
872   PRIMARY KEY  (`id`)
873 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
875 -- --------------------------------------------------------
877 -- 
878 -- Table structure for table `geo_country_reference`
879 -- 
881 DROP TABLE IF EXISTS `geo_country_reference`;
882 CREATE TABLE `geo_country_reference` (
883   `countries_id` int(5) NOT NULL auto_increment,
884   `countries_name` varchar(64) default NULL,
885   `countries_iso_code_2` char(2) NOT NULL default '',
886   `countries_iso_code_3` char(3) NOT NULL default '',
887   PRIMARY KEY  (`countries_id`),
888   KEY `IDX_COUNTRIES_NAME` (`countries_name`)
889 ) ENGINE=MyISAM AUTO_INCREMENT=240 ;
891 -- 
892 -- Dumping data for table `geo_country_reference`
893 -- 
895 INSERT INTO `geo_country_reference` VALUES (1, 'Afghanistan', 'AF', 'AFG');
896 INSERT INTO `geo_country_reference` VALUES (2, 'Albania', 'AL', 'ALB');
897 INSERT INTO `geo_country_reference` VALUES (3, 'Algeria', 'DZ', 'DZA');
898 INSERT INTO `geo_country_reference` VALUES (4, 'American Samoa', 'AS', 'ASM');
899 INSERT INTO `geo_country_reference` VALUES (5, 'Andorra', 'AD', 'AND');
900 INSERT INTO `geo_country_reference` VALUES (6, 'Angola', 'AO', 'AGO');
901 INSERT INTO `geo_country_reference` VALUES (7, 'Anguilla', 'AI', 'AIA');
902 INSERT INTO `geo_country_reference` VALUES (8, 'Antarctica', 'AQ', 'ATA');
903 INSERT INTO `geo_country_reference` VALUES (9, 'Antigua and Barbuda', 'AG', 'ATG');
904 INSERT INTO `geo_country_reference` VALUES (10, 'Argentina', 'AR', 'ARG');
905 INSERT INTO `geo_country_reference` VALUES (11, 'Armenia', 'AM', 'ARM');
906 INSERT INTO `geo_country_reference` VALUES (12, 'Aruba', 'AW', 'ABW');
907 INSERT INTO `geo_country_reference` VALUES (13, 'Australia', 'AU', 'AUS');
908 INSERT INTO `geo_country_reference` VALUES (14, 'Austria', 'AT', 'AUT');
909 INSERT INTO `geo_country_reference` VALUES (15, 'Azerbaijan', 'AZ', 'AZE');
910 INSERT INTO `geo_country_reference` VALUES (16, 'Bahamas', 'BS', 'BHS');
911 INSERT INTO `geo_country_reference` VALUES (17, 'Bahrain', 'BH', 'BHR');
912 INSERT INTO `geo_country_reference` VALUES (18, 'Bangladesh', 'BD', 'BGD');
913 INSERT INTO `geo_country_reference` VALUES (19, 'Barbados', 'BB', 'BRB');
914 INSERT INTO `geo_country_reference` VALUES (20, 'Belarus', 'BY', 'BLR');
915 INSERT INTO `geo_country_reference` VALUES (21, 'Belgium', 'BE', 'BEL');
916 INSERT INTO `geo_country_reference` VALUES (22, 'Belize', 'BZ', 'BLZ');
917 INSERT INTO `geo_country_reference` VALUES (23, 'Benin', 'BJ', 'BEN');
918 INSERT INTO `geo_country_reference` VALUES (24, 'Bermuda', 'BM', 'BMU');
919 INSERT INTO `geo_country_reference` VALUES (25, 'Bhutan', 'BT', 'BTN');
920 INSERT INTO `geo_country_reference` VALUES (26, 'Bolivia', 'BO', 'BOL');
921 INSERT INTO `geo_country_reference` VALUES (27, 'Bosnia and Herzegowina', 'BA', 'BIH');
922 INSERT INTO `geo_country_reference` VALUES (28, 'Botswana', 'BW', 'BWA');
923 INSERT INTO `geo_country_reference` VALUES (29, 'Bouvet Island', 'BV', 'BVT');
924 INSERT INTO `geo_country_reference` VALUES (30, 'Brazil', 'BR', 'BRA');
925 INSERT INTO `geo_country_reference` VALUES (31, 'British Indian Ocean Territory', 'IO', 'IOT');
926 INSERT INTO `geo_country_reference` VALUES (32, 'Brunei Darussalam', 'BN', 'BRN');
927 INSERT INTO `geo_country_reference` VALUES (33, 'Bulgaria', 'BG', 'BGR');
928 INSERT INTO `geo_country_reference` VALUES (34, 'Burkina Faso', 'BF', 'BFA');
929 INSERT INTO `geo_country_reference` VALUES (35, 'Burundi', 'BI', 'BDI');
930 INSERT INTO `geo_country_reference` VALUES (36, 'Cambodia', 'KH', 'KHM');
931 INSERT INTO `geo_country_reference` VALUES (37, 'Cameroon', 'CM', 'CMR');
932 INSERT INTO `geo_country_reference` VALUES (38, 'Canada', 'CA', 'CAN');
933 INSERT INTO `geo_country_reference` VALUES (39, 'Cape Verde', 'CV', 'CPV');
934 INSERT INTO `geo_country_reference` VALUES (40, 'Cayman Islands', 'KY', 'CYM');
935 INSERT INTO `geo_country_reference` VALUES (41, 'Central African Republic', 'CF', 'CAF');
936 INSERT INTO `geo_country_reference` VALUES (42, 'Chad', 'TD', 'TCD');
937 INSERT INTO `geo_country_reference` VALUES (43, 'Chile', 'CL', 'CHL');
938 INSERT INTO `geo_country_reference` VALUES (44, 'China', 'CN', 'CHN');
939 INSERT INTO `geo_country_reference` VALUES (45, 'Christmas Island', 'CX', 'CXR');
940 INSERT INTO `geo_country_reference` VALUES (46, 'Cocos (Keeling) Islands', 'CC', 'CCK');
941 INSERT INTO `geo_country_reference` VALUES (47, 'Colombia', 'CO', 'COL');
942 INSERT INTO `geo_country_reference` VALUES (48, 'Comoros', 'KM', 'COM');
943 INSERT INTO `geo_country_reference` VALUES (49, 'Congo', 'CG', 'COG');
944 INSERT INTO `geo_country_reference` VALUES (50, 'Cook Islands', 'CK', 'COK');
945 INSERT INTO `geo_country_reference` VALUES (51, 'Costa Rica', 'CR', 'CRI');
946 INSERT INTO `geo_country_reference` VALUES (52, 'Cote D Ivoire', 'CI', 'CIV');
947 INSERT INTO `geo_country_reference` VALUES (53, 'Croatia', 'HR', 'HRV');
948 INSERT INTO `geo_country_reference` VALUES (54, 'Cuba', 'CU', 'CUB');
949 INSERT INTO `geo_country_reference` VALUES (55, 'Cyprus', 'CY', 'CYP');
950 INSERT INTO `geo_country_reference` VALUES (56, 'Czech Republic', 'CZ', 'CZE');
951 INSERT INTO `geo_country_reference` VALUES (57, 'Denmark', 'DK', 'DNK');
952 INSERT INTO `geo_country_reference` VALUES (58, 'Djibouti', 'DJ', 'DJI');
953 INSERT INTO `geo_country_reference` VALUES (59, 'Dominica', 'DM', 'DMA');
954 INSERT INTO `geo_country_reference` VALUES (60, 'Dominican Republic', 'DO', 'DOM');
955 INSERT INTO `geo_country_reference` VALUES (61, 'East Timor', 'TP', 'TMP');
956 INSERT INTO `geo_country_reference` VALUES (62, 'Ecuador', 'EC', 'ECU');
957 INSERT INTO `geo_country_reference` VALUES (63, 'Egypt', 'EG', 'EGY');
958 INSERT INTO `geo_country_reference` VALUES (64, 'El Salvador', 'SV', 'SLV');
959 INSERT INTO `geo_country_reference` VALUES (65, 'Equatorial Guinea', 'GQ', 'GNQ');
960 INSERT INTO `geo_country_reference` VALUES (66, 'Eritrea', 'ER', 'ERI');
961 INSERT INTO `geo_country_reference` VALUES (67, 'Estonia', 'EE', 'EST');
962 INSERT INTO `geo_country_reference` VALUES (68, 'Ethiopia', 'ET', 'ETH');
963 INSERT INTO `geo_country_reference` VALUES (69, 'Falkland Islands (Malvinas)', 'FK', 'FLK');
964 INSERT INTO `geo_country_reference` VALUES (70, 'Faroe Islands', 'FO', 'FRO');
965 INSERT INTO `geo_country_reference` VALUES (71, 'Fiji', 'FJ', 'FJI');
966 INSERT INTO `geo_country_reference` VALUES (72, 'Finland', 'FI', 'FIN');
967 INSERT INTO `geo_country_reference` VALUES (73, 'France', 'FR', 'FRA');
968 INSERT INTO `geo_country_reference` VALUES (74, 'France, MEtropolitan', 'FX', 'FXX');
969 INSERT INTO `geo_country_reference` VALUES (75, 'French Guiana', 'GF', 'GUF');
970 INSERT INTO `geo_country_reference` VALUES (76, 'French Polynesia', 'PF', 'PYF');
971 INSERT INTO `geo_country_reference` VALUES (77, 'French Southern Territories', 'TF', 'ATF');
972 INSERT INTO `geo_country_reference` VALUES (78, 'Gabon', 'GA', 'GAB');
973 INSERT INTO `geo_country_reference` VALUES (79, 'Gambia', 'GM', 'GMB');
974 INSERT INTO `geo_country_reference` VALUES (80, 'Georgia', 'GE', 'GEO');
975 INSERT INTO `geo_country_reference` VALUES (81, 'Germany', 'DE', 'DEU');
976 INSERT INTO `geo_country_reference` VALUES (82, 'Ghana', 'GH', 'GHA');
977 INSERT INTO `geo_country_reference` VALUES (83, 'Gibraltar', 'GI', 'GIB');
978 INSERT INTO `geo_country_reference` VALUES (84, 'Greece', 'GR', 'GRC');
979 INSERT INTO `geo_country_reference` VALUES (85, 'Greenland', 'GL', 'GRL');
980 INSERT INTO `geo_country_reference` VALUES (86, 'Grenada', 'GD', 'GRD');
981 INSERT INTO `geo_country_reference` VALUES (87, 'Guadeloupe', 'GP', 'GLP');
982 INSERT INTO `geo_country_reference` VALUES (88, 'Guam', 'GU', 'GUM');
983 INSERT INTO `geo_country_reference` VALUES (89, 'Guatemala', 'GT', 'GTM');
984 INSERT INTO `geo_country_reference` VALUES (90, 'Guinea', 'GN', 'GIN');
985 INSERT INTO `geo_country_reference` VALUES (91, 'Guinea-bissau', 'GW', 'GNB');
986 INSERT INTO `geo_country_reference` VALUES (92, 'Guyana', 'GY', 'GUY');
987 INSERT INTO `geo_country_reference` VALUES (93, 'Haiti', 'HT', 'HTI');
988 INSERT INTO `geo_country_reference` VALUES (94, 'Heard and Mc Donald Islands', 'HM', 'HMD');
989 INSERT INTO `geo_country_reference` VALUES (95, 'Honduras', 'HN', 'HND');
990 INSERT INTO `geo_country_reference` VALUES (96, 'Hong Kong', 'HK', 'HKG');
991 INSERT INTO `geo_country_reference` VALUES (97, 'Hungary', 'HU', 'HUN');
992 INSERT INTO `geo_country_reference` VALUES (98, 'Iceland', 'IS', 'ISL');
993 INSERT INTO `geo_country_reference` VALUES (99, 'India', 'IN', 'IND');
994 INSERT INTO `geo_country_reference` VALUES (100, 'Indonesia', 'ID', 'IDN');
995 INSERT INTO `geo_country_reference` VALUES (101, 'Iran (Islamic Republic of)', 'IR', 'IRN');
996 INSERT INTO `geo_country_reference` VALUES (102, 'Iraq', 'IQ', 'IRQ');
997 INSERT INTO `geo_country_reference` VALUES (103, 'Ireland', 'IE', 'IRL');
998 INSERT INTO `geo_country_reference` VALUES (104, 'Israel', 'IL', 'ISR');
999 INSERT INTO `geo_country_reference` VALUES (105, 'Italy', 'IT', 'ITA');
1000 INSERT INTO `geo_country_reference` VALUES (106, 'Jamaica', 'JM', 'JAM');
1001 INSERT INTO `geo_country_reference` VALUES (107, 'Japan', 'JP', 'JPN');
1002 INSERT INTO `geo_country_reference` VALUES (108, 'Jordan', 'JO', 'JOR');
1003 INSERT INTO `geo_country_reference` VALUES (109, 'Kazakhstan', 'KZ', 'KAZ');
1004 INSERT INTO `geo_country_reference` VALUES (110, 'Kenya', 'KE', 'KEN');
1005 INSERT INTO `geo_country_reference` VALUES (111, 'Kiribati', 'KI', 'KIR');
1006 INSERT INTO `geo_country_reference` VALUES (112, 'Korea, Democratic Peoples Republic of', 'KP', 'PRK');
1007 INSERT INTO `geo_country_reference` VALUES (113, 'Korea, Republic of', 'KR', 'KOR');
1008 INSERT INTO `geo_country_reference` VALUES (114, 'Kuwait', 'KW', 'KWT');
1009 INSERT INTO `geo_country_reference` VALUES (115, 'Kyrgyzstan', 'KG', 'KGZ');
1010 INSERT INTO `geo_country_reference` VALUES (116, 'Lao Peoples Democratic Republic', 'LA', 'LAO');
1011 INSERT INTO `geo_country_reference` VALUES (117, 'Latvia', 'LV', 'LVA');
1012 INSERT INTO `geo_country_reference` VALUES (118, 'Lebanon', 'LB', 'LBN');
1013 INSERT INTO `geo_country_reference` VALUES (119, 'Lesotho', 'LS', 'LSO');
1014 INSERT INTO `geo_country_reference` VALUES (120, 'Liberia', 'LR', 'LBR');
1015 INSERT INTO `geo_country_reference` VALUES (121, 'Libyan Arab Jamahiriya', 'LY', 'LBY');
1016 INSERT INTO `geo_country_reference` VALUES (122, 'Liechtenstein', 'LI', 'LIE');
1017 INSERT INTO `geo_country_reference` VALUES (123, 'Lithuania', 'LT', 'LTU');
1018 INSERT INTO `geo_country_reference` VALUES (124, 'Luxembourg', 'LU', 'LUX');
1019 INSERT INTO `geo_country_reference` VALUES (125, 'Macau', 'MO', 'MAC');
1020 INSERT INTO `geo_country_reference` VALUES (126, 'Macedonia, The Former Yugoslav Republic of', 'MK', 'MKD');
1021 INSERT INTO `geo_country_reference` VALUES (127, 'Madagascar', 'MG', 'MDG');
1022 INSERT INTO `geo_country_reference` VALUES (128, 'Malawi', 'MW', 'MWI');
1023 INSERT INTO `geo_country_reference` VALUES (129, 'Malaysia', 'MY', 'MYS');
1024 INSERT INTO `geo_country_reference` VALUES (130, 'Maldives', 'MV', 'MDV');
1025 INSERT INTO `geo_country_reference` VALUES (131, 'Mali', 'ML', 'MLI');
1026 INSERT INTO `geo_country_reference` VALUES (132, 'Malta', 'MT', 'MLT');
1027 INSERT INTO `geo_country_reference` VALUES (133, 'Marshall Islands', 'MH', 'MHL');
1028 INSERT INTO `geo_country_reference` VALUES (134, 'Martinique', 'MQ', 'MTQ');
1029 INSERT INTO `geo_country_reference` VALUES (135, 'Mauritania', 'MR', 'MRT');
1030 INSERT INTO `geo_country_reference` VALUES (136, 'Mauritius', 'MU', 'MUS');
1031 INSERT INTO `geo_country_reference` VALUES (137, 'Mayotte', 'YT', 'MYT');
1032 INSERT INTO `geo_country_reference` VALUES (138, 'Mexico', 'MX', 'MEX');
1033 INSERT INTO `geo_country_reference` VALUES (139, 'Micronesia, Federated States of', 'FM', 'FSM');
1034 INSERT INTO `geo_country_reference` VALUES (140, 'Moldova, Republic of', 'MD', 'MDA');
1035 INSERT INTO `geo_country_reference` VALUES (141, 'Monaco', 'MC', 'MCO');
1036 INSERT INTO `geo_country_reference` VALUES (142, 'Mongolia', 'MN', 'MNG');
1037 INSERT INTO `geo_country_reference` VALUES (143, 'Montserrat', 'MS', 'MSR');
1038 INSERT INTO `geo_country_reference` VALUES (144, 'Morocco', 'MA', 'MAR');
1039 INSERT INTO `geo_country_reference` VALUES (145, 'Mozambique', 'MZ', 'MOZ');
1040 INSERT INTO `geo_country_reference` VALUES (146, 'Myanmar', 'MM', 'MMR');
1041 INSERT INTO `geo_country_reference` VALUES (147, 'Namibia', 'NA', 'NAM');
1042 INSERT INTO `geo_country_reference` VALUES (148, 'Nauru', 'NR', 'NRU');
1043 INSERT INTO `geo_country_reference` VALUES (149, 'Nepal', 'NP', 'NPL');
1044 INSERT INTO `geo_country_reference` VALUES (150, 'Netherlands', 'NL', 'NLD');
1045 INSERT INTO `geo_country_reference` VALUES (151, 'Netherlands Antilles', 'AN', 'ANT');
1046 INSERT INTO `geo_country_reference` VALUES (152, 'New Caledonia', 'NC', 'NCL');
1047 INSERT INTO `geo_country_reference` VALUES (153, 'New Zealand', 'NZ', 'NZL');
1048 INSERT INTO `geo_country_reference` VALUES (154, 'Nicaragua', 'NI', 'NIC');
1049 INSERT INTO `geo_country_reference` VALUES (155, 'Niger', 'NE', 'NER');
1050 INSERT INTO `geo_country_reference` VALUES (156, 'Nigeria', 'NG', 'NGA');
1051 INSERT INTO `geo_country_reference` VALUES (157, 'Niue', 'NU', 'NIU');
1052 INSERT INTO `geo_country_reference` VALUES (158, 'Norfolk Island', 'NF', 'NFK');
1053 INSERT INTO `geo_country_reference` VALUES (159, 'Northern Mariana Islands', 'MP', 'MNP');
1054 INSERT INTO `geo_country_reference` VALUES (160, 'Norway', 'NO', 'NOR');
1055 INSERT INTO `geo_country_reference` VALUES (161, 'Oman', 'OM', 'OMN');
1056 INSERT INTO `geo_country_reference` VALUES (162, 'Pakistan', 'PK', 'PAK');
1057 INSERT INTO `geo_country_reference` VALUES (163, 'Palau', 'PW', 'PLW');
1058 INSERT INTO `geo_country_reference` VALUES (164, 'Panama', 'PA', 'PAN');
1059 INSERT INTO `geo_country_reference` VALUES (165, 'Papua New Guinea', 'PG', 'PNG');
1060 INSERT INTO `geo_country_reference` VALUES (166, 'Paraguay', 'PY', 'PRY');
1061 INSERT INTO `geo_country_reference` VALUES (167, 'Peru', 'PE', 'PER');
1062 INSERT INTO `geo_country_reference` VALUES (168, 'Philippines', 'PH', 'PHL');
1063 INSERT INTO `geo_country_reference` VALUES (169, 'Pitcairn', 'PN', 'PCN');
1064 INSERT INTO `geo_country_reference` VALUES (170, 'Poland', 'PL', 'POL');
1065 INSERT INTO `geo_country_reference` VALUES (171, 'Portugal', 'PT', 'PRT');
1066 INSERT INTO `geo_country_reference` VALUES (172, 'Puerto Rico', 'PR', 'PRI');
1067 INSERT INTO `geo_country_reference` VALUES (173, 'Qatar', 'QA', 'QAT');
1068 INSERT INTO `geo_country_reference` VALUES (174, 'Reunion', 'RE', 'REU');
1069 INSERT INTO `geo_country_reference` VALUES (175, 'Romania', 'RO', 'ROM');
1070 INSERT INTO `geo_country_reference` VALUES (176, 'Russian Federation', 'RU', 'RUS');
1071 INSERT INTO `geo_country_reference` VALUES (177, 'Rwanda', 'RW', 'RWA');
1072 INSERT INTO `geo_country_reference` VALUES (178, 'Saint Kitts and Nevis', 'KN', 'KNA');
1073 INSERT INTO `geo_country_reference` VALUES (179, 'Saint Lucia', 'LC', 'LCA');
1074 INSERT INTO `geo_country_reference` VALUES (180, 'Saint Vincent and the Grenadines', 'VC', 'VCT');
1075 INSERT INTO `geo_country_reference` VALUES (181, 'Samoa', 'WS', 'WSM');
1076 INSERT INTO `geo_country_reference` VALUES (182, 'San Marino', 'SM', 'SMR');
1077 INSERT INTO `geo_country_reference` VALUES (183, 'Sao Tome and Principe', 'ST', 'STP');
1078 INSERT INTO `geo_country_reference` VALUES (184, 'Saudi Arabia', 'SA', 'SAU');
1079 INSERT INTO `geo_country_reference` VALUES (185, 'Senegal', 'SN', 'SEN');
1080 INSERT INTO `geo_country_reference` VALUES (186, 'Seychelles', 'SC', 'SYC');
1081 INSERT INTO `geo_country_reference` VALUES (187, 'Sierra Leone', 'SL', 'SLE');
1082 INSERT INTO `geo_country_reference` VALUES (188, 'Singapore', 'SG', 'SGP');
1083 INSERT INTO `geo_country_reference` VALUES (189, 'Slovakia (Slovak Republic)', 'SK', 'SVK');
1084 INSERT INTO `geo_country_reference` VALUES (190, 'Slovenia', 'SI', 'SVN');
1085 INSERT INTO `geo_country_reference` VALUES (191, 'Solomon Islands', 'SB', 'SLB');
1086 INSERT INTO `geo_country_reference` VALUES (192, 'Somalia', 'SO', 'SOM');
1087 INSERT INTO `geo_country_reference` VALUES (193, 'south Africa', 'ZA', 'ZAF');
1088 INSERT INTO `geo_country_reference` VALUES (194, 'South Georgia and the South Sandwich Islands', 'GS', 'SGS');
1089 INSERT INTO `geo_country_reference` VALUES (195, 'Spain', 'ES', 'ESP');
1090 INSERT INTO `geo_country_reference` VALUES (196, 'Sri Lanka', 'LK', 'LKA');
1091 INSERT INTO `geo_country_reference` VALUES (197, 'St. Helena', 'SH', 'SHN');
1092 INSERT INTO `geo_country_reference` VALUES (198, 'St. Pierre and Miquelon', 'PM', 'SPM');
1093 INSERT INTO `geo_country_reference` VALUES (199, 'Sudan', 'SD', 'SDN');
1094 INSERT INTO `geo_country_reference` VALUES (200, 'Suriname', 'SR', 'SUR');
1095 INSERT INTO `geo_country_reference` VALUES (201, 'Svalbard and Jan Mayen Islands', 'SJ', 'SJM');
1096 INSERT INTO `geo_country_reference` VALUES (202, 'Swaziland', 'SZ', 'SWZ');
1097 INSERT INTO `geo_country_reference` VALUES (203, 'Sweden', 'SE', 'SWE');
1098 INSERT INTO `geo_country_reference` VALUES (204, 'Switzerland', 'CH', 'CHE');
1099 INSERT INTO `geo_country_reference` VALUES (205, 'Syrian Arab Republic', 'SY', 'SYR');
1100 INSERT INTO `geo_country_reference` VALUES (206, 'Taiwan, Province of China', 'TW', 'TWN');
1101 INSERT INTO `geo_country_reference` VALUES (207, 'Tajikistan', 'TJ', 'TJK');
1102 INSERT INTO `geo_country_reference` VALUES (208, 'Tanzania, United Republic of', 'TZ', 'TZA');
1103 INSERT INTO `geo_country_reference` VALUES (209, 'Thailand', 'TH', 'THA');
1104 INSERT INTO `geo_country_reference` VALUES (210, 'Togo', 'TG', 'TGO');
1105 INSERT INTO `geo_country_reference` VALUES (211, 'Tokelau', 'TK', 'TKL');
1106 INSERT INTO `geo_country_reference` VALUES (212, 'Tonga', 'TO', 'TON');
1107 INSERT INTO `geo_country_reference` VALUES (213, 'Trinidad and Tobago', 'TT', 'TTO');
1108 INSERT INTO `geo_country_reference` VALUES (214, 'Tunisia', 'TN', 'TUN');
1109 INSERT INTO `geo_country_reference` VALUES (215, 'Turkey', 'TR', 'TUR');
1110 INSERT INTO `geo_country_reference` VALUES (216, 'Turkmenistan', 'TM', 'TKM');
1111 INSERT INTO `geo_country_reference` VALUES (217, 'Turks and Caicos Islands', 'TC', 'TCA');
1112 INSERT INTO `geo_country_reference` VALUES (218, 'Tuvalu', 'TV', 'TUV');
1113 INSERT INTO `geo_country_reference` VALUES (219, 'Uganda', 'UG', 'UGA');
1114 INSERT INTO `geo_country_reference` VALUES (220, 'Ukraine', 'UA', 'UKR');
1115 INSERT INTO `geo_country_reference` VALUES (221, 'United Arab Emirates', 'AE', 'ARE');
1116 INSERT INTO `geo_country_reference` VALUES (222, 'United Kingdom', 'GB', 'GBR');
1117 INSERT INTO `geo_country_reference` VALUES (223, 'United States', 'US', 'USA');
1118 INSERT INTO `geo_country_reference` VALUES (224, 'United States Minor Outlying Islands', 'UM', 'UMI');
1119 INSERT INTO `geo_country_reference` VALUES (225, 'Uruguay', 'UY', 'URY');
1120 INSERT INTO `geo_country_reference` VALUES (226, 'Uzbekistan', 'UZ', 'UZB');
1121 INSERT INTO `geo_country_reference` VALUES (227, 'Vanuatu', 'VU', 'VUT');
1122 INSERT INTO `geo_country_reference` VALUES (228, 'Vatican City State (Holy See)', 'VA', 'VAT');
1123 INSERT INTO `geo_country_reference` VALUES (229, 'Venezuela', 'VE', 'VEN');
1124 INSERT INTO `geo_country_reference` VALUES (230, 'Viet Nam', 'VN', 'VNM');
1125 INSERT INTO `geo_country_reference` VALUES (231, 'Virgin Islands (British)', 'VG', 'VGB');
1126 INSERT INTO `geo_country_reference` VALUES (232, 'Virgin Islands (U.S.)', 'VI', 'VIR');
1127 INSERT INTO `geo_country_reference` VALUES (233, 'Wallis and Futuna Islands', 'WF', 'WLF');
1128 INSERT INTO `geo_country_reference` VALUES (234, 'Western Sahara', 'EH', 'ESH');
1129 INSERT INTO `geo_country_reference` VALUES (235, 'Yemen', 'YE', 'YEM');
1130 INSERT INTO `geo_country_reference` VALUES (236, 'Yugoslavia', 'YU', 'YUG');
1131 INSERT INTO `geo_country_reference` VALUES (237, 'Zaire', 'ZR', 'ZAR');
1132 INSERT INTO `geo_country_reference` VALUES (238, 'Zambia', 'ZM', 'ZMB');
1133 INSERT INTO `geo_country_reference` VALUES (239, 'Zimbabwe', 'ZW', 'ZWE');
1135 -- --------------------------------------------------------
1137 -- 
1138 -- Table structure for table `geo_zone_reference`
1139 -- 
1141 DROP TABLE IF EXISTS `geo_zone_reference`;
1142 CREATE TABLE `geo_zone_reference` (
1143   `zone_id` int(5) NOT NULL auto_increment,
1144   `zone_country_id` int(5) NOT NULL default '0',
1145   `zone_code` varchar(5) default NULL,
1146   `zone_name` varchar(32) default NULL,
1147   PRIMARY KEY  (`zone_id`)
1148 ) ENGINE=MyISAM AUTO_INCREMENT=83 ;
1150 -- 
1151 -- Dumping data for table `geo_zone_reference`
1152 -- 
1154 INSERT INTO `geo_zone_reference` VALUES (1, 223, 'AL', 'Alabama');
1155 INSERT INTO `geo_zone_reference` VALUES (2, 223, 'AK', 'Alaska');
1156 INSERT INTO `geo_zone_reference` VALUES (3, 223, 'AS', 'American Samoa');
1157 INSERT INTO `geo_zone_reference` VALUES (4, 223, 'AZ', 'Arizona');
1158 INSERT INTO `geo_zone_reference` VALUES (5, 223, 'AR', 'Arkansas');
1159 INSERT INTO `geo_zone_reference` VALUES (6, 223, 'AF', 'Armed Forces Africa');
1160 INSERT INTO `geo_zone_reference` VALUES (7, 223, 'AA', 'Armed Forces Americas');
1161 INSERT INTO `geo_zone_reference` VALUES (8, 223, 'AC', 'Armed Forces Canada');
1162 INSERT INTO `geo_zone_reference` VALUES (9, 223, 'AE', 'Armed Forces Europe');
1163 INSERT INTO `geo_zone_reference` VALUES (10, 223, 'AM', 'Armed Forces Middle East');
1164 INSERT INTO `geo_zone_reference` VALUES (11, 223, 'AP', 'Armed Forces Pacific');
1165 INSERT INTO `geo_zone_reference` VALUES (12, 223, 'CA', 'California');
1166 INSERT INTO `geo_zone_reference` VALUES (13, 223, 'CO', 'Colorado');
1167 INSERT INTO `geo_zone_reference` VALUES (14, 223, 'CT', 'Connecticut');
1168 INSERT INTO `geo_zone_reference` VALUES (15, 223, 'DE', 'Delaware');
1169 INSERT INTO `geo_zone_reference` VALUES (16, 223, 'DC', 'District of Columbia');
1170 INSERT INTO `geo_zone_reference` VALUES (17, 223, 'FM', 'Federated States Of Micronesia');
1171 INSERT INTO `geo_zone_reference` VALUES (18, 223, 'FL', 'Florida');
1172 INSERT INTO `geo_zone_reference` VALUES (19, 223, 'GA', 'Georgia');
1173 INSERT INTO `geo_zone_reference` VALUES (20, 223, 'GU', 'Guam');
1174 INSERT INTO `geo_zone_reference` VALUES (21, 223, 'HI', 'Hawaii');
1175 INSERT INTO `geo_zone_reference` VALUES (22, 223, 'ID', 'Idaho');
1176 INSERT INTO `geo_zone_reference` VALUES (23, 223, 'IL', 'Illinois');
1177 INSERT INTO `geo_zone_reference` VALUES (24, 223, 'IN', 'Indiana');
1178 INSERT INTO `geo_zone_reference` VALUES (25, 223, 'IA', 'Iowa');
1179 INSERT INTO `geo_zone_reference` VALUES (26, 223, 'KS', 'Kansas');
1180 INSERT INTO `geo_zone_reference` VALUES (27, 223, 'KY', 'Kentucky');
1181 INSERT INTO `geo_zone_reference` VALUES (28, 223, 'LA', 'Louisiana');
1182 INSERT INTO `geo_zone_reference` VALUES (29, 223, 'ME', 'Maine');
1183 INSERT INTO `geo_zone_reference` VALUES (30, 223, 'MH', 'Marshall Islands');
1184 INSERT INTO `geo_zone_reference` VALUES (31, 223, 'MD', 'Maryland');
1185 INSERT INTO `geo_zone_reference` VALUES (32, 223, 'MA', 'Massachusetts');
1186 INSERT INTO `geo_zone_reference` VALUES (33, 223, 'MI', 'Michigan');
1187 INSERT INTO `geo_zone_reference` VALUES (34, 223, 'MN', 'Minnesota');
1188 INSERT INTO `geo_zone_reference` VALUES (35, 223, 'MS', 'Mississippi');
1189 INSERT INTO `geo_zone_reference` VALUES (36, 223, 'MO', 'Missouri');
1190 INSERT INTO `geo_zone_reference` VALUES (37, 223, 'MT', 'Montana');
1191 INSERT INTO `geo_zone_reference` VALUES (38, 223, 'NE', 'Nebraska');
1192 INSERT INTO `geo_zone_reference` VALUES (39, 223, 'NV', 'Nevada');
1193 INSERT INTO `geo_zone_reference` VALUES (40, 223, 'NH', 'New Hampshire');
1194 INSERT INTO `geo_zone_reference` VALUES (41, 223, 'NJ', 'New Jersey');
1195 INSERT INTO `geo_zone_reference` VALUES (42, 223, 'NM', 'New Mexico');
1196 INSERT INTO `geo_zone_reference` VALUES (43, 223, 'NY', 'New York');
1197 INSERT INTO `geo_zone_reference` VALUES (44, 223, 'NC', 'North Carolina');
1198 INSERT INTO `geo_zone_reference` VALUES (45, 223, 'ND', 'North Dakota');
1199 INSERT INTO `geo_zone_reference` VALUES (46, 223, 'MP', 'Northern Mariana Islands');
1200 INSERT INTO `geo_zone_reference` VALUES (47, 223, 'OH', 'Ohio');
1201 INSERT INTO `geo_zone_reference` VALUES (48, 223, 'OK', 'Oklahoma');
1202 INSERT INTO `geo_zone_reference` VALUES (49, 223, 'OR', 'Oregon');
1203 INSERT INTO `geo_zone_reference` VALUES (50, 223, 'PW', 'Palau');
1204 INSERT INTO `geo_zone_reference` VALUES (51, 223, 'PA', 'Pennsylvania');
1205 INSERT INTO `geo_zone_reference` VALUES (52, 223, 'PR', 'Puerto Rico');
1206 INSERT INTO `geo_zone_reference` VALUES (53, 223, 'RI', 'Rhode Island');
1207 INSERT INTO `geo_zone_reference` VALUES (54, 223, 'SC', 'South Carolina');
1208 INSERT INTO `geo_zone_reference` VALUES (55, 223, 'SD', 'South Dakota');
1209 INSERT INTO `geo_zone_reference` VALUES (56, 223, 'TN', 'Tenessee');
1210 INSERT INTO `geo_zone_reference` VALUES (57, 223, 'TX', 'Texas');
1211 INSERT INTO `geo_zone_reference` VALUES (58, 223, 'UT', 'Utah');
1212 INSERT INTO `geo_zone_reference` VALUES (59, 223, 'VT', 'Vermont');
1213 INSERT INTO `geo_zone_reference` VALUES (60, 223, 'VI', 'Virgin Islands');
1214 INSERT INTO `geo_zone_reference` VALUES (61, 223, 'VA', 'Virginia');
1215 INSERT INTO `geo_zone_reference` VALUES (62, 223, 'WA', 'Washington');
1216 INSERT INTO `geo_zone_reference` VALUES (63, 223, 'WV', 'West Virginia');
1217 INSERT INTO `geo_zone_reference` VALUES (64, 223, 'WI', 'Wisconsin');
1218 INSERT INTO `geo_zone_reference` VALUES (65, 223, 'WY', 'Wyoming');
1219 INSERT INTO `geo_zone_reference` VALUES (66, 38, 'AB', 'Alberta');
1220 INSERT INTO `geo_zone_reference` VALUES (67, 38, 'BC', 'British Columbia');
1221 INSERT INTO `geo_zone_reference` VALUES (68, 38, 'MB', 'Manitoba');
1222 INSERT INTO `geo_zone_reference` VALUES (69, 38, 'NF', 'Newfoundland');
1223 INSERT INTO `geo_zone_reference` VALUES (70, 38, 'NB', 'New Brunswick');
1224 INSERT INTO `geo_zone_reference` VALUES (71, 38, 'NS', 'Nova Scotia');
1225 INSERT INTO `geo_zone_reference` VALUES (72, 38, 'NT', 'Northwest Territories');
1226 INSERT INTO `geo_zone_reference` VALUES (73, 38, 'NU', 'Nunavut');
1227 INSERT INTO `geo_zone_reference` VALUES (74, 38, 'ON', 'Ontario');
1228 INSERT INTO `geo_zone_reference` VALUES (75, 38, 'PE', 'Prince Edward Island');
1229 INSERT INTO `geo_zone_reference` VALUES (76, 38, 'QC', 'Quebec');
1230 INSERT INTO `geo_zone_reference` VALUES (77, 38, 'SK', 'Saskatchewan');
1231 INSERT INTO `geo_zone_reference` VALUES (78, 38, 'YT', 'Yukon Territory');
1232 INSERT INTO `geo_zone_reference` VALUES (79, 61, 'QLD', 'Queensland');
1233 INSERT INTO `geo_zone_reference` VALUES (80, 61, 'SA', 'South Australia');
1234 INSERT INTO `geo_zone_reference` VALUES (81, 61, 'ACT', 'Australian Capital Territory');
1235 INSERT INTO `geo_zone_reference` VALUES (82, 61, 'VIC', 'Victoria');
1237 -- --------------------------------------------------------
1239 -- 
1240 -- Table structure for table `groups`
1241 -- 
1243 DROP TABLE IF EXISTS `groups`;
1244 CREATE TABLE `groups` (
1245   `id` bigint(20) NOT NULL auto_increment,
1246   `name` longtext,
1247   `user` longtext,
1248   PRIMARY KEY  (`id`)
1249 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1251 -- --------------------------------------------------------
1253 -- 
1254 -- Table structure for table `history_data`
1255 -- 
1257 DROP TABLE IF EXISTS `history_data`;
1258 CREATE TABLE `history_data` (
1259   `id` bigint(20) NOT NULL auto_increment,
1260   `coffee` longtext,
1261   `tobacco` longtext,
1262   `alcohol` longtext,
1263   `sleep_patterns` longtext,
1264   `exercise_patterns` longtext,
1265   `seatbelt_use` longtext,
1266   `counseling` longtext,
1267   `hazardous_activities` longtext,
1268   `last_breast_exam` varchar(255) default NULL,
1269   `last_mammogram` varchar(255) default NULL,
1270   `last_gynocological_exam` varchar(255) default NULL,
1271   `last_rectal_exam` varchar(255) default NULL,
1272   `last_prostate_exam` varchar(255) default NULL,
1273   `last_physical_exam` varchar(255) default NULL,
1274   `last_sigmoidoscopy_colonoscopy` varchar(255) default NULL,
1275   `last_ecg` varchar(255) default NULL,
1276   `last_cardiac_echo` varchar(255) default NULL,
1277   `last_retinal` varchar(255) default NULL,
1278   `last_fluvax` varchar(255) default NULL,
1279   `last_pneuvax` varchar(255) default NULL,
1280   `last_ldl` varchar(255) default NULL,
1281   `last_hemoglobin` varchar(255) default NULL,
1282   `last_psa` varchar(255) default NULL,
1283   `last_exam_results` varchar(255) default NULL,
1284   `history_mother` longtext,
1285   `history_father` longtext,
1286   `history_siblings` longtext,
1287   `history_offspring` longtext,
1288   `history_spouse` longtext,
1289   `relatives_cancer` longtext,
1290   `relatives_tuberculosis` longtext,
1291   `relatives_diabetes` longtext,
1292   `relatives_high_blood_pressure` longtext,
1293   `relatives_heart_problems` longtext,
1294   `relatives_stroke` longtext,
1295   `relatives_epilepsy` longtext,
1296   `relatives_mental_illness` longtext,
1297   `relatives_suicide` longtext,
1298   `cataract_surgery` datetime default NULL,
1299   `tonsillectomy` datetime default NULL,
1300   `cholecystestomy` datetime default NULL,
1301   `heart_surgery` datetime default NULL,
1302   `hysterectomy` datetime default NULL,
1303   `hernia_repair` datetime default NULL,
1304   `hip_replacement` datetime default NULL,
1305   `knee_replacement` datetime default NULL,
1306   `appendectomy` datetime default NULL,
1307   `date` datetime default NULL,
1308   `pid` bigint(20) NOT NULL default '0',
1309   `name_1` varchar(255) default NULL,
1310   `value_1` varchar(255) default NULL,
1311   `name_2` varchar(255) default NULL,
1312   `value_2` varchar(255) default NULL,
1313   `additional_history` text,
1314   `exams`      text         NOT NULL DEFAULT '',
1315   `usertext11` varchar(255) NOT NULL DEFAULT '',
1316   `usertext12` varchar(255) NOT NULL DEFAULT '',
1317   `usertext13` varchar(255) NOT NULL DEFAULT '',
1318   `usertext14` varchar(255) NOT NULL DEFAULT '',
1319   `usertext15` varchar(255) NOT NULL DEFAULT '',
1320   `usertext16` varchar(255) NOT NULL DEFAULT '',
1321   `usertext17` varchar(255) NOT NULL DEFAULT '',
1322   `usertext18` varchar(255) NOT NULL DEFAULT '',
1323   `usertext19` varchar(255) NOT NULL DEFAULT '',
1324   `usertext20` varchar(255) NOT NULL DEFAULT '',
1325   `usertext21` varchar(255) NOT NULL DEFAULT '',
1326   `usertext22` varchar(255) NOT NULL DEFAULT '',
1327   `usertext23` varchar(255) NOT NULL DEFAULT '',
1328   `usertext24` varchar(255) NOT NULL DEFAULT '',
1329   `usertext25` varchar(255) NOT NULL DEFAULT '',
1330   `usertext26` varchar(255) NOT NULL DEFAULT '',
1331   `usertext27` varchar(255) NOT NULL DEFAULT '',
1332   `usertext28` varchar(255) NOT NULL DEFAULT '',
1333   `usertext29` varchar(255) NOT NULL DEFAULT '',
1334   `usertext30` varchar(255) NOT NULL DEFAULT '',
1335   `userdate11` date DEFAULT NULL,
1336   `userdate12` date DEFAULT NULL,
1337   `userdate13` date DEFAULT NULL,
1338   `userdate14` date DEFAULT NULL,
1339   `userdate15` date DEFAULT NULL,
1340   `userarea11` text NOT NULL DEFAULT '',
1341   `userarea12` text NOT NULL DEFAULT '',
1342   PRIMARY KEY  (`id`),
1343   KEY `pid` (`pid`)
1344 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1346 -- --------------------------------------------------------
1348 -- 
1349 -- Table structure for table `immunizations`
1350 -- 
1352 DROP TABLE IF EXISTS `immunizations`;
1353 CREATE TABLE `immunizations` (
1354   `id` bigint(20) NOT NULL auto_increment,
1355   `patient_id` int(11) default NULL,
1356   `administered_date` date default NULL,
1357   `immunization_id` int(11) default NULL,
1358   `manufacturer` varchar(100) default NULL,
1359   `lot_number` varchar(50) default NULL,
1360   `administered_by_id` bigint(20) default NULL,
1361   `administered_by` VARCHAR( 255 ) default NULL COMMENT 'Alternative to administered_by_id',
1362   `education_date` date default NULL,
1363   `vis_date` date default NULL COMMENT 'Date of VIS Statement', 
1364   `note` text,
1365   `create_date` datetime default NULL,
1366   `update_date` timestamp NOT NULL,
1367   `created_by` bigint(20) default NULL,
1368   `updated_by` bigint(20) default NULL,
1369   PRIMARY KEY  (`id`)
1370 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1372 -- --------------------------------------------------------
1374 -- 
1375 -- Table structure for table `insurance_companies`
1376 -- 
1378 DROP TABLE IF EXISTS `insurance_companies`;
1379 CREATE TABLE `insurance_companies` (
1380   `id` int(11) NOT NULL default '0',
1381   `name` varchar(255) default NULL,
1382   `attn` varchar(255) default NULL,
1383   `cms_id` varchar(15) default NULL,
1384   `freeb_type` tinyint(2) default NULL,
1385   `x12_receiver_id` varchar(25) default NULL,
1386   `x12_default_partner_id` int(11) default NULL,
1387   `alt_cms_id` varchar(15) NOT NULL DEFAULT '',
1388   PRIMARY KEY  (`id`)
1389 ) ENGINE=MyISAM;
1391 -- --------------------------------------------------------
1393 -- 
1394 -- Table structure for table `insurance_data`
1395 -- 
1397 DROP TABLE IF EXISTS `insurance_data`;
1398 CREATE TABLE `insurance_data` (
1399   `id` bigint(20) NOT NULL auto_increment,
1400   `type` enum('primary','secondary','tertiary') default NULL,
1401   `provider` varchar(255) default NULL,
1402   `plan_name` varchar(255) default NULL,
1403   `policy_number` varchar(255) default NULL,
1404   `group_number` varchar(255) default NULL,
1405   `subscriber_lname` varchar(255) default NULL,
1406   `subscriber_mname` varchar(255) default NULL,
1407   `subscriber_fname` varchar(255) default NULL,
1408   `subscriber_relationship` varchar(255) default NULL,
1409   `subscriber_ss` varchar(255) default NULL,
1410   `subscriber_DOB` date default NULL,
1411   `subscriber_street` varchar(255) default NULL,
1412   `subscriber_postal_code` varchar(255) default NULL,
1413   `subscriber_city` varchar(255) default NULL,
1414   `subscriber_state` varchar(255) default NULL,
1415   `subscriber_country` varchar(255) default NULL,
1416   `subscriber_phone` varchar(255) default NULL,
1417   `subscriber_employer` varchar(255) default NULL,
1418   `subscriber_employer_street` varchar(255) default NULL,
1419   `subscriber_employer_postal_code` varchar(255) default NULL,
1420   `subscriber_employer_state` varchar(255) default NULL,
1421   `subscriber_employer_country` varchar(255) default NULL,
1422   `subscriber_employer_city` varchar(255) default NULL,
1423   `copay` varchar(255) default NULL,
1424   `date` date NOT NULL default '0000-00-00',
1425   `pid` bigint(20) NOT NULL default '0',
1426   `subscriber_sex` varchar(25) default NULL,
1427   `accept_assignment` varchar(5) NOT NULL DEFAULT 'TRUE',
1428   PRIMARY KEY  (`id`),
1429   UNIQUE KEY `pid_type_date` (`pid`,`type`,`date`)
1430 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1432 -- --------------------------------------------------------
1434 -- 
1435 -- Table structure for table `insurance_numbers`
1436 -- 
1438 DROP TABLE IF EXISTS `insurance_numbers`;
1439 CREATE TABLE `insurance_numbers` (
1440   `id` int(11) NOT NULL default '0',
1441   `provider_id` int(11) NOT NULL default '0',
1442   `insurance_company_id` int(11) default NULL,
1443   `provider_number` varchar(20) default NULL,
1444   `rendering_provider_number` varchar(20) default NULL,
1445   `group_number` varchar(20) default NULL,
1446   `provider_number_type` varchar(4) default NULL,
1447   `rendering_provider_number_type` varchar(4) default NULL,
1448   PRIMARY KEY  (`id`)
1449 ) ENGINE=MyISAM;
1451 -- --------------------------------------------------------
1453 -- 
1454 -- Table structure for table `integration_mapping`
1455 -- 
1457 DROP TABLE IF EXISTS `integration_mapping`;
1458 CREATE TABLE `integration_mapping` (
1459   `id` int(11) NOT NULL default '0',
1460   `foreign_id` int(11) NOT NULL default '0',
1461   `foreign_table` varchar(125) default NULL,
1462   `local_id` int(11) NOT NULL default '0',
1463   `local_table` varchar(125) default NULL,
1464   PRIMARY KEY  (`id`),
1465   UNIQUE KEY `foreign_id` (`foreign_id`,`foreign_table`,`local_id`,`local_table`)
1466 ) ENGINE=MyISAM;
1468 -- --------------------------------------------------------
1470 -- 
1471 -- Table structure for table `issue_encounter`
1472 -- 
1474 DROP TABLE IF EXISTS `issue_encounter`;
1475 CREATE TABLE `issue_encounter` (
1476   `pid` int(11) NOT NULL,
1477   `list_id` int(11) NOT NULL,
1478   `encounter` int(11) NOT NULL,
1479   `resolved` tinyint(1) NOT NULL,
1480   PRIMARY KEY  (`pid`,`list_id`,`encounter`)
1481 ) ENGINE=MyISAM;
1483 -- --------------------------------------------------------
1485 -- 
1486 -- Table structure for table `lang_constants`
1487 -- 
1489 DROP TABLE IF EXISTS `lang_constants`;
1490 CREATE TABLE `lang_constants` (
1491   `cons_id` int(11) NOT NULL auto_increment,
1492   `constant_name` varchar(255) BINARY default NULL,
1493   UNIQUE KEY `cons_id` (`cons_id`),
1494   KEY `constant_name` (`constant_name`)
1495 ) ENGINE=MyISAM ;
1497 -- 
1498 -- Table structure for table `lang_definitions`
1499 -- 
1501 DROP TABLE IF EXISTS `lang_definitions`;
1502 CREATE TABLE `lang_definitions` (
1503   `def_id` int(11) NOT NULL auto_increment,
1504   `cons_id` int(11) NOT NULL default '0',
1505   `lang_id` int(11) NOT NULL default '0',
1506   `definition` mediumtext,
1507   UNIQUE KEY `def_id` (`def_id`),
1508   KEY `cons_id` (`cons_id`)
1509 ) ENGINE=MyISAM ;
1511 -- 
1512 -- Table structure for table `lang_languages`
1513 -- 
1515 DROP TABLE IF EXISTS `lang_languages`;
1516 CREATE TABLE `lang_languages` (
1517   `lang_id` int(11) NOT NULL auto_increment,
1518   `lang_code` char(2) NOT NULL default '',
1519   `lang_description` varchar(100) default NULL,
1520   UNIQUE KEY `lang_id` (`lang_id`)
1521 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
1523 -- 
1524 -- Dumping data for table `lang_languages`
1525 -- 
1527 INSERT INTO `lang_languages` VALUES (1, 'en', 'English');
1529 -- --------------------------------------------------------
1531 -- 
1532 -- Table structure for table `layout_options`
1533 -- 
1535 DROP TABLE IF EXISTS `layout_options`;
1536 CREATE TABLE `layout_options` (
1537   `form_id` varchar(31) NOT NULL default '',
1538   `field_id` varchar(31) NOT NULL default '',
1539   `group_name` varchar(31) NOT NULL default '',
1540   `title` varchar(63) NOT NULL default '',
1541   `seq` int(11) NOT NULL default '0',
1542   `data_type` tinyint(3) NOT NULL default '0',
1543   `uor` tinyint(1) NOT NULL default '1',
1544   `fld_length` int(11) NOT NULL default '15',
1545   `max_length` int(11) NOT NULL default '0',
1546   `list_id` varchar(31) NOT NULL default '',
1547   `titlecols` tinyint(3) NOT NULL default '1',
1548   `datacols` tinyint(3) NOT NULL default '1',
1549   `default_value` varchar(255) NOT NULL default '',
1550   `edit_options` varchar(36) NOT NULL default '',
1551   `description` varchar(255) NOT NULL default '',
1552   PRIMARY KEY  (`form_id`,`field_id`,`seq`)
1553 ) ENGINE=MyISAM;
1555 -- 
1556 -- Dumping data for table `layout_options`
1557 -- 
1559 INSERT INTO `layout_options` VALUES ('DEM', 'title', '1Who', 'Name', 1, 1, 1, 0, 0, 'titles', 1, 1, '', '', 'Title');
1560 INSERT INTO `layout_options` VALUES ('DEM', 'fname', '1Who', '', 2, 2, 2, 10, 63, '', 0, 0, '', 'C', 'First Name');
1561 INSERT INTO `layout_options` VALUES ('DEM', 'mname', '1Who', '', 3, 2, 1, 2, 63, '', 0, 0, '', 'C', 'Middle Name');
1562 INSERT INTO `layout_options` VALUES ('DEM', 'lname', '1Who', '', 4, 2, 2, 10, 63, '', 0, 0, '', 'C', 'Last Name');
1563 INSERT INTO `layout_options` VALUES ('DEM', 'pubpid', '1Who', 'External ID', 5, 2, 1, 10, 15, '', 1, 1, '', '', 'External identifier');
1564 INSERT INTO `layout_options` VALUES ('DEM', 'DOB', '1Who', 'DOB', 6, 4, 2, 10, 10, '', 1, 1, '', 'D', 'Date of Birth');
1565 INSERT INTO `layout_options` VALUES ('DEM', 'sex', '1Who', 'Sex', 7, 1, 2, 0, 0, 'sex', 1, 1, '', '', 'Sex');
1566 INSERT INTO `layout_options` VALUES ('DEM', 'ss', '1Who', 'S.S.', 8, 2, 1, 11, 11, '', 1, 1, '', '', 'Social Security Number');
1567 INSERT INTO `layout_options` VALUES ('DEM', 'drivers_license', '1Who', 'License/ID', 9, 2, 1, 15, 63, '', 1, 1, '', '', 'Drivers License or State ID');
1568 INSERT INTO `layout_options` VALUES ('DEM', 'status', '1Who', 'Marital Status', 10, 1, 1, 0, 0, 'marital', 1, 3, '', '', 'Marital Status');
1569 INSERT INTO `layout_options` VALUES ('DEM', 'genericname1', '1Who', 'User Defined', 11, 2, 1, 15, 63, '', 1, 3, '', '', 'User Defined Field');
1570 INSERT INTO `layout_options` VALUES ('DEM', 'genericval1', '1Who', '', 12, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field');
1571 INSERT INTO `layout_options` VALUES ('DEM', 'genericname2', '1Who', '', 13, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field');
1572 INSERT INTO `layout_options` VALUES ('DEM', 'genericval2', '1Who', '', 14, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field');
1573 INSERT INTO `layout_options` VALUES ('DEM', 'squad', '1Who', 'Squad', 15, 13, 0, 0, 0, '', 1, 3, '', '', 'Squad Membership');
1574 INSERT INTO `layout_options` VALUES ('DEM', 'pricelevel', '1Who', 'Price Level', 16, 1, 0, 0, 0, 'pricelevel', 1, 1, '', '', 'Discount Level');
1575 INSERT INTO `layout_options` VALUES ('DEM', 'street', '2Contact', 'Address', 1, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number');
1576 INSERT INTO `layout_options` VALUES ('DEM', 'city', '2Contact', 'City', 2, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name');
1577 INSERT INTO `layout_options` VALUES ('DEM', 'state', '2Contact', 'State', 3, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality');
1578 INSERT INTO `layout_options` VALUES ('DEM', 'postal_code', '2Contact', 'Postal Code', 4, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code');
1579 INSERT INTO `layout_options` VALUES ('DEM', 'country_code', '2Contact', 'Country', 5, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country');
1580 INSERT INTO `layout_options` VALUES ('DEM', 'contact_relationship', '2Contact', 'Emergency Contact', 6, 2, 1, 10, 63, '', 1, 1, '', 'C', 'Emergency Contact Person');
1581 INSERT INTO `layout_options` VALUES ('DEM', 'phone_contact', '2Contact', 'Emergency Phone', 7, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Emergency Contact Phone Number');
1582 INSERT INTO `layout_options` VALUES ('DEM', 'phone_home', '2Contact', 'Home Phone', 8, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Home Phone Number');
1583 INSERT INTO `layout_options` VALUES ('DEM', 'phone_biz', '2Contact', 'Work Phone', 9, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Work Phone Number');
1584 INSERT INTO `layout_options` VALUES ('DEM', 'phone_cell', '2Contact', 'Mobile Phone', 10, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Cell Phone Number');
1585 INSERT INTO `layout_options` VALUES ('DEM', 'email', '2Contact', 'Contact Email', 11, 2, 1, 30, 95, '', 1, 1, '', '', 'Contact Email Address');
1586 INSERT INTO `layout_options` VALUES ('DEM', 'providerID', '3Choices', 'Provider', 1, 11, 1, 0, 0, '', 1, 3, '', '', 'Referring Provider');
1587 INSERT INTO `layout_options` VALUES ('DEM', 'pharmacy_id', '3Choices', 'Pharmacy', 2, 12, 1, 0, 0, '', 1, 3, '', '', 'Preferred Pharmacy');
1588 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_notice', '3Choices', 'HIPAA Notice Received', 3, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Did you receive a copy of the HIPAA Notice?');
1589 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_voice', '3Choices', 'Allow Voice Message', 4, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow telephone messages?');
1590 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_mail', '3Choices', 'Allow Mail Message', 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow email messages?');
1591 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_message', '3Choices', 'Leave Message With', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'With whom may we leave a message?');
1592 INSERT INTO `layout_options` VALUES ('DEM', 'occupation', '4Employer', 'Occupation', 1, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Occupation');
1593 INSERT INTO `layout_options` VALUES ('DEM', 'em_name', '4Employer', 'Employer Name', 2, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Employer Name');
1594 INSERT INTO `layout_options` VALUES ('DEM', 'em_street', '4Employer', 'Employer Address', 3, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number');
1595 INSERT INTO `layout_options` VALUES ('DEM', 'em_city', '4Employer', 'City', 4, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name');
1596 INSERT INTO `layout_options` VALUES ('DEM', 'em_state', '4Employer', 'State', 5, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality');
1597 INSERT INTO `layout_options` VALUES ('DEM', 'em_postal_code', '4Employer', 'Postal Code', 6, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code');
1598 INSERT INTO `layout_options` VALUES ('DEM', 'em_country', '4Employer', 'Country', 7, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country');
1599 INSERT INTO `layout_options` VALUES ('DEM', 'language', '5Stats', 'Language', 1, 26, 1, 0, 0, 'language', 1, 1, '', '', 'Preferred Language');
1600 INSERT INTO `layout_options` VALUES ('DEM', 'ethnoracial', '5Stats', 'Race/Ethnicity', 2, 26, 1, 0, 0, 'ethrace', 1, 1, '', '', 'Ethnicity or Race');
1601 INSERT INTO `layout_options` VALUES ('DEM', 'financial_review', '5Stats', 'Financial Review Date', 3, 2, 1, 10, 10, '', 1, 1, '', 'D', 'Financial Review Date');
1602 INSERT INTO `layout_options` VALUES ('DEM', 'family_size', '5Stats', 'Family Size', 4, 2, 1, 20, 63, '', 1, 1, '', '', 'Family Size');
1603 INSERT INTO `layout_options` VALUES ('DEM', 'monthly_income', '5Stats', 'Monthly Income', 5, 2, 1, 20, 63, '', 1, 1, '', '', 'Monthly Income');
1604 INSERT INTO `layout_options` VALUES ('DEM', 'homeless', '5Stats', 'Homeless, etc.', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'Homeless or similar?');
1605 INSERT INTO `layout_options` VALUES ('DEM', 'interpretter', '5Stats', 'Interpreter', 7, 2, 1, 20, 63, '', 1, 1, '', '', 'Interpreter needed?');
1606 INSERT INTO `layout_options` VALUES ('DEM', 'migrantseasonal', '5Stats', 'Migrant/Seasonal', 8, 2, 1, 20, 63, '', 1, 1, '', '', 'Migrant or seasonal worker?');
1607 INSERT INTO `layout_options` VALUES ('DEM', 'contrastart', '5Stats', 'Contraceptives Start',9,4,0,10,10,'',1,1,'','','Date contraceptive services initially provided');
1608 INSERT INTO `layout_options` VALUES ('DEM', 'usertext1', '6Misc', 'User Defined Text 1', 1, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined');
1609 INSERT INTO `layout_options` VALUES ('DEM', 'usertext2', '6Misc', 'User Defined Text 2', 2, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined');
1610 INSERT INTO `layout_options` VALUES ('DEM', 'usertext3', '6Misc', 'User Defined Text 3', 3,2,0,10,63,'',1,1,'','','User Defined');
1611 INSERT INTO `layout_options` VALUES ('DEM', 'usertext4', '6Misc', 'User Defined Text 4', 4,2,0,10,63,'',1,1,'','','User Defined');
1612 INSERT INTO `layout_options` VALUES ('DEM', 'usertext5', '6Misc', 'User Defined Text 5', 5,2,0,10,63,'',1,1,'','','User Defined');
1613 INSERT INTO `layout_options` VALUES ('DEM', 'usertext6', '6Misc', 'User Defined Text 6', 6,2,0,10,63,'',1,1,'','','User Defined');
1614 INSERT INTO `layout_options` VALUES ('DEM', 'usertext7', '6Misc', 'User Defined Text 7', 7,2,0,10,63,'',1,1,'','','User Defined');
1615 INSERT INTO `layout_options` VALUES ('DEM', 'usertext8', '6Misc', 'User Defined Text 8', 8,2,0,10,63,'',1,1,'','','User Defined');
1616 INSERT INTO `layout_options` VALUES ('DEM', 'userlist1', '6Misc', 'User Defined List 1', 9, 1, 0, 0, 0, 'userlist1', 1, 1, '', '', 'User Defined');
1617 INSERT INTO `layout_options` VALUES ('DEM', 'userlist2', '6Misc', 'User Defined List 2',10, 1, 0, 0, 0, 'userlist2', 1, 1, '', '', 'User Defined');
1618 INSERT INTO `layout_options` VALUES ('DEM', 'userlist3', '6Misc', 'User Defined List 3',11, 1, 0, 0, 0, 'userlist3', 1, 1, '', '' , 'User Defined');
1619 INSERT INTO `layout_options` VALUES ('DEM', 'userlist4', '6Misc', 'User Defined List 4',12, 1, 0, 0, 0, 'userlist4', 1, 1, '', '' , 'User Defined');
1620 INSERT INTO `layout_options` VALUES ('DEM', 'userlist5', '6Misc', 'User Defined List 5',13, 1, 0, 0, 0, 'userlist5', 1, 1, '', '' , 'User Defined');
1621 INSERT INTO `layout_options` VALUES ('DEM', 'userlist6', '6Misc', 'User Defined List 6',14, 1, 0, 0, 0, 'userlist6', 1, 1, '', '' , 'User Defined');
1622 INSERT INTO `layout_options` VALUES ('DEM', 'userlist7', '6Misc', 'User Defined List 7',15, 1, 0, 0, 0, 'userlist7', 1, 1, '', '' , 'User Defined');
1623 INSERT INTO `layout_options` VALUES ('DEM', 'regdate'  , '6Misc', 'Registration Date'  ,16, 4, 0,10,10, ''         , 1, 1, '', 'D', 'Start Date at This Clinic');
1624 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_allowsms'  , '3Choices', 'Allow SMS'  , 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow SMS (text messages)?');
1625 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_allowemail', '3Choices', 'Allow Email', 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow Email?');
1627 INSERT INTO layout_options VALUES ('REF','refer_date'      ,'1Referral','Referral Date'                  , 1, 4,2, 0,  0,''         ,1,1,'C','D','Date of referral');
1628 INSERT INTO layout_options VALUES ('REF','refer_from'      ,'1Referral','Refer By'                       , 2,10,2, 0,  0,''         ,1,1,'' ,'' ,'Referral By');
1629 INSERT INTO layout_options VALUES ('REF','refer_external'  ,'1Referral','External Referral'              , 3, 1,1, 0,  0,'boolean'  ,1,1,'' ,'' ,'External referral?');
1630 INSERT INTO layout_options VALUES ('REF','refer_to'        ,'1Referral','Refer To'                       , 4,14,2, 0,  0,''         ,1,1,'' ,'' ,'Referral To');
1631 INSERT INTO layout_options VALUES ('REF','body'            ,'1Referral','Reason'                         , 5, 3,2,30,  3,''         ,1,1,'' ,'' ,'Reason for referral');
1632 INSERT INTO layout_options VALUES ('REF','refer_diag'      ,'1Referral','Referrer Diagnosis'             , 6, 2,1,30,255,''         ,1,1,'' ,'X','Referrer diagnosis');
1633 INSERT INTO layout_options VALUES ('REF','refer_risk_level','1Referral','Risk Level'                     , 7, 1,1, 0,  0,'risklevel',1,1,'' ,'' ,'Level of urgency');
1634 INSERT INTO layout_options VALUES ('REF','refer_vitals'    ,'1Referral','Include Vitals'                 , 8, 1,1, 0,  0,'boolean'  ,1,1,'' ,'' ,'Include vitals data?');
1635 INSERT INTO layout_options VALUES ('REF','refer_related_code','1Referral','Requested Service'            , 9,15,1,30,255,''         ,1,1,'' ,'' ,'Billing Code for Requested Service');
1636 INSERT INTO layout_options VALUES ('REF','reply_date'      ,'2Counter-Referral','Reply Date'             ,10, 4,1, 0,  0,''         ,1,1,'' ,'D','Date of reply');
1637 INSERT INTO layout_options VALUES ('REF','reply_from'      ,'2Counter-Referral','Reply From'             ,11, 2,1,30,255,''         ,1,1,'' ,'' ,'Who replied?');
1638 INSERT INTO layout_options VALUES ('REF','reply_init_diag' ,'2Counter-Referral','Presumed Diagnosis'     ,12, 2,1,30,255,''         ,1,1,'' ,'' ,'Presumed diagnosis by specialist');
1639 INSERT INTO layout_options VALUES ('REF','reply_final_diag','2Counter-Referral','Final Diagnosis'        ,13, 2,1,30,255,''         ,1,1,'' ,'' ,'Final diagnosis by specialist');
1640 INSERT INTO layout_options VALUES ('REF','reply_documents' ,'2Counter-Referral','Documents'              ,14, 2,1,30,255,''         ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?');
1641 INSERT INTO layout_options VALUES ('REF','reply_findings'  ,'2Counter-Referral','Findings'               ,15, 3,1,30,  3,''         ,1,1,'' ,'' ,'Findings by specialist');
1642 INSERT INTO layout_options VALUES ('REF','reply_services'  ,'2Counter-Referral','Services Provided'      ,16, 3,1,30,  3,''         ,1,1,'' ,'' ,'Service provided by specialist');
1643 INSERT INTO layout_options VALUES ('REF','reply_recommend' ,'2Counter-Referral','Recommendations'        ,17, 3,1,30,  3,''         ,1,1,'' ,'' ,'Recommendations by specialist');
1644 INSERT INTO layout_options VALUES ('REF','reply_rx_refer'  ,'2Counter-Referral','Prescriptions/Referrals',18, 3,1,30,  3,''         ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist');
1646 INSERT INTO layout_options VALUES ('HIS','usertext11','1General','Risk Factors',1,21,1,0,0,'riskfactors',1,1,'','' ,'Risk Factors');
1647 INSERT INTO layout_options VALUES ('HIS','exams'     ,'1General','Exams/Tests' ,2,23,1,0,0,'exams'      ,1,1,'','' ,'Exam and test results');
1648 INSERT INTO layout_options VALUES ('HIS','history_father'   ,'2Family History','Father'   ,1, 2,1,20,255,'',1,1,'','' ,'');
1649 INSERT INTO layout_options VALUES ('HIS','history_mother'   ,'2Family History','Mother'   ,2, 2,1,20,255,'',1,1,'','' ,'');
1650 INSERT INTO layout_options VALUES ('HIS','history_siblings' ,'2Family History','Siblings' ,3, 2,1,20,255,'',1,1,'','' ,'');
1651 INSERT INTO layout_options VALUES ('HIS','history_spouse'   ,'2Family History','Spouse'   ,4, 2,1,20,255,'',1,1,'','' ,'');
1652 INSERT INTO layout_options VALUES ('HIS','history_offspring','2Family History','Offspring',5, 2,1,20,255,'',1,3,'','' ,'');
1653 INSERT INTO layout_options VALUES ('HIS','relatives_cancer'             ,'3Relatives','Cancer'             ,1, 2,1,20,255,'',1,1,'','' ,'');
1654 INSERT INTO layout_options VALUES ('HIS','relatives_tuberculosis'       ,'3Relatives','Tuberculosis'       ,2, 2,1,20,255,'',1,1,'','' ,'');
1655 INSERT INTO layout_options VALUES ('HIS','relatives_diabetes'           ,'3Relatives','Diabetes'           ,3, 2,1,20,255,'',1,1,'','' ,'');
1656 INSERT INTO layout_options VALUES ('HIS','relatives_high_blood_pressure','3Relatives','High Blood Pressure',4, 2,1,20,255,'',1,1,'','' ,'');
1657 INSERT INTO layout_options VALUES ('HIS','relatives_heart_problems'     ,'3Relatives','Heart Problems'     ,5, 2,1,20,255,'',1,1,'','' ,'');
1658 INSERT INTO layout_options VALUES ('HIS','relatives_stroke'             ,'3Relatives','Stroke'             ,6, 2,1,20,255,'',1,1,'','' ,'');
1659 INSERT INTO layout_options VALUES ('HIS','relatives_epilepsy'           ,'3Relatives','Epilepsy'           ,7, 2,1,20,255,'',1,1,'','' ,'');
1660 INSERT INTO layout_options VALUES ('HIS','relatives_mental_illness'     ,'3Relatives','Mental Illness'     ,8, 2,1,20,255,'',1,1,'','' ,'');
1661 INSERT INTO layout_options VALUES ('HIS','relatives_suicide'            ,'3Relatives','Suicide'            ,9, 2,1,20,255,'',1,3,'','' ,'');
1662 INSERT INTO layout_options VALUES ('HIS','coffee'              ,'4Lifestyle','Coffee'              ,1, 2,1,20,255,'',1,1,'','' ,'Caffeine consumption');
1663 INSERT INTO layout_options VALUES ('HIS','tobacco'             ,'4Lifestyle','Tobacco'             ,2, 2,1,20,255,'',1,1,'','' ,'Tobacco use');
1664 INSERT INTO layout_options VALUES ('HIS','alcohol'             ,'4Lifestyle','Alcohol'             ,3, 2,1,20,255,'',1,1,'','' ,'Alcohol consumption');
1665 INSERT INTO layout_options VALUES ('HIS','sleep_patterns'      ,'4Lifestyle','Sleep Patterns'      ,4, 2,1,20,255,'',1,1,'','' ,'Sleep patterns');
1666 INSERT INTO layout_options VALUES ('HIS','exercise_patterns'   ,'4Lifestyle','Exercise Patterns'   ,5, 2,1,20,255,'',1,1,'','' ,'Exercise patterns');
1667 INSERT INTO layout_options VALUES ('HIS','seatbelt_use'        ,'4Lifestyle','Seatbelt Use'        ,6, 2,1,20,255,'',1,1,'','' ,'Seatbelt use');
1668 INSERT INTO layout_options VALUES ('HIS','counseling'          ,'4Lifestyle','Counseling'          ,7, 2,1,20,255,'',1,1,'','' ,'Counseling activities');
1669 INSERT INTO layout_options VALUES ('HIS','hazardous_activities','4Lifestyle','Hazardous Activities',8, 2,1,20,255,'',1,1,'','' ,'Hazardous activities');
1670 INSERT INTO layout_options VALUES ('HIS','name_1'            ,'5Other','Name/Value'        ,1, 2,1,10,255,'',1,1,'','' ,'Name 1' );
1671 INSERT INTO layout_options VALUES ('HIS','value_1'           ,'5Other',''                  ,2, 2,1,10,255,'',0,0,'','' ,'Value 1');
1672 INSERT INTO layout_options VALUES ('HIS','name_2'            ,'5Other','Name/Value'        ,3, 2,1,10,255,'',1,1,'','' ,'Name 2' );
1673 INSERT INTO layout_options VALUES ('HIS','value_2'           ,'5Other',''                  ,4, 2,1,10,255,'',0,0,'','' ,'Value 2');
1674 INSERT INTO layout_options VALUES ('HIS','additional_history','5Other','Additional History',5, 3,1,30,  3,'',1,3,'' ,'' ,'Additional history notes');
1675 INSERT INTO layout_options VALUES ('HIS','userarea11'        ,'5Other','User Defined Area 11',6,3,0,30,3,'',1,3,'','','User Defined');
1676 INSERT INTO layout_options VALUES ('HIS','userarea12'        ,'5Other','User Defined Area 12',7,3,0,30,3,'',1,3,'','','User Defined');
1678 -- --------------------------------------------------------
1680 -- 
1681 -- Table structure for table `list_options`
1682 -- 
1684 DROP TABLE IF EXISTS `list_options`;
1685 CREATE TABLE `list_options` (
1686   `list_id` varchar(31) NOT NULL default '',
1687   `option_id` varchar(31) NOT NULL default '',
1688   `title` varchar(255) NOT NULL default '',
1689   `seq` int(11) NOT NULL default '0',
1690   `is_default` tinyint(1) NOT NULL default '0',
1691   `option_value` float NOT NULL default '0',
1692   `mapping` varchar(15) NOT NULL DEFAULT '',
1693   PRIMARY KEY  (`list_id`,`option_id`)
1694 ) ENGINE=MyISAM;
1696 -- 
1697 -- Dumping data for table `list_options`
1698 -- 
1700 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('yesno', 'NO', 'NO', 1, 0);
1701 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('yesno', 'YES', 'YES', 2, 0);
1702 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Mr.', 'Mr.', 1, 0);
1703 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Mrs.', 'Mrs.', 2, 0);
1704 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Ms.', 'Ms.', 3, 0);
1705 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Dr.', 'Dr.', 4, 0);
1706 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sex', 'Female', 'Female', 1, 0);
1707 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sex', 'Male', 'Male', 2, 0);
1708 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'married', 'Married', 1, 0);
1709 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'single', 'Single', 2, 0);
1710 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'divorced', 'Divorced', 3, 0);
1711 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'widowed', 'Widowed', 4, 0);
1712 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'separated', 'Separated', 5, 0);
1713 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'domestic partner', 'Domestic Partner', 6, 0);
1714 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'English', 'English', 1, 0);
1715 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'Spanish', 'Spanish', 2, 0);
1716 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Caucasian', 'Caucasian', 1, 0);
1717 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Asian', 'Asian', 2, 0);
1718 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Black', 'Black', 3, 0);
1719 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Hispanic', 'Hispanic', 4, 0);
1720 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist1', 'sample', 'Sample', 1, 0);
1721 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist2', 'sample', 'Sample', 1, 0);
1722 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist3','sample','Sample',1,0);
1723 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist4','sample','Sample',1,0);
1724 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist5','sample','Sample',1,0);
1725 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist6','sample','Sample',1,0);
1726 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist7','sample','Sample',1,0);
1727 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('pricelevel', 'standard', 'Standard', 1, 1);
1728 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('risklevel', 'low', 'Low', 1, 0);
1729 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('risklevel', 'medium', 'Medium', 2, 1);
1730 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('risklevel', 'high', 'High', 3, 0);
1731 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('boolean', '0', 'No', 1, 0);
1732 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('boolean', '1', 'Yes', 2, 0);
1733 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('country', 'USA', 'USA', 1, 0);
1734 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','CA','California',1,0);
1735 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Patient'      ,'Patient'      , 1,0);
1736 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Employee'     ,'Employee'     , 2,0);
1737 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Walk-In'      ,'Walk-In'      , 3,0);
1738 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Newspaper'    ,'Newspaper'    , 4,0);
1739 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Radio'        ,'Radio'        , 5,0);
1740 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','T.V.'         ,'T.V.'         , 6,0);
1741 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Direct Mail'  ,'Direct Mail'  , 7,0);
1742 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Coupon'       ,'Coupon'       , 8,0);
1743 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Referral Card','Referral Card', 9,0);
1744 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Other'        ,'Other'        ,10,0);
1745 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','vv' ,'Varicose Veins'                      , 1,0);
1746 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','ht' ,'Hypertension'                        , 2,0);
1747 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','db' ,'Diabetes'                            , 3,0);
1748 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','sc' ,'Sickle Cell'                         , 4,0);
1749 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','fib','Fibroids'                            , 5,0);
1750 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','pid','PID (Pelvic Inflammatory Disease)'   , 6,0);
1751 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','mig','Severe Migraine'                     , 7,0);
1752 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','hd' ,'Heart Disease'                       , 8,0);
1753 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','str','Thrombosis/Stroke'                   , 9,0);
1754 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','hep','Hepatitis'                           ,10,0);
1755 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','gb' ,'Gall Bladder Condition'              ,11,0);
1756 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','br' ,'Breast Disease'                      ,12,0);
1757 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','dpr','Depression'                          ,13,0);
1758 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','all','Allergies'                           ,14,0);
1759 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','inf','Infertility'                         ,15,0);
1760 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','ast','Asthma'                              ,16,0);
1761 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','ep' ,'Epilepsy'                            ,17,0);
1762 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','cl' ,'Contact Lenses'                      ,18,0);
1763 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','coc','Contraceptive Complication (specify)',19,0);
1764 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','oth','Other (specify)'                     ,20,0);
1765 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'brs','Breast Exam'          , 1,0);
1766 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'cec','Cardiac Echo'         , 2,0);
1767 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'ecg','ECG'                  , 3,0);
1768 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'gyn','Gynecological Exam'   , 4,0);
1769 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'mam','Mammogram'            , 5,0);
1770 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'phy','Physical Exam'        , 6,0);
1771 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'pro','Prostate Exam'        , 7,0);
1772 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'rec','Rectal Exam'          , 8,0);
1773 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'sic','Sigmoid/Colonoscopy'  , 9,0);
1774 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'ret','Retinal Exam'         ,10,0);
1775 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'flu','Flu Vaccination'      ,11,0);
1776 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'pne','Pneumonia Vaccination',12,0);
1777 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'ldl','LDL'                  ,13,0);
1778 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'hem','Hemoglobin'           ,14,0);
1779 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'psa','PSA'                  ,15,0);
1780 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','0',''           ,0,0);
1781 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','1','suspension' ,1,0);
1782 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','2','tablet'     ,2,0);
1783 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','3','capsule'    ,3,0);
1784 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','4','solution'   ,4,0);
1785 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','5','tsp'        ,5,0);
1786 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','6','ml'         ,6,0);
1787 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','7','units'      ,7,0);
1788 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','8','inhalations',8,0);
1789 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','9','gtts(drops)',9,0);
1790 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','10','cream'   ,10,0);
1791 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','11','ointment',11,0);
1792 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','0',''          ,0,0);
1793 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','1','mg'    ,1,0);
1794 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','2','mg/1cc',2,0);
1795 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','3','mg/2cc',3,0);
1796 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','4','mg/3cc',4,0);
1797 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','5','mg/4cc',5,0);
1798 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','6','mg/5cc',6,0);
1799 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','7','mcg'   ,7,0);
1800 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','8','grams' ,8,0);
1801 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '0',''                 , 0,0);
1802 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '1','Per Oris'         , 1,0);
1803 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '2','Per Rectum'       , 2,0);
1804 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '3','To Skin'          , 3,0);
1805 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '4','To Affected Area' , 4,0);
1806 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '5','Sublingual'       , 5,0);
1807 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '6','OS'               , 6,0);
1808 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '7','OD'               , 7,0);
1809 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '8','OU'               , 8,0);
1810 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '9','SQ'               , 9,0);
1811 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','10','IM'               ,10,0);
1812 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','11','IV'               ,11,0);
1813 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','12','Per Nostril'      ,12,0);
1814 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','13','Both Ears',13,0);
1815 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','14','Left Ear' ,14,0);
1816 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','15','Right Ear',15,0);
1817 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','0',''      ,0,0);
1818 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','1','b.i.d.',1,0);
1819 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','2','t.i.d.',2,0);
1820 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','3','q.i.d.',3,0);
1821 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','4','q.3h'  ,4,0);
1822 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','5','q.4h'  ,5,0);
1823 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','6','q.5h'  ,6,0);
1824 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','7','q.6h'  ,7,0);
1825 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','8','q.8h'  ,8,0);
1826 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','9','q.d.'  ,9,0);
1827 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','10','a.c.'  ,10,0);
1828 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','11','p.c.'  ,11,0);
1829 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','12','a.m.'  ,12,0);
1830 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','13','p.m.'  ,13,0);
1831 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','14','ante'  ,14,0);
1832 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','15','h'     ,15,0);
1833 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','16','h.s.'  ,16,0);
1834 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','17','p.r.n.',17,0);
1835 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','18','stat'  ,18,0);
1837 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('chartloc','fileroom','File Room'              ,1,0);
1838 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'boolean'      ,'Boolean'            , 1,0);
1839 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'chartloc'     ,'Chart Storage Locations',1,0);
1840 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'country'      ,'Country'            , 2,0);
1841 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_form'    ,'Drug Forms'         , 3,0);
1842 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_units'   ,'Drug Units'         , 4,0);
1843 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_route'   ,'Drug Routes'        , 5,0);
1844 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_interval','Drug Intervals'     , 6,0);
1845 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'exams'        ,'Exams/Tests'        , 7,0);
1846 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'feesheet'     ,'Fee Sheet'          , 8,0);
1847 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'language'     ,'Language'           , 9,0);
1848 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'lbfnames'     ,'Layout-Based Visit Forms',9,0);
1849 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'marital'      ,'Marital Status'     ,10,0);
1850 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'pricelevel'   ,'Price Level'        ,11,0);
1851 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'ethrace'      ,'Race/Ethnicity'     ,12,0);
1852 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'refsource'    ,'Referral Source'    ,13,0);
1853 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'riskfactors'  ,'Risk Factors'       ,14,0);
1854 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'risklevel'    ,'Risk Level'         ,15,0);
1855 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'superbill'    ,'Service Category'   ,16,0);
1856 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'sex'          ,'Sex'                ,17,0);
1857 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'state'        ,'State'              ,18,0);
1858 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'taxrate'      ,'Tax Rate'           ,19,0);
1859 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'titles'       ,'Titles'             ,20,0);
1860 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'yesno'        ,'Yes/No'             ,21,0);
1861 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist1'    ,'User Defined List 1',22,0);
1862 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist2'    ,'User Defined List 2',23,0);
1863 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist3'    ,'User Defined List 3',24,0);
1864 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist4'    ,'User Defined List 4',25,0);
1865 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist5'    ,'User Defined List 5',26,0);
1866 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist6'    ,'User Defined List 6',27,0);
1867 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist7'    ,'User Defined List 7',28,0);
1869 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'    ,'adjreason'      ,'Adjustment Reasons',1,0);
1870 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Adm adjust'     ,'Adm adjust'     , 5,0);
1871 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','After hrs calls','After hrs calls',10,0);
1872 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Bad check'      ,'Bad check'      ,15,0);
1873 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Bad debt'       ,'Bad debt'       ,20,0);
1874 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Coll w/o'       ,'Coll w/o'       ,25,0);
1875 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Discount'       ,'Discount'       ,30,0);
1876 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Hardship w/o'   ,'Hardship w/o'   ,35,0);
1877 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Ins adjust'     ,'Ins adjust'     ,40,0);
1878 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Ins bundling'   ,'Ins bundling'   ,45,0);
1879 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Ins overpaid'   ,'Ins overpaid'   ,50,0);
1880 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Ins refund'     ,'Ins refund'     ,55,0);
1881 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Pt overpaid'    ,'Pt overpaid'    ,60,0);
1882 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Pt refund'      ,'Pt refund'      ,65,0);
1883 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Pt released'    ,'Pt released'    ,70,0);
1884 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Sm debt w/o'    ,'Sm debt w/o'    ,75,0);
1885 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','To copay'       ,'To copay'       ,80,0);
1886 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','To ded\'ble'    ,'To ded\'ble'    ,85,0);
1887 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('adjreason','Untimely filing','Untimely filing',90,0);
1889 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'       ,'sub_relation','Subscriber Relationship',18,0);
1890 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','self'        ,'Self'                   , 1,0);
1891 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','spouse'      ,'Spouse'                 , 2,0);
1892 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','child'       ,'Child'                  , 3,0);
1893 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','other'       ,'Other'                  , 4,0);
1895 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'     ,'occurrence','Occurrence'                  ,10,0);
1896 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','0'         ,'Unknown or N/A'              , 5,0);
1897 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','1'         ,'First'                       ,10,0);
1898 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','6'         ,'Early Recurrence (<2 Mo)'    ,15,0);
1899 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','7'         ,'Late Recurrence (2-12 Mo)'   ,20,0);
1900 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','8'         ,'Delayed Recurrence (> 12 Mo)',25,0);
1901 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','4'         ,'Chronic/Recurrent'           ,30,0);
1902 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','5'         ,'Acute on Chronic'            ,35,0);
1904 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'  ,'outcome','Outcome'         ,10,0);
1905 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','0'      ,'Unassigned'      , 2,0);
1906 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','1'      ,'Resolved'        , 5,0);
1907 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','2'      ,'Improved'        ,10,0);
1908 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','3'      ,'Status quo'      ,15,0);
1909 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','4'      ,'Worse'           ,20,0);
1910 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','5'      ,'Pending followup',25,0);
1912 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'    ,'note_type'      ,'Patient Note Types',10,0);
1913 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Unassigned'     ,'Unassigned'        , 1,0);
1914 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Chart Note'     ,'Chart Note'        , 2,0);
1915 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Insurance'      ,'Insurance'         , 3,0);
1916 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','New Document'   ,'New Document'      , 4,0);
1917 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Pharmacy'       ,'Pharmacy'          , 5,0);
1918 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Prior Auth'     ,'Prior Auth'        , 6,0);
1919 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Referral'       ,'Referral'          , 7,0);
1920 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Test Scheduling','Test Scheduling'   , 8,0);
1921 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Bill/Collect'   ,'Bill/Collect'      , 9,0);
1922 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Other'          ,'Other'             ,10,0);
1924 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'        ,'immunizations','Immunizations'           ,  8,0);
1925 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','1'            ,'DTaP 1'                  , 30,0);
1926 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','2'            ,'DTaP 2'                  , 35,0);
1927 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','3'            ,'DTaP 3'                  , 40,0);
1928 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','4'            ,'DTaP 4'                  , 45,0);
1929 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','5'            ,'DTaP 5'                  , 50,0);
1930 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','6'            ,'DT 1'                    ,  5,0);
1931 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','7'            ,'DT 2'                    , 10,0);
1932 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','8'            ,'DT 3'                    , 15,0);
1933 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','9'            ,'DT 4'                    , 20,0);
1934 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','10'           ,'DT 5'                    , 25,0);
1935 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','11'           ,'IPV 1'                   ,110,0);
1936 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','12'           ,'IPV 2'                   ,115,0);
1937 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','13'           ,'IPV 3'                   ,120,0);
1938 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','14'           ,'IPV 4'                   ,125,0);
1939 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','15'           ,'Hib 1'                   , 80,0);
1940 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','16'           ,'Hib 2'                   , 85,0);
1941 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','17'           ,'Hib 3'                   , 90,0);
1942 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','18'           ,'Hib 4'                   , 95,0);
1943 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','19'           ,'Pneumococcal Conjugate 1',140,0);
1944 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','20'           ,'Pneumococcal Conjugate 2',145,0);
1945 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','21'           ,'Pneumococcal Conjugate 3',150,0);
1946 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','22'           ,'Pneumococcal Conjugate 4',155,0);
1947 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','23'           ,'MMR 1'                   ,130,0);
1948 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','24'           ,'MMR 2'                   ,135,0);
1949 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','25'           ,'Varicella 1'             ,165,0);
1950 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','26'           ,'Varicella 2'             ,170,0);
1951 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','27'           ,'Hepatitis B 1'           , 65,0);
1952 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','28'           ,'Hepatitis B 2'           , 70,0);
1953 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','29'           ,'Hepatitis B 3'           , 75,0);
1954 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','30'           ,'Influenza 1'             ,100,0);
1955 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','31'           ,'Influenza 2'             ,105,0);
1956 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','32'           ,'Td'                      ,160,0);
1957 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','33'           ,'Hepatitis A 1'           , 55,0);
1958 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','34'           ,'Hepatitis A 2'           , 60,0);
1959 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','35'           ,'Other'                   ,175,0);
1961 -- --------------------------------------------------------
1963 -- 
1964 -- Table structure for table `lists`
1965 -- 
1967 DROP TABLE IF EXISTS `lists`;
1968 CREATE TABLE `lists` (
1969   `id` bigint(20) NOT NULL auto_increment,
1970   `date` datetime default NULL,
1971   `type` varchar(255) default NULL,
1972   `title` varchar(255) default NULL,
1973   `begdate` date default NULL,
1974   `enddate` date default NULL,
1975   `returndate` date default NULL,
1976   `occurrence` int(11) default '0',
1977   `classification` int(11) default '0',
1978   `referredby` varchar(255) default NULL,
1979   `extrainfo` varchar(255) default NULL,
1980   `diagnosis` varchar(255) default NULL,
1981   `activity` tinyint(4) default NULL,
1982   `comments` longtext,
1983   `pid` bigint(20) default NULL,
1984   `user` varchar(255) default NULL,
1985   `groupname` varchar(255) default NULL,
1986   `outcome` int(11) NOT NULL default '0',
1987   `destination` varchar(255) default NULL,
1988   PRIMARY KEY  (`id`)
1989 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1991 -- --------------------------------------------------------
1993 -- 
1994 -- Table structure for table `log`
1995 -- 
1997 DROP TABLE IF EXISTS `log`;
1998 CREATE TABLE `log` (
1999   `id` bigint(20) NOT NULL auto_increment,
2000   `date` datetime default NULL,
2001   `event` varchar(255) default NULL,
2002   `user` varchar(255) default NULL,
2003   `groupname` varchar(255) default NULL,
2004   `comments` longtext,
2005   `user_notes` longtext,
2006   PRIMARY KEY  (`id`)
2007 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2009 -- --------------------------------------------------------
2011 -- 
2012 -- Table structure for table `notes`
2013 -- 
2015 DROP TABLE IF EXISTS `notes`;
2016 CREATE TABLE `notes` (
2017   `id` int(11) NOT NULL default '0',
2018   `foreign_id` int(11) NOT NULL default '0',
2019   `note` varchar(255) default NULL,
2020   `owner` int(11) default NULL,
2021   `date` datetime default NULL,
2022   `revision` timestamp NOT NULL,
2023   PRIMARY KEY  (`id`),
2024   KEY `foreign_id` (`owner`),
2025   KEY `foreign_id_2` (`foreign_id`),
2026   KEY `date` (`date`)
2027 ) ENGINE=MyISAM;
2029 -- --------------------------------------------------------
2031 -- 
2032 -- Table structure for table `onotes`
2033 -- 
2035 DROP TABLE IF EXISTS `onotes`;
2036 CREATE TABLE `onotes` (
2037   `id` bigint(20) NOT NULL auto_increment,
2038   `date` datetime default NULL,
2039   `body` longtext,
2040   `user` varchar(255) default NULL,
2041   `groupname` varchar(255) default NULL,
2042   `activity` tinyint(4) default NULL,
2043   PRIMARY KEY  (`id`)
2044 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2046 -- --------------------------------------------------------
2048 -- 
2049 -- Table structure for table `openemr_module_vars`
2050 -- 
2052 DROP TABLE IF EXISTS `openemr_module_vars`;
2053 CREATE TABLE `openemr_module_vars` (
2054   `pn_id` int(11) unsigned NOT NULL auto_increment,
2055   `pn_modname` varchar(64) default NULL,
2056   `pn_name` varchar(64) default NULL,
2057   `pn_value` longtext,
2058   PRIMARY KEY  (`pn_id`),
2059   KEY `pn_modname` (`pn_modname`),
2060   KEY `pn_name` (`pn_name`)
2061 ) ENGINE=MyISAM AUTO_INCREMENT=235 ;
2063 -- 
2064 -- Dumping data for table `openemr_module_vars`
2065 -- 
2067 INSERT INTO `openemr_module_vars` VALUES (234, 'PostCalendar', 'pcNotifyEmail', '');
2068 INSERT INTO `openemr_module_vars` VALUES (233, 'PostCalendar', 'pcNotifyAdmin', '0');
2069 INSERT INTO `openemr_module_vars` VALUES (232, 'PostCalendar', 'pcCacheLifetime', '3600');
2070 INSERT INTO `openemr_module_vars` VALUES (231, 'PostCalendar', 'pcUseCache', '0');
2071 INSERT INTO `openemr_module_vars` VALUES (230, 'PostCalendar', 'pcDefaultView', 'day');
2072 INSERT INTO `openemr_module_vars` VALUES (229, 'PostCalendar', 'pcTimeIncrement', '5');
2073 INSERT INTO `openemr_module_vars` VALUES (228, 'PostCalendar', 'pcAllowUserCalendar', '1');
2074 INSERT INTO `openemr_module_vars` VALUES (227, 'PostCalendar', 'pcAllowSiteWide', '1');
2075 INSERT INTO `openemr_module_vars` VALUES (226, 'PostCalendar', 'pcTemplate', 'default');
2076 INSERT INTO `openemr_module_vars` VALUES (225, 'PostCalendar', 'pcEventDateFormat', '%Y-%m-%d');
2077 INSERT INTO `openemr_module_vars` VALUES (224, 'PostCalendar', 'pcDisplayTopics', '0');
2078 INSERT INTO `openemr_module_vars` VALUES (223, 'PostCalendar', 'pcListHowManyEvents', '15');
2079 INSERT INTO `openemr_module_vars` VALUES (222, 'PostCalendar', 'pcAllowDirectSubmit', '1');
2080 INSERT INTO `openemr_module_vars` VALUES (221, 'PostCalendar', 'pcUsePopups', '0');
2081 INSERT INTO `openemr_module_vars` VALUES (220, 'PostCalendar', 'pcDayHighlightColor', '#EEEEEE');
2082 INSERT INTO `openemr_module_vars` VALUES (219, 'PostCalendar', 'pcFirstDayOfWeek', '1');
2083 INSERT INTO `openemr_module_vars` VALUES (218, 'PostCalendar', 'pcUseInternationalDates', '0');
2084 INSERT INTO `openemr_module_vars` VALUES (217, 'PostCalendar', 'pcEventsOpenInNewWindow', '0');
2085 INSERT INTO `openemr_module_vars` VALUES (216, 'PostCalendar', 'pcTime24Hours', '0');
2087 -- --------------------------------------------------------
2089 -- 
2090 -- Table structure for table `openemr_modules`
2091 -- 
2093 DROP TABLE IF EXISTS `openemr_modules`;
2094 CREATE TABLE `openemr_modules` (
2095   `pn_id` int(11) unsigned NOT NULL auto_increment,
2096   `pn_name` varchar(64) default NULL,
2097   `pn_type` int(6) NOT NULL default '0',
2098   `pn_displayname` varchar(64) default NULL,
2099   `pn_description` varchar(255) default NULL,
2100   `pn_regid` int(11) unsigned NOT NULL default '0',
2101   `pn_directory` varchar(64) default NULL,
2102   `pn_version` varchar(10) default NULL,
2103   `pn_admin_capable` tinyint(1) NOT NULL default '0',
2104   `pn_user_capable` tinyint(1) NOT NULL default '0',
2105   `pn_state` tinyint(1) NOT NULL default '0',
2106   PRIMARY KEY  (`pn_id`)
2107 ) ENGINE=MyISAM AUTO_INCREMENT=47 ;
2109 -- 
2110 -- Dumping data for table `openemr_modules`
2111 -- 
2113 INSERT INTO `openemr_modules` VALUES (46, 'PostCalendar', 2, 'PostCalendar', 'PostNuke Calendar Module', 0, 'PostCalendar', '4.0.0', 1, 1, 3);
2115 -- --------------------------------------------------------
2117 -- 
2118 -- Table structure for table `openemr_postcalendar_categories`
2119 -- 
2121 DROP TABLE IF EXISTS `openemr_postcalendar_categories`;
2122 CREATE TABLE `openemr_postcalendar_categories` (
2123   `pc_catid` int(11) unsigned NOT NULL auto_increment,
2124   `pc_catname` varchar(100) default NULL,
2125   `pc_catcolor` varchar(50) default NULL,
2126   `pc_catdesc` text,
2127   `pc_recurrtype` int(1) NOT NULL default '0',
2128   `pc_enddate` date default NULL,
2129   `pc_recurrspec` text,
2130   `pc_recurrfreq` int(3) NOT NULL default '0',
2131   `pc_duration` bigint(20) NOT NULL default '0',
2132   `pc_end_date_flag` tinyint(1) NOT NULL default '0',
2133   `pc_end_date_type` int(2) default NULL,
2134   `pc_end_date_freq` int(11) NOT NULL default '0',
2135   `pc_end_all_day` tinyint(1) NOT NULL default '0',
2136   `pc_dailylimit` int(2) NOT NULL default '0',
2137   PRIMARY KEY  (`pc_catid`),
2138   KEY `basic_cat` (`pc_catname`,`pc_catcolor`)
2139 ) ENGINE=MyISAM AUTO_INCREMENT=11 ;
2141 -- 
2142 -- Dumping data for table `openemr_postcalendar_categories`
2143 -- 
2145 INSERT INTO `openemr_postcalendar_categories` VALUES (5, 'Office Visit', '#FFFFCC', 'Normal Office Visit', 0, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"0";s:22:"event_repeat_freq_type";s:1:"0";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 900, 0, 0, 0, 0);
2146 INSERT INTO `openemr_postcalendar_categories` VALUES (4, 'Vacation', '#EFEFEF', 'Reserved for use to define Scheduled Vacation Time', 0, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"0";s:22:"event_repeat_freq_type";s:1:"0";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 0, 0, 0, 0, 1, 0);
2147 INSERT INTO `openemr_postcalendar_categories` VALUES (1, 'No Show', '#DDDDDD', 'Reserved to define when an event did not occur as specified.', 0, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"0";s:22:"event_repeat_freq_type";s:1:"0";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 0, 0, 0, 0, 0, 0);
2148 INSERT INTO `openemr_postcalendar_categories` VALUES (2, 'In Office', '#99CCFF', 'Reserved todefine when a provider may haveavailable appointments after.', 1, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"1";s:22:"event_repeat_freq_type";s:1:"4";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 0, 1, 3, 2, 0, 0);
2149 INSERT INTO `openemr_postcalendar_categories` VALUES (3, 'Out Of Office', '#99FFFF', 'Reserved to define when a provider may not have available appointments after.', 1, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"1";s:22:"event_repeat_freq_type";s:1:"4";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 0, 1, 3, 2, 0, 0);
2150 INSERT INTO `openemr_postcalendar_categories` VALUES (8, 'Lunch', '#FFFF33', 'Lunch', 1, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"1";s:22:"event_repeat_freq_type";s:1:"4";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 3600, 0, 3, 2, 0, 0);
2151 INSERT INTO `openemr_postcalendar_categories` VALUES (9, 'Established Patient', '#CCFF33', '', 0, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"0";s:22:"event_repeat_freq_type";s:1:"0";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 900, 0, 0, 0, 0, 0);
2152 INSERT INTO `openemr_postcalendar_categories` VALUES (10,'New Patient', '#CCFFFF', '', 0, NULL, 'a:5:{s:17:"event_repeat_freq";s:1:"0";s:22:"event_repeat_freq_type";s:1:"0";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, 1800, 0, 0, 0, 0, 0);
2153 INSERT INTO `openemr_postcalendar_categories` VALUES (11,'Reserved','#FF7777','Reserved',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0);
2155 -- --------------------------------------------------------
2157 -- 
2158 -- Table structure for table `openemr_postcalendar_events`
2159 -- 
2161 DROP TABLE IF EXISTS `openemr_postcalendar_events`;
2162 CREATE TABLE `openemr_postcalendar_events` (
2163   `pc_eid` int(11) unsigned NOT NULL auto_increment,
2164   `pc_catid` int(11) NOT NULL default '0',
2165   `pc_multiple` int(10) unsigned NOT NULL,
2166   `pc_aid` varchar(30) default NULL,
2167   `pc_pid` varchar(11) default NULL,
2168   `pc_title` varchar(150) default NULL,
2169   `pc_time` datetime default NULL,
2170   `pc_hometext` text,
2171   `pc_comments` int(11) default '0',
2172   `pc_counter` mediumint(8) unsigned default '0',
2173   `pc_topic` int(3) NOT NULL default '1',
2174   `pc_informant` varchar(20) default NULL,
2175   `pc_eventDate` date NOT NULL default '0000-00-00',
2176   `pc_endDate` date NOT NULL default '0000-00-00',
2177   `pc_duration` bigint(20) NOT NULL default '0',
2178   `pc_recurrtype` int(1) NOT NULL default '0',
2179   `pc_recurrspec` text,
2180   `pc_recurrfreq` int(3) NOT NULL default '0',
2181   `pc_startTime` time default NULL,
2182   `pc_endTime` time default NULL,
2183   `pc_alldayevent` int(1) NOT NULL default '0',
2184   `pc_location` text,
2185   `pc_conttel` varchar(50) default NULL,
2186   `pc_contname` varchar(50) default NULL,
2187   `pc_contemail` varchar(255) default NULL,
2188   `pc_website` varchar(255) default NULL,
2189   `pc_fee` varchar(50) default NULL,
2190   `pc_eventstatus` int(11) NOT NULL default '0',
2191   `pc_sharing` int(11) NOT NULL default '0',
2192   `pc_language` varchar(30) default NULL,
2193   `pc_apptstatus` char(1) NOT NULL default '-',
2194   `pc_prefcatid` int(11) NOT NULL default '0',
2195   `pc_facility` smallint(6) NOT NULL default '0' COMMENT 'facility id for this event',
2196   `pc_sendalertsms` VARCHAR(3) NOT NULL DEFAULT 'NO',
2197   `pc_sendalertemail` VARCHAR( 3 ) NOT NULL DEFAULT 'NO',
2198   PRIMARY KEY  (`pc_eid`),
2199   KEY `basic_event` (`pc_catid`,`pc_aid`,`pc_eventDate`,`pc_endDate`,`pc_eventstatus`,`pc_sharing`,`pc_topic`)
2200 ) ENGINE=MyISAM AUTO_INCREMENT=7 ;
2202 -- 
2203 -- Dumping data for table `openemr_postcalendar_events`
2204 -- 
2206 INSERT INTO `openemr_postcalendar_events` VALUES (3, 2, 0, '1', '', 'In Office', '2005-03-03 12:22:31', ':text:', 0, 0, 0, '1', '2005-03-03', '2007-03-03', 0, 1, 'a:5:{s:17:"event_repeat_freq";s:1:"1";s:22:"event_repeat_freq_type";s:1:"4";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, '09:00:00', '09:00:00', 0, 'a:6:{s:14:"event_location";N;s:13:"event_street1";N;s:13:"event_street2";N;s:10:"event_city";N;s:11:"event_state";N;s:12:"event_postal";N;}', '', '', '', '', '', 1, 1, '', '-', 0, 0, 'NO', 'NO');
2207 INSERT INTO `openemr_postcalendar_events` VALUES (5, 3, 0, '1', '', 'Out Of Office', '2005-03-03 12:22:52', ':text:', 0, 0, 0, '1', '2005-03-03', '2007-03-03', 0, 1, 'a:5:{s:17:"event_repeat_freq";s:1:"1";s:22:"event_repeat_freq_type";s:1:"4";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, '17:00:00', '17:00:00', 0, 'a:6:{s:14:"event_location";N;s:13:"event_street1";N;s:13:"event_street2";N;s:10:"event_city";N;s:11:"event_state";N;s:12:"event_postal";N;}', '', '', '', '', '', 1, 1, '', '-', 0, 0, 'NO', 'NO');
2208 INSERT INTO `openemr_postcalendar_events` VALUES (6, 8, 0, '1', '', 'Lunch', '2005-03-03 12:23:31', ':text:', 0, 0, 0, '1', '2005-03-03', '2007-03-03', 3600, 1, 'a:5:{s:17:"event_repeat_freq";s:1:"1";s:22:"event_repeat_freq_type";s:1:"4";s:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";s:20:"event_repeat_on_freq";s:1:"0";}', 0, '12:00:00', '13:00:00', 0, 'a:6:{s:14:"event_location";N;s:13:"event_street1";N;s:13:"event_street2";N;s:10:"event_city";N;s:11:"event_state";N;s:12:"event_postal";N;}', '', '', '', '', '', 1, 1, '', '-', 0, 0, 'NO', 'NO');
2210 -- --------------------------------------------------------
2212 -- 
2213 -- Table structure for table `openemr_postcalendar_limits`
2214 -- 
2216 DROP TABLE IF EXISTS `openemr_postcalendar_limits`;
2217 CREATE TABLE `openemr_postcalendar_limits` (
2218   `pc_limitid` int(11) NOT NULL auto_increment,
2219   `pc_catid` int(11) NOT NULL default '0',
2220   `pc_starttime` time NOT NULL default '00:00:00',
2221   `pc_endtime` time NOT NULL default '00:00:00',
2222   `pc_limit` int(11) NOT NULL default '1',
2223   PRIMARY KEY  (`pc_limitid`)
2224 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2226 -- --------------------------------------------------------
2228 -- 
2229 -- Table structure for table `openemr_postcalendar_topics`
2230 -- 
2232 DROP TABLE IF EXISTS `openemr_postcalendar_topics`;
2233 CREATE TABLE `openemr_postcalendar_topics` (
2234   `pc_catid` int(11) unsigned NOT NULL auto_increment,
2235   `pc_catname` varchar(100) default NULL,
2236   `pc_catcolor` varchar(50) default NULL,
2237   `pc_catdesc` text,
2238   PRIMARY KEY  (`pc_catid`),
2239   KEY `basic_cat` (`pc_catname`,`pc_catcolor`)
2240 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2242 -- --------------------------------------------------------
2244 -- 
2245 -- Table structure for table `openemr_session_info`
2246 -- 
2248 DROP TABLE IF EXISTS `openemr_session_info`;
2249 CREATE TABLE `openemr_session_info` (
2250   `pn_sessid` varchar(32) NOT NULL default '',
2251   `pn_ipaddr` varchar(20) default NULL,
2252   `pn_firstused` int(11) NOT NULL default '0',
2253   `pn_lastused` int(11) NOT NULL default '0',
2254   `pn_uid` int(11) NOT NULL default '0',
2255   `pn_vars` blob,
2256   PRIMARY KEY  (`pn_sessid`)
2257 ) ENGINE=MyISAM;
2259 -- 
2260 -- Dumping data for table `openemr_session_info`
2261 -- 
2263 INSERT INTO `openemr_session_info` VALUES ('978d31441dccd350d406bfab98978f20', '127.0.0.1', 1109233952, 1109234177, 0, NULL);
2265 -- --------------------------------------------------------
2267 -- 
2268 -- Table structure for table `patient_data`
2269 -- 
2271 DROP TABLE IF EXISTS `patient_data`;
2272 CREATE TABLE `patient_data` (
2273   `id` bigint(20) NOT NULL auto_increment,
2274   `title` varchar(255) NOT NULL default '',
2275   `language` varchar(255) NOT NULL default '',
2276   `financial` varchar(255) NOT NULL default '',
2277   `fname` varchar(255) NOT NULL default '',
2278   `lname` varchar(255) NOT NULL default '',
2279   `mname` varchar(255) NOT NULL default '',
2280   `DOB` date default NULL,
2281   `street` varchar(255) NOT NULL default '',
2282   `postal_code` varchar(255) NOT NULL default '',
2283   `city` varchar(255) NOT NULL default '',
2284   `state` varchar(255) NOT NULL default '',
2285   `country_code` varchar(255) NOT NULL default '',
2286   `drivers_license` varchar(255) NOT NULL default '',
2287   `ss` varchar(255) NOT NULL default '',
2288   `occupation` longtext,
2289   `phone_home` varchar(255) NOT NULL default '',
2290   `phone_biz` varchar(255) NOT NULL default '',
2291   `phone_contact` varchar(255) NOT NULL default '',
2292   `phone_cell` varchar(255) NOT NULL default '',
2293   `pharmacy_id` int(11) NOT NULL default '0',
2294   `status` varchar(255) NOT NULL default '',
2295   `contact_relationship` varchar(255) NOT NULL default '',
2296   `date` datetime default NULL,
2297   `sex` varchar(255) NOT NULL default '',
2298   `referrer` varchar(255) NOT NULL default '',
2299   `referrerID` varchar(255) NOT NULL default '',
2300   `providerID` int(11) default NULL,
2301   `email` varchar(255) NOT NULL default '',
2302   `ethnoracial` varchar(255) NOT NULL default '',
2303   `interpretter` varchar(255) NOT NULL default '',
2304   `migrantseasonal` varchar(255) NOT NULL default '',
2305   `family_size` varchar(255) NOT NULL default '',
2306   `monthly_income` varchar(255) NOT NULL default '',
2307   `homeless` varchar(255) NOT NULL default '',
2308   `financial_review` datetime default NULL,
2309   `pubpid` varchar(255) NOT NULL default '',
2310   `pid` bigint(20) NOT NULL default '0',
2311   `genericname1` varchar(255) NOT NULL default '',
2312   `genericval1` varchar(255) NOT NULL default '',
2313   `genericname2` varchar(255) NOT NULL default '',
2314   `genericval2` varchar(255) NOT NULL default '',
2315   `hipaa_mail` varchar(3) NOT NULL default '',
2316   `hipaa_voice` varchar(3) NOT NULL default '',
2317   `hipaa_notice` varchar(3) NOT NULL default '',
2318   `hipaa_message` varchar(20) NOT NULL default '',
2319   `hipaa_allowsms` VARCHAR( 3 ) NOT NULL DEFAULT 'NO',
2320   `hipaa_allowemail` VARCHAR( 3 ) NOT NULL DEFAULT 'NO',
2321   `squad` varchar(32) NOT NULL default '',
2322   `fitness` int(11) NOT NULL default '0',
2323   `referral_source` varchar(30) NOT NULL default '',
2324   `usertext1` varchar(255) NOT NULL DEFAULT '',
2325   `usertext2` varchar(255) NOT NULL DEFAULT '',
2326   `usertext3` varchar(255) NOT NULL DEFAULT '',
2327   `usertext4` varchar(255) NOT NULL DEFAULT '',
2328   `usertext5` varchar(255) NOT NULL DEFAULT '',
2329   `usertext6` varchar(255) NOT NULL DEFAULT '',
2330   `usertext7` varchar(255) NOT NULL DEFAULT '',
2331   `usertext8` varchar(255) NOT NULL DEFAULT '',
2332   `userlist1` varchar(255) NOT NULL DEFAULT '',
2333   `userlist2` varchar(255) NOT NULL DEFAULT '',
2334   `userlist3` varchar(255) NOT NULL DEFAULT '',
2335   `userlist4` varchar(255) NOT NULL DEFAULT '',
2336   `userlist5` varchar(255) NOT NULL DEFAULT '',
2337   `userlist6` varchar(255) NOT NULL DEFAULT '',
2338   `userlist7` varchar(255) NOT NULL DEFAULT '',
2339   `pricelevel` varchar(255) NOT NULL default 'standard',
2340   `regdate`     date DEFAULT NULL COMMENT 'Registration Date',
2341   `contrastart` date DEFAULT NULL COMMENT 'Date contraceptives initially used',
2342   UNIQUE KEY `pid` (`pid`),
2343   KEY `id` (`id`)
2344 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2346 -- --------------------------------------------------------
2348 -- 
2349 -- Table structure for table `payments`
2350 -- 
2352 DROP TABLE IF EXISTS `payments`;
2353 CREATE TABLE `payments` (
2354   `id` bigint(20) NOT NULL auto_increment,
2355   `pid` bigint(20) NOT NULL default '0',
2356   `dtime` datetime NOT NULL,
2357   `encounter` bigint(20) NOT NULL default '0',
2358   `user` varchar(255) default NULL,
2359   `method` varchar(255) default NULL,
2360   `source` varchar(255) default NULL,
2361   `amount1` decimal(12,2) NOT NULL default '0.00',
2362   `amount2` decimal(12,2) NOT NULL default '0.00',
2363   `posted1` decimal(12,2) NOT NULL default '0.00',
2364   `posted2` decimal(12,2) NOT NULL default '0.00',
2365   PRIMARY KEY  (`id`),
2366   KEY `pid` (`pid`)
2367 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2369 -- --------------------------------------------------------
2371 -- 
2372 -- Table structure for table `pharmacies`
2373 -- 
2375 DROP TABLE IF EXISTS `pharmacies`;
2376 CREATE TABLE `pharmacies` (
2377   `id` int(11) NOT NULL default '0',
2378   `name` varchar(255) default NULL,
2379   `transmit_method` int(11) NOT NULL default '1',
2380   `email` varchar(255) default NULL,
2381   PRIMARY KEY  (`id`)
2382 ) ENGINE=MyISAM;
2384 -- --------------------------------------------------------
2386 -- 
2387 -- Table structure for table `phone_numbers`
2388 -- 
2390 DROP TABLE IF EXISTS `phone_numbers`;
2391 CREATE TABLE `phone_numbers` (
2392   `id` int(11) NOT NULL default '0',
2393   `country_code` varchar(5) default NULL,
2394   `area_code` char(3) default NULL,
2395   `prefix` char(3) default NULL,
2396   `number` varchar(4) default NULL,
2397   `type` int(11) default NULL,
2398   `foreign_id` int(11) default NULL,
2399   PRIMARY KEY  (`id`),
2400   KEY `foreign_id` (`foreign_id`)
2401 ) ENGINE=MyISAM;
2403 -- --------------------------------------------------------
2405 -- 
2406 -- Table structure for table `pma_bookmark`
2407 -- 
2409 DROP TABLE IF EXISTS `pma_bookmark`;
2410 CREATE TABLE `pma_bookmark` (
2411   `id` int(11) NOT NULL auto_increment,
2412   `dbase` varchar(255) default NULL,
2413   `user` varchar(255) default NULL,
2414   `label` varchar(255) default NULL,
2415   `query` text,
2416   PRIMARY KEY  (`id`)
2417 ) ENGINE=MyISAM COMMENT='Bookmarks' AUTO_INCREMENT=10 ;
2419 -- 
2420 -- Dumping data for table `pma_bookmark`
2421 -- 
2423 INSERT INTO `pma_bookmark` VALUES (2, 'openemr', 'openemr', 'Aggregate Race Statistics', 'SELECT ethnoracial as "Race/Ethnicity", count(*) as Count FROM  `patient_data` WHERE 1 group by ethnoracial');
2424 INSERT INTO `pma_bookmark` VALUES (9, 'openemr', 'openemr', 'Search by Code', 'SELECT  b.code, concat(pd.fname," ", pd.lname) as "Patient Name", concat(u.fname," ", u.lname) as "Provider Name", en.reason as "Encounter Desc.", en.date\r\nFROM billing as b\r\nLEFT JOIN users AS u ON b.user = u.id\r\nLEFT JOIN patient_data as pd on b.pid = pd.pid\r\nLEFT JOIN form_encounter as en on b.encounter = en.encounter and b.pid = en.pid\r\nWHERE 1 /* and b.code like ''%[VARIABLE]%'' */ ORDER BY b.code');
2425 INSERT INTO `pma_bookmark` VALUES (8, 'openemr', 'openemr', 'Count No Shows By Provider since Interval ago', 'SELECT concat( u.fname,  " ", u.lname )  AS  "Provider Name", u.id AS  "Provider ID", count(  DISTINCT ev.pc_eid )  AS  "Number of No Shows"/* , concat(DATE_FORMAT(NOW(),''%Y-%m-%d''), '' and '',DATE_FORMAT(DATE_ADD(now(), INTERVAL [VARIABLE]),''%Y-%m-%d'') ) as "Between Dates" */ FROM  `openemr_postcalendar_events`  AS ev LEFT  JOIN users AS u ON ev.pc_aid = u.id WHERE ev.pc_catid =1/* and ( ev.pc_eventDate >= DATE_SUB(now(), INTERVAL [VARIABLE]) )  */\r\nGROUP  BY u.id;');
2426 INSERT INTO `pma_bookmark` VALUES (6, 'openemr', 'openemr', 'Appointments By Race/Ethnicity from today plus interval', 'SELECT  count(pd.ethnoracial) as "Number of Appointments", pd.ethnoracial AS  "Race/Ethnicity" /* , concat(DATE_FORMAT(NOW(),''%Y-%m-%d''), '' and '',DATE_FORMAT(DATE_ADD(now(), INTERVAL [VARIABLE]),''%Y-%m-%d'') ) as "Between Dates" */ FROM openemr_postcalendar_events AS ev LEFT  JOIN   `patient_data`  AS pd ON  pd.pid = ev.pc_pid where ev.pc_eventstatus=1 and ev.pc_catid = 5 and ev.pc_eventDate >= now()  /* and ( ev.pc_eventDate <= DATE_ADD(now(), INTERVAL [VARIABLE]) )  */ group by pd.ethnoracial');
2428 -- --------------------------------------------------------
2430 -- 
2431 -- Table structure for table `pma_column_info`
2432 -- 
2434 DROP TABLE IF EXISTS `pma_column_info`;
2435 CREATE TABLE `pma_column_info` (
2436   `id` int(5) unsigned NOT NULL auto_increment,
2437   `db_name` varchar(64) default NULL,
2438   `table_name` varchar(64) default NULL,
2439   `column_name` varchar(64) default NULL,
2440   `comment` varchar(255) default NULL,
2441   `mimetype` varchar(255) default NULL,
2442   `transformation` varchar(255) default NULL,
2443   `transformation_options` varchar(255) default NULL,
2444   PRIMARY KEY  (`id`),
2445   UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
2446 ) ENGINE=MyISAM COMMENT='Column Information for phpMyAdmin' AUTO_INCREMENT=1 ;
2448 -- --------------------------------------------------------
2450 -- 
2451 -- Table structure for table `pma_history`
2452 -- 
2454 DROP TABLE IF EXISTS `pma_history`;
2455 CREATE TABLE `pma_history` (
2456   `id` bigint(20) unsigned NOT NULL auto_increment,
2457   `username` varchar(64) default NULL,
2458   `db` varchar(64) default NULL,
2459   `table` varchar(64) default NULL,
2460   `timevalue` timestamp NOT NULL,
2461   `sqlquery` text,
2462   PRIMARY KEY  (`id`),
2463   KEY `username` (`username`,`db`,`table`,`timevalue`)
2464 ) ENGINE=MyISAM COMMENT='SQL history' AUTO_INCREMENT=1 ;
2466 -- --------------------------------------------------------
2468 -- 
2469 -- Table structure for table `pma_pdf_pages`
2470 -- 
2472 DROP TABLE IF EXISTS `pma_pdf_pages`;
2473 CREATE TABLE `pma_pdf_pages` (
2474   `db_name` varchar(64) default NULL,
2475   `page_nr` int(10) unsigned NOT NULL auto_increment,
2476   `page_descr` varchar(50) default NULL,
2477   PRIMARY KEY  (`page_nr`),
2478   KEY `db_name` (`db_name`)
2479 ) ENGINE=MyISAM COMMENT='PDF Relationpages for PMA' AUTO_INCREMENT=1 ;
2481 -- --------------------------------------------------------
2483 -- 
2484 -- Table structure for table `pma_relation`
2485 -- 
2487 DROP TABLE IF EXISTS `pma_relation`;
2488 CREATE TABLE `pma_relation` (
2489   `master_db` varchar(64) NOT NULL default '',
2490   `master_table` varchar(64) NOT NULL default '',
2491   `master_field` varchar(64) NOT NULL default '',
2492   `foreign_db` varchar(64) default NULL,
2493   `foreign_table` varchar(64) default NULL,
2494   `foreign_field` varchar(64) default NULL,
2495   PRIMARY KEY  (`master_db`,`master_table`,`master_field`),
2496   KEY `foreign_field` (`foreign_db`,`foreign_table`)
2497 ) ENGINE=MyISAM COMMENT='Relation table';
2499 -- --------------------------------------------------------
2501 -- 
2502 -- Table structure for table `pma_table_coords`
2503 -- 
2505 DROP TABLE IF EXISTS `pma_table_coords`;
2506 CREATE TABLE `pma_table_coords` (
2507   `db_name` varchar(64) NOT NULL default '',
2508   `table_name` varchar(64) NOT NULL default '',
2509   `pdf_page_number` int(11) NOT NULL default '0',
2510   `x` float unsigned NOT NULL default '0',
2511   `y` float unsigned NOT NULL default '0',
2512   PRIMARY KEY  (`db_name`,`table_name`,`pdf_page_number`)
2513 ) ENGINE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
2515 -- --------------------------------------------------------
2517 -- 
2518 -- Table structure for table `pma_table_info`
2519 -- 
2521 DROP TABLE IF EXISTS `pma_table_info`;
2522 CREATE TABLE `pma_table_info` (
2523   `db_name` varchar(64) NOT NULL default '',
2524   `table_name` varchar(64) NOT NULL default '',
2525   `display_field` varchar(64) default NULL,
2526   PRIMARY KEY  (`db_name`,`table_name`)
2527 ) ENGINE=MyISAM COMMENT='Table information for phpMyAdmin';
2529 -- --------------------------------------------------------
2531 -- 
2532 -- Table structure for table `pnotes`
2533 -- 
2535 DROP TABLE IF EXISTS `pnotes`;
2536 CREATE TABLE `pnotes` (
2537   `id` bigint(20) NOT NULL auto_increment,
2538   `date` datetime default NULL,
2539   `body` longtext,
2540   `pid` bigint(20) default NULL,
2541   `user` varchar(255) default NULL,
2542   `groupname` varchar(255) default NULL,
2543   `activity` tinyint(4) default NULL,
2544   `authorized` tinyint(4) default NULL,
2545   `title` varchar(255) default NULL,
2546   `assigned_to` varchar(255) default NULL,
2547   `deleted` tinyint(4) default 0 COMMENT 'flag indicates note is deleted',
2548   PRIMARY KEY  (`id`)
2549 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2551 -- --------------------------------------------------------
2553 -- 
2554 -- Table structure for table `prescriptions`
2555 -- 
2557 DROP TABLE IF EXISTS `prescriptions`;
2558 CREATE TABLE `prescriptions` (
2559   `id` int(11) NOT NULL auto_increment,
2560   `patient_id` int(11) default NULL,
2561   `filled_by_id` int(11) default NULL,
2562   `pharmacy_id` int(11) default NULL,
2563   `date_added` date default NULL,
2564   `date_modified` date default NULL,
2565   `provider_id` int(11) default NULL,
2566   `start_date` date default NULL,
2567   `drug` varchar(150) default NULL,
2568   `drug_id` int(11) NOT NULL default '0',
2569   `form` int(3) default NULL,
2570   `dosage` varchar(100) default NULL,
2571   `quantity` varchar(31) default NULL,
2572   `size` float unsigned default NULL,
2573   `unit` int(11) default NULL,
2574   `route` int(11) default NULL,
2575   `interval` int(11) default NULL,
2576   `substitute` int(11) default NULL,
2577   `refills` int(11) default NULL,
2578   `per_refill` int(11) default NULL,
2579   `filled_date` date default NULL,
2580   `medication` int(11) default NULL,
2581   `note` text,
2582   `active` int(11) NOT NULL default '1',
2583   PRIMARY KEY  (`id`)
2584 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2586 -- --------------------------------------------------------
2588 -- 
2589 -- Table structure for table `prices`
2590 -- 
2592 DROP TABLE IF EXISTS `prices`;
2593 CREATE TABLE `prices` (
2594   `pr_id` varchar(11) NOT NULL default '',
2595   `pr_selector` varchar(255) NOT NULL default '' COMMENT 'template selector for drugs, empty for codes',
2596   `pr_level` varchar(31) NOT NULL default '',
2597   `pr_price` decimal(12,2) NOT NULL default '0.00' COMMENT 'price in local currency',
2598   PRIMARY KEY  (`pr_id`,`pr_selector`,`pr_level`)
2599 ) ENGINE=MyISAM;
2601 -- --------------------------------------------------------
2603 -- 
2604 -- Table structure for table `registry`
2605 -- 
2607 DROP TABLE IF EXISTS `registry`;
2608 CREATE TABLE `registry` (
2609   `name` varchar(255) default NULL,
2610   `state` tinyint(4) default NULL,
2611   `directory` varchar(255) default NULL,
2612   `id` bigint(20) NOT NULL auto_increment,
2613   `sql_run` tinyint(4) default NULL,
2614   `unpackaged` tinyint(4) default NULL,
2615   `date` datetime default NULL,
2616   `priority` int(11) default '0',
2617   `category` varchar(255) default NULL,
2618   `nickname` varchar(255) default NULL,
2619   PRIMARY KEY  (`id`)
2620 ) ENGINE=MyISAM AUTO_INCREMENT=16 ;
2622 -- 
2623 -- Dumping data for table `registry`
2624 -- 
2626 INSERT INTO `registry` VALUES ('New Encounter Form', 1, 'newpatient', 1, 1, 1, '2003-09-14 15:16:45', 0, 'category', '');
2627 INSERT INTO `registry` VALUES ('Review of Systems Checks', 1, 'reviewofs', 9, 1, 1, '2003-09-14 15:16:45', 0, 'category', '');
2628 INSERT INTO `registry` VALUES ('Speech Dictation', 1, 'dictation', 10, 1, 1, '2003-09-14 15:16:45', 0, 'category', '');
2629 INSERT INTO `registry` VALUES ('SOAP', 1, 'soap', 11, 1, 1, '2005-03-03 00:16:35', 0, 'category', '');
2630 INSERT INTO `registry` VALUES ('Vitals', 1, 'vitals', 12, 1, 1, '2005-03-03 00:16:34', 0, 'category', '');
2631 INSERT INTO `registry` VALUES ('Review Of Systems', 1, 'ros', 13, 1, 1, '2005-03-03 00:16:30', 0, 'category', '');
2632 INSERT INTO `registry` VALUES ('Fee Sheet', 1, 'fee_sheet', 14, 1, 1, '2007-07-28 00:00:00', 0, 'category', '');
2633 INSERT INTO `registry` VALUES ('Misc Billing Options HCFA', 1, 'misc_billing_options', 15, 1, 1, '2007-07-28 00:00:00', 0, 'category', '');
2635 -- --------------------------------------------------------
2637 -- 
2638 -- Table structure for table `sequences`
2639 -- 
2641 DROP TABLE IF EXISTS `sequences`;
2642 CREATE TABLE `sequences` (
2643   `id` int(11) unsigned NOT NULL default '0'
2644 ) ENGINE=MyISAM;
2646 -- 
2647 -- Dumping data for table `sequences`
2648 -- 
2650 INSERT INTO `sequences` VALUES (1);
2652 -- --------------------------------------------------------
2654 -- 
2655 -- Table structure for table `transactions`
2656 -- 
2658 DROP TABLE IF EXISTS `transactions`;
2659 CREATE TABLE `transactions` (
2660   `id`                      bigint(20)   NOT NULL auto_increment,
2661   `date`                    datetime     default NULL,
2662   `title`                   varchar(255) NOT NULL DEFAULT '',
2663   `body`                    longtext     NOT NULL DEFAULT '',
2664   `pid`                     bigint(20)   default NULL,
2665   `user`                    varchar(255) NOT NULL DEFAULT '',
2666   `groupname`               varchar(255) NOT NULL DEFAULT '',
2667   `authorized`              tinyint(4)   default NULL,
2668   `refer_date`              date         DEFAULT NULL,
2669   `refer_from`              int(11)      NOT NULL DEFAULT 0,
2670   `refer_to`                int(11)      NOT NULL DEFAULT 0,
2671   `refer_diag`              varchar(255) NOT NULL DEFAULT '',
2672   `refer_risk_level`        varchar(255) NOT NULL DEFAULT '',
2673   `refer_vitals`            tinyint(1)   NOT NULL DEFAULT 0,
2674   `refer_external`          tinyint(1)   NOT NULL DEFAULT 0,
2675   `refer_related_code`      varchar(255) NOT NULL DEFAULT '',
2676   `reply_date`              date         DEFAULT NULL,
2677   `reply_from`              varchar(255) NOT NULL DEFAULT '',
2678   `reply_init_diag`         varchar(255) NOT NULL DEFAULT '',
2679   `reply_final_diag`        varchar(255) NOT NULL DEFAULT '',
2680   `reply_documents`         varchar(255) NOT NULL DEFAULT '',
2681   `reply_findings`          text         NOT NULL DEFAULT '',
2682   `reply_services`          text         NOT NULL DEFAULT '',
2683   `reply_recommend`         text         NOT NULL DEFAULT '',
2684   `reply_rx_refer`          text         NOT NULL DEFAULT '',
2685   PRIMARY KEY  (`id`)
2686 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2688 -- --------------------------------------------------------
2690 -- 
2691 -- Table structure for table `users`
2692 -- 
2694 DROP TABLE IF EXISTS `users`;
2695 CREATE TABLE `users` (
2696   `id` bigint(20) NOT NULL auto_increment,
2697   `username` varchar(255) default NULL,
2698   `password` longtext,
2699   `authorized` tinyint(4) default NULL,
2700   `info` longtext,
2701   `source` tinyint(4) default NULL,
2702   `fname` varchar(255) default NULL,
2703   `mname` varchar(255) default NULL,
2704   `lname` varchar(255) default NULL,
2705   `federaltaxid` varchar(255) default NULL,
2706   `federaldrugid` varchar(255) default NULL,
2707   `upin` varchar(255) default NULL,
2708   `facility` varchar(255) default NULL,
2709   `facility_id` int(11) NOT NULL default '0',
2710   `see_auth` int(11) NOT NULL default '1',
2711   `active` tinyint(1) NOT NULL default '1',
2712   `npi` varchar(15) default NULL,
2713   `title` varchar(30) default NULL,
2714   `specialty` varchar(255) default NULL,
2715   `billname` varchar(255) default NULL,
2716   `email` varchar(255) default NULL,
2717   `url` varchar(255) default NULL,
2718   `assistant` varchar(255) default NULL,
2719   `organization` varchar(255) default NULL,
2720   `valedictory` varchar(255) default NULL,
2721   `street` varchar(60) default NULL,
2722   `streetb` varchar(60) default NULL,
2723   `city` varchar(30) default NULL,
2724   `state` varchar(30) default NULL,
2725   `zip` varchar(20) default NULL,
2726   `street2` varchar(60) default NULL,
2727   `streetb2` varchar(60) default NULL,
2728   `city2` varchar(30) default NULL,
2729   `state2` varchar(30) default NULL,
2730   `zip2` varchar(20) default NULL,
2731   `phone` varchar(30) default NULL,
2732   `fax` varchar(30) default NULL,
2733   `phonew1` varchar(30) default NULL,
2734   `phonew2` varchar(30) default NULL,
2735   `phonecell` varchar(30) default NULL,
2736   `notes` text,
2737   `cal_ui` tinyint(4) NOT NULL default '1',
2738   `taxonomy` varchar(30) NOT NULL DEFAULT '207Q00000X',
2739   `ssi_relayhealth` varchar(64) NULL,
2740   `calendar` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 = appears in calendar',
2741   PRIMARY KEY  (`id`)
2742 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
2744 -- --------------------------------------------------------
2746 -- 
2747 -- Table structure for table `x12_partners`
2748 -- 
2750 DROP TABLE IF EXISTS `x12_partners`;
2751 CREATE TABLE `x12_partners` (
2752   `id` int(11) NOT NULL default '0',
2753   `name` varchar(255) default NULL,
2754   `id_number` varchar(255) default NULL,
2755   `x12_sender_id` varchar(255) default NULL,
2756   `x12_receiver_id` varchar(255) default NULL,
2757   `x12_version` varchar(255) default NULL,
2758   `processing_format` enum('standard','medi-cal','cms','proxymed') default NULL,
2759   `x12_isa05` char(2)     NOT NULL DEFAULT 'ZZ',
2760   `x12_isa07` char(2)     NOT NULL DEFAULT 'ZZ',
2761   `x12_isa14` char(1)     NOT NULL DEFAULT '0',
2762   `x12_isa15` char(1)     NOT NULL DEFAULT 'P',
2763   `x12_gs02`  varchar(15) NOT NULL DEFAULT '',
2764   `x12_per06` varchar(80) NOT NULL DEFAULT '',
2765   PRIMARY KEY  (`id`)
2766 ) ENGINE=MyISAM;
2768 ------------------------------------------------------------------------------------- 
2769 -- Table structure for table `automatic_notification`
2770 -- 
2772 DROP TABLE IF EXISTS `automatic_notification`;
2773 CREATE TABLE `automatic_notification` (
2774   `notification_id` int(5) NOT NULL auto_increment,
2775   `sms_gateway_type` varchar(255) NOT NULL,
2776   `next_app_date` date NOT NULL,
2777   `next_app_time` varchar(10) NOT NULL,
2778   `provider_name` varchar(100) NOT NULL,
2779   `message` text NOT NULL,
2780   `email_sender` varchar(100) NOT NULL,
2781   `email_subject` varchar(100) NOT NULL,
2782   `type` enum('SMS','Email') NOT NULL default 'SMS',
2783   `notification_sent_date` datetime NOT NULL,
2784   PRIMARY KEY  (`notification_id`)
2785 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
2787 -- 
2788 -- Dumping data for table `automatic_notification`
2789 -- 
2791 INSERT INTO `automatic_notification` (`notification_id`, `sms_gateway_type`, `next_app_date`, `next_app_time`, `provider_name`, `message`, `email_sender`, `email_subject`, `type`, `notification_sent_date`) VALUES (1, 'CLICKATELL', '0000-00-00', ':', 'EMR GROUP 1 .. SMS', 'Welcome to EMR GROUP 1.. SMS', '', '', 'SMS', '0000-00-00 00:00:00'),
2792 (2, '', '2007-10-02', '05:50', 'EMR GROUP', 'Welcome to EMR GROUP . Email', 'EMR Group', 'Welcome to EMR GROUP', 'Email', '2007-09-30 00:00:00');
2794 -- --------------------------------------------------------
2796 -- 
2797 -- Table structure for table `notification_log`
2798 -- 
2800 DROP TABLE IF EXISTS `notification_log`;
2801 CREATE TABLE `notification_log` (
2802   `iLogId` int(11) NOT NULL auto_increment,
2803   `pid` int(7) NOT NULL,
2804   `pc_eid` int(11) unsigned NULL,
2805   `sms_gateway_type` varchar(50) NOT NULL,
2806   `smsgateway_info` varchar(255) NOT NULL,
2807   `message` text NOT NULL,
2808   `email_sender` varchar(255) NOT NULL,
2809   `email_subject` varchar(255) NOT NULL,
2810   `type` enum('SMS','Email') NOT NULL,
2811   `patient_info` text NOT NULL,
2812   `pc_eventDate` date NOT NULL,
2813   `pc_endDate` date NOT NULL,
2814   `pc_startTime` time NOT NULL,
2815   `pc_endTime` time NOT NULL,
2816   `dSentDateTime` datetime NOT NULL,
2817   PRIMARY KEY  (`iLogId`)
2818 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
2820 -- --------------------------------------------------------
2822 -- 
2823 -- Table structure for table `notification_settings`
2824 -- 
2826 DROP TABLE IF EXISTS `notification_settings`;
2827 CREATE TABLE `notification_settings` (
2828   `SettingsId` int(3) NOT NULL auto_increment,
2829   `Send_SMS_Before_Hours` int(3) NOT NULL,
2830   `Send_Email_Before_Hours` int(3) NOT NULL,
2831   `SMS_gateway_username` varchar(100) NOT NULL,
2832   `SMS_gateway_password` varchar(100) NOT NULL,
2833   `SMS_gateway_apikey` varchar(100) NOT NULL,
2834   `type` varchar(50) NOT NULL,
2835   PRIMARY KEY  (`SettingsId`)
2836 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
2838 -- 
2839 -- Dumping data for table `notification_settings`
2840 -- 
2842 INSERT INTO `notification_settings` (`SettingsId`, `Send_SMS_Before_Hours`, `Send_Email_Before_Hours`, `SMS_gateway_username`, `SMS_gateway_password`, `SMS_gateway_apikey`, `type`) VALUES (1, 150, 150, 'sms username', 'sms password', 'sms api key', 'SMS/Email Settings');
2844 -- -------------------------------------------------------------------
2846 CREATE TABLE chart_tracker (
2847   ct_pid            int(11)       NOT NULL,
2848   ct_when           datetime      NOT NULL,
2849   ct_userid         bigint(20)    NOT NULL DEFAULT 0,
2850   ct_location       varchar(31)   NOT NULL DEFAULT '',
2851   PRIMARY KEY (ct_pid, ct_when)
2852 ) ENGINE=MyISAM;
2854 CREATE TABLE ar_session (
2855   session_id     int unsigned  NOT NULL AUTO_INCREMENT,
2856   payer_id       int(11)       NOT NULL            COMMENT '0=pt else references insurance_companies.id',
2857   user_id        int(11)       NOT NULL            COMMENT 'references users.id for session owner',
2858   closed         tinyint(1)    NOT NULL DEFAULT 0  COMMENT '0=no, 1=yes',
2859   reference      varchar(255)  NOT NULL DEFAULT '' COMMENT 'check or EOB number',
2860   check_date     date          DEFAULT NULL,
2861   deposit_date   date          DEFAULT NULL,
2862   pay_total      decimal(12,2) NOT NULL DEFAULT 0,
2863   PRIMARY KEY (session_id),
2864   KEY user_closed (user_id, closed),
2865   KEY deposit_date (deposit_date)
2866 ) ENGINE=MyISAM;
2868 CREATE TABLE ar_activity (
2869   pid            int(11)       NOT NULL,
2870   encounter      int(11)       NOT NULL,
2871   sequence_no    int unsigned  NOT NULL AUTO_INCREMENT,
2872   code           varchar(9)    NOT NULL            COMMENT 'empty means claim level',
2873   modifier       varchar(5)    NOT NULL DEFAULT '',
2874   payer_type     int           NOT NULL            COMMENT '0=pt, 1=ins1, 2=ins2, etc',
2875   post_time      datetime      NOT NULL,
2876   post_user      int(11)       NOT NULL            COMMENT 'references users.id',
2877   session_id     int unsigned  NOT NULL            COMMENT 'references ar_session.session_id',
2878   memo           varchar(255)  NOT NULL DEFAULT '' COMMENT 'adjustment reasons go here',
2879   pay_amount     decimal(12,2) NOT NULL DEFAULT 0  COMMENT 'either pay or adj will always be 0',
2880   adj_amount     decimal(12,2) NOT NULL DEFAULT 0,
2881   PRIMARY KEY (pid, encounter, sequence_no),
2882   KEY session_id (session_id)
2883 ) ENGINE=MyISAM;
2885 CREATE TABLE `users_facility` (
2886   `tablename` varchar(64) NOT NULL,
2887   `table_id` int(11) NOT NULL,
2888   `facility_id` int(11) NOT NULL,
2889   PRIMARY KEY (`tablename`,`table_id`,`facility_id`)
2890 ) ENGINE=InnoDB COMMENT='joins users or patient_data to facility table';
2892 CREATE TABLE `lbf_data` (
2893   `form_id`     int(11)      NOT NULL AUTO_INCREMENT COMMENT 'references forms.form_id',
2894   `field_id`    varchar(31)  NOT NULL COMMENT 'references layout_options.field_id',
2895   `field_value` varchar(255) NOT NULL,
2896   PRIMARY KEY (`form_id`,`field_id`)
2897 ) ENGINE=MyISAM COMMENT='contains all data from layout-based forms';
2899 CREATE TABLE gprelations (
2900   type1 int(2)     NOT NULL,
2901   id1   bigint(20) NOT NULL,
2902   type2 int(2)     NOT NULL,
2903   id2   bigint(20) NOT NULL,
2904   PRIMARY KEY (type1,id1,type2,id2),
2905   KEY key2  (type2,id2)
2906 ) ENGINE=MyISAM COMMENT='general purpose relations';