1 ALTER TABLE form_vitals
2 MODIFY `weight` FLOAT(5,2) default 0,
3 MODIFY `height` FLOAT(5,2) default 0,
4 MODIFY `BMI` FLOAT(4,1) default 0;
6 CREATE TABLE IF NOT EXISTS `form_misc_billing_options` (
7 id bigint(20) NOT NULL auto_increment,
8 date datetime default NULL,
9 pid bigint(20) default NULL,
10 user varchar(255) default NULL,
11 groupname varchar(255) default NULL,
12 authorized tinyint(4) default NULL,
13 activity tinyint(4) default NULL,
14 employment_related tinyint(1) default NULL,
15 auto_accident tinyint(1) default NULL,
16 accident_state varchar(2) default NULL,
17 other_accident tinyint(1) default NULL,
18 outside_lab tinyint(1) default NULL,
19 lab_amount decimal(5,2) default NULL,
20 is_unable_to_work tinyint(1) default NULL,
21 off_work_from date default NULL,
22 off_work_to date default NULL,
23 is_hospitalized tinyint(1) default NULL,
24 hospitalization_date_from date default NULL,
25 hospitalization_date_to date default NULL,
26 medicaid_resubmission_code varchar(10) default NULL,
27 medicaid_original_reference varchar(15) default NULL,
28 prior_auth_number varchar(20) default NULL,
29 comments varchar(255) default NULL,
34 ADD `facility_npi` varchar(15) NOT NULL DEFAULT '';
37 ADD `classification` int(11) NOT NULL DEFAULT 0;
39 ALTER TABLE form_football_injury_audit
40 ADD `fimatchtype` int(11) NOT NULL DEFAULT 0;
43 ADD `docdate` date DEFAULT NULL,
44 ADD `list_id` bigint(20) NOT NULL DEFAULT 0;
47 ADD streetb varchar(60) NOT NULL DEFAULT '',
48 ADD streetb2 varchar(60) NOT NULL DEFAULT '',
49 ADD notes text NOT NULL DEFAULT '';
51 ALTER TABLE history_data
52 ADD `last_retinal` varchar(255) NOT NULL DEFAULT '',
53 ADD `last_fluvax` varchar(255) NOT NULL DEFAULT '',
54 ADD `last_pneuvax` varchar(255) NOT NULL DEFAULT '',
55 ADD `last_ldl` varchar(255) NOT NULL DEFAULT '',
56 ADD `last_hemoglobin` varchar(255) NOT NULL DEFAULT '',
57 ADD `last_psa` varchar(255) NOT NULL DEFAULT '';
59 ALTER TABLE openemr_postcalendar_events
60 ADD `pc_multiple` int(10) unsigned NOT NULL DEFAULT 0;
63 ADD `ndc_info` varchar(255) NOT NULL DEFAULT '';
66 patient_id int(11) NOT NULL,
67 encounter_id int(11) NOT NULL,
68 version int unsigned NOT NULL AUTO_INCREMENT,
69 payer_id int(11) NOT NULL DEFAULT 0,
70 status tinyint(2) NOT NULL DEFAULT 0,
71 payer_type tinyint(4) NOT NULL DEFAULT 0,
72 bill_process tinyint(2) NOT NULL DEFAULT 0,
73 bill_time datetime DEFAULT NULL,
74 process_time datetime DEFAULT NULL,
75 process_file varchar(255) NOT NULL DEFAULT '',
76 target varchar(30) NOT NULL DEFAULT '',
77 x12_partner_id int(11) NOT NULL DEFAULT 0,
78 PRIMARY KEY (patient_id, encounter_id, version)
81 INSERT IGNORE INTO claims (
82 patient_id, encounter_id, bill_time, payer_id,
84 bill_process, process_time, process_file, target,
87 b.pid, b.encounter, b.bill_date, b.payer_id,
88 b.billed * 2 + 1, FIND_IN_SET(i.type, 'primary,secondary,tertiary'),
89 b.bill_process, b.process_date, b.process_file, b.target,
92 LEFT OUTER JOIN insurance_data AS i ON i.pid = b.pid AND i.provider = b.payer_id
93 WHERE b.activity > 0 AND b.encounter > 0 AND b.code_type != 'ICD9' AND b.payer_id > 0;
95 ALTER TABLE insurance_data
96 MODIFY `date` date NOT NULL DEFAULT '0000-00-00',
99 ADD UNIQUE KEY pid_type_date (pid, type, date);
102 ADD `service_location` tinyint(1) NOT NULL DEFAULT 1;
104 ALTER TABLE form_encounter
105 ADD facility_id int(11) NOT NULL DEFAULT 0;
106 UPDATE form_encounter, facility
107 SET form_encounter.facility_id = facility.id WHERE
108 facility.name = form_encounter.facility;
111 ADD facility_id int(11) NOT NULL DEFAULT 0;
112 UPDATE users, facility
113 SET users.facility_id = facility.id WHERE
114 facility.name = users.facility;