From: Agnibho Mondal Date: Wed, 2 Jun 2021 20:38:53 +0000 (+0530) Subject: Show omit time X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=09dc7759a63260c157aa7844d870e4bc31e2381c;p=simpleipd.git Show omit time --- diff --git a/www/treatment.php b/www/treatment.php index 4a423f3..6ce66d3 100644 --- a/www/treatment.php +++ b/www/treatment.php @@ -41,7 +41,13 @@ if(!empty($_GET["pid"])){ else{ $last=""; } - $view=$view."".$drug["drug"]."".$drug["dose"]."".$drug["route"]."".$drug["frequency"]."".date("M j", $drug["start"])."".$drug["duration"]."".$drug["addl"]."".$last.""; + if(!empty($drug["end"])){ + $end=" to ".date("M j", $drug["end"]); + } + else{ + $end=""; + } + $view=$view."".$drug["drug"]."".$drug["dose"]."".$drug["route"]."".$drug["frequency"]."".date("M j", $drug["start"]).$end."".$drug["duration"]."".$drug["addl"]."".$last.""; } $view=$view.""; $form=schema2form("forms/drugs.schema.json");