acknowledgments page update
[openemr.git] / sql / 2_7_2-to-2_7_3_upgrade.sql
blob516f37d3c79fa0413ba2412ec79327fc9bd627ad
1 ALTER TABLE lists
2   ADD begdate    date          DEFAULT NULL,
3   ADD enddate    date          DEFAULT NULL,
4   ADD occurrence int(11)       DEFAULT 0,
5   ADD referredby varchar(255)  DEFAULT NULL,
6   ADD extrainfo  varchar(255)  DEFAULT NULL;
8 ALTER TABLE patient_data
9   ADD squad      varchar(32)   NOT NULL DEFAULT '',
10   ADD fitness    int(11)       NOT NULL DEFAULT 0;
12 ALTER TABLE history_data
13   CHANGE last_breast_exam        last_breast_exam        varchar(255) DEFAULT '',
14   CHANGE last_mammogram          last_mammogram          varchar(255) DEFAULT '',
15   CHANGE last_gynocological_exam last_gynocological_exam varchar(255) DEFAULT '',
16   CHANGE last_rectal_exam        last_rectal_exam        varchar(255) DEFAULT '',
17   CHANGE last_prostate_exam      last_prostate_exam      varchar(255) DEFAULT '',
18   CHANGE last_physical_exam      last_physical_exam      varchar(255) DEFAULT '',
19   CHANGE last_sigmoidoscopy_colonoscopy last_sigmoidoscopy_colonoscopy varchar(255) DEFAULT '',
20   ADD    last_ecg             varchar(255) NOT NULL DEFAULT '',
21   ADD    last_cardiac_echo    varchar(255) NOT NULL DEFAULT '',
22   -- here is 1 digit for each of the above exams, in order, with values
23   -- 0=n/a, 1=normal, 2=abnormal:
24   ADD    last_exam_results    varchar(255) NOT NULL DEFAULT '000000000';
26 UPDATE history_data SET last_breast_exam        = '' WHERE last_breast_exam        = '0000-00-00 00:00:00';
27 UPDATE history_data SET last_mammogram          = '' WHERE last_mammogram          = '0000-00-00 00:00:00';
28 UPDATE history_data SET last_gynocological_exam = '' WHERE last_gynocological_exam = '0000-00-00 00:00:00';
29 UPDATE history_data SET last_rectal_exam        = '' WHERE last_rectal_exam        = '0000-00-00 00:00:00';
30 UPDATE history_data SET last_prostate_exam      = '' WHERE last_prostate_exam      = '0000-00-00 00:00:00';
31 UPDATE history_data SET last_physical_exam      = '' WHERE last_physical_exam      = '0000-00-00 00:00:00';
32 UPDATE history_data SET last_sigmoidoscopy_colonoscopy = '' WHERE last_sigmoidoscopy_colonoscopy = '0000-00-00 00:00:00';
34 update insurance_numbers
35   set provider_number_type = x12_id_type;
37 ALTER TABLE insurance_numbers
38   DROP column x12_id_type,
39   ADD rendering_provider_number_type varchar(4) DEFAULT NULL,
40   ADD rendering_provider_number varchar(20) DEFAULT NULL;
42 ALTER TABLE openemr_postcalendar_events
43   -- Appointment status is one of the following:
44   --  - = not otherwise applicable
45   --  * = reminder call completed
46   --  + = chart pulled
47   --  ? = no show
48   --  @ = patient arrived
49   --  ~ = arrived late
50   --  ! = left without being seen
51   --  # = left due to ins/money issue
52   --  < = visit in progress
53   --  > = checked out
54   --  $ = coding complete
55   ADD pc_apptstatus char(1) NOT NULL DEFAULT '-';
57 ALTER TABLE lists
58   ADD diagnosis varchar(255) NOT NULL DEFAULT '';
60 ## 
61 ## Table structure for table `batchcom`
62 ## 
64 CREATE TABLE IF NOT EXISTS `batchcom` (
65   `id` bigint(20) NOT NULL auto_increment,
66   `patient_id` int(11) NOT NULL default '0',
67   `sent_by` bigint(20) NOT NULL default '0',
68   `msg_type` varchar(60) NOT NULL default '',
69   `msg_subject` varchar(255) NOT NULL default '',
70   `msg_text` mediumtext NOT NULL,
71   `msg_date_sent` datetime NOT NULL default '0000-00-00 00:00:00',
72   PRIMARY KEY  (`id`)
73 ) ENGINE=MyISAM ;
75 ALTER TABLE billing
76   MODIFY `code` varchar(9) DEFAULT NULL;