Skip to content

Commit

Permalink
Fix - a default value for pubpid is not written to the database when …
Browse files Browse the repository at this point in the history
…the External ID field in the New Patient form is set to Unused

In line 50-52 all field_ids that have an associated uor value greater than zero are pulled from layout_options, for each a value is set in $newdata (which will be written to database). When pubpid (External ID) has a uor equal to zero there is no field_id to cause a value to be set.

Adding pubpid when it's uor value is zero to the list of field_ids will result in get_layout_form_value returning the empty string (since isset($_POST['form_pubpid']) will be false) causing a default value to be set in line 66(67) and 67(68).
  • Loading branch information
epsdky authored and bradymiller committed Apr 20, 2016
1 parent c81bdcb commit aece832
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions interface/new/new_comprehensive_save.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
$newdata['employer_data'] = array();
$fres = sqlStatement("SELECT * FROM layout_options " .
"WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " .
"OR field_id = 'pubpid' " .
"ORDER BY group_name, seq");
while ($frow = sqlFetchArray($fres)) {
$data_type = $frow['data_type'];
Expand Down

0 comments on commit aece832

Please sign in to comment.