bradymiller wrote on Wednesday, January 27, 2010:
hey,
Here’s code review
Overall review
1) I am still noting some potential fundamental flaws in the health plan/reminders section. This thing has matured enough in code to start doing practical tests on it. The best thing to show is how the health plan works for DM type II (foot exam, A1C, optho exam, flu shot). So for example what if require Q6month foot exam, Q3month A1C, and Q12month optho exam. Please show how the health plan will work with that example. Then need to apply the following tests to that:
–Patient gets an A1C one month early (so need to adjust future reminders)
–Patient gets an A1C on month late (so need to adjust future reminders)
–Patient entirely skips an A1C (not sure what is needed here)
–Repeat above for foot exam, optho exam, and flu shot (note flu shot is easy because it’s seasonal)
I do not think your current algorithm will be able to adjust to these extremely common scenarios. Once your algorithm can actually cope with real world behavior, then it seems logical that the clinical alert summary widget could simply leverage the data within the Health Plans.
Individual File Reviews
interface/batchcom/batch_reminders.php
-what is siteID and token stuff at maviq?? (should this go in interface/globals.php)
-I’m confused by the status indicator.
----What if patient who’s been seen for awhile decides to allow messaging and email. Won’t they then get a bunch of out of date messages and emails from the reminders table.
----What if user is getting both messages and emails? If message fails and email works, then status is ok (isn’t that an issues that messages failed). I’m assuming this script will also be used to send out mail reminders. Just seems like these should have separate status mechanisms.
interface/globals.php
-clarify HTML charset (ie. for email; could be confused with other charset stuff)
interface/main/left_nav.php
-no input since this will change with the GUI refactoring
interface/patient_file/health_plans/health_plans_admin.php
-instead of using formTrim(variable), use formDataCore(variable,true)
-whenever you echo into a value tag with a variable use htmlspecialchars(variable, ENT_QUOTES); (example line 1936 of patch)
—or else ’ and “” will break it
-If possible, try to avoid stuff like ucfirst() and strtolower(), since this has a habit of breaking utf8 encoding of different language characters (example 2165 and 2166)
-See 1) for main conceptual issues i have
interface/patient_file/health_plans/health_plans_patient.php
what is the point of showing all the uneditable items (filters etc.)?
interface/patient_file/health_plans/manage_categories.php
-seem ok
interface/patient_file/health_plans/patient_reminders.php
-Why this at line 3537 of patch within the sql: strip_escape_custom($_POST) ???
-whenever you echo into a value tag with a variable use htmlspecialchars(variable, ENT_QUOTES); (example at line 3558) (lots more…)
library/classes/class.phpmailer.php
-seems ok
library/classes/class.smtp.php
-seems ok
library/classes/postmaster.php
-seems ok
library/maviq_phone_api.php
-seems ok
library/phpmailer.lang-en.php
-seems ok
sql/3_2_0-to-3_3_0_upgrade.sql
- on your lists, consider making the option id’s all non-caps and without whitespace(use _ instead). This make it easier to use them in the algorithms and especially reduces risk of any sql upgrading traps in the future.
- i’ll defer database structure stuff to Rod
( I am assuming you are testing this script now…)
sql/database.sql
- on your lists, consider making the option id’s all non-caps and without whitespace(use _ instead). This make it easier to use them in the algorithms and especially reduces risk of any sql upgrading traps in the future.
- make the ‘seq’ stuff the same as in your sql/3_2_0-to-3_3_0_upgrade.sql
- i’ll defer database structure stuff to Rod
If we decide to go the new phpmail route, then thinking it would be best to just get this committed into SF soon so other groups that want email in their code can use this mechanism also.
-brady