+
'' -
+
+
+ ".$attrib_value."";
+ echo " - ".LangUtil::$pageTerms['MSG_PENDINGNOTFOUND'];
+ ?>
+
+
+
+
+
+
+
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+ hidePatientName == 0)
+ if($_SESSION['user_level'] == $LIS_TECH_SHOWPNAME)
+ {
+ ?>
+ |
+
+ |
+
+ |
+ |
+ |
+
+
+
+patientId);
+ ?>
+
+
+ >
+
+ | getSurrogateId(); ?> |
+
+ getDailyNumFull(); ?> |
+
+ getAddlId(); ?> |
+
+ specimenId; ?> |
+
+ getAuxId(); ?> |
+ hidePatientName == 0)
+ if($_SESSION['user_level'] == $LIS_TECH_SHOWPNAME)
+ {
+ ?>
+ getName()." (".$patient->sex." ".$patient->getAgeNumber().") "; ?> |
+
+ sex."/".$patient->getAgeNumber(); ?> |
+
+ specimenTypeId); ?> |
+
+ specimenId);
+ $i = 0;
+ foreach($test_list as $test)
+ {
+ echo get_test_name_by_id($test->testTypeId);
+ $i++;
+ if($i != count($test_list))
+ {
+ echo " ";
+ }
+ }
+ ?>
+ |
+
+
+ |
+
+
+
+
+
+
+
+ 2)
+{
+ # Show "view more" link for revealing earlier patient records
+ ?>
+
View older entries »
+
+
+
+
+
diff --git a/htdocs/ajax/result_entry_patient_dyn.php b/htdocs/ajax/result_entry_patient_dyn.php
index af0e38e32..c9c710603 100755
--- a/htdocs/ajax/result_entry_patient_dyn.php
+++ b/htdocs/ajax/result_entry_patient_dyn.php
@@ -7,6 +7,15 @@
include("../includes/db_lib.php");
include("../includes/user_lib.php");
LangUtil::setPageId("results_entry");
+if(!isset($_REQUEST['result_cap']))
+ $result_cap = $rcap;
+else
+ $result_cap = $_REQUEST['result_cap'];
+
+if(!isset($_REQUEST['result_counter']))
+ $result_counter = 1;
+else
+ $result_counter = $_REQUEST['result_counter'];
$attrib_value = $_REQUEST['t'];
$attrib_type = $_REQUEST['a'];
@@ -83,12 +92,10 @@
diff --git a/htdocs/ajax/specimen_add.php b/htdocs/ajax/specimen_add.php
index 6210ca83a..a4cbe95be 100755
--- a/htdocs/ajax/specimen_add.php
+++ b/htdocs/ajax/specimen_add.php
@@ -91,7 +91,7 @@ function get_custom_value($custom_field)
$specimen->reportTo = $report_to;
if($doctor!="")
-$specimen->doctor = $title.$doctor;
+$specimen->doctor = $doctor;
else
$specimen->doctor=$doctor;
$specimen->site_id = $site_id;
diff --git a/htdocs/data/create_tables.sql b/htdocs/data/create_tables.sql
index feb280428..49bd08ad3 100755
--- a/htdocs/data/create_tables.sql
+++ b/htdocs/data/create_tables.sql
@@ -393,7 +393,7 @@ CREATE TABLE IF NOT EXISTS `stock_details` (
CREATE TABLE IF NOT EXISTS `test` (
`test_id` int(10) unsigned NOT NULL auto_increment,
`test_type_id` int(11) unsigned NOT NULL default '0',
- `result` varchar(201) default NULL,
+ `result` varchar(5000) default NULL,
`comments` varchar(200) default NULL,
`user_id` int(11) unsigned default NULL,
`verified_by` int(11) unsigned default NULL,
diff --git a/htdocs/data/db_update_lab_3.4.sql b/htdocs/data/db_update_lab_3.4.sql
new file mode 100755
index 000000000..ee753f192
--- /dev/null
+++ b/htdocs/data/db_update_lab_3.4.sql
@@ -0,0 +1 @@
+ALTER TABLE `test` ADD COLUMN `result` VARCHAR(5000);
diff --git a/htdocs/includes/db_lib.php b/htdocs/includes/db_lib.php
index 81cf8ccbb..7187d0c93 100755
--- a/htdocs/includes/db_lib.php
+++ b/htdocs/includes/db_lib.php
@@ -1,4 +1,4 @@
-ageLimit = 5;
return $lab_config;
}
-
+//AS 09/04/2018 fetch all labs BEGIN
+ public static function getAllLabs()
+ {
+ $saved_db = DbUtil::switchToGlobal();
+ $query_string = "SELECT lab_config_id,name from lab_config";
+ $retval = array();
+ $resultset = query_associative_all($query_string, $row_count);
+ foreach($resultset as $record)
+ {
+$lc=new LabConfig();
+$lc->id=$record['lab_config_id'];
+$lc->name=$record['name'];
+ $retval[] = $lc;
+ }
+ DbUtil::switchRestore($saved_db);
+ return $retval;
+ }
+ //AS 09/04/2018 END
public static function getById($lab_config_id) {
$saved_db = DbUtil::switchToGlobal();
@@ -3722,7 +3739,9 @@ public function getResultWithoutHash()
if(trim($this->result) == "")
# Results not yet entered
return "";
- $retval = substr($this->result, 0, -1*$PATIENT_HASH_LENGTH);
+
+ #$retval = substr($this->result, 0, -1*$PATIENT_HASH_LENGTH);
+
if ($retval == '')
$retval = substr($this->result, 0, -1);
# nc44
@@ -6644,7 +6663,11 @@ function add_user($user)
"INSERT INTO user_config(user_id, level, parameter, value, created_by, created_on, modified_by, modified_on) ".
"VALUES ('".$record['user_id']."',$user->level, 'rwoptions', '$rwoptions', $user->createdBy, curdate(), $user->createdBy, curdate())";
query_insert_one($query_string);
-
+//AS 08/29/2018 For access to lab configurations for admin users BEGIN.
+ if($user->level == 2) {
+add_lab_config_access($record['user_id'],$user->labConfigId);
+}
+//AS 08/29/2018 END
DbUtil::switchRestore($saved_db);
return true;
}
@@ -6868,6 +6891,7 @@ function update_lab_user($updated_entry)
// if($updated_entry->level == 17) {
// $updated_entry->rwoption = LabConfig::getDoctorUserOptions();
// }
+ $user = get_user_by_id($updated_entry->userId);
$query_string =
"UPDATE user ".
"SET actualname='$updated_entry->actualName', ".
@@ -6892,6 +6916,20 @@ function update_lab_user($updated_entry)
"value='".$updated_entry->rwoption."' ".
" WHERE user_id=".$updated_entry->userId." and parameter = 'rwoptions'";
query_blind($query_string);
+//AS 08/29/2018 For access to lab configurations for admin users BEGIN.
+//When updating, if the role changes from admin to something else, delete the entry from lab config access
+if($user->level==2 && $updated_entry->level != 2)
+{
+delete_lab_config_access_by_id($updated_entry->userId);
+}
+//When updating, if the role changes to blis_admin, jadd entry to lab_config_access
+ if($updated_entry->level == 2) {
+add_lab_config_access($updated_entry->userId,$user->labConfigId);
+}
+//~~Pending: replace hard coding of "2" with variable for blis_admin role.
+//~~ Pending: Figure out if the same required for super admin role or not.
+//AS 08/29/2018 END
+
DbUtil::switchRestore($saved_db);
@@ -6936,7 +6974,17 @@ function update_lab_RWOptions($config)
DbUtil::switchRestore($saved_db);
}
-
+function delete_lab_config_access_by_id($user_id)
+{
+ global $con;
+ $saved_db = DbUtil::switchToGlobal();
+ # Remove entries from lab_config_access
+ $query_string =
+ "DELETE FROM lab_config_access ".
+ "WHERE user_id=$user_id";
+ query_blind($query_string);
+ DbUtil::switchRestore($saved_db);
+}
function delete_user_by_id($user_id)
{
# Deletes a user from DB
@@ -7124,6 +7172,7 @@ function get_admin_users()
"AND lca.user_id=".$_SESSION['user_id']." )) ".
"OR u.created_by=".$_SESSION['user_id']." ".
"ORDER BY u.username";
+/*"select u.* from user u where u.level=$LIS_ADMIN";*/
}
$retval = array();
$resultset = query_associative_all($query_string, $row_count);
diff --git a/htdocs/includes/page_elems.php b/htdocs/includes/page_elems.php
index 7887f1882..ab202f2f6 100755
--- a/htdocs/includes/page_elems.php
+++ b/htdocs/includes/page_elems.php
@@ -1174,6 +1174,16 @@ public function getTestCategoryCountrySelect($lab_config_id=null)
foreach($final_cat_list as $value)
echo "";
}
+//AS 09/04/2018 Fill the lab drop down BEGIN
+ public function getLabSelect()
+ {
+ $lcs = LabConfig::getAllLabs();
+ foreach($lcs as $lc)
+{
+echo "";
+}
+ }
+//AS 09/04/2018 END
public function getLangSelect()
{
@@ -2007,7 +2017,9 @@ public function getLabAdminTable($lab_admin_list)
listOwnedLabs($lab_admin->userId);
+//AS 09/044/2018 Fixed missing lab name issue BEGIN
+ $lab_list =LabConfig::getById($lab_admin->labConfigId)->name; //$this->listOwnedLabs($lab_admin->userId);
+//AS 09/04/2018 END
echo $lab_list;
?>
@@ -4557,9 +4569,16 @@ function generate_doctors($doc_row_id, $doc=""){
echo " >".$option."";
}
- echo " |
- |
- ";
+ echo "";
+ // [Sep 3, 2018 - Jung Wook] The input method of physician's name is changed from Selector to Input
+ echo "";
+ echo " | ";
/*
echo "
diff --git a/htdocs/regn/new_specimen.php b/htdocs/regn/new_specimen.php
index 0b44dcd1d..f7530141e 100755
--- a/htdocs/regn/new_specimen.php
+++ b/htdocs/regn/new_specimen.php
@@ -58,32 +58,12 @@
var jq = $.noConflict(true); // <== Do not pass true
-
+