1 #IfMissingColumn users calendar
3 ADD `calendar` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 = appears in calendar';
4 UPDATE users SET calendar = 1 WHERE authorized = 1 AND ( info IS NULL OR info NOT LIKE '%Nocalendar%' );
7 #IfNotRow2D list_options list_id lists option_id lbfnames
8 INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','lbfnames','Layout-Based Visit Forms',9);
12 CREATE TABLE `lbf_data` (
13 `form_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'references forms.form_id',
14 `field_id` varchar(31) NOT NULL COMMENT 'references layout_options.field_id',
15 `field_value` varchar(255) NOT NULL,
16 PRIMARY KEY (`form_id`,`field_id`)
17 ) ENGINE=MyISAM COMMENT='contains all data from layout-based forms';
20 #IfMissingColumn form_encounter supervisor_id
21 ALTER TABLE `form_encounter`
22 ADD `supervisor_id` INT(11) DEFAULT '0' COMMENT 'supervising provider, if any, for this visit';
25 #IfMissingColumn list_options mapping
26 ALTER TABLE `list_options`
27 ADD `mapping` varchar(15) NOT NULL DEFAULT '';
30 #IfNotTable gprelations
31 CREATE TABLE gprelations (
32 -- Relation types are:
34 -- 2 form_encounter (visits)
37 -- 5 openemr_postcalendar_events (appointments)
40 -- 8 transactions (e.g. referrals)
41 -- By convention we require that type1 must be less than or equal to type2.
42 type1 int(2) NOT NULL,
43 id1 bigint(20) NOT NULL,
44 type2 int(2) NOT NULL,
45 id2 bigint(20) NOT NULL,
46 PRIMARY KEY (type1,id1,type2,id2),
48 ) ENGINE=MyISAM COMMENT='general purpose relations';
51 #IfMissingColumn insurance_companies alt_cms_id
52 ALTER TABLE `insurance_companies`
53 ADD `alt_cms_id` varchar(15) NOT NULL DEFAULT '';
56 #IfMissingColumn x12_partners x12_isa05
57 ALTER TABLE `x12_partners`
58 ADD `x12_isa05` char(2) NOT NULL DEFAULT 'ZZ',
59 ADD `x12_isa07` char(2) NOT NULL DEFAULT 'ZZ',
60 ADD `x12_isa14` char(1) NOT NULL DEFAULT '0',
61 ADD `x12_isa15` char(1) NOT NULL DEFAULT 'P',
62 ADD `x12_gs02` varchar(15) NOT NULL DEFAULT '',
63 ADD `x12_per06` varchar(80) NOT NULL DEFAULT '';