From fd9da51409fbebd87c4fdbb55d0a9452a3a00c93 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Fri, 28 Oct 2005 05:18:57 +0000 Subject: [PATCH] force just one column --- contrib/forms/clinical_notes/report.php | 1 + contrib/forms/podiatry/report.php | 1 + contrib/forms/specialist_notes/report.php | 1 + interface/forms/soap/report.php | 57 ++++++++++++++++--------------- 4 files changed, 32 insertions(+), 28 deletions(-) rewrite interface/forms/soap/report.php (75%) diff --git a/contrib/forms/clinical_notes/report.php b/contrib/forms/clinical_notes/report.php index 17bb221c0..3b0db3bbd 100644 --- a/contrib/forms/clinical_notes/report.php +++ b/contrib/forms/clinical_notes/report.php @@ -10,6 +10,7 @@ include_once("../../globals.php"); include_once($GLOBALS["srcdir"] . "/api.inc"); function clinical_notes_report($pid, $encounter, $cols, $id) { + $cols = 1; // force always 1 column $count = 0; $data = sqlQuery("SELECT * " . "FROM form_clinical_notes WHERE " . diff --git a/contrib/forms/podiatry/report.php b/contrib/forms/podiatry/report.php index af08f781a..d60b22602 100644 --- a/contrib/forms/podiatry/report.php +++ b/contrib/forms/podiatry/report.php @@ -10,6 +10,7 @@ include_once("../../globals.php"); include_once($GLOBALS["srcdir"] . "/api.inc"); function podiatry_report($pid, $encounter, $cols, $id) { + $cols = 1; // force always 1 column $count = 0; $data = sqlQuery("SELECT * " . "FROM form_podiatry WHERE " . diff --git a/contrib/forms/specialist_notes/report.php b/contrib/forms/specialist_notes/report.php index f740d047e..f81e15037 100644 --- a/contrib/forms/specialist_notes/report.php +++ b/contrib/forms/specialist_notes/report.php @@ -10,6 +10,7 @@ include_once("../../globals.php"); include_once($GLOBALS["srcdir"] . "/api.inc"); function specialist_notes_report($pid, $encounter, $cols, $id) { + $cols = 1; // force always 1 column $count = 0; $data = sqlQuery("SELECT * " . "FROM form_specialist_notes WHERE " . diff --git a/interface/forms/soap/report.php b/interface/forms/soap/report.php dissimilarity index 75% index 689e7b253..3df52e0ee 100644 --- a/interface/forms/soap/report.php +++ b/interface/forms/soap/report.php @@ -1,28 +1,29 @@ -"; -foreach($data as $key => $value) { -if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") { - continue; -} -if ($value == "on") { -$value = "yes"; -} -$key=ucwords(str_replace("_"," ",$key)); -print "$key: $value"; -$count++; -if ($count == $cols) { -$count = 0; -print "\n"; -} -} -} -print ""; -} -?> +"; + foreach($data as $key => $value) { + if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") { + continue; + } + if ($value == "on") { + $value = "yes"; + } + $key=ucwords(str_replace("_"," ",$key)); + print "$key: $value"; + $count++; + if ($count == $cols) { + $count = 0; + print "\n"; + } + } + } + print ""; +} +?> -- 2.11.4.GIT