From bd1298391ec540f6a09f4c4d793cb8b25dc85cc4 Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Mon, 13 Oct 2014 14:36:35 -0700 Subject: [PATCH] Correction for display of lab results that are long strings of text. --- interface/orders/single_order_results.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/orders/single_order_results.inc.php b/interface/orders/single_order_results.inc.php index baf245da7..0d40e40ea 100644 --- a/interface/orders/single_order_results.inc.php +++ b/interface/orders/single_order_results.inc.php @@ -293,7 +293,14 @@ function educlick(codetype, codevalue) { $result_status = empty($rrow['result_status' ]) ? '' : $rrow['result_status']; $result_document_id = empty($rrow['document_id' ]) ? '' : $rrow['document_id']; + if ($i = strpos($result_comments, "\n")) { // "=" is not a mistake! + // If the first line of comments is not empty, then it is actually a long textual + // result value with lines delimited by "~" characters. + $result_comments = str_replace("~", "\n", substr($result_comments, 0, $i)) . + substr($result_comments, $i); + } $result_comments = trim($result_comments); + $result_noteid = ''; if (!empty($result_comments)) { $result_noteid = 1 + storeNote($result_comments); -- 2.11.4.GIT