Skip to content

Commit

Permalink
Merge pull request #96 from mrysav/excel-wrong-test-type
Browse files Browse the repository at this point in the history
Mitigation for failure to update compatible specimens for test
  • Loading branch information
mrysav authored Sep 8, 2024
2 parents 9916b8b + fbf0277 commit 8637973
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
3 changes: 3 additions & 0 deletions docker/config/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ max_input_time = 60
; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

; BLIS modification!
max_input_vars = 100000

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
; memory_limit = 128M
Expand Down
2 changes: 2 additions & 0 deletions htdocs/ajax/specimen_type_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
include("../includes/db_lib.php");
include("../lang/lang_xml2php.php");

$lab_config_id = $_SESSION['lab_config_id'];

$updated_entry = new SpecimenType();
$updated_entry->specimenTypeId = $_REQUEST['sid'];
$updated_entry->name = $_REQUEST['name'];
Expand Down
11 changes: 4 additions & 7 deletions htdocs/ajax/test_type_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
include("../includes/db_lib.php");
include("../lang/lang_xml2php.php");

//NC3065
//$user = get_user_by_id($_SESSION['user_id']);
//$lab_config_id = $_REQUEST['id'];
//-NC3065
$lab_config_id = $_SESSION['lab_config_id'];

putUILog('test_type_update', 'X', basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X');

Expand Down Expand Up @@ -392,7 +389,7 @@
{
# Numeric range
# Clear existing ref ranges
ReferenceRange::deleteByMeasureId($measure_id, $_SESSION['lab_config_id']);
ReferenceRange::deleteByMeasureId($measure_id, $lab_config_id);
# Check if new reference values and age ranges have been entered properly
$ranges_lower = $_REQUEST['range_l_'.($i+1)];
$ranges_upper = $_REQUEST['range_u_'.($i+1)];
Expand Down Expand Up @@ -810,7 +807,7 @@
$ref_range->sex = $gender_option;
$ref_range->rangeLower = $range_lower;
$ref_range->rangeUpper = $range_upper;
$ref_range->addToDb($_SESSION['lab_config_id']);
$ref_range->addToDb($lab_config_id);
}
$measure_count++;
}
Expand Down Expand Up @@ -839,7 +836,7 @@
$ref_range->sex = $gender_option;
$ref_range->rangeLower = $range_lower;
$ref_range->rangeUpper = $range_upper;
$ref_range->addToDb($_SESSION['lab_config_id']);
$ref_range->addToDb($lab_config_id);
}
$measure_count++;
}
Expand Down
24 changes: 8 additions & 16 deletions htdocs/catalog/test_type_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ function specimen_list_to_json($specimen_list)
else
{
array_push($comb_measure_list, $measure);
foreach($submeasure_list_objs as $submeasure)
array_push($comb_measure_list, $submeasure);
foreach($submeasure_list_objs as $submeasure) {
array_push($comb_measure_list, $submeasure);
}
}
}

$measure_list_ids = array();
//echo "<pre>";
//print_r($comb_measure_list);
//echo "</pre>";
foreach($comb_measure_list as $measure)
{
foreach($comb_measure_list as $measure) {
array_push($measure_list_ids, $measure->measureId);
}
/*
Expand Down Expand Up @@ -1207,14 +1207,9 @@ function isInputCurrency(evt) {
$us = '_';
for($y = 1; $y <= $max_num_submeasures; $y += 1)
{
echo "<tr valign='top' id='smrow_$i$us$y' style='display:none;'";

echo ">";

echo "<tr valign='top' id='smrow_$i$us$y' style='display:none;'>";
echo "<td align='center'>";
// echo "<input type=checkbox name='delete_".$curr_measure->name."' />";
echo "</td>";

echo "</td>";
echo "<td>";
?>
Sub: <input type='text' name='submeasure[<?php echo $i; ?>][]' value='' />
Expand Down Expand Up @@ -1279,11 +1274,8 @@ function isInputCurrency(evt) {
echo "</td>";
echo "</tr>";
?>
<div id='new_subentries' style='display:none;'>
</div>



<div id='new_subentries' style='display:none;'>
</div>
<?php
}// end of submeasures for each measure
?>
Expand Down
3 changes: 2 additions & 1 deletion htdocs/includes/db_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -13468,8 +13468,9 @@ function insert_lab_config_settings_billing($enabled, $currency_name, $currency_
$query_string = "SELECT count(*) as val from lab_config_settings WHERE id = $id";
$recordset = query_associative_one($query_string);

if($recordset[val] != 0)
if(isset($recordset['val']) && $recordset['val'] != 0) {
return 0;
}

$remarks = "Billing Settings";

Expand Down
1 change: 0 additions & 1 deletion htdocs/includes/db_util.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public static function switchToLabConfigRevamp($lab_config_id=null)
$lab_config = get_lab_config_by_id($lab_config_id);
if ($lab_config == null) {
# Error: Lab configuration correspinding to $lab_config_id not found in DB
$log->error("Lab configuration corresponding to '$lab_config_id' not found in database");
return;
}
$db_name = $lab_config->dbName;
Expand Down

0 comments on commit 8637973

Please sign in to comment.