Modifications made for bug fixing.
[openemr.git] / sql / database.sql
blob7f2ea1562cf899c2ebd5e0aa9143a6b382e5069e
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 -- --------------------------------------------------------
29 -- Table structure for table `amc_misc_data`
32 DROP TABLE IF EXISTS `amc_misc_data`;
33 CREATE TABLE `amc_misc_data` (
34   `amc_id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Unique and maps to list_options list clinical_rules',
35   `pid` bigint(20) default NULL,
36   `map_category` varchar(255) NOT NULL default '' COMMENT 'Maps to an object category (such as prescriptions etc.)',
37   `map_id` bigint(20) NOT NULL default '0' COMMENT 'Maps to an object id (such as prescription id etc.)',
38   `date_created` datetime default NULL,
39   `date_completed` datetime default NULL,
40   KEY  (`amc_id`,`pid`,`map_id`)
41 ) ENGINE=MyISAM;
43 -- --------------------------------------------------------
45 -- 
46 -- Table structure for table `array`
47 -- 
49 DROP TABLE IF EXISTS `array`;
50 CREATE TABLE `array` (
51   `array_key` varchar(255) default NULL,
52   `array_value` longtext
53 ) ENGINE=MyISAM;
55 -- --------------------------------------------------------
58 -- Table structure for table `audit_master`
61 DROP TABLE IF EXISTS `audit_master`;
62 CREATE TABLE `audit_master` (
63   `id` bigint(20) NOT NULL AUTO_INCREMENT,
64   `pid` bigint(20) NOT NULL,
65   `user_id` bigint(20) NOT NULL COMMENT 'The Id of the user who approves or denies',
66   `approval_status` tinyint(4) NOT NULL COMMENT '1-Pending,2-Approved,3-Denied,4-Appointment directly updated to calendar table,5-Cancelled appointment',
67   `comments` text NOT NULL,
68   `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
69   `modified_time` datetime NOT NULL,
70   `ip_address` varchar(100) NOT NULL,
71   `type` tinyint(4) NOT NULL COMMENT '1-new patient,2-existing patient,3-change is only in the document,5-random key,10-Appointment',
72   PRIMARY KEY (`id`)
73 ) ENGINE=MyISAM AUTO_INCREMENT=1;
76 -- Table structure for table `audit_details`
79 DROP TABLE IF EXISTS `audit_details`;
80 CREATE TABLE `audit_details` (
81   `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
82   `table_name` VARCHAR(100) NOT NULL COMMENT 'openemr table name',
83   `field_name` VARCHAR(100) NOT NULL COMMENT 'openemr table''s field name',
84   `field_value` TEXT NOT NULL COMMENT 'openemr table''s field value',
85   `audit_master_id` BIGINT(20) NOT NULL COMMENT 'Id of the audit_master table',
86   `entry_identification` VARCHAR(255) NOT NULL DEFAULT '1' COMMENT 'Used when multiple entry occurs from the same table.1 means no multiple entry',
87   PRIMARY KEY (`id`)
88 ) ENGINE=MyISAM AUTO_INCREMENT=1;
89 -- 
90 -- Table structure for table `batchcom`
91 -- 
93 DROP TABLE IF EXISTS `batchcom`;
94 CREATE TABLE `batchcom` (
95   `id` bigint(20) NOT NULL auto_increment,
96   `patient_id` int(11) NOT NULL default '0',
97   `sent_by` bigint(20) NOT NULL default '0',
98   `msg_type` varchar(60) default NULL,
99   `msg_subject` varchar(255) default NULL,
100   `msg_text` mediumtext,
101   `msg_date_sent` datetime NOT NULL default '0000-00-00 00:00:00',
102   PRIMARY KEY  (`id`)
103 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
105 -- --------------------------------------------------------
107 -- 
108 -- Table structure for table `billing`
109 -- 
111 DROP TABLE IF EXISTS `billing`;
112 CREATE TABLE `billing` (
113   `id` int(11) NOT NULL auto_increment,
114   `date` datetime default NULL,
115   `code_type` varchar(7) default NULL,
116   `code` varchar(9) default NULL,
117   `pid` int(11) default NULL,
118   `provider_id` int(11) default NULL,
119   `user` int(11) default NULL,
120   `groupname` varchar(255) default NULL,
121   `authorized` tinyint(1) default NULL,
122   `encounter` int(11) default NULL,
123   `code_text` longtext,
124   `billed` tinyint(1) default NULL,
125   `activity` tinyint(1) default NULL,
126   `payer_id` int(11) default NULL,
127   `bill_process` tinyint(2) NOT NULL default '0',
128   `bill_date` datetime default NULL,
129   `process_date` datetime default NULL,
130   `process_file` varchar(255) default NULL,
131   `modifier` varchar(5) default NULL,
132   `units` tinyint(3) default NULL,
133   `fee` decimal(12,2) default NULL,
134   `justify` varchar(255) default NULL,
135   `target` varchar(30) default NULL,
136   `x12_partner_id` int(11) default NULL,
137   `ndc_info` varchar(255) default NULL,
138   PRIMARY KEY  (`id`),
139   KEY `pid` (`pid`)
140 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
142 -- --------------------------------------------------------
144 -- 
145 -- Table structure for table `categories`
146 -- 
148 DROP TABLE IF EXISTS `categories`;
149 CREATE TABLE `categories` (
150   `id` int(11) NOT NULL default '0',
151   `name` varchar(255) default NULL,
152   `value` varchar(255) default NULL,
153   `parent` int(11) NOT NULL default '0',
154   `lft` int(11) NOT NULL default '0',
155   `rght` int(11) NOT NULL default '0',
156   PRIMARY KEY  (`id`),
157   KEY `parent` (`parent`),
158   KEY `lft` (`lft`,`rght`)
159 ) ENGINE=MyISAM;
161 -- 
162 -- Dumping data for table `categories`
163 -- 
165 INSERT INTO `categories` VALUES (1, 'Categories', '', 0, 0, 23);
166 INSERT INTO `categories` VALUES (2, 'Lab Report', '', 1, 1, 2);
167 INSERT INTO `categories` VALUES (3, 'Medical Record', '', 1, 3, 4);
168 INSERT INTO `categories` VALUES (4, 'Patient Information', '', 1, 5, 10);
169 INSERT INTO `categories` VALUES (5, 'Patient ID card', '', 4, 6, 7);
170 INSERT INTO `categories` VALUES (6, 'Advance Directive', '', 1, 11, 18);
171 INSERT INTO `categories` VALUES (7, 'Do Not Resuscitate Order', '', 6, 12, 13);
172 INSERT INTO `categories` VALUES (8, 'Durable Power of Attorney', '', 6, 14, 15);
173 INSERT INTO `categories` VALUES (9, 'Living Will', '', 6, 16, 17);
174 INSERT INTO `categories` VALUES (10, 'Patient Photograph', '', 4, 8, 9);
175 INSERT INTO `categories` VALUES (11, 'CCR', '', 1, 19, 20);
176 INSERT INTO `categories` VALUES (12, 'CCD', '', 1, 21, 22);
178 -- --------------------------------------------------------
180 -- 
181 -- Table structure for table `categories_seq`
182 -- 
184 DROP TABLE IF EXISTS `categories_seq`;
185 CREATE TABLE `categories_seq` (
186   `id` int(11) NOT NULL default '0',
187   PRIMARY KEY  (`id`)
188 ) ENGINE=MyISAM;
190 -- 
191 -- Dumping data for table `categories_seq`
192 -- 
194 INSERT INTO `categories_seq` VALUES (12);
196 -- --------------------------------------------------------
198 -- 
199 -- Table structure for table `categories_to_documents`
200 -- 
202 DROP TABLE IF EXISTS `categories_to_documents`;
203 CREATE TABLE `categories_to_documents` (
204   `category_id` int(11) NOT NULL default '0',
205   `document_id` int(11) NOT NULL default '0',
206   PRIMARY KEY  (`category_id`,`document_id`)
207 ) ENGINE=MyISAM;
209 -- --------------------------------------------------------
211 -- 
212 -- Table structure for table `claims`
213 -- 
215 DROP TABLE IF EXISTS `claims`;
216 CREATE TABLE `claims` (
217   `patient_id` int(11) NOT NULL,
218   `encounter_id` int(11) NOT NULL,
219   `version` int(10) unsigned NOT NULL auto_increment,
220   `payer_id` int(11) NOT NULL default '0',
221   `status` tinyint(2) NOT NULL default '0',
222   `payer_type` tinyint(4) NOT NULL default '0',
223   `bill_process` tinyint(2) NOT NULL default '0',
224   `bill_time` datetime default NULL,
225   `process_time` datetime default NULL,
226   `process_file` varchar(255) default NULL,
227   `target` varchar(30) default NULL,
228   `x12_partner_id` int(11) NOT NULL default '0',
229   PRIMARY KEY  (`patient_id`,`encounter_id`,`version`)
230 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
232 -- --------------------------------------------------------
235 -- Table structure for table `clinical_plans`
238 DROP TABLE IF EXISTS `clinical_plans`;
239 CREATE TABLE `clinical_plans` (
240   `id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Unique and maps to list_options list clinical_plans',
241   `pid` bigint(20) NOT NULL DEFAULT '0' COMMENT '0 is default for all patients, while > 0 is id from patient_data table',
242   `normal_flag` tinyint(1) COMMENT 'Normal Activation Flag',
243   `cqm_flag` tinyint(1) COMMENT 'Clinical Quality Measure flag (unable to customize per patient)',
244   `cqm_measure_group` varchar(10) NOT NULL default '' COMMENT 'Clinical Quality Measure Group Identifier',
245   PRIMARY KEY  (`id`,`pid`)
246 ) ENGINE=MyISAM ;
249 -- Clinical Quality Measure (CMQ) plans
251 -- Measure Group A: Diabetes Mellitus
252 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('dm_plan_cqm', 0, 0, 1, 'A');
253 -- Measure Group C: Chronic Kidney Disease (CKD)
254 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('ckd_plan_cqm', 0, 0, 1, 'C');
255 -- Measure Group D: Preventative Care
256 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('prevent_plan_cqm', 0, 0, 1, 'D');
257 -- Measure Group E: Perioperative Care
258 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('periop_plan_cqm', 0, 0, 1, 'E');
259 -- Measure Group F: Rheumatoid Arthritis
260 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('rheum_arth_plan_cqm', 0, 0, 1, 'F');
261 -- Measure Group G: Back Pain
262 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('back_pain_plan_cqm', 0, 0, 1, 'G');
263 -- Measure Group H: Coronary Artery Bypass Graft (CABG)
264 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('cabg_plan_cqm', 0, 0, 1, 'H');
266 -- Standard clinical plans
268 -- Diabetes Mellitus
269 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('dm_plan', 0, 1, 0, '');
270 INSERT INTO `clinical_plans` ( `id`, `pid`, `normal_flag`, `cqm_flag`, `cqm_measure_group` ) VALUES ('prevent_plan', 0, 1, 0, '');
272 -- --------------------------------------------------------
275 -- Table structure for table `clinical_plans_rules`
278 DROP TABLE IF EXISTS `clinical_plans_rules`;
279 CREATE TABLE `clinical_plans_rules` (
280   `plan_id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Unique and maps to list_options list clinical_plans',
281   `rule_id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Unique and maps to list_options list clinical_rules',
282   PRIMARY KEY  (`plan_id`,`rule_id`)
283 ) ENGINE=MyISAM ;
286 -- Clinical Quality Measure (CMQ) plans to rules mappings
288 -- Measure Group A: Diabetes Mellitus
289 --   NQF 0059 (PQRI 1)   Diabetes: HbA1c Poor Control
290 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan_cqm', 'rule_dm_a1c_cqm');
291 --   NQF 0064 (PQRI 2)   Diabetes: LDL Management & Control
292 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan_cqm', 'rule_dm_ldl_cqm');
293 --   NQF 0061 (PQRI 3)   Diabetes: Blood Pressure Management
294 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan_cqm', 'rule_dm_bp_control_cqm');
295 --   NQF 0055 (PQRI 117) Diabetes: Eye Exam
296 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan_cqm', 'rule_dm_eye_cqm');
297 --   NQF 0056 (PQRI 163) Diabetes: Foot Exam
298 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan_cqm', 'rule_dm_foot_cqm');
299 -- Measure Group D: Preventative Care
300 --   NQF 0041 (PQRI 110) Influenza Immunization for Patients >= 50 Years Old
301 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan_cqm', 'rule_influenza_ge_50_cqm');
302 --   NQF 0043 (PQRI 111) Pneumonia Vaccination Status for Older Adults
303 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan_cqm', 'rule_pneumovacc_ge_65_cqm');
304 --   NQF 0421 (PQRI 128) Adult Weight Screening and Follow-Up
305 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan_cqm', 'rule_adult_wt_screen_fu_cqm');
307 -- Standard clinical plans to rules mappings
309 -- Diabetes Mellitus
310 --   Hemoglobin A1C
311 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan', 'rule_dm_hemo_a1c');
312 --   Urine Microalbumin
313 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan', 'rule_dm_urine_alb');
314 --   Eye Exam
315 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan', 'rule_dm_eye');
316 --   Foot Exam
317 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('dm_plan', 'rule_dm_foot');
318 -- Preventative Care
319 --   Hypertension: Blood Pressure Measurement
320 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_htn_bp_measure');
321 --   Tobacco Use Assessment
322 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_tob_use_assess');
323 --   Tobacco Cessation Intervention
324 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_tob_cess_inter');
325 --   Adult Weight Screening and Follow-Up
326 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_adult_wt_screen_fu');
327 --   Weight Assessment and Counseling for Children and Adolescents
328 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_wt_assess_couns_child');
329 --   Influenza Immunization for Patients >= 50 Years Old
330 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_influenza_ge_50');
331 --   Pneumonia Vaccination Status for Older Adults
332 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_pneumovacc_ge_65');
333 --   Cancer Screening: Mammogram
334 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_cs_mammo');
335 --   Cancer Screening: Pap Smear
336 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_cs_pap');
337 --   Cancer Screening: Colon Cancer Screening
338 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_cs_colon');
339 --   Cancer Screening: Prostate Cancer Screening
340 INSERT INTO `clinical_plans_rules` ( `plan_id`, `rule_id` ) VALUES ('prevent_plan', 'rule_cs_prostate');
342 -- --------------------------------------------------------
345 -- Table structure for table `clinical_rules`
348 DROP TABLE IF EXISTS `clinical_rules`;
349 CREATE TABLE `clinical_rules` (
350   `id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Unique and maps to list_options list clinical_rules',
351   `pid` bigint(20) NOT NULL DEFAULT '0' COMMENT '0 is default for all patients, while > 0 is id from patient_data table',
352   `active_alert_flag` tinyint(1) COMMENT 'Active Alert Widget Module flag - note not yet utilized',
353   `passive_alert_flag` tinyint(1) COMMENT 'Passive Alert Widget Module flag',
354   `cqm_flag` tinyint(1) COMMENT 'Clinical Quality Measure flag (unable to customize per patient)',
355   `cqm_nqf_code` varchar(10) NOT NULL default '' COMMENT 'Clinical Quality Measure NQF identifier',
356   `cqm_pqri_code` varchar(10) NOT NULL default '' COMMENT 'Clinical Quality Measure PQRI identifier',
357   `amc_flag` tinyint(1) COMMENT 'Automated Measure Calculation flag (unable to customize per patient)',
358   `amc_code` varchar(10) NOT NULL default '' COMMENT 'Automated Measure Calculation indentifier (MU rule)',
359   `patient_reminder_flag` tinyint(1) COMMENT 'Clinical Reminder Module flag',
360   PRIMARY KEY  (`id`,`pid`)
361 ) ENGINE=MyISAM ;
364 -- Automated Measure Calculation (AMC) rules
366 -- MU 170.302(c) Maintain an up-to-date problem list of current and active diagnoses
367 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('problem_list_amc', 0, 0, 0, 0, '', '', 1, '170.302(c)', 0);
368 -- MU 170.302(d) Maintain active medication list
369 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('med_list_amc', 0, 0, 0, 0, '', '', 1, '170.302(d)', 0);
370 -- MU 170.302(e) Maintain active medication allergy list
371 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('med_allergy_list_amc', 0, 0, 0, 0, '', '', 1, '170.302(e)', 0);
372 -- MU 170.302(f) Record and chart changes in vital signs
373 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('record_vitals_amc', 0, 0, 0, 0, '', '', 1, '170.302(f)', 0);
374 -- MU 170.302(g) Record smoking status for patients 13 years old or older
375 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('record_smoke_amc', 0, 0, 0, 0, '', '', 1, '170.302(g)', 0);
376 -- MU 170.302(h) Incorporate clinical lab-test results into certified EHR technology as
377 --               structured data
378 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('lab_result_amc', 0, 0, 0, 0, '', '', 1, '170.302(h)', 0);
379 -- MU 170.302(j) The EP, eligible hospital or CAH who receives a patient from another
380 --               setting of care or provider of care or believes an encounter is relevant
381 --               should perform medication reconciliation
382 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('med_reconc_amc', 0, 0, 0, 0, '', '', 1, '170.302(j)', 0);
383 -- MU 170.302(m) Use certified EHR technology to identify patient-specific education resources
384 --              and provide those resources to the patient if appropriate
385 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('patient_edu_amc', 0, 0, 0, 0, '', '', 1, '170.302(m)', 0);
386 -- MU 170.304(a) Use CPOE for medication orders directly entered by any licensed healthcare
387 --              professional who can enter orders into the medical record per state, local
388 --              and professional guidelines
389 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('cpoe_med_amc', 0, 0, 0, 0, '', '', 1, '170.304(a)', 0);
390 -- MU 170.304(b) Generate and transmit permissible prescriptions electronically (eRx)
391 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('e_prescribe_amc', 0, 0, 0, 0, '', '', 1, '170.304(b)', 0);
392 -- MU 170.304(c) Record demographics
393 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('record_dem_amc', 0, 0, 0, 0, '', '', 1, '170.304(c)', 0);
394 -- MU 170.304(d) Send reminders to patients per patient preference for preventive/follow up care
395 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('send_reminder_amc', 0, 0, 0, 0, '', '', 1, '170.304(d)', 0);
396 -- MU 170.304(f) Provide patients with an electronic copy of their health information
397 --               (including diagnostic test results, problem list, medication lists,
398 --               medication allergies), upon request
399 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('provide_rec_pat_amc', 0, 0, 0, 0, '', '', 1, '170.304(f)', 0);
400 -- MU 170.304(g) Provide patients with timely electronic access to their health information
401 --              (including lab results, problem list, medication lists, medication allergies)
402 --              within four business days of the information being available to the EP
403 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('timely_access_amc', 0, 0, 0, 0, '', '', 1, '170.304(g)', 0);
404 -- MU 170.304(h) Provide clinical summaries for patients for each office visit
405 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('provide_sum_pat_amc', 0, 0, 0, 0, '', '', 1, '170.304(h)', 0);
406 -- MU 170.304(i) The EP, eligible hospital or CAH who transitions their patient to
407 --               another setting of care or provider of care or refers their patient to
408 --               another provider of care should provide summary of care record for
409 --               each transition of care or referral
410 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('send_sum_amc', 0, 0, 0, 0, '', '', 1, '170.304(i)', 0);
412 -- Clinical Quality Measure (CQM) rules
414 -- NQF 0013 Hypertension: Blood Pressure Measurement
415 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_htn_bp_measure_cqm', 0, 0, 0, 1, '0013', '', 0, '', 0);
416 -- NQF 0028a Tobacco Use Assessment
417 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_tob_use_assess_cqm', 0, 0, 0, 1, '0028a', '', 0, '', 0);
418 -- NQF 0028b Tobacco Cessation Intervention
419 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_tob_cess_inter_cqm', 0, 0, 0, 1, '0028b', '', 0, '', 0);
420 -- NQF 0421 (PQRI 128) Adult Weight Screening and Follow-Up
421 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_adult_wt_screen_fu_cqm', 0, 0, 0, 1, '0421', '128', 0, '', 0);
422 -- NQF 0024 Weight Assessment and Counseling for Children and Adolescents
423 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_wt_assess_couns_child_cqm', 0, 0, 0, 1, '0024', '', 0, '', 0);
424 -- NQF 0041 (PQRI 110) Influenza Immunization for Patients >= 50 Years Old
425 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_influenza_ge_50_cqm', 0, 0, 0, 1, '0041', '110', 0, '', 0);
426 -- NQF 0038 Childhood immunization Status
427 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_child_immun_stat_cqm', 0, 0, 0, 1, '0038', '', 0, '', 0);
428 -- NQF 0043 (PQRI 111) Pneumonia Vaccination Status for Older Adults
429 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_pneumovacc_ge_65_cqm', 0, 0, 0, 1, '0043', '111', 0, '', 0);
430 -- NQF 0055 (PQRI 117) Diabetes: Eye Exam
431 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_eye_cqm', 0, 0, 0, 1, '0055', '117', 0, '', 0);
432 -- NQF 0056 (PQRI 163) Diabetes: Foot Exam
433 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_foot_cqm', 0, 0, 0, 1, '0056', '163', 0, '', 0);
434 -- NQF 0059 (PQRI 1) Diabetes: HbA1c Poor Control
435 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_a1c_cqm', 0, 0, 0, 1, '0059', '1', 0, '', 0);
436 -- NQF 0061 (PQRI 3) Diabetes: Blood Pressure Management
437 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_bp_control_cqm', 0, 0, 0, 1, '0061', '3', 0, '', 0);
438 -- NQF 0064 (PQRI 2) Diabetes: LDL Management & Control
439 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_ldl_cqm', 0, 0, 0, 1, '0064', '2', 0, '', 0);
441 -- Standard clinical rules
443 -- Hypertension: Blood Pressure Measurement
444 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_htn_bp_measure', 0, 0, 1, 0, '', '', 0, '', 0);
445 -- Tobacco Use Assessment
446 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_tob_use_assess', 0, 0, 1, 0, '', '', 0, '', 0);
447 -- Tobacco Cessation Intervention
448 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_tob_cess_inter', 0, 0, 1, 0, '', '', 0, '', 0);
449 -- Adult Weight Screening and Follow-Up
450 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_adult_wt_screen_fu', 0, 0, 1, 0, '', '', 0, '', 0);
451 -- Weight Assessment and Counseling for Children and Adolescents
452 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_wt_assess_couns_child', 0, 0, 1, 0, '', '', 0, '', 0);
453 -- Influenza Immunization for Patients >= 50 Years Old
454 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_influenza_ge_50', 0, 0, 1, 0, '', '', 0, '', 0);
455 -- Pneumonia Vaccination Status for Older Adults
456 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_pneumovacc_ge_65', 0, 0, 1, 0, '', '', 0, '', 0);
457 -- Diabetes: Hemoglobin A1C
458 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_hemo_a1c', 0, 0, 1, 0, '', '', 0, '', 0);
459 -- Diabetes: Urine Microalbumin
460 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_urine_alb', 0, 0, 1, 0, '', '', 0, '', 0);
461 -- Diabetes: Eye Exam
462 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_eye', 0, 0, 1, 0, '', '', 0, '', 0);
463 -- Diabetes: Foot Exam
464 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_foot', 0, 0, 1, 0, '', '', 0, '', 0);
465 -- Cancer Screening: Mammogram
466 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_cs_mammo', 0, 0, 1, 0, '', '', 0, '', 0);
467 -- Cancer Screening: Pap Smear
468 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_cs_pap', 0, 0, 1, 0, '', '', 0, '', 0);
469 -- Cancer Screening: Colon Cancer Screening
470 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_cs_colon', 0, 0, 1, 0, '', '', 0, '', 0);
471 -- Cancer Screening: Prostate Cancer Screening
472 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_cs_prostate', 0, 0, 1, 0, '', '', 0, '', 0);
474 -- Rules to specifically demonstrate passing of NIST criteria
476 -- Coumadin Management - INR Monitoring
477 INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_inr_monitor', 0, 0, 1, 0, '', '', 0, '', 0);
479 -- --------------------------------------------------------
481 -- 
482 -- Table structure for table `codes`
483 -- 
485 DROP TABLE IF EXISTS `codes`;
486 CREATE TABLE `codes` (
487   `id` int(11) NOT NULL auto_increment,
488   `code_text` varchar(255) NOT NULL default '',
489   `code_text_short` varchar(24) NOT NULL default '',
490   `code` varchar(10) NOT NULL default '',
491   `code_type` tinyint(2) default NULL,
492   `modifier` varchar(5) NOT NULL default '',
493   `units` tinyint(3) default NULL,
494   `fee` decimal(12,2) default NULL,
495   `superbill` varchar(31) NOT NULL default '',
496   `related_code` varchar(255) NOT NULL default '',
497   `taxrates` varchar(255) NOT NULL default '',
498   `cyp_factor` float NOT NULL DEFAULT 0 COMMENT 'quantity representing a years supply',
499   `active` TINYINT(1) DEFAULT 1 COMMENT '0 = inactive, 1 = active',
500   `reportable` TINYINT(1) DEFAULT 0 COMMENT '0 = non-reportable, 1 = reportable',
501   PRIMARY KEY  (`id`),
502   KEY `code` (`code`)
503 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
504 -- --------------------------------------------------------
506 -- 
507 -- Table structure for table `syndromic_surveillance`
508 -- 
510 DROP TABLE IF EXISTS `syndromic_surveillance`;
511 CREATE TABLE `syndromic_surveillance` (
512   `id` bigint(20) NOT NULL auto_increment,
513   `lists_id` bigint(20) NOT NULL,
514   `submission_date` datetime NOT NULL,
515   `filename` varchar(255) NOT NULL default '',
516   PRIMARY KEY  (`id`),
517   KEY (`lists_id`)
518 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
520 -- --------------------------------------------------------
522 -- 
523 -- Table structure for table `config`
524 -- 
526 DROP TABLE IF EXISTS `config`;
527 CREATE TABLE `config` (
528   `id` int(11) NOT NULL default '0',
529   `name` varchar(255) default NULL,
530   `value` varchar(255) default NULL,
531   `parent` int(11) NOT NULL default '0',
532   `lft` int(11) NOT NULL default '0',
533   `rght` int(11) NOT NULL default '0',
534   PRIMARY KEY  (`id`),
535   KEY `parent` (`parent`),
536   KEY `lft` (`lft`,`rght`)
537 ) ENGINE=MyISAM;
539 -- --------------------------------------------------------
541 -- 
542 -- Table structure for table `config_seq`
543 -- 
545 DROP TABLE IF EXISTS `config_seq`;
546 CREATE TABLE `config_seq` (
547   `id` int(11) NOT NULL default '0',
548   PRIMARY KEY  (`id`)
549 ) ENGINE=MyISAM;
551 -- 
552 -- Dumping data for table `config_seq`
553 -- 
555 INSERT INTO `config_seq` VALUES (0);
557 -- --------------------------------------------------------
559 -- 
560 -- Table structure for table `documents`
561 -- 
563 DROP TABLE IF EXISTS `documents`;
564 CREATE TABLE `documents` (
565   `id` int(11) NOT NULL default '0',
566   `type` enum('file_url','blob','web_url') default NULL,
567   `size` int(11) default NULL,
568   `date` datetime default NULL,
569   `url` varchar(255) default NULL,
570   `mimetype` varchar(255) default NULL,
571   `pages` int(11) default NULL,
572   `owner` int(11) default NULL,
573   `revision` timestamp NOT NULL,
574   `foreign_id` int(11) default NULL,
575   `docdate` date default NULL,
576   `hash` varchar(40) DEFAULT NULL COMMENT '40-character SHA-1 hash of document',
577   `list_id` bigint(20) NOT NULL default '0',
578   PRIMARY KEY  (`id`),
579   KEY `revision` (`revision`),
580   KEY `foreign_id` (`foreign_id`),
581   KEY `owner` (`owner`)
582 ) ENGINE=MyISAM;
584 -- --------------------------------------------------------
587 -- Table structure for table `documents_legal_detail`
590 DROP TABLE IF EXISTS `documents_legal_detail`;
591 CREATE TABLE `documents_legal_detail` (
592   `dld_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
593   `dld_pid` int(10) unsigned DEFAULT NULL,
594   `dld_facility` int(10) unsigned DEFAULT NULL,
595   `dld_provider` int(10) unsigned DEFAULT NULL,
596   `dld_encounter` int(10) unsigned DEFAULT NULL,
597   `dld_master_docid` int(10) unsigned NOT NULL,
598   `dld_signed` smallint(5) unsigned NOT NULL COMMENT '0-Not Signed or Cannot Sign(Layout),1-Signed,2-Ready to sign,3-Denied(Pat Regi),10-Save(Layout)',
599   `dld_signed_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
600   `dld_filepath` varchar(75) DEFAULT NULL,
601   `dld_filename` varchar(45) NOT NULL,
602   `dld_signing_person` varchar(50) NOT NULL,
603   `dld_sign_level` int(11) NOT NULL COMMENT 'Sign flow level',
604   `dld_content` varchar(50) NOT NULL COMMENT 'Layout sign position',
605   `dld_file_for_pdf_generation` blob NOT NULL COMMENT 'The filled details in the fdf file is stored here.Patient Registration Screen',
606   `dld_denial_reason` longtext NOT NULL,
607   PRIMARY KEY (`dld_id`)
608 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
610 -- --------------------------------------------------------
613 -- Table structure for table `documents_legal_master`
616 DROP TABLE IF EXISTS `documents_legal_master`;
617 CREATE TABLE `documents_legal_master` (
618   `dlm_category` int(10) unsigned DEFAULT NULL,
619   `dlm_subcategory` int(10) unsigned DEFAULT NULL,
620   `dlm_document_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
621   `dlm_document_name` varchar(75) NOT NULL,
622   `dlm_filepath` varchar(75) NOT NULL,
623   `dlm_facility` int(10) unsigned DEFAULT NULL,
624   `dlm_provider` int(10) unsigned DEFAULT NULL,
625   `dlm_sign_height` double NOT NULL,
626   `dlm_sign_width` double NOT NULL,
627   `dlm_filename` varchar(45) NOT NULL,
628   `dlm_effective_date` datetime NOT NULL,
629   `dlm_version` int(10) unsigned NOT NULL,
630   `content` varchar(255) NOT NULL,
631   `dlm_savedsign` varchar(255) DEFAULT NULL COMMENT '0-Yes 1-No',
632   `dlm_review` varchar(255) DEFAULT NULL COMMENT '0-Yes 1-No',
633   PRIMARY KEY (`dlm_document_id`)
634 ) ENGINE=MyISAM COMMENT='List of Master Docs to be signed' AUTO_INCREMENT=1 ;
636 -- --------------------------------------------------------
639 -- Table structure for table `documents_legal_categories`
642 DROP TABLE IF EXISTS `documents_legal_categories`;
643 CREATE TABLE `documents_legal_categories` (
644   `dlc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
645   `dlc_category_type` int(10) unsigned NOT NULL COMMENT '1 category 2 subcategory',
646   `dlc_category_name` varchar(45) NOT NULL,
647   `dlc_category_parent` int(10) unsigned DEFAULT NULL,
648   PRIMARY KEY (`dlc_id`)
649 ) ENGINE=MyISAM AUTO_INCREMENT=7 ;
652 -- Dumping data for table `documents_legal_categories`
655 INSERT INTO `documents_legal_categories` (`dlc_id`, `dlc_category_type`, `dlc_category_name`, `dlc_category_parent`) VALUES
656 (3, 1, 'Category', NULL),
657 (4, 2, 'Sub Category', 1),
658 (5, 1, 'Layout Form', 0),
659 (6, 2, 'Layout Signed', 5);
661 -- 
662 -- Table structure for table `drug_inventory`
663 -- 
665 DROP TABLE IF EXISTS `drug_inventory`;
666 CREATE TABLE `drug_inventory` (
667   `inventory_id` int(11) NOT NULL auto_increment,
668   `drug_id` int(11) NOT NULL,
669   `lot_number` varchar(20) default NULL,
670   `expiration` date default NULL,
671   `manufacturer` varchar(255) default NULL,
672   `on_hand` int(11) NOT NULL default '0',
673   `warehouse_id` varchar(31) NOT NULL DEFAULT '',
674   `vendor_id` bigint(20) NOT NULL DEFAULT 0,
675   `last_notify` date NOT NULL default '0000-00-00',
676   `destroy_date` date default NULL,
677   `destroy_method` varchar(255) default NULL,
678   `destroy_witness` varchar(255) default NULL,
679   `destroy_notes` varchar(255) default NULL,
680   PRIMARY KEY  (`inventory_id`)
681 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
683 -- --------------------------------------------------------
685 -- 
686 -- Table structure for table `drug_sales`
687 -- 
689 DROP TABLE IF EXISTS `drug_sales`;
690 CREATE TABLE `drug_sales` (
691   `sale_id` int(11) NOT NULL auto_increment,
692   `drug_id` int(11) NOT NULL,
693   `inventory_id` int(11) NOT NULL,
694   `prescription_id` int(11) NOT NULL default '0',
695   `pid` int(11) NOT NULL default '0',
696   `encounter` int(11) NOT NULL default '0',
697   `user` varchar(255) default NULL,
698   `sale_date` date NOT NULL,
699   `quantity` int(11) NOT NULL default '0',
700   `fee` decimal(12,2) NOT NULL default '0.00',
701   `billed` tinyint(1) NOT NULL default '0' COMMENT 'indicates if the sale is posted to accounting',
702   `xfer_inventory_id` int(11) NOT NULL DEFAULT 0,
703   `distributor_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'references users.id',
704   `notes` varchar(255) NOT NULL DEFAULT '',
705   PRIMARY KEY  (`sale_id`)
706 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
708 -- --------------------------------------------------------
710 -- 
711 -- Table structure for table `drug_templates`
712 -- 
714 DROP TABLE IF EXISTS `drug_templates`;
715 CREATE TABLE `drug_templates` (
716   `drug_id` int(11) NOT NULL,
717   `selector` varchar(255) NOT NULL default '',
718   `dosage` varchar(10) default NULL,
719   `period` int(11) NOT NULL default '0',
720   `quantity` int(11) NOT NULL default '0',
721   `refills` int(11) NOT NULL default '0',
722   `taxrates` varchar(255) default NULL,
723   PRIMARY KEY  (`drug_id`,`selector`)
724 ) ENGINE=MyISAM;
726 -- --------------------------------------------------------
728 -- 
729 -- Table structure for table `drugs`
730 -- 
732 DROP TABLE IF EXISTS `drugs`;
733 CREATE TABLE `drugs` (
734   `drug_id` int(11) NOT NULL auto_increment,
735   `name` varchar(255) NOT NULL DEFAULT '',
736   `ndc_number` varchar(20) NOT NULL DEFAULT '',
737   `on_order` int(11) NOT NULL default '0',
738   `reorder_point` int(11) NOT NULL default '0',
739   `last_notify` date NOT NULL default '0000-00-00',
740   `reactions` text,
741   `form` int(3) NOT NULL default '0',
742   `size` float unsigned NOT NULL default '0',
743   `unit` int(11) NOT NULL default '0',
744   `route` int(11) NOT NULL default '0',
745   `substitute` int(11) NOT NULL default '0',
746   `related_code` varchar(255) NOT NULL DEFAULT '' COMMENT 'may reference a related codes.code',
747   `cyp_factor` float NOT NULL DEFAULT 0 COMMENT 'quantity representing a years supply',
748   `active` TINYINT(1) DEFAULT 1 COMMENT '0 = inactive, 1 = active',
749   `allow_combining` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 = allow filling an order from multiple lots',
750   `allow_multiple`  tinyint(1) NOT NULL DEFAULT 1 COMMENT '1 = allow multiple lots at one warehouse',
751   PRIMARY KEY  (`drug_id`)
752 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
754 -- --------------------------------------------------------
757 -- Table structure for table `eligibility_response`
760 DROP TABLE IF EXISTS `eligibility_response`;
761 CREATE TABLE `eligibility_response` (
762   `response_id` bigint(20) NOT NULL auto_increment,
763   `response_description` varchar(255) default NULL,
764   `response_status` enum('A','D') NOT NULL default 'A',
765   `response_vendor_id` bigint(20) default NULL,
766   `response_create_date` date default NULL,
767   `response_modify_date` date default NULL,
768   PRIMARY KEY  (`response_id`)
769 ) ENGINE=MyISAM AUTO_INCREMENT=1;
771 -- --------------------------------------------------------
774 -- Table structure for table `eligibility_verification`
777 DROP TABLE IF EXISTS `eligibility_verification`;
778 CREATE TABLE `eligibility_verification` (
779   `verification_id` bigint(20) NOT NULL auto_increment,
780   `response_id` bigint(20) default NULL,
781   `insurance_id` bigint(20) default NULL,
782   `eligibility_check_date` datetime default NULL,
783   `copay` int(11) default NULL,
784   `deductible` int(11) default NULL,
785   `deductiblemet` enum('Y','N') default 'Y',
786   `create_date` date default NULL,
787   PRIMARY KEY  (`verification_id`),
788   KEY `insurance_id` (`insurance_id`)
789 ) ENGINE=MyISAM AUTO_INCREMENT=1;
791 -- --------------------------------------------------------
793 -- 
794 -- Table structure for table `employer_data`
795 -- 
797 DROP TABLE IF EXISTS `employer_data`;
798 CREATE TABLE `employer_data` (
799   `id` bigint(20) NOT NULL auto_increment,
800   `name` varchar(255) default NULL,
801   `street` varchar(255) default NULL,
802   `postal_code` varchar(255) default NULL,
803   `city` varchar(255) default NULL,
804   `state` varchar(255) default NULL,
805   `country` varchar(255) default NULL,
806   `date` datetime default NULL,
807   `pid` bigint(20) NOT NULL default '0',
808   PRIMARY KEY  (`id`),
809   KEY `pid` (`pid`)
810 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
812 -- --------------------------------------------------------
815 -- Table structure for table `enc_category_map`
817 -- Mapping of rule encounter categories to category ids from the event category in openemr_postcalendar_categories
820 DROP TABLE IF EXISTS `enc_category_map`;
821 CREATE TABLE `enc_category_map` (
822   `rule_enc_id` varchar(31) NOT NULL DEFAULT '' COMMENT 'encounter id from rule_enc_types list in list_options',
823   `main_cat_id` int(11) NOT NULL DEFAULT 0 COMMENT 'category id from event category in openemr_postcalendar_categories',
824   KEY  (`rule_enc_id`,`main_cat_id`)
825 ) ENGINE=MyISAM ;
827 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_outpatient', 5);
828 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_outpatient', 9);
829 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_outpatient', 10);
830 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nurs_fac', 5);
831 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nurs_fac', 9);
832 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nurs_fac', 10);
833 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_off_vis', 5);
834 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_off_vis', 9);
835 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_off_vis', 10);
836 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_hea_and_beh', 5);
837 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_hea_and_beh', 9);
838 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_hea_and_beh', 10);
839 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_occ_ther', 5);
840 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_occ_ther', 9);
841 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_occ_ther', 10);
842 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_psych_and_psych', 5);
843 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_psych_and_psych', 9);
844 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_psych_and_psych', 10);
845 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_ser_18_older', 5);
846 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_ser_18_older', 9);
847 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_ser_18_older', 10);
848 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_ser_40_older', 5);
849 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_ser_40_older', 9);
850 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_ser_40_older', 10);
851 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_ind_counsel', 5);
852 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_ind_counsel', 9);
853 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_ind_counsel', 10);
854 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_group_counsel', 5);
855 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_group_counsel', 9);
856 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_group_counsel', 10);
857 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_other_serv', 5);
858 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_other_serv', 9);
859 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pre_med_other_serv', 10);
860 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_out_pcp_obgyn', 5);
861 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_out_pcp_obgyn', 9);
862 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_out_pcp_obgyn', 10);
863 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pregnancy', 5);
864 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pregnancy', 9);
865 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_pregnancy', 10);
866 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nurs_discharge', 5);
867 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nurs_discharge', 9);
868 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nurs_discharge', 10);
869 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_acute_inp_or_ed', 5);
870 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_acute_inp_or_ed', 9);
871 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_acute_inp_or_ed', 10);
872 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nonac_inp_out_or_opth', 5);
873 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nonac_inp_out_or_opth', 9);
874 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_nonac_inp_out_or_opth', 10);
875 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_influenza', 5);
876 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_influenza', 9);
877 INSERT INTO `enc_category_map` ( `rule_enc_id`, `main_cat_id` ) VALUES ('enc_influenza', 10);
879 -- --------------------------------------------------------
882 -- Table structure for table `standardized_tables_track`
885 DROP TABLE IF EXISTS `standardized_tables_track`;
886 CREATE TABLE `standardized_tables_track` (
887   `id` int(11) NOT NULL auto_increment,
888   `imported_date` datetime default NULL,
889   `name` varchar(255) NOT NULL default '' COMMENT 'name of standardized tables such as RXNORM',
890   `revision_version` varchar(255) NOT NULL default '' COMMENT 'revision of standardized tables that were imported',
891   `revision_date` datetime default NULL COMMENT 'revision of standardized tables that were imported',
892   PRIMARY KEY  (`id`)
893 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
895 -- --------------------------------------------------------
897 -- 
898 -- Table structure for table `facility`
899 -- 
901 DROP TABLE IF EXISTS `facility`;
902 CREATE TABLE `facility` (
903   `id` int(11) NOT NULL auto_increment,
904   `name` varchar(255) default NULL,
905   `phone` varchar(30) default NULL,
906   `fax` varchar(30) default NULL,
907   `street` varchar(255) default NULL,
908   `city` varchar(255) default NULL,
909   `state` varchar(50) default NULL,
910   `postal_code` varchar(11) default NULL,
911   `country_code` varchar(10) default NULL,
912   `federal_ein` varchar(15) default NULL,
913   `service_location` tinyint(1) NOT NULL default '1',
914   `billing_location` tinyint(1) NOT NULL default '0',
915   `accepts_assignment` tinyint(1) NOT NULL default '0',
916   `pos_code` tinyint(4) default NULL,
917   `x12_sender_id` varchar(25) default NULL,
918   `attn` varchar(65) default NULL,
919   `domain_identifier` varchar(60) default NULL,
920   `facility_npi` varchar(15) default NULL,
921   `tax_id_type` VARCHAR(31) NOT NULL DEFAULT '',
922   `color` VARCHAR(7) NOT NULL DEFAULT '',
923   `primary_business_entity` INT(10) NOT NULL DEFAULT '0' COMMENT '0-Not Set as business entity 1-Set as business entity',
924   PRIMARY KEY  (`id`)
925 ) ENGINE=MyISAM AUTO_INCREMENT=4 ;
927 -- 
928 -- Dumping data for table `facility`
929 -- 
931 INSERT INTO `facility` VALUES (3, 'Your Clinic Name Here', '000-000-0000', '000-000-0000', '', '', '', '', '', '', 1, 1, 0, NULL, '', '', '', '', '','#99FFFF','0');
933 -- --------------------------------------------------------
935 -- 
936 -- Table structure for table `fee_sheet_options`
937 -- 
939 DROP TABLE IF EXISTS `fee_sheet_options`;
940 CREATE TABLE `fee_sheet_options` (
941   `fs_category` varchar(63) default NULL,
942   `fs_option` varchar(63) default NULL,
943   `fs_codes` varchar(255) default NULL
944 ) ENGINE=MyISAM;
946 -- 
947 -- Dumping data for table `fee_sheet_options`
948 -- 
950 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '1Brief', 'CPT4|99201|');
951 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '2Limited', 'CPT4|99202|');
952 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '3Detailed', 'CPT4|99203|');
953 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '4Extended', 'CPT4|99204|');
954 INSERT INTO `fee_sheet_options` VALUES ('1New Patient', '5Comprehensive', 'CPT4|99205|');
955 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '1Brief', 'CPT4|99211|');
956 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '2Limited', 'CPT4|99212|');
957 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '3Detailed', 'CPT4|99213|');
958 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '4Extended', 'CPT4|99214|');
959 INSERT INTO `fee_sheet_options` VALUES ('2Established Patient', '5Comprehensive', 'CPT4|99215|');
961 -- --------------------------------------------------------
963 -- 
964 -- Table structure for table `form_dictation`
965 -- 
967 DROP TABLE IF EXISTS `form_dictation`;
968 CREATE TABLE `form_dictation` (
969   `id` bigint(20) NOT NULL auto_increment,
970   `date` datetime default NULL,
971   `pid` bigint(20) default NULL,
972   `user` varchar(255) default NULL,
973   `groupname` varchar(255) default NULL,
974   `authorized` tinyint(4) default NULL,
975   `activity` tinyint(4) default NULL,
976   `dictation` longtext,
977   `additional_notes` longtext,
978   PRIMARY KEY  (`id`)
979 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
981 -- --------------------------------------------------------
983 -- 
984 -- Table structure for table `form_encounter`
985 -- 
987 DROP TABLE IF EXISTS `form_encounter`;
988 CREATE TABLE `form_encounter` (
989   `id` bigint(20) NOT NULL auto_increment,
990   `date` datetime default NULL,
991   `reason` longtext,
992   `facility` longtext,
993   `facility_id` int(11) NOT NULL default '0',
994   `pid` bigint(20) default NULL,
995   `encounter` bigint(20) default NULL,
996   `onset_date` datetime default NULL,
997   `sensitivity` varchar(30) default NULL,
998   `billing_note` text,
999   `pc_catid` int(11) NOT NULL default '5' COMMENT 'event category from openemr_postcalendar_categories',
1000   `last_level_billed` int  NOT NULL DEFAULT 0 COMMENT '0=none, 1=ins1, 2=ins2, etc',
1001   `last_level_closed` int  NOT NULL DEFAULT 0 COMMENT '0=none, 1=ins1, 2=ins2, etc',
1002   `last_stmt_date`    date DEFAULT NULL,
1003   `stmt_count`        int  NOT NULL DEFAULT 0,
1004   `provider_id` INT(11) DEFAULT '0' COMMENT 'default and main provider for this visit',
1005   `supervisor_id` INT(11) DEFAULT '0' COMMENT 'supervising provider, if any, for this visit',
1006   `invoice_refno` varchar(31) NOT NULL DEFAULT '',
1007   `referral_source` varchar(31) NOT NULL DEFAULT '',
1008   `billing_facility` INT(11) NOT NULL DEFAULT 0,
1009   PRIMARY KEY  (`id`),
1010   KEY `pid` (`pid`)
1011 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1013 -- --------------------------------------------------------
1015 -- 
1016 -- Table structure for table `form_misc_billing_options`
1017 -- 
1019 DROP TABLE IF EXISTS `form_misc_billing_options`;
1020 CREATE TABLE `form_misc_billing_options` (
1021   `id` bigint(20) NOT NULL auto_increment,
1022   `date` datetime default NULL,
1023   `pid` bigint(20) default NULL,
1024   `user` varchar(255) default NULL,
1025   `groupname` varchar(255) default NULL,
1026   `authorized` tinyint(4) default NULL,
1027   `activity` tinyint(4) default NULL,
1028   `employment_related` tinyint(1) default NULL,
1029   `auto_accident` tinyint(1) default NULL,
1030   `accident_state` varchar(2) default NULL,
1031   `other_accident` tinyint(1) default NULL,
1032   `outside_lab` tinyint(1) default NULL,
1033   `lab_amount` decimal(5,2) default NULL,
1034   `is_unable_to_work` tinyint(1) default NULL,
1035   `off_work_from` date default NULL,
1036   `off_work_to` date default NULL,
1037   `is_hospitalized` tinyint(1) default NULL,
1038   `hospitalization_date_from` date default NULL,
1039   `hospitalization_date_to` date default NULL,
1040   `medicaid_resubmission_code` varchar(10) default NULL,
1041   `medicaid_original_reference` varchar(15) default NULL,
1042   `prior_auth_number` varchar(20) default NULL,
1043   `comments` varchar(255) default NULL,
1044   `replacement_claim` tinyint(1) default 0,
1045   PRIMARY KEY  (`id`)
1046 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1048 -- --------------------------------------------------------
1050 -- 
1051 -- Table structure for table `form_reviewofs`
1052 -- 
1054 DROP TABLE IF EXISTS `form_reviewofs`;
1055 CREATE TABLE `form_reviewofs` (
1056   `id` bigint(20) NOT NULL auto_increment,
1057   `date` datetime default NULL,
1058   `pid` bigint(20) default NULL,
1059   `user` varchar(255) default NULL,
1060   `groupname` varchar(255) default NULL,
1061   `authorized` tinyint(4) default NULL,
1062   `activity` tinyint(4) default NULL,
1063   `fever` varchar(5) default NULL,
1064   `chills` varchar(5) default NULL,
1065   `night_sweats` varchar(5) default NULL,
1066   `weight_loss` varchar(5) default NULL,
1067   `poor_appetite` varchar(5) default NULL,
1068   `insomnia` varchar(5) default NULL,
1069   `fatigued` varchar(5) default NULL,
1070   `depressed` varchar(5) default NULL,
1071   `hyperactive` varchar(5) default NULL,
1072   `exposure_to_foreign_countries` varchar(5) default NULL,
1073   `cataracts` varchar(5) default NULL,
1074   `cataract_surgery` varchar(5) default NULL,
1075   `glaucoma` varchar(5) default NULL,
1076   `double_vision` varchar(5) default NULL,
1077   `blurred_vision` varchar(5) default NULL,
1078   `poor_hearing` varchar(5) default NULL,
1079   `headaches` varchar(5) default NULL,
1080   `ringing_in_ears` varchar(5) default NULL,
1081   `bloody_nose` varchar(5) default NULL,
1082   `sinusitis` varchar(5) default NULL,
1083   `sinus_surgery` varchar(5) default NULL,
1084   `dry_mouth` varchar(5) default NULL,
1085   `strep_throat` varchar(5) default NULL,
1086   `tonsillectomy` varchar(5) default NULL,
1087   `swollen_lymph_nodes` varchar(5) default NULL,
1088   `throat_cancer` varchar(5) default NULL,
1089   `throat_cancer_surgery` varchar(5) default NULL,
1090   `heart_attack` varchar(5) default NULL,
1091   `irregular_heart_beat` varchar(5) default NULL,
1092   `chest_pains` varchar(5) default NULL,
1093   `shortness_of_breath` varchar(5) default NULL,
1094   `high_blood_pressure` varchar(5) default NULL,
1095   `heart_failure` varchar(5) default NULL,
1096   `poor_circulation` varchar(5) default NULL,
1097   `vascular_surgery` varchar(5) default NULL,
1098   `cardiac_catheterization` varchar(5) default NULL,
1099   `coronary_artery_bypass` varchar(5) default NULL,
1100   `heart_transplant` varchar(5) default NULL,
1101   `stress_test` varchar(5) default NULL,
1102   `emphysema` varchar(5) default NULL,
1103   `chronic_bronchitis` varchar(5) default NULL,
1104   `interstitial_lung_disease` varchar(5) default NULL,
1105   `shortness_of_breath_2` varchar(5) default NULL,
1106   `lung_cancer` varchar(5) default NULL,
1107   `lung_cancer_surgery` varchar(5) default NULL,
1108   `pheumothorax` varchar(5) default NULL,
1109   `stomach_pains` varchar(5) default NULL,
1110   `peptic_ulcer_disease` varchar(5) default NULL,
1111   `gastritis` varchar(5) default NULL,
1112   `endoscopy` varchar(5) default NULL,
1113   `polyps` varchar(5) default NULL,
1114   `colonoscopy` varchar(5) default NULL,
1115   `colon_cancer` varchar(5) default NULL,
1116   `colon_cancer_surgery` varchar(5) default NULL,
1117   `ulcerative_colitis` varchar(5) default NULL,
1118   `crohns_disease` varchar(5) default NULL,
1119   `appendectomy` varchar(5) default NULL,
1120   `divirticulitis` varchar(5) default NULL,
1121   `divirticulitis_surgery` varchar(5) default NULL,
1122   `gall_stones` varchar(5) default NULL,
1123   `cholecystectomy` varchar(5) default NULL,
1124   `hepatitis` varchar(5) default NULL,
1125   `cirrhosis_of_the_liver` varchar(5) default NULL,
1126   `splenectomy` varchar(5) default NULL,
1127   `kidney_failure` varchar(5) default NULL,
1128   `kidney_stones` varchar(5) default NULL,
1129   `kidney_cancer` varchar(5) default NULL,
1130   `kidney_infections` varchar(5) default NULL,
1131   `bladder_infections` varchar(5) default NULL,
1132   `bladder_cancer` varchar(5) default NULL,
1133   `prostate_problems` varchar(5) default NULL,
1134   `prostate_cancer` varchar(5) default NULL,
1135   `kidney_transplant` varchar(5) default NULL,
1136   `sexually_transmitted_disease` varchar(5) default NULL,
1137   `burning_with_urination` varchar(5) default NULL,
1138   `discharge_from_urethra` varchar(5) default NULL,
1139   `rashes` varchar(5) default NULL,
1140   `infections` varchar(5) default NULL,
1141   `ulcerations` varchar(5) default NULL,
1142   `pemphigus` varchar(5) default NULL,
1143   `herpes` varchar(5) default NULL,
1144   `osetoarthritis` varchar(5) default NULL,
1145   `rheumotoid_arthritis` varchar(5) default NULL,
1146   `lupus` varchar(5) default NULL,
1147   `ankylosing_sondlilitis` varchar(5) default NULL,
1148   `swollen_joints` varchar(5) default NULL,
1149   `stiff_joints` varchar(5) default NULL,
1150   `broken_bones` varchar(5) default NULL,
1151   `neck_problems` varchar(5) default NULL,
1152   `back_problems` varchar(5) default NULL,
1153   `back_surgery` varchar(5) default NULL,
1154   `scoliosis` varchar(5) default NULL,
1155   `herniated_disc` varchar(5) default NULL,
1156   `shoulder_problems` varchar(5) default NULL,
1157   `elbow_problems` varchar(5) default NULL,
1158   `wrist_problems` varchar(5) default NULL,
1159   `hand_problems` varchar(5) default NULL,
1160   `hip_problems` varchar(5) default NULL,
1161   `knee_problems` varchar(5) default NULL,
1162   `ankle_problems` varchar(5) default NULL,
1163   `foot_problems` varchar(5) default NULL,
1164   `insulin_dependent_diabetes` varchar(5) default NULL,
1165   `noninsulin_dependent_diabetes` varchar(5) default NULL,
1166   `hypothyroidism` varchar(5) default NULL,
1167   `hyperthyroidism` varchar(5) default NULL,
1168   `cushing_syndrom` varchar(5) default NULL,
1169   `addison_syndrom` varchar(5) default NULL,
1170   `additional_notes` longtext,
1171   PRIMARY KEY  (`id`)
1172 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1174 -- --------------------------------------------------------
1176 -- 
1177 -- Table structure for table `form_ros`
1178 -- 
1180 DROP TABLE IF EXISTS `form_ros`;
1181 CREATE TABLE `form_ros` (
1182   `id` int(11) NOT NULL auto_increment,
1183   `pid` int(11) NOT NULL,
1184   `activity` int(11) NOT NULL default '1',
1185   `date` datetime default NULL,
1186   `weight_change` varchar(3) default NULL,
1187   `weakness` varchar(3) default NULL,
1188   `fatigue` varchar(3) default NULL,
1189   `anorexia` varchar(3) default NULL,
1190   `fever` varchar(3) default NULL,
1191   `chills` varchar(3) default NULL,
1192   `night_sweats` varchar(3) default NULL,
1193   `insomnia` varchar(3) default NULL,
1194   `irritability` varchar(3) default NULL,
1195   `heat_or_cold` varchar(3) default NULL,
1196   `intolerance` varchar(3) default NULL,
1197   `change_in_vision` varchar(3) default NULL,
1198   `glaucoma_history` varchar(3) default NULL,
1199   `eye_pain` varchar(3) default NULL,
1200   `irritation` varchar(3) default NULL,
1201   `redness` varchar(3) default NULL,
1202   `excessive_tearing` varchar(3) default NULL,
1203   `double_vision` varchar(3) default NULL,
1204   `blind_spots` varchar(3) default NULL,
1205   `photophobia` varchar(3) default NULL,
1206   `hearing_loss` varchar(3) default NULL,
1207   `discharge` varchar(3) default NULL,
1208   `pain` varchar(3) default NULL,
1209   `vertigo` varchar(3) default NULL,
1210   `tinnitus` varchar(3) default NULL,
1211   `frequent_colds` varchar(3) default NULL,
1212   `sore_throat` varchar(3) default NULL,
1213   `sinus_problems` varchar(3) default NULL,
1214   `post_nasal_drip` varchar(3) default NULL,
1215   `nosebleed` varchar(3) default NULL,
1216   `snoring` varchar(3) default NULL,
1217   `apnea` varchar(3) default NULL,
1218   `breast_mass` varchar(3) default NULL,
1219   `breast_discharge` varchar(3) default NULL,
1220   `biopsy` varchar(3) default NULL,
1221   `abnormal_mammogram` varchar(3) default NULL,
1222   `cough` varchar(3) default NULL,
1223   `sputum` varchar(3) default NULL,
1224   `shortness_of_breath` varchar(3) default NULL,
1225   `wheezing` varchar(3) default NULL,
1226   `hemoptsyis` varchar(3) default NULL,
1227   `asthma` varchar(3) default NULL,
1228   `copd` varchar(3) default NULL,
1229   `chest_pain` varchar(3) default NULL,
1230   `palpitation` varchar(3) default NULL,
1231   `syncope` varchar(3) default NULL,
1232   `pnd` varchar(3) default NULL,
1233   `doe` varchar(3) default NULL,
1234   `orthopnea` varchar(3) default NULL,
1235   `peripheal` varchar(3) default NULL,
1236   `edema` varchar(3) default NULL,
1237   `legpain_cramping` varchar(3) default NULL,
1238   `history_murmur` varchar(3) default NULL,
1239   `arrythmia` varchar(3) default NULL,
1240   `heart_problem` varchar(3) default NULL,
1241   `dysphagia` varchar(3) default NULL,
1242   `heartburn` varchar(3) default NULL,
1243   `bloating` varchar(3) default NULL,
1244   `belching` varchar(3) default NULL,
1245   `flatulence` varchar(3) default NULL,
1246   `nausea` varchar(3) default NULL,
1247   `vomiting` varchar(3) default NULL,
1248   `hematemesis` varchar(3) default NULL,
1249   `gastro_pain` varchar(3) default NULL,
1250   `food_intolerance` varchar(3) default NULL,
1251   `hepatitis` varchar(3) default NULL,
1252   `jaundice` varchar(3) default NULL,
1253   `hematochezia` varchar(3) default NULL,
1254   `changed_bowel` varchar(3) default NULL,
1255   `diarrhea` varchar(3) default NULL,
1256   `constipation` varchar(3) default NULL,
1257   `polyuria` varchar(3) default NULL,
1258   `polydypsia` varchar(3) default NULL,
1259   `dysuria` varchar(3) default NULL,
1260   `hematuria` varchar(3) default NULL,
1261   `frequency` varchar(3) default NULL,
1262   `urgency` varchar(3) default NULL,
1263   `incontinence` varchar(3) default NULL,
1264   `renal_stones` varchar(3) default NULL,
1265   `utis` varchar(3) default NULL,
1266   `hesitancy` varchar(3) default NULL,
1267   `dribbling` varchar(3) default NULL,
1268   `stream` varchar(3) default NULL,
1269   `nocturia` varchar(3) default NULL,
1270   `erections` varchar(3) default NULL,
1271   `ejaculations` varchar(3) default NULL,
1272   `g` varchar(3) default NULL,
1273   `p` varchar(3) default NULL,
1274   `ap` varchar(3) default NULL,
1275   `lc` varchar(3) default NULL,
1276   `mearche` varchar(3) default NULL,
1277   `menopause` varchar(3) default NULL,
1278   `lmp` varchar(3) default NULL,
1279   `f_frequency` varchar(3) default NULL,
1280   `f_flow` varchar(3) default NULL,
1281   `f_symptoms` varchar(3) default NULL,
1282   `abnormal_hair_growth` varchar(3) default NULL,
1283   `f_hirsutism` varchar(3) default NULL,
1284   `joint_pain` varchar(3) default NULL,
1285   `swelling` varchar(3) default NULL,
1286   `m_redness` varchar(3) default NULL,
1287   `m_warm` varchar(3) default NULL,
1288   `m_stiffness` varchar(3) default NULL,
1289   `muscle` varchar(3) default NULL,
1290   `m_aches` varchar(3) default NULL,
1291   `fms` varchar(3) default NULL,
1292   `arthritis` varchar(3) default NULL,
1293   `loc` varchar(3) default NULL,
1294   `seizures` varchar(3) default NULL,
1295   `stroke` varchar(3) default NULL,
1296   `tia` varchar(3) default NULL,
1297   `n_numbness` varchar(3) default NULL,
1298   `n_weakness` varchar(3) default NULL,
1299   `paralysis` varchar(3) default NULL,
1300   `intellectual_decline` varchar(3) default NULL,
1301   `memory_problems` varchar(3) default NULL,
1302   `dementia` varchar(3) default NULL,
1303   `n_headache` varchar(3) default NULL,
1304   `s_cancer` varchar(3) default NULL,
1305   `psoriasis` varchar(3) default NULL,
1306   `s_acne` varchar(3) default NULL,
1307   `s_other` varchar(3) default NULL,
1308   `s_disease` varchar(3) default NULL,
1309   `p_diagnosis` varchar(3) default NULL,
1310   `p_medication` varchar(3) default NULL,
1311   `depression` varchar(3) default NULL,
1312   `anxiety` varchar(3) default NULL,
1313   `social_difficulties` varchar(3) default NULL,
1314   `thyroid_problems` varchar(3) default NULL,
1315   `diabetes` varchar(3) default NULL,
1316   `abnormal_blood` varchar(3) default NULL,
1317   `anemia` varchar(3) default NULL,
1318   `fh_blood_problems` varchar(3) default NULL,
1319   `bleeding_problems` varchar(3) default NULL,
1320   `allergies` varchar(3) default NULL,
1321   `frequent_illness` varchar(3) default NULL,
1322   `hiv` varchar(3) default NULL,
1323   `hai_status` varchar(3) default NULL,
1324   PRIMARY KEY  (`id`)
1325 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1327 -- --------------------------------------------------------
1329 -- 
1330 -- Table structure for table `form_soap`
1331 -- 
1333 DROP TABLE IF EXISTS `form_soap`;
1334 CREATE TABLE `form_soap` (
1335   `id` bigint(20) NOT NULL auto_increment,
1336   `date` datetime default NULL,
1337   `pid` bigint(20) default '0',
1338   `user` varchar(255) default NULL,
1339   `groupname` varchar(255) default NULL,
1340   `authorized` tinyint(4) default '0',
1341   `activity` tinyint(4) default '0',
1342   `subjective` text,
1343   `objective` text,
1344   `assessment` text,
1345   `plan` text,
1346   PRIMARY KEY  (`id`)
1347 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1349 -- --------------------------------------------------------
1351 -- 
1352 -- Table structure for table `form_vitals`
1353 -- 
1355 DROP TABLE IF EXISTS `form_vitals`;
1356 CREATE TABLE `form_vitals` (
1357   `id` bigint(20) NOT NULL auto_increment,
1358   `date` datetime default NULL,
1359   `pid` bigint(20) default '0',
1360   `user` varchar(255) default NULL,
1361   `groupname` varchar(255) default NULL,
1362   `authorized` tinyint(4) default '0',
1363   `activity` tinyint(4) default '0',
1364   `bps` varchar(40) default NULL,
1365   `bpd` varchar(40) default NULL,
1366   `weight` float(5,2) default '0.00',
1367   `height` float(5,2) default '0.00',
1368   `temperature` float(5,2) default '0.00',
1369   `temp_method` varchar(255) default NULL,
1370   `pulse` float(5,2) default '0.00',
1371   `respiration` float(5,2) default '0.00',
1372   `note` varchar(255) default NULL,
1373   `BMI` float(4,1) default '0.0',
1374   `BMI_status` varchar(255) default NULL,
1375   `waist_circ` float(5,2) default '0.00',
1376   `head_circ` float(4,2) default '0.00',
1377   `oxygen_saturation` float(5,2) default '0.00',
1378   PRIMARY KEY  (`id`)
1379 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1381 -- --------------------------------------------------------
1383 -- 
1384 -- Table structure for table `forms`
1385 -- 
1387 DROP TABLE IF EXISTS `forms`;
1388 CREATE TABLE `forms` (
1389   `id` bigint(20) NOT NULL auto_increment,
1390   `date` datetime default NULL,
1391   `encounter` bigint(20) default NULL,
1392   `form_name` longtext,
1393   `form_id` bigint(20) default NULL,
1394   `pid` bigint(20) default NULL,
1395   `user` varchar(255) default NULL,
1396   `groupname` varchar(255) default NULL,
1397   `authorized` tinyint(4) default NULL,
1398   `deleted` tinyint(4) DEFAULT '0' NOT NULL COMMENT 'flag indicates form has been deleted',
1399   `formdir` longtext,
1400   PRIMARY KEY  (`id`)
1401 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1403 -- --------------------------------------------------------
1405 -- 
1406 -- Table structure for table `geo_country_reference`
1407 -- 
1409 DROP TABLE IF EXISTS `geo_country_reference`;
1410 CREATE TABLE `geo_country_reference` (
1411   `countries_id` int(5) NOT NULL auto_increment,
1412   `countries_name` varchar(64) default NULL,
1413   `countries_iso_code_2` char(2) NOT NULL default '',
1414   `countries_iso_code_3` char(3) NOT NULL default '',
1415   PRIMARY KEY  (`countries_id`),
1416   KEY `IDX_COUNTRIES_NAME` (`countries_name`)
1417 ) ENGINE=MyISAM AUTO_INCREMENT=240 ;
1419 -- 
1420 -- Dumping data for table `geo_country_reference`
1421 -- 
1423 INSERT INTO `geo_country_reference` VALUES (1, 'Afghanistan', 'AF', 'AFG');
1424 INSERT INTO `geo_country_reference` VALUES (2, 'Albania', 'AL', 'ALB');
1425 INSERT INTO `geo_country_reference` VALUES (3, 'Algeria', 'DZ', 'DZA');
1426 INSERT INTO `geo_country_reference` VALUES (4, 'American Samoa', 'AS', 'ASM');
1427 INSERT INTO `geo_country_reference` VALUES (5, 'Andorra', 'AD', 'AND');
1428 INSERT INTO `geo_country_reference` VALUES (6, 'Angola', 'AO', 'AGO');
1429 INSERT INTO `geo_country_reference` VALUES (7, 'Anguilla', 'AI', 'AIA');
1430 INSERT INTO `geo_country_reference` VALUES (8, 'Antarctica', 'AQ', 'ATA');
1431 INSERT INTO `geo_country_reference` VALUES (9, 'Antigua and Barbuda', 'AG', 'ATG');
1432 INSERT INTO `geo_country_reference` VALUES (10, 'Argentina', 'AR', 'ARG');
1433 INSERT INTO `geo_country_reference` VALUES (11, 'Armenia', 'AM', 'ARM');
1434 INSERT INTO `geo_country_reference` VALUES (12, 'Aruba', 'AW', 'ABW');
1435 INSERT INTO `geo_country_reference` VALUES (13, 'Australia', 'AU', 'AUS');
1436 INSERT INTO `geo_country_reference` VALUES (14, 'Austria', 'AT', 'AUT');
1437 INSERT INTO `geo_country_reference` VALUES (15, 'Azerbaijan', 'AZ', 'AZE');
1438 INSERT INTO `geo_country_reference` VALUES (16, 'Bahamas', 'BS', 'BHS');
1439 INSERT INTO `geo_country_reference` VALUES (17, 'Bahrain', 'BH', 'BHR');
1440 INSERT INTO `geo_country_reference` VALUES (18, 'Bangladesh', 'BD', 'BGD');
1441 INSERT INTO `geo_country_reference` VALUES (19, 'Barbados', 'BB', 'BRB');
1442 INSERT INTO `geo_country_reference` VALUES (20, 'Belarus', 'BY', 'BLR');
1443 INSERT INTO `geo_country_reference` VALUES (21, 'Belgium', 'BE', 'BEL');
1444 INSERT INTO `geo_country_reference` VALUES (22, 'Belize', 'BZ', 'BLZ');
1445 INSERT INTO `geo_country_reference` VALUES (23, 'Benin', 'BJ', 'BEN');
1446 INSERT INTO `geo_country_reference` VALUES (24, 'Bermuda', 'BM', 'BMU');
1447 INSERT INTO `geo_country_reference` VALUES (25, 'Bhutan', 'BT', 'BTN');
1448 INSERT INTO `geo_country_reference` VALUES (26, 'Bolivia', 'BO', 'BOL');
1449 INSERT INTO `geo_country_reference` VALUES (27, 'Bosnia and Herzegowina', 'BA', 'BIH');
1450 INSERT INTO `geo_country_reference` VALUES (28, 'Botswana', 'BW', 'BWA');
1451 INSERT INTO `geo_country_reference` VALUES (29, 'Bouvet Island', 'BV', 'BVT');
1452 INSERT INTO `geo_country_reference` VALUES (30, 'Brazil', 'BR', 'BRA');
1453 INSERT INTO `geo_country_reference` VALUES (31, 'British Indian Ocean Territory', 'IO', 'IOT');
1454 INSERT INTO `geo_country_reference` VALUES (32, 'Brunei Darussalam', 'BN', 'BRN');
1455 INSERT INTO `geo_country_reference` VALUES (33, 'Bulgaria', 'BG', 'BGR');
1456 INSERT INTO `geo_country_reference` VALUES (34, 'Burkina Faso', 'BF', 'BFA');
1457 INSERT INTO `geo_country_reference` VALUES (35, 'Burundi', 'BI', 'BDI');
1458 INSERT INTO `geo_country_reference` VALUES (36, 'Cambodia', 'KH', 'KHM');
1459 INSERT INTO `geo_country_reference` VALUES (37, 'Cameroon', 'CM', 'CMR');
1460 INSERT INTO `geo_country_reference` VALUES (38, 'Canada', 'CA', 'CAN');
1461 INSERT INTO `geo_country_reference` VALUES (39, 'Cape Verde', 'CV', 'CPV');
1462 INSERT INTO `geo_country_reference` VALUES (40, 'Cayman Islands', 'KY', 'CYM');
1463 INSERT INTO `geo_country_reference` VALUES (41, 'Central African Republic', 'CF', 'CAF');
1464 INSERT INTO `geo_country_reference` VALUES (42, 'Chad', 'TD', 'TCD');
1465 INSERT INTO `geo_country_reference` VALUES (43, 'Chile', 'CL', 'CHL');
1466 INSERT INTO `geo_country_reference` VALUES (44, 'China', 'CN', 'CHN');
1467 INSERT INTO `geo_country_reference` VALUES (45, 'Christmas Island', 'CX', 'CXR');
1468 INSERT INTO `geo_country_reference` VALUES (46, 'Cocos (Keeling) Islands', 'CC', 'CCK');
1469 INSERT INTO `geo_country_reference` VALUES (47, 'Colombia', 'CO', 'COL');
1470 INSERT INTO `geo_country_reference` VALUES (48, 'Comoros', 'KM', 'COM');
1471 INSERT INTO `geo_country_reference` VALUES (49, 'Congo', 'CG', 'COG');
1472 INSERT INTO `geo_country_reference` VALUES (50, 'Cook Islands', 'CK', 'COK');
1473 INSERT INTO `geo_country_reference` VALUES (51, 'Costa Rica', 'CR', 'CRI');
1474 INSERT INTO `geo_country_reference` VALUES (52, 'Cote D Ivoire', 'CI', 'CIV');
1475 INSERT INTO `geo_country_reference` VALUES (53, 'Croatia', 'HR', 'HRV');
1476 INSERT INTO `geo_country_reference` VALUES (54, 'Cuba', 'CU', 'CUB');
1477 INSERT INTO `geo_country_reference` VALUES (55, 'Cyprus', 'CY', 'CYP');
1478 INSERT INTO `geo_country_reference` VALUES (56, 'Czech Republic', 'CZ', 'CZE');
1479 INSERT INTO `geo_country_reference` VALUES (57, 'Denmark', 'DK', 'DNK');
1480 INSERT INTO `geo_country_reference` VALUES (58, 'Djibouti', 'DJ', 'DJI');
1481 INSERT INTO `geo_country_reference` VALUES (59, 'Dominica', 'DM', 'DMA');
1482 INSERT INTO `geo_country_reference` VALUES (60, 'Dominican Republic', 'DO', 'DOM');
1483 INSERT INTO `geo_country_reference` VALUES (61, 'East Timor', 'TP', 'TMP');
1484 INSERT INTO `geo_country_reference` VALUES (62, 'Ecuador', 'EC', 'ECU');
1485 INSERT INTO `geo_country_reference` VALUES (63, 'Egypt', 'EG', 'EGY');
1486 INSERT INTO `geo_country_reference` VALUES (64, 'El Salvador', 'SV', 'SLV');
1487 INSERT INTO `geo_country_reference` VALUES (65, 'Equatorial Guinea', 'GQ', 'GNQ');
1488 INSERT INTO `geo_country_reference` VALUES (66, 'Eritrea', 'ER', 'ERI');
1489 INSERT INTO `geo_country_reference` VALUES (67, 'Estonia', 'EE', 'EST');
1490 INSERT INTO `geo_country_reference` VALUES (68, 'Ethiopia', 'ET', 'ETH');
1491 INSERT INTO `geo_country_reference` VALUES (69, 'Falkland Islands (Malvinas)', 'FK', 'FLK');
1492 INSERT INTO `geo_country_reference` VALUES (70, 'Faroe Islands', 'FO', 'FRO');
1493 INSERT INTO `geo_country_reference` VALUES (71, 'Fiji', 'FJ', 'FJI');
1494 INSERT INTO `geo_country_reference` VALUES (72, 'Finland', 'FI', 'FIN');
1495 INSERT INTO `geo_country_reference` VALUES (73, 'France', 'FR', 'FRA');
1496 INSERT INTO `geo_country_reference` VALUES (74, 'France, MEtropolitan', 'FX', 'FXX');
1497 INSERT INTO `geo_country_reference` VALUES (75, 'French Guiana', 'GF', 'GUF');
1498 INSERT INTO `geo_country_reference` VALUES (76, 'French Polynesia', 'PF', 'PYF');
1499 INSERT INTO `geo_country_reference` VALUES (77, 'French Southern Territories', 'TF', 'ATF');
1500 INSERT INTO `geo_country_reference` VALUES (78, 'Gabon', 'GA', 'GAB');
1501 INSERT INTO `geo_country_reference` VALUES (79, 'Gambia', 'GM', 'GMB');
1502 INSERT INTO `geo_country_reference` VALUES (80, 'Georgia', 'GE', 'GEO');
1503 INSERT INTO `geo_country_reference` VALUES (81, 'Germany', 'DE', 'DEU');
1504 INSERT INTO `geo_country_reference` VALUES (82, 'Ghana', 'GH', 'GHA');
1505 INSERT INTO `geo_country_reference` VALUES (83, 'Gibraltar', 'GI', 'GIB');
1506 INSERT INTO `geo_country_reference` VALUES (84, 'Greece', 'GR', 'GRC');
1507 INSERT INTO `geo_country_reference` VALUES (85, 'Greenland', 'GL', 'GRL');
1508 INSERT INTO `geo_country_reference` VALUES (86, 'Grenada', 'GD', 'GRD');
1509 INSERT INTO `geo_country_reference` VALUES (87, 'Guadeloupe', 'GP', 'GLP');
1510 INSERT INTO `geo_country_reference` VALUES (88, 'Guam', 'GU', 'GUM');
1511 INSERT INTO `geo_country_reference` VALUES (89, 'Guatemala', 'GT', 'GTM');
1512 INSERT INTO `geo_country_reference` VALUES (90, 'Guinea', 'GN', 'GIN');
1513 INSERT INTO `geo_country_reference` VALUES (91, 'Guinea-bissau', 'GW', 'GNB');
1514 INSERT INTO `geo_country_reference` VALUES (92, 'Guyana', 'GY', 'GUY');
1515 INSERT INTO `geo_country_reference` VALUES (93, 'Haiti', 'HT', 'HTI');
1516 INSERT INTO `geo_country_reference` VALUES (94, 'Heard and Mc Donald Islands', 'HM', 'HMD');
1517 INSERT INTO `geo_country_reference` VALUES (95, 'Honduras', 'HN', 'HND');
1518 INSERT INTO `geo_country_reference` VALUES (96, 'Hong Kong', 'HK', 'HKG');
1519 INSERT INTO `geo_country_reference` VALUES (97, 'Hungary', 'HU', 'HUN');
1520 INSERT INTO `geo_country_reference` VALUES (98, 'Iceland', 'IS', 'ISL');
1521 INSERT INTO `geo_country_reference` VALUES (99, 'India', 'IN', 'IND');
1522 INSERT INTO `geo_country_reference` VALUES (100, 'Indonesia', 'ID', 'IDN');
1523 INSERT INTO `geo_country_reference` VALUES (101, 'Iran (Islamic Republic of)', 'IR', 'IRN');
1524 INSERT INTO `geo_country_reference` VALUES (102, 'Iraq', 'IQ', 'IRQ');
1525 INSERT INTO `geo_country_reference` VALUES (103, 'Ireland', 'IE', 'IRL');
1526 INSERT INTO `geo_country_reference` VALUES (104, 'Israel', 'IL', 'ISR');
1527 INSERT INTO `geo_country_reference` VALUES (105, 'Italy', 'IT', 'ITA');
1528 INSERT INTO `geo_country_reference` VALUES (106, 'Jamaica', 'JM', 'JAM');
1529 INSERT INTO `geo_country_reference` VALUES (107, 'Japan', 'JP', 'JPN');
1530 INSERT INTO `geo_country_reference` VALUES (108, 'Jordan', 'JO', 'JOR');
1531 INSERT INTO `geo_country_reference` VALUES (109, 'Kazakhstan', 'KZ', 'KAZ');
1532 INSERT INTO `geo_country_reference` VALUES (110, 'Kenya', 'KE', 'KEN');
1533 INSERT INTO `geo_country_reference` VALUES (111, 'Kiribati', 'KI', 'KIR');
1534 INSERT INTO `geo_country_reference` VALUES (112, 'Korea, Democratic Peoples Republic of', 'KP', 'PRK');
1535 INSERT INTO `geo_country_reference` VALUES (113, 'Korea, Republic of', 'KR', 'KOR');
1536 INSERT INTO `geo_country_reference` VALUES (114, 'Kuwait', 'KW', 'KWT');
1537 INSERT INTO `geo_country_reference` VALUES (115, 'Kyrgyzstan', 'KG', 'KGZ');
1538 INSERT INTO `geo_country_reference` VALUES (116, 'Lao Peoples Democratic Republic', 'LA', 'LAO');
1539 INSERT INTO `geo_country_reference` VALUES (117, 'Latvia', 'LV', 'LVA');
1540 INSERT INTO `geo_country_reference` VALUES (118, 'Lebanon', 'LB', 'LBN');
1541 INSERT INTO `geo_country_reference` VALUES (119, 'Lesotho', 'LS', 'LSO');
1542 INSERT INTO `geo_country_reference` VALUES (120, 'Liberia', 'LR', 'LBR');
1543 INSERT INTO `geo_country_reference` VALUES (121, 'Libyan Arab Jamahiriya', 'LY', 'LBY');
1544 INSERT INTO `geo_country_reference` VALUES (122, 'Liechtenstein', 'LI', 'LIE');
1545 INSERT INTO `geo_country_reference` VALUES (123, 'Lithuania', 'LT', 'LTU');
1546 INSERT INTO `geo_country_reference` VALUES (124, 'Luxembourg', 'LU', 'LUX');
1547 INSERT INTO `geo_country_reference` VALUES (125, 'Macau', 'MO', 'MAC');
1548 INSERT INTO `geo_country_reference` VALUES (126, 'Macedonia, The Former Yugoslav Republic of', 'MK', 'MKD');
1549 INSERT INTO `geo_country_reference` VALUES (127, 'Madagascar', 'MG', 'MDG');
1550 INSERT INTO `geo_country_reference` VALUES (128, 'Malawi', 'MW', 'MWI');
1551 INSERT INTO `geo_country_reference` VALUES (129, 'Malaysia', 'MY', 'MYS');
1552 INSERT INTO `geo_country_reference` VALUES (130, 'Maldives', 'MV', 'MDV');
1553 INSERT INTO `geo_country_reference` VALUES (131, 'Mali', 'ML', 'MLI');
1554 INSERT INTO `geo_country_reference` VALUES (132, 'Malta', 'MT', 'MLT');
1555 INSERT INTO `geo_country_reference` VALUES (133, 'Marshall Islands', 'MH', 'MHL');
1556 INSERT INTO `geo_country_reference` VALUES (134, 'Martinique', 'MQ', 'MTQ');
1557 INSERT INTO `geo_country_reference` VALUES (135, 'Mauritania', 'MR', 'MRT');
1558 INSERT INTO `geo_country_reference` VALUES (136, 'Mauritius', 'MU', 'MUS');
1559 INSERT INTO `geo_country_reference` VALUES (137, 'Mayotte', 'YT', 'MYT');
1560 INSERT INTO `geo_country_reference` VALUES (138, 'Mexico', 'MX', 'MEX');
1561 INSERT INTO `geo_country_reference` VALUES (139, 'Micronesia, Federated States of', 'FM', 'FSM');
1562 INSERT INTO `geo_country_reference` VALUES (140, 'Moldova, Republic of', 'MD', 'MDA');
1563 INSERT INTO `geo_country_reference` VALUES (141, 'Monaco', 'MC', 'MCO');
1564 INSERT INTO `geo_country_reference` VALUES (142, 'Mongolia', 'MN', 'MNG');
1565 INSERT INTO `geo_country_reference` VALUES (143, 'Montserrat', 'MS', 'MSR');
1566 INSERT INTO `geo_country_reference` VALUES (144, 'Morocco', 'MA', 'MAR');
1567 INSERT INTO `geo_country_reference` VALUES (145, 'Mozambique', 'MZ', 'MOZ');
1568 INSERT INTO `geo_country_reference` VALUES (146, 'Myanmar', 'MM', 'MMR');
1569 INSERT INTO `geo_country_reference` VALUES (147, 'Namibia', 'NA', 'NAM');
1570 INSERT INTO `geo_country_reference` VALUES (148, 'Nauru', 'NR', 'NRU');
1571 INSERT INTO `geo_country_reference` VALUES (149, 'Nepal', 'NP', 'NPL');
1572 INSERT INTO `geo_country_reference` VALUES (150, 'Netherlands', 'NL', 'NLD');
1573 INSERT INTO `geo_country_reference` VALUES (151, 'Netherlands Antilles', 'AN', 'ANT');
1574 INSERT INTO `geo_country_reference` VALUES (152, 'New Caledonia', 'NC', 'NCL');
1575 INSERT INTO `geo_country_reference` VALUES (153, 'New Zealand', 'NZ', 'NZL');
1576 INSERT INTO `geo_country_reference` VALUES (154, 'Nicaragua', 'NI', 'NIC');
1577 INSERT INTO `geo_country_reference` VALUES (155, 'Niger', 'NE', 'NER');
1578 INSERT INTO `geo_country_reference` VALUES (156, 'Nigeria', 'NG', 'NGA');
1579 INSERT INTO `geo_country_reference` VALUES (157, 'Niue', 'NU', 'NIU');
1580 INSERT INTO `geo_country_reference` VALUES (158, 'Norfolk Island', 'NF', 'NFK');
1581 INSERT INTO `geo_country_reference` VALUES (159, 'Northern Mariana Islands', 'MP', 'MNP');
1582 INSERT INTO `geo_country_reference` VALUES (160, 'Norway', 'NO', 'NOR');
1583 INSERT INTO `geo_country_reference` VALUES (161, 'Oman', 'OM', 'OMN');
1584 INSERT INTO `geo_country_reference` VALUES (162, 'Pakistan', 'PK', 'PAK');
1585 INSERT INTO `geo_country_reference` VALUES (163, 'Palau', 'PW', 'PLW');
1586 INSERT INTO `geo_country_reference` VALUES (164, 'Panama', 'PA', 'PAN');
1587 INSERT INTO `geo_country_reference` VALUES (165, 'Papua New Guinea', 'PG', 'PNG');
1588 INSERT INTO `geo_country_reference` VALUES (166, 'Paraguay', 'PY', 'PRY');
1589 INSERT INTO `geo_country_reference` VALUES (167, 'Peru', 'PE', 'PER');
1590 INSERT INTO `geo_country_reference` VALUES (168, 'Philippines', 'PH', 'PHL');
1591 INSERT INTO `geo_country_reference` VALUES (169, 'Pitcairn', 'PN', 'PCN');
1592 INSERT INTO `geo_country_reference` VALUES (170, 'Poland', 'PL', 'POL');
1593 INSERT INTO `geo_country_reference` VALUES (171, 'Portugal', 'PT', 'PRT');
1594 INSERT INTO `geo_country_reference` VALUES (172, 'Puerto Rico', 'PR', 'PRI');
1595 INSERT INTO `geo_country_reference` VALUES (173, 'Qatar', 'QA', 'QAT');
1596 INSERT INTO `geo_country_reference` VALUES (174, 'Reunion', 'RE', 'REU');
1597 INSERT INTO `geo_country_reference` VALUES (175, 'Romania', 'RO', 'ROM');
1598 INSERT INTO `geo_country_reference` VALUES (176, 'Russian Federation', 'RU', 'RUS');
1599 INSERT INTO `geo_country_reference` VALUES (177, 'Rwanda', 'RW', 'RWA');
1600 INSERT INTO `geo_country_reference` VALUES (178, 'Saint Kitts and Nevis', 'KN', 'KNA');
1601 INSERT INTO `geo_country_reference` VALUES (179, 'Saint Lucia', 'LC', 'LCA');
1602 INSERT INTO `geo_country_reference` VALUES (180, 'Saint Vincent and the Grenadines', 'VC', 'VCT');
1603 INSERT INTO `geo_country_reference` VALUES (181, 'Samoa', 'WS', 'WSM');
1604 INSERT INTO `geo_country_reference` VALUES (182, 'San Marino', 'SM', 'SMR');
1605 INSERT INTO `geo_country_reference` VALUES (183, 'Sao Tome and Principe', 'ST', 'STP');
1606 INSERT INTO `geo_country_reference` VALUES (184, 'Saudi Arabia', 'SA', 'SAU');
1607 INSERT INTO `geo_country_reference` VALUES (185, 'Senegal', 'SN', 'SEN');
1608 INSERT INTO `geo_country_reference` VALUES (186, 'Seychelles', 'SC', 'SYC');
1609 INSERT INTO `geo_country_reference` VALUES (187, 'Sierra Leone', 'SL', 'SLE');
1610 INSERT INTO `geo_country_reference` VALUES (188, 'Singapore', 'SG', 'SGP');
1611 INSERT INTO `geo_country_reference` VALUES (189, 'Slovakia (Slovak Republic)', 'SK', 'SVK');
1612 INSERT INTO `geo_country_reference` VALUES (190, 'Slovenia', 'SI', 'SVN');
1613 INSERT INTO `geo_country_reference` VALUES (191, 'Solomon Islands', 'SB', 'SLB');
1614 INSERT INTO `geo_country_reference` VALUES (192, 'Somalia', 'SO', 'SOM');
1615 INSERT INTO `geo_country_reference` VALUES (193, 'south Africa', 'ZA', 'ZAF');
1616 INSERT INTO `geo_country_reference` VALUES (194, 'South Georgia and the South Sandwich Islands', 'GS', 'SGS');
1617 INSERT INTO `geo_country_reference` VALUES (195, 'Spain', 'ES', 'ESP');
1618 INSERT INTO `geo_country_reference` VALUES (196, 'Sri Lanka', 'LK', 'LKA');
1619 INSERT INTO `geo_country_reference` VALUES (197, 'St. Helena', 'SH', 'SHN');
1620 INSERT INTO `geo_country_reference` VALUES (198, 'St. Pierre and Miquelon', 'PM', 'SPM');
1621 INSERT INTO `geo_country_reference` VALUES (199, 'Sudan', 'SD', 'SDN');
1622 INSERT INTO `geo_country_reference` VALUES (200, 'Suriname', 'SR', 'SUR');
1623 INSERT INTO `geo_country_reference` VALUES (201, 'Svalbard and Jan Mayen Islands', 'SJ', 'SJM');
1624 INSERT INTO `geo_country_reference` VALUES (202, 'Swaziland', 'SZ', 'SWZ');
1625 INSERT INTO `geo_country_reference` VALUES (203, 'Sweden', 'SE', 'SWE');
1626 INSERT INTO `geo_country_reference` VALUES (204, 'Switzerland', 'CH', 'CHE');
1627 INSERT INTO `geo_country_reference` VALUES (205, 'Syrian Arab Republic', 'SY', 'SYR');
1628 INSERT INTO `geo_country_reference` VALUES (206, 'Taiwan, Province of China', 'TW', 'TWN');
1629 INSERT INTO `geo_country_reference` VALUES (207, 'Tajikistan', 'TJ', 'TJK');
1630 INSERT INTO `geo_country_reference` VALUES (208, 'Tanzania, United Republic of', 'TZ', 'TZA');
1631 INSERT INTO `geo_country_reference` VALUES (209, 'Thailand', 'TH', 'THA');
1632 INSERT INTO `geo_country_reference` VALUES (210, 'Togo', 'TG', 'TGO');
1633 INSERT INTO `geo_country_reference` VALUES (211, 'Tokelau', 'TK', 'TKL');
1634 INSERT INTO `geo_country_reference` VALUES (212, 'Tonga', 'TO', 'TON');
1635 INSERT INTO `geo_country_reference` VALUES (213, 'Trinidad and Tobago', 'TT', 'TTO');
1636 INSERT INTO `geo_country_reference` VALUES (214, 'Tunisia', 'TN', 'TUN');
1637 INSERT INTO `geo_country_reference` VALUES (215, 'Turkey', 'TR', 'TUR');
1638 INSERT INTO `geo_country_reference` VALUES (216, 'Turkmenistan', 'TM', 'TKM');
1639 INSERT INTO `geo_country_reference` VALUES (217, 'Turks and Caicos Islands', 'TC', 'TCA');
1640 INSERT INTO `geo_country_reference` VALUES (218, 'Tuvalu', 'TV', 'TUV');
1641 INSERT INTO `geo_country_reference` VALUES (219, 'Uganda', 'UG', 'UGA');
1642 INSERT INTO `geo_country_reference` VALUES (220, 'Ukraine', 'UA', 'UKR');
1643 INSERT INTO `geo_country_reference` VALUES (221, 'United Arab Emirates', 'AE', 'ARE');
1644 INSERT INTO `geo_country_reference` VALUES (222, 'United Kingdom', 'GB', 'GBR');
1645 INSERT INTO `geo_country_reference` VALUES (223, 'United States', 'US', 'USA');
1646 INSERT INTO `geo_country_reference` VALUES (224, 'United States Minor Outlying Islands', 'UM', 'UMI');
1647 INSERT INTO `geo_country_reference` VALUES (225, 'Uruguay', 'UY', 'URY');
1648 INSERT INTO `geo_country_reference` VALUES (226, 'Uzbekistan', 'UZ', 'UZB');
1649 INSERT INTO `geo_country_reference` VALUES (227, 'Vanuatu', 'VU', 'VUT');
1650 INSERT INTO `geo_country_reference` VALUES (228, 'Vatican City State (Holy See)', 'VA', 'VAT');
1651 INSERT INTO `geo_country_reference` VALUES (229, 'Venezuela', 'VE', 'VEN');
1652 INSERT INTO `geo_country_reference` VALUES (230, 'Viet Nam', 'VN', 'VNM');
1653 INSERT INTO `geo_country_reference` VALUES (231, 'Virgin Islands (British)', 'VG', 'VGB');
1654 INSERT INTO `geo_country_reference` VALUES (232, 'Virgin Islands (U.S.)', 'VI', 'VIR');
1655 INSERT INTO `geo_country_reference` VALUES (233, 'Wallis and Futuna Islands', 'WF', 'WLF');
1656 INSERT INTO `geo_country_reference` VALUES (234, 'Western Sahara', 'EH', 'ESH');
1657 INSERT INTO `geo_country_reference` VALUES (235, 'Yemen', 'YE', 'YEM');
1658 INSERT INTO `geo_country_reference` VALUES (236, 'Yugoslavia', 'YU', 'YUG');
1659 INSERT INTO `geo_country_reference` VALUES (237, 'Zaire', 'ZR', 'ZAR');
1660 INSERT INTO `geo_country_reference` VALUES (238, 'Zambia', 'ZM', 'ZMB');
1661 INSERT INTO `geo_country_reference` VALUES (239, 'Zimbabwe', 'ZW', 'ZWE');
1663 -- --------------------------------------------------------
1665 -- 
1666 -- Table structure for table `geo_zone_reference`
1667 -- 
1669 DROP TABLE IF EXISTS `geo_zone_reference`;
1670 CREATE TABLE `geo_zone_reference` (
1671   `zone_id` int(5) NOT NULL auto_increment,
1672   `zone_country_id` int(5) NOT NULL default '0',
1673   `zone_code` varchar(5) default NULL,
1674   `zone_name` varchar(32) default NULL,
1675   PRIMARY KEY  (`zone_id`)
1676 ) ENGINE=MyISAM AUTO_INCREMENT=83 ;
1678 -- 
1679 -- Dumping data for table `geo_zone_reference`
1680 -- 
1682 INSERT INTO `geo_zone_reference` VALUES (1, 223, 'AL', 'Alabama');
1683 INSERT INTO `geo_zone_reference` VALUES (2, 223, 'AK', 'Alaska');
1684 INSERT INTO `geo_zone_reference` VALUES (3, 223, 'AS', 'American Samoa');
1685 INSERT INTO `geo_zone_reference` VALUES (4, 223, 'AZ', 'Arizona');
1686 INSERT INTO `geo_zone_reference` VALUES (5, 223, 'AR', 'Arkansas');
1687 INSERT INTO `geo_zone_reference` VALUES (6, 223, 'AF', 'Armed Forces Africa');
1688 INSERT INTO `geo_zone_reference` VALUES (7, 223, 'AA', 'Armed Forces Americas');
1689 INSERT INTO `geo_zone_reference` VALUES (8, 223, 'AC', 'Armed Forces Canada');
1690 INSERT INTO `geo_zone_reference` VALUES (9, 223, 'AE', 'Armed Forces Europe');
1691 INSERT INTO `geo_zone_reference` VALUES (10, 223, 'AM', 'Armed Forces Middle East');
1692 INSERT INTO `geo_zone_reference` VALUES (11, 223, 'AP', 'Armed Forces Pacific');
1693 INSERT INTO `geo_zone_reference` VALUES (12, 223, 'CA', 'California');
1694 INSERT INTO `geo_zone_reference` VALUES (13, 223, 'CO', 'Colorado');
1695 INSERT INTO `geo_zone_reference` VALUES (14, 223, 'CT', 'Connecticut');
1696 INSERT INTO `geo_zone_reference` VALUES (15, 223, 'DE', 'Delaware');
1697 INSERT INTO `geo_zone_reference` VALUES (16, 223, 'DC', 'District of Columbia');
1698 INSERT INTO `geo_zone_reference` VALUES (17, 223, 'FM', 'Federated States Of Micronesia');
1699 INSERT INTO `geo_zone_reference` VALUES (18, 223, 'FL', 'Florida');
1700 INSERT INTO `geo_zone_reference` VALUES (19, 223, 'GA', 'Georgia');
1701 INSERT INTO `geo_zone_reference` VALUES (20, 223, 'GU', 'Guam');
1702 INSERT INTO `geo_zone_reference` VALUES (21, 223, 'HI', 'Hawaii');
1703 INSERT INTO `geo_zone_reference` VALUES (22, 223, 'ID', 'Idaho');
1704 INSERT INTO `geo_zone_reference` VALUES (23, 223, 'IL', 'Illinois');
1705 INSERT INTO `geo_zone_reference` VALUES (24, 223, 'IN', 'Indiana');
1706 INSERT INTO `geo_zone_reference` VALUES (25, 223, 'IA', 'Iowa');
1707 INSERT INTO `geo_zone_reference` VALUES (26, 223, 'KS', 'Kansas');
1708 INSERT INTO `geo_zone_reference` VALUES (27, 223, 'KY', 'Kentucky');
1709 INSERT INTO `geo_zone_reference` VALUES (28, 223, 'LA', 'Louisiana');
1710 INSERT INTO `geo_zone_reference` VALUES (29, 223, 'ME', 'Maine');
1711 INSERT INTO `geo_zone_reference` VALUES (30, 223, 'MH', 'Marshall Islands');
1712 INSERT INTO `geo_zone_reference` VALUES (31, 223, 'MD', 'Maryland');
1713 INSERT INTO `geo_zone_reference` VALUES (32, 223, 'MA', 'Massachusetts');
1714 INSERT INTO `geo_zone_reference` VALUES (33, 223, 'MI', 'Michigan');
1715 INSERT INTO `geo_zone_reference` VALUES (34, 223, 'MN', 'Minnesota');
1716 INSERT INTO `geo_zone_reference` VALUES (35, 223, 'MS', 'Mississippi');
1717 INSERT INTO `geo_zone_reference` VALUES (36, 223, 'MO', 'Missouri');
1718 INSERT INTO `geo_zone_reference` VALUES (37, 223, 'MT', 'Montana');
1719 INSERT INTO `geo_zone_reference` VALUES (38, 223, 'NE', 'Nebraska');
1720 INSERT INTO `geo_zone_reference` VALUES (39, 223, 'NV', 'Nevada');
1721 INSERT INTO `geo_zone_reference` VALUES (40, 223, 'NH', 'New Hampshire');
1722 INSERT INTO `geo_zone_reference` VALUES (41, 223, 'NJ', 'New Jersey');
1723 INSERT INTO `geo_zone_reference` VALUES (42, 223, 'NM', 'New Mexico');
1724 INSERT INTO `geo_zone_reference` VALUES (43, 223, 'NY', 'New York');
1725 INSERT INTO `geo_zone_reference` VALUES (44, 223, 'NC', 'North Carolina');
1726 INSERT INTO `geo_zone_reference` VALUES (45, 223, 'ND', 'North Dakota');
1727 INSERT INTO `geo_zone_reference` VALUES (46, 223, 'MP', 'Northern Mariana Islands');
1728 INSERT INTO `geo_zone_reference` VALUES (47, 223, 'OH', 'Ohio');
1729 INSERT INTO `geo_zone_reference` VALUES (48, 223, 'OK', 'Oklahoma');
1730 INSERT INTO `geo_zone_reference` VALUES (49, 223, 'OR', 'Oregon');
1731 INSERT INTO `geo_zone_reference` VALUES (50, 223, 'PW', 'Palau');
1732 INSERT INTO `geo_zone_reference` VALUES (51, 223, 'PA', 'Pennsylvania');
1733 INSERT INTO `geo_zone_reference` VALUES (52, 223, 'PR', 'Puerto Rico');
1734 INSERT INTO `geo_zone_reference` VALUES (53, 223, 'RI', 'Rhode Island');
1735 INSERT INTO `geo_zone_reference` VALUES (54, 223, 'SC', 'South Carolina');
1736 INSERT INTO `geo_zone_reference` VALUES (55, 223, 'SD', 'South Dakota');
1737 INSERT INTO `geo_zone_reference` VALUES (56, 223, 'TN', 'Tenessee');
1738 INSERT INTO `geo_zone_reference` VALUES (57, 223, 'TX', 'Texas');
1739 INSERT INTO `geo_zone_reference` VALUES (58, 223, 'UT', 'Utah');
1740 INSERT INTO `geo_zone_reference` VALUES (59, 223, 'VT', 'Vermont');
1741 INSERT INTO `geo_zone_reference` VALUES (60, 223, 'VI', 'Virgin Islands');
1742 INSERT INTO `geo_zone_reference` VALUES (61, 223, 'VA', 'Virginia');
1743 INSERT INTO `geo_zone_reference` VALUES (62, 223, 'WA', 'Washington');
1744 INSERT INTO `geo_zone_reference` VALUES (63, 223, 'WV', 'West Virginia');
1745 INSERT INTO `geo_zone_reference` VALUES (64, 223, 'WI', 'Wisconsin');
1746 INSERT INTO `geo_zone_reference` VALUES (65, 223, 'WY', 'Wyoming');
1747 INSERT INTO `geo_zone_reference` VALUES (66, 38, 'AB', 'Alberta');
1748 INSERT INTO `geo_zone_reference` VALUES (67, 38, 'BC', 'British Columbia');
1749 INSERT INTO `geo_zone_reference` VALUES (68, 38, 'MB', 'Manitoba');
1750 INSERT INTO `geo_zone_reference` VALUES (69, 38, 'NF', 'Newfoundland');
1751 INSERT INTO `geo_zone_reference` VALUES (70, 38, 'NB', 'New Brunswick');
1752 INSERT INTO `geo_zone_reference` VALUES (71, 38, 'NS', 'Nova Scotia');
1753 INSERT INTO `geo_zone_reference` VALUES (72, 38, 'NT', 'Northwest Territories');
1754 INSERT INTO `geo_zone_reference` VALUES (73, 38, 'NU', 'Nunavut');
1755 INSERT INTO `geo_zone_reference` VALUES (74, 38, 'ON', 'Ontario');
1756 INSERT INTO `geo_zone_reference` VALUES (75, 38, 'PE', 'Prince Edward Island');
1757 INSERT INTO `geo_zone_reference` VALUES (76, 38, 'QC', 'Quebec');
1758 INSERT INTO `geo_zone_reference` VALUES (77, 38, 'SK', 'Saskatchewan');
1759 INSERT INTO `geo_zone_reference` VALUES (78, 38, 'YT', 'Yukon Territory');
1760 INSERT INTO `geo_zone_reference` VALUES (79, 61, 'QLD', 'Queensland');
1761 INSERT INTO `geo_zone_reference` VALUES (80, 61, 'SA', 'South Australia');
1762 INSERT INTO `geo_zone_reference` VALUES (81, 61, 'ACT', 'Australian Capital Territory');
1763 INSERT INTO `geo_zone_reference` VALUES (82, 61, 'VIC', 'Victoria');
1765 -- --------------------------------------------------------
1767 -- 
1768 -- Table structure for table `groups`
1769 -- 
1771 DROP TABLE IF EXISTS `groups`;
1772 CREATE TABLE `groups` (
1773   `id` bigint(20) NOT NULL auto_increment,
1774   `name` longtext,
1775   `user` longtext,
1776   PRIMARY KEY  (`id`)
1777 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1779 -- --------------------------------------------------------
1781 -- 
1782 -- Table structure for table `history_data`
1783 -- 
1785 DROP TABLE IF EXISTS `history_data`;
1786 CREATE TABLE `history_data` (
1787   `id` bigint(20) NOT NULL auto_increment,
1788   `coffee` longtext,
1789   `tobacco` longtext,
1790   `alcohol` longtext,
1791   `sleep_patterns` longtext,
1792   `exercise_patterns` longtext,
1793   `seatbelt_use` longtext,
1794   `counseling` longtext,
1795   `hazardous_activities` longtext,
1796   `recreational_drugs` longtext,
1797   `last_breast_exam` varchar(255) default NULL,
1798   `last_mammogram` varchar(255) default NULL,
1799   `last_gynocological_exam` varchar(255) default NULL,
1800   `last_rectal_exam` varchar(255) default NULL,
1801   `last_prostate_exam` varchar(255) default NULL,
1802   `last_physical_exam` varchar(255) default NULL,
1803   `last_sigmoidoscopy_colonoscopy` varchar(255) default NULL,
1804   `last_ecg` varchar(255) default NULL,
1805   `last_cardiac_echo` varchar(255) default NULL,
1806   `last_retinal` varchar(255) default NULL,
1807   `last_fluvax` varchar(255) default NULL,
1808   `last_pneuvax` varchar(255) default NULL,
1809   `last_ldl` varchar(255) default NULL,
1810   `last_hemoglobin` varchar(255) default NULL,
1811   `last_psa` varchar(255) default NULL,
1812   `last_exam_results` varchar(255) default NULL,
1813   `history_mother` longtext,
1814   `history_father` longtext,
1815   `history_siblings` longtext,
1816   `history_offspring` longtext,
1817   `history_spouse` longtext,
1818   `relatives_cancer` longtext,
1819   `relatives_tuberculosis` longtext,
1820   `relatives_diabetes` longtext,
1821   `relatives_high_blood_pressure` longtext,
1822   `relatives_heart_problems` longtext,
1823   `relatives_stroke` longtext,
1824   `relatives_epilepsy` longtext,
1825   `relatives_mental_illness` longtext,
1826   `relatives_suicide` longtext,
1827   `cataract_surgery` datetime default NULL,
1828   `tonsillectomy` datetime default NULL,
1829   `cholecystestomy` datetime default NULL,
1830   `heart_surgery` datetime default NULL,
1831   `hysterectomy` datetime default NULL,
1832   `hernia_repair` datetime default NULL,
1833   `hip_replacement` datetime default NULL,
1834   `knee_replacement` datetime default NULL,
1835   `appendectomy` datetime default NULL,
1836   `date` datetime default NULL,
1837   `pid` bigint(20) NOT NULL default '0',
1838   `name_1` varchar(255) default NULL,
1839   `value_1` varchar(255) default NULL,
1840   `name_2` varchar(255) default NULL,
1841   `value_2` varchar(255) default NULL,
1842   `additional_history` text,
1843   `exams`      text         NOT NULL DEFAULT '',
1844   `usertext11` varchar(255) NOT NULL DEFAULT '',
1845   `usertext12` varchar(255) NOT NULL DEFAULT '',
1846   `usertext13` varchar(255) NOT NULL DEFAULT '',
1847   `usertext14` varchar(255) NOT NULL DEFAULT '',
1848   `usertext15` varchar(255) NOT NULL DEFAULT '',
1849   `usertext16` varchar(255) NOT NULL DEFAULT '',
1850   `usertext17` varchar(255) NOT NULL DEFAULT '',
1851   `usertext18` varchar(255) NOT NULL DEFAULT '',
1852   `usertext19` varchar(255) NOT NULL DEFAULT '',
1853   `usertext20` varchar(255) NOT NULL DEFAULT '',
1854   `usertext21` varchar(255) NOT NULL DEFAULT '',
1855   `usertext22` varchar(255) NOT NULL DEFAULT '',
1856   `usertext23` varchar(255) NOT NULL DEFAULT '',
1857   `usertext24` varchar(255) NOT NULL DEFAULT '',
1858   `usertext25` varchar(255) NOT NULL DEFAULT '',
1859   `usertext26` varchar(255) NOT NULL DEFAULT '',
1860   `usertext27` varchar(255) NOT NULL DEFAULT '',
1861   `usertext28` varchar(255) NOT NULL DEFAULT '',
1862   `usertext29` varchar(255) NOT NULL DEFAULT '',
1863   `usertext30` varchar(255) NOT NULL DEFAULT '',
1864   `userdate11` date DEFAULT NULL,
1865   `userdate12` date DEFAULT NULL,
1866   `userdate13` date DEFAULT NULL,
1867   `userdate14` date DEFAULT NULL,
1868   `userdate15` date DEFAULT NULL,
1869   `userarea11` text NOT NULL DEFAULT '',
1870   `userarea12` text NOT NULL DEFAULT '',
1871   PRIMARY KEY  (`id`),
1872   KEY `pid` (`pid`)
1873 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1875 -- --------------------------------------------------------
1877 -- 
1878 -- Table structure for table `immunizations`
1879 -- 
1881 DROP TABLE IF EXISTS `immunizations`;
1882 CREATE TABLE `immunizations` (
1883   `id` bigint(20) NOT NULL auto_increment,
1884   `patient_id` int(11) default NULL,
1885   `administered_date` date default NULL,
1886   `immunization_id` int(11) default NULL,
1887   `cvx_code` int(11) default NULL,
1888   `manufacturer` varchar(100) default NULL,
1889   `lot_number` varchar(50) default NULL,
1890   `administered_by_id` bigint(20) default NULL,
1891   `administered_by` VARCHAR( 255 ) default NULL COMMENT 'Alternative to administered_by_id',
1892   `education_date` date default NULL,
1893   `vis_date` date default NULL COMMENT 'Date of VIS Statement', 
1894   `note` text,
1895   `create_date` datetime default NULL,
1896   `update_date` timestamp NOT NULL,
1897   `created_by` bigint(20) default NULL,
1898   `updated_by` bigint(20) default NULL,
1899   PRIMARY KEY  (`id`)
1900 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1902 -- --------------------------------------------------------
1904 -- 
1905 -- Table structure for table `insurance_companies`
1906 -- 
1908 DROP TABLE IF EXISTS `insurance_companies`;
1909 CREATE TABLE `insurance_companies` (
1910   `id` int(11) NOT NULL default '0',
1911   `name` varchar(255) default NULL,
1912   `attn` varchar(255) default NULL,
1913   `cms_id` varchar(15) default NULL,
1914   `freeb_type` tinyint(2) default NULL,
1915   `x12_receiver_id` varchar(25) default NULL,
1916   `x12_default_partner_id` int(11) default NULL,
1917   `alt_cms_id` varchar(15) NOT NULL DEFAULT '',
1918   PRIMARY KEY  (`id`)
1919 ) ENGINE=MyISAM;
1921 -- --------------------------------------------------------
1923 -- 
1924 -- Table structure for table `insurance_data`
1925 -- 
1927 DROP TABLE IF EXISTS `insurance_data`;
1928 CREATE TABLE `insurance_data` (
1929   `id` bigint(20) NOT NULL auto_increment,
1930   `type` enum('primary','secondary','tertiary') default NULL,
1931   `provider` varchar(255) default NULL,
1932   `plan_name` varchar(255) default NULL,
1933   `policy_number` varchar(255) default NULL,
1934   `group_number` varchar(255) default NULL,
1935   `subscriber_lname` varchar(255) default NULL,
1936   `subscriber_mname` varchar(255) default NULL,
1937   `subscriber_fname` varchar(255) default NULL,
1938   `subscriber_relationship` varchar(255) default NULL,
1939   `subscriber_ss` varchar(255) default NULL,
1940   `subscriber_DOB` date default NULL,
1941   `subscriber_street` varchar(255) default NULL,
1942   `subscriber_postal_code` varchar(255) default NULL,
1943   `subscriber_city` varchar(255) default NULL,
1944   `subscriber_state` varchar(255) default NULL,
1945   `subscriber_country` varchar(255) default NULL,
1946   `subscriber_phone` varchar(255) default NULL,
1947   `subscriber_employer` varchar(255) default NULL,
1948   `subscriber_employer_street` varchar(255) default NULL,
1949   `subscriber_employer_postal_code` varchar(255) default NULL,
1950   `subscriber_employer_state` varchar(255) default NULL,
1951   `subscriber_employer_country` varchar(255) default NULL,
1952   `subscriber_employer_city` varchar(255) default NULL,
1953   `copay` varchar(255) default NULL,
1954   `date` date NOT NULL default '0000-00-00',
1955   `pid` bigint(20) NOT NULL default '0',
1956   `subscriber_sex` varchar(25) default NULL,
1957   `accept_assignment` varchar(5) NOT NULL DEFAULT 'TRUE',
1958   PRIMARY KEY  (`id`),
1959   UNIQUE KEY `pid_type_date` (`pid`,`type`,`date`)
1960 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
1962 -- --------------------------------------------------------
1964 -- 
1965 -- Table structure for table `insurance_numbers`
1966 -- 
1968 DROP TABLE IF EXISTS `insurance_numbers`;
1969 CREATE TABLE `insurance_numbers` (
1970   `id` int(11) NOT NULL default '0',
1971   `provider_id` int(11) NOT NULL default '0',
1972   `insurance_company_id` int(11) default NULL,
1973   `provider_number` varchar(20) default NULL,
1974   `rendering_provider_number` varchar(20) default NULL,
1975   `group_number` varchar(20) default NULL,
1976   `provider_number_type` varchar(4) default NULL,
1977   `rendering_provider_number_type` varchar(4) default NULL,
1978   PRIMARY KEY  (`id`)
1979 ) ENGINE=MyISAM;
1981 -- --------------------------------------------------------
1983 -- 
1984 -- Table structure for table `integration_mapping`
1985 -- 
1987 DROP TABLE IF EXISTS `integration_mapping`;
1988 CREATE TABLE `integration_mapping` (
1989   `id` int(11) NOT NULL default '0',
1990   `foreign_id` int(11) NOT NULL default '0',
1991   `foreign_table` varchar(125) default NULL,
1992   `local_id` int(11) NOT NULL default '0',
1993   `local_table` varchar(125) default NULL,
1994   PRIMARY KEY  (`id`),
1995   UNIQUE KEY `foreign_id` (`foreign_id`,`foreign_table`,`local_id`,`local_table`)
1996 ) ENGINE=MyISAM;
1998 -- --------------------------------------------------------
2000 -- 
2001 -- Table structure for table `issue_encounter`
2002 -- 
2004 DROP TABLE IF EXISTS `issue_encounter`;
2005 CREATE TABLE `issue_encounter` (
2006   `pid` int(11) NOT NULL,
2007   `list_id` int(11) NOT NULL,
2008   `encounter` int(11) NOT NULL,
2009   `resolved` tinyint(1) NOT NULL,
2010   PRIMARY KEY  (`pid`,`list_id`,`encounter`)
2011 ) ENGINE=MyISAM;
2013 -- --------------------------------------------------------
2015 -- 
2016 -- Table structure for table `lang_constants`
2017 -- 
2019 DROP TABLE IF EXISTS `lang_constants`;
2020 CREATE TABLE `lang_constants` (
2021   `cons_id` int(11) NOT NULL auto_increment,
2022   `constant_name` varchar(255) BINARY default NULL,
2023   UNIQUE KEY `cons_id` (`cons_id`),
2024   KEY `constant_name` (`constant_name`)
2025 ) ENGINE=MyISAM ;
2027 -- 
2028 -- Table structure for table `lang_definitions`
2029 -- 
2031 DROP TABLE IF EXISTS `lang_definitions`;
2032 CREATE TABLE `lang_definitions` (
2033   `def_id` int(11) NOT NULL auto_increment,
2034   `cons_id` int(11) NOT NULL default '0',
2035   `lang_id` int(11) NOT NULL default '0',
2036   `definition` mediumtext,
2037   UNIQUE KEY `def_id` (`def_id`),
2038   KEY `cons_id` (`cons_id`)
2039 ) ENGINE=MyISAM ;
2041 -- 
2042 -- Table structure for table `lang_languages`
2043 -- 
2045 DROP TABLE IF EXISTS `lang_languages`;
2046 CREATE TABLE `lang_languages` (
2047   `lang_id` int(11) NOT NULL auto_increment,
2048   `lang_code` char(2) NOT NULL default '',
2049   `lang_description` varchar(100) default NULL,
2050   UNIQUE KEY `lang_id` (`lang_id`)
2051 ) ENGINE=MyISAM AUTO_INCREMENT=2 ;
2053 -- 
2054 -- Dumping data for table `lang_languages`
2055 -- 
2057 INSERT INTO `lang_languages` VALUES (1, 'en', 'English');
2059 -- --------------------------------------------------------
2062 -- Table structure for table `lang_custom`
2065 DROP TABLE IF EXISTS `lang_custom`;
2066 CREATE TABLE `lang_custom` (
2067   `lang_description` varchar(100) NOT NULL default '',
2068   `lang_code` char(2) NOT NULL default '',
2069   `constant_name` varchar(255) NOT NULL default '',
2070   `definition` mediumtext NOT NULL default ''
2071 ) ENGINE=MyISAM ;
2073 -- --------------------------------------------------------
2075 -- 
2076 -- Table structure for table `layout_options`
2077 -- 
2079 DROP TABLE IF EXISTS `layout_options`;
2080 CREATE TABLE `layout_options` (
2081   `form_id` varchar(31) NOT NULL default '',
2082   `field_id` varchar(31) NOT NULL default '',
2083   `group_name` varchar(31) NOT NULL default '',
2084   `title` varchar(63) NOT NULL default '',
2085   `seq` int(11) NOT NULL default '0',
2086   `data_type` tinyint(3) NOT NULL default '0',
2087   `uor` tinyint(1) NOT NULL default '1',
2088   `fld_length` int(11) NOT NULL default '15',
2089   `max_length` int(11) NOT NULL default '0',
2090   `list_id` varchar(31) NOT NULL default '',
2091   `titlecols` tinyint(3) NOT NULL default '1',
2092   `datacols` tinyint(3) NOT NULL default '1',
2093   `default_value` varchar(255) NOT NULL default '',
2094   `edit_options` varchar(36) NOT NULL default '',
2095   `description` text,
2096   PRIMARY KEY  (`form_id`,`field_id`,`seq`)
2097 ) ENGINE=MyISAM;
2099 -- 
2100 -- Dumping data for table `layout_options`
2101 -- 
2102 INSERT INTO `layout_options` VALUES ('DEM', 'title', '1Who', 'Name', 1, 1, 1, 0, 0, 'titles', 1, 1, '', 'N', 'Title');
2103 INSERT INTO `layout_options` VALUES ('DEM', 'fname', '1Who', '', 2, 2, 2, 10, 63, '', 0, 0, '', 'CD', 'First Name');
2104 INSERT INTO `layout_options` VALUES ('DEM', 'mname', '1Who', '', 3, 2, 1, 2, 63, '', 0, 0, '', 'C', 'Middle Name');
2105 INSERT INTO `layout_options` VALUES ('DEM', 'lname', '1Who', '', 4, 2, 2, 10, 63, '', 0, 0, '', 'CD', 'Last Name');
2106 INSERT INTO `layout_options` VALUES ('DEM', 'pubpid', '1Who', 'External ID', 5, 2, 1, 10, 15, '', 1, 1, '', 'ND', 'External identifier');
2107 INSERT INTO `layout_options` VALUES ('DEM', 'DOB', '1Who', 'DOB', 6, 4, 2, 10, 10, '', 1, 1, '', 'D', 'Date of Birth');
2108 INSERT INTO `layout_options` VALUES ('DEM', 'sex', '1Who', 'Sex', 7, 1, 2, 0, 0, 'sex', 1, 1, '', 'N', 'Sex');
2109 INSERT INTO `layout_options` VALUES ('DEM', 'ss', '1Who', 'S.S.', 8, 2, 1, 11, 11, '', 1, 1, '', '', 'Social Security Number');
2110 INSERT INTO `layout_options` VALUES ('DEM', 'drivers_license', '1Who', 'License/ID', 9, 2, 1, 15, 63, '', 1, 1, '', '', 'Drivers License or State ID');
2111 INSERT INTO `layout_options` VALUES ('DEM', 'status', '1Who', 'Marital Status', 10, 1, 1, 0, 0, 'marital', 1, 3, '', '', 'Marital Status');
2112 INSERT INTO `layout_options` VALUES ('DEM', 'genericname1', '1Who', 'User Defined', 11, 2, 1, 15, 63, '', 1, 3, '', '', 'User Defined Field');
2113 INSERT INTO `layout_options` VALUES ('DEM', 'genericval1', '1Who', '', 12, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field');
2114 INSERT INTO `layout_options` VALUES ('DEM', 'genericname2', '1Who', '', 13, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field');
2115 INSERT INTO `layout_options` VALUES ('DEM', 'genericval2', '1Who', '', 14, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field');
2116 INSERT INTO `layout_options` VALUES ('DEM', 'squad', '1Who', 'Squad', 15, 13, 0, 0, 0, '', 1, 3, '', '', 'Squad Membership');
2117 INSERT INTO `layout_options` VALUES ('DEM', 'pricelevel', '1Who', 'Price Level', 16, 1, 0, 0, 0, 'pricelevel', 1, 1, '', '', 'Discount Level');
2118 INSERT INTO `layout_options` VALUES ('DEM', 'street', '2Contact', 'Address', 1, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number');
2119 INSERT INTO `layout_options` VALUES ('DEM', 'city', '2Contact', 'City', 2, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name');
2120 INSERT INTO `layout_options` VALUES ('DEM', 'state', '2Contact', 'State', 3, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality');
2121 INSERT INTO `layout_options` VALUES ('DEM', 'postal_code', '2Contact', 'Postal Code', 4, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code');
2122 INSERT INTO `layout_options` VALUES ('DEM', 'country_code', '2Contact', 'Country', 5, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country');
2123 INSERT INTO `layout_options` VALUES ('DEM', 'mothersname', '2Contact', 'Mother''s Name', 6, 2, 1, 20, 63, '', 1, 1, '', '', '');
2124 INSERT INTO `layout_options` VALUES ('DEM', 'guardiansname', '2Contact', 'Guardian''s Name', 7, 2, 1, 20, 63, '', 1, 1, '', '', '');
2125 INSERT INTO `layout_options` VALUES ('DEM', 'contact_relationship', '2Contact', 'Emergency Contact', 8, 2, 1, 10, 63, '', 1, 1, '', 'C', 'Emergency Contact Person');
2126 INSERT INTO `layout_options` VALUES ('DEM', 'phone_contact', '2Contact', 'Emergency Phone', 9, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Emergency Contact Phone Number');
2127 INSERT INTO `layout_options` VALUES ('DEM', 'phone_home', '2Contact', 'Home Phone', 10, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Home Phone Number');
2128 INSERT INTO `layout_options` VALUES ('DEM', 'phone_biz', '2Contact', 'Work Phone', 11, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Work Phone Number');
2129 INSERT INTO `layout_options` VALUES ('DEM', 'phone_cell', '2Contact', 'Mobile Phone', 12, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Cell Phone Number');
2130 INSERT INTO `layout_options` VALUES ('DEM', 'email', '2Contact', 'Contact Email', 13, 2, 1, 30, 95, '', 1, 1, '', '', 'Contact Email Address');
2131 INSERT INTO `layout_options` VALUES ('DEM', 'providerID', '3Choices', 'Provider', 1, 11, 1, 0, 0, '', 1, 3, '', '', 'Referring Provider');
2132 INSERT INTO `layout_options` VALUES ('DEM', 'pharmacy_id', '3Choices', 'Pharmacy', 2, 12, 1, 0, 0, '', 1, 3, '', '', 'Preferred Pharmacy');
2133 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?');
2134 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_voice', '3Choices', 'Allow Voice Message', 4, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow telephone messages?');
2135 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_message', '3Choices', 'Leave Message With', 5, 2, 1, 20, 63, '', 1, 1, '', '', 'With whom may we leave a message?');
2136 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_mail', '3Choices', 'Allow Mail Message', 6, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow email messages?');
2137 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_allowsms'  , '3Choices', 'Allow SMS'  , 7, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow SMS (text messages)?');
2138 INSERT INTO `layout_options` VALUES ('DEM', 'hipaa_allowemail', '3Choices', 'Allow Email', 8, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow Email?');
2140 INSERT INTO `layout_options` VALUES ('DEM', 'allow_imm_reg_use', '3Choices', 'Allow Immunization Registry Use', 9, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '');
2141 INSERT INTO `layout_options` VALUES ('DEM', 'allow_imm_info_share', '3Choices', 'Allow Immunization Info Sharing', 10, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '');
2142 INSERT INTO `layout_options` VALUES ('DEM', 'allow_health_info_ex', '3Choices', 'Allow Health Information Exchange', 11, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '');
2143 INSERT INTO `layout_options` VALUES ('DEM', 'allow_patient_portal', '3Choices', 'Allow Patient Portal', 12, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '');
2144 INSERT INTO `layout_options` VALUES ('DEM', 'occupation', '4Employer', 'Occupation', 1, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Occupation');
2145 INSERT INTO `layout_options` VALUES ('DEM', 'em_name', '4Employer', 'Employer Name', 2, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Employer Name');
2146 INSERT INTO `layout_options` VALUES ('DEM', 'em_street', '4Employer', 'Employer Address', 3, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number');
2147 INSERT INTO `layout_options` VALUES ('DEM', 'em_city', '4Employer', 'City', 4, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name');
2148 INSERT INTO `layout_options` VALUES ('DEM', 'em_state', '4Employer', 'State', 5, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality');
2149 INSERT INTO `layout_options` VALUES ('DEM', 'em_postal_code', '4Employer', 'Postal Code', 6, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code');
2150 INSERT INTO `layout_options` VALUES ('DEM', 'em_country', '4Employer', 'Country', 7, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country');
2151 INSERT INTO `layout_options` VALUES ('DEM', 'language', '5Stats', 'Language', 1, 26, 1, 0, 0, 'language', 1, 1, '', '', 'Preferred Language');
2152 INSERT INTO `layout_options` VALUES ('DEM', 'ethnicity', '5Stats', 'Ethnicity', 2, 33, 1, 0, 0, 'ethnicity', 1, 1, '', '', 'Ethnicity');
2153 INSERT INTO `layout_options` VALUES ('DEM', 'race', '5Stats', 'Race', 3, 33, 1, 0, 0, 'race', 1, 1, '', '', 'Race');
2154 INSERT INTO `layout_options` VALUES ('DEM', 'financial_review', '5Stats', 'Financial Review Date', 4, 2, 1, 10, 10, '', 1, 1, '', 'D', 'Financial Review Date');
2155 INSERT INTO `layout_options` VALUES ('DEM', 'family_size', '5Stats', 'Family Size', 4, 2, 1, 20, 63, '', 1, 1, '', '', 'Family Size');
2156 INSERT INTO `layout_options` VALUES ('DEM', 'monthly_income', '5Stats', 'Monthly Income', 5, 2, 1, 20, 63, '', 1, 1, '', '', 'Monthly Income');
2157 INSERT INTO `layout_options` VALUES ('DEM', 'homeless', '5Stats', 'Homeless, etc.', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'Homeless or similar?');
2158 INSERT INTO `layout_options` VALUES ('DEM', 'interpretter', '5Stats', 'Interpreter', 7, 2, 1, 20, 63, '', 1, 1, '', '', 'Interpreter needed?');
2159 INSERT INTO `layout_options` VALUES ('DEM', 'migrantseasonal', '5Stats', 'Migrant/Seasonal', 8, 2, 1, 20, 63, '', 1, 1, '', '', 'Migrant or seasonal worker?');
2160 INSERT INTO `layout_options` VALUES ('DEM', 'contrastart', '5Stats', 'Contraceptives Start',9,4,0,10,10,'',1,1,'','','Date contraceptive services initially provided');
2161 INSERT INTO `layout_options` VALUES ('DEM', 'referral_source', '5Stats', 'Referral Source',10, 26, 1, 0, 0, 'refsource', 1, 1, '', '', 'How did they hear about us');
2162 INSERT INTO `layout_options` VALUES ('DEM', 'vfc', '5Stats', 'VFC', 12, 1, 1, 20, 0, 'eligibility', 1, 1, '', '', 'Eligibility status for Vaccine for Children supplied vaccine');
2163 INSERT INTO `layout_options` VALUES ('DEM', 'deceased_date', '6Misc', 'Date Deceased', 1, 4, 1, 20, 20, '', 1, 3, '', 'D', 'If person is deceased, then enter date of death.');
2164 INSERT INTO `layout_options` VALUES ('DEM', 'deceased_reason', '6Misc', 'Reason Deceased', 2, 2, 1, 30, 255, '', 1, 3, '', '', 'Reason for Death');
2165 INSERT INTO `layout_options` VALUES ('DEM', 'usertext1', '6Misc', 'User Defined Text 1', 3, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined');
2166 INSERT INTO `layout_options` VALUES ('DEM', 'usertext2', '6Misc', 'User Defined Text 2', 4, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined');
2167 INSERT INTO `layout_options` VALUES ('DEM', 'usertext3', '6Misc', 'User Defined Text 3', 5,2,0,10,63,'',1,1,'','','User Defined');
2168 INSERT INTO `layout_options` VALUES ('DEM', 'usertext4', '6Misc', 'User Defined Text 4', 6,2,0,10,63,'',1,1,'','','User Defined');
2169 INSERT INTO `layout_options` VALUES ('DEM', 'usertext5', '6Misc', 'User Defined Text 5', 7,2,0,10,63,'',1,1,'','','User Defined');
2170 INSERT INTO `layout_options` VALUES ('DEM', 'usertext6', '6Misc', 'User Defined Text 6', 8,2,0,10,63,'',1,1,'','','User Defined');
2171 INSERT INTO `layout_options` VALUES ('DEM', 'usertext7', '6Misc', 'User Defined Text 7', 9,2,0,10,63,'',1,1,'','','User Defined');
2172 INSERT INTO `layout_options` VALUES ('DEM', 'usertext8', '6Misc', 'User Defined Text 8',10,2,0,10,63,'',1,1,'','','User Defined');
2173 INSERT INTO `layout_options` VALUES ('DEM', 'userlist1', '6Misc', 'User Defined List 1',11, 1, 0, 0, 0, 'userlist1', 1, 1, '', '', 'User Defined');
2174 INSERT INTO `layout_options` VALUES ('DEM', 'userlist2', '6Misc', 'User Defined List 2',12, 1, 0, 0, 0, 'userlist2', 1, 1, '', '', 'User Defined');
2175 INSERT INTO `layout_options` VALUES ('DEM', 'userlist3', '6Misc', 'User Defined List 3',13, 1, 0, 0, 0, 'userlist3', 1, 1, '', '' , 'User Defined');
2176 INSERT INTO `layout_options` VALUES ('DEM', 'userlist4', '6Misc', 'User Defined List 4',14, 1, 0, 0, 0, 'userlist4', 1, 1, '', '' , 'User Defined');
2177 INSERT INTO `layout_options` VALUES ('DEM', 'userlist5', '6Misc', 'User Defined List 5',15, 1, 0, 0, 0, 'userlist5', 1, 1, '', '' , 'User Defined');
2178 INSERT INTO `layout_options` VALUES ('DEM', 'userlist6', '6Misc', 'User Defined List 6',16, 1, 0, 0, 0, 'userlist6', 1, 1, '', '' , 'User Defined');
2179 INSERT INTO `layout_options` VALUES ('DEM', 'userlist7', '6Misc', 'User Defined List 7',17, 1, 0, 0, 0, 'userlist7', 1, 1, '', '' , 'User Defined');
2180 INSERT INTO `layout_options` VALUES ('DEM', 'regdate'  , '6Misc', 'Registration Date'  ,18, 4, 0,10,10, ''         , 1, 1, '', 'D', 'Start Date at This Clinic');
2183 INSERT INTO layout_options VALUES ('REF','refer_date'      ,'1Referral','Referral Date'                  , 1, 4,2, 0,  0,''         ,1,1,'C','D','Date of referral');
2184 INSERT INTO layout_options VALUES ('REF','refer_from'      ,'1Referral','Refer By'                       , 2,10,2, 0,  0,''         ,1,1,'' ,'' ,'Referral By');
2185 INSERT INTO layout_options VALUES ('REF','refer_external'  ,'1Referral','External Referral'              , 3, 1,1, 0,  0,'boolean'  ,1,1,'' ,'' ,'External referral?');
2186 INSERT INTO layout_options VALUES ('REF','refer_to'        ,'1Referral','Refer To'                       , 4,14,2, 0,  0,''         ,1,1,'' ,'' ,'Referral To');
2187 INSERT INTO layout_options VALUES ('REF','body'            ,'1Referral','Reason'                         , 5, 3,2,30,  3,''         ,1,1,'' ,'' ,'Reason for referral');
2188 INSERT INTO layout_options VALUES ('REF','refer_diag'      ,'1Referral','Referrer Diagnosis'             , 6, 2,1,30,255,''         ,1,1,'' ,'X','Referrer diagnosis');
2189 INSERT INTO layout_options VALUES ('REF','refer_risk_level','1Referral','Risk Level'                     , 7, 1,1, 0,  0,'risklevel',1,1,'' ,'' ,'Level of urgency');
2190 INSERT INTO layout_options VALUES ('REF','refer_vitals'    ,'1Referral','Include Vitals'                 , 8, 1,1, 0,  0,'boolean'  ,1,1,'' ,'' ,'Include vitals data?');
2191 INSERT INTO layout_options VALUES ('REF','refer_related_code','1Referral','Requested Service'            , 9,15,1,30,255,''         ,1,1,'' ,'' ,'Billing Code for Requested Service');
2192 INSERT INTO layout_options VALUES ('REF','reply_date'      ,'2Counter-Referral','Reply Date'             ,10, 4,1, 0,  0,''         ,1,1,'' ,'D','Date of reply');
2193 INSERT INTO layout_options VALUES ('REF','reply_from'      ,'2Counter-Referral','Reply From'             ,11, 2,1,30,255,''         ,1,1,'' ,'' ,'Who replied?');
2194 INSERT INTO layout_options VALUES ('REF','reply_init_diag' ,'2Counter-Referral','Presumed Diagnosis'     ,12, 2,1,30,255,''         ,1,1,'' ,'' ,'Presumed diagnosis by specialist');
2195 INSERT INTO layout_options VALUES ('REF','reply_final_diag','2Counter-Referral','Final Diagnosis'        ,13, 2,1,30,255,''         ,1,1,'' ,'' ,'Final diagnosis by specialist');
2196 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?');
2197 INSERT INTO layout_options VALUES ('REF','reply_findings'  ,'2Counter-Referral','Findings'               ,15, 3,1,30,  3,''         ,1,1,'' ,'' ,'Findings by specialist');
2198 INSERT INTO layout_options VALUES ('REF','reply_services'  ,'2Counter-Referral','Services Provided'      ,16, 3,1,30,  3,''         ,1,1,'' ,'' ,'Service provided by specialist');
2199 INSERT INTO layout_options VALUES ('REF','reply_recommend' ,'2Counter-Referral','Recommendations'        ,17, 3,1,30,  3,''         ,1,1,'' ,'' ,'Recommendations by specialist');
2200 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');
2202 INSERT INTO layout_options VALUES ('HIS','usertext11','1General','Risk Factors',1,21,1,0,0,'riskfactors',1,1,'','' ,'Risk Factors');
2203 INSERT INTO layout_options VALUES ('HIS','exams'     ,'1General','Exams/Tests' ,2,23,1,0,0,'exams'      ,1,1,'','' ,'Exam and test results');
2204 INSERT INTO layout_options VALUES ('HIS','history_father'   ,'2Family History','Father'   ,1, 2,1,20,255,'',1,1,'','' ,'');
2205 INSERT INTO layout_options VALUES ('HIS','history_mother'   ,'2Family History','Mother'   ,2, 2,1,20,255,'',1,1,'','' ,'');
2206 INSERT INTO layout_options VALUES ('HIS','history_siblings' ,'2Family History','Siblings' ,3, 2,1,20,255,'',1,1,'','' ,'');
2207 INSERT INTO layout_options VALUES ('HIS','history_spouse'   ,'2Family History','Spouse'   ,4, 2,1,20,255,'',1,1,'','' ,'');
2208 INSERT INTO layout_options VALUES ('HIS','history_offspring','2Family History','Offspring',5, 2,1,20,255,'',1,3,'','' ,'');
2209 INSERT INTO layout_options VALUES ('HIS','relatives_cancer'             ,'3Relatives','Cancer'             ,1, 2,1,20,255,'',1,1,'','' ,'');
2210 INSERT INTO layout_options VALUES ('HIS','relatives_tuberculosis'       ,'3Relatives','Tuberculosis'       ,2, 2,1,20,255,'',1,1,'','' ,'');
2211 INSERT INTO layout_options VALUES ('HIS','relatives_diabetes'           ,'3Relatives','Diabetes'           ,3, 2,1,20,255,'',1,1,'','' ,'');
2212 INSERT INTO layout_options VALUES ('HIS','relatives_high_blood_pressure','3Relatives','High Blood Pressure',4, 2,1,20,255,'',1,1,'','' ,'');
2213 INSERT INTO layout_options VALUES ('HIS','relatives_heart_problems'     ,'3Relatives','Heart Problems'     ,5, 2,1,20,255,'',1,1,'','' ,'');
2214 INSERT INTO layout_options VALUES ('HIS','relatives_stroke'             ,'3Relatives','Stroke'             ,6, 2,1,20,255,'',1,1,'','' ,'');
2215 INSERT INTO layout_options VALUES ('HIS','relatives_epilepsy'           ,'3Relatives','Epilepsy'           ,7, 2,1,20,255,'',1,1,'','' ,'');
2216 INSERT INTO layout_options VALUES ('HIS','relatives_mental_illness'     ,'3Relatives','Mental Illness'     ,8, 2,1,20,255,'',1,1,'','' ,'');
2217 INSERT INTO layout_options VALUES ('HIS','relatives_suicide'            ,'3Relatives','Suicide'            ,9, 2,1,20,255,'',1,3,'','' ,'');
2218 INSERT INTO layout_options VALUES ('HIS','coffee'              ,'4Lifestyle','Coffee'              ,2,28,1,20,255,'',1,3,'','' ,'Caffeine consumption');
2219 INSERT INTO layout_options VALUES ('HIS','tobacco'             ,'4Lifestyle','Tobacco'             ,1,32,1,0,255,'smoking_status',1,3,'','' ,'Tobacco use');
2220 INSERT INTO layout_options VALUES ('HIS','alcohol'             ,'4Lifestyle','Alcohol'             ,3,28,1,20,255,'',1,3,'','' ,'Alcohol consumption');
2221 INSERT INTO layout_options VALUES ('HIS','recreational_drugs'  ,'4Lifestyle','Recreational Drugs'  ,4,28,1,20,255,'',1,3,'','' ,'Recreational drug use');
2222 INSERT INTO layout_options VALUES ('HIS','counseling'          ,'4Lifestyle','Counseling'          ,5,28,1,20,255,'',1,3,'','' ,'Counseling activities');
2223 INSERT INTO layout_options VALUES ('HIS','exercise_patterns'   ,'4Lifestyle','Exercise Patterns'   ,6,28,1,20,255,'',1,3,'','' ,'Exercise patterns');
2224 INSERT INTO layout_options VALUES ('HIS','hazardous_activities','4Lifestyle','Hazardous Activities',7,28,1,20,255,'',1,3,'','' ,'Hazardous activities');
2225 INSERT INTO layout_options VALUES ('HIS','sleep_patterns'      ,'4Lifestyle','Sleep Patterns'      ,8, 2,1,20,255,'',1,3,'','' ,'Sleep patterns');
2226 INSERT INTO layout_options VALUES ('HIS','seatbelt_use'        ,'4Lifestyle','Seatbelt Use'        ,9, 2,1,20,255,'',1,3,'','' ,'Seatbelt use');
2227 INSERT INTO layout_options VALUES ('HIS','name_1'            ,'5Other','Name/Value'        ,1, 2,1,10,255,'',1,1,'','' ,'Name 1' );
2228 INSERT INTO layout_options VALUES ('HIS','value_1'           ,'5Other',''                  ,2, 2,1,10,255,'',0,0,'','' ,'Value 1');
2229 INSERT INTO layout_options VALUES ('HIS','name_2'            ,'5Other','Name/Value'        ,3, 2,1,10,255,'',1,1,'','' ,'Name 2' );
2230 INSERT INTO layout_options VALUES ('HIS','value_2'           ,'5Other',''                  ,4, 2,1,10,255,'',0,0,'','' ,'Value 2');
2231 INSERT INTO layout_options VALUES ('HIS','additional_history','5Other','Additional History',5, 3,1,30,  3,'',1,3,'' ,'' ,'Additional history notes');
2232 INSERT INTO layout_options VALUES ('HIS','userarea11'        ,'5Other','User Defined Area 11',6,3,0,30,3,'',1,3,'','','User Defined');
2233 INSERT INTO layout_options VALUES ('HIS','userarea12'        ,'5Other','User Defined Area 12',7,3,0,30,3,'',1,3,'','','User Defined');
2235 -- --------------------------------------------------------
2237 -- 
2238 -- Table structure for table `list_options`
2239 -- 
2241 DROP TABLE IF EXISTS `list_options`;
2242 CREATE TABLE `list_options` (
2243   `list_id` varchar(31) NOT NULL default '',
2244   `option_id` varchar(31) NOT NULL default '',
2245   `title` varchar(255) NOT NULL default '',
2246   `seq` int(11) NOT NULL default '0',
2247   `is_default` tinyint(1) NOT NULL default '0',
2248   `option_value` float NOT NULL default '0',
2249   `mapping` varchar(31) NOT NULL DEFAULT '',
2250   `notes` varchar(255) NOT NULL DEFAULT '',
2251   PRIMARY KEY  (`list_id`,`option_id`)
2252 ) ENGINE=MyISAM;
2254 -- 
2255 -- Dumping data for table `list_options`
2256 -- 
2258 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('yesno', 'NO', 'NO', 1, 0);
2259 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('yesno', 'YES', 'YES', 2, 0);
2260 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Mr.', 'Mr.', 1, 0);
2261 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Mrs.', 'Mrs.', 2, 0);
2262 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Ms.', 'Ms.', 3, 0);
2263 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('titles', 'Dr.', 'Dr.', 4, 0);
2264 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sex', 'Female', 'Female', 1, 0);
2265 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sex', 'Male', 'Male', 2, 0);
2266 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'married', 'Married', 1, 0);
2267 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'single', 'Single', 2, 0);
2268 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'divorced', 'Divorced', 3, 0);
2269 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'widowed', 'Widowed', 4, 0);
2270 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'separated', 'Separated', 5, 0);
2271 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('marital', 'domestic partner', 'Domestic Partner', 6, 0);
2273 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'armenian', 'Armenian', 10, 0);
2274 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'chinese', 'Chinese', 20, 0);
2275 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'danish', 'Danish', 30, 0);
2276 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'deaf', 'Deaf', 40, 0);
2277 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'English', 'English', 50, 0);
2278 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'farsi', 'Farsi', 60, 0);
2279 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'french', 'French', 70, 0);
2280 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'german', 'German', 80, 0);
2281 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'greek', 'Greek', 90, 0);
2282 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'hmong', 'Hmong', 100, 0);
2283 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'italian', 'Italian', 110, 0);
2284 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'japanese', 'Japanese', 120, 0);
2285 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'korean', 'Korean', 130, 0);
2286 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'laotian', 'Laotian', 140, 0);
2287 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'mien', 'Mien', 150, 0);
2288 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'norwegian', 'Norwegian', 160, 0);
2289 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'othrs', 'Others', 170, 0);
2290 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'portuguese', 'Portuguese', 180, 0);
2291 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'punjabi', 'Punjabi', 190, 0);
2292 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'russian', 'Russian', 200, 0);
2293 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'Spanish', 'Spanish', 210, 0);
2294 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'tagalog', 'Tagalog', 220, 0);
2295 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'turkish', 'Turkish', 230, 0);
2296 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'vietnamese', 'Vietnamese', 240, 0);
2297 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'yiddish', 'Yiddish', 250, 0);
2298 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('language', 'zulu', 'Zulu', 260, 0);
2299 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'aleut', 'ALEUT', 10,  0);
2300 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'amer_indian', 'American Indian', 20, 0);
2301 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Asian', 'Asian', 30, 0);
2302 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Black', 'Black', 40, 0);
2303 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'cambodian', 'Cambodian', 50, 0);
2304 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Caucasian', 'Caucasian', 60, 0);
2305 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'cs_american', 'Central/South American', 70, 0);
2306 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'chinese', 'Chinese', 80, 0);
2307 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'cuban', 'Cuban', 90, 0);
2308 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'eskimo', 'Eskimo', 100, 0);
2309 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'filipino', 'Filipino', 110, 0);
2310 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'guamanian', 'Guamanian', 120, 0);
2311 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'hawaiian', 'Hawaiian', 130, 0);
2312 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'Hispanic', 'Hispanic', 140, 0);
2313 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'othr_us', 'Hispanic - Other (Born in US)', 150, 0);
2314 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'othr_non_us', 'Hispanic - Other (Born outside US)', 160, 0);
2315 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'hmong', 'Hmong', 170, 0);
2316 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'indian', 'Indian', 180, 0);
2317 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'japanese', 'Japanese', 190, 0);
2318 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'korean', 'Korean', 200, 0);
2319 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'laotian', 'Laotian', 210, 0);
2320 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'mexican', 'Mexican/MexAmer/Chicano', 220, 0);
2321 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'mlt-race', 'Multiracial', 230, 0);
2322 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'othr', 'Other', 240, 0);
2323 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'othr_spec', 'Other - Specified', 250, 0);
2324 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'pac_island', 'Pacific Islander', 260, 0);
2325 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'puerto_rican', 'Puerto Rican', 270, 0);
2326 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'refused', 'Refused To State', 280, 0);
2327 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'samoan', 'Samoan', 290, 0);
2328 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'spec', 'Specified', 300, 0);
2329 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'thai', 'Thai', 310, 0);
2330 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'unknown', 'Unknown', 320, 0);
2331 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'unspec', 'Unspecified', 330, 0);
2332 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'vietnamese', 'Vietnamese', 340, 0);
2333 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'white', 'White', 350, 0);
2334 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethrace', 'withheld', 'Withheld', 360, 0);
2336 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist1', 'sample', 'Sample', 1, 0);
2337 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist2', 'sample', 'Sample', 1, 0);
2338 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist3','sample','Sample',1,0);
2339 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist4','sample','Sample',1,0);
2340 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist5','sample','Sample',1,0);
2341 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist6','sample','Sample',1,0);
2342 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('userlist7','sample','Sample',1,0);
2343 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('pricelevel', 'standard', 'Standard', 1, 1);
2344 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('risklevel', 'low', 'Low', 1, 0);
2345 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('risklevel', 'medium', 'Medium', 2, 1);
2346 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('risklevel', 'high', 'High', 3, 0);
2347 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('boolean', '0', 'No', 1, 0);
2348 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('boolean', '1', 'Yes', 2, 0);
2349 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('country', 'USA', 'USA', 1, 0);
2351 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','AL','Alabama'             , 1,0);
2352 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','AK','Alaska'              , 2,0);
2353 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','AZ','Arizona'             , 3,0);
2354 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','AR','Arkansas'            , 4,0);
2355 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','CA','California'          , 5,0);
2356 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','CO','Colorado'            , 6,0);
2357 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','CT','Connecticut'         , 7,0);
2358 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','DE','Delaware'            , 8,0);
2359 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','DC','District of Columbia', 9,0);
2360 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','FL','Florida'             ,10,0);
2361 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','GA','Georgia'             ,11,0);
2362 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','HI','Hawaii'              ,12,0);
2363 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','ID','Idaho'               ,13,0);
2364 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','IL','Illinois'            ,14,0);
2365 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','IN','Indiana'             ,15,0);
2366 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','IA','Iowa'                ,16,0);
2367 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','KS','Kansas'              ,17,0);
2368 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','KY','Kentucky'            ,18,0);
2369 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','LA','Louisiana'           ,19,0);
2370 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','ME','Maine'               ,20,0);
2371 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MD','Maryland'            ,21,0);
2372 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MA','Massachusetts'       ,22,0);
2373 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MI','Michigan'            ,23,0);
2374 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MN','Minnesota'           ,24,0);
2375 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MS','Mississippi'         ,25,0);
2376 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MO','Missouri'            ,26,0);
2377 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','MT','Montana'             ,27,0);
2378 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NE','Nebraska'            ,28,0);
2379 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NV','Nevada'              ,29,0);
2380 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NH','New Hampshire'       ,30,0);
2381 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NJ','New Jersey'          ,31,0);
2382 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NM','New Mexico'          ,32,0);
2383 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NY','New York'            ,33,0);
2384 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','NC','North Carolina'      ,34,0);
2385 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','ND','North Dakota'        ,35,0);
2386 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','OH','Ohio'                ,36,0);
2387 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','OK','Oklahoma'            ,37,0);
2388 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','OR','Oregon'              ,38,0);
2389 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','PA','Pennsylvania'        ,39,0);
2390 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','RI','Rhode Island'        ,40,0);
2391 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','SC','South Carolina'      ,41,0);
2392 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','SD','South Dakota'        ,42,0);
2393 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','TN','Tennessee'           ,43,0);
2394 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','TX','Texas'               ,44,0);
2395 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','UT','Utah'                ,45,0);
2396 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','VT','Vermont'             ,46,0);
2397 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','VA','Virginia'            ,47,0);
2398 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','WA','Washington'          ,48,0);
2399 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','WV','West Virginia'       ,49,0);
2400 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','WI','Wisconsin'           ,50,0);
2401 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('state','WY','Wyoming'             ,51,0);
2403 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Patient'      ,'Patient'      , 1,0);
2404 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Employee'     ,'Employee'     , 2,0);
2405 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Walk-In'      ,'Walk-In'      , 3,0);
2406 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Newspaper'    ,'Newspaper'    , 4,0);
2407 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Radio'        ,'Radio'        , 5,0);
2408 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','T.V.'         ,'T.V.'         , 6,0);
2409 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Direct Mail'  ,'Direct Mail'  , 7,0);
2410 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Coupon'       ,'Coupon'       , 8,0);
2411 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Referral Card','Referral Card', 9,0);
2412 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('refsource','Other'        ,'Other'        ,10,0);
2413 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','vv' ,'Varicose Veins'                      , 1,0);
2414 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','ht' ,'Hypertension'                        , 2,0);
2415 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','db' ,'Diabetes'                            , 3,0);
2416 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','sc' ,'Sickle Cell'                         , 4,0);
2417 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','fib','Fibroids'                            , 5,0);
2418 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','pid','PID (Pelvic Inflammatory Disease)'   , 6,0);
2419 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','mig','Severe Migraine'                     , 7,0);
2420 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','hd' ,'Heart Disease'                       , 8,0);
2421 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','str','Thrombosis/Stroke'                   , 9,0);
2422 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','hep','Hepatitis'                           ,10,0);
2423 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','gb' ,'Gall Bladder Condition'              ,11,0);
2424 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','br' ,'Breast Disease'                      ,12,0);
2425 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','dpr','Depression'                          ,13,0);
2426 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','all','Allergies'                           ,14,0);
2427 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','inf','Infertility'                         ,15,0);
2428 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','ast','Asthma'                              ,16,0);
2429 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','ep' ,'Epilepsy'                            ,17,0);
2430 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','cl' ,'Contact Lenses'                      ,18,0);
2431 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','coc','Contraceptive Complication (specify)',19,0);
2432 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('riskfactors','oth','Other (specify)'                     ,20,0);
2433 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'brs','Breast Exam'          , 1,0);
2434 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'cec','Cardiac Echo'         , 2,0);
2435 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'ecg','ECG'                  , 3,0);
2436 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'gyn','Gynecological Exam'   , 4,0);
2437 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'mam','Mammogram'            , 5,0);
2438 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'phy','Physical Exam'        , 6,0);
2439 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'pro','Prostate Exam'        , 7,0);
2440 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'rec','Rectal Exam'          , 8,0);
2441 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'sic','Sigmoid/Colonoscopy'  , 9,0);
2442 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'ret','Retinal Exam'         ,10,0);
2443 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'flu','Flu Vaccination'      ,11,0);
2444 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'pne','Pneumonia Vaccination',12,0);
2445 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'ldl','LDL'                  ,13,0);
2446 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'hem','Hemoglobin'           ,14,0);
2447 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('exams' ,'psa','PSA'                  ,15,0);
2448 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','0',''           ,0,0);
2449 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','1','suspension' ,1,0);
2450 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','2','tablet'     ,2,0);
2451 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','3','capsule'    ,3,0);
2452 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','4','solution'   ,4,0);
2453 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','5','tsp'        ,5,0);
2454 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','6','ml'         ,6,0);
2455 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','7','units'      ,7,0);
2456 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','8','inhalations',8,0);
2457 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','9','gtts(drops)',9,0);
2458 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','10','cream'   ,10,0);
2459 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_form','11','ointment',11,0);
2460 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','0',''          ,0,0);
2461 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','1','mg'    ,1,0);
2462 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','2','mg/1cc',2,0);
2463 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','3','mg/2cc',3,0);
2464 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','4','mg/3cc',4,0);
2465 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','5','mg/4cc',5,0);
2466 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','6','mg/5cc',6,0);
2467 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','7','mcg'   ,7,0);
2468 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_units','8','grams' ,8,0);
2469 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '0',''                 , 0,0);
2470 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '1','Per Oris'         , 1,0);
2471 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '2','Per Rectum'       , 2,0);
2472 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '3','To Skin'          , 3,0);
2473 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '4','To Affected Area' , 4,0);
2474 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '5','Sublingual'       , 5,0);
2475 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '6','OS'               , 6,0);
2476 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '7','OD'               , 7,0);
2477 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '8','OU'               , 8,0);
2478 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route', '9','SQ'               , 9,0);
2479 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','10','IM'               ,10,0);
2480 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','11','IV'               ,11,0);
2481 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','12','Per Nostril'      ,12,0);
2482 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','13','Both Ears',13,0);
2483 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','14','Left Ear' ,14,0);
2484 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_route','15','Right Ear',15,0);
2485 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','0',''      ,0,0);
2486 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','1','b.i.d.',1,0);
2487 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','2','t.i.d.',2,0);
2488 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','3','q.i.d.',3,0);
2489 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','4','q.3h'  ,4,0);
2490 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','5','q.4h'  ,5,0);
2491 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','6','q.5h'  ,6,0);
2492 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','7','q.6h'  ,7,0);
2493 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','8','q.8h'  ,8,0);
2494 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','9','q.d.'  ,9,0);
2495 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','10','a.c.'  ,10,0);
2496 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','11','p.c.'  ,11,0);
2497 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','12','a.m.'  ,12,0);
2498 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','13','p.m.'  ,13,0);
2499 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','14','ante'  ,14,0);
2500 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','15','h'     ,15,0);
2501 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','16','h.s.'  ,16,0);
2502 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','17','p.r.n.',17,0);
2503 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('drug_interval','18','stat'  ,18,0);
2505 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('chartloc','fileroom','File Room'              ,1,0);
2506 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'boolean'      ,'Boolean'            , 1,0);
2507 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'chartloc'     ,'Chart Storage Locations',1,0);
2508 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'country'      ,'Country'            , 2,0);
2509 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_form'    ,'Drug Forms'         , 3,0);
2510 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_units'   ,'Drug Units'         , 4,0);
2511 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_route'   ,'Drug Routes'        , 5,0);
2512 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'drug_interval','Drug Intervals'     , 6,0);
2513 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'exams'        ,'Exams/Tests'        , 7,0);
2514 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'feesheet'     ,'Fee Sheet'          , 8,0);
2515 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'language'     ,'Language'           , 9,0);
2516 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'lbfnames'     ,'Layout-Based Visit Forms',9,0);
2517 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'marital'      ,'Marital Status'     ,10,0);
2518 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'pricelevel'   ,'Price Level'        ,11,0);
2519 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'ethrace'      ,'Race/Ethnicity'     ,12,0);
2520 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'refsource'    ,'Referral Source'    ,13,0);
2521 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'riskfactors'  ,'Risk Factors'       ,14,0);
2522 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'risklevel'    ,'Risk Level'         ,15,0);
2523 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'superbill'    ,'Service Category'   ,16,0);
2524 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'sex'          ,'Sex'                ,17,0);
2525 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'state'        ,'State'              ,18,0);
2526 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'taxrate'      ,'Tax Rate'           ,19,0);
2527 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'titles'       ,'Titles'             ,20,0);
2528 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'yesno'        ,'Yes/No'             ,21,0);
2529 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist1'    ,'User Defined List 1',22,0);
2530 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist2'    ,'User Defined List 2',23,0);
2531 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist3'    ,'User Defined List 3',24,0);
2532 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist4'    ,'User Defined List 4',25,0);
2533 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist5'    ,'User Defined List 5',26,0);
2534 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist6'    ,'User Defined List 6',27,0);
2535 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'userlist7'    ,'User Defined List 7',28,0);
2537 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'    ,'adjreason'      ,'Adjustment Reasons',1,0);
2538 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Adm adjust'     ,'Adm adjust'     , 5,1);
2539 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','After hrs calls','After hrs calls',10,1);
2540 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Bad check'      ,'Bad check'      ,15,1);
2541 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Bad debt'       ,'Bad debt'       ,20,1);
2542 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Coll w/o'       ,'Coll w/o'       ,25,1);
2543 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Discount'       ,'Discount'       ,30,1);
2544 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Hardship w/o'   ,'Hardship w/o'   ,35,1);
2545 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Ins adjust'     ,'Ins adjust'     ,40,1);
2546 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Ins bundling'   ,'Ins bundling'   ,45,1);
2547 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Ins overpaid'   ,'Ins overpaid'   ,50,5);
2548 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Ins refund'     ,'Ins refund'     ,55,5);
2549 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Pt overpaid'    ,'Pt overpaid'    ,60,5);
2550 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Pt refund'      ,'Pt refund'      ,65,5);
2551 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Pt released'    ,'Pt released'    ,70,1);
2552 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Sm debt w/o'    ,'Sm debt w/o'    ,75,1);
2553 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','To copay'       ,'To copay'       ,80,2);
2554 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','To ded\'ble'    ,'To ded\'ble'    ,85,3);
2555 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('adjreason','Untimely filing','Untimely filing',90,1);
2557 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'       ,'sub_relation','Subscriber Relationship',18,0);
2558 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','self'        ,'Self'                   , 1,0);
2559 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','spouse'      ,'Spouse'                 , 2,0);
2560 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','child'       ,'Child'                  , 3,0);
2561 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('sub_relation','other'       ,'Other'                  , 4,0);
2563 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'     ,'occurrence','Occurrence'                  ,10,0);
2564 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','0'         ,'Unknown or N/A'              , 5,0);
2565 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','1'         ,'First'                       ,10,0);
2566 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','6'         ,'Early Recurrence (<2 Mo)'    ,15,0);
2567 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','7'         ,'Late Recurrence (2-12 Mo)'   ,20,0);
2568 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','8'         ,'Delayed Recurrence (> 12 Mo)',25,0);
2569 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','4'         ,'Chronic/Recurrent'           ,30,0);
2570 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('occurrence','5'         ,'Acute on Chronic'            ,35,0);
2572 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'  ,'outcome','Outcome'         ,10,0);
2573 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','0'      ,'Unassigned'      , 2,0);
2574 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','1'      ,'Resolved'        , 5,0);
2575 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','2'      ,'Improved'        ,10,0);
2576 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','3'      ,'Status quo'      ,15,0);
2577 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','4'      ,'Worse'           ,20,0);
2578 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('outcome','5'      ,'Pending followup',25,0);
2580 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'    ,'note_type'      ,'Patient Note Types',10,0);
2581 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Unassigned'     ,'Unassigned'        , 1,0);
2582 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Chart Note'     ,'Chart Note'        , 2,0);
2583 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Insurance'      ,'Insurance'         , 3,0);
2584 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','New Document'   ,'New Document'      , 4,0);
2585 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Pharmacy'       ,'Pharmacy'          , 5,0);
2586 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Prior Auth'     ,'Prior Auth'        , 6,0);
2587 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Referral'       ,'Referral'          , 7,0);
2588 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Test Scheduling','Test Scheduling'   , 8,0);
2589 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Bill/Collect'   ,'Bill/Collect'      , 9,0);
2590 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Other'          ,'Other'             ,10,0);
2592 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'        ,'immunizations','Immunizations'           ,  8,0);
2593 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','1'            ,'DTaP 1'                  , 30,0);
2594 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','2'            ,'DTaP 2'                  , 35,0);
2595 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','3'            ,'DTaP 3'                  , 40,0);
2596 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','4'            ,'DTaP 4'                  , 45,0);
2597 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','5'            ,'DTaP 5'                  , 50,0);
2598 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','6'            ,'DT 1'                    ,  5,0);
2599 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','7'            ,'DT 2'                    , 10,0);
2600 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','8'            ,'DT 3'                    , 15,0);
2601 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','9'            ,'DT 4'                    , 20,0);
2602 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','10'           ,'DT 5'                    , 25,0);
2603 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','11'           ,'IPV 1'                   ,110,0);
2604 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','12'           ,'IPV 2'                   ,115,0);
2605 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','13'           ,'IPV 3'                   ,120,0);
2606 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','14'           ,'IPV 4'                   ,125,0);
2607 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','15'           ,'Hib 1'                   , 80,0);
2608 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','16'           ,'Hib 2'                   , 85,0);
2609 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','17'           ,'Hib 3'                   , 90,0);
2610 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','18'           ,'Hib 4'                   , 95,0);
2611 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','19'           ,'Pneumococcal Conjugate 1',140,0);
2612 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','20'           ,'Pneumococcal Conjugate 2',145,0);
2613 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','21'           ,'Pneumococcal Conjugate 3',150,0);
2614 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','22'           ,'Pneumococcal Conjugate 4',155,0);
2615 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','23'           ,'MMR 1'                   ,130,0);
2616 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','24'           ,'MMR 2'                   ,135,0);
2617 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','25'           ,'Varicella 1'             ,165,0);
2618 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','26'           ,'Varicella 2'             ,170,0);
2619 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','27'           ,'Hepatitis B 1'           , 65,0);
2620 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','28'           ,'Hepatitis B 2'           , 70,0);
2621 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','29'           ,'Hepatitis B 3'           , 75,0);
2622 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','30'           ,'Influenza 1'             ,100,0);
2623 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','31'           ,'Influenza 2'             ,105,0);
2624 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','32'           ,'Td'                      ,160,0);
2625 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','33'           ,'Hepatitis A 1'           , 55,0);
2626 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','34'           ,'Hepatitis A 2'           , 60,0);
2627 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('immunizations','35'           ,'Other'                   ,175,0);
2629 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'apptstat','Appointment Statuses', 1,0);
2630 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','-'       ,'- None'              , 5,0);
2631 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','*'       ,'* Reminder done'     ,10,0);
2632 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','+'       ,'+ Chart pulled'      ,15,0);
2633 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','x'       ,'x Canceled'          ,20,0);
2634 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','?'       ,'? No show'           ,25,0);
2635 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','@'       ,'@ Arrived'           ,30,0);
2636 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','~'       ,'~ Arrived late'      ,35,0);
2637 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','!'       ,'! Left w/o visit'    ,40,0);
2638 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','#'       ,'# Ins/fin issue'     ,45,0);
2639 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','<'       ,'< In exam room'      ,50,0);
2640 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','>'       ,'> Checked out'       ,55,0);
2641 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','$'       ,'$ Coding done'       ,60,0);
2642 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('apptstat','%'       ,'% Canceled < 24h'    ,65,0);
2644 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'    ,'warehouse','Warehouses',21,0);
2645 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('warehouse','onsite'   ,'On Site'   , 5,0);
2647 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','abook_type'  ,'Address Book Types'  , 1,0);
2648 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','ord_img','Imaging Service'     , 5,3);
2649 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','ord_imm','Immunization Service',10,3);
2650 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','ord_lab','Lab Service'         ,15,3);
2651 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','spe'    ,'Specialist'          ,20,2);
2652 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','vendor' ,'Vendor'              ,25,3);
2653 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','dist'   ,'Distributor'         ,30,3);
2654 INSERT INTO list_options ( list_id, option_id, title, seq, option_value ) VALUES ('abook_type','oth'    ,'Other'               ,95,1);
2656 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_type','Procedure Types', 1,0);
2657 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_type','grp','Group'          ,10,0);
2658 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_type','ord','Procedure Order',20,0);
2659 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_type','res','Discrete Result',30,0);
2660 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_type','rec','Recommendation' ,40,0);
2662 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_body_site','Procedure Body Sites', 1,0);
2663 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_body_site','arm'    ,'Arm'    ,10,0);
2664 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_body_site','buttock','Buttock',20,0);
2665 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_body_site','oth'    ,'Other'  ,90,0);
2667 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_specimen','Procedure Specimen Types', 1,0);
2668 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_specimen','blood' ,'Blood' ,10,0);
2669 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_specimen','saliva','Saliva',20,0);
2670 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_specimen','urine' ,'Urine' ,30,0);
2671 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_specimen','oth'   ,'Other' ,90,0);
2673 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_route','Procedure Routes', 1,0);
2674 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_route','inj' ,'Injection',10,0);
2675 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_route','oral','Oral'     ,20,0);
2676 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_route','oth' ,'Other'    ,90,0);
2678 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_lat','Procedure Lateralities', 1,0);
2679 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_lat','left' ,'Left'     ,10,0);
2680 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_lat','right','Right'    ,20,0);
2681 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_lat','bilat','Bilateral',30,0);
2683 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','proc_unit','Procedure Units', 1);
2684 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','bool'       ,'Boolean'    ,  5);
2685 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','cu_mm'      ,'CU.MM'      , 10);
2686 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','fl'         ,'FL'         , 20);
2687 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','g_dl'       ,'G/DL'       , 30);
2688 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','gm_dl'      ,'GM/DL'      , 40);
2689 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','hmol_l'     ,'HMOL/L'     , 50);
2690 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','iu_l'       ,'IU/L'       , 60);
2691 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','mg_dl'      ,'MG/DL'      , 70);
2692 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','mil_cu_mm'  ,'Mil/CU.MM'  , 80);
2693 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','percent'    ,'Percent'    , 90);
2694 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','percentile' ,'Percentile' ,100);
2695 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','pg'         ,'PG'         ,110);
2696 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','ratio'      ,'Ratio'      ,120);
2697 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','thous_cu_mm','Thous/CU.MM',130);
2698 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','units'      ,'Units'      ,140);
2699 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','units_l'    ,'Units/L'    ,150);
2700 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','days'       ,'Days'       ,600);
2701 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','weeks'      ,'Weeks'      ,610);
2702 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','months'     ,'Months'     ,620);
2703 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('proc_unit','oth'        ,'Other'      ,990);
2705 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','ord_priority','Order Priorities', 1,0);
2706 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ord_priority','high'  ,'High'  ,10,0);
2707 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ord_priority','normal','Normal',20,0);
2709 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','ord_status','Order Statuses', 1,0);
2710 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ord_status','pending' ,'Pending' ,10,0);
2711 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ord_status','routed'  ,'Routed'  ,20,0);
2712 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ord_status','complete','Complete',30,0);
2713 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ord_status','canceled','Canceled',40,0);
2715 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_rep_status','Procedure Report Statuses', 1,0);
2716 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_rep_status','final'  ,'Final'      ,10,0);
2717 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_rep_status','review' ,'Reviewed'   ,20,0);
2718 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_rep_status','prelim' ,'Preliminary',30,0);
2719 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_rep_status','cancel' ,'Canceled'   ,40,0);
2720 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_rep_status','error'  ,'Error'      ,50,0);
2721 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_rep_status','correct','Corrected'  ,60,0);
2723 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_res_abnormal','Procedure Result Abnormal', 1,0);
2724 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_abnormal','no'  ,'No'  ,10,0);
2725 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_abnormal','yes' ,'Yes' ,20,0);
2726 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_abnormal','high','High',30,0);
2727 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_abnormal','low' ,'Low' ,40,0);
2729 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_res_status','Procedure Result Statuses', 1,0);
2730 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_status','final'     ,'Final'      ,10,0);
2731 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_status','prelim'    ,'Preliminary',20,0);
2732 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_status','cancel'    ,'Canceled'   ,30,0);
2733 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_status','error'     ,'Error'      ,40,0);
2734 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_status','correct'   ,'Corrected'  ,50,0);
2735 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_status','incomplete','Incomplete' ,60,0);
2737 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','proc_res_bool','Procedure Boolean Results', 1,0);
2738 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_bool','neg' ,'Negative',10,0);
2739 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('proc_res_bool','pos' ,'Positive',20,0);
2741 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'         ,'message_status','Message Status',45,0);
2742 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('message_status','Done'           ,'Done'         , 5,0);
2743 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('message_status','Forwarded'      ,'Forwarded'    ,10,0);
2744 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('message_status','New'            ,'New'          ,15,0);
2745 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('message_status','Read'           ,'Read'         ,20,0);
2747 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Lab Results' ,'Lab Results', 15,0);
2748 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','New Orders' ,'New Orders', 20,0);
2749 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('note_type','Patient Reminders' ,'Patient Reminders', 25,0);
2751 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'irnpool','Invoice Reference Number Pools', 1,0);
2752 INSERT INTO list_options ( list_id, option_id, title, seq, is_default, notes ) VALUES ('irnpool','main','Main',1,1,'000001');
2754 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists', 'eligibility', 'Eligibility', 60, 0);
2755 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('eligibility', 'eligible', 'Eligible', 10, 0);
2756 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('eligibility', 'ineligible', 'Ineligible', 20, 0);
2758 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists', 'transactions', 'Transactions', 20, 0);
2759 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'Referral', 'Referral', 10, 0);
2760 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'Patient Request', 'Patient Request', 20, 0);
2761 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'Physician Request', 'Physician Request', 30, 0);
2762 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'Legal', 'Legal', 40, 0);
2763 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'Billing', 'Billing', 50, 0);
2766 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_adjustment_code','Payment Adjustment Code', 1,0);
2767 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_adjustment_code', 'family_payment', 'Family Payment', 20, 0);
2768 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_adjustment_code', 'group_payment', 'Group Payment', 30, 0);
2769 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_adjustment_code', 'insurance_payment', 'Insurance Payment', 40, 0);
2770 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_adjustment_code', 'patient_payment', 'Patient Payment', 50, 0);
2771 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_adjustment_code', 'pre_payment', 'Pre Payment', 60, 0);
2773 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_ins','Payment Ins', 1,0);
2774 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_ins', '0', 'Pat', 40, 0);
2775 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_ins', '1', 'Ins1', 10, 0);
2776 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_ins', '2', 'Ins2', 20, 0);
2777 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_ins', '3', 'Ins3', 30, 0);
2779 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_method','Payment Method', 1,0);
2780 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_method', 'bank_draft', 'Bank Draft', 50, 0);
2781 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_method', 'cash', 'Cash', 20, 0);
2782 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_method', 'check_payment', 'Check Payment', 10, 0);
2783 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_method', 'credit_card', 'Credit Card', 30, 0);
2784 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_method', 'electronic', 'Electronic', 40, 0);
2786 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_sort_by','Payment Sort By', 1,0);
2787 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'check_date', 'Check Date', 20, 0);
2788 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'payer_id', 'Ins Code', 40, 0);
2789 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'payment_method', 'Payment Method', 50, 0);
2790 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'payment_type', 'Paying Entity', 30, 0);
2791 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'pay_total', 'Amount', 70, 0);
2792 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'reference', 'Check Number', 60, 0);
2793 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_sort_by', 'session_id', 'Id', 10, 0);
2795 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_status','Payment Status', 1,0);
2796 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_status', 'fully_paid', 'Fully Paid', 10, 0);
2797 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_status', 'unapplied', 'Unapplied', 20, 0);
2799 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_type','Payment Type', 1,0);
2800 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_type', 'insurance', 'Insurance', 10, 0);
2801 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_type', 'patient', 'Patient', 20, 0);
2803 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists', 'date_master_criteria', 'Date Master Criteria', 33, 1);
2804 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'all', 'All', 10, 0);
2805 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'today', 'Today', 20, 0);
2806 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'this_month_to_date', 'This Month to Date', 30, 0);
2807 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'last_month', 'Last Month', 40, 0);
2808 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'this_week_to_date', 'This Week to Date', 50, 0);
2809 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'this_calendar_year', 'This Calendar Year', 60, 0);
2810 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'last_calendar_year', 'Last Calendar Year', 70, 0);
2811 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('date_master_criteria', 'custom', 'Custom', 80, 0);
2813 -- Clinical Plan Titles
2814 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'clinical_plans','Clinical Plans', 3, 0);
2815 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'dm_plan_cqm', 'Diabetes Mellitus', 5, 0);
2816 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'ckd_plan_cqm', 'Chronic Kidney Disease (CKD)', 10, 0);
2817 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'prevent_plan_cqm', 'Preventative Care', 15, 0);
2818 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'periop_plan_cqm', 'Perioperative Care', 20, 0);
2819 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'rheum_arth_plan_cqm', 'Rheumatoid Arthritis', 25, 0);
2820 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'back_pain_plan_cqm', 'Back Pain', 30, 0);
2821 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'cabg_plan_cqm', 'Coronary Artery Bypass Graft (CABG)', 35, 0);
2822 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'dm_plan', 'Diabetes Mellitus', 500, 0);
2823 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_plans', 'prevent_plan', 'Preventative Care', 510, 0);
2825 -- Clinical Rule Titles
2826 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'clinical_rules','Clinical Rules', 3, 0);
2827 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'problem_list_amc', 'Maintain an up-to-date problem list of current and active diagnoses.', 5, 0);
2828 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'med_list_amc', 'Maintain active medication list.', 10, 0);
2829 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'med_allergy_list_amc', 'Maintain active medication allergy list.', 15, 0);
2830 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'record_vitals_amc', 'Record and chart changes in vital signs.', 20, 0);
2831 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'record_smoke_amc', 'Record smoking status for patients 13 years old or older.', 25, 0);
2832 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'lab_result_amc', 'Incorporate clinical lab-test results into certified EHR technology as structured data.', 30, 0);
2833 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'med_reconc_amc', 'The EP, eligible hospital or CAH who receives a patient from another setting of care or provider of care or believes an encounter is relevant should perform medication reconciliation.', 35, 0);
2834 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'patient_edu_amc', 'Use certified EHR technology to identify patient-specific education resources and provide those resources to the patient if appropriate.', 40, 0);
2835 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'cpoe_med_amc', 'Use CPOE for medication orders directly entered by any licensed healthcare professional who can enter orders into the medical record per state, local and professional guidelines.', 45, 0);
2836 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'e_prescribe_amc', 'Generate and transmit permissible prescriptions electronically.', 50, 0);
2837 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'record_dem_amc', 'Record demographics.', 55, 0);
2838 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'send_reminder_amc', 'Send reminders to patients per patient preference for preventive/follow up care.', 60, 0);
2839 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'provide_rec_pat_amc', 'Provide patients with an electronic copy of their health information (including diagnostic test results, problem list, medication lists, medication allergies), upon request.', 65, 0);
2840 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'timely_access_amc', 'Provide patients with timely electronic access to their health information (including lab results, problem list, medication lists, medication allergies) within four business days of the information being available to the EP.', 70, 0);
2841 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'provide_sum_pat_amc', 'Provide clinical summaries for patients for each office visit.', 75, 0);
2842 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'send_sum_amc', 'The EP, eligible hospital or CAH who transitions their patient to another setting of care or provider of care or refers their patient to another provider of care should provide summary of care record for each transition of care or referral.', 80, 0);
2843 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_htn_bp_measure_cqm', 'Hypertension: Blood Pressure Measurement (CQM)', 200, 0);
2844 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_tob_use_assess_cqm', 'Tobacco Use Assessment (CQM)', 205, 0);
2845 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_tob_cess_inter_cqm', 'Tobacco Cessation Intervention (CQM)', 210, 0);
2846 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_adult_wt_screen_fu_cqm', 'Adult Weight Screening and Follow-Up (CQM)', 220, 0);
2847 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_wt_assess_couns_child_cqm', 'Weight Assessment and Counseling for Children and Adolescents (CQM)', 230, 0);
2848 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_influenza_ge_50_cqm', 'Influenza Immunization for Patients >= 50 Years Old (CQM)', 240, 0);
2849 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_child_immun_stat_cqm', 'Childhood immunization Status (CQM)', 250, 0);
2850 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_pneumovacc_ge_65_cqm', 'Pneumonia Vaccination Status for Older Adults (CQM)', 260, 0);
2851 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_eye_cqm', 'Diabetes: Eye Exam (CQM)', 270, 0);
2852 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_foot_cqm', 'Diabetes: Foot Exam (CQM)', 280, 0);
2853 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_a1c_cqm', 'Diabetes: HbA1c Poor Control (CQM)', 285, 0);
2854 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_bp_control_cqm', 'Diabetes: Blood Pressure Management (CQM)', 290, 0);
2855 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_ldl_cqm', 'Diabetes: LDL Management & Control (CQM)', 300, 0);
2857 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_htn_bp_measure', 'Hypertension: Blood Pressure Measurement', 500, 0);
2858 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_tob_use_assess', 'Tobacco Use Assessment', 510, 0);
2859 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_tob_cess_inter', 'Tobacco Cessation Intervention', 520, 0);
2860 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_adult_wt_screen_fu', 'Adult Weight Screening and Follow-Up', 530, 0);
2861 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_wt_assess_couns_child', 'Weight Assessment and Counseling for Children and Adolescents', 540, 0);
2862 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_influenza_ge_50', 'Influenza Immunization for Patients >= 50 Years Old', 550, 0);
2863 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_pneumovacc_ge_65', 'Pneumonia Vaccination Status for Older Adults', 570, 0);
2864 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_hemo_a1c', 'Diabetes: Hemoglobin A1C', 570, 0);
2865 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_urine_alb', 'Diabetes: Urine Microalbumin', 590, 0);
2866 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_eye', 'Diabetes: Eye Exam', 600, 0);
2867 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_dm_foot', 'Diabetes: Foot Exam', 610, 0);
2868 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_cs_mammo', 'Cancer Screening: Mammogram', 620, 0);
2869 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_cs_pap', 'Cancer Screening: Pap Smear', 630, 0);
2870 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_cs_colon', 'Cancer Screening: Colon Cancer Screening', 640, 0);
2871 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_cs_prostate', 'Cancer Screening: Prostate Cancer Screening', 650, 0);
2872 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_inr_monitor', 'Coumadin Management - INR Monitoring', 1000, 0);
2873 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_appt_reminder', 'Appointment Reminder Rule', 2000, 0);
2875 -- Clinical Rule Target Methods
2876 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_targets', 'Clinical Rule Target Methods', 3, 0);
2877 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_targets' ,'target_database', 'Database', 10, 0);
2878 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_targets' ,'target_interval', 'Interval', 20, 0);
2879 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_targets' ,'target_proc', 'Procedure', 20, 0);
2880 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_targets' ,'target_appt', 'Appointment', 30, 0);
2882 -- Clinical Rule Target Intervals
2883 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_target_intervals', 'Clinical Rules Target Intervals', 3, 0);
2884 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'year', 'Year', 10, 0);
2885 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'month', 'Month', 20, 0);
2886 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'week', 'Week', 30, 0);
2887 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'day', 'Day', 40, 0);
2888 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'hour', 'Hour', 50, 0);
2889 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'minute', 'Minute', 60, 0);
2890 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'second', 'Second', 70, 0);
2891 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_target_intervals' ,'flu_season', 'Flu Season', 80, 0);
2893 -- Clinical Rule Comparisons
2894 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_comparisons', 'Clinical Rules Comparisons', 3, 0);
2895 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_comparisons' ,'EXIST', 'Exist', 10, 0);
2896 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_comparisons' ,'lt', 'Less Than', 20, 0);
2897 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_comparisons' ,'le', 'Less Than or Equal To', 30, 0);
2898 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_comparisons' ,'gt', 'Greater Than', 40, 0);
2899 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_comparisons' ,'ge', 'Greater Than or Equal To', 50, 0);
2901 -- Clinical Rule Filter Methods
2902 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_filters','Clinical Rule Filter Methods', 3, 0);
2903 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_database', 'Database', 10, 0);
2904 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_diagnosis', 'Diagnosis', 20, 0);
2905 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_sex', 'Gender', 30, 0);
2906 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_age_max', 'Maximum Age', 40, 0);
2907 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_age_min', 'Minimum Age', 50, 0);
2908 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_proc', 'Procedure', 60, 0);
2909 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_filters', 'filt_lists', 'Lists', 70, 0);
2911 -- Clinical Rule Age Intervals
2912 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_age_intervals', 'Clinical Rules Age Intervals', 3, 0);
2913 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_age_intervals' ,'year', 'Year', 10, 0);
2914 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_age_intervals' ,'month', 'Month', 20, 0);
2916 -- Encounter Types (needed for mapping encounters for CQM rules)
2917 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_enc_types', 'Clinical Rules Encounter Types', 3, 0);
2918 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_outpatient', 'encounter outpatient', 10, 0);
2919 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_nurs_fac', 'encounter nursing facility', 20, 0);
2920 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_off_vis', 'encounter office visit', 30, 0);
2921 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_hea_and_beh', 'encounter health and behavior assessment', 40, 0);
2922 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_occ_ther', 'encounter occupational therapy', 50, 0);
2923 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_psych_and_psych', 'encounter psychiatric & psychologic', 60, 0);
2924 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_pre_med_ser_18_older', 'encounter preventive medicine services 18 and older', 70, 0);
2925 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_pre_med_ser_40_older', 'encounter preventive medicine 40 and older', 75, 0);
2926 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_pre_ind_counsel', 'encounter preventive medicine - individual counseling', 80, 0);
2927 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_pre_med_group_counsel', 'encounter preventive medicine group counseling', 90, 0);
2928 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_pre_med_other_serv', 'encounter preventive medicine other services', 100, 0);
2929 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_out_pcp_obgyn', 'encounter outpatient w/PCP & obgyn', 110, 0);
2930 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_pregnancy', 'encounter pregnancy', 120, 0);
2931 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_nurs_discharge', 'encounter nursing discharge', 130, 0);
2932 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_acute_inp_or_ed', 'encounter acute inpatient or ED', 130, 0);
2933 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_nonac_inp_out_or_opth', 'Encounter: encounter non-acute inpt, outpatient, or ophthalmology', 140, 0);
2934 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_enc_types' ,'enc_influenza', 'encounter influenza', 150, 0);
2936 -- Clinical Rule Action Categories
2937 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_action_category', 'Clinical Rule Action Category', 3, 0);
2938 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_assess', 'Assessment', 10, 0);
2939 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_edu', 'Education', 20, 0);
2940 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_exam', 'Examination', 30, 0);
2941 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_inter', 'Intervention', 40, 0);
2942 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_measure', 'Measurement', 50, 0);
2943 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_treat', 'Treatment', 60, 0);
2944 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action_category' ,'act_cat_remind', 'Reminder', 70, 0);
2946 -- Clinical Rule Action Items
2947 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_action', 'Clinical Rule Action Item', 3, 0);
2948 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_bp', 'Blood Pressure', 10, 0);
2949 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_influvacc', 'Influenza Vaccine', 20, 0);
2950 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_tobacco', 'Tobacco', 30, 0);
2951 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_wt', 'Weight', 40, 0);
2952 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_bmi', 'BMI', 43, 0);
2953 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_nutrition', 'Nutrition', 45, 0);
2954 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_exercise', 'Exercise', 47, 0);
2955 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_pneumovacc', 'Pneumococcal Vaccine', 60, 0);
2956 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_hemo_a1c', 'Hemoglobin A1C', 70, 0);
2957 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_urine_alb', 'Urine Microalbumin', 80, 0);
2958 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_eye', 'Opthalmic', 90, 0);
2959 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_foot', 'Podiatric', 100, 0);
2960 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_mammo', 'Mammogram', 110, 0);
2961 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_pap', 'Pap Smear', 120, 0);
2962 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_colon_cancer_screen', 'Colon Cancer Screening', 130, 0);
2963 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_prostate_cancer_screen', 'Prostate Cancer Screening', 140, 0);
2964 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_lab_inr', 'INR', 150, 0);
2965 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_appointment', 'Appointment', 160, 0);
2967 -- Clinical Rule Reminder Intervals
2968 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_reminder_intervals', 'Clinical Rules Reminder Intervals', 3, 0);
2969 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_intervals' ,'month', 'Month', 10, 0);
2970 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_intervals' ,'week', 'Week', 20, 0);
2972 -- Clinical Rule Reminder Methods
2973 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_reminder_methods', 'Clinical Rules Reminder Methods', 3, 0);
2974 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_methods' ,'clinical_reminder_pre', 'Past Due Interval (Clinical Reminders)', 10, 0);
2975 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_methods' ,'patient_reminder_pre', 'Past Due Interval (Patient Reminders)', 20, 0);
2976 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_methods' ,'clinical_reminder_post', 'Soon Due Interval (Clinical Reminders)', 30, 0);
2977 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_methods' ,'patient_reminder_post', 'Soon Due Interval (Patient Reminders)', 40, 0);
2979 -- Clinical Rule Reminder Due Options
2980 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_reminder_due_opt', 'Clinical Rules Reminder Due Options', 3, 0);
2981 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_due_opt' ,'due', 'Due', 10, 0);
2982 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_due_opt' ,'soon_due', 'Due Soon', 20, 0);
2983 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_due_opt' ,'past_due', 'Past Due', 30, 0);
2984 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_due_opt' ,'not_due', 'Not Due', 30, 0);
2986 -- Clinical Rule Reminder Inactivate Options
2987 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('lists' ,'rule_reminder_inactive_opt', 'Clinical Rules Reminder Inactivation Options', 3, 0);
2988 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_inactive_opt' ,'auto', 'Automatic', 10, 0);
2989 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_inactive_opt' ,'due_status_update', 'Due Status Update', 20, 0);
2990 INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_reminder_inactive_opt' ,'manual', 'Manual', 20, 0);
2992 -- eRx User Roles
2993 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('newcrop_erx_role','erxadmin','NewCrop Admin','5','0','0','','');
2994 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('newcrop_erx_role','erxdoctor','NewCrop Doctor','20','0','0','','');
2995 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('newcrop_erx_role','erxmanager','NewCrop Manager','15','0','0','','');
2996 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('newcrop_erx_role','erxmidlevelPrescriber','NewCrop Midlevel Prescriber','25','0','0','','');
2997 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('newcrop_erx_role','erxnurse','NewCrop Nurse','10','0','0','','');
2998 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('newcrop_erx_role','erxsupervisingDoctor','NewCrop Supervising Doctor','30','0','0','','');
2999 INSERT INTO list_options (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('lists','newcrop_erx_role','NewCrop eRx Role','221','0','0','','');
3001 -- --------------------------------------------------------
3003 -- 
3004 -- Table structure for table `lists`
3005 -- 
3007 DROP TABLE IF EXISTS `lists`;
3008 CREATE TABLE `lists` (
3009   `id` bigint(20) NOT NULL auto_increment,
3010   `date` datetime default NULL,
3011   `type` varchar(255) default NULL,
3012   `title` varchar(255) default NULL,
3013   `begdate` date default NULL,
3014   `enddate` date default NULL,
3015   `returndate` date default NULL,
3016   `occurrence` int(11) default '0',
3017   `classification` int(11) default '0',
3018   `referredby` varchar(255) default NULL,
3019   `extrainfo` varchar(255) default NULL,
3020   `diagnosis` varchar(255) default NULL,
3021   `activity` tinyint(4) default NULL,
3022   `comments` longtext,
3023   `pid` bigint(20) default NULL,
3024   `user` varchar(255) default NULL,
3025   `groupname` varchar(255) default NULL,
3026   `outcome` int(11) NOT NULL default '0',
3027   `destination` varchar(255) default NULL,
3028   `reinjury_id` bigint(20)  NOT NULL DEFAULT 0,
3029   `injury_part` varchar(31) NOT NULL DEFAULT '',
3030   `injury_type` varchar(31) NOT NULL DEFAULT '',
3031   `injury_grade` varchar(31) NOT NULL DEFAULT '',
3032   `reaction` varchar(255) NOT NULL DEFAULT '',
3033   `external_allergyid` INT(11) DEFAULT NULL,
3034   `erx_source` ENUM('0','1') DEFAULT '0' NOT NULL  COMMENT '0-OpenEMR 1-External',
3035   PRIMARY KEY  (`id`)
3036 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3038 -- --------------------------------------------------------
3041 -- Table structure for table `lists_touch`
3044 DROP TABLE IF EXISTS `lists_touch`;
3045 CREATE TABLE `lists_touch` (
3046   `pid` bigint(20) default NULL,
3047   `type` varchar(255) default NULL,
3048   `date` datetime default NULL,
3049   PRIMARY KEY  (`pid`,`type`)
3050 ) ENGINE=MyISAM ;
3052 -- --------------------------------------------------------
3054 -- 
3055 -- Table structure for table `log`
3056 -- 
3058 DROP TABLE IF EXISTS `log`;
3059 CREATE TABLE `log` (
3060   `id` bigint(20) NOT NULL auto_increment,
3061   `date` datetime default NULL,
3062   `event` varchar(255) default NULL,
3063   `user` varchar(255) default NULL,
3064   `groupname` varchar(255) default NULL,
3065   `comments` longtext,
3066   `user_notes` longtext,
3067   `patient_id` bigint(20) default NULL,
3068   `success` tinyint(1) default 1,
3069   `checksum` longtext default NULL,
3070   `crt_user` varchar(255) default NULL,
3071   PRIMARY KEY  (`id`)
3072 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3074 -- --------------------------------------------------------
3076 -- 
3077 -- Table structure for table `notes`
3078 -- 
3080 DROP TABLE IF EXISTS `notes`;
3081 CREATE TABLE `notes` (
3082   `id` int(11) NOT NULL default '0',
3083   `foreign_id` int(11) NOT NULL default '0',
3084   `note` varchar(255) default NULL,
3085   `owner` int(11) default NULL,
3086   `date` datetime default NULL,
3087   `revision` timestamp NOT NULL,
3088   PRIMARY KEY  (`id`),
3089   KEY `foreign_id` (`owner`),
3090   KEY `foreign_id_2` (`foreign_id`),
3091   KEY `date` (`date`)
3092 ) ENGINE=MyISAM;
3094 -- --------------------------------------------------------
3096 -- 
3097 -- Table structure for table `onotes`
3098 -- 
3100 DROP TABLE IF EXISTS `onotes`;
3101 CREATE TABLE `onotes` (
3102   `id` bigint(20) NOT NULL auto_increment,
3103   `date` datetime default NULL,
3104   `body` longtext,
3105   `user` varchar(255) default NULL,
3106   `groupname` varchar(255) default NULL,
3107   `activity` tinyint(4) default NULL,
3108   PRIMARY KEY  (`id`)
3109 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3111 -- --------------------------------------------------------
3113 -- 
3114 -- Table structure for table `openemr_module_vars`
3115 -- 
3117 DROP TABLE IF EXISTS `openemr_module_vars`;
3118 CREATE TABLE `openemr_module_vars` (
3119   `pn_id` int(11) unsigned NOT NULL auto_increment,
3120   `pn_modname` varchar(64) default NULL,
3121   `pn_name` varchar(64) default NULL,
3122   `pn_value` longtext,
3123   PRIMARY KEY  (`pn_id`),
3124   KEY `pn_modname` (`pn_modname`),
3125   KEY `pn_name` (`pn_name`)
3126 ) ENGINE=MyISAM AUTO_INCREMENT=235 ;
3128 -- 
3129 -- Dumping data for table `openemr_module_vars`
3130 -- 
3132 INSERT INTO `openemr_module_vars` VALUES (234, 'PostCalendar', 'pcNotifyEmail', '');
3133 INSERT INTO `openemr_module_vars` VALUES (233, 'PostCalendar', 'pcNotifyAdmin', '0');
3134 INSERT INTO `openemr_module_vars` VALUES (232, 'PostCalendar', 'pcCacheLifetime', '3600');
3135 INSERT INTO `openemr_module_vars` VALUES (231, 'PostCalendar', 'pcUseCache', '0');
3136 INSERT INTO `openemr_module_vars` VALUES (230, 'PostCalendar', 'pcDefaultView', 'day');
3137 INSERT INTO `openemr_module_vars` VALUES (229, 'PostCalendar', 'pcTimeIncrement', '5');
3138 INSERT INTO `openemr_module_vars` VALUES (228, 'PostCalendar', 'pcAllowUserCalendar', '1');
3139 INSERT INTO `openemr_module_vars` VALUES (227, 'PostCalendar', 'pcAllowSiteWide', '1');
3140 INSERT INTO `openemr_module_vars` VALUES (226, 'PostCalendar', 'pcTemplate', 'default');
3141 INSERT INTO `openemr_module_vars` VALUES (225, 'PostCalendar', 'pcEventDateFormat', '%Y-%m-%d');
3142 INSERT INTO `openemr_module_vars` VALUES (224, 'PostCalendar', 'pcDisplayTopics', '0');
3143 INSERT INTO `openemr_module_vars` VALUES (223, 'PostCalendar', 'pcListHowManyEvents', '15');
3144 INSERT INTO `openemr_module_vars` VALUES (222, 'PostCalendar', 'pcAllowDirectSubmit', '1');
3145 INSERT INTO `openemr_module_vars` VALUES (221, 'PostCalendar', 'pcUsePopups', '0');
3146 INSERT INTO `openemr_module_vars` VALUES (220, 'PostCalendar', 'pcDayHighlightColor', '#EEEEEE');
3147 INSERT INTO `openemr_module_vars` VALUES (219, 'PostCalendar', 'pcFirstDayOfWeek', '1');
3148 INSERT INTO `openemr_module_vars` VALUES (218, 'PostCalendar', 'pcUseInternationalDates', '0');
3149 INSERT INTO `openemr_module_vars` VALUES (217, 'PostCalendar', 'pcEventsOpenInNewWindow', '0');
3150 INSERT INTO `openemr_module_vars` VALUES (216, 'PostCalendar', 'pcTime24Hours', '0');
3152 -- --------------------------------------------------------
3154 -- 
3155 -- Table structure for table `openemr_modules`
3156 -- 
3158 DROP TABLE IF EXISTS `openemr_modules`;
3159 CREATE TABLE `openemr_modules` (
3160   `pn_id` int(11) unsigned NOT NULL auto_increment,
3161   `pn_name` varchar(64) default NULL,
3162   `pn_type` int(6) NOT NULL default '0',
3163   `pn_displayname` varchar(64) default NULL,
3164   `pn_description` varchar(255) default NULL,
3165   `pn_regid` int(11) unsigned NOT NULL default '0',
3166   `pn_directory` varchar(64) default NULL,
3167   `pn_version` varchar(10) default NULL,
3168   `pn_admin_capable` tinyint(1) NOT NULL default '0',
3169   `pn_user_capable` tinyint(1) NOT NULL default '0',
3170   `pn_state` tinyint(1) NOT NULL default '0',
3171   PRIMARY KEY  (`pn_id`)
3172 ) ENGINE=MyISAM AUTO_INCREMENT=47 ;
3174 -- 
3175 -- Dumping data for table `openemr_modules`
3176 -- 
3178 INSERT INTO `openemr_modules` VALUES (46, 'PostCalendar', 2, 'PostCalendar', 'PostNuke Calendar Module', 0, 'PostCalendar', '4.0.0', 1, 1, 3);
3180 -- --------------------------------------------------------
3182 -- 
3183 -- Table structure for table `openemr_postcalendar_categories`
3184 -- 
3186 DROP TABLE IF EXISTS `openemr_postcalendar_categories`;
3187 CREATE TABLE `openemr_postcalendar_categories` (
3188   `pc_catid` int(11) unsigned NOT NULL auto_increment,
3189   `pc_catname` varchar(100) default NULL,
3190   `pc_catcolor` varchar(50) default NULL,
3191   `pc_catdesc` text,
3192   `pc_recurrtype` int(1) NOT NULL default '0',
3193   `pc_enddate` date default NULL,
3194   `pc_recurrspec` text,
3195   `pc_recurrfreq` int(3) NOT NULL default '0',
3196   `pc_duration` bigint(20) NOT NULL default '0',
3197   `pc_end_date_flag` tinyint(1) NOT NULL default '0',
3198   `pc_end_date_type` int(2) default NULL,
3199   `pc_end_date_freq` int(11) NOT NULL default '0',
3200   `pc_end_all_day` tinyint(1) NOT NULL default '0',
3201   `pc_dailylimit` int(2) NOT NULL default '0',
3202   `pc_cattype` INT( 11 ) NOT NULL COMMENT 'Used in grouping categories',
3203   PRIMARY KEY  (`pc_catid`),
3204   KEY `basic_cat` (`pc_catname`,`pc_catcolor`)
3205 ) ENGINE=MyISAM AUTO_INCREMENT=11 ;
3207 -- 
3208 -- Dumping data for table `openemr_postcalendar_categories`
3209 -- 
3211 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, 0,0);
3212 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, 1);
3213 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, 0);
3214 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, 1);
3215 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, 1);
3216 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, 1);
3217 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, 0);
3218 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, 0);
3219 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, 1);
3221 -- --------------------------------------------------------
3223 -- 
3224 -- Table structure for table `openemr_postcalendar_events`
3225 -- 
3227 DROP TABLE IF EXISTS `openemr_postcalendar_events`;
3228 CREATE TABLE `openemr_postcalendar_events` (
3229   `pc_eid` int(11) unsigned NOT NULL auto_increment,
3230   `pc_catid` int(11) NOT NULL default '0',
3231   `pc_multiple` int(10) unsigned NOT NULL,
3232   `pc_aid` varchar(30) default NULL,
3233   `pc_pid` varchar(11) default NULL,
3234   `pc_title` varchar(150) default NULL,
3235   `pc_time` datetime default NULL,
3236   `pc_hometext` text,
3237   `pc_comments` int(11) default '0',
3238   `pc_counter` mediumint(8) unsigned default '0',
3239   `pc_topic` int(3) NOT NULL default '1',
3240   `pc_informant` varchar(20) default NULL,
3241   `pc_eventDate` date NOT NULL default '0000-00-00',
3242   `pc_endDate` date NOT NULL default '0000-00-00',
3243   `pc_duration` bigint(20) NOT NULL default '0',
3244   `pc_recurrtype` int(1) NOT NULL default '0',
3245   `pc_recurrspec` text,
3246   `pc_recurrfreq` int(3) NOT NULL default '0',
3247   `pc_startTime` time default NULL,
3248   `pc_endTime` time default NULL,
3249   `pc_alldayevent` int(1) NOT NULL default '0',
3250   `pc_location` text,
3251   `pc_conttel` varchar(50) default NULL,
3252   `pc_contname` varchar(50) default NULL,
3253   `pc_contemail` varchar(255) default NULL,
3254   `pc_website` varchar(255) default NULL,
3255   `pc_fee` varchar(50) default NULL,
3256   `pc_eventstatus` int(11) NOT NULL default '0',
3257   `pc_sharing` int(11) NOT NULL default '0',
3258   `pc_language` varchar(30) default NULL,
3259   `pc_apptstatus` varchar(15) NOT NULL default '-',
3260   `pc_prefcatid` int(11) NOT NULL default '0',
3261   `pc_facility` smallint(6) NOT NULL default '0' COMMENT 'facility id for this event',
3262   `pc_sendalertsms` VARCHAR(3) NOT NULL DEFAULT 'NO',
3263   `pc_sendalertemail` VARCHAR( 3 ) NOT NULL DEFAULT 'NO',
3264   `pc_billing_location` SMALLINT (6) NOT NULL DEFAULT '0',
3265   PRIMARY KEY  (`pc_eid`),
3266   KEY `basic_event` (`pc_catid`,`pc_aid`,`pc_eventDate`,`pc_endDate`,`pc_eventstatus`,`pc_sharing`,`pc_topic`)
3267 ) ENGINE=MyISAM AUTO_INCREMENT=7 ;
3269 -- 
3270 -- Dumping data for table `openemr_postcalendar_events`
3271 -- 
3273 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');
3274 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');
3275 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');
3277 -- --------------------------------------------------------
3279 -- 
3280 -- Table structure for table `openemr_postcalendar_limits`
3281 -- 
3283 DROP TABLE IF EXISTS `openemr_postcalendar_limits`;
3284 CREATE TABLE `openemr_postcalendar_limits` (
3285   `pc_limitid` int(11) NOT NULL auto_increment,
3286   `pc_catid` int(11) NOT NULL default '0',
3287   `pc_starttime` time NOT NULL default '00:00:00',
3288   `pc_endtime` time NOT NULL default '00:00:00',
3289   `pc_limit` int(11) NOT NULL default '1',
3290   PRIMARY KEY  (`pc_limitid`)
3291 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3293 -- --------------------------------------------------------
3295 -- 
3296 -- Table structure for table `openemr_postcalendar_topics`
3297 -- 
3299 DROP TABLE IF EXISTS `openemr_postcalendar_topics`;
3300 CREATE TABLE `openemr_postcalendar_topics` (
3301   `pc_catid` int(11) unsigned NOT NULL auto_increment,
3302   `pc_catname` varchar(100) default NULL,
3303   `pc_catcolor` varchar(50) default NULL,
3304   `pc_catdesc` text,
3305   PRIMARY KEY  (`pc_catid`),
3306   KEY `basic_cat` (`pc_catname`,`pc_catcolor`)
3307 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3309 -- --------------------------------------------------------
3311 -- 
3312 -- Table structure for table `openemr_session_info`
3313 -- 
3315 DROP TABLE IF EXISTS `openemr_session_info`;
3316 CREATE TABLE `openemr_session_info` (
3317   `pn_sessid` varchar(32) NOT NULL default '',
3318   `pn_ipaddr` varchar(20) default NULL,
3319   `pn_firstused` int(11) NOT NULL default '0',
3320   `pn_lastused` int(11) NOT NULL default '0',
3321   `pn_uid` int(11) NOT NULL default '0',
3322   `pn_vars` blob,
3323   PRIMARY KEY  (`pn_sessid`)
3324 ) ENGINE=MyISAM;
3326 -- 
3327 -- Dumping data for table `openemr_session_info`
3328 -- 
3330 INSERT INTO `openemr_session_info` VALUES ('978d31441dccd350d406bfab98978f20', '127.0.0.1', 1109233952, 1109234177, 0, NULL);
3332 -- --------------------------------------------------------
3335 -- Table structure for table `patient_access_onsite`
3338 DROP TABLE IF EXISTS `patient_access_onsite`;
3339 CREATE TABLE `patient_access_onsite`(
3340   `id` INT NOT NULL AUTO_INCREMENT ,
3341   `pid` INT(11),
3342   `portal_username` VARCHAR(100) ,
3343   `portal_pwd` VARCHAR(100) ,
3344   `portal_pwd_status` TINYINT DEFAULT '1' COMMENT '0=>Password Created Through Demographics by The provider or staff. Patient Should Change it at first time it.1=>Pwd updated or created by patient itself',
3345   PRIMARY KEY (`id`)
3346 )ENGINE=MyISAM AUTO_INCREMENT=1;
3348 -- --------------------------------------------------------
3350 -- 
3351 -- Table structure for table `patient_data`
3352 -- 
3354 DROP TABLE IF EXISTS `patient_data`;
3355 CREATE TABLE `patient_data` (
3356   `id` bigint(20) NOT NULL auto_increment,
3357   `title` varchar(255) NOT NULL default '',
3358   `language` varchar(255) NOT NULL default '',
3359   `financial` varchar(255) NOT NULL default '',
3360   `fname` varchar(255) NOT NULL default '',
3361   `lname` varchar(255) NOT NULL default '',
3362   `mname` varchar(255) NOT NULL default '',
3363   `DOB` date default NULL,
3364   `street` varchar(255) NOT NULL default '',
3365   `postal_code` varchar(255) NOT NULL default '',
3366   `city` varchar(255) NOT NULL default '',
3367   `state` varchar(255) NOT NULL default '',
3368   `country_code` varchar(255) NOT NULL default '',
3369   `drivers_license` varchar(255) NOT NULL default '',
3370   `ss` varchar(255) NOT NULL default '',
3371   `occupation` longtext,
3372   `phone_home` varchar(255) NOT NULL default '',
3373   `phone_biz` varchar(255) NOT NULL default '',
3374   `phone_contact` varchar(255) NOT NULL default '',
3375   `phone_cell` varchar(255) NOT NULL default '',
3376   `pharmacy_id` int(11) NOT NULL default '0',
3377   `status` varchar(255) NOT NULL default '',
3378   `contact_relationship` varchar(255) NOT NULL default '',
3379   `date` datetime default NULL,
3380   `sex` varchar(255) NOT NULL default '',
3381   `referrer` varchar(255) NOT NULL default '',
3382   `referrerID` varchar(255) NOT NULL default '',
3383   `providerID` int(11) default NULL,
3384   `email` varchar(255) NOT NULL default '',
3385   `ethnoracial` varchar(255) NOT NULL default '',
3386   `race` varchar(255) NOT NULL default '',
3387   `ethnicity` varchar(255) NOT NULL default '',
3388   `interpretter` varchar(255) NOT NULL default '',
3389   `migrantseasonal` varchar(255) NOT NULL default '',
3390   `family_size` varchar(255) NOT NULL default '',
3391   `monthly_income` varchar(255) NOT NULL default '',
3392   `homeless` varchar(255) NOT NULL default '',
3393   `financial_review` datetime default NULL,
3394   `pubpid` varchar(255) NOT NULL default '',
3395   `pid` bigint(20) NOT NULL default '0',
3396   `genericname1` varchar(255) NOT NULL default '',
3397   `genericval1` varchar(255) NOT NULL default '',
3398   `genericname2` varchar(255) NOT NULL default '',
3399   `genericval2` varchar(255) NOT NULL default '',
3400   `hipaa_mail` varchar(3) NOT NULL default '',
3401   `hipaa_voice` varchar(3) NOT NULL default '',
3402   `hipaa_notice` varchar(3) NOT NULL default '',
3403   `hipaa_message` varchar(20) NOT NULL default '',
3404   `hipaa_allowsms` VARCHAR(3) NOT NULL DEFAULT 'NO',
3405   `hipaa_allowemail` VARCHAR(3) NOT NULL DEFAULT 'NO',
3406   `squad` varchar(32) NOT NULL default '',
3407   `fitness` int(11) NOT NULL default '0',
3408   `referral_source` varchar(30) NOT NULL default '',
3409   `usertext1` varchar(255) NOT NULL DEFAULT '',
3410   `usertext2` varchar(255) NOT NULL DEFAULT '',
3411   `usertext3` varchar(255) NOT NULL DEFAULT '',
3412   `usertext4` varchar(255) NOT NULL DEFAULT '',
3413   `usertext5` varchar(255) NOT NULL DEFAULT '',
3414   `usertext6` varchar(255) NOT NULL DEFAULT '',
3415   `usertext7` varchar(255) NOT NULL DEFAULT '',
3416   `usertext8` varchar(255) NOT NULL DEFAULT '',
3417   `userlist1` varchar(255) NOT NULL DEFAULT '',
3418   `userlist2` varchar(255) NOT NULL DEFAULT '',
3419   `userlist3` varchar(255) NOT NULL DEFAULT '',
3420   `userlist4` varchar(255) NOT NULL DEFAULT '',
3421   `userlist5` varchar(255) NOT NULL DEFAULT '',
3422   `userlist6` varchar(255) NOT NULL DEFAULT '',
3423   `userlist7` varchar(255) NOT NULL DEFAULT '',
3424   `pricelevel` varchar(255) NOT NULL default 'standard',
3425   `regdate`     date DEFAULT NULL COMMENT 'Registration Date',
3426   `contrastart` date DEFAULT NULL COMMENT 'Date contraceptives initially used',
3427   `completed_ad` VARCHAR(3) NOT NULL DEFAULT 'NO',
3428   `ad_reviewed` date DEFAULT NULL,
3429   `vfc` varchar(255) NOT NULL DEFAULT '',
3430   `mothersname` varchar(255) NOT NULL DEFAULT '',
3431   `guardiansname` varchar(255) NOT NULL DEFAULT '',
3432   `allow_imm_reg_use` varchar(255) NOT NULL DEFAULT '',
3433   `allow_imm_info_share` varchar(255) NOT NULL DEFAULT '',
3434   `allow_health_info_ex` varchar(255) NOT NULL DEFAULT '',
3435   `allow_patient_portal` varchar(31) NOT NULL DEFAULT '',
3436   `deceased_date` datetime default NULL,
3437   `deceased_reason` varchar(255) NOT NULL default '',
3438   `soap_import_status` TINYINT(4) DEFAULT NULL COMMENT '1-Prescription Press 2-Prescription Import 3-Allergy Press 4-Allergy Import',
3439   UNIQUE KEY `pid` (`pid`),
3440   KEY `id` (`id`)
3441 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3443 -- --------------------------------------------------------
3446 -- Table structure for table `patient_reminders`
3449 DROP TABLE IF EXISTS `patient_reminders`;
3450 CREATE TABLE `patient_reminders` (
3451   `id` bigint(20) NOT NULL auto_increment,
3452   `active` tinyint(1) NOT NULL default 1 COMMENT '1 if active and 0 if not active',
3453   `date_inactivated` datetime DEFAULT NULL,
3454   `reason_inactivated` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_reminder_inactive_opt',
3455   `due_status` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_reminder_due_opt',
3456   `pid` bigint(20) NOT NULL COMMENT 'id from patient_data table',
3457   `category` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the category item in the rule_action_item table',
3458   `item` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the item column in the rule_action_item table',
3459   `date_created` datetime DEFAULT NULL,
3460   `date_sent` datetime DEFAULT NULL,
3461   `voice_status` tinyint(1) NOT NULL default 0 COMMENT '0 if not sent and 1 if sent',
3462   `sms_status` tinyint(1) NOT NULL default 0 COMMENT '0 if not sent and 1 if sent',
3463   `email_status` tinyint(1) NOT NULL default 0 COMMENT '0 if not sent and 1 if sent',
3464   `mail_status` tinyint(1) NOT NULL default 0 COMMENT '0 if not sent and 1 if sent',
3465   PRIMARY KEY (`id`),
3466   KEY `pid` (`pid`),
3467   KEY (`category`,`item`)
3468 ) ENGINE=MyISAM AUTO_INCREMENT=1;
3470 -- --------------------------------------------------------
3473 -- Table structure for table `patient_access_offsite`
3476 DROP TABLE IF EXISTS `patient_access_offsite`;
3477 CREATE TABLE  `patient_access_offsite` (
3478   `id` int(11) NOT NULL AUTO_INCREMENT,
3479   `pid` int(11) NOT NULL,
3480   `portal_username` varchar(100) NOT NULL,
3481   `portal_pwd` varchar(100) NOT NULL,
3482   `portal_pwd_status` tinyint(4) DEFAULT '1' COMMENT '0=>Password Created Through Demographics by The provider or staff. Patient Should Change it at first time it.1=>Pwd updated or created by patient itself',
3483   PRIMARY KEY (`id`),
3484   UNIQUE KEY `pid` (`pid`)
3485 ) ENGINE=MyISAM AUTO_INCREMENT=1;
3487 -- 
3488 -- Table structure for table `payments`
3489 -- 
3491 DROP TABLE IF EXISTS `payments`;
3492 CREATE TABLE `payments` (
3493   `id` bigint(20) NOT NULL auto_increment,
3494   `pid` bigint(20) NOT NULL default '0',
3495   `dtime` datetime NOT NULL,
3496   `encounter` bigint(20) NOT NULL default '0',
3497   `user` varchar(255) default NULL,
3498   `method` varchar(255) default NULL,
3499   `source` varchar(255) default NULL,
3500   `amount1` decimal(12,2) NOT NULL default '0.00',
3501   `amount2` decimal(12,2) NOT NULL default '0.00',
3502   `posted1` decimal(12,2) NOT NULL default '0.00',
3503   `posted2` decimal(12,2) NOT NULL default '0.00',
3504   PRIMARY KEY  (`id`),
3505   KEY `pid` (`pid`)
3506 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3508 -- --------------------------------------------------------
3510 -- 
3511 -- Table structure for table `pharmacies`
3512 -- 
3514 DROP TABLE IF EXISTS `pharmacies`;
3515 CREATE TABLE `pharmacies` (
3516   `id` int(11) NOT NULL default '0',
3517   `name` varchar(255) default NULL,
3518   `transmit_method` int(11) NOT NULL default '1',
3519   `email` varchar(255) default NULL,
3520   PRIMARY KEY  (`id`)
3521 ) ENGINE=MyISAM;
3523 -- --------------------------------------------------------
3525 -- 
3526 -- Table structure for table `phone_numbers`
3527 -- 
3529 DROP TABLE IF EXISTS `phone_numbers`;
3530 CREATE TABLE `phone_numbers` (
3531   `id` int(11) NOT NULL default '0',
3532   `country_code` varchar(5) default NULL,
3533   `area_code` char(3) default NULL,
3534   `prefix` char(3) default NULL,
3535   `number` varchar(4) default NULL,
3536   `type` int(11) default NULL,
3537   `foreign_id` int(11) default NULL,
3538   PRIMARY KEY  (`id`),
3539   KEY `foreign_id` (`foreign_id`)
3540 ) ENGINE=MyISAM;
3542 -- --------------------------------------------------------
3544 -- 
3545 -- Table structure for table `pma_bookmark`
3546 -- 
3548 DROP TABLE IF EXISTS `pma_bookmark`;
3549 CREATE TABLE `pma_bookmark` (
3550   `id` int(11) NOT NULL auto_increment,
3551   `dbase` varchar(255) default NULL,
3552   `user` varchar(255) default NULL,
3553   `label` varchar(255) default NULL,
3554   `query` text,
3555   PRIMARY KEY  (`id`)
3556 ) ENGINE=MyISAM COMMENT='Bookmarks' AUTO_INCREMENT=10 ;
3558 -- 
3559 -- Dumping data for table `pma_bookmark`
3560 -- 
3562 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');
3563 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');
3564 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;');
3565 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');
3567 -- --------------------------------------------------------
3569 -- 
3570 -- Table structure for table `pma_column_info`
3571 -- 
3573 DROP TABLE IF EXISTS `pma_column_info`;
3574 CREATE TABLE `pma_column_info` (
3575   `id` int(5) unsigned NOT NULL auto_increment,
3576   `db_name` varchar(64) default NULL,
3577   `table_name` varchar(64) default NULL,
3578   `column_name` varchar(64) default NULL,
3579   `comment` varchar(255) default NULL,
3580   `mimetype` varchar(255) default NULL,
3581   `transformation` varchar(255) default NULL,
3582   `transformation_options` varchar(255) default NULL,
3583   PRIMARY KEY  (`id`),
3584   UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
3585 ) ENGINE=MyISAM COMMENT='Column Information for phpMyAdmin' AUTO_INCREMENT=1 ;
3587 -- --------------------------------------------------------
3589 -- 
3590 -- Table structure for table `pma_history`
3591 -- 
3593 DROP TABLE IF EXISTS `pma_history`;
3594 CREATE TABLE `pma_history` (
3595   `id` bigint(20) unsigned NOT NULL auto_increment,
3596   `username` varchar(64) default NULL,
3597   `db` varchar(64) default NULL,
3598   `table` varchar(64) default NULL,
3599   `timevalue` timestamp NOT NULL,
3600   `sqlquery` text,
3601   PRIMARY KEY  (`id`),
3602   KEY `username` (`username`,`db`,`table`,`timevalue`)
3603 ) ENGINE=MyISAM COMMENT='SQL history' AUTO_INCREMENT=1 ;
3605 -- --------------------------------------------------------
3607 -- 
3608 -- Table structure for table `pma_pdf_pages`
3609 -- 
3611 DROP TABLE IF EXISTS `pma_pdf_pages`;
3612 CREATE TABLE `pma_pdf_pages` (
3613   `db_name` varchar(64) default NULL,
3614   `page_nr` int(10) unsigned NOT NULL auto_increment,
3615   `page_descr` varchar(50) default NULL,
3616   PRIMARY KEY  (`page_nr`),
3617   KEY `db_name` (`db_name`)
3618 ) ENGINE=MyISAM COMMENT='PDF Relationpages for PMA' AUTO_INCREMENT=1 ;
3620 -- --------------------------------------------------------
3622 -- 
3623 -- Table structure for table `pma_relation`
3624 -- 
3626 DROP TABLE IF EXISTS `pma_relation`;
3627 CREATE TABLE `pma_relation` (
3628   `master_db` varchar(64) NOT NULL default '',
3629   `master_table` varchar(64) NOT NULL default '',
3630   `master_field` varchar(64) NOT NULL default '',
3631   `foreign_db` varchar(64) default NULL,
3632   `foreign_table` varchar(64) default NULL,
3633   `foreign_field` varchar(64) default NULL,
3634   PRIMARY KEY  (`master_db`,`master_table`,`master_field`),
3635   KEY `foreign_field` (`foreign_db`,`foreign_table`)
3636 ) ENGINE=MyISAM COMMENT='Relation table';
3638 -- --------------------------------------------------------
3640 -- 
3641 -- Table structure for table `pma_table_coords`
3642 -- 
3644 DROP TABLE IF EXISTS `pma_table_coords`;
3645 CREATE TABLE `pma_table_coords` (
3646   `db_name` varchar(64) NOT NULL default '',
3647   `table_name` varchar(64) NOT NULL default '',
3648   `pdf_page_number` int(11) NOT NULL default '0',
3649   `x` float unsigned NOT NULL default '0',
3650   `y` float unsigned NOT NULL default '0',
3651   PRIMARY KEY  (`db_name`,`table_name`,`pdf_page_number`)
3652 ) ENGINE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
3654 -- --------------------------------------------------------
3656 -- 
3657 -- Table structure for table `pma_table_info`
3658 -- 
3660 DROP TABLE IF EXISTS `pma_table_info`;
3661 CREATE TABLE `pma_table_info` (
3662   `db_name` varchar(64) NOT NULL default '',
3663   `table_name` varchar(64) NOT NULL default '',
3664   `display_field` varchar(64) default NULL,
3665   PRIMARY KEY  (`db_name`,`table_name`)
3666 ) ENGINE=MyISAM COMMENT='Table information for phpMyAdmin';
3668 -- --------------------------------------------------------
3670 -- 
3671 -- Table structure for table `pnotes`
3672 -- 
3674 DROP TABLE IF EXISTS `pnotes`;
3675 CREATE TABLE `pnotes` (
3676   `id` bigint(20) NOT NULL auto_increment,
3677   `date` datetime default NULL,
3678   `body` longtext,
3679   `pid` bigint(20) default NULL,
3680   `user` varchar(255) default NULL,
3681   `groupname` varchar(255) default NULL,
3682   `activity` tinyint(4) default NULL,
3683   `authorized` tinyint(4) default NULL,
3684   `title` varchar(255) default NULL,
3685   `assigned_to` varchar(255) default NULL,
3686   `deleted` tinyint(4) default 0 COMMENT 'flag indicates note is deleted',
3687   `message_status` VARCHAR(20) NOT NULL DEFAULT 'New',
3688   PRIMARY KEY  (`id`)
3689 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3691 -- --------------------------------------------------------
3693 -- 
3694 -- Table structure for table `prescriptions`
3695 -- 
3697 DROP TABLE IF EXISTS `prescriptions`;
3698 CREATE TABLE `prescriptions` (
3699   `id` int(11) NOT NULL auto_increment,
3700   `patient_id` int(11) default NULL,
3701   `filled_by_id` int(11) default NULL,
3702   `pharmacy_id` int(11) default NULL,
3703   `date_added` date default NULL,
3704   `date_modified` date default NULL,
3705   `provider_id` int(11) default NULL,
3706   `start_date` date default NULL,
3707   `drug` varchar(150) default NULL,
3708   `drug_id` int(11) NOT NULL default '0',
3709   `rxnorm_drugcode` INT(11) DEFAULT NULL,
3710   `form` int(3) default NULL,
3711   `dosage` varchar(100) default NULL,
3712   `quantity` varchar(31) default NULL,
3713   `size` float unsigned default NULL,
3714   `unit` int(11) default NULL,
3715   `route` int(11) default NULL,
3716   `interval` int(11) default NULL,
3717   `substitute` int(11) default NULL,
3718   `refills` int(11) default NULL,
3719   `per_refill` int(11) default NULL,
3720   `filled_date` date default NULL,
3721   `medication` int(11) default NULL,
3722   `note` text,
3723   `active` int(11) NOT NULL default '1',
3724   `datetime` DATETIME DEFAULT NULL,
3725   `user` VARCHAR(50) DEFAULT NULL,
3726   `site` VARCHAR(50) DEFAULT NULL,
3727   `prescriptionguid` VARCHAR(50) DEFAULT NULL,
3728   `erx_source` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '0-OpenEMR 1-External',
3729   `erx_uploaded` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '0-Pending NewCrop upload 1-Uploaded to NewCrop',
3730   PRIMARY KEY  (`id`)
3731 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
3733 -- --------------------------------------------------------
3735 -- 
3736 -- Table structure for table `prices`
3737 -- 
3739 DROP TABLE IF EXISTS `prices`;
3740 CREATE TABLE `prices` (
3741   `pr_id` varchar(11) NOT NULL default '',
3742   `pr_selector` varchar(255) NOT NULL default '' COMMENT 'template selector for drugs, empty for codes',
3743   `pr_level` varchar(31) NOT NULL default '',
3744   `pr_price` decimal(12,2) NOT NULL default '0.00' COMMENT 'price in local currency',
3745   PRIMARY KEY  (`pr_id`,`pr_selector`,`pr_level`)
3746 ) ENGINE=MyISAM;
3748 -- --------------------------------------------------------
3750 -- 
3751 -- Table structure for table `registry`
3752 -- 
3754 DROP TABLE IF EXISTS `registry`;
3755 CREATE TABLE `registry` (
3756   `name` varchar(255) default NULL,
3757   `state` tinyint(4) default NULL,
3758   `directory` varchar(255) default NULL,
3759   `id` bigint(20) NOT NULL auto_increment,
3760   `sql_run` tinyint(4) default NULL,
3761   `unpackaged` tinyint(4) default NULL,
3762   `date` datetime default NULL,
3763   `priority` int(11) default '0',
3764   `category` varchar(255) default NULL,
3765   `nickname` varchar(255) default NULL,
3766   PRIMARY KEY  (`id`)
3767 ) ENGINE=MyISAM AUTO_INCREMENT=16 ;
3769 -- 
3770 -- Dumping data for table `registry`
3771 -- 
3773 INSERT INTO `registry` VALUES ('New Encounter Form', 1, 'newpatient', 1, 1, 1, '2003-09-14 15:16:45', 0, 'Administrative', '');
3774 INSERT INTO `registry` VALUES ('Review of Systems Checks', 1, 'reviewofs', 9, 1, 1, '2003-09-14 15:16:45', 0, 'Clinical', '');
3775 INSERT INTO `registry` VALUES ('Speech Dictation', 1, 'dictation', 10, 1, 1, '2003-09-14 15:16:45', 0, 'Clinical', '');
3776 INSERT INTO `registry` VALUES ('SOAP', 1, 'soap', 11, 1, 1, '2005-03-03 00:16:35', 0, 'Clinical', '');
3777 INSERT INTO `registry` VALUES ('Vitals', 1, 'vitals', 12, 1, 1, '2005-03-03 00:16:34', 0, 'Clinical', '');
3778 INSERT INTO `registry` VALUES ('Review Of Systems', 1, 'ros', 13, 1, 1, '2005-03-03 00:16:30', 0, 'Clinical', '');
3779 INSERT INTO `registry` VALUES ('Fee Sheet', 1, 'fee_sheet', 14, 1, 1, '2007-07-28 00:00:00', 0, 'Administrative', '');
3780 INSERT INTO `registry` VALUES ('Misc Billing Options HCFA', 1, 'misc_billing_options', 15, 1, 1, '2007-07-28 00:00:00', 0, 'Administrative', '');
3781 INSERT INTO `registry` VALUES ('Procedure Order', 1, 'procedure_order', 16, 1, 1, '2010-02-25 00:00:00', 0, 'Administrative', '');
3783 -- --------------------------------------------------------
3786 -- Table structure for table `rule_action`
3789 DROP TABLE IF EXISTS `rule_action`;
3790 CREATE TABLE `rule_action` (
3791   `id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the id column in the clinical_rules table',
3792   `group_id` bigint(20) NOT NULL DEFAULT 1 COMMENT 'Contains group id to identify collection of targets in a rule',
3793   `category` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the category item in the rule_action_item table',
3794   `item` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the item column in the rule_action_item table',
3795   KEY  (`id`)
3796 ) ENGINE=MyISAM ;
3799 -- Standard clinical rule actions
3801 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_htn_bp_measure', 1, 'act_cat_measure', 'act_bp');
3802 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_tob_use_assess', 1, 'act_cat_assess', 'act_tobacco');
3803 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_tob_cess_inter', 1, 'act_cat_inter', 'act_tobacco');
3804 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_adult_wt_screen_fu', 1, 'act_cat_measure', 'act_wt');
3805 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_wt_assess_couns_child', 1, 'act_cat_measure', 'act_wt');
3806 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_wt_assess_couns_child', 2, 'act_cat_edu', 'act_wt');
3807 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_wt_assess_couns_child', 3, 'act_cat_edu', 'act_nutrition');
3808 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_wt_assess_couns_child', 4, 'act_cat_edu', 'act_exercise');
3809 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_wt_assess_couns_child', 5, 'act_cat_measure', 'act_bmi');
3810 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_influenza_ge_50', 1, 'act_cat_treat', 'act_influvacc');
3811 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_pneumovacc_ge_65', 1, 'act_cat_treat', 'act_pneumovacc');
3812 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_dm_hemo_a1c', 1, 'act_cat_measure', 'act_hemo_a1c');
3813 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_dm_urine_alb', 1, 'act_cat_measure', 'act_urine_alb');
3814 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_dm_eye', 1, 'act_cat_exam', 'act_eye');
3815 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_dm_foot', 1, 'act_cat_exam', 'act_foot');
3816 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_cs_mammo', 1, 'act_cat_measure', 'act_mammo');
3817 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_cs_pap', 1, 'act_cat_exam', 'act_pap');
3818 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_cs_colon', 1, 'act_cat_assess', 'act_colon_cancer_screen');
3819 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_cs_prostate', 1, 'act_cat_assess', 'act_prostate_cancer_screen');
3820 INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_inr_monitor', 1, 'act_cat_measure', 'act_lab_inr');
3822 -- --------------------------------------------------------
3825 -- Table structure for table `rule_action_item`
3828 DROP TABLE IF EXISTS `rule_action_item`;
3829 CREATE TABLE `rule_action_item` (
3830   `category` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_action_category',
3831   `item` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_action',
3832   `clin_rem_link` varchar(255) NOT NULL DEFAULT '' COMMENT 'Custom html link in clinical reminder widget',
3833   `reminder_message` text  NOT NULL DEFAULT '' COMMENT 'Custom message in patient reminder',
3834   `custom_flag` tinyint(1) NOT NULL default 0 COMMENT '1 indexed to rule_patient_data, 0 indexed within main schema',
3835   PRIMARY KEY  (`category`,`item`)
3836 ) ENGINE=MyISAM ;
3838 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_bp', '', '', 0);
3839 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_assess', 'act_tobacco', '', '', 0);
3840 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_inter', 'act_tobacco', '', '', 1);
3841 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_wt', '', '', 0);
3842 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_edu', 'act_wt', '', '', 1);
3843 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_bmi', '', '', 0);
3844 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_edu', 'act_nutrition', '', '', 1);
3845 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_edu', 'act_exercise', '', '', 1);
3846 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_treat', 'act_influvacc', '', '', 0);
3847 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_treat', 'act_pneumovacc', '', '', 0);
3848 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_hemo_a1c', '', '', 1);
3849 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_urine_alb', '', '', 1);
3850 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_exam', 'act_eye', '', '', 1);
3851 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_exam', 'act_foot', '', '', 1);
3852 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_mammo', '', '', 1);
3853 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_exam', 'act_pap', '', '', 1);
3854 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_assess', 'act_colon_cancer_screen', '', '', 1);
3855 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_assess', 'act_prostate_cancer_screen', '', '', 1);
3856 INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_measure', 'act_lab_inr', '', '', 0);
3858 -- --------------------------------------------------------
3861 -- Table structure for table `rule_filter`
3864 DROP TABLE IF EXISTS `rule_filter`;
3865 CREATE TABLE `rule_filter` (
3866   `id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the id column in the clinical_rules table',
3867   `include_flag` tinyint(1) NOT NULL default 0 COMMENT '0 is exclude and 1 is include',
3868   `required_flag` tinyint(1) NOT NULL default 0 COMMENT '0 is required and 1 is optional',
3869   `method` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_filters',
3870   `method_detail` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options lists rule__intervals',
3871   `value` varchar(255) NOT NULL DEFAULT '',
3872   KEY  (`id`)
3873 ) ENGINE=MyISAM ;
3876 -- Standard clinical rule filters
3878 -- Hypertension: Blood Pressure Measurement
3879 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'CUSTOM::HTN');
3880 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::401.0');
3881 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::401.1');
3882 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::401.9');
3883 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::402.00');
3884 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::402.01');
3885 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::402.10');
3886 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::402.11');
3887 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::402.90');
3888 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::402.91');
3889 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::403.00');
3890 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::403.01');
3891 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::403.10');
3892 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::403.11');
3893 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::403.90');
3894 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::403.91');
3895 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.00');
3896 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.01');
3897 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.02');
3898 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.03');
3899 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.10');
3900 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.11');
3901 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.12');
3902 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.13');
3903 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.90');
3904 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.91');
3905 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.92');
3906 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::404.93');
3907 -- Tobacco Use Assessment
3908 -- no filters
3909 -- Tobacco Cessation Intervention
3910 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_cess_inter', 1, 1, 'filt_database', '', 'LIFESTYLE::tobacco::current');
3911 -- Adult Weight Screening and Follow-Up
3912 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_adult_wt_screen_fu', 1, 1, 'filt_age_min', 'year', '18');
3913 -- Weight Assessment and Counseling for Children and Adolescents
3914 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_wt_assess_couns_child', 1, 1, 'filt_age_max', 'year', '18');
3915 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_wt_assess_couns_child', 1, 1, 'filt_age_min', 'year', '2');
3916 -- Influenza Immunization for Patients >= 50 Years Old
3917 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_influenza_ge_50', 1, 1, 'filt_age_min', 'year', '50');
3918 -- Pneumonia Vaccination Status for Older Adults
3919 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_pneumovacc_ge_65', 1, 1, 'filt_age_min', 'year', '65');
3920 -- Diabetes: Hemoglobin A1C
3921 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'CUSTOM::diabetes');
3922 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250');
3923 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.0');
3924 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.00');
3925 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.01');
3926 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.02');
3927 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.03');
3928 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.10');
3929 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.11');
3930 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.12');
3931 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.13');
3932 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.20');
3933 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.21');
3934 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.22');
3935 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.23');
3936 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.30');
3937 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.31');
3938 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.32');
3939 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.33');
3940 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.4');
3941 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.40');
3942 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.41');
3943 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.42');
3944 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.43');
3945 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.50');
3946 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.51');
3947 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.52');
3948 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.53');
3949 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.60');
3950 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.61');
3951 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.62');
3952 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.63');
3953 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.7');
3954 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.70');
3955 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.71');
3956 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.72');
3957 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.73');
3958 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.80');
3959 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.81');
3960 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.82');
3961 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.83');
3962 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.9');
3963 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.90');
3964 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.91');
3965 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.92');
3966 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.93');
3967 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::357.2');
3968 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.0');
3969 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.01');
3970 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.02');
3971 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.03');
3972 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.04');
3973 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.05');
3974 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.06');
3975 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::366.41');
3976 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.0');
3977 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.00');
3978 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.01');
3979 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.02');
3980 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.03');
3981 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.04');
3982 -- Diabetes: Urine Microalbumin
3983 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'CUSTOM::diabetes');
3984 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250');
3985 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.0');
3986 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.00');
3987 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.01');
3988 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.02');
3989 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.03');
3990 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.10');
3991 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.11');
3992 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.12');
3993 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.13');
3994 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.20');
3995 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.21');
3996 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.22');
3997 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.23');
3998 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.30');
3999 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.31');
4000 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.32');
4001 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.33');
4002 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.4');
4003 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.40');
4004 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.41');
4005 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.42');
4006 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.43');
4007 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.50');
4008 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.51');
4009 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.52');
4010 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.53');
4011 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.60');
4012 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.61');
4013 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.62');
4014 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.63');
4015 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.7');
4016 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.70');
4017 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.71');
4018 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.72');
4019 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.73');
4020 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.80');
4021 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.81');
4022 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.82');
4023 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.83');
4024 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.9');
4025 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.90');
4026 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.91');
4027 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.92');
4028 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.93');
4029 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::357.2');
4030 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.0');
4031 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.01');
4032 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.02');
4033 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.03');
4034 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.04');
4035 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.05');
4036 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.06');
4037 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::366.41');
4038 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.0');
4039 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.00');
4040 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.01');
4041 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.02');
4042 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.03');
4043 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.04');
4044 -- Diabetes: Eye Exam
4045 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'CUSTOM::diabetes');
4046 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250');
4047 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.0');
4048 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.00');
4049 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.01');
4050 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.02');
4051 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.03');
4052 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.10');
4053 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.11');
4054 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.12');
4055 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.13');
4056 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.20');
4057 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.21');
4058 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.22');
4059 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.23');
4060 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.30');
4061 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.31');
4062 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.32');
4063 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.33');
4064 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.4');
4065 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.40');
4066 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.41');
4067 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.42');
4068 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.43');
4069 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.50');
4070 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.51');
4071 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.52');
4072 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.53');
4073 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.60');
4074 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.61');
4075 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.62');
4076 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.63');
4077 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.7');
4078 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.70');
4079 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.71');
4080 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.72');
4081 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.73');
4082 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.80');
4083 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.81');
4084 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.82');
4085 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.83');
4086 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.9');
4087 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.90');
4088 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.91');
4089 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.92');
4090 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.93');
4091 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::357.2');
4092 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.0');
4093 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.01');
4094 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.02');
4095 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.03');
4096 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.04');
4097 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.05');
4098 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.06');
4099 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::366.41');
4100 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.0');
4101 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.00');
4102 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.01');
4103 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.02');
4104 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.03');
4105 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.04');
4106 -- Diabetes: Foot Exam
4107 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'CUSTOM::diabetes');
4108 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250');
4109 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.0');
4110 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.00');
4111 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.01');
4112 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.02');
4113 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.03');
4114 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.10');
4115 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.11');
4116 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.12');
4117 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.13');
4118 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.20');
4119 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.21');
4120 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.22');
4121 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.23');
4122 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.30');
4123 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.31');
4124 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.32');
4125 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.33');
4126 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.4');
4127 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.40');
4128 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.41');
4129 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.42');
4130 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.43');
4131 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.50');
4132 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.51');
4133 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.52');
4134 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.53');
4135 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.60');
4136 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.61');
4137 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.62');
4138 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.63');
4139 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.7');
4140 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.70');
4141 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.71');
4142 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.72');
4143 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.73');
4144 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.80');
4145 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.81');
4146 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.82');
4147 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.83');
4148 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.9');
4149 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.90');
4150 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.91');
4151 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.92');
4152 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::250.93');
4153 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::357.2');
4154 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.0');
4155 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.01');
4156 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.02');
4157 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.03');
4158 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.04');
4159 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.05');
4160 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::362.06');
4161 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::366.41');
4162 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.0');
4163 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.00');
4164 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.01');
4165 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.02');
4166 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.03');
4167 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 1, 0, 'filt_lists', 'medical_problem', 'ICD9::648.04');
4168 -- Cancer Screening: Mammogram
4169 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_mammo', 1, 1, 'filt_age_min', 'year', '40');
4170 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_mammo', 1, 1, 'filt_sex', '', 'Female');
4171 -- Cancer Screening: Pap Smear
4172 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_pap', 1, 1, 'filt_age_min', 'year', '18');
4173 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_pap', 1, 1, 'filt_sex', '', 'Female');
4174 -- Cancer Screening: Colon Cancer Screening
4175 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_colon', 1, 1, 'filt_age_min', 'year', '50');
4176 -- Cancer Screening: Prostate Cancer Screening
4177 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_prostate', 1, 1, 'filt_age_min', 'year', '50');
4178 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_prostate', 1, 1, 'filt_sex', '', 'Male');
4180 -- Rule filters to specifically demonstrate passing of NIST criteria
4182 -- Coumadin Management - INR Monitoring
4183 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_inr_monitor', 1, 0, 'filt_lists', 'medication', 'coumadin');
4184 INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_inr_monitor', 1, 0, 'filt_lists', 'medication', 'warfarin');
4186 -- --------------------------------------------------------
4189 -- Table structure for table `rule_patient_data`
4192 DROP TABLE IF EXISTS `rule_patient_data`;
4193 CREATE TABLE `rule_patient_data` (
4194   `id` bigint(20) NOT NULL auto_increment,
4195   `date` datetime DEFAULT NULL,
4196   `pid` bigint(20) NOT NULL,
4197   `category` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the category item in the rule_action_item table',
4198   `item` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the item column in the rule_action_item table',
4199   `complete` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list yesno',
4200   `result` varchar(255) NOT NULL DEFAULT '',
4201   PRIMARY KEY  (`id`),
4202   KEY (`pid`),
4203   KEY (`category`,`item`)
4204 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
4206 -- --------------------------------------------------------
4209 -- Table structure for table `rule_reminder`
4212 DROP TABLE IF EXISTS `rule_reminder`;
4213 CREATE TABLE `rule_reminder` (
4214   `id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the id column in the clinical_rules table',
4215   `method` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_reminder_methods',
4216   `method_detail` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_reminder_intervals',
4217   `value` varchar(255) NOT NULL DEFAULT '',
4218   KEY  (`id`)
4219 ) ENGINE=MyISAM ;
4221 -- Hypertension: Blood Pressure Measurement
4222 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 'clinical_reminder_pre', 'week', '2');
4223 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 'clinical_reminder_post', 'month', '1');
4224 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 'patient_reminder_pre', 'week', '2');
4225 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_htn_bp_measure', 'patient_reminder_post', 'month', '1');
4226 -- Tobacco Use Assessment
4227 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_use_assess', 'clinical_reminder_pre', 'week', '2');
4228 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_use_assess', 'clinical_reminder_post', 'month', '1');
4229 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_use_assess', 'patient_reminder_pre', 'week', '2');
4230 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_use_assess', 'patient_reminder_post', 'month', '1');
4231 -- Tobacco Cessation Intervention
4232 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_cess_inter', 'clinical_reminder_pre', 'week', '2');
4233 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_cess_inter', 'clinical_reminder_post', 'month', '1');
4234 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_cess_inter', 'patient_reminder_pre', 'week', '2');
4235 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_tob_cess_inter', 'patient_reminder_post', 'month', '1');
4236 -- Adult Weight Screening and Follow-Up
4237 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_adult_wt_screen_fu', 'clinical_reminder_pre', 'week', '2');
4238 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_adult_wt_screen_fu', 'clinical_reminder_post', 'month', '1');
4239 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_adult_wt_screen_fu', 'patient_reminder_pre', 'week', '2');
4240 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_adult_wt_screen_fu', 'patient_reminder_post', 'month', '1');
4241 -- Weight Assessment and Counseling for Children and Adolescents
4242 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_wt_assess_couns_child', 'clinical_reminder_pre', 'week', '2');
4243 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_wt_assess_couns_child', 'clinical_reminder_post', 'month', '1');
4244 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_wt_assess_couns_child', 'patient_reminder_pre', 'week', '2');
4245 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_wt_assess_couns_child', 'patient_reminder_post', 'month', '1');
4246 -- Influenza Immunization for Patients >= 50 Years Old
4247 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_influenza_ge_50', 'clinical_reminder_pre', 'week', '2');
4248 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_influenza_ge_50', 'clinical_reminder_post', 'month', '1');
4249 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_influenza_ge_50', 'patient_reminder_pre', 'week', '2');
4250 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_influenza_ge_50', 'patient_reminder_post', 'month', '1');
4251 -- Pneumonia Vaccination Status for Older Adults
4252 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_pneumovacc_ge_65', 'clinical_reminder_pre', 'week', '2');
4253 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_pneumovacc_ge_65', 'clinical_reminder_post', 'month', '1');
4254 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_pneumovacc_ge_65', 'patient_reminder_pre', 'week', '2');
4255 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_pneumovacc_ge_65', 'patient_reminder_post', 'month', '1');
4256 -- Diabetes: Hemoglobin A1C
4257 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 'clinical_reminder_pre', 'week', '2');
4258 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 'clinical_reminder_post', 'month', '1');
4259 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 'patient_reminder_pre', 'week', '2');
4260 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_hemo_a1c', 'patient_reminder_post', 'month', '1');
4261 -- Diabetes: Urine Microalbumin
4262 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 'clinical_reminder_pre', 'week', '2');
4263 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 'clinical_reminder_post', 'month', '1');
4264 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 'patient_reminder_pre', 'week', '2');
4265 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_urine_alb', 'patient_reminder_post', 'month', '1');
4266 -- Diabetes: Eye Exam
4267 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 'clinical_reminder_pre', 'week', '2');
4268 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 'clinical_reminder_post', 'month', '1');
4269 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 'patient_reminder_pre', 'week', '2');
4270 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_eye', 'patient_reminder_post', 'month', '1');
4271 -- Diabetes: Foot Exam
4272 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 'clinical_reminder_pre', 'week', '2');
4273 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 'clinical_reminder_post', 'month', '1');
4274 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 'patient_reminder_pre', 'week', '2');
4275 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_dm_foot', 'patient_reminder_post', 'month', '1');
4276 -- Cancer Screening: Mammogram
4277 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_mammo', 'clinical_reminder_pre', 'week', '2');
4278 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_mammo', 'clinical_reminder_post', 'month', '1');
4279 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_mammo', 'patient_reminder_pre', 'week', '2');
4280 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_mammo', 'patient_reminder_post', 'month', '1');
4281 -- Cancer Screening: Pap Smear
4282 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_pap', 'clinical_reminder_pre', 'week', '2');
4283 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_pap', 'clinical_reminder_post', 'month', '1');
4284 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_pap', 'patient_reminder_pre', 'week', '2');
4285 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_pap', 'patient_reminder_post', 'month', '1');
4286 -- Cancer Screening: Colon Cancer Screening
4287 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_colon', 'clinical_reminder_pre', 'week', '2');
4288 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_colon', 'clinical_reminder_post', 'month', '1');
4289 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_colon', 'patient_reminder_pre', 'week', '2');
4290 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_colon', 'patient_reminder_post', 'month', '1');
4291 -- Cancer Screening: Prostate Cancer Screening
4292 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_prostate', 'clinical_reminder_pre', 'week', '2');
4293 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_prostate', 'clinical_reminder_post', 'month', '1');
4294 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_prostate', 'patient_reminder_pre', 'week', '2');
4295 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_cs_prostate', 'patient_reminder_post', 'month', '1');
4296 -- Coumadin Management - INR Monitoring
4297 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_inr_monitor', 'clinical_reminder_pre', 'week', '2');
4298 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_inr_monitor', 'clinical_reminder_post', 'month', '1');
4299 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_inr_monitor', 'patient_reminder_pre', 'week', '2');
4300 INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_inr_monitor', 'patient_reminder_post', 'month', '1');
4302 -- --------------------------------------------------------
4305 -- Table structure for table `rule_target`
4308 DROP TABLE IF EXISTS `rule_target`;
4309 CREATE TABLE `rule_target` (
4310   `id` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to the id column in the clinical_rules table',
4311   `group_id` bigint(20) NOT NULL DEFAULT 1 COMMENT 'Contains group id to identify collection of targets in a rule',
4312   `include_flag` tinyint(1) NOT NULL default 0 COMMENT '0 is exclude and 1 is include',
4313   `required_flag` tinyint(1) NOT NULL default 0 COMMENT '0 is required and 1 is optional',
4314   `method` varchar(31) NOT NULL DEFAULT '' COMMENT 'Maps to list_options list rule_targets', 
4315   `value` varchar(255) NOT NULL DEFAULT '' COMMENT 'Data is dependent on the method',
4316   `interval` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Only used in interval entries', 
4317   KEY  (`id`)
4318 ) ENGINE=MyISAM ;
4321 -- Standard clinical rule targets
4323 -- Hypertension: Blood Pressure Measurement
4324 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_htn_bp_measure', 1, 1, 1, 'target_interval', 'year', 1);
4325 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_htn_bp_measure', 1, 1, 1, 'target_database', '::form_vitals::bps::::::ge::1', 0);
4326 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_htn_bp_measure', 1, 1, 1, 'target_database', '::form_vitals::bpd::::::ge::1', 0);
4327 -- Tobacco Use Assessment
4328 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_tob_use_assess', 1, 1, 1, 'target_database', 'LIFESTYLE::tobacco::', 0);
4329 -- Tobacco Cessation Intervention
4330 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_tob_cess_inter', 1, 1, 1, 'target_interval', 'year', 1);
4331 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_tob_cess_inter', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_inter::act_tobacco::YES::ge::1', 0);
4332 -- Adult Weight Screening and Follow-Up
4333 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_adult_wt_screen_fu', 1, 1, 1, 'target_database', '::form_vitals::weight::::::ge::1', 0);
4334 -- Weight Assessment and Counseling for Children and Adolescents
4335 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 1, 1, 1, 'target_database', '::form_vitals::weight::::::ge::1', 0);
4336 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 1, 1, 1, 'target_interval', 'year', 3);
4337 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 2, 1, 1, 'target_database', 'CUSTOM::act_cat_edu::act_wt::YES::ge::1', 0);
4338 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 2, 1, 1, 'target_interval', 'year', 3);
4339 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 3, 1, 1, 'target_database', 'CUSTOM::act_cat_edu::act_nutrition::YES::ge::1', 0);
4340 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 3, 1, 1, 'target_interval', 'year', 3);
4341 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 4, 1, 1, 'target_database', 'CUSTOM::act_cat_edu::act_exercise::YES::ge::1', 0);
4342 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 4, 1, 1, 'target_interval', 'year', 3);
4343 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 5, 1, 1, 'target_database', '::form_vitals::BMI::::::ge::1', 0);
4344 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_wt_assess_couns_child', 5, 1, 1, 'target_interval', 'year', 3);
4345 -- Influenza Immunization for Patients >= 50 Years Old
4346 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 1, 'target_interval', 'flu_season', 1);
4347 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::15::ge::1', 0);
4348 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::16::ge::1', 0);
4349 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::88::ge::1', 0);
4350 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::111::ge::1', 0);
4351 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::125::ge::1', 0);
4352 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::126::ge::1', 0);
4353 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::127::ge::1', 0);
4354 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::128::ge::1', 0);
4355 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::135::ge::1', 0);
4356 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::140::ge::1', 0);
4357 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::141::ge::1', 0);
4358 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_influenza_ge_50', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::144::ge::1', 0);
4359 -- Pneumonia Vaccination Status for Older Adults
4360 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_pneumovacc_ge_65', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::33::ge::1', 0);
4361 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_pneumovacc_ge_65', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::100::ge::1', 0);
4362 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_pneumovacc_ge_65', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::109::ge::1', 0);
4363 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_pneumovacc_ge_65', 1, 1, 0, 'target_database', '::immunizations::cvx_code::eq::133::ge::1', 0);
4364 -- Diabetes: Hemoglobin A1C
4365 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_hemo_a1c', 1, 1, 1, 'target_interval', 'month', 3);
4366 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_hemo_a1c', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_measure::act_hemo_a1c::YES::ge::1', 0);
4367 -- Diabetes: Urine Microalbumin
4368 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_urine_alb', 1, 1, 1, 'target_interval', 'year', 1);
4369 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_urine_alb', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_measure::act_urine_alb::YES::ge::1', 0);
4370 -- Diabetes: Eye Exam
4371 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_eye', 1, 1, 1, 'target_interval', 'year', 1);
4372 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_eye', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_exam::act_eye::YES::ge::1', 0);
4373 -- Diabetes: Foot Exam
4374 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_foot', 1, 1, 1, 'target_interval', 'year', 1);
4375 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_dm_foot', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_exam::act_foot::YES::ge::1', 0);
4376 -- Cancer Screening: Mammogram
4377 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_cs_mammo', 1, 1, 1, 'target_interval', 'year', 1);
4378 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_cs_mammo', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_measure::act_mammo::YES::ge::1', 0);
4379 -- Cancer Screening: Pap Smear
4380 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_cs_pap', 1, 1, 1, 'target_interval', 'year', 1);
4381 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_cs_pap', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_exam::act_pap::YES::ge::1', 0);
4382 -- Cancer Screening: Colon Cancer Screening
4383 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_cs_colon', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_assess::act_colon_cancer_screen::YES::ge::1', 0);
4384 -- Cancer Screening: Prostate Cancer Screening
4385 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_cs_prostate', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_assess::act_prostate_cancer_screen::YES::ge::1', 0);
4387 -- Rule targets to specifically demonstrate passing of NIST criteria
4389 -- Coumadin Management - INR Monitoring
4390 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_inr_monitor', 1, 1, 1, 'target_interval', 'week', 3);
4391 INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_inr_monitor', 1, 1, 1, 'target_proc', 'INR::CPT4:85610::::::ge::1', 0);
4393 -- --------------------------------------------------------
4395 -- 
4396 -- Table structure for table `sequences`
4397 -- 
4399 DROP TABLE IF EXISTS `sequences`;
4400 CREATE TABLE `sequences` (
4401   `id` int(11) unsigned NOT NULL default '0'
4402 ) ENGINE=MyISAM;
4404 -- 
4405 -- Dumping data for table `sequences`
4406 -- 
4408 INSERT INTO `sequences` VALUES (1);
4410 -- --------------------------------------------------------
4412 -- 
4413 -- Table structure for table `transactions`
4414 -- 
4416 DROP TABLE IF EXISTS `transactions`;
4417 CREATE TABLE `transactions` (
4418   `id`                      bigint(20)   NOT NULL auto_increment,
4419   `date`                    datetime     default NULL,
4420   `title`                   varchar(255) NOT NULL DEFAULT '',
4421   `body`                    longtext     NOT NULL DEFAULT '',
4422   `pid`                     bigint(20)   default NULL,
4423   `user`                    varchar(255) NOT NULL DEFAULT '',
4424   `groupname`               varchar(255) NOT NULL DEFAULT '',
4425   `authorized`              tinyint(4)   default NULL,
4426   `refer_date`              date         DEFAULT NULL,
4427   `refer_from`              int(11)      NOT NULL DEFAULT 0,
4428   `refer_to`                int(11)      NOT NULL DEFAULT 0,
4429   `refer_diag`              varchar(255) NOT NULL DEFAULT '',
4430   `refer_risk_level`        varchar(255) NOT NULL DEFAULT '',
4431   `refer_vitals`            tinyint(1)   NOT NULL DEFAULT 0,
4432   `refer_external`          tinyint(1)   NOT NULL DEFAULT 0,
4433   `refer_related_code`      varchar(255) NOT NULL DEFAULT '',
4434   `refer_reply_date`        date         DEFAULT NULL,
4435   `reply_date`              date         DEFAULT NULL,
4436   `reply_from`              varchar(255) NOT NULL DEFAULT '',
4437   `reply_init_diag`         varchar(255) NOT NULL DEFAULT '',
4438   `reply_final_diag`        varchar(255) NOT NULL DEFAULT '',
4439   `reply_documents`         varchar(255) NOT NULL DEFAULT '',
4440   `reply_findings`          text         NOT NULL DEFAULT '',
4441   `reply_services`          text         NOT NULL DEFAULT '',
4442   `reply_recommend`         text         NOT NULL DEFAULT '',
4443   `reply_rx_refer`          text         NOT NULL DEFAULT '',
4444   `reply_related_code`      varchar(255) NOT NULL DEFAULT '',
4445   PRIMARY KEY  (`id`)
4446 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
4448 -- --------------------------------------------------------
4450 -- 
4451 -- Table structure for table `users`
4452 -- 
4454 DROP TABLE IF EXISTS `users`;
4455 CREATE TABLE `users` (
4456   `id` bigint(20) NOT NULL auto_increment,
4457   `username` varchar(255) default NULL,
4458   `password` longtext,
4459   `authorized` tinyint(4) default NULL,
4460   `info` longtext,
4461   `source` tinyint(4) default NULL,
4462   `fname` varchar(255) default NULL,
4463   `mname` varchar(255) default NULL,
4464   `lname` varchar(255) default NULL,
4465   `federaltaxid` varchar(255) default NULL,
4466   `federaldrugid` varchar(255) default NULL,
4467   `upin` varchar(255) default NULL,
4468   `facility` varchar(255) default NULL,
4469   `facility_id` int(11) NOT NULL default '0',
4470   `see_auth` int(11) NOT NULL default '1',
4471   `active` tinyint(1) NOT NULL default '1',
4472   `npi` varchar(15) default NULL,
4473   `title` varchar(30) default NULL,
4474   `specialty` varchar(255) default NULL,
4475   `billname` varchar(255) default NULL,
4476   `email` varchar(255) default NULL,
4477   `url` varchar(255) default NULL,
4478   `assistant` varchar(255) default NULL,
4479   `organization` varchar(255) default NULL,
4480   `valedictory` varchar(255) default NULL,
4481   `street` varchar(60) default NULL,
4482   `streetb` varchar(60) default NULL,
4483   `city` varchar(30) default NULL,
4484   `state` varchar(30) default NULL,
4485   `zip` varchar(20) default NULL,
4486   `street2` varchar(60) default NULL,
4487   `streetb2` varchar(60) default NULL,
4488   `city2` varchar(30) default NULL,
4489   `state2` varchar(30) default NULL,
4490   `zip2` varchar(20) default NULL,
4491   `phone` varchar(30) default NULL,
4492   `fax` varchar(30) default NULL,
4493   `phonew1` varchar(30) default NULL,
4494   `phonew2` varchar(30) default NULL,
4495   `phonecell` varchar(30) default NULL,
4496   `notes` text,
4497   `cal_ui` tinyint(4) NOT NULL default '1',
4498   `taxonomy` varchar(30) NOT NULL DEFAULT '207Q00000X',
4499   `ssi_relayhealth` varchar(64) NULL,
4500   `calendar` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 = appears in calendar',
4501   `abook_type` varchar(31) NOT NULL DEFAULT '',
4502   `pwd_expiration_date` date default NULL,
4503   `pwd_history1` longtext default NULL,
4504   `pwd_history2` longtext default NULL,
4505   `default_warehouse` varchar(31) NOT NULL DEFAULT '',
4506   `irnpool` varchar(31) NOT NULL DEFAULT '',
4507   `state_license_number` VARCHAR(25) DEFAULT NULL,
4508   `newcrop_user_role` VARCHAR(30) DEFAULT NULL,
4509   PRIMARY KEY  (`id`)
4510 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
4512 -- --------------------------------------------------------
4515 -- Table structure for table `user_settings`
4518 CREATE TABLE `user_settings` (
4519   `setting_user`  bigint(20)   NOT NULL DEFAULT 0,
4520   `setting_label` varchar(63)  NOT NULL,
4521   `setting_value` varchar(255) NOT NULL DEFAULT '',
4522   PRIMARY KEY (`setting_user`, `setting_label`)
4523 ) ENGINE=MyISAM;
4526 -- Dumping data for table `user_settings`
4529 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'allergy_ps_expand', '1');
4530 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'appointments_ps_expand', '1');
4531 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'billing_ps_expand', '0');
4532 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'clinical_reminders_ps_expand', '1');
4533 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'demographics_ps_expand', '0');
4534 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'dental_ps_expand', '1');
4535 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'directives_ps_expand', '1');
4536 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'disclosures_ps_expand', '0');
4537 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'immunizations_ps_expand', '1');
4538 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'insurance_ps_expand', '0');
4539 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'medical_problem_ps_expand', '1');
4540 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'medication_ps_expand', '1');
4541 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'patient_reminders_ps_expand', '0');
4542 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'pnotes_ps_expand', '0');
4543 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'prescriptions_ps_expand', '1');
4544 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'surgery_ps_expand', '1');
4545 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'vitals_ps_expand', '1');
4546 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (0, 'gacl_protect', '0');
4547 INSERT INTO user_settings ( setting_user, setting_label, setting_value ) VALUES (1, 'gacl_protect', '1');
4549 -- --------------------------------------------------------
4551 -- 
4552 -- Table structure for table `x12_partners`
4553 -- 
4555 DROP TABLE IF EXISTS `x12_partners`;
4556 CREATE TABLE `x12_partners` (
4557   `id` int(11) NOT NULL default '0',
4558   `name` varchar(255) default NULL,
4559   `id_number` varchar(255) default NULL,
4560   `x12_sender_id` varchar(255) default NULL,
4561   `x12_receiver_id` varchar(255) default NULL,
4562   `x12_version` varchar(255) default NULL,
4563   `processing_format` enum('standard','medi-cal','cms','proxymed') default NULL,
4564   `x12_isa05` char(2)     NOT NULL DEFAULT 'ZZ',
4565   `x12_isa07` char(2)     NOT NULL DEFAULT 'ZZ',
4566   `x12_isa14` char(1)     NOT NULL DEFAULT '0',
4567   `x12_isa15` char(1)     NOT NULL DEFAULT 'P',
4568   `x12_gs02`  varchar(15) NOT NULL DEFAULT '',
4569   `x12_per06` varchar(80) NOT NULL DEFAULT '',
4570   PRIMARY KEY  (`id`)
4571 ) ENGINE=MyISAM;
4573 ------------------------------------------------------------------------------------- 
4574 -- Table structure for table `automatic_notification`
4575 -- 
4577 DROP TABLE IF EXISTS `automatic_notification`;
4578 CREATE TABLE `automatic_notification` (
4579   `notification_id` int(5) NOT NULL auto_increment,
4580   `sms_gateway_type` varchar(255) NOT NULL,
4581   `next_app_date` date NOT NULL,
4582   `next_app_time` varchar(10) NOT NULL,
4583   `provider_name` varchar(100) NOT NULL,
4584   `message` text NOT NULL,
4585   `email_sender` varchar(100) NOT NULL,
4586   `email_subject` varchar(100) NOT NULL,
4587   `type` enum('SMS','Email') NOT NULL default 'SMS',
4588   `notification_sent_date` datetime NOT NULL,
4589   PRIMARY KEY  (`notification_id`)
4590 ) ENGINE=InnoDB AUTO_INCREMENT=3 ;
4592 -- 
4593 -- Dumping data for table `automatic_notification`
4594 -- 
4596 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'),
4597 (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');
4599 -- --------------------------------------------------------
4601 -- 
4602 -- Table structure for table `notification_log`
4603 -- 
4605 DROP TABLE IF EXISTS `notification_log`;
4606 CREATE TABLE `notification_log` (
4607   `iLogId` int(11) NOT NULL auto_increment,
4608   `pid` int(7) NOT NULL,
4609   `pc_eid` int(11) unsigned NULL,
4610   `sms_gateway_type` varchar(50) NOT NULL,
4611   `smsgateway_info` varchar(255) NOT NULL,
4612   `message` text NOT NULL,
4613   `email_sender` varchar(255) NOT NULL,
4614   `email_subject` varchar(255) NOT NULL,
4615   `type` enum('SMS','Email') NOT NULL,
4616   `patient_info` text NOT NULL,
4617   `pc_eventDate` date NOT NULL,
4618   `pc_endDate` date NOT NULL,
4619   `pc_startTime` time NOT NULL,
4620   `pc_endTime` time NOT NULL,
4621   `dSentDateTime` datetime NOT NULL,
4622   PRIMARY KEY  (`iLogId`)
4623 ) ENGINE=InnoDB AUTO_INCREMENT=5 ;
4625 -- --------------------------------------------------------
4627 -- 
4628 -- Table structure for table `notification_settings`
4629 -- 
4631 DROP TABLE IF EXISTS `notification_settings`;
4632 CREATE TABLE `notification_settings` (
4633   `SettingsId` int(3) NOT NULL auto_increment,
4634   `Send_SMS_Before_Hours` int(3) NOT NULL,
4635   `Send_Email_Before_Hours` int(3) NOT NULL,
4636   `SMS_gateway_username` varchar(100) NOT NULL,
4637   `SMS_gateway_password` varchar(100) NOT NULL,
4638   `SMS_gateway_apikey` varchar(100) NOT NULL,
4639   `type` varchar(50) NOT NULL,
4640   PRIMARY KEY  (`SettingsId`)
4641 ) ENGINE=InnoDB AUTO_INCREMENT=2 ;
4643 -- 
4644 -- Dumping data for table `notification_settings`
4645 -- 
4647 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');
4649 -- -------------------------------------------------------------------
4651 CREATE TABLE chart_tracker (
4652   ct_pid            int(11)       NOT NULL,
4653   ct_when           datetime      NOT NULL,
4654   ct_userid         bigint(20)    NOT NULL DEFAULT 0,
4655   ct_location       varchar(31)   NOT NULL DEFAULT '',
4656   PRIMARY KEY (ct_pid, ct_when)
4657 ) ENGINE=MyISAM;
4659 CREATE TABLE ar_session (
4660   session_id     int unsigned  NOT NULL AUTO_INCREMENT,
4661   payer_id       int(11)       NOT NULL            COMMENT '0=pt else references insurance_companies.id',
4662   user_id        int(11)       NOT NULL            COMMENT 'references users.id for session owner',
4663   closed         tinyint(1)    NOT NULL DEFAULT 0  COMMENT '0=no, 1=yes',
4664   reference      varchar(255)  NOT NULL DEFAULT '' COMMENT 'check or EOB number',
4665   check_date     date          DEFAULT NULL,
4666   deposit_date   date          DEFAULT NULL,
4667   pay_total      decimal(12,2) NOT NULL DEFAULT 0,
4668   created_time timestamp NOT NULL default CURRENT_TIMESTAMP,
4669   modified_time datetime NOT NULL,
4670   global_amount decimal( 12, 2 ) NOT NULL ,
4671   payment_type varchar( 50 ) NOT NULL ,
4672   description text NOT NULL ,
4673   adjustment_code varchar( 50 ) NOT NULL ,
4674   post_to_date date NOT NULL ,
4675   patient_id int( 11 ) NOT NULL ,
4676   payment_method varchar( 25 ) NOT NULL,
4677   PRIMARY KEY (session_id),
4678   KEY user_closed (user_id, closed),
4679   KEY deposit_date (deposit_date)
4680 ) ENGINE=MyISAM;
4682 CREATE TABLE ar_activity (
4683   pid            int(11)       NOT NULL,
4684   encounter      int(11)       NOT NULL,
4685   sequence_no    int unsigned  NOT NULL AUTO_INCREMENT,
4686   code           varchar(9)    NOT NULL            COMMENT 'empty means claim level',
4687   modifier       varchar(5)    NOT NULL DEFAULT '',
4688   payer_type     int           NOT NULL            COMMENT '0=pt, 1=ins1, 2=ins2, etc',
4689   post_time      datetime      NOT NULL,
4690   post_user      int(11)       NOT NULL            COMMENT 'references users.id',
4691   session_id     int unsigned  NOT NULL            COMMENT 'references ar_session.session_id',
4692   memo           varchar(255)  NOT NULL DEFAULT '' COMMENT 'adjustment reasons go here',
4693   pay_amount     decimal(12,2) NOT NULL DEFAULT 0  COMMENT 'either pay or adj will always be 0',
4694   adj_amount     decimal(12,2) NOT NULL DEFAULT 0,
4695   modified_time datetime NOT NULL,
4696   follow_up char(1) NOT NULL,
4697   follow_up_note text NOT NULL,
4698   account_code varchar(15) NOT NULL,
4699   PRIMARY KEY (pid, encounter, sequence_no),
4700   KEY session_id (session_id)
4701 ) ENGINE=MyISAM;
4703 CREATE TABLE `users_facility` (
4704   `tablename` varchar(64) NOT NULL,
4705   `table_id` int(11) NOT NULL,
4706   `facility_id` int(11) NOT NULL,
4707   PRIMARY KEY (`tablename`,`table_id`,`facility_id`)
4708 ) ENGINE=InnoDB COMMENT='joins users or patient_data to facility table';
4710 CREATE TABLE `lbf_data` (
4711   `form_id`     int(11)      NOT NULL AUTO_INCREMENT COMMENT 'references forms.form_id',
4712   `field_id`    varchar(31)  NOT NULL COMMENT 'references layout_options.field_id',
4713   `field_value` TEXT NOT NULL,
4714   PRIMARY KEY (`form_id`,`field_id`)
4715 ) ENGINE=MyISAM COMMENT='contains all data from layout-based forms';
4717 CREATE TABLE gprelations (
4718   type1 int(2)     NOT NULL,
4719   id1   bigint(20) NOT NULL,
4720   type2 int(2)     NOT NULL,
4721   id2   bigint(20) NOT NULL,
4722   PRIMARY KEY (type1,id1,type2,id2),
4723   KEY key2  (type2,id2)
4724 ) ENGINE=MyISAM COMMENT='general purpose relations';
4726 CREATE TABLE `procedure_type` (
4727   `procedure_type_id`   bigint(20)   NOT NULL AUTO_INCREMENT,
4728   `parent`              bigint(20)   NOT NULL DEFAULT 0  COMMENT 'references procedure_type.procedure_type_id',
4729   `name`                varchar(63)  NOT NULL DEFAULT '' COMMENT 'name for this category, procedure or result type',
4730   `lab_id`              bigint(20)   NOT NULL DEFAULT 0  COMMENT 'references users.id, 0 means default to parent',
4731   `procedure_code`      varchar(31)  NOT NULL DEFAULT '' COMMENT 'code identifying this procedure',
4732   `procedure_type`      varchar(31)  NOT NULL DEFAULT '' COMMENT 'see list proc_type',
4733   `body_site`           varchar(31)  NOT NULL DEFAULT '' COMMENT 'where to do injection, e.g. arm, buttok',
4734   `specimen`            varchar(31)  NOT NULL DEFAULT '' COMMENT 'blood, urine, saliva, etc.',
4735   `route_admin`         varchar(31)  NOT NULL DEFAULT '' COMMENT 'oral, injection',
4736   `laterality`          varchar(31)  NOT NULL DEFAULT '' COMMENT 'left, right, ...',
4737   `description`         varchar(255) NOT NULL DEFAULT '' COMMENT 'descriptive text for procedure_code',
4738   `standard_code`       varchar(255) NOT NULL DEFAULT '' COMMENT 'industry standard code type and code (e.g. CPT4:12345)',
4739   `related_code`        varchar(255) NOT NULL DEFAULT '' COMMENT 'suggested code(s) for followup services if result is abnormal',
4740   `units`               varchar(31)  NOT NULL DEFAULT '' COMMENT 'default for procedure_result.units',
4741   `range`               varchar(255) NOT NULL DEFAULT '' COMMENT 'default for procedure_result.range',
4742   `seq`                 int(11)      NOT NULL default 0  COMMENT 'sequence number for ordering',
4743   PRIMARY KEY (`procedure_type_id`),
4744   KEY parent (parent)
4745 ) ENGINE=MyISAM;
4747 CREATE TABLE `procedure_order` (
4748   `procedure_order_id`     bigint(20)   NOT NULL AUTO_INCREMENT,
4749   `procedure_type_id`      bigint(20)   NOT NULL            COMMENT 'references procedure_type.procedure_type_id',
4750   `provider_id`            bigint(20)   NOT NULL DEFAULT 0  COMMENT 'references users.id',
4751   `patient_id`             bigint(20)   NOT NULL            COMMENT 'references patient_data.pid',
4752   `encounter_id`           bigint(20)   NOT NULL DEFAULT 0  COMMENT 'references form_encounter.encounter',
4753   `date_collected`         datetime     DEFAULT NULL        COMMENT 'time specimen collected',
4754   `date_ordered`           date         DEFAULT NULL,
4755   `order_priority`         varchar(31)  NOT NULL DEFAULT '',
4756   `order_status`           varchar(31)  NOT NULL DEFAULT '' COMMENT 'pending,routed,complete,canceled',
4757   `patient_instructions`   text         NOT NULL DEFAULT '',
4758   `activity`               tinyint(1)   NOT NULL DEFAULT 1  COMMENT '0 if deleted',
4759   `control_id`             bigint(20)   NOT NULL            COMMENT 'This is the CONTROL ID that is sent back from lab',
4760   PRIMARY KEY (`procedure_order_id`),
4761   KEY datepid (date_ordered, patient_id)
4762 ) ENGINE=MyISAM;
4764 CREATE TABLE `procedure_report` (
4765   `procedure_report_id` bigint(20)     NOT NULL AUTO_INCREMENT,
4766   `procedure_order_id`  bigint(20)     DEFAULT NULL   COMMENT 'references procedure_order.procedure_order_id',
4767   `date_collected`      datetime       DEFAULT NULL,
4768   `date_report`         date           DEFAULT NULL,
4769   `source`              bigint(20)     NOT NULL DEFAULT 0  COMMENT 'references users.id, who entered this data',
4770   `specimen_num`        varchar(63)    NOT NULL DEFAULT '',
4771   `report_status`       varchar(31)    NOT NULL DEFAULT '' COMMENT 'received,complete,error',
4772   `review_status`       varchar(31)    NOT NULL DEFAULT 'received' COMMENT 'panding reivew status: received,reviewed',  
4773   PRIMARY KEY (`procedure_report_id`),
4774   KEY procedure_order_id (procedure_order_id)
4775 ) ENGINE=MyISAM; 
4777 CREATE TABLE `procedure_result` (
4778   `procedure_result_id` bigint(20)   NOT NULL AUTO_INCREMENT,
4779   `procedure_report_id` bigint(20)   NOT NULL            COMMENT 'references procedure_report.procedure_report_id',
4780   `procedure_type_id`   bigint(20)   NOT NULL            COMMENT 'references procedure_type.procedure_type_id',
4781   `date`                datetime     DEFAULT NULL        COMMENT 'lab-provided date specific to this result',
4782   `facility`            varchar(255) NOT NULL DEFAULT '' COMMENT 'lab-provided testing facility ID',
4783   `units`               varchar(31)  NOT NULL DEFAULT '',
4784   `result`              varchar(255) NOT NULL DEFAULT '',
4785   `range`               varchar(255) NOT NULL DEFAULT '',
4786   `abnormal`            varchar(31)  NOT NULL DEFAULT '' COMMENT 'no,yes,high,low',
4787   `comments`            text         NOT NULL DEFAULT '' COMMENT 'comments from the lab',
4788   `document_id`         bigint(20)   NOT NULL DEFAULT 0  COMMENT 'references documents.id if this result is a document',
4789   `result_status`       varchar(31)  NOT NULL DEFAULT '' COMMENT 'preliminary, cannot be done, final, corrected, incompete...etc.',
4790   PRIMARY KEY (`procedure_result_id`),
4791   KEY procedure_report_id (procedure_report_id)
4792 ) ENGINE=MyISAM; 
4794 CREATE TABLE `globals` (
4795   `gl_name`             varchar(63)    NOT NULL,
4796   `gl_index`            int(11)        NOT NULL DEFAULT 0,
4797   `gl_value`            varchar(255)   NOT NULL DEFAULT '',
4798   PRIMARY KEY (`gl_name`, `gl_index`)
4799 ) ENGINE=MyISAM; 
4801 CREATE TABLE code_types (
4802   ct_key  varchar(15) NOT NULL           COMMENT 'short alphanumeric name',
4803   ct_id   int(11)     UNIQUE NOT NULL    COMMENT 'numeric identifier',
4804   ct_seq  int(11)     NOT NULL DEFAULT 0 COMMENT 'sort order',
4805   ct_mod  int(11)     NOT NULL DEFAULT 0 COMMENT 'length of modifier field',
4806   ct_just varchar(15) NOT NULL DEFAULT ''COMMENT 'ct_key of justify type, if any',
4807   ct_mask varchar(9)  NOT NULL DEFAULT ''COMMENT 'formatting mask for code values',
4808   ct_fee  tinyint(1)  NOT NULL default 0 COMMENT '1 if fees are used',
4809   ct_rel  tinyint(1)  NOT NULL default 0 COMMENT '1 if can relate to other code types',
4810   ct_nofs tinyint(1)  NOT NULL default 0 COMMENT '1 if to be hidden in the fee sheet',
4811   ct_diag tinyint(1)  NOT NULL default 0 COMMENT '1 if this is a diagnosis type',
4812   PRIMARY KEY (ct_key)
4813 ) ENGINE=MyISAM;
4814 INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ICD9' , 2, 1, 2, ''    , 0, 0, 0, 1);
4815 INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('CPT4' , 1, 2, 2, 'ICD9', 1, 0, 0, 0);
4816 INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('HCPCS', 3, 3, 2, 'ICD9', 1, 0, 0, 0);
4817 INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('CVX'  , 100, 100, 0, '', 0, 0, 1, 0);
4819 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists', 'code_types', 'Code Types', 1);
4821 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'disclosure_type','Disclosure Type', 3,0);
4822 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('disclosure_type', 'disclosure-treatment', 'Treatment', 10, 0);
4823 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('disclosure_type', 'disclosure-payment', 'Payment', 20, 0);
4824 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('disclosure_type', 'disclosure-healthcareoperations', 'Health Care Operations', 30, 0);
4826 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'smoking_status','Smoking Status', 1,0);
4827 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '1', 'Current every day smoker', 10, 0);
4828 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '2', 'Current some day smoker', 20, 0);
4829 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '3', 'Former smoker', 30, 0);
4830 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '4', 'Never smoker', 40, 0);
4831 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '5', 'Smoker, current status unknown', 50, 0);
4832 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '9', 'Unknown if ever smoked', 60, 0);
4834 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'race','Race', 1,0);
4835 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('race', 'amer_ind_or_alaska_native', 'American Indian or Alaska Native', 10, 0);
4836 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('race', 'Asian', 'Asian',20,0);
4837 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('race', 'black_or_afri_amer', 'Black or African American',30,0);
4838 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('race', 'native_hawai_or_pac_island', 'Native Hawaiian or Other Pacific Islander',40,0);
4839 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('race', 'white', 'White',50,0);
4841 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'ethnicity','Ethnicity', 1,0);
4842 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethnicity', 'hisp_or_latin', 'Hispanic or Latino', 10, 0);
4843 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ethnicity', 'not_hisp_or_latin', 'Not Hispanic or Latino', 10, 0);
4845 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists'   ,'payment_date','Payment Date', 1,0);
4846 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_date', 'date_val', 'Date', 10, 0);
4847 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_date', 'post_to_date', 'Post To Date', 20, 0);
4848 INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_date', 'deposit_date', 'Deposit Date', 30, 0);
4849 -- --------------------------------------------------------
4851 -- 
4852 -- Table structure for table `extended_log`
4855 DROP TABLE IF EXISTS `extended_log`;
4856 CREATE TABLE `extended_log` (
4857   `id` bigint(20) NOT NULL auto_increment,
4858   `date` datetime default NULL,
4859   `event` varchar(255) default NULL,
4860   `user` varchar(255) default NULL,
4861   `recipient` varchar(255) default NULL,
4862   `description` longtext,
4863   `patient_id` bigint(20) default NULL,
4864   PRIMARY KEY  (`id`)
4865 ) ENGINE=MyISAM AUTO_INCREMENT=1 ;
4867 CREATE TABLE version (
4868   v_major    int(11)     NOT NULL DEFAULT 0,
4869   v_minor    int(11)     NOT NULL DEFAULT 0,
4870   v_patch    int(11)     NOT NULL DEFAULT 0,
4871   v_tag      varchar(31) NOT NULL DEFAULT '',
4872   v_database int(11)     NOT NULL DEFAULT 0
4873 ) ENGINE=MyISAM;
4874 INSERT INTO version (v_major, v_minor, v_patch, v_tag, v_database) VALUES (0, 0, 0, '', 0);
4875 -- --------------------------------------------------------
4878 -- Table structure for table `customlists`
4881 CREATE TABLE `customlists` (
4882   `cl_list_slno` int(10) unsigned NOT NULL AUTO_INCREMENT,
4883   `cl_list_id` int(10) unsigned NOT NULL COMMENT 'ID OF THE lIST FOR NEW TAKE SELECT MAX(cl_list_id)+1',
4884   `cl_list_item_id` int(10) unsigned DEFAULT NULL COMMENT 'ID OF THE lIST FOR NEW TAKE SELECT MAX(cl_list_item_id)+1',
4885   `cl_list_type` int(10) unsigned NOT NULL COMMENT '0=>List Name 1=>list items 2=>Context 3=>Template 4=>Sentence 5=> SavedTemplate 6=>CustomButton',
4886   `cl_list_item_short` varchar(10) DEFAULT NULL,
4887   `cl_list_item_long` text NOT NULL,
4888   `cl_list_item_level` int(11) DEFAULT NULL COMMENT 'Flow level for List Designation',
4889   `cl_order` int(11) DEFAULT NULL,
4890   `cl_deleted` tinyint(1) DEFAULT '0',
4891   `cl_creator` int(11) DEFAULT NULL,
4892   PRIMARY KEY (`cl_list_slno`)
4893 ) ENGINE=InnoDB AUTO_INCREMENT=1;
4894 INSERT INTO customlists(cl_list_id,cl_list_type,cl_list_item_long) VALUES (1,2,'Subjective');
4895 INSERT INTO customlists(cl_list_id,cl_list_type,cl_list_item_long) VALUES (2,2,'Objective');
4896 INSERT INTO customlists(cl_list_id,cl_list_type,cl_list_item_long) VALUES (3,2,'Assessment');
4897 INSERT INTO customlists(cl_list_id,cl_list_type,cl_list_item_long) VALUES (4,2,'Plan');
4898 -- --------------------------------------------------------
4901 -- Table structure for table `template_users`
4904 CREATE TABLE `template_users` (
4905   `tu_id` int(11) NOT NULL AUTO_INCREMENT,
4906   `tu_user_id` int(11) DEFAULT NULL,
4907   `tu_facility_id` int(11) DEFAULT NULL,
4908   `tu_template_id` int(11) DEFAULT NULL,
4909   `tu_template_order` int(11) DEFAULT NULL,
4910   PRIMARY KEY (`tu_id`),
4911   UNIQUE KEY `templateuser` (`tu_user_id`,`tu_template_id`)
4912 ) ENGINE=MyISAM AUTO_INCREMENT=1;