bradymiller wrote on Thursday, February 14, 2013:
Actually,
After looking at yehsters code above, perhaps it just makes more sense to wrap/replace the CDR functions around the getPatientAgeYMD(). Is that in your plan, yehster?
-brady
OpenEMR
bradymiller wrote on Thursday, February 14, 2013:
Actually,
After looking at yehsters code above, perhaps it just makes more sense to wrap/replace the CDR functions around the getPatientAgeYMD(). Is that in your plan, yehster?
-brady
OpenEMR
yehster wrote on Friday, February 22, 2013:
https://github.com/yehster/openemr/commit/315f00313347721b63a7e34141ffbbc3f84d9be3
I’ve updated the CDR age function to use getPatientAgeYMD() at Brady’s suggestion.
I think this will address the full set of issues discussed in this thread thus far.
bradymiller wrote on Friday, February 22, 2013:
awesome,
the only pesky thing left is this one:
calculateAgeOnDate($date) in library/classes/rulesets/library/RsPatient.php
(appears to be a derivative of convertDobtoAgeYearDecimal() )
(just let me know if you don’t have the resources for this change in RsPatient.php and then I’ll stick it in my queue)
-brady
yehster wrote on Friday, February 22, 2013:
https://github.com/yehster/openemr/commit/ea569cdecee1632562d764e13c4d6560a293f1c7
Brady,
I made the code changes but I’m not sure how to test the RsPatient execution code path.
bradymiller wrote on Friday, February 22, 2013:
Hi,
I’ll test it out if get to a terminal over weekend (traveling). The smoking AMC has an age cutoff of 13(will be placed into denominator with a encounter):
http://www.open-emr.org/wiki/index.php/Description_AMC
-brady
yehster wrote on Friday, February 22, 2013:
Got it. I was incorrectly trying to get RsPatient to “fire” using Patient Reminders. Tried it with AMC and it is reporting a correct denominator with the new version of calculateAgeOnDate.
bradymiller wrote on Monday, February 25, 2013:
Hi Kevin,
Thanks for doing this. Since this stuff is likely considered a bug fix, I’ll plan to bring stuff you commit to master into the next 4.1.1 patch (if you want, feel free to bring the commit into rel-411 in addition to master).
-brady
OpenEMR
yehster wrote on Monday, February 25, 2013:
I have pushed these changes into sourceforge Master branch.
bradymiller wrote on Wednesday, February 27, 2013:
Hi,
Getting the following php parsing error:
PHP Parse error: syntax error, unexpected ‘[’ in /var/www/openemr/library/clinical_rules.php on line 2109
Appears my version of php (5.3.2) is choking on this:
return parseAgeInfo($dob,$target)['age'];
Looking through the parseAgeInfo() documentation, it states it is returning a float, but isn’t it returning an array?
No time now to further research/test it, but will come back to it soon. Any thoughts here?
-brady
OpenEMR
yehster wrote on Wednesday, February 27, 2013:
https://github.com/yehster/openemr/commit/995a454db833a393fcb4eed3c2f3dd949e5ca33a
Might be a difference between 5.3.2 and newer PHP versions.
This may fix it.
Also updated the comments.
bradymiller wrote on Wednesday, February 27, 2013:
Hi Kevin,
Your fix works (also tested well for the age rules).
-brady
OpenEMR