Fix - a default value for pubpid is not written to the database when the External...
commitaece832099b16a8b0dd402d231ad0f1202d97922
authorepsdky <sequex@hushmail.com>
Tue, 19 Apr 2016 19:36:05 +0000 (20 05:36 +1000)
committerbradymiller <bradymiller@users.sourceforge.net>
Wed, 20 Apr 2016 05:36:34 +0000 (19 22:36 -0700)
treef972f2f2c857246fb92f6038d86a9496fdf41af8
parentc81bdcb80d65657e0323686c940c63bc79abd8ef
Fix - a default value for pubpid is not written to the database when 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).
interface/new/new_comprehensive_save.php