Before I get too involved in building an iCal email interface, does OpenEMR support the ability to notify providers of new calendar events? We would like to be able to send iCal notifications to google, outlook, zimbra, etc so personal calendars are updated with the office information. I have a test version coded into the add_edit_event.php but would rather use db triggers to reduce coding complexity.
Thanks. I will look at using a php function for now.
Not to argue… just a comment - My experience in DB conversions (SYBASE to ORACLE) and (ORACLE to MSSQL - don’t ask me why) the least of our problems was due to stored procedures. Dealing with indexes, views, optimization and data types took up the majority of the work. Two weeks trying to understand why a table join was causing a “full table scan” rather than an index scan was the worst.
#3:
I’m surprised Oracle’s EXPLAIN PLAN feature or something like it didn’t make finding the important indexes easier.
In any case, a DB migration is a little different beast than restructuring the program to run on a variety of DBs. SQL for creating tables, indexes, and views is fairly standardized and the standard is fairly well supported. SQL for triggers, stored proceedures, and data types is less portable.
Still, a PHP function is *probably* better. In MVC speak, the database in the model, the PHP/Javascript is the controller, and the HTML/Javascript is the view. Put another way, PHP is where we want to keep our business logic as much as possible.
I am building one as well but if you have any code to share please let us know. I want just a simple downloader from the Calander UI and the ICAL data depends on who is logged in.
The first test I ran is using php code “stuffed” into existing code. I created the ical as an attachment and mailed it to a hard coded email address. The next test will create a separate php script (called by the main program) to create the ical attachment.
If this works, I’ll start using the email address for the user account and then figure out a way to make it an option for each user.
Sounds interesting. So this is an email based ICAL. I would guess that the email is sent out when the User’s schedule is updated. That would be awesome, especially for a doctors office where the scheduler is more critical.
Right. It would work in a similar manner to the google, mac mail, and google. An ical event is attached to the email and the receiver can accept the event or decline. It works with zimbra using a test message. This is a one-way event system only as a declined response does not update the schedule. It does however solve the problem of a clinician logging in to see their daily schedule.
The version currently in testing will only notify the provider of new events. The plan is to add in event modifications and cancellations. It is an early beta version which does the following:
1) Trigger against openemr_postcalendar_events - changes are logged to a separate table for processing
2) View against the logging file and other key tables pulls the columns necessary for creating an ical email transaction
3) php script processes the event, sends the email, deletes the row from the logging table
again - this is a crude test but does show a POC for sending events to other calendar applications. It was tested with google and zimbra. Triggers were used to avoid any changes to the existing database or code. php script was used to allow for potential addition into a webapp. Right now it will run as a cron job.