Hi,
I am writing a little module that will do the folowing,
can send email or generate cvs labels from the patient database,
It displays a menu with several options to filter, age range, gender, insurance, next appointment range.
I just commited the batchcom module,
As of today it generates a csv for download according to the user choices.
I will add the email sender engine tomorrow,
and the authomatic phone calls for next week, as well as a table that registers the communications in the patient’s chart.
Files touched are,
/interface/usergroup/usergroup_navigation.php for the menu item
/acl_setup.php for adding the privilege to admin
/interface/batchcom for the module
I think the reference should be the following-
<script type="text/javascript" src="http:…/…/openemr/library/overlib_mini.js"></script>
<script type="text/javascript" src="http:…/…/openemr/library/calendar.js"></script>
Thanks
JohnJ
PS- I have checked out the latest version in CVS so I think the problem may still exist…I really like this addition (batchcom) to Openemr and appreciate you efforts in addition to all of the other developer inititives!
Although it looks technically correct, this query in the batchcom module can take several minutes in a 3ghz cpu with 1g ram when run against 2k
patients and 5 months appointment history.
It mostly spends the time building the temp tables.
Any advise is more than welcome.
Thank you,
SELECT DISTINCT patient_data.* , MAX( cal_events.pc_endDate ) AS last_ap, MAX( forms.date) AS last_visit, (DATEDIFF(CURDATE(),patient_data.DOB)/365.25) AS pat_age
FROM patient_data, forms
LEFT JOIN openemr_postcalendar_events AS cal_events ON patient_data.pid=cal_events.pc_pid
LEFT JOIN forms AS forms2 ON patient_data.pid=forms2.pid
GROUP BY patient_data.pid’
Andres, BatchCom as it exists in CVS seems to be broken. Doing the default query produces this:
ERROR: query failed: SELECT DISTINCT patient_data.* , MAX( cal_events.pc_endDate ) AS last_ap, MAX( forms.date) AS last_visit, (DATEDIFF(CURDATE(),patient_data.DOB)/365.25) AS pat_age FROM patient_data, forms LEFT JOIN openemr_postcalendar_events AS cal_events ON patient_data.pid=cal_events.pc_pid LEFT JOIN forms AS forms2 ON patient_data.pid=forms2.pid GROUP BY patient_data.pid ORDER BY patient_data.postal_code ()
hmm… weird, I had the same files as in the cvs and could not reproduce those parenthesis.
I added the " in the option value= but that shouldn’t have been the problem either.
can you send me a copy of your batchcom.php file to check if there’s something there generating parenthesis?
It appears the problem is that DATEDIFF() is not valid prior to MySQL 4.1.1. We need to support 4.0.x because many current Linux distributions ship with that.