From df9695da329a4607e649c598009e67a4e5882f48 Mon Sep 17 00:00:00 2001 From: daviemukungi Date: Mon, 8 Feb 2021 14:57:56 +0300 Subject: [PATCH] Revert "Added consulatation forms according to user roles" --- .../controllers/conceptSetPageController.js | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/ui/app/clinical/consultation/controllers/conceptSetPageController.js b/ui/app/clinical/consultation/controllers/conceptSetPageController.js index 5455116365..861c722fab 100644 --- a/ui/app/clinical/consultation/controllers/conceptSetPageController.js +++ b/ui/app/clinical/consultation/controllers/conceptSetPageController.js @@ -82,43 +82,7 @@ angular.module('bahmni.clinical') allTemplates.splice(i, 1); } } - } - else if ((currentuserRoleName == "PMTCT") && (currentuserRoleName != "superman")){ - for (var i = allTemplates.length - 1; i >= 0; i--) { - if (allTemplates[i].uuid == endoffollowupform || allTemplates[i].uuid == anccard || allTemplates[i].uuid == maternityform || allTemplates[i].uuid == personalhist || allTemplates[i].uuid == familyhistdata) { - allTemplates.splice(i, 1); - } - } - } - else if ((currentuserRoleName == "PMTCT (HEI)") && (currentuserRoleName != "superman")){ - for (var i = allTemplates.length - 1; i >= 0; i--) { - if (allTemplates[i].uuid == arthistoryclinical || allTemplates[i].uuid == arttreatmentform || allTemplates[i].uuid == artandhivfollowup || allTemplates[i].uuid == endoffollowupform || allTemplates[i].uuid == anccard || allTemplates[i].uuid == viralload || allTemplates[i].uuid == maternityform || allTemplates[i].uuid == personalhist || allTemplates[i].uuid == familyhistdata) { - allTemplates.splice(i, 1); - } - } - } - else if ((currentuserRoleName == "EAC") && (currentuserRoleName != "superman")){ - for (var i = allTemplates.length - 1; i >= 0; i--) { - if (allTemplates[i].uuid == arthistoryclinical || allTemplates[i].uuid == arttreatmentform || allTemplates[i].uuid == artandhivfollowup || allTemplates[i].uuid == endoffollowupform || allTemplates[i].uuid == anccard || allTemplates[i].uuid == viralload || allTemplates[i].uuid == tbscreeningform || allTemplates[i].uuid == maternityform || allTemplates[i].uuid == personalhist || allTemplates[i].uuid == familyhistdata) { - allTemplates.splice(i, 1); - } - } - } - else if ((currentuserRoleName == "CLINICIAN") && (currentuserRoleName != "superman")){ - for (var i = allTemplates.length - 1; i >= 0; i--) { - if ( allTemplates[i].uuid == arttreatmentform || allTemplates[i].uuid == endoffollowupform || allTemplates[i].uuid == anccard || allTemplates[i].uuid == eacforms || allTemplates[i].uuid == maternityform) { - allTemplates.splice(i, 1); - } - } - } - else if ((currentuserRoleName == "MATERNITY") && (currentuserRoleName != "superman")){ - for (var i = allTemplates.length - 1; i >= 0; i--) { - if (allTemplates[i].uuid == arthistoryclinical || allTemplates[i].uuid == arttreatmentform || allTemplates[i].uuid == artandhivfollowup || allTemplates[i].uuid == endoffollowupform || allTemplates[i].uuid == viralload || allTemplates[i].uuid == tbscreeningform || allTemplates[i].uuid == eacforms || allTemplates[i].uuid == personalhist || allTemplates[i].uuid == familyhistdata) { - allTemplates.splice(i, 1); - } - } - } - else { + } else { for (var i = allTemplates.length - 1; i >= 0; i--) { if (allTemplates[i].uuid == personalhist || allTemplates[i].uuid == familyhistdata) { allTemplates.splice(i, 1);