1 ALTER TABLE `patient_data` ADD `hipaa_allowsms` VARCHAR( 3 ) NOT NULL DEFAULT 'NO' AFTER `hipaa_message` ,
2 ADD `hipaa_allowemail` VARCHAR( 3 ) NOT NULL DEFAULT 'NO' AFTER `hipaa_allowsms` ;
3 -------------------------------------------------------------------------------------
4 -- Table structure for table `automatic_notification`
7 DROP TABLE IF EXISTS `automatic_notification`;
8 CREATE TABLE `automatic_notification` (
9 `notification_id` int(5) NOT NULL auto_increment,
10 `sms_gateway_type` varchar(255) NOT NULL,
11 `next_app_date` date NOT NULL,
12 `next_app_time` varchar(10) NOT NULL,
13 `provider_name` varchar(100) NOT NULL,
14 `message` text NOT NULL,
15 `email_sender` varchar(100) NOT NULL,
16 `email_subject` varchar(100) NOT NULL,
17 `type` enum('SMS','Email') NOT NULL default 'SMS',
18 `notification_sent_date` datetime NOT NULL,
19 PRIMARY KEY (`notification_id`)
20 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
23 -- Dumping data for table `automatic_notification`
26 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'),
27 (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');
29 -- --------------------------------------------------------
32 -- Table structure for table `notification_log`
35 DROP TABLE IF EXISTS `notification_log`;
36 CREATE TABLE `notification_log` (
37 `iLogId` int(11) NOT NULL auto_increment,
38 `pid` int(7) NOT NULL,
39 `pc_eid` int(11) unsigned NULL,
40 `sms_gateway_type` varchar(50) NOT NULL,
41 `smsgateway_info` varchar(255) NOT NULL,
42 `message` text NOT NULL,
43 `email_sender` varchar(255) NOT NULL,
44 `email_subject` varchar(255) NOT NULL,
45 `type` enum('SMS','Email') NOT NULL,
46 `patient_info` text NOT NULL,
47 `pc_eventDate` date NOT NULL,
48 `pc_endDate` date NOT NULL,
49 `pc_startTime` time NOT NULL,
50 `pc_endTime` time NOT NULL,
51 `dSentDateTime` datetime NOT NULL,
52 PRIMARY KEY (`iLogId`)
53 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
56 -- Dumping data for table `notification_log`
58 -- --------------------------------------------------------
61 -- Table structure for table `notification_settings`
64 DROP TABLE IF EXISTS `notification_settings`;
65 CREATE TABLE `notification_settings` (
66 `SettingsId` int(3) NOT NULL auto_increment,
67 `Send_SMS_Before_Hours` int(3) NOT NULL,
68 `Send_Email_Before_Hours` int(3) NOT NULL,
69 `SMS_gateway_username` varchar(100) NOT NULL,
70 `SMS_gateway_password` varchar(100) NOT NULL,
71 `SMS_gateway_apikey` varchar(100) NOT NULL,
72 `type` varchar(50) NOT NULL,
73 PRIMARY KEY (`SettingsId`)
74 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
77 -- Dumping data for table `notification_settings`
80 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');
81 -------------------------------------------------------------------------------------
83 INSERT INTO layout_options VALUES ('DEM', 'hipaa_allowsms', '3Choices', 'Allow SMS', 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow SMS (text messages)?');
84 INSERT INTO layout_options VALUES ('DEM', 'hipaa_allowemail', '3Choices', 'Allow Email', 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow Email?');
87 -- Alter table to add sms/email notification flags
90 ALTER TABLE openemr_postcalendar_events ADD pc_sendalertsms VARCHAR(3) NOT NULL DEFAULT 'NO' AFTER pc_facility ,
91 ADD pc_sendalertemail VARCHAR( 3 ) NOT NULL DEFAULT 'NO' AFTER pc_sendalertsms ;