From c55427f31a6a93666cca3d10120824744e78d046 Mon Sep 17 00:00:00 2001 From: Robert Down RN Date: Wed, 16 Aug 2023 22:47:41 -0400 Subject: [PATCH] fix: Ensure proper rendering of top cards (#6762) --- interface/patient_file/summary/demographics.php | 26 +++++++------------------ 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 4590797ec..f0e7a6fef 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -1025,33 +1025,19 @@ $oemr_ui = new OemrUI($arrOeUiSettings); ?>
-
+
getTwig(); $allergy = (AclMain::aclCheckIssue('allergy')) ? 1 : 0; $pl = (AclMain::aclCheckIssue('medical_problem')) ? 1 : 0; $meds = (AclMain::aclCheckIssue('medication')) ? 1 : 0; - $cards = $allergy + $pl + $meds; + $rx = (!$GLOBALS['disable_prescriptions'] && AclMain::aclCheckCore('patients', 'rx')) ? 1 : 0; + $cards = $allergy + $pl + $meds + $rx; $col = "p-1 "; - switch ($cards) { - case '1': - $col .= "col-12"; - break; - - case '2': - $col .= "col-6"; - break; - - case '3': - $col .= "col-4"; - break; - - default: - $col .= "col"; - break; - } + $colInt = 12 / $cards; + $col = "col-" . $colInt; /** * Helper function to return only issues with an outcome not equal to resolved @@ -1205,7 +1191,9 @@ $oemr_ui = new OemrUI($arrOeUiSettings); $viewArgs['content'] = ob_get_contents(); ob_end_clean(); + echo "
"; echo $t->render('patient/card/rx.html.twig', $viewArgs); + echo "
"; endif; ?>
-- 2.11.4.GIT