diff --git a/README.md b/README.md index 33befcd..6fcd917 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - # eHealth Portal (1.0.5) + # eHealth Portal (3.0.0) ![eHealth Portal image](https://raw.githubusercontent.com/Namibia/eHealth-Portal/master/admin/assets/images/vdm-component.jpg "The eHealth Portal") @@ -6,42 +6,42 @@ # Build Details -+ *Company*: [Vast Development Method](https://github.com/namibia/eHealth-Portal) -+ *Author*: [Oh Martin](mailto:oh.martin@vdm.io) -+ *Name*: [eHealth Portal](https://github.com/namibia/eHealth-Portal) -+ *First Build*: 13th August, 2020 -+ *Last Build*: 24th April, 2021 -+ *Version*: 1.0.5 ++ *Company*: [Vast Development Method](https://git.vdm.dev/joomla/eHealth-Portal) ++ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) ++ *Name*: [eHealth Portal](https://git.vdm.dev/joomla/eHealth-Portal) ++ *First Build*: 19th January, 2024 ++ *Last Build*: 19th January, 2024 ++ *Version*: 3.0.0 + *Copyright*: Copyright (C) 2020 Vast Development Method. All rights reserved. + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time -**425 Hours** or **53 Eight Hour Days** (actual time the author saved - +**449 Hours** or **56 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](http://joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **152325** -+ *File count*: **1125** ++ *Line count*: **160836** ++ *File count*: **1113** + *Folder count*: **176** - **280 Hours** or **35 Eight Hour Days** (the actual time the author spent) + **295 Hours** or **37 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @106hours** = codingtime / 4; -> **planning @61hours** = codingtime / 7; -> **mapping @42hours** = codingtime / 10; -> **office @71hours** = codingtime / 6;) +> **debugging @112hours** = codingtime / 4; +> **planning @64hours** = codingtime / 7; +> **mapping @45hours** = codingtime / 10; +> **office @75hours** = codingtime / 6;) -**705 Hours** or **88 Eight Hour Days** +**744 Hours** or **93 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **17.6 weeks** or **3.7 months** +Project duration: **18.6 weeks** or **3.9 months** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) \ No newline at end of file diff --git a/admin/README.txt b/admin/README.txt index 33befcd..6fcd917 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,4 +1,4 @@ - # eHealth Portal (1.0.5) + # eHealth Portal (3.0.0) ![eHealth Portal image](https://raw.githubusercontent.com/Namibia/eHealth-Portal/master/admin/assets/images/vdm-component.jpg "The eHealth Portal") @@ -6,42 +6,42 @@ # Build Details -+ *Company*: [Vast Development Method](https://github.com/namibia/eHealth-Portal) -+ *Author*: [Oh Martin](mailto:oh.martin@vdm.io) -+ *Name*: [eHealth Portal](https://github.com/namibia/eHealth-Portal) -+ *First Build*: 13th August, 2020 -+ *Last Build*: 24th April, 2021 -+ *Version*: 1.0.5 ++ *Company*: [Vast Development Method](https://git.vdm.dev/joomla/eHealth-Portal) ++ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) ++ *Name*: [eHealth Portal](https://git.vdm.dev/joomla/eHealth-Portal) ++ *First Build*: 19th January, 2024 ++ *Last Build*: 19th January, 2024 ++ *Version*: 3.0.0 + *Copyright*: Copyright (C) 2020 Vast Development Method. All rights reserved. + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time -**425 Hours** or **53 Eight Hour Days** (actual time the author saved - +**449 Hours** or **56 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](http://joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **152325** -+ *File count*: **1125** ++ *Line count*: **160836** ++ *File count*: **1113** + *Folder count*: **176** - **280 Hours** or **35 Eight Hour Days** (the actual time the author spent) + **295 Hours** or **37 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @106hours** = codingtime / 4; -> **planning @61hours** = codingtime / 7; -> **mapping @42hours** = codingtime / 10; -> **office @71hours** = codingtime / 6;) +> **debugging @112hours** = codingtime / 4; +> **planning @64hours** = codingtime / 7; +> **mapping @45hours** = codingtime / 10; +> **office @75hours** = codingtime / 6;) -**705 Hours** or **88 Eight Hour Days** +**744 Hours** or **93 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **17.6 weeks** or **3.7 months** +Project duration: **18.6 weeks** or **3.9 months** > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) \ No newline at end of file diff --git a/admin/access.xml b/admin/access.xml index 9ec6a16..14cbb50 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -1,425 +1,414 @@ - +
- - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - + +
- - + +
- +
- - + +
- +
- +
- - + +
- +
- - + +
- - + +
- +
- +
- -
-
- - - -
-
- - - +
- - - + + +
-
- - - +
+ + +
- - - + + +
-
- - - +
+ + +
- - - + + +
-
- - - +
+ + + +
+
+ + +
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - + + +
- - - + + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + +
- - - - + + + + +
+
+ + + +
+
+ + +
\ No newline at end of file diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index f213246..4bc0ae9 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage admin.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/administration_part.css b/admin/assets/css/administration_part.css index 069514b..b03bd62 100644 --- a/admin/assets/css/administration_part.css +++ b/admin/assets/css/administration_part.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_part.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/administration_parts.css b/admin/assets/css/administration_parts.css index 6f8a1c4..9f00601 100644 --- a/admin/assets/css/administration_parts.css +++ b/admin/assets/css/administration_parts.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_parts.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/antenatal_care.css b/admin/assets/css/antenatal_care.css index 842535f..6a8aad7 100644 --- a/admin/assets/css/antenatal_care.css +++ b/admin/assets/css/antenatal_care.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_care.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/antenatal_cares.css b/admin/assets/css/antenatal_cares.css index a5541be..b54d94b 100644 --- a/admin/assets/css/antenatal_cares.css +++ b/admin/assets/css/antenatal_cares.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_cares.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/breast_cancer.css b/admin/assets/css/breast_cancer.css index b5a6da2..71f8e74 100644 --- a/admin/assets/css/breast_cancer.css +++ b/admin/assets/css/breast_cancer.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancer.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/breast_cancers.css b/admin/assets/css/breast_cancers.css index 5882222..a172cba 100644 --- a/admin/assets/css/breast_cancers.css +++ b/admin/assets/css/breast_cancers.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancers.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/cervical_cancer.css b/admin/assets/css/cervical_cancer.css index 6422f52..95ff38f 100644 --- a/admin/assets/css/cervical_cancer.css +++ b/admin/assets/css/cervical_cancer.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancer.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/cervical_cancers.css b/admin/assets/css/cervical_cancers.css index e973417..f6e4d09 100644 --- a/admin/assets/css/cervical_cancers.css +++ b/admin/assets/css/cervical_cancers.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancers.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/clinic.css b/admin/assets/css/clinic.css index 8859f2a..1e7a0b7 100644 --- a/admin/assets/css/clinic.css +++ b/admin/assets/css/clinic.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinic.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/clinics.css b/admin/assets/css/clinics.css index bc1b5b7..a7fccdb 100644 --- a/admin/assets/css/clinics.css +++ b/admin/assets/css/clinics.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinics.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/counseling_type.css b/admin/assets/css/counseling_type.css index 9eb511d..4237c41 100644 --- a/admin/assets/css/counseling_type.css +++ b/admin/assets/css/counseling_type.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_type.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/counseling_types.css b/admin/assets/css/counseling_types.css index 7452a12..30c464c 100644 --- a/admin/assets/css/counseling_types.css +++ b/admin/assets/css/counseling_types.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_types.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 03c540c..0d04084 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage dashboard.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -25,153 +25,153 @@ /* CSS Document */ .dashboard-container { - margin-left: 10px; - margin-top: 10px; - width: 100%; + margin-left: 10px; + margin-top: 10px; + width: 100%; } .dashboard-container [class*="span"] { - display: block; - float: none; - margin-left: 0; - width: auto; + display: block; + float: none; + margin-left: 0; + width: auto; } .dashboard-container:before, .dashboard-container:after { - content: ""; - display: table; + content: ""; + display: table; } .dashboard-container:after { - clear: both; + clear: both; } .dashboard-container [class*="span"] { - box-sizing: border-box; - display: block; - float: left; - min-height: 145px; - min-width: 96px; - width: 100%; + box-sizing: border-box; + display: block; + float: left; + min-height: 145px; + min-width: 96px; + width: 100%; } .dashboard-container [class*="span"]:first-child { - margin-left: 0; + margin-left: 0; } .dashboard-wraper { - background: none repeat scroll 0 0 hsl(0, 0%, 93%); - border-radius: 5px; - float: left; - margin: 1%; - padding: 3px; - width: 17%; - min-height: 194px; - min-width: 96px; + background: none repeat scroll 0 0 hsl(0, 0%, 93%); + border-radius: 5px; + float: left; + margin: 1%; + padding: 3px; + width: 17%; + min-height: 194px; + min-width: 96px; } .dashboard-content a { - background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); - border: 1px solid hsl(0, 0%, 85%); - border-radius: 4px; - box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; - color: hsl(0, 0%, 20%); - display: block; - min-height: 89px; - padding: 10px; - text-align: center; - text-decoration: none; + background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); + border: 1px solid hsl(0, 0%, 85%); + border-radius: 4px; + box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; + color: hsl(0, 0%, 20%); + display: block; + min-height: 89px; + padding: 10px; + text-align: center; + text-decoration: none; } .dashboard-content a:hover { - background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); - color: hsl(200, 100%, 30%); - text-decoration: none; + background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); + color: hsl(200, 100%, 30%); + text-decoration: none; } .dashboard-title { - display: block; - padding-top: 5px; + display: block; + padding-top: 5px; } .dashboard-info { - background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); - border: 1px solid hsl(0, 0%, 85%); - border-radius: 4px; - box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; - color: hsl(0, 0%, 20%); - display: block; - font-size: 12px; - padding: 10px; - text-align: center; + background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); + border: 1px solid hsl(0, 0%, 85%); + border-radius: 4px; + box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset; + color: hsl(0, 0%, 20%); + display: block; + font-size: 12px; + padding: 10px; + text-align: center; } .dashboard-info span { - display: block; - text-align: center; + display: block; + text-align: center; } .dashboard-info img { - margin: 0 auto; + margin: 0 auto; } .dashboard-table { - border-top: 1px solid hsl(0, 0%, 87%); - margin-top: 5px; - width: 100%; + border-top: 1px solid hsl(0, 0%, 87%); + margin-top: 5px; + width: 100%; } .dashboard-info h5 { - font-size: 11px; - font-weight: bold; + font-size: 11px; + font-weight: bold; } .dashboard-block { - background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); - border: 1px solid hsl(0, 0%, 76%); - border-radius: 3px; - box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset; - margin-bottom: 20px; + background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); + border: 1px solid hsl(0, 0%, 76%); + border-radius: 3px; + box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset; + margin-bottom: 20px; } .dashboard-block .dashboard-block-head { - background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); - border-bottom: 1px solid hsl(0, 0%, 76%); - border-radius: 3px 3px 0 0; - box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%); - height: 40px; - position: relative; + background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0); + border-bottom: 1px solid hsl(0, 0%, 76%); + border-radius: 3px 3px 0 0; + box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%); + height: 40px; + position: relative; } .dashboard-block .dashboard-block-head h5 { - font-size: 12px; - margin: 0; - padding-left: 10px; - padding-top: 11px; - text-transform: uppercase; + font-size: 12px; + margin: 0; + padding-left: 10px; + padding-top: 11px; + text-transform: uppercase; } .dashboard-block .dashboard-block-content { - background: none repeat scroll 0 0 hsl(0, 0%, 93%); - border-radius: 0 0 3px 3px; + background: none repeat scroll 0 0 hsl(0, 0%, 93%); + border-radius: 0 0 3px 3px; } .dashboard-block .dashboard-block-box { - background: none repeat scroll 0 0 hsl(0, 0%, 100%); - border-top: 1px solid hsl(0, 0%, 82%); - box-shadow: 0 0 5px hsl(0, 0%, 87%) inset; + background: none repeat scroll 0 0 hsl(0, 0%, 100%); + border-top: 1px solid hsl(0, 0%, 82%); + box-shadow: 0 0 5px hsl(0, 0%, 87%) inset; } .dashboard-block .dashboard-block-content .dashboard-block-box { - margin-top: 0 !important; + margin-top: 0 !important; } .dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table { - margin-bottom: 0 !important; + margin-bottom: 0 !important; } .dashboard-block-table { - background-color: hsla(0, 0%, 0%, 0); - border-collapse: collapse; - border-spacing: 0; - margin-bottom: 20px; - max-width: 100%; - width: 100%; + background-color: hsla(0, 0%, 0%, 0); + border-collapse: collapse; + border-spacing: 0; + margin-bottom: 20px; + max-width: 100%; + width: 100%; } .dashboard-block-table th, .dashboard-block-table td { - border-top: 1px solid hsl(0, 0%, 87%); - line-height: 20px; - padding: 5px; - text-align: left; - vertical-align: middle; + border-top: 1px solid hsl(0, 0%, 87%); + line-height: 20px; + padding: 5px; + text-align: left; + vertical-align: middle; } .dashboard-badge { - background-color: hsl(0, 0%, 60%); - border-radius: 9px; - color: hsl(0, 0%, 100%); - font-size: 11.844px; - font-weight: bold; - line-height: 14px; - padding: 1px 9px 2px; - text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25); - vertical-align: baseline; - white-space: nowrap; + background-color: hsl(0, 0%, 60%); + border-radius: 9px; + color: hsl(0, 0%, 100%); + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + padding: 1px 9px 2px; + text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25); + vertical-align: baseline; + white-space: nowrap; } \ No newline at end of file diff --git a/admin/assets/css/diagnosis_type.css b/admin/assets/css/diagnosis_type.css index a22c8fc..1e0f7c1 100644 --- a/admin/assets/css/diagnosis_type.css +++ b/admin/assets/css/diagnosis_type.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_type.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/diagnosis_types.css b/admin/assets/css/diagnosis_types.css index 93f7f05..2666927 100644 --- a/admin/assets/css/diagnosis_types.css +++ b/admin/assets/css/diagnosis_types.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_types.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/family_planning.css b/admin/assets/css/family_planning.css index d9789f3..31527f5 100644 --- a/admin/assets/css/family_planning.css +++ b/admin/assets/css/family_planning.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_planning.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/family_plannings.css b/admin/assets/css/family_plannings.css index 9ef7ffa..8633aa2 100644 --- a/admin/assets/css/family_plannings.css +++ b/admin/assets/css/family_plannings.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_plannings.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/foetal_engagement.css b/admin/assets/css/foetal_engagement.css index f50b698..a831921 100644 --- a/admin/assets/css/foetal_engagement.css +++ b/admin/assets/css/foetal_engagement.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagement.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/foetal_engagements.css b/admin/assets/css/foetal_engagements.css index def308b..3218b65 100644 --- a/admin/assets/css/foetal_engagements.css +++ b/admin/assets/css/foetal_engagements.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagements.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/foetal_lie.css b/admin/assets/css/foetal_lie.css index bc01698..17b8099 100644 --- a/admin/assets/css/foetal_lie.css +++ b/admin/assets/css/foetal_lie.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lie.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/foetal_lies.css b/admin/assets/css/foetal_lies.css index df76e4f..9167a9b 100644 --- a/admin/assets/css/foetal_lies.css +++ b/admin/assets/css/foetal_lies.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lies.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/foetal_presentation.css b/admin/assets/css/foetal_presentation.css index 3b76a26..98287de 100644 --- a/admin/assets/css/foetal_presentation.css +++ b/admin/assets/css/foetal_presentation.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentation.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/foetal_presentations.css b/admin/assets/css/foetal_presentations.css index c06c54f..86d83e6 100644 --- a/admin/assets/css/foetal_presentations.css +++ b/admin/assets/css/foetal_presentations.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentations.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/general_medical_check_up.css b/admin/assets/css/general_medical_check_up.css index 42fc41d..e6336bb 100644 --- a/admin/assets/css/general_medical_check_up.css +++ b/admin/assets/css/general_medical_check_up.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_up.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/general_medical_check_ups.css b/admin/assets/css/general_medical_check_ups.css index 79c9fbd..01be84e 100644 --- a/admin/assets/css/general_medical_check_ups.css +++ b/admin/assets/css/general_medical_check_ups.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_ups.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/health_education.css b/admin/assets/css/health_education.css index 47500b5..0d00272 100644 --- a/admin/assets/css/health_education.css +++ b/admin/assets/css/health_education.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/health_education_topic.css b/admin/assets/css/health_education_topic.css index 10cc0e9..3d882f9 100644 --- a/admin/assets/css/health_education_topic.css +++ b/admin/assets/css/health_education_topic.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topic.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/health_education_topics.css b/admin/assets/css/health_education_topics.css index 1fa3fba..41dcb06 100644 --- a/admin/assets/css/health_education_topics.css +++ b/admin/assets/css/health_education_topics.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topics.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/health_educations.css b/admin/assets/css/health_educations.css index 57d250f..0ab0d0d 100644 --- a/admin/assets/css/health_educations.css +++ b/admin/assets/css/health_educations.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_educations.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/hiv_counseling_and_testing.css b/admin/assets/css/hiv_counseling_and_testing.css index 92ca973..37b28a3 100644 --- a/admin/assets/css/hiv_counseling_and_testing.css +++ b/admin/assets/css/hiv_counseling_and_testing.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counseling_and_testing.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/hiv_counselings_and_testings.css b/admin/assets/css/hiv_counselings_and_testings.css index 726bbbb..f777348 100644 --- a/admin/assets/css/hiv_counselings_and_testings.css +++ b/admin/assets/css/hiv_counselings_and_testings.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counselings_and_testings.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/immunisation.css b/admin/assets/css/immunisation.css index ed78ba5..8f83efd 100644 --- a/admin/assets/css/immunisation.css +++ b/admin/assets/css/immunisation.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/immunisation_type.css b/admin/assets/css/immunisation_type.css index c4eae75..2886291 100644 --- a/admin/assets/css/immunisation_type.css +++ b/admin/assets/css/immunisation_type.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_type.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/immunisation_types.css b/admin/assets/css/immunisation_types.css index 2272a25..53107ba 100644 --- a/admin/assets/css/immunisation_types.css +++ b/admin/assets/css/immunisation_types.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_types.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/immunisation_vaccine_type.css b/admin/assets/css/immunisation_vaccine_type.css index 946da32..302782e 100644 --- a/admin/assets/css/immunisation_vaccine_type.css +++ b/admin/assets/css/immunisation_vaccine_type.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_type.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/immunisation_vaccine_types.css b/admin/assets/css/immunisation_vaccine_types.css index 4e76c45..b566344 100644 --- a/admin/assets/css/immunisation_vaccine_types.css +++ b/admin/assets/css/immunisation_vaccine_types.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_types.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/immunisations.css b/admin/assets/css/immunisations.css index a5262f1..d9818e9 100644 --- a/admin/assets/css/immunisations.css +++ b/admin/assets/css/immunisations.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisations.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/medication.css b/admin/assets/css/medication.css index fde0c0d..3361dd1 100644 --- a/admin/assets/css/medication.css +++ b/admin/assets/css/medication.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medication.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/medications.css b/admin/assets/css/medications.css index 3296b23..31fbf96 100644 --- a/admin/assets/css/medications.css +++ b/admin/assets/css/medications.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medications.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/nonpay_reason.css b/admin/assets/css/nonpay_reason.css index 7a1e619..72dac2b 100644 --- a/admin/assets/css/nonpay_reason.css +++ b/admin/assets/css/nonpay_reason.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reason.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/nonpay_reasons.css b/admin/assets/css/nonpay_reasons.css index 3888658..f030f70 100644 --- a/admin/assets/css/nonpay_reasons.css +++ b/admin/assets/css/nonpay_reasons.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reasons.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/patient_queue.css b/admin/assets/css/patient_queue.css index 7d41f85..af6c512 100644 --- a/admin/assets/css/patient_queue.css +++ b/admin/assets/css/patient_queue.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage patient_queue.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/payment.css b/admin/assets/css/payment.css index d89e4cf..f8d2f07 100644 --- a/admin/assets/css/payment.css +++ b/admin/assets/css/payment.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/payment_amount.css b/admin/assets/css/payment_amount.css deleted file mode 100644 index 8bec62e..0000000 --- a/admin/assets/css/payment_amount.css +++ /dev/null @@ -1,27 +0,0 @@ -/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ - __ __ _ _____ _ _ __ __ _ _ _ - \ \ / / | | | __ \ | | | | | \/ | | | | | | | - \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | - \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | - \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | - \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| - | | - |_| -/-------------------------------------------------------------------------------------------------------------------------------/ - - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 - @package eHealth Portal - @subpackage payment_amount.css - @author Oh Martin - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -/* CSS Document */ - - diff --git a/admin/assets/css/payment_amounts.css b/admin/assets/css/payment_amounts.css deleted file mode 100644 index 6bd6166..0000000 --- a/admin/assets/css/payment_amounts.css +++ /dev/null @@ -1,27 +0,0 @@ -/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ - __ __ _ _____ _ _ __ __ _ _ _ - \ \ / / | | | __ \ | | | | | \/ | | | | | | | - \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | - \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | - \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | - \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| - | | - |_| -/-------------------------------------------------------------------------------------------------------------------------------/ - - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 - @package eHealth Portal - @subpackage payment_amounts.css - @author Oh Martin - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -/* CSS Document */ - - diff --git a/admin/assets/css/payment_type.css b/admin/assets/css/payment_type.css index c1b3feb..8e7b426 100644 --- a/admin/assets/css/payment_type.css +++ b/admin/assets/css/payment_type.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_type.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/payment_types.css b/admin/assets/css/payment_types.css index 207da3d..e7ad5c7 100644 --- a/admin/assets/css/payment_types.css +++ b/admin/assets/css/payment_types.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_types.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/payments.css b/admin/assets/css/payments.css index 474fb63..f735a2f 100644 --- a/admin/assets/css/payments.css +++ b/admin/assets/css/payments.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payments.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/planning_type.css b/admin/assets/css/planning_type.css index f00bcba..f64a774 100644 --- a/admin/assets/css/planning_type.css +++ b/admin/assets/css/planning_type.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_type.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/planning_types.css b/admin/assets/css/planning_types.css index 2d5eb18..d8bc31a 100644 --- a/admin/assets/css/planning_types.css +++ b/admin/assets/css/planning_types.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_types.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/prostate_and_testicular_cancer.css b/admin/assets/css/prostate_and_testicular_cancer.css index 2ab60eb..c3fb7c6 100644 --- a/admin/assets/css/prostate_and_testicular_cancer.css +++ b/admin/assets/css/prostate_and_testicular_cancer.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancer.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/prostate_and_testicular_cancers.css b/admin/assets/css/prostate_and_testicular_cancers.css index 299774e..41b14d7 100644 --- a/admin/assets/css/prostate_and_testicular_cancers.css +++ b/admin/assets/css/prostate_and_testicular_cancers.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancers.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/referral.css b/admin/assets/css/referral.css index 4ca2c49..ff26b25 100644 --- a/admin/assets/css/referral.css +++ b/admin/assets/css/referral.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referral.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/referrals.css b/admin/assets/css/referrals.css index 85d0f3f..a5bf925 100644 --- a/admin/assets/css/referrals.css +++ b/admin/assets/css/referrals.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/site.css b/admin/assets/css/site.css index 4852fc7..95460cb 100644 --- a/admin/assets/css/site.css +++ b/admin/assets/css/site.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage site.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/sites.css b/admin/assets/css/sites.css index 1c19ebb..b95208a 100644 --- a/admin/assets/css/sites.css +++ b/admin/assets/css/sites.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage sites.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/strength.css b/admin/assets/css/strength.css index ebb0137..cd45c83 100644 --- a/admin/assets/css/strength.css +++ b/admin/assets/css/strength.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strength.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/strengths.css b/admin/assets/css/strengths.css index 7722210..0f31de9 100644 --- a/admin/assets/css/strengths.css +++ b/admin/assets/css/strengths.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strengths.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/test.css b/admin/assets/css/test.css index efb92aa..1c97132 100644 --- a/admin/assets/css/test.css +++ b/admin/assets/css/test.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage test.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/testing_reason.css b/admin/assets/css/testing_reason.css index 8c178a3..691e99c 100644 --- a/admin/assets/css/testing_reason.css +++ b/admin/assets/css/testing_reason.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reason.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/testing_reasons.css b/admin/assets/css/testing_reasons.css index eb3ff89..5e4ea04 100644 --- a/admin/assets/css/testing_reasons.css +++ b/admin/assets/css/testing_reasons.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reasons.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/tests.css b/admin/assets/css/tests.css index e178c3a..fcacfc1 100644 --- a/admin/assets/css/tests.css +++ b/admin/assets/css/tests.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tests.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/tuberculoses.css b/admin/assets/css/tuberculoses.css index c430365..b085618 100644 --- a/admin/assets/css/tuberculoses.css +++ b/admin/assets/css/tuberculoses.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculoses.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/tuberculosis.css b/admin/assets/css/tuberculosis.css index 3fed89b..7d19d8b 100644 --- a/admin/assets/css/tuberculosis.css +++ b/admin/assets/css/tuberculosis.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculosis.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/unit.css b/admin/assets/css/unit.css index d42991f..beb675d 100644 --- a/admin/assets/css/unit.css +++ b/admin/assets/css/unit.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage unit.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/units.css b/admin/assets/css/units.css index b16b8a6..d46f5fb 100644 --- a/admin/assets/css/units.css +++ b/admin/assets/css/units.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage units.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/vmmc.css b/admin/assets/css/vmmc.css index 675c8d7..b9e965f 100644 --- a/admin/assets/css/vmmc.css +++ b/admin/assets/css/vmmc.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmc.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/css/vmmcs.css b/admin/assets/css/vmmcs.css index 931de16..a0a974c 100644 --- a/admin/assets/css/vmmcs.css +++ b/admin/assets/css/vmmcs.css @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmcs.css - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/assets/images/import.gif b/admin/assets/images/import.gif index 4371cc6..10bcb85 100644 Binary files a/admin/assets/images/import.gif and b/admin/assets/images/import.gif differ diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 4c77a9e..f409c00 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage admin.js - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/config.xml b/admin/config.xml index 1d11e57..74a2129 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -1,29 +1,29 @@
+ label="COM_EHEALTHPORTAL_CONFIG_GLOBAL_LABEL" + description="COM_EHEALTHPORTAL_CONFIG_GLOBAL_DESC"> + label="COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_LABEL" + description="COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_DESC"> + value="-5 hours">COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_ONE + value="-12 hours">COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_TWO + value="-1 day">COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_THREE + value="-2 day">COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_FOUR + value="-1 week">COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_FIVE + value="0">COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_SIX @@ -80,7 +80,7 @@ class="inputbox" validate="rules" filter="rules" - component="com_ehealth_portal" + component="com_ehealthportal" section="component" />
diff --git a/admin/controller.php b/admin/controller.php index 515f0c9..6bf2c09 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage controller.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,17 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Router\Route; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * General Controller of Ehealth_portal component + * General Controller of Ehealthportal component */ -class Ehealth_portalController extends JControllerLegacy +class EhealthportalController extends BaseController { /** * Constructor. @@ -42,10 +47,10 @@ class Ehealth_portalController extends JControllerLegacy * * @since 3.0 */ - public function __construct($config = array()) + public function __construct($config = []) { // set the default view - $config['default_view'] = 'ehealth_portal'; + $config['default_view'] = 'ehealthportal'; parent::__construct($config); } @@ -58,38 +63,38 @@ class Ehealth_portalController extends JControllerLegacy function display($cachable = false, $urlparams = false) { // set default view if not set - $view = $this->input->getCmd('view', 'ehealth_portal'); - $data = $this->getViewRelation($view); - $layout = $this->input->get('layout', null, 'WORD'); - $id = $this->input->getInt('id'); + $view = $this->input->getCmd('view', 'ehealthportal'); + $data = $this->getViewRelation($view); + $layout = $this->input->get('layout', null, 'WORD'); + $id = $this->input->getInt('id'); // Check for edit form. - if(Ehealth_portalHelper::checkArray($data)) + if(UtilitiesArrayHelper::check($data)) { - if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_ehealth_portal.edit.'.$data['view'], $id)) + if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_ehealthportal.edit.'.$data['view'], $id)) { // Somehow the person just went to the form - we don't allow that. - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); $this->setMessage($this->getError(), 'error'); // check if item was opend from other then its own list view - $ref = $this->input->getCmd('ref', 0); - $refid = $this->input->getInt('refid', 0); + $ref = $this->input->getCmd('ref', 0); + $refid = $this->input->getInt('refid', 0); // set redirect - if ($refid > 0 && Ehealth_portalHelper::checkString($ref)) + if ($refid > 0 && StringHelper::check($ref)) { // redirect to item of ref - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); } - elseif (Ehealth_portalHelper::checkString($ref)) + elseif (StringHelper::check($ref)) { // redirect to ref - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view='.(string)$ref, false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view='.(string)$ref, false)); } else { // normal redirect back to the list view - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view='.$data['views'], false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view='.$data['views'], false)); } return false; @@ -102,7 +107,7 @@ class Ehealth_portalController extends JControllerLegacy protected function getViewRelation($view) { // check the we have a value - if (Ehealth_portalHelper::checkString($view)) + if (StringHelper::check($view)) { // the view relationships $views = array( @@ -119,26 +124,25 @@ class Ehealth_portalController extends JControllerLegacy 'cervical_cancer' => 'cervical_cancers', 'breast_cancer' => 'breast_cancers', 'test' => 'tests', - 'immunisation_vaccine_type' => 'immunisation_vaccine_types', - 'foetal_presentation' => 'foetal_presentations', 'foetal_lie' => 'foetal_lies', - 'counseling_type' => 'counseling_types', + 'immunisation_vaccine_type' => 'immunisation_vaccine_types', 'foetal_engagement' => 'foetal_engagements', - 'health_education_topic' => 'health_education_topics', + 'foetal_presentation' => 'foetal_presentations', 'testing_reason' => 'testing_reasons', - 'clinic' => 'clinics', + 'counseling_type' => 'counseling_types', + 'health_education_topic' => 'health_education_topics', 'immunisation_type' => 'immunisation_types', - 'unit' => 'units', + 'strength' => 'strengths', 'referral' => 'referrals', 'planning_type' => 'planning_types', 'diagnosis_type' => 'diagnosis_types', 'nonpay_reason' => 'nonpay_reasons', 'medication' => 'medications', - 'payment_amount' => 'payment_amounts', - 'administration_part' => 'administration_parts', 'payment_type' => 'payment_types', - 'strength' => 'strengths', - 'site' => 'sites' + 'administration_part' => 'administration_parts', + 'site' => 'sites', + 'unit' => 'units', + 'clinic' => 'clinics' ); // check if this is a list view if (in_array($view, $views)) diff --git a/admin/controllers/administration_part.php b/admin/controllers/administration_part.php index 2be12c7..80375ef 100644 --- a/admin/controllers/administration_part.php +++ b/admin/controllers/administration_part.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_part.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Administration_part Controller + * Administration_part Form Controller */ -class Ehealth_portalControllerAdministration_part extends JControllerForm +class EhealthportalControllerAdministration_part extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Administration_parts'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('administration_part.access', 'com_ehealth_portal'); + $access = $user->authorise('administration_part.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.administration_part.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.administration_part.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.administration_part.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.administration_part.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Administration_part', '', array()); + $model = $this->getModel('Administration_part', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=administration_parts' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=administration_parts' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerAdministration_part extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/administration_parts.php b/admin/controllers/administration_parts.php index 2c65ab6..db10ad1 100644 --- a/admin/controllers/administration_parts.php +++ b/admin/controllers/administration_parts.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_parts.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Administration_parts Controller + * Administration_parts Admin Controller */ -class Ehealth_portalControllerAdministration_parts extends JControllerAdmin +class EhealthportalControllerAdministration_parts extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerAdministration_parts extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_ADMINISTRATION_PARTS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerAdministration_parts extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Administration_part', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Administration_part', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerAdministration_parts extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('administration_part.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('administration_part.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerAdministration_parts extends JControllerAdmin $model = $this->getModel('Administration_parts'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Administration_parts_'.$date->format('jS_F_Y'),'Administration parts exported ('.$date->format('jS F, Y').')','administration parts'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Administration_parts_'.$date->format('jS_F_Y'),'Administration parts exported ('.$date->format('jS F, Y').')','administration parts'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=administration_parts', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=administration_parts', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerAdministration_parts extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('administration_part.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('administration_part.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Administration_parts'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('administration_part_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'administration_parts'); $session->set('dataType_VDM_IMPORTINTO', 'administration_part'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_ADMINISTRATION_PARTS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_ADMINISTRATION_PARTS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=administration_parts', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=administration_parts', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index ba457c8..e3a7165 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage ajax.json.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,40 +26,51 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\MVC\Controller\BaseController; +use Joomla\CMS\Session\Session; use Joomla\Utilities\ArrayHelper; /** - * Ehealth_portal Ajax Controller + * Ehealthportal Ajax Base Controller */ -class Ehealth_portalControllerAjax extends JControllerLegacy +class EhealthportalControllerAjax extends BaseController { public function __construct($config) { parent::__construct($config); // make sure all json stuff are set - JFactory::getDocument()->setMimeEncoding( 'application/json' ); - JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); - JResponse::setHeader("Access-Control-Allow-Origin", "*"); + Factory::getDocument()->setMimeEncoding( 'application/json' ); + // get the application + $app = Factory::getApplication(); + $app->setHeader('Content-Disposition','attachment;filename="getajax.json"'); + $app->setHeader('Access-Control-Allow-Origin', '*'); // load the tasks $this->registerTask('getImmunisationVaccineType', 'ajax'); } public function ajax() { - $user = JFactory::getUser(); - $jinput = JFactory::getApplication()->input; + // get the user for later use + $user = Factory::getUser(); + // get the input values + $jinput = Factory::getApplication()->input; + // check if we should return raw + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + // return to a callback function + $callback = $jinput->get('callback', null, 'CMD'); // Check Token! - $token = JSession::getFormToken(); - $call_token = $jinput->get('token', 0, 'ALNUM'); + $token = Session::getFormToken(); + $call_token = $jinput->get('token', 0, 'ALNUM'); if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { + // get the task $task = $this->getTask(); switch($task) { case 'getImmunisationVaccineType': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $administration_partValue = $jinput->get('administration_part', NULL, 'INT'); if($administration_partValue && $user->id != 0) { @@ -69,7 +80,7 @@ class Ehealth_portalControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -84,10 +95,14 @@ class Ehealth_portalControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -98,10 +113,15 @@ class Ehealth_portalControllerAjax extends JControllerLegacy } else { - if($callback = $jinput->get('callback', null, 'CMD')) + // return to a callback function + if($callback) { echo $callback."(".json_encode(false).");"; } + elseif($returnRaw) + { + echo json_encode(false); + } else { echo "(".json_encode(false).");"; diff --git a/admin/controllers/antenatal_care.php b/admin/controllers/antenatal_care.php index a696c95..2c952a2 100644 --- a/admin/controllers/antenatal_care.php +++ b/admin/controllers/antenatal_care.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_care.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Antenatal_care Controller + * Antenatal_care Form Controller */ -class Ehealth_portalControllerAntenatal_care extends JControllerForm +class EhealthportalControllerAntenatal_care extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Antenatal_cares'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('antenatal_care.access', 'com_ehealth_portal'); + $access = $user->authorise('antenatal_care.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.antenatal_care.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.antenatal_care.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.antenatal_care.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.antenatal_care.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Antenatal_care', '', array()); + $model = $this->getModel('Antenatal_care', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=antenatal_cares' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=antenatal_cares' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerAntenatal_care extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/antenatal_cares.php b/admin/controllers/antenatal_cares.php index 5ced554..5c52efe 100644 --- a/admin/controllers/antenatal_cares.php +++ b/admin/controllers/antenatal_cares.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_cares.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Antenatal_cares Controller + * Antenatal_cares Admin Controller */ -class Ehealth_portalControllerAntenatal_cares extends JControllerAdmin +class EhealthportalControllerAntenatal_cares extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerAntenatal_cares extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_ANTENATAL_CARES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_ANTENATAL_CARES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerAntenatal_cares extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Antenatal_care', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Antenatal_care', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerAntenatal_cares extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('antenatal_care.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('antenatal_care.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerAntenatal_cares extends JControllerAdmin $model = $this->getModel('Antenatal_cares'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Antenatal_cares_'.$date->format('jS_F_Y'),'Antenatal cares exported ('.$date->format('jS F, Y').')','antenatal cares'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Antenatal_cares_'.$date->format('jS_F_Y'),'Antenatal cares exported ('.$date->format('jS F, Y').')','antenatal cares'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=antenatal_cares', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=antenatal_cares', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerAntenatal_cares extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('antenatal_care.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('antenatal_care.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Antenatal_cares'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('antenatal_care_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'antenatal_cares'); $session->set('dataType_VDM_IMPORTINTO', 'antenatal_care'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_ANTENATAL_CARES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_ANTENATAL_CARES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=antenatal_cares', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=antenatal_cares', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/breast_cancer.php b/admin/controllers/breast_cancer.php index 8198a51..87bebbd 100644 --- a/admin/controllers/breast_cancer.php +++ b/admin/controllers/breast_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Breast_cancer Controller + * Breast_cancer Form Controller */ -class Ehealth_portalControllerBreast_cancer extends JControllerForm +class EhealthportalControllerBreast_cancer extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Breast_cancers'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('breast_cancer.access', 'com_ehealth_portal'); + $access = $user->authorise('breast_cancer.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.breast_cancer.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.breast_cancer.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.breast_cancer.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.breast_cancer.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Breast_cancer', '', array()); + $model = $this->getModel('Breast_cancer', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=breast_cancers' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=breast_cancers' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerBreast_cancer extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/breast_cancers.php b/admin/controllers/breast_cancers.php index 1cda41d..b252feb 100644 --- a/admin/controllers/breast_cancers.php +++ b/admin/controllers/breast_cancers.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancers.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Breast_cancers Controller + * Breast_cancers Admin Controller */ -class Ehealth_portalControllerBreast_cancers extends JControllerAdmin +class EhealthportalControllerBreast_cancers extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerBreast_cancers extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_BREAST_CANCERS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_BREAST_CANCERS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerBreast_cancers extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Breast_cancer', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Breast_cancer', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerBreast_cancers extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('breast_cancer.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('breast_cancer.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerBreast_cancers extends JControllerAdmin $model = $this->getModel('Breast_cancers'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Breast_cancers_'.$date->format('jS_F_Y'),'Breast cancers exported ('.$date->format('jS F, Y').')','breast cancers'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Breast_cancers_'.$date->format('jS_F_Y'),'Breast cancers exported ('.$date->format('jS F, Y').')','breast cancers'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=breast_cancers', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=breast_cancers', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerBreast_cancers extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('breast_cancer.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('breast_cancer.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Breast_cancers'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('breast_cancer_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'breast_cancers'); $session->set('dataType_VDM_IMPORTINTO', 'breast_cancer'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_BREAST_CANCERS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_BREAST_CANCERS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=breast_cancers', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=breast_cancers', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/cervical_cancer.php b/admin/controllers/cervical_cancer.php index 4577bae..42c266c 100644 --- a/admin/controllers/cervical_cancer.php +++ b/admin/controllers/cervical_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Cervical_cancer Controller + * Cervical_cancer Form Controller */ -class Ehealth_portalControllerCervical_cancer extends JControllerForm +class EhealthportalControllerCervical_cancer extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Cervical_cancers'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('cervical_cancer.access', 'com_ehealth_portal'); + $access = $user->authorise('cervical_cancer.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.cervical_cancer.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.cervical_cancer.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.cervical_cancer.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.cervical_cancer.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Cervical_cancer', '', array()); + $model = $this->getModel('Cervical_cancer', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=cervical_cancers' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=cervical_cancers' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerCervical_cancer extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/cervical_cancers.php b/admin/controllers/cervical_cancers.php index f084aa5..948fdb9 100644 --- a/admin/controllers/cervical_cancers.php +++ b/admin/controllers/cervical_cancers.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancers.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Cervical_cancers Controller + * Cervical_cancers Admin Controller */ -class Ehealth_portalControllerCervical_cancers extends JControllerAdmin +class EhealthportalControllerCervical_cancers extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerCervical_cancers extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_CERVICAL_CANCERS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_CERVICAL_CANCERS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerCervical_cancers extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Cervical_cancer', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Cervical_cancer', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerCervical_cancers extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('cervical_cancer.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('cervical_cancer.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerCervical_cancers extends JControllerAdmin $model = $this->getModel('Cervical_cancers'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Cervical_cancers_'.$date->format('jS_F_Y'),'Cervical cancers exported ('.$date->format('jS F, Y').')','cervical cancers'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Cervical_cancers_'.$date->format('jS_F_Y'),'Cervical cancers exported ('.$date->format('jS F, Y').')','cervical cancers'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=cervical_cancers', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=cervical_cancers', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerCervical_cancers extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('cervical_cancer.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('cervical_cancer.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Cervical_cancers'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('cervical_cancer_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'cervical_cancers'); $session->set('dataType_VDM_IMPORTINTO', 'cervical_cancer'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_CERVICAL_CANCERS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_CERVICAL_CANCERS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=cervical_cancers', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=cervical_cancers', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/clinic.php b/admin/controllers/clinic.php index 3de67bc..3fe9294 100644 --- a/admin/controllers/clinic.php +++ b/admin/controllers/clinic.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinic.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Clinic Controller + * Clinic Form Controller */ -class Ehealth_portalControllerClinic extends JControllerForm +class EhealthportalControllerClinic extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerClinic extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Clinics'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerClinic extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('clinic.access', 'com_ehealth_portal'); + $access = $user->authorise('clinic.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerClinic extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerClinic extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.clinic.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.clinic.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.clinic.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.clinic.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerClinic extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerClinic extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerClinic extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Clinic', '', array()); + $model = $this->getModel('Clinic', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=clinics' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=clinics' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerClinic extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerClinic extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerClinic extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerClinic extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerClinic extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerClinic extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/clinics.php b/admin/controllers/clinics.php index 2dd41e1..082fc9e 100644 --- a/admin/controllers/clinics.php +++ b/admin/controllers/clinics.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinics.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Clinics Controller + * Clinics Admin Controller */ -class Ehealth_portalControllerClinics extends JControllerAdmin +class EhealthportalControllerClinics extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerClinics extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_CLINICS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_CLINICS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerClinics extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Clinic', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Clinic', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerClinics extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('clinic.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('clinic.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerClinics extends JControllerAdmin $model = $this->getModel('Clinics'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Clinics_'.$date->format('jS_F_Y'),'Clinics exported ('.$date->format('jS F, Y').')','clinics'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Clinics_'.$date->format('jS_F_Y'),'Clinics exported ('.$date->format('jS F, Y').')','clinics'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=clinics', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=clinics', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerClinics extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('clinic.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('clinic.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Clinics'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('clinic_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'clinics'); $session->set('dataType_VDM_IMPORTINTO', 'clinic'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_CLINICS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_CLINICS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=clinics', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=clinics', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/counseling_type.php b/admin/controllers/counseling_type.php index 8c24230..35395f5 100644 --- a/admin/controllers/counseling_type.php +++ b/admin/controllers/counseling_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Counseling_type Controller + * Counseling_type Form Controller */ -class Ehealth_portalControllerCounseling_type extends JControllerForm +class EhealthportalControllerCounseling_type extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Counseling_types'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('counseling_type.access', 'com_ehealth_portal'); + $access = $user->authorise('counseling_type.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.counseling_type.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.counseling_type.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.counseling_type.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.counseling_type.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Counseling_type', '', array()); + $model = $this->getModel('Counseling_type', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=counseling_types' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=counseling_types' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerCounseling_type extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/counseling_types.php b/admin/controllers/counseling_types.php index 292bfc9..5d85b79 100644 --- a/admin/controllers/counseling_types.php +++ b/admin/controllers/counseling_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Counseling_types Controller + * Counseling_types Admin Controller */ -class Ehealth_portalControllerCounseling_types extends JControllerAdmin +class EhealthportalControllerCounseling_types extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerCounseling_types extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_COUNSELING_TYPES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_COUNSELING_TYPES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerCounseling_types extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Counseling_type', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Counseling_type', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerCounseling_types extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('counseling_type.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('counseling_type.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerCounseling_types extends JControllerAdmin $model = $this->getModel('Counseling_types'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Counseling_types_'.$date->format('jS_F_Y'),'Counseling types exported ('.$date->format('jS F, Y').')','counseling types'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Counseling_types_'.$date->format('jS_F_Y'),'Counseling types exported ('.$date->format('jS F, Y').')','counseling types'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=counseling_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=counseling_types', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerCounseling_types extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('counseling_type.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('counseling_type.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Counseling_types'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('counseling_type_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'counseling_types'); $session->set('dataType_VDM_IMPORTINTO', 'counseling_type'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_COUNSELING_TYPES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_COUNSELING_TYPES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=counseling_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=counseling_types', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/diagnosis_type.php b/admin/controllers/diagnosis_type.php index 9a21865..5347844 100644 --- a/admin/controllers/diagnosis_type.php +++ b/admin/controllers/diagnosis_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Diagnosis_type Controller + * Diagnosis_type Form Controller */ -class Ehealth_portalControllerDiagnosis_type extends JControllerForm +class EhealthportalControllerDiagnosis_type extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Diagnosis_types'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('diagnosis_type.access', 'com_ehealth_portal'); + $access = $user->authorise('diagnosis_type.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.diagnosis_type.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.diagnosis_type.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.diagnosis_type.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.diagnosis_type.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Diagnosis_type', '', array()); + $model = $this->getModel('Diagnosis_type', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=diagnosis_types' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=diagnosis_types' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerDiagnosis_type extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/diagnosis_types.php b/admin/controllers/diagnosis_types.php index 9221645..c4a4ec4 100644 --- a/admin/controllers/diagnosis_types.php +++ b/admin/controllers/diagnosis_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Diagnosis_types Controller + * Diagnosis_types Admin Controller */ -class Ehealth_portalControllerDiagnosis_types extends JControllerAdmin +class EhealthportalControllerDiagnosis_types extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerDiagnosis_types extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_DIAGNOSIS_TYPES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerDiagnosis_types extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Diagnosis_type', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Diagnosis_type', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerDiagnosis_types extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('diagnosis_type.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('diagnosis_type.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerDiagnosis_types extends JControllerAdmin $model = $this->getModel('Diagnosis_types'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Diagnosis_types_'.$date->format('jS_F_Y'),'Diagnosis types exported ('.$date->format('jS F, Y').')','diagnosis types'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Diagnosis_types_'.$date->format('jS_F_Y'),'Diagnosis types exported ('.$date->format('jS F, Y').')','diagnosis types'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=diagnosis_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=diagnosis_types', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerDiagnosis_types extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('diagnosis_type.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('diagnosis_type.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Diagnosis_types'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('diagnosis_type_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'diagnosis_types'); $session->set('dataType_VDM_IMPORTINTO', 'diagnosis_type'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_DIAGNOSIS_TYPES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_DIAGNOSIS_TYPES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=diagnosis_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=diagnosis_types', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/ehealth_portal.php b/admin/controllers/ehealthportal.php similarity index 76% rename from admin/controllers/ehealth_portal.php rename to admin/controllers/ehealthportal.php index 8711457..dc989a0 100644 --- a/admin/controllers/ehealth_portal.php +++ b/admin/controllers/ehealthportal.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal - @subpackage ehealth_portal.php - @author Oh Martin + @subpackage ehealthportal.php + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,10 +26,17 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; +use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; + /** - * Ehealth_portal Controller + * Ehealthportal Admin Controller */ -class Ehealth_portalControllerEhealth_portal extends JControllerAdmin +class EhealthportalControllerEhealthportal extends AdminController { } diff --git a/admin/controllers/family_planning.php b/admin/controllers/family_planning.php index 5c7524d..06cd67d 100644 --- a/admin/controllers/family_planning.php +++ b/admin/controllers/family_planning.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_planning.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Family_planning Controller + * Family_planning Form Controller */ -class Ehealth_portalControllerFamily_planning extends JControllerForm +class EhealthportalControllerFamily_planning extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Family_plannings'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('family_planning.access', 'com_ehealth_portal'); + $access = $user->authorise('family_planning.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.family_planning.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.family_planning.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.family_planning.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.family_planning.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Family_planning', '', array()); + $model = $this->getModel('Family_planning', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=family_plannings' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=family_plannings' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerFamily_planning extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/family_plannings.php b/admin/controllers/family_plannings.php index 06f389f..13e72a4 100644 --- a/admin/controllers/family_plannings.php +++ b/admin/controllers/family_plannings.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_plannings.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Family_plannings Controller + * Family_plannings Admin Controller */ -class Ehealth_portalControllerFamily_plannings extends JControllerAdmin +class EhealthportalControllerFamily_plannings extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerFamily_plannings extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_FAMILY_PLANNINGS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_FAMILY_PLANNINGS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerFamily_plannings extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Family_planning', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Family_planning', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerFamily_plannings extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('family_planning.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('family_planning.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerFamily_plannings extends JControllerAdmin $model = $this->getModel('Family_plannings'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Family_plannings_'.$date->format('jS_F_Y'),'Family plannings exported ('.$date->format('jS F, Y').')','family plannings'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Family_plannings_'.$date->format('jS_F_Y'),'Family plannings exported ('.$date->format('jS F, Y').')','family plannings'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=family_plannings', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=family_plannings', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerFamily_plannings extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('family_planning.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('family_planning.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Family_plannings'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('family_planning_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'family_plannings'); $session->set('dataType_VDM_IMPORTINTO', 'family_planning'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FAMILY_PLANNINGS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FAMILY_PLANNINGS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=family_plannings', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=family_plannings', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/foetal_engagement.php b/admin/controllers/foetal_engagement.php index c9e2eae..ef69caf 100644 --- a/admin/controllers/foetal_engagement.php +++ b/admin/controllers/foetal_engagement.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagement.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Foetal_engagement Controller + * Foetal_engagement Form Controller */ -class Ehealth_portalControllerFoetal_engagement extends JControllerForm +class EhealthportalControllerFoetal_engagement extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Foetal_engagements'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('foetal_engagement.access', 'com_ehealth_portal'); + $access = $user->authorise('foetal_engagement.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.foetal_engagement.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.foetal_engagement.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.foetal_engagement.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.foetal_engagement.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Foetal_engagement', '', array()); + $model = $this->getModel('Foetal_engagement', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_engagements' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_engagements' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerFoetal_engagement extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/foetal_engagements.php b/admin/controllers/foetal_engagements.php index b724ebb..f844919 100644 --- a/admin/controllers/foetal_engagements.php +++ b/admin/controllers/foetal_engagements.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagements.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Foetal_engagements Controller + * Foetal_engagements Admin Controller */ -class Ehealth_portalControllerFoetal_engagements extends JControllerAdmin +class EhealthportalControllerFoetal_engagements extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerFoetal_engagements extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerFoetal_engagements extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Foetal_engagement', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Foetal_engagement', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerFoetal_engagements extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('foetal_engagement.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('foetal_engagement.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerFoetal_engagements extends JControllerAdmin $model = $this->getModel('Foetal_engagements'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Foetal_engagements_'.$date->format('jS_F_Y'),'Foetal engagements exported ('.$date->format('jS F, Y').')','foetal engagements'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Foetal_engagements_'.$date->format('jS_F_Y'),'Foetal engagements exported ('.$date->format('jS F, Y').')','foetal engagements'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_engagements', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_engagements', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerFoetal_engagements extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('foetal_engagement.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('foetal_engagement.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Foetal_engagements'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('foetal_engagement_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'foetal_engagements'); $session->set('dataType_VDM_IMPORTINTO', 'foetal_engagement'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_ENGAGEMENTS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_ENGAGEMENTS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_engagements', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_engagements', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/foetal_lie.php b/admin/controllers/foetal_lie.php index f327d09..64a0297 100644 --- a/admin/controllers/foetal_lie.php +++ b/admin/controllers/foetal_lie.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lie.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Foetal_lie Controller + * Foetal_lie Form Controller */ -class Ehealth_portalControllerFoetal_lie extends JControllerForm +class EhealthportalControllerFoetal_lie extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Foetal_lies'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('foetal_lie.access', 'com_ehealth_portal'); + $access = $user->authorise('foetal_lie.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.foetal_lie.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.foetal_lie.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.foetal_lie.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.foetal_lie.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Foetal_lie', '', array()); + $model = $this->getModel('Foetal_lie', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_lies' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_lies' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerFoetal_lie extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/foetal_lies.php b/admin/controllers/foetal_lies.php index 40b3f6a..6ae11bf 100644 --- a/admin/controllers/foetal_lies.php +++ b/admin/controllers/foetal_lies.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lies.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Foetal_lies Controller + * Foetal_lies Admin Controller */ -class Ehealth_portalControllerFoetal_lies extends JControllerAdmin +class EhealthportalControllerFoetal_lies extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerFoetal_lies extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_FOETAL_LIES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_FOETAL_LIES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerFoetal_lies extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Foetal_lie', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Foetal_lie', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerFoetal_lies extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('foetal_lie.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('foetal_lie.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerFoetal_lies extends JControllerAdmin $model = $this->getModel('Foetal_lies'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Foetal_lies_'.$date->format('jS_F_Y'),'Foetal lies exported ('.$date->format('jS F, Y').')','foetal lies'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Foetal_lies_'.$date->format('jS_F_Y'),'Foetal lies exported ('.$date->format('jS F, Y').')','foetal lies'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_lies', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_lies', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerFoetal_lies extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('foetal_lie.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('foetal_lie.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Foetal_lies'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('foetal_lie_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'foetal_lies'); $session->set('dataType_VDM_IMPORTINTO', 'foetal_lie'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_LIES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_LIES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_lies', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_lies', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/foetal_presentation.php b/admin/controllers/foetal_presentation.php index 4629c50..3465653 100644 --- a/admin/controllers/foetal_presentation.php +++ b/admin/controllers/foetal_presentation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Foetal_presentation Controller + * Foetal_presentation Form Controller */ -class Ehealth_portalControllerFoetal_presentation extends JControllerForm +class EhealthportalControllerFoetal_presentation extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Foetal_presentations'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('foetal_presentation.access', 'com_ehealth_portal'); + $access = $user->authorise('foetal_presentation.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.foetal_presentation.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.foetal_presentation.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.foetal_presentation.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.foetal_presentation.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Foetal_presentation', '', array()); + $model = $this->getModel('Foetal_presentation', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_presentations' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_presentations' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerFoetal_presentation extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/foetal_presentations.php b/admin/controllers/foetal_presentations.php index b810c5c..a6d7419 100644 --- a/admin/controllers/foetal_presentations.php +++ b/admin/controllers/foetal_presentations.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentations.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Foetal_presentations Controller + * Foetal_presentations Admin Controller */ -class Ehealth_portalControllerFoetal_presentations extends JControllerAdmin +class EhealthportalControllerFoetal_presentations extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerFoetal_presentations extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerFoetal_presentations extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Foetal_presentation', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Foetal_presentation', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerFoetal_presentations extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('foetal_presentation.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('foetal_presentation.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerFoetal_presentations extends JControllerAdmin $model = $this->getModel('Foetal_presentations'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Foetal_presentations_'.$date->format('jS_F_Y'),'Foetal presentations exported ('.$date->format('jS F, Y').')','foetal presentations'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Foetal_presentations_'.$date->format('jS_F_Y'),'Foetal presentations exported ('.$date->format('jS F, Y').')','foetal presentations'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_presentations', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_presentations', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerFoetal_presentations extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('foetal_presentation.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('foetal_presentation.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Foetal_presentations'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('foetal_presentation_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'foetal_presentations'); $session->set('dataType_VDM_IMPORTINTO', 'foetal_presentation'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_PRESENTATIONS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_PRESENTATIONS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=foetal_presentations', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=foetal_presentations', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/general_medical_check_up.php b/admin/controllers/general_medical_check_up.php index d569fc5..23b2261 100644 --- a/admin/controllers/general_medical_check_up.php +++ b/admin/controllers/general_medical_check_up.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_up.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * General_medical_check_up Controller + * General_medical_check_up Form Controller */ -class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm +class EhealthportalControllerGeneral_medical_check_up extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'General_medical_check_ups'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('general_medical_check_up.access', 'com_ehealth_portal'); + $access = $user->authorise('general_medical_check_up.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.general_medical_check_up.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.general_medical_check_up.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.general_medical_check_up.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.general_medical_check_up.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('General_medical_check_up', '', array()); + $model = $this->getModel('General_medical_check_up', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=general_medical_check_ups' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=general_medical_check_ups' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerGeneral_medical_check_up extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/general_medical_check_ups.php b/admin/controllers/general_medical_check_ups.php index b71e3a1..1cb167c 100644 --- a/admin/controllers/general_medical_check_ups.php +++ b/admin/controllers/general_medical_check_ups.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_ups.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * General_medical_check_ups Controller + * General_medical_check_ups Admin Controller */ -class Ehealth_portalControllerGeneral_medical_check_ups extends JControllerAdmin +class EhealthportalControllerGeneral_medical_check_ups extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerGeneral_medical_check_ups extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerGeneral_medical_check_ups extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'General_medical_check_up', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'General_medical_check_up', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerGeneral_medical_check_ups extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('general_medical_check_up.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('general_medical_check_up.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerGeneral_medical_check_ups extends JControllerAdmin $model = $this->getModel('General_medical_check_ups'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'General_medical_check_ups_'.$date->format('jS_F_Y'),'General medical check ups exported ('.$date->format('jS F, Y').')','general medical check ups'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'General_medical_check_ups_'.$date->format('jS_F_Y'),'General medical check ups exported ('.$date->format('jS F, Y').')','general medical check ups'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=general_medical_check_ups', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=general_medical_check_ups', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerGeneral_medical_check_ups extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('general_medical_check_up.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('general_medical_check_up.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('General_medical_check_ups'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('general_medical_check_up_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'general_medical_check_ups'); $session->set('dataType_VDM_IMPORTINTO', 'general_medical_check_up'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_GENERAL_MEDICAL_CHECK_UPS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_GENERAL_MEDICAL_CHECK_UPS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=general_medical_check_ups', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=general_medical_check_ups', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/health_education.php b/admin/controllers/health_education.php index 197d416..8efbcde 100644 --- a/admin/controllers/health_education.php +++ b/admin/controllers/health_education.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Health_education Controller + * Health_education Form Controller */ -class Ehealth_portalControllerHealth_education extends JControllerForm +class EhealthportalControllerHealth_education extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerHealth_education extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Health_educations'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerHealth_education extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('health_education.access', 'com_ehealth_portal'); + $access = $user->authorise('health_education.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerHealth_education extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerHealth_education extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.health_education.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.health_education.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.health_education.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.health_education.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerHealth_education extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerHealth_education extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerHealth_education extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Health_education', '', array()); + $model = $this->getModel('Health_education', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=health_educations' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=health_educations' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerHealth_education extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerHealth_education extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerHealth_education extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerHealth_education extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerHealth_education extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerHealth_education extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/health_education_topic.php b/admin/controllers/health_education_topic.php index fb43b44..9379873 100644 --- a/admin/controllers/health_education_topic.php +++ b/admin/controllers/health_education_topic.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topic.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Health_education_topic Controller + * Health_education_topic Form Controller */ -class Ehealth_portalControllerHealth_education_topic extends JControllerForm +class EhealthportalControllerHealth_education_topic extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Health_education_topics'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('health_education_topic.access', 'com_ehealth_portal'); + $access = $user->authorise('health_education_topic.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.health_education_topic.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.health_education_topic.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.health_education_topic.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.health_education_topic.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Health_education_topic', '', array()); + $model = $this->getModel('Health_education_topic', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=health_education_topics' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=health_education_topics' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerHealth_education_topic extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/health_education_topics.php b/admin/controllers/health_education_topics.php index 917557b..a321b46 100644 --- a/admin/controllers/health_education_topics.php +++ b/admin/controllers/health_education_topics.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topics.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Health_education_topics Controller + * Health_education_topics Admin Controller */ -class Ehealth_portalControllerHealth_education_topics extends JControllerAdmin +class EhealthportalControllerHealth_education_topics extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerHealth_education_topics extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerHealth_education_topics extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Health_education_topic', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Health_education_topic', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerHealth_education_topics extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('health_education_topic.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('health_education_topic.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerHealth_education_topics extends JControllerAdmin $model = $this->getModel('Health_education_topics'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Health_education_topics_'.$date->format('jS_F_Y'),'Health education topics exported ('.$date->format('jS F, Y').')','health education topics'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Health_education_topics_'.$date->format('jS_F_Y'),'Health education topics exported ('.$date->format('jS F, Y').')','health education topics'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=health_education_topics', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=health_education_topics', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerHealth_education_topics extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('health_education_topic.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('health_education_topic.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Health_education_topics'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('health_education_topic_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'health_education_topics'); $session->set('dataType_VDM_IMPORTINTO', 'health_education_topic'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATION_TOPICS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATION_TOPICS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=health_education_topics', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=health_education_topics', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/health_educations.php b/admin/controllers/health_educations.php index 2a257d3..13dce64 100644 --- a/admin/controllers/health_educations.php +++ b/admin/controllers/health_educations.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_educations.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Health_educations Controller + * Health_educations Admin Controller */ -class Ehealth_portalControllerHealth_educations extends JControllerAdmin +class EhealthportalControllerHealth_educations extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerHealth_educations extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_HEALTH_EDUCATIONS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerHealth_educations extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Health_education', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Health_education', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerHealth_educations extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('health_education.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('health_education.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerHealth_educations extends JControllerAdmin $model = $this->getModel('Health_educations'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Health_educations_'.$date->format('jS_F_Y'),'Health educations exported ('.$date->format('jS F, Y').')','health educations'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Health_educations_'.$date->format('jS_F_Y'),'Health educations exported ('.$date->format('jS F, Y').')','health educations'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=health_educations', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=health_educations', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerHealth_educations extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('health_education.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('health_education.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Health_educations'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('health_education_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'health_educations'); $session->set('dataType_VDM_IMPORTINTO', 'health_education'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATIONS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATIONS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=health_educations', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=health_educations', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/hiv_counseling_and_testing.php b/admin/controllers/hiv_counseling_and_testing.php index 5fc9ad8..0162623 100644 --- a/admin/controllers/hiv_counseling_and_testing.php +++ b/admin/controllers/hiv_counseling_and_testing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counseling_and_testing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Hiv_counseling_and_testing Controller + * Hiv_counseling_and_testing Form Controller */ -class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm +class EhealthportalControllerHiv_counseling_and_testing extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Hiv_counselings_and_testings'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('hiv_counseling_and_testing.access', 'com_ehealth_portal'); + $access = $user->authorise('hiv_counseling_and_testing.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.hiv_counseling_and_testing.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.hiv_counseling_and_testing.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.hiv_counseling_and_testing.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.hiv_counseling_and_testing.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Hiv_counseling_and_testing', '', array()); + $model = $this->getModel('Hiv_counseling_and_testing', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=hiv_counselings_and_testings' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=hiv_counselings_and_testings' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerHiv_counseling_and_testing extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/hiv_counselings_and_testings.php b/admin/controllers/hiv_counselings_and_testings.php index 2a646e0..660f2bd 100644 --- a/admin/controllers/hiv_counselings_and_testings.php +++ b/admin/controllers/hiv_counselings_and_testings.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counselings_and_testings.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Hiv_counselings_and_testings Controller + * Hiv_counselings_and_testings Admin Controller */ -class Ehealth_portalControllerHiv_counselings_and_testings extends JControllerAdmin +class EhealthportalControllerHiv_counselings_and_testings extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerHiv_counselings_and_testings extends JControllerAd * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerHiv_counselings_and_testings extends JControllerAd * * @since 1.6 */ - public function getModel($name = 'Hiv_counseling_and_testing', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Hiv_counseling_and_testing', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerHiv_counselings_and_testings extends JControllerAd public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('hiv_counseling_and_testing.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('hiv_counseling_and_testing.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerHiv_counselings_and_testings extends JControllerAd $model = $this->getModel('Hiv_counselings_and_testings'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Hiv_counselings_and_testings_'.$date->format('jS_F_Y'),'Hiv counselings and testings exported ('.$date->format('jS F, Y').')','hiv counselings and testings'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Hiv_counselings_and_testings_'.$date->format('jS_F_Y'),'Hiv counselings and testings exported ('.$date->format('jS F, Y').')','hiv counselings and testings'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=hiv_counselings_and_testings', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=hiv_counselings_and_testings', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerHiv_counselings_and_testings extends JControllerAd public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('hiv_counseling_and_testing.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('hiv_counseling_and_testing.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Hiv_counselings_and_testings'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('hiv_counseling_and_testing_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'hiv_counselings_and_testings'); $session->set('dataType_VDM_IMPORTINTO', 'hiv_counseling_and_testing'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_HIV_COUNSELINGS_AND_TESTINGS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_HIV_COUNSELINGS_AND_TESTINGS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=hiv_counselings_and_testings', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=hiv_counselings_and_testings', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/immunisation.php b/admin/controllers/immunisation.php index 3501617..b14caaa 100644 --- a/admin/controllers/immunisation.php +++ b/admin/controllers/immunisation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Immunisation Controller + * Immunisation Form Controller */ -class Ehealth_portalControllerImmunisation extends JControllerForm +class EhealthportalControllerImmunisation extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerImmunisation extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Immunisations'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerImmunisation extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('immunisation.access', 'com_ehealth_portal'); + $access = $user->authorise('immunisation.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerImmunisation extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerImmunisation extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.immunisation.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.immunisation.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.immunisation.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.immunisation.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerImmunisation extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerImmunisation extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerImmunisation extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Immunisation', '', array()); + $model = $this->getModel('Immunisation', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisations' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisations' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerImmunisation extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerImmunisation extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerImmunisation extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerImmunisation extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerImmunisation extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerImmunisation extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/immunisation_type.php b/admin/controllers/immunisation_type.php index b33e8f4..5b7f8c6 100644 --- a/admin/controllers/immunisation_type.php +++ b/admin/controllers/immunisation_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Immunisation_type Controller + * Immunisation_type Form Controller */ -class Ehealth_portalControllerImmunisation_type extends JControllerForm +class EhealthportalControllerImmunisation_type extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Immunisation_types'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('immunisation_type.access', 'com_ehealth_portal'); + $access = $user->authorise('immunisation_type.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.immunisation_type.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.immunisation_type.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.immunisation_type.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.immunisation_type.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Immunisation_type', '', array()); + $model = $this->getModel('Immunisation_type', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisation_types' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisation_types' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerImmunisation_type extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/immunisation_types.php b/admin/controllers/immunisation_types.php index 8f0c4b0..45ee8aa 100644 --- a/admin/controllers/immunisation_types.php +++ b/admin/controllers/immunisation_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Immunisation_types Controller + * Immunisation_types Admin Controller */ -class Ehealth_portalControllerImmunisation_types extends JControllerAdmin +class EhealthportalControllerImmunisation_types extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerImmunisation_types extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_IMMUNISATION_TYPES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_IMMUNISATION_TYPES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerImmunisation_types extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Immunisation_type', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Immunisation_type', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerImmunisation_types extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('immunisation_type.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('immunisation_type.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerImmunisation_types extends JControllerAdmin $model = $this->getModel('Immunisation_types'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Immunisation_types_'.$date->format('jS_F_Y'),'Immunisation types exported ('.$date->format('jS F, Y').')','immunisation types'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Immunisation_types_'.$date->format('jS_F_Y'),'Immunisation types exported ('.$date->format('jS F, Y').')','immunisation types'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisation_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisation_types', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerImmunisation_types extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('immunisation_type.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('immunisation_type.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Immunisation_types'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('immunisation_type_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'immunisation_types'); $session->set('dataType_VDM_IMPORTINTO', 'immunisation_type'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_TYPES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_TYPES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisation_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisation_types', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/immunisation_vaccine_type.php b/admin/controllers/immunisation_vaccine_type.php index 1dcae70..d9aff27 100644 --- a/admin/controllers/immunisation_vaccine_type.php +++ b/admin/controllers/immunisation_vaccine_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Immunisation_vaccine_type Controller + * Immunisation_vaccine_type Form Controller */ -class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm +class EhealthportalControllerImmunisation_vaccine_type extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Immunisation_vaccine_types'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('immunisation_vaccine_type.access', 'com_ehealth_portal'); + $access = $user->authorise('immunisation_vaccine_type.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.immunisation_vaccine_type.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.immunisation_vaccine_type.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.immunisation_vaccine_type.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.immunisation_vaccine_type.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Immunisation_vaccine_type', '', array()); + $model = $this->getModel('Immunisation_vaccine_type', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisation_vaccine_types' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisation_vaccine_types' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerImmunisation_vaccine_type extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/immunisation_vaccine_types.php b/admin/controllers/immunisation_vaccine_types.php index 9d91dd5..acceac6 100644 --- a/admin/controllers/immunisation_vaccine_types.php +++ b/admin/controllers/immunisation_vaccine_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Immunisation_vaccine_types Controller + * Immunisation_vaccine_types Admin Controller */ -class Ehealth_portalControllerImmunisation_vaccine_types extends JControllerAdmin +class EhealthportalControllerImmunisation_vaccine_types extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerImmunisation_vaccine_types extends JControllerAdmi * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerImmunisation_vaccine_types extends JControllerAdmi * * @since 1.6 */ - public function getModel($name = 'Immunisation_vaccine_type', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Immunisation_vaccine_type', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerImmunisation_vaccine_types extends JControllerAdmi public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('immunisation_vaccine_type.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('immunisation_vaccine_type.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerImmunisation_vaccine_types extends JControllerAdmi $model = $this->getModel('Immunisation_vaccine_types'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Immunisation_vaccine_types_'.$date->format('jS_F_Y'),'Immunisation vaccine types exported ('.$date->format('jS F, Y').')','immunisation vaccine types'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Immunisation_vaccine_types_'.$date->format('jS_F_Y'),'Immunisation vaccine types exported ('.$date->format('jS F, Y').')','immunisation vaccine types'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisation_vaccine_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisation_vaccine_types', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerImmunisation_vaccine_types extends JControllerAdmi public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('immunisation_vaccine_type.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('immunisation_vaccine_type.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Immunisation_vaccine_types'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('immunisation_vaccine_type_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'immunisation_vaccine_types'); $session->set('dataType_VDM_IMPORTINTO', 'immunisation_vaccine_type'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_VACCINE_TYPES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_VACCINE_TYPES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisation_vaccine_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisation_vaccine_types', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/immunisations.php b/admin/controllers/immunisations.php index 6086c98..de54605 100644 --- a/admin/controllers/immunisations.php +++ b/admin/controllers/immunisations.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisations.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Immunisations Controller + * Immunisations Admin Controller */ -class Ehealth_portalControllerImmunisations extends JControllerAdmin +class EhealthportalControllerImmunisations extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerImmunisations extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_IMMUNISATIONS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_IMMUNISATIONS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerImmunisations extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Immunisation', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Immunisation', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerImmunisations extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('immunisation.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('immunisation.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerImmunisations extends JControllerAdmin $model = $this->getModel('Immunisations'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Immunisations_'.$date->format('jS_F_Y'),'Immunisations exported ('.$date->format('jS F, Y').')','immunisations'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Immunisations_'.$date->format('jS_F_Y'),'Immunisations exported ('.$date->format('jS F, Y').')','immunisations'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisations', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisations', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerImmunisations extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('immunisation.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('immunisation.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Immunisations'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('immunisation_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'immunisations'); $session->set('dataType_VDM_IMPORTINTO', 'immunisation'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATIONS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATIONS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=immunisations', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=immunisations', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 070b725..fe0316f 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage import.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,17 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\BaseController; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; use Joomla\Utilities\ArrayHelper; /** - * Ehealth_portal Import Controller + * Ehealthportal Import Base Controller */ -class Ehealth_portalControllerImport extends JControllerLegacy +class EhealthportalControllerImport extends BaseController { /** * Import an spreadsheet. @@ -41,28 +46,28 @@ class Ehealth_portalControllerImport extends JControllerLegacy public function import() { // Check for request forgeries - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); $model = $this->getModel('import'); if ($model->import()) { - $cache = JFactory::getCache('mod_menu'); + $cache = Factory::getCache('mod_menu'); $cache->clean(); // TODO: Reset the users acl here as well to kill off any missing bits } - $app = JFactory::getApplication(); - $redirect_url = $app->getUserState('com_ehealth_portal.redirect_url'); + $app = Factory::getApplication(); + $redirect_url = $app->getUserState('com_ehealthportal.redirect_url'); if (empty($redirect_url)) { - $redirect_url = JRoute::_('index.php?option=com_ehealth_portal&view=import', false); + $redirect_url = Route::_('index.php?option=com_ehealthportal&view=import', false); } else { // wipe out the user state when we're going to redirect - $app->setUserState('com_ehealth_portal.redirect_url', ''); - $app->setUserState('com_ehealth_portal.message', ''); - $app->setUserState('com_ehealth_portal.extension_message', ''); + $app->setUserState('com_ehealthportal.redirect_url', ''); + $app->setUserState('com_ehealthportal.message', ''); + $app->setUserState('com_ehealthportal.extension_message', ''); } $this->setRedirect($redirect_url); } diff --git a/admin/controllers/medication.php b/admin/controllers/medication.php index ecd8451..359e269 100644 --- a/admin/controllers/medication.php +++ b/admin/controllers/medication.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medication.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Medication Controller + * Medication Form Controller */ -class Ehealth_portalControllerMedication extends JControllerForm +class EhealthportalControllerMedication extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerMedication extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Medications'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerMedication extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('medication.access', 'com_ehealth_portal'); + $access = $user->authorise('medication.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerMedication extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerMedication extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.medication.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.medication.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.medication.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.medication.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerMedication extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerMedication extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerMedication extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Medication', '', array()); + $model = $this->getModel('Medication', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=medications' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=medications' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerMedication extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerMedication extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerMedication extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerMedication extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerMedication extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerMedication extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/medications.php b/admin/controllers/medications.php index d9d6950..b8eba69 100644 --- a/admin/controllers/medications.php +++ b/admin/controllers/medications.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medications.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Medications Controller + * Medications Admin Controller */ -class Ehealth_portalControllerMedications extends JControllerAdmin +class EhealthportalControllerMedications extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerMedications extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_MEDICATIONS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_MEDICATIONS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerMedications extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Medication', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Medication', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerMedications extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('medication.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('medication.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerMedications extends JControllerAdmin $model = $this->getModel('Medications'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Medications_'.$date->format('jS_F_Y'),'Medications exported ('.$date->format('jS F, Y').')','medications'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Medications_'.$date->format('jS_F_Y'),'Medications exported ('.$date->format('jS F, Y').')','medications'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=medications', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=medications', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerMedications extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('medication.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('medication.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Medications'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('medication_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'medications'); $session->set('dataType_VDM_IMPORTINTO', 'medication'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_MEDICATIONS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_MEDICATIONS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=medications', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=medications', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/nonpay_reason.php b/admin/controllers/nonpay_reason.php index 7408608..abb4ac9 100644 --- a/admin/controllers/nonpay_reason.php +++ b/admin/controllers/nonpay_reason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Nonpay_reason Controller + * Nonpay_reason Form Controller */ -class Ehealth_portalControllerNonpay_reason extends JControllerForm +class EhealthportalControllerNonpay_reason extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Nonpay_reasons'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('nonpay_reason.access', 'com_ehealth_portal'); + $access = $user->authorise('nonpay_reason.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.nonpay_reason.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.nonpay_reason.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.nonpay_reason.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.nonpay_reason.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Nonpay_reason', '', array()); + $model = $this->getModel('Nonpay_reason', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=nonpay_reasons' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=nonpay_reasons' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerNonpay_reason extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/nonpay_reasons.php b/admin/controllers/nonpay_reasons.php index 4d6a6d6..3140780 100644 --- a/admin/controllers/nonpay_reasons.php +++ b/admin/controllers/nonpay_reasons.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reasons.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Nonpay_reasons Controller + * Nonpay_reasons Admin Controller */ -class Ehealth_portalControllerNonpay_reasons extends JControllerAdmin +class EhealthportalControllerNonpay_reasons extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerNonpay_reasons extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_NONPAY_REASONS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_NONPAY_REASONS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerNonpay_reasons extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Nonpay_reason', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Nonpay_reason', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerNonpay_reasons extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('nonpay_reason.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('nonpay_reason.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerNonpay_reasons extends JControllerAdmin $model = $this->getModel('Nonpay_reasons'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Nonpay_reasons_'.$date->format('jS_F_Y'),'Nonpay reasons exported ('.$date->format('jS F, Y').')','nonpay reasons'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Nonpay_reasons_'.$date->format('jS_F_Y'),'Nonpay reasons exported ('.$date->format('jS F, Y').')','nonpay reasons'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=nonpay_reasons', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=nonpay_reasons', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerNonpay_reasons extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('nonpay_reason.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('nonpay_reason.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Nonpay_reasons'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('nonpay_reason_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'nonpay_reasons'); $session->set('dataType_VDM_IMPORTINTO', 'nonpay_reason'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_NONPAY_REASONS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_NONPAY_REASONS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=nonpay_reasons', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=nonpay_reasons', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/patient_queue.php b/admin/controllers/patient_queue.php index e67cc17..47a6a81 100644 --- a/admin/controllers/patient_queue.php +++ b/admin/controllers/patient_queue.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage patient_queue.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,17 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\BaseController; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; use Joomla\Utilities\ArrayHelper; /** - * Ehealth_portal Patient_queue Controller + * Ehealthportal Patient_queue Base Controller */ -class Ehealth_portalControllerPatient_queue extends JControllerLegacy +class EhealthportalControllerPatient_queue extends BaseController { public function __construct($config) { @@ -40,7 +45,7 @@ class Ehealth_portalControllerPatient_queue extends JControllerLegacy public function dashboard() { - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal', false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal', false)); return; } } diff --git a/admin/controllers/payment.php b/admin/controllers/payment.php index d3e066b..ae55b61 100644 --- a/admin/controllers/payment.php +++ b/admin/controllers/payment.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Payment Controller + * Payment Form Controller */ -class Ehealth_portalControllerPayment extends JControllerForm +class EhealthportalControllerPayment extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerPayment extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Payments'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerPayment extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('payment.access', 'com_ehealth_portal'); + $access = $user->authorise('payment.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerPayment extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerPayment extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.payment.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.payment.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.payment.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.payment.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerPayment extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerPayment extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerPayment extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Payment', '', array()); + $model = $this->getModel('Payment', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payments' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=payments' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerPayment extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerPayment extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerPayment extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerPayment extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerPayment extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerPayment extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/payment_amount.php b/admin/controllers/payment_amount.php deleted file mode 100644 index 8ef70ff..0000000 --- a/admin/controllers/payment_amount.php +++ /dev/null @@ -1,330 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\Utilities\ArrayHelper; - -/** - * Payment_amount Controller - */ -class Ehealth_portalControllerPayment_amount extends JControllerForm -{ - /** - * Current or most recently performed task. - * - * @var string - * @since 12.2 - * @note Replaces _task. - */ - protected $task; - - /** - * Class constructor. - * - * @param array $config A named array of configuration variables. - * - * @since 1.6 - */ - public function __construct($config = array()) - { - $this->view_list = 'Payment_amounts'; // safeguard for setting the return view listing to the main view. - parent::__construct($config); - } - - /** - * Method override to check if you can add a new record. - * - * @param array $data An array of input data. - * - * @return boolean - * - * @since 1.6 - */ - protected function allowAdd($data = array()) - { - // Get user object. - $user = JFactory::getUser(); - // Access check. - $access = $user->authorise('payment_amount.access', 'com_ehealth_portal'); - if (!$access) - { - return false; - } - - // In the absense of better information, revert to the component permissions. - return parent::allowAdd($data); - } - - /** - * Method override to check if you can edit an existing record. - * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. - * - * @return boolean - * - * @since 1.6 - */ - protected function allowEdit($data = array(), $key = 'id') - { - // get user object. - $user = JFactory::getUser(); - // get record id. - $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - - - if ($recordId) - { - // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.payment_amount.' . (int) $recordId); - if (!$permission) - { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.payment_amount.' . $recordId)) - { - // Now test the owner is the user. - $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; - if (empty($ownerId)) - { - // Need to do a lookup from the model. - $record = $this->getModel()->getItem($recordId); - - if (empty($record)) - { - return false; - } - $ownerId = $record->created_by; - } - - // If the owner matches 'me' then allow. - if ($ownerId == $user->id) - { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) - { - return true; - } - } - } - return false; - } - } - // Since there is no permission, revert to the component permissions. - return parent::allowEdit($data, $key); - } - - /** - * Gets the URL arguments to append to an item redirect. - * - * @param integer $recordId The primary key id for the item. - * @param string $urlVar The name of the URL variable for the id. - * - * @return string The arguments to append to the redirect URL. - * - * @since 1.6 - */ - protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') - { - // get the referral options (old method use return instead see parent) - $ref = $this->input->get('ref', 0, 'string'); - $refid = $this->input->get('refid', 0, 'int'); - - // get redirect info. - $append = parent::getRedirectToItemAppend($recordId, $urlVar); - - // set the referral options - if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; - } - elseif ($ref) - { - $append = '&ref='. (string)$ref . $append; - } - - return $append; - } - - /** - * Method to run batch operations. - * - * @param object $model The model. - * - * @return boolean True if successful, false otherwise and internal error is set. - * - * @since 2.5 - */ - public function batch($model = null) - { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); - - // Set the model - $model = $this->getModel('Payment_amount', '', array()); - - // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payment_amounts' . $this->getRedirectToListAppend(), false)); - - return parent::batch($model); - } - - /** - * Method to cancel an edit. - * - * @param string $key The name of the primary key of the URL variable. - * - * @return boolean True if access level checks pass, false otherwise. - * - * @since 12.2 - */ - public function cancel($key = null) - { - // get the referral options - $this->ref = $this->input->get('ref', 0, 'word'); - $this->refid = $this->input->get('refid', 0, 'int'); - - // Check if there is a return value - $return = $this->input->get('return', null, 'base64'); - - $cancel = parent::cancel($key); - - if (!is_null($return) && JUri::isInternal(base64_decode($return))) - { - $redirect = base64_decode($return); - - // Redirect to the return value. - $this->setRedirect( - JRoute::_( - $redirect, false - ) - ); - } - elseif ($this->refid && $this->ref) - { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; - - // Redirect to the item screen. - $this->setRedirect( - JRoute::_( - 'index.php?option=' . $this->option . $redirect, false - ) - ); - } - elseif ($this->ref) - { - $redirect = '&view='.(string)$this->ref; - - // Redirect to the list screen. - $this->setRedirect( - JRoute::_( - 'index.php?option=' . $this->option . $redirect, false - ) - ); - } - return $cancel; - } - - /** - * Method to save a record. - * - * @param string $key The name of the primary key of the URL variable. - * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions). - * - * @return boolean True if successful, false otherwise. - * - * @since 12.2 - */ - public function save($key = null, $urlVar = null) - { - // get the referral options - $this->ref = $this->input->get('ref', 0, 'word'); - $this->refid = $this->input->get('refid', 0, 'int'); - - // Check if there is a return value - $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); - - if ($this->ref || $this->refid || $canReturn) - { - // to make sure the item is checkedin on redirect - $this->task = 'save'; - } - - $saved = parent::save($key, $urlVar); - - // This is not needed since parent save already does this - // Due to the ref and refid implementation we need to add this - if ($canReturn) - { - $redirect = base64_decode($return); - - // Redirect to the return value. - $this->setRedirect( - JRoute::_( - $redirect, false - ) - ); - } - elseif ($this->refid && $this->ref) - { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; - - // Redirect to the item screen. - $this->setRedirect( - JRoute::_( - 'index.php?option=' . $this->option . $redirect, false - ) - ); - } - elseif ($this->ref) - { - $redirect = '&view=' . (string)$this->ref; - - // Redirect to the list screen. - $this->setRedirect( - JRoute::_( - 'index.php?option=' . $this->option . $redirect, false - ) - ); - } - return $saved; - } - - /** - * Function that allows child controller access to model data - * after the data has been saved. - * - * @param JModel &$model The data model object. - * @param array $validData The validated data. - * - * @return void - * - * @since 11.1 - */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) - { - return; - } - -} diff --git a/admin/controllers/payment_amounts.php b/admin/controllers/payment_amounts.php deleted file mode 100644 index f62c6bc..0000000 --- a/admin/controllers/payment_amounts.php +++ /dev/null @@ -1,122 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\Utilities\ArrayHelper; - -/** - * Payment_amounts Controller - */ -class Ehealth_portalControllerPayment_amounts extends JControllerAdmin -{ - /** - * The prefix to use with controller messages. - * - * @var string - * @since 1.6 - */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS'; - - /** - * Method to get a model object, loading it if required. - * - * @param string $name The model name. Optional. - * @param string $prefix The class prefix. Optional. - * @param array $config Configuration array for model. Optional. - * - * @return JModelLegacy The model. - * - * @since 1.6 - */ - public function getModel($name = 'Payment_amount', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) - { - return parent::getModel($name, $prefix, $config); - } - - public function exportData() - { - // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('payment_amount.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) - { - // Get the input - $input = JFactory::getApplication()->input; - $pks = $input->post->get('cid', array(), 'array'); - // Sanitize the input - $pks = ArrayHelper::toInteger($pks); - // Get the model - $model = $this->getModel('Payment_amounts'); - // get the data to export - $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) - { - // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Payment_amounts_'.$date->format('jS_F_Y'),'Payment amounts exported ('.$date->format('jS F, Y').')','payment amounts'); - } - } - // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payment_amounts', false), $message, 'error'); - return; - } - - - public function importData() - { - // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); - // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('payment_amount.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) - { - // Get the import model - $model = $this->getModel('Payment_amounts'); - // get the headers to import - $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) - { - // Load headers to session. - $session = JFactory::getSession(); - $headers = json_encode($headers); - $session->set('payment_amount_VDM_IMPORTHEADERS', $headers); - $session->set('backto_VDM_IMPORT', 'payment_amounts'); - $session->set('dataType_VDM_IMPORTINTO', 'payment_amount'); - // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PAYMENT_AMOUNTS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); - return; - } - } - // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payment_amounts', false), $message, 'error'); - return; - } -} diff --git a/admin/controllers/payment_type.php b/admin/controllers/payment_type.php index afbb061..2e70c05 100644 --- a/admin/controllers/payment_type.php +++ b/admin/controllers/payment_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Payment_type Controller + * Payment_type Form Controller */ -class Ehealth_portalControllerPayment_type extends JControllerForm +class EhealthportalControllerPayment_type extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerPayment_type extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Payment_types'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerPayment_type extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('payment_type.access', 'com_ehealth_portal'); + $access = $user->authorise('payment_type.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerPayment_type extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerPayment_type extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.payment_type.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.payment_type.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.payment_type.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.payment_type.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerPayment_type extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerPayment_type extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerPayment_type extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Payment_type', '', array()); + $model = $this->getModel('Payment_type', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payment_types' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=payment_types' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerPayment_type extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerPayment_type extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerPayment_type extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerPayment_type extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerPayment_type extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerPayment_type extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/payment_types.php b/admin/controllers/payment_types.php index 2e7aa34..e99be9c 100644 --- a/admin/controllers/payment_types.php +++ b/admin/controllers/payment_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Payment_types Controller + * Payment_types Admin Controller */ -class Ehealth_portalControllerPayment_types extends JControllerAdmin +class EhealthportalControllerPayment_types extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerPayment_types extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_PAYMENT_TYPES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_PAYMENT_TYPES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerPayment_types extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Payment_type', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Payment_type', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerPayment_types extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('payment_type.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('payment_type.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerPayment_types extends JControllerAdmin $model = $this->getModel('Payment_types'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Payment_types_'.$date->format('jS_F_Y'),'Payment types exported ('.$date->format('jS F, Y').')','payment types'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Payment_types_'.$date->format('jS_F_Y'),'Payment types exported ('.$date->format('jS F, Y').')','payment types'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payment_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=payment_types', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerPayment_types extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('payment_type.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('payment_type.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Payment_types'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('payment_type_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'payment_types'); $session->set('dataType_VDM_IMPORTINTO', 'payment_type'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PAYMENT_TYPES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PAYMENT_TYPES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payment_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=payment_types', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/payments.php b/admin/controllers/payments.php index 40346a2..a95adf3 100644 --- a/admin/controllers/payments.php +++ b/admin/controllers/payments.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payments.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Payments Controller + * Payments Admin Controller */ -class Ehealth_portalControllerPayments extends JControllerAdmin +class EhealthportalControllerPayments extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerPayments extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_PAYMENTS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_PAYMENTS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerPayments extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Payment', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Payment', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerPayments extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('payment.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('payment.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerPayments extends JControllerAdmin $model = $this->getModel('Payments'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Payments_'.$date->format('jS_F_Y'),'Payments exported ('.$date->format('jS F, Y').')','payments'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Payments_'.$date->format('jS_F_Y'),'Payments exported ('.$date->format('jS F, Y').')','payments'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payments', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=payments', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerPayments extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('payment.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('payment.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Payments'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('payment_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'payments'); $session->set('dataType_VDM_IMPORTINTO', 'payment'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PAYMENTS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PAYMENTS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=payments', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=payments', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/planning_type.php b/admin/controllers/planning_type.php index 2df221f..3d21a5c 100644 --- a/admin/controllers/planning_type.php +++ b/admin/controllers/planning_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Planning_type Controller + * Planning_type Form Controller */ -class Ehealth_portalControllerPlanning_type extends JControllerForm +class EhealthportalControllerPlanning_type extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Planning_types'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('planning_type.access', 'com_ehealth_portal'); + $access = $user->authorise('planning_type.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.planning_type.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.planning_type.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.planning_type.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.planning_type.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Planning_type', '', array()); + $model = $this->getModel('Planning_type', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=planning_types' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=planning_types' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerPlanning_type extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/planning_types.php b/admin/controllers/planning_types.php index 9c00959..eada2a8 100644 --- a/admin/controllers/planning_types.php +++ b/admin/controllers/planning_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Planning_types Controller + * Planning_types Admin Controller */ -class Ehealth_portalControllerPlanning_types extends JControllerAdmin +class EhealthportalControllerPlanning_types extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerPlanning_types extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_PLANNING_TYPES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_PLANNING_TYPES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerPlanning_types extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Planning_type', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Planning_type', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerPlanning_types extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('planning_type.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('planning_type.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerPlanning_types extends JControllerAdmin $model = $this->getModel('Planning_types'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Planning_types_'.$date->format('jS_F_Y'),'Planning types exported ('.$date->format('jS F, Y').')','planning types'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Planning_types_'.$date->format('jS_F_Y'),'Planning types exported ('.$date->format('jS F, Y').')','planning types'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=planning_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=planning_types', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerPlanning_types extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('planning_type.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('planning_type.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Planning_types'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('planning_type_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'planning_types'); $session->set('dataType_VDM_IMPORTINTO', 'planning_type'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PLANNING_TYPES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PLANNING_TYPES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=planning_types', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=planning_types', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/prostate_and_testicular_cancer.php b/admin/controllers/prostate_and_testicular_cancer.php index ef5b347..c2f8ff1 100644 --- a/admin/controllers/prostate_and_testicular_cancer.php +++ b/admin/controllers/prostate_and_testicular_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Prostate_and_testicular_cancer Controller + * Prostate_and_testicular_cancer Form Controller */ -class Ehealth_portalControllerProstate_and_testicular_cancer extends JControllerForm +class EhealthportalControllerProstate_and_testicular_cancer extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Prostate_and_testicular_cancers'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('prostate_and_testicular_cancer.access', 'com_ehealth_portal'); + $access = $user->authorise('prostate_and_testicular_cancer.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.prostate_and_testicular_cancer.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.prostate_and_testicular_cancer.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.prostate_and_testicular_cancer.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.prostate_and_testicular_cancer.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Prostate_and_testicular_cancer', '', array()); + $model = $this->getModel('Prostate_and_testicular_cancer', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=prostate_and_testicular_cancers' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=prostate_and_testicular_cancers' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerProstate_and_testicular_cancer extends JController * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/prostate_and_testicular_cancers.php b/admin/controllers/prostate_and_testicular_cancers.php index aeacb47..04ead8e 100644 --- a/admin/controllers/prostate_and_testicular_cancers.php +++ b/admin/controllers/prostate_and_testicular_cancers.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancers.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Prostate_and_testicular_cancers Controller + * Prostate_and_testicular_cancers Admin Controller */ -class Ehealth_portalControllerProstate_and_testicular_cancers extends JControllerAdmin +class EhealthportalControllerProstate_and_testicular_cancers extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerProstate_and_testicular_cancers extends JControlle * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerProstate_and_testicular_cancers extends JControlle * * @since 1.6 */ - public function getModel($name = 'Prostate_and_testicular_cancer', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Prostate_and_testicular_cancer', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerProstate_and_testicular_cancers extends JControlle public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('prostate_and_testicular_cancer.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('prostate_and_testicular_cancer.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerProstate_and_testicular_cancers extends JControlle $model = $this->getModel('Prostate_and_testicular_cancers'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Prostate_and_testicular_cancers_'.$date->format('jS_F_Y'),'Prostate and testicular cancers exported ('.$date->format('jS F, Y').')','prostate and testicular cancers'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Prostate_and_testicular_cancers_'.$date->format('jS_F_Y'),'Prostate and testicular cancers exported ('.$date->format('jS F, Y').')','prostate and testicular cancers'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=prostate_and_testicular_cancers', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=prostate_and_testicular_cancers', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerProstate_and_testicular_cancers extends JControlle public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('prostate_and_testicular_cancer.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('prostate_and_testicular_cancer.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Prostate_and_testicular_cancers'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('prostate_and_testicular_cancer_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'prostate_and_testicular_cancers'); $session->set('dataType_VDM_IMPORTINTO', 'prostate_and_testicular_cancer'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PROSTATE_AND_TESTICULAR_CANCERS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PROSTATE_AND_TESTICULAR_CANCERS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=prostate_and_testicular_cancers', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=prostate_and_testicular_cancers', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/referral.php b/admin/controllers/referral.php index 83a82c2..dbb7fd6 100644 --- a/admin/controllers/referral.php +++ b/admin/controllers/referral.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referral.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Referral Controller + * Referral Form Controller */ -class Ehealth_portalControllerReferral extends JControllerForm +class EhealthportalControllerReferral extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerReferral extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Referrals'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerReferral extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('referral.access', 'com_ehealth_portal'); + $access = $user->authorise('referral.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerReferral extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerReferral extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.referral.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.referral.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.referral.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.referral.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerReferral extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerReferral extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerReferral extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Referral', '', array()); + $model = $this->getModel('Referral', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=referrals' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=referrals' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerReferral extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerReferral extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerReferral extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerReferral extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerReferral extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerReferral extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/referrals.php b/admin/controllers/referrals.php index d814f97..e0ea517 100644 --- a/admin/controllers/referrals.php +++ b/admin/controllers/referrals.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Referrals Controller + * Referrals Admin Controller */ -class Ehealth_portalControllerReferrals extends JControllerAdmin +class EhealthportalControllerReferrals extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerReferrals extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_REFERRALS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_REFERRALS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerReferrals extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Referral', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Referral', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerReferrals extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('referral.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('referral.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerReferrals extends JControllerAdmin $model = $this->getModel('Referrals'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Referrals_'.$date->format('jS_F_Y'),'Referrals exported ('.$date->format('jS F, Y').')','referrals'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Referrals_'.$date->format('jS_F_Y'),'Referrals exported ('.$date->format('jS F, Y').')','referrals'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=referrals', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=referrals', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerReferrals extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('referral.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('referral.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Referrals'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('referral_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'referrals'); $session->set('dataType_VDM_IMPORTINTO', 'referral'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_REFERRALS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_REFERRALS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=referrals', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=referrals', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/site.php b/admin/controllers/site.php index 85d1e09..78b3865 100644 --- a/admin/controllers/site.php +++ b/admin/controllers/site.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage site.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Site Controller + * Site Form Controller */ -class Ehealth_portalControllerSite extends JControllerForm +class EhealthportalControllerSite extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerSite extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Sites'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerSite extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('site.access', 'com_ehealth_portal'); + $access = $user->authorise('site.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerSite extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerSite extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.site.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.site.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.site.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.site.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerSite extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerSite extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerSite extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Site', '', array()); + $model = $this->getModel('Site', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=sites' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=sites' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerSite extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerSite extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerSite extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerSite extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerSite extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerSite extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/sites.php b/admin/controllers/sites.php index 6ef0b9c..36d5cce 100644 --- a/admin/controllers/sites.php +++ b/admin/controllers/sites.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage sites.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Sites Controller + * Sites Admin Controller */ -class Ehealth_portalControllerSites extends JControllerAdmin +class EhealthportalControllerSites extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerSites extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_SITES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_SITES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerSites extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Site', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Site', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerSites extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('site.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('site.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerSites extends JControllerAdmin $model = $this->getModel('Sites'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Sites_'.$date->format('jS_F_Y'),'Sites exported ('.$date->format('jS F, Y').')','sites'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Sites_'.$date->format('jS_F_Y'),'Sites exported ('.$date->format('jS F, Y').')','sites'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=sites', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=sites', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerSites extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('site.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('site.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Sites'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('site_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'sites'); $session->set('dataType_VDM_IMPORTINTO', 'site'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_SITES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_SITES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=sites', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=sites', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/strength.php b/admin/controllers/strength.php index 5ce7462..5397820 100644 --- a/admin/controllers/strength.php +++ b/admin/controllers/strength.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strength.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Strength Controller + * Strength Form Controller */ -class Ehealth_portalControllerStrength extends JControllerForm +class EhealthportalControllerStrength extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerStrength extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Strengths'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerStrength extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('strength.access', 'com_ehealth_portal'); + $access = $user->authorise('strength.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerStrength extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerStrength extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.strength.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.strength.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.strength.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.strength.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerStrength extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerStrength extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerStrength extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Strength', '', array()); + $model = $this->getModel('Strength', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=strengths' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=strengths' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerStrength extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerStrength extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerStrength extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerStrength extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerStrength extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerStrength extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/strengths.php b/admin/controllers/strengths.php index d331f5c..ef5e293 100644 --- a/admin/controllers/strengths.php +++ b/admin/controllers/strengths.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strengths.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Strengths Controller + * Strengths Admin Controller */ -class Ehealth_portalControllerStrengths extends JControllerAdmin +class EhealthportalControllerStrengths extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerStrengths extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_STRENGTHS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_STRENGTHS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerStrengths extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Strength', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Strength', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerStrengths extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('strength.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('strength.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerStrengths extends JControllerAdmin $model = $this->getModel('Strengths'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Strengths_'.$date->format('jS_F_Y'),'Strengths exported ('.$date->format('jS F, Y').')','strengths'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Strengths_'.$date->format('jS_F_Y'),'Strengths exported ('.$date->format('jS F, Y').')','strengths'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=strengths', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=strengths', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerStrengths extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('strength.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('strength.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Strengths'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('strength_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'strengths'); $session->set('dataType_VDM_IMPORTINTO', 'strength'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_STRENGTHS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_STRENGTHS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=strengths', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=strengths', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/test.php b/admin/controllers/test.php index d14337a..092dcd8 100644 --- a/admin/controllers/test.php +++ b/admin/controllers/test.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage test.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Test Controller + * Test Form Controller */ -class Ehealth_portalControllerTest extends JControllerForm +class EhealthportalControllerTest extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerTest extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Tests'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerTest extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('test.access', 'com_ehealth_portal'); + $access = $user->authorise('test.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerTest extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerTest extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.test.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.test.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.test.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.test.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerTest extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerTest extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerTest extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Test', '', array()); + $model = $this->getModel('Test', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=tests' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=tests' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerTest extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerTest extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerTest extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerTest extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerTest extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerTest extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/testing_reason.php b/admin/controllers/testing_reason.php index f61207a..8d7e4d3 100644 --- a/admin/controllers/testing_reason.php +++ b/admin/controllers/testing_reason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Testing_reason Controller + * Testing_reason Form Controller */ -class Ehealth_portalControllerTesting_reason extends JControllerForm +class EhealthportalControllerTesting_reason extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Testing_reasons'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('testing_reason.access', 'com_ehealth_portal'); + $access = $user->authorise('testing_reason.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.testing_reason.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.testing_reason.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.testing_reason.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.testing_reason.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Testing_reason', '', array()); + $model = $this->getModel('Testing_reason', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=testing_reasons' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=testing_reasons' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerTesting_reason extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/testing_reasons.php b/admin/controllers/testing_reasons.php index 470514a..c482a26 100644 --- a/admin/controllers/testing_reasons.php +++ b/admin/controllers/testing_reasons.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reasons.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Testing_reasons Controller + * Testing_reasons Admin Controller */ -class Ehealth_portalControllerTesting_reasons extends JControllerAdmin +class EhealthportalControllerTesting_reasons extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerTesting_reasons extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_TESTING_REASONS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_TESTING_REASONS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerTesting_reasons extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Testing_reason', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Testing_reason', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerTesting_reasons extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('testing_reason.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('testing_reason.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerTesting_reasons extends JControllerAdmin $model = $this->getModel('Testing_reasons'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Testing_reasons_'.$date->format('jS_F_Y'),'Testing reasons exported ('.$date->format('jS F, Y').')','testing reasons'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Testing_reasons_'.$date->format('jS_F_Y'),'Testing reasons exported ('.$date->format('jS F, Y').')','testing reasons'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=testing_reasons', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=testing_reasons', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerTesting_reasons extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('testing_reason.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('testing_reason.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Testing_reasons'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('testing_reason_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'testing_reasons'); $session->set('dataType_VDM_IMPORTINTO', 'testing_reason'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_TESTING_REASONS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_TESTING_REASONS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=testing_reasons', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=testing_reasons', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/tests.php b/admin/controllers/tests.php index 1ab4b35..dbb849a 100644 --- a/admin/controllers/tests.php +++ b/admin/controllers/tests.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tests.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Tests Controller + * Tests Admin Controller */ -class Ehealth_portalControllerTests extends JControllerAdmin +class EhealthportalControllerTests extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerTests extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_TESTS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_TESTS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerTests extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Test', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Test', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerTests extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('test.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('test.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerTests extends JControllerAdmin $model = $this->getModel('Tests'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Tests_'.$date->format('jS_F_Y'),'Tests exported ('.$date->format('jS F, Y').')','tests'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Tests_'.$date->format('jS_F_Y'),'Tests exported ('.$date->format('jS F, Y').')','tests'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=tests', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=tests', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerTests extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('test.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('test.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Tests'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('test_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'tests'); $session->set('dataType_VDM_IMPORTINTO', 'test'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_TESTS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_TESTS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=tests', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=tests', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/tuberculoses.php b/admin/controllers/tuberculoses.php index 139fa44..32791c6 100644 --- a/admin/controllers/tuberculoses.php +++ b/admin/controllers/tuberculoses.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculoses.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Tuberculoses Controller + * Tuberculoses Admin Controller */ -class Ehealth_portalControllerTuberculoses extends JControllerAdmin +class EhealthportalControllerTuberculoses extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerTuberculoses extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_TUBERCULOSES'; + protected $text_prefix = 'COM_EHEALTHPORTAL_TUBERCULOSES'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerTuberculoses extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Tuberculosis', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Tuberculosis', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerTuberculoses extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('tuberculosis.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('tuberculosis.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerTuberculoses extends JControllerAdmin $model = $this->getModel('Tuberculoses'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Tuberculoses_'.$date->format('jS_F_Y'),'Tuberculoses exported ('.$date->format('jS F, Y').')','tuberculoses'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Tuberculoses_'.$date->format('jS_F_Y'),'Tuberculoses exported ('.$date->format('jS F, Y').')','tuberculoses'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=tuberculoses', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=tuberculoses', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerTuberculoses extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('tuberculosis.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('tuberculosis.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Tuberculoses'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('tuberculosis_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'tuberculoses'); $session->set('dataType_VDM_IMPORTINTO', 'tuberculosis'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_TUBERCULOSES'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_TUBERCULOSES'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=tuberculoses', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=tuberculoses', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/tuberculosis.php b/admin/controllers/tuberculosis.php index 594dcc5..0822475 100644 --- a/admin/controllers/tuberculosis.php +++ b/admin/controllers/tuberculosis.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculosis.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Tuberculosis Controller + * Tuberculosis Form Controller */ -class Ehealth_portalControllerTuberculosis extends JControllerForm +class EhealthportalControllerTuberculosis extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Tuberculoses'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('tuberculosis.access', 'com_ehealth_portal'); + $access = $user->authorise('tuberculosis.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.tuberculosis.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.tuberculosis.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.tuberculosis.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.tuberculosis.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Tuberculosis', '', array()); + $model = $this->getModel('Tuberculosis', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=tuberculoses' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=tuberculoses' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerTuberculosis extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/unit.php b/admin/controllers/unit.php index acd12d5..3a8663f 100644 --- a/admin/controllers/unit.php +++ b/admin/controllers/unit.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage unit.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Unit Controller + * Unit Form Controller */ -class Ehealth_portalControllerUnit extends JControllerForm +class EhealthportalControllerUnit extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerUnit extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Units'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerUnit extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('unit.access', 'com_ehealth_portal'); + $access = $user->authorise('unit.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerUnit extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerUnit extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.unit.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.unit.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.unit.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.unit.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerUnit extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerUnit extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerUnit extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Unit', '', array()); + $model = $this->getModel('Unit', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=units' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=units' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerUnit extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerUnit extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerUnit extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerUnit extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerUnit extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerUnit extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/units.php b/admin/controllers/units.php index 9073428..9d009fc 100644 --- a/admin/controllers/units.php +++ b/admin/controllers/units.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage units.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Units Controller + * Units Admin Controller */ -class Ehealth_portalControllerUnits extends JControllerAdmin +class EhealthportalControllerUnits extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerUnits extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_UNITS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_UNITS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerUnits extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Unit', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Unit', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerUnits extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('unit.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('unit.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerUnits extends JControllerAdmin $model = $this->getModel('Units'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Units_'.$date->format('jS_F_Y'),'Units exported ('.$date->format('jS F, Y').')','units'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Units_'.$date->format('jS_F_Y'),'Units exported ('.$date->format('jS F, Y').')','units'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=units', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=units', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerUnits extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('unit.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('unit.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Units'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('unit_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'units'); $session->set('dataType_VDM_IMPORTINTO', 'unit'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_UNITS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_UNITS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=units', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=units', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/controllers/vmmc.php b/admin/controllers/vmmc.php index 1bb80ea..a3bff1c 100644 --- a/admin/controllers/vmmc.php +++ b/admin/controllers/vmmc.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmc.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\FormController; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use Joomla\CMS\Uri\Uri; /** - * Vmmc Controller + * Vmmc Form Controller */ -class Ehealth_portalControllerVmmc extends JControllerForm +class EhealthportalControllerVmmc extends FormController { /** * Current or most recently performed task. @@ -49,13 +56,13 @@ class Ehealth_portalControllerVmmc extends JControllerForm * * @since 1.6 */ - public function __construct($config = array()) + public function __construct($config = []) { $this->view_list = 'Vmmcs'; // safeguard for setting the return view listing to the main view. parent::__construct($config); } - /** + /** * Method override to check if you can add a new record. * * @param array $data An array of input data. @@ -64,18 +71,18 @@ class Ehealth_portalControllerVmmc extends JControllerForm * * @since 1.6 */ - protected function allowAdd($data = array()) + protected function allowAdd($data = []) { // Get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Access check. - $access = $user->authorise('vmmc.access', 'com_ehealth_portal'); + $access = $user->authorise('vmmc.access', 'com_ehealthportal'); if (!$access) { return false; } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::allowAdd($data); } @@ -89,10 +96,10 @@ class Ehealth_portalControllerVmmc extends JControllerForm * * @since 1.6 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // get user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // get record id. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; @@ -100,10 +107,10 @@ class Ehealth_portalControllerVmmc extends JControllerForm if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit', 'com_ehealth_portal.vmmc.' . (int) $recordId); + $permission = $user->authorise('core.edit', 'com_ehealthportal.vmmc.' . (int) $recordId); if (!$permission) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal.vmmc.' . $recordId)) + if ($user->authorise('core.edit.own', 'com_ehealthportal.vmmc.' . $recordId)) { // Now test the owner is the user. $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; @@ -122,7 +129,7 @@ class Ehealth_portalControllerVmmc extends JControllerForm // If the owner matches 'me' then allow. if ($ownerId == $user->id) { - if ($user->authorise('core.edit.own', 'com_ehealth_portal')) + if ($user->authorise('core.edit.own', 'com_ehealthportal')) { return true; } @@ -156,12 +163,12 @@ class Ehealth_portalControllerVmmc extends JControllerForm // set the referral options if ($refid && $ref) - { - $append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append; + { + $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append; } elseif ($ref) { - $append = '&ref='. (string)$ref . $append; + $append = '&ref='. (string) $ref . $append; } return $append; @@ -178,13 +185,13 @@ class Ehealth_portalControllerVmmc extends JControllerForm */ public function batch($model = null) { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); // Set the model - $model = $this->getModel('Vmmc', '', array()); + $model = $this->getModel('Vmmc', '', []); // Preset the redirect - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=vmmcs' . $this->getRedirectToListAppend(), false)); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=vmmcs' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } @@ -209,13 +216,13 @@ class Ehealth_portalControllerVmmc extends JControllerForm $cancel = parent::cancel($key); - if (!is_null($return) && JUri::isInternal(base64_decode($return))) + if (!is_null($return) && Uri::isInternal(base64_decode($return))) { $redirect = base64_decode($return); // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); @@ -226,7 +233,7 @@ class Ehealth_portalControllerVmmc extends JControllerForm // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -237,7 +244,7 @@ class Ehealth_portalControllerVmmc extends JControllerForm // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -263,7 +270,7 @@ class Ehealth_portalControllerVmmc extends JControllerForm // Check if there is a return value $return = $this->input->get('return', null, 'base64'); - $canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return))); + $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return))); if ($this->ref || $this->refid || $canReturn) { @@ -281,29 +288,29 @@ class Ehealth_portalControllerVmmc extends JControllerForm // Redirect to the return value. $this->setRedirect( - JRoute::_( + Route::_( $redirect, false ) ); } elseif ($this->refid && $this->ref) { - $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid; + $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid; // Redirect to the item screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); } elseif ($this->ref) { - $redirect = '&view=' . (string)$this->ref; + $redirect = '&view=' . (string) $this->ref; // Redirect to the list screen. $this->setRedirect( - JRoute::_( + Route::_( 'index.php?option=' . $this->option . $redirect, false ) ); @@ -315,16 +322,15 @@ class Ehealth_portalControllerVmmc extends JControllerForm * Function that allows child controller access to model data * after the data has been saved. * - * @param JModel &$model The data model object. - * @param array $validData The validated data. + * @param BaseDatabaseModel &$model The data model object. + * @param array $validData The validated data. * * @return void * * @since 11.1 */ - protected function postSaveHook(JModelLegacy $model, $validData = array()) + protected function postSaveHook(BaseDatabaseModel $model, $validData = []) { return; } - } diff --git a/admin/controllers/vmmcs.php b/admin/controllers/vmmcs.php index 3b446c3..7ebb18a 100644 --- a/admin/controllers/vmmcs.php +++ b/admin/controllers/vmmcs.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmcs.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,12 +26,19 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Controller\AdminController; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Session\Session; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; /** - * Vmmcs Controller + * Vmmcs Admin Controller */ -class Ehealth_portalControllerVmmcs extends JControllerAdmin +class EhealthportalControllerVmmcs extends AdminController { /** * The prefix to use with controller messages. @@ -39,7 +46,7 @@ class Ehealth_portalControllerVmmcs extends JControllerAdmin * @var string * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL_VMMCS'; + protected $text_prefix = 'COM_EHEALTHPORTAL_VMMCS'; /** * Method to get a model object, loading it if required. @@ -52,7 +59,7 @@ class Ehealth_portalControllerVmmcs extends JControllerAdmin * * @since 1.6 */ - public function getModel($name = 'Vmmc', $prefix = 'Ehealth_portalModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Vmmc', $prefix = 'EhealthportalModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); } @@ -60,13 +67,13 @@ class Ehealth_portalControllerVmmcs extends JControllerAdmin public function exportData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('vmmc.export', 'com_ehealth_portal') && $user->authorise('core.export', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('vmmc.export', 'com_ehealthportal') && $user->authorise('core.export', 'com_ehealthportal')) { // Get the input - $input = JFactory::getApplication()->input; + $input = Factory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input $pks = ArrayHelper::toInteger($pks); @@ -74,16 +81,16 @@ class Ehealth_portalControllerVmmcs extends JControllerAdmin $model = $this->getModel('Vmmcs'); // get the data to export $data = $model->getExportData($pks); - if (Ehealth_portalHelper::checkArray($data)) + if (UtilitiesArrayHelper::check($data)) { // now set the data to the spreadsheet - $date = JFactory::getDate(); - Ehealth_portalHelper::xls($data,'Vmmcs_'.$date->format('jS_F_Y'),'Vmmcs exported ('.$date->format('jS F, Y').')','vmmcs'); + $date = Factory::getDate(); + EhealthportalHelper::xls($data,'Vmmcs_'.$date->format('jS_F_Y'),'Vmmcs exported ('.$date->format('jS F, Y').')','vmmcs'); } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_EXPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=vmmcs', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_EXPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=vmmcs', false), $message, 'error'); return; } @@ -91,32 +98,32 @@ class Ehealth_portalControllerVmmcs extends JControllerAdmin public function importData() { // Check for request forgeries - JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('vmmc.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + $user = Factory::getUser(); + if ($user->authorise('vmmc.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // Get the import model $model = $this->getModel('Vmmcs'); // get the headers to import $headers = $model->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { // Load headers to session. - $session = JFactory::getSession(); + $session = Factory::getSession(); $headers = json_encode($headers); $session->set('vmmc_VDM_IMPORTHEADERS', $headers); $session->set('backto_VDM_IMPORT', 'vmmcs'); $session->set('dataType_VDM_IMPORTINTO', 'vmmc'); // Redirect to import view. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_VMMCS'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=import', false), $message); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_VMMCS'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=import', false), $message); return; } } // Redirect to the list screen with error. - $message = JText::_('COM_EHEALTH_PORTAL_IMPORT_FAILED'); - $this->setRedirect(JRoute::_('index.php?option=com_ehealth_portal&view=vmmcs', false), $message, 'error'); + $message = Text::_('COM_EHEALTHPORTAL_IMPORT_FAILED'); + $this->setRedirect(Route::_('index.php?option=com_ehealthportal&view=vmmcs', false), $message, 'error'); return; } -} +} \ No newline at end of file diff --git a/admin/ehealth_portal.php b/admin/ehealth_portal.php deleted file mode 100644 index a86deee..0000000 --- a/admin/ehealth_portal.php +++ /dev/null @@ -1,53 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -JHtml::_('behavior.tabstate'); - -// Access check. -if (!JFactory::getUser()->authorise('core.manage', 'com_ehealth_portal')) -{ - throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); -}; - -// Add CSS file for all pages -$document = JFactory::getDocument(); -$document->addStyleSheet('components/com_ehealth_portal/assets/css/admin.css'); -$document->addScript('components/com_ehealth_portal/assets/js/admin.js'); - -// require helper files -JLoader::register('Ehealth_portalHelper', __DIR__ . '/helpers/ehealth_portal.php'); -JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php'); - -// Get an instance of the controller prefixed by Ehealth_portal -$controller = JControllerLegacy::getInstance('Ehealth_portal'); - -// Perform the Request task -$controller->execute(JFactory::getApplication()->input->get('task')); - -// Redirect if set by the controller -$controller->redirect(); diff --git a/admin/ehealthportal.php b/admin/ehealthportal.php new file mode 100644 index 0000000..d37b25a --- /dev/null +++ b/admin/ehealthportal.php @@ -0,0 +1,100 @@ + + @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Portal for mobile health clinics + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// register additional namespace +\spl_autoload_register(function ($class) { + // project-specific base directories and namespace prefix + $search = [ + 'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla' + ]; + // Start the search and load if found + $found = false; + $found_base_dir = ""; + $found_len = 0; + foreach ($search as $base_dir => $prefix) + { + // does the class use the namespace prefix? + $len = strlen($prefix); + if (strncmp($prefix, $class, $len) === 0) + { + // we have a match so load the values + $found = true; + $found_base_dir = $base_dir; + $found_len = $len; + // done here + break; + } + } + // check if we found a match + if (!$found) + { + // not found so move to the next registered autoloader + return; + } + // get the relative class name + $relative_class = substr($class, $found_len); + // replace the namespace prefix with the base directory, replace namespace + // separators with directory separators in the relative class name, append + // with .php + $file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php'; + // if the file exists, require it + if (file_exists($file)) + { + require $file; + } +}); + +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Access\Exception\NotAllowed; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\MVC\Controller\BaseController; +use VDM\Joomla\Utilities\StringHelper; + +// Access check. +if (!Factory::getUser()->authorise('core.manage', 'com_ehealthportal')) +{ + throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403); +} + +// Add CSS file for all pages +Html::_('stylesheet', 'components/com_ehealthportal/assets/css/admin.css', ['version' => 'auto']); +Html::_('script', 'components/com_ehealthportal/assets/js/admin.js', ['version' => 'auto']); + +// require helper files +JLoader::register('EhealthportalHelper', __DIR__ . '/helpers/ehealthportal.php'); +JLoader::register('JHtmlBatch_', __DIR__ . '/helpers/html/batch_.php'); + +// Get an instance of the controller prefixed by Ehealthportal +$controller = BaseController::getInstance('Ehealthportal'); + +// Perform the Request task +$controller->execute(Factory::getApplication()->input->get('task')); + +// Redirect if set by the controller +$controller->redirect(); diff --git a/admin/helpers/ehealth_portal.php b/admin/helpers/ehealthportal.php similarity index 53% rename from admin/helpers/ehealth_portal.php rename to admin/helpers/ehealthportal.php index 267e234..81a7999 100644 --- a/admin/helpers/ehealth_portal.php +++ b/admin/helpers/ehealthportal.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal - @subpackage ehealth_portal.php - @author Oh Martin + @subpackage ehealthportal.php + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,34 +26,278 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// register additional namespace +\spl_autoload_register(function ($class) { + // project-specific base directories and namespace prefix + $search = [ + 'libraries/jcb_powers/VDM.Joomla' => 'VDM\\Joomla' + ]; + // Start the search and load if found + $found = false; + $found_base_dir = ""; + $found_len = 0; + foreach ($search as $base_dir => $prefix) + { + // does the class use the namespace prefix? + $len = strlen($prefix); + if (strncmp($prefix, $class, $len) === 0) + { + // we have a match so load the values + $found = true; + $found_base_dir = $base_dir; + $found_len = $len; + // done here + break; + } + } + // check if we found a match + if (!$found) + { + // not found so move to the next registered autoloader + return; + } + // get the relative class name + $relative_class = substr($class, $found_len); + // replace the namespace prefix with the base directory, replace namespace + // separators with directory separators in the relative class name, append + // with .php + $file = JPATH_ROOT . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php'; + // if the file exists, require it + if (file_exists($file)) + { + require $file; + } +}); + +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Access\Access; +use Joomla\CMS\Access\Rules as AccessRules; +use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Language\Language; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; +use Joomla\CMS\Object\CMSObject; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Version; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; +use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\GetHelper; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Componentbuilder\Utilities\FormHelper; /** - * Ehealth_portal component helper. + * Ehealthportal component helper. */ -abstract class Ehealth_portalHelper +abstract class EhealthportalHelper { /** * Composer Switch - * + * * @var array */ - protected static $composer = array(); + protected static $composer = []; /** * The Main Active Language - * + * * @var string */ public static $langTag; + /** + * set the user GUID and return it as well + * + * @param int $id + * + * @return string + */ + public static function setUserGUID($user, $default = 0) + { + if ($user > 0) + { + if (($guid = self::getVar('user_map', $user, 'id', 'guid')) !== false) + { + return $guid; + } + // Set the GUID if empty or not valid + while (!self::validGUID($guid, "user_map")) + { + // must always be set + $guid = (string) self::GUID(); + } + // store the GUID + $map = new stdClass(); + $map->id = $user; + $map->guid = $guid; + // store to the database + if (JFactory::getDbo()->insertObject('#__ehealthportal_user_map', $map)) + { + return $guid; + } + } + return $default; + } + + /** + * Returns a GUIDv4 string + * + * Thanks to Dave Pearson (and other) + * https://www.php.net/manual/en/function.com-create-guid.php#119168 + * + * Uses the best cryptographically secure method + * for all supported platforms with fallback to an older, + * less secure version. + * + * @param bool $trim + * @return string + */ + public static function GUID ($trim = true) + { + // Windows + if (function_exists('com_create_guid') === true) + { + if ($trim === true) + { + return trim(com_create_guid(), '{}'); + } + return com_create_guid(); + } + + // set the braces if needed + $lbrace = $trim ? "" : chr(123); // "{" + $rbrace = $trim ? "" : chr(125); // "}" + + // OSX/Linux + if (function_exists('openssl_random_pseudo_bytes') === true) + { + $data = openssl_random_pseudo_bytes(16); + $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100 + $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 + return $lbrace . vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)) . $lbrace; + } + + // Fallback (PHP 4.2+) + mt_srand((double)microtime() * 10000); + $charid = strtolower(md5(uniqid(rand(), true))); + $hyphen = chr(45); // "-" + $guidv4 = $lbrace. + substr($charid, 0, 8).$hyphen. + substr($charid, 8, 4).$hyphen. + substr($charid, 12, 4).$hyphen. + substr($charid, 16, 4).$hyphen. + substr($charid, 20, 12). + $rbrace; + return $guidv4; + } + + /** + * Validate the Globally Unique Identifier ( and check if table already has this identifier) + * + * @param string $guid + * @param string $table + * @param int $id + * @return bool + */ + public static function validGUID ($guid, $table = null, $id = 0) + { + // check if we have a string + if (self::validateGUID($guid)) + { + // check if table already has this identifier + if (self::checkString($table)) + { + // Get the database object and a new query object. + $db = \JFactory::getDbo(); + $query = $db->getQuery(true); + $query->select('COUNT(*)') + ->from('#__ehealthportal_' . (string) $table) + ->where($db->quoteName('guid') . ' = ' . $db->quote($guid)); + + // remove this item from the list + if ($id > 0) + { + $query->where($db->quoteName('id') . ' <> ' . (int) $id); + } + + // Set and query the database. + $db->setQuery($query); + $duplicate = (bool) $db->loadResult(); + + if ($duplicate) + { + return false; + } + } + return true; + } + return false; + } + + /** + * get the ID of a GUID + * + * @param string $guid + * @param string $table + * + * @return int + */ + public static function getGUIDID ($guid, $table, $default = false) + { + // check if we have a string + if (self::validateGUID($guid)) + { + // check if table already has this identifier + if (self::checkString($table)) + { + // Get the database object and a new query object. + $db = \JFactory::getDbo(); + $query = $db->getQuery(true); + $query->select('id') + ->from('#__ehealthportal_' . (string) $table) + ->where($db->quoteName('guid') . ' = ' . $db->quote($guid)); + + // Set and query the database. + $db->setQuery($query); + $db->execute(); + + if ($db->getNumRows()) + { + return $db->loadResult(); + } + } + } + return $default; + } + + /** + * Validate the Globally Unique Identifier + * + * Thanks to Lewie + * https://stackoverflow.com/a/1515456/1429677 + * + * @param string $guid + * @return bool + */ + protected static function validateGUID ($guid) + { + // check if we have a string + if (self::checkString($guid)) + { + return preg_match("/^(\{)?[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}(?(1)\})$/i", $guid); + } + return false; + } + + /** * Load the Composer Vendors */ @@ -63,7 +307,7 @@ abstract class Ehealth_portalHelper if (!isset(self::$composer[$target])) { // get the function name - $functionName = self::safeString('compose' . $target); + $functionName = UtilitiesStringHelper::safe('compose' . $target); // check if method exist if (method_exists(__CLASS__, $functionName)) { @@ -79,13 +323,13 @@ abstract class Ehealth_portalHelper */ public static function manifest() { - $manifestUrl = JPATH_ADMINISTRATOR."/components/com_ehealth_portal/ehealth_portal.xml"; + $manifestUrl = JPATH_ADMINISTRATOR."/components/com_ehealthportal/ehealthportal.xml"; return simplexml_load_file($manifestUrl); } /** * Joomla version object - */ + */ protected static $JVersion; /** @@ -94,9 +338,9 @@ abstract class Ehealth_portalHelper public static function jVersion() { // check if set - if (!self::checkObject(self::$JVersion)) + if (!ObjectHelper::check(self::$JVersion)) { - self::$JVersion = new JVersion(); + self::$JVersion = new Version(); } return self::$JVersion; } @@ -107,18 +351,18 @@ abstract class Ehealth_portalHelper public static function getContributors() { // get params - $params = JComponentHelper::getParams('com_ehealth_portal'); + $params = ComponentHelper::getParams('com_ehealthportal'); // start contributors array - $contributors = array(); + $contributors = []; // get all Contributors (max 20) $searchArray = range('0','20'); foreach($searchArray as $nr) - { + { if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 1 || $params->get("showContributor".$nr) == 3)) { // set link based of selected option if($params->get("useContributor".$nr) == 1) - { + { $link_front = ''; $link_back = ''; } @@ -132,8 +376,8 @@ abstract class Ehealth_portalHelper $link_front = ''; $link_back = ''; } - $contributors[$nr]['title'] = self::htmlEscape($params->get("titleContributor".$nr)); - $contributors[$nr]['name'] = $link_front.self::htmlEscape($params->get("nameContributor".$nr)).$link_back; + $contributors[$nr]['title'] = UtilitiesStringHelper::html($params->get("titleContributor".$nr)); + $contributors[$nr]['name'] = $link_front.UtilitiesStringHelper::html($params->get("nameContributor".$nr)).$link_back; } } return $contributors; @@ -153,88 +397,92 @@ abstract class Ehealth_portalHelper public static function addSubmenu($submenu) { // load user for access menus - $user = JFactory::getUser(); + $user = Factory::getUser(); // load the submenus to sidebar - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_DASHBOARD'), 'index.php?option=com_ehealth_portal&view=ehealth_portal', $submenu === 'ehealth_portal'); - if ($user->authorise('payment.access', 'com_ehealth_portal') && $user->authorise('payment.submenu', 'com_ehealth_portal')) + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_DASHBOARD'), 'index.php?option=com_ehealthportal&view=ehealthportal', $submenu === 'ehealthportal'); + if ($user->authorise('payment.access', 'com_ehealthportal') && $user->authorise('payment.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_PAYMENTS'), 'index.php?option=com_ehealth_portal&view=payments', $submenu === 'payments'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_PAYMENTS'), 'index.php?option=com_ehealthportal&view=payments', $submenu === 'payments'); } - if ($user->authorise('general_medical_check_up.access', 'com_ehealth_portal') && $user->authorise('general_medical_check_up.submenu', 'com_ehealth_portal')) + if ($user->authorise('general_medical_check_up.access', 'com_ehealthportal') && $user->authorise('general_medical_check_up.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_GENERAL_MEDICAL_CHECK_UPS'), 'index.php?option=com_ehealth_portal&view=general_medical_check_ups', $submenu === 'general_medical_check_ups'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_GENERAL_MEDICAL_CHECK_UPS'), 'index.php?option=com_ehealthportal&view=general_medical_check_ups', $submenu === 'general_medical_check_ups'); } - if ($user->authorise('antenatal_care.access', 'com_ehealth_portal') && $user->authorise('antenatal_care.submenu', 'com_ehealth_portal')) + if ($user->authorise('antenatal_care.access', 'com_ehealthportal') && $user->authorise('antenatal_care.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_ANTENATAL_CARES'), 'index.php?option=com_ehealth_portal&view=antenatal_cares', $submenu === 'antenatal_cares'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_ANTENATAL_CARES'), 'index.php?option=com_ehealthportal&view=antenatal_cares', $submenu === 'antenatal_cares'); } - if ($user->authorise('immunisation.access', 'com_ehealth_portal') && $user->authorise('immunisation.submenu', 'com_ehealth_portal')) + if ($user->authorise('immunisation.access', 'com_ehealthportal') && $user->authorise('immunisation.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_IMMUNISATIONS'), 'index.php?option=com_ehealth_portal&view=immunisations', $submenu === 'immunisations'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_IMMUNISATIONS'), 'index.php?option=com_ehealthportal&view=immunisations', $submenu === 'immunisations'); } - if ($user->authorise('vmmc.access', 'com_ehealth_portal') && $user->authorise('vmmc.submenu', 'com_ehealth_portal')) + if ($user->authorise('vmmc.access', 'com_ehealthportal') && $user->authorise('vmmc.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_VMMCS'), 'index.php?option=com_ehealth_portal&view=vmmcs', $submenu === 'vmmcs'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_VMMCS'), 'index.php?option=com_ehealthportal&view=vmmcs', $submenu === 'vmmcs'); } - if ($user->authorise('prostate_and_testicular_cancer.access', 'com_ehealth_portal') && $user->authorise('prostate_and_testicular_cancer.submenu', 'com_ehealth_portal')) + if ($user->authorise('prostate_and_testicular_cancer.access', 'com_ehealthportal') && $user->authorise('prostate_and_testicular_cancer.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_PROSTATE_AND_TESTICULAR_CANCERS'), 'index.php?option=com_ehealth_portal&view=prostate_and_testicular_cancers', $submenu === 'prostate_and_testicular_cancers'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_PROSTATE_AND_TESTICULAR_CANCERS'), 'index.php?option=com_ehealthportal&view=prostate_and_testicular_cancers', $submenu === 'prostate_and_testicular_cancers'); } - if ($user->authorise('tuberculosis.access', 'com_ehealth_portal') && $user->authorise('tuberculosis.submenu', 'com_ehealth_portal')) + if ($user->authorise('tuberculosis.access', 'com_ehealthportal') && $user->authorise('tuberculosis.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_TUBERCULOSES'), 'index.php?option=com_ehealth_portal&view=tuberculoses', $submenu === 'tuberculoses'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_TUBERCULOSES'), 'index.php?option=com_ehealthportal&view=tuberculoses', $submenu === 'tuberculoses'); } - if ($user->authorise('hiv_counseling_and_testing.access', 'com_ehealth_portal') && $user->authorise('hiv_counseling_and_testing.submenu', 'com_ehealth_portal')) + if ($user->authorise('hiv_counseling_and_testing.access', 'com_ehealthportal') && $user->authorise('hiv_counseling_and_testing.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_HIV_COUNSELINGS_AND_TESTINGS'), 'index.php?option=com_ehealth_portal&view=hiv_counselings_and_testings', $submenu === 'hiv_counselings_and_testings'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_HIV_COUNSELINGS_AND_TESTINGS'), 'index.php?option=com_ehealthportal&view=hiv_counselings_and_testings', $submenu === 'hiv_counselings_and_testings'); } - if ($user->authorise('family_planning.access', 'com_ehealth_portal') && $user->authorise('family_planning.submenu', 'com_ehealth_portal')) + if ($user->authorise('family_planning.access', 'com_ehealthportal') && $user->authorise('family_planning.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_FAMILY_PLANNINGS'), 'index.php?option=com_ehealth_portal&view=family_plannings', $submenu === 'family_plannings'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_FAMILY_PLANNINGS'), 'index.php?option=com_ehealthportal&view=family_plannings', $submenu === 'family_plannings'); } - if ($user->authorise('health_education.access', 'com_ehealth_portal') && $user->authorise('health_education.submenu', 'com_ehealth_portal')) + if ($user->authorise('health_education.access', 'com_ehealthportal') && $user->authorise('health_education.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_HEALTH_EDUCATIONS'), 'index.php?option=com_ehealth_portal&view=health_educations', $submenu === 'health_educations'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_HEALTH_EDUCATIONS'), 'index.php?option=com_ehealthportal&view=health_educations', $submenu === 'health_educations'); } - if ($user->authorise('cervical_cancer.access', 'com_ehealth_portal') && $user->authorise('cervical_cancer.submenu', 'com_ehealth_portal')) + if ($user->authorise('cervical_cancer.access', 'com_ehealthportal') && $user->authorise('cervical_cancer.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_CERVICAL_CANCERS'), 'index.php?option=com_ehealth_portal&view=cervical_cancers', $submenu === 'cervical_cancers'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_CERVICAL_CANCERS'), 'index.php?option=com_ehealthportal&view=cervical_cancers', $submenu === 'cervical_cancers'); } - if ($user->authorise('breast_cancer.access', 'com_ehealth_portal') && $user->authorise('breast_cancer.submenu', 'com_ehealth_portal')) + if ($user->authorise('breast_cancer.access', 'com_ehealthportal') && $user->authorise('breast_cancer.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_BREAST_CANCERS'), 'index.php?option=com_ehealth_portal&view=breast_cancers', $submenu === 'breast_cancers'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_BREAST_CANCERS'), 'index.php?option=com_ehealthportal&view=breast_cancers', $submenu === 'breast_cancers'); } - if ($user->authorise('test.access', 'com_ehealth_portal') && $user->authorise('test.submenu', 'com_ehealth_portal')) + if ($user->authorise('test.access', 'com_ehealthportal') && $user->authorise('test.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_TESTS'), 'index.php?option=com_ehealth_portal&view=tests', $submenu === 'tests'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_TESTS'), 'index.php?option=com_ehealthportal&view=tests', $submenu === 'tests'); } - if ($user->authorise('immunisation_vaccine_type.access', 'com_ehealth_portal') && $user->authorise('immunisation_vaccine_type.submenu', 'com_ehealth_portal')) + if ($user->authorise('immunisation_vaccine_type.access', 'com_ehealthportal') && $user->authorise('immunisation_vaccine_type.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_IMMUNISATION_VACCINE_TYPES'), 'index.php?option=com_ehealth_portal&view=immunisation_vaccine_types', $submenu === 'immunisation_vaccine_types'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_IMMUNISATION_VACCINE_TYPES'), 'index.php?option=com_ehealthportal&view=immunisation_vaccine_types', $submenu === 'immunisation_vaccine_types'); } - if ($user->authorise('unit.access', 'com_ehealth_portal') && $user->authorise('unit.submenu', 'com_ehealth_portal')) + if ($user->authorise('immunisation_type.access', 'com_ehealthportal') && $user->authorise('immunisation_type.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_UNITS'), 'index.php?option=com_ehealth_portal&view=units', $submenu === 'units'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_IMMUNISATION_TYPES'), 'index.php?option=com_ehealthportal&view=immunisation_types', $submenu === 'immunisation_types'); } - if ($user->authorise('referral.access', 'com_ehealth_portal') && $user->authorise('referral.submenu', 'com_ehealth_portal')) + if ($user->authorise('strength.access', 'com_ehealthportal') && $user->authorise('strength.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_REFERRALS'), 'index.php?option=com_ehealth_portal&view=referrals', $submenu === 'referrals'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_STRENGTHS'), 'index.php?option=com_ehealthportal&view=strengths', $submenu === 'strengths'); } - if ($user->authorise('medication.access', 'com_ehealth_portal') && $user->authorise('medication.submenu', 'com_ehealth_portal')) + if ($user->authorise('referral.access', 'com_ehealthportal') && $user->authorise('referral.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_MEDICATIONS'), 'index.php?option=com_ehealth_portal&view=medications', $submenu === 'medications'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_REFERRALS'), 'index.php?option=com_ehealthportal&view=referrals', $submenu === 'referrals'); } - if ($user->authorise('administration_part.access', 'com_ehealth_portal') && $user->authorise('administration_part.submenu', 'com_ehealth_portal')) + if ($user->authorise('medication.access', 'com_ehealthportal') && $user->authorise('medication.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_ADMINISTRATION_PARTS'), 'index.php?option=com_ehealth_portal&view=administration_parts', $submenu === 'administration_parts'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_MEDICATIONS'), 'index.php?option=com_ehealthportal&view=medications', $submenu === 'medications'); } - if ($user->authorise('strength.access', 'com_ehealth_portal') && $user->authorise('strength.submenu', 'com_ehealth_portal')) + if ($user->authorise('administration_part.access', 'com_ehealthportal') && $user->authorise('administration_part.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_STRENGTHS'), 'index.php?option=com_ehealth_portal&view=strengths', $submenu === 'strengths'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_ADMINISTRATION_PARTS'), 'index.php?option=com_ehealthportal&view=administration_parts', $submenu === 'administration_parts'); } - if ($user->authorise('patient_queue.access', 'com_ehealth_portal') && $user->authorise('patient_queue.submenu', 'com_ehealth_portal')) + if ($user->authorise('unit.access', 'com_ehealthportal') && $user->authorise('unit.submenu', 'com_ehealthportal')) { - JHtmlSidebar::addEntry(JText::_('COM_EHEALTH_PORTAL_SUBMENU_PATIENT_QUEUE'), 'index.php?option=com_ehealth_portal&view=patient_queue', $submenu === 'patient_queue'); + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_UNITS'), 'index.php?option=com_ehealthportal&view=units', $submenu === 'units'); + } + if ($user->authorise('patient_queue.access', 'com_ehealthportal') && $user->authorise('patient_queue.submenu', 'com_ehealthportal')) + { + JHtmlSidebar::addEntry(Text::_('COM_EHEALTHPORTAL_SUBMENU_PATIENT_QUEUE'), 'index.php?option=com_ehealthportal&view=patient_queue', $submenu === 'patient_queue'); } } @@ -244,11 +492,11 @@ abstract class Ehealth_portalHelper public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Vast Development Method', $description = null, $category = null,$keywords = null, $modified = null) { // set the user - $user = JFactory::getUser(); + $user = Factory::getUser(); // set fileName if not set if (!$fileName) { - $fileName = 'exported_'.JFactory::getDate()->format('jS_F_Y'); + $fileName = 'exported_'.Factory::getDate()->format('jS_F_Y'); } // set modified if not set if (!$modified) @@ -403,7 +651,7 @@ abstract class Ehealth_portalHelper // make sure we have the composer classes loaded self::composerAutoload('phpspreadsheet'); // get session object - $session = JFactory::getSession(); + $session = Factory::getSession(); $package = $session->get('package', null); $package = json_decode($package, true); // set the headers @@ -420,7 +668,7 @@ abstract class Ehealth_portalHelper $excelReader->setReadDataOnly(true); // load the rows (only first three) $excelObj = $excelReader->load($package['dir']); - $headers = array(); + $headers = []; foreach ($excelObj->getActiveSheet()->getRowIterator() as $row) { if($row->getRowIndex() == 1) @@ -458,7 +706,7 @@ abstract class Ehealth_portalHelper } /** - * Get a Variable + * Get a Variable * * @param string $table The table from which to get the variable * @param string $where The value where @@ -468,46 +716,18 @@ abstract class Ehealth_portalHelper * @param string $main The component in which the table is found * * @return mix string/int/float - * + * @deprecated 3.3 Use GetHelper::var(...); */ - public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'ehealth_portal') + public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'ehealthportal') { - if(!$where) - { - $where = JFactory::getUser()->id; - } - // Get a db connection. - $db = JFactory::getDbo(); - // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName(array($what))); - if (empty($table)) - { - $query->from($db->quoteName('#__'.$main)); - } - else - { - $query->from($db->quoteName('#__'.$main.'_'.$table)); - } - if (is_numeric($where)) - { - $query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where); - } - elseif (is_string($where)) - { - $query->where($db->quoteName($whereString) . ' '.$operator.' '. $db->quote((string)$where)); - } - else - { - return false; - } - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - return $db->loadResult(); - } - return false; + return GetHelper::var( + $table, + $where, + $whereString, + $what, + $operator, + $main + ); } /** @@ -522,110 +742,38 @@ abstract class Ehealth_portalHelper * @param bool $unique The switch to return a unique array * * @return array - * + * @deprecated 3.3 Use GetHelper::vars(...); */ - public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'ehealth_portal', $unique = true) + public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'ehealthportal', $unique = true) { - if(!$where) - { - $where = JFactory::getUser()->id; - } - - if (!self::checkArray($where) && $where > 0) - { - $where = array($where); - } - - if (self::checkArray($where)) - { - // prep main <-- why? well if $main='' is empty then $table can be categories or users - if (self::checkString($main)) - { - $main = '_'.ltrim($main, '_'); - } - // Get a db connection. - $db = JFactory::getDbo(); - // Create a new query object. - $query = $db->getQuery(true); - - $query->select($db->quoteName(array($what))); - if (empty($table)) - { - $query->from($db->quoteName('#__'.$main)); - } - else - { - $query->from($db->quoteName('#_'.$main.'_'.$table)); - } - // add strings to array search - if ('IN_STRINGS' === $operator || 'NOT IN_STRINGS' === $operator) - { - $query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","',$where) . '")'); - } - else - { - $query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',',$where) . ')'); - } - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - if ($unique) - { - return array_unique($db->loadColumn()); - } - return $db->loadColumn(); - } - } - return false; + return GetHelper::vars( + $table, + $where, + $whereString, + $what, + $operator, + $main, + $unique + ); } + /** + * Convert a json object to a string + * + * @input string $value The json string to convert + * + * @returns a string + * @deprecated 3.3 Use JsonHelper::string(...); + */ public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name') { - // do some table foot work - $external = false; - if (strpos($table, '#__') !== false) - { - $external = true; - $table = str_replace('#__', '', $table); - } - // check if string is JSON - $result = json_decode($value, true); - if (json_last_error() === JSON_ERROR_NONE) - { - // is JSON - if (self::checkArray($result)) - { - if (self::checkString($table)) - { - $names = array(); - foreach ($result as $val) - { - if ($external) - { - if ($_name = self::getVar(null, $val, $id, $name, '=', $table)) - { - $names[] = $_name; - } - } - else - { - if ($_name = self::getVar($table, $val, $id, $name)) - { - $names[] = $_name; - } - } - } - if (self::checkArray($names)) - { - return (string) implode($sperator,$names); - } - } - return (string) implode($sperator,$result); - } - return (string) json_decode($value); - } - return $value; + return JsonHelper::string( + $value, + $sperator, + $table, + $id, + $name + ); } public static function isPublished($id,$type) @@ -634,10 +782,10 @@ abstract class Ehealth_portalHelper { $type = 'item'; } - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select(array('a.published')); - $query->from('#__ehealth_portal_'.$type.' AS a'); + $query->from('#__ehealthportal_'.$type.' AS a'); $query->where('a.id = '. (int) $id); $query->where('a.published = 1'); $db->setQuery($query); @@ -652,7 +800,7 @@ abstract class Ehealth_portalHelper public static function getGroupName($id) { - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select(array('a.title')); $query->from('#__usergroups AS a'); @@ -661,7 +809,7 @@ abstract class Ehealth_portalHelper $db->execute(); $found = $db->getNumRows(); if($found) - { + { return $db->loadResult(); } return $id; @@ -677,39 +825,39 @@ abstract class Ehealth_portalHelper * @param string $component The target component * @param object $user The user whose permissions we are loading * - * @return object The JObject of permission/authorised actions - * + * @return object The CMSObject of permission/authorised actions + * */ - public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'ehealth_portal', $user = 'null') + public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'ehealthportal', $user = 'null') { // load the user if not given - if (!self::checkObject($user)) + if (!ObjectHelper::check($user)) { // get the user object - $user = JFactory::getUser(); + $user = Factory::getUser(); } - // load the JObject - $result = new JObject; + // load the CMSObject + $result = new CMSObject; // make view name safe (just incase) - $view = self::safeString($view); - if (self::checkString($views)) + $view = UtilitiesStringHelper::safe($view); + if (UtilitiesStringHelper::check($views)) { - $views = self::safeString($views); - } + $views = UtilitiesStringHelper::safe($views); + } // get all actions from component - $actions = JAccess::getActionsFromFile( + $actions = Access::getActionsFromFile( JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml', "/access/section[@name='component']/" ); - // if non found then return empty JObject + // if non found then return empty CMSObject if (empty($actions)) { return $result; } // get created by if not found - if (self::checkObject($record) && !isset($record->created_by) && isset($record->id)) + if (ObjectHelper::check($record) && !isset($record->created_by) && isset($record->id)) { - $record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component); + $record->created_by = GetHelper::var($view, $record->id, 'id', 'created_by', '=', $component); } // set actions only set in component settings $componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export'); @@ -718,12 +866,12 @@ abstract class Ehealth_portalHelper if ($target) { // convert to an array - if (self::checkString($target)) + if (UtilitiesStringHelper::check($target)) { $target = array($target); } // check if we are good to go - if (self::checkArray($target)) + if (UtilitiesArrayHelper::check($target)) { $checkTarget = true; } @@ -744,7 +892,7 @@ abstract class Ehealth_portalHelper // set area $area = 'comp'; // check if the record has an ID and the action is item related (not a component action) - if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name, $componentActions) && + if (ObjectHelper::check($record) && isset($record->id) && $record->id > 0 && !in_array($action->name, $componentActions) && (strpos($action->name, 'core.') !== false || strpos($action->name, $view . '.') !== false)) { // we are in item @@ -777,7 +925,7 @@ abstract class Ehealth_portalHelper } } } - elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0) + elseif (UtilitiesStringHelper::check($views) && isset($record->catid) && $record->catid > 0) { // we are in item $area = 'category'; @@ -849,7 +997,7 @@ abstract class Ehealth_portalHelper * @param array $targets The array of target actions * * @return boolean true if action should be filtered out - * + * */ protected static function filterActions(&$view, &$action, &$targets) { @@ -868,22 +1016,22 @@ abstract class Ehealth_portalHelper /** * Get any component's model */ - public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Ehealth_portal', $config = array()) + public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Ehealthportal', $config = []) { // fix the name - $name = self::safeString($name); + $name = UtilitiesStringHelper::safe($name); // full path to models $fullPathModels = $path . '/models'; // load the model file - JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model'); + BaseDatabaseModel::addIncludePath($fullPathModels, $Component . 'Model'); // make sure the table path is loaded - if (!isset($config['table_path']) || !self::checkString($config['table_path'])) + if (!isset($config['table_path']) || !UtilitiesStringHelper::check($config['table_path'])) { // This is the JCB default path to tables in Joomla 3.x $config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables'; } // get instance - $model = JModelLegacy::getInstance($name, $Component . 'Model', $config); + $model = BaseDatabaseModel::getInstance($name, $Component . 'Model', $config); // if model not found (strange) if ($model == false) { @@ -918,14 +1066,14 @@ abstract class Ehealth_portalHelper */ public static function setAsset($id, $table, $inherit = true) { - $parent = JTable::getInstance('Asset'); - $parent->loadByName('com_ehealth_portal'); - + $parent = Table::getInstance('Asset'); + $parent->loadByName('com_ehealthportal'); + $parentId = $parent->id; - $name = 'com_ehealth_portal.'.$table.'.'.$id; + $name = 'com_ehealthportal.'.$table.'.'.$id; $title = ''; - $asset = JTable::getInstance('Asset'); + $asset = Table::getInstance('Asset'); $asset->loadByName($name); // Check for an error. @@ -948,15 +1096,15 @@ abstract class Ehealth_portalHelper $asset->name = $name; $asset->title = $title; // get the default asset rules - $rules = self::getDefaultAssetRules('com_ehealth_portal', $table, $inherit); - if ($rules instanceof JAccessRules) + $rules = self::getDefaultAssetRules('com_ehealthportal', $table, $inherit); + if ($rules instanceof AccessRules) { $asset->rules = (string) $rules; } if (!$asset->check() || !$asset->store()) { - JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning'); + Factory::getApplication()->enqueueMessage($asset->getError(), 'warning'); return false; } else @@ -969,7 +1117,7 @@ abstract class Ehealth_portalHelper $object->asset_id = (int) $asset->id; // Update their asset_id to link to the asset table. - return JFactory::getDbo()->updateObject('#__ehealth_portal_'.$table, $object, 'id'); + return Factory::getDbo()->updateObject('#__ehealthportal_'.$table, $object, 'id'); } } return false; @@ -986,7 +1134,7 @@ abstract class Ehealth_portalHelper if (!$inherit) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -1001,8 +1149,8 @@ abstract class Ehealth_portalHelper } } // get asset rules - $result = JAccess::getAssetRules($assetId); - if ($result instanceof JAccessRules) + $result = Access::getAssetRules($assetId); + if ($result instanceof AccessRules) { $_result = (string) $result; $_result = json_decode($_result); @@ -1017,7 +1165,7 @@ abstract class Ehealth_portalHelper elseif ($inherit) { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -1025,8 +1173,8 @@ abstract class Ehealth_portalHelper { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules($_result); + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules($_result); // return filtered rules return $rules; } @@ -1040,35 +1188,12 @@ abstract class Ehealth_portalHelper * @param SimpleXMLElement $xml The XML element reference in which to inject a comment * @param mixed $node A SimpleXMLElement node to append to the XML element reference, or a stdClass object containing a comment attribute to be injected before the XML node and a fieldXML attribute containing a SimpleXMLElement * - * @return null - * + * @return void + * @deprecated 3.3 Use FormHelper::append($xml, $node); */ public static function xmlAppend(&$xml, $node) { - if (!$node) - { - // element was not returned - return; - } - switch (get_class($node)) - { - case 'stdClass': - if (property_exists($node, 'comment')) - { - self::xmlComment($xml, $node->comment); - } - if (property_exists($node, 'fieldXML')) - { - self::xmlAppend($xml, $node->fieldXML); - } - break; - case 'SimpleXMLElement': - $domXML = dom_import_simplexml($xml); - $domNode = dom_import_simplexml($node); - $domXML->appendChild($domXML->ownerDocument->importNode($domNode, true)); - $xml = simplexml_import_dom($domXML); - break; - } + FormHelper::append($xml, $node); } /** @@ -1077,16 +1202,12 @@ abstract class Ehealth_portalHelper * @param SimpleXMLElement $xml The XML element reference in which to inject a comment * @param string $comment The comment to inject * - * @return null - * + * @return void + * @deprecated 3.3 Use FormHelper::comment($xml, $comment); */ public static function xmlComment(&$xml, $comment) { - $domXML = dom_import_simplexml($xml); - $domComment = new DOMComment($comment); - $nodeTarget = $domXML->ownerDocument->importNode($domComment, true); - $domXML->appendChild($nodeTarget); - $xml = simplexml_import_dom($domXML); + FormHelper::comment($xml, $comment); } /** @@ -1096,14 +1217,11 @@ abstract class Ehealth_portalHelper * @param array $attributes The attributes to apply to the XML element * * @return null - * + * @deprecated 3.3 Use FormHelper::attributes($xml, $attributes); */ - public static function xmlAddAttributes(&$xml, $attributes = array()) + public static function xmlAddAttributes(&$xml, $attributes = []) { - foreach ($attributes as $key => $value) - { - $xml->addAttribute($key, $value); - } + FormHelper::attributes($xml, $attributes); } /** @@ -1113,16 +1231,11 @@ abstract class Ehealth_portalHelper * @param array $options The options to apply to the XML element * * @return void - * + * @deprecated 3.3 Use FormHelper::options($xml, $options); */ - public static function xmlAddOptions(&$xml, $options = array()) + public static function xmlAddOptions(&$xml, $options = []) { - foreach ($options as $key => $value) - { - $addOption = $xml->addChild('option'); - $addOption->addAttribute('value', $key); - $addOption[] = $value; - } + FormHelper::options($xml, $options); } /** @@ -1133,28 +1246,11 @@ abstract class Ehealth_portalHelper * @param array $options The options to apply to the XML element * * @return object - * + * @deprecated 3.3 Use FormHelper::field($attributes, $default, $options); */ public static function getFieldObject(&$attributes, $default = '', $options = null) { - // make sure we have attributes and a type value - if (self::checkArray($attributes) && isset($attributes['type'])) - { - // make sure the form helper class is loaded - if (!method_exists('JFormHelper', 'loadFieldType')) - { - jimport('joomla.form.form'); - } - // get field type - $field = JFormHelper::loadFieldType($attributes['type'], true); - // get field xml - $XML = self::getFieldXML($attributes, $options); - // setup the field - $field->setup($XML, $default); - // return the field object - return $field; - } - return false; + return FormHelper::field($attributes, $default, $options); } /** @@ -1164,27 +1260,11 @@ abstract class Ehealth_portalHelper * @param array $options The options to apply to the XML element * * @return object - * + * @deprecated 3.3 Use FormHelper::xml($attributes, $options); */ public static function getFieldXML(&$attributes, $options = null) { - // make sure we have attributes and a type value - if (self::checkArray($attributes)) - { - // start field xml - $XML = new SimpleXMLElement(''); - // load the attributes - self::xmlAddAttributes($XML, $attributes); - // check if we have options - if (self::checkArray($options)) - { - // load the options - self::xmlAddOptions($XML, $options); - } - // return the field xml - return $XML; - } - return false; + return FormHelper::xml($attributes, $options); } /** @@ -1208,94 +1288,69 @@ abstract class Ehealth_portalHelper // button attributes $buttonAttributes = array( 'type' => 'radio', - 'name' => isset($args[0]) ? self::htmlEscape($args[0]) : 'bool_button', - 'label' => isset($args[0]) ? self::safeString(self::htmlEscape($args[0]), 'Ww') : 'Bool Button', // not seen anyway + 'name' => isset($args[0]) ? UtilitiesStringHelper::html($args[0]) : 'bool_button', + 'label' => isset($args[0]) ? UtilitiesStringHelper::safe(UtilitiesStringHelper::html($args[0]), 'Ww') : 'Bool Button', // not seen anyway 'class' => 'btn-group', 'filter' => 'INT', 'default' => isset($args[2]) ? (int) $args[2] : 0); // set the button options $buttonOptions = array( - '1' => isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES', - '0' => isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'); + '1' => isset($args[3]) ? UtilitiesStringHelper::html($args[3]) : 'JYES', + '0' => isset($args[4]) ? UtilitiesStringHelper::html($args[4]) : 'JNO'); // return the input - return self::getFieldObject($buttonAttributes, $buttonAttributes['default'], $buttonOptions)->input; + return FormHelper::field($buttonAttributes, $buttonAttributes['default'], $buttonOptions)->input; } /** * Check if have an json string * - * @input string The json string to check + * @input string The json string to check * * @returns bool true on success + * @deprecated 3.3 Use JsonHelper::check($string); */ public static function checkJson($string) { - if (self::checkString($string)) - { - json_decode($string); - return (json_last_error() === JSON_ERROR_NONE); - } - return false; + return JsonHelper::check($string); } /** * Check if have an object with a length * - * @input object The object to check + * @input object The object to check * * @returns bool true on success + * @deprecated 3.3 Use ObjectHelper::check($object); */ public static function checkObject($object) { - if (isset($object) && is_object($object)) - { - return count((array)$object) > 0; - } - return false; + return ObjectHelper::check($object); } /** * Check if have an array with a length * - * @input array The array to check + * @input array The array to check * * @returns bool/int number of items in array on success + * @deprecated 3.3 Use UtilitiesArrayHelper::check($array, $removeEmptyString); */ public static function checkArray($array, $removeEmptyString = false) { - if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0) - { - // also make sure the empty strings are removed - if ($removeEmptyString) - { - foreach ($array as $key => $string) - { - if (empty($string)) - { - unset($array[$key]); - } - } - return self::checkArray($array, false); - } - return $nr; - } - return false; + return UtilitiesArrayHelper::check($array, $removeEmptyString); } /** * Check if have a string with a length * - * @input string The string to check + * @input string The string to check * * @returns bool true on success + * @deprecated 3.3 Use UtilitiesStringHelper::check($string); */ public static function checkString($string) { - if (isset($string) && is_string($string) && strlen($string) > 0) - { - return true; - } - return false; + return UtilitiesStringHelper::check($string); } /** @@ -1307,8 +1362,8 @@ abstract class Ehealth_portalHelper public static function isConnected() { // If example.com is down, then probably the whole internet is down, since IANA maintains the domain. Right? - $connected = @fsockopen("www.example.com", 80); - // website, port (try 80 or 443) + $connected = @fsockopen("www.example.com", 80); + // website, port (try 80 or 443) if ($connected) { //action when connected @@ -1326,25 +1381,14 @@ abstract class Ehealth_portalHelper /** * Merge an array of array's * - * @input array The arrays you would like to merge + * @input array The arrays you would like to merge * * @returns array on success + * @deprecated 3.3 Use UtilitiesArrayHelper::merge($arrays); */ public static function mergeArrays($arrays) { - if(self::checkArray($arrays)) - { - $arrayBuket = array(); - foreach ($arrays as $array) - { - if (self::checkArray($array)) - { - $arrayBuket = array_merge($arrayBuket, $array); - } - } - return $arrayBuket; - } - return false; + return UtilitiesArrayHelper::merge($arrays); } // typo sorry! @@ -1356,309 +1400,100 @@ abstract class Ehealth_portalHelper /** * Shorten a string * - * @input string The you would like to shorten + * @input string The you would like to shorten * * @returns string on success + * @deprecated 3.3 Use UtilitiesStringHelper::shorten(...); */ public static function shorten($string, $length = 40, $addTip = true) { - if (self::checkString($string)) - { - $initial = strlen($string); - $words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE); - $words_count = count((array)$words); - - $word_length = 0; - $last_word = 0; - for (; $last_word < $words_count; ++$last_word) - { - $word_length += strlen($words[$last_word]); - if ($word_length > $length) - { - break; - } - } - - $newString = implode(array_slice($words, 0, $last_word)); - $final = strlen($newString); - if ($initial != $final && $addTip) - { - $title = self::shorten($string, 400 , false); - return ''.trim($newString).'...'; - } - elseif ($initial != $final && !$addTip) - { - return trim($newString).'...'; - } - } - return $string; + return UtilitiesStringHelper::shorten($string, $length, $addTip); } /** * Making strings safe (various ways) * - * @input string The you would like to make safe + * @input string The you would like to make safe * * @returns string on success + * @deprecated 3.3 Use UtilitiesStringHelper::safe(...); */ public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true, $keepOnlyCharacters = true) { - if ($replaceNumbers === true) - { - // remove all numbers and replace with english text version (works well only up to millions) - $string = self::replaceNumbers($string); - } - // 0nly continue if we have a string - if (self::checkString($string)) - { - // create file name without the extention that is safe - if ($type === 'filename') - { - // make sure VDM is not in the string - $string = str_replace('VDM', 'vDm', $string); - // Remove anything which isn't a word, whitespace, number - // or any of the following caracters -_() - // If you don't need to handle multi-byte characters - // you can use preg_replace rather than mb_ereg_replace - // Thanks @Łukasz Rysiak! - // $string = mb_ereg_replace("([^\w\s\d\-_\(\)])", '', $string); - $string = preg_replace("([^\w\s\d\-_\(\)])", '', $string); - // http://stackoverflow.com/a/2021729/1429677 - return preg_replace('/\s+/', ' ', $string); - } - // remove all other characters - $string = trim($string); - $string = preg_replace('/'.$spacer.'+/', ' ', $string); - $string = preg_replace('/\s+/', ' ', $string); - // Transliterate string - $string = self::transliterate($string); - // remove all and keep only characters - if ($keepOnlyCharacters) - { - $string = preg_replace("/[^A-Za-z ]/", '', $string); - } - // keep both numbers and characters - else - { - $string = preg_replace("/[^A-Za-z0-9 ]/", '', $string); - } - // select final adaptations - if ($type === 'L' || $type === 'strtolower') - { - // replace white space with underscore - $string = preg_replace('/\s+/', $spacer, $string); - // default is to return lower - return strtolower($string); - } - elseif ($type === 'W') - { - // return a string with all first letter of each word uppercase(no undersocre) - return ucwords(strtolower($string)); - } - elseif ($type === 'w' || $type === 'word') - { - // return a string with all lowercase(no undersocre) - return strtolower($string); - } - elseif ($type === 'Ww' || $type === 'Word') - { - // return a string with first letter of the first word uppercase and all the rest lowercase(no undersocre) - return ucfirst(strtolower($string)); - } - elseif ($type === 'WW' || $type === 'WORD') - { - // return a string with all the uppercase(no undersocre) - return strtoupper($string); - } - elseif ($type === 'U' || $type === 'strtoupper') - { - // replace white space with underscore - $string = preg_replace('/\s+/', $spacer, $string); - // return all upper - return strtoupper($string); - } - elseif ($type === 'F' || $type === 'ucfirst') - { - // replace white space with underscore - $string = preg_replace('/\s+/', $spacer, $string); - // return with first caracter to upper - return ucfirst(strtolower($string)); - } - elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase') - { - // convert all words to first letter uppercase - $string = ucwords(strtolower($string)); - // remove white space - $string = preg_replace('/\s+/', '', $string); - // now return first letter lowercase - return lcfirst($string); - } - // return string - return $string; - } - // not a string - return ''; + return UtilitiesStringHelper::safe( + $string, + $type, + $spacer, + $replaceNumbers, + $keepOnlyCharacters + ); } + /** + * Convert none English strings to code usable string + * + * @input an string + * + * @returns a string + * @deprecated 3.3 Use UtilitiesStringHelper::transliterate($string); + */ public static function transliterate($string) { - // set tag only once - if (!self::checkString(self::$langTag)) - { - // get global value - self::$langTag = JComponentHelper::getParams('com_ehealth_portal')->get('language', 'en-GB'); - } - // Transliterate on the language requested - $lang = Language::getInstance(self::$langTag); - return $lang->transliterate($string); + return UtilitiesStringHelper::transliterate($string); } + /** + * make sure a string is HTML save + * + * @input an html string + * + * @returns a string + * @deprecated 3.3 Use UtilitiesStringHelper::html(...); + */ public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40) { - if (self::checkString($var)) - { - $filter = new JFilterInput(); - $string = $filter->clean(html_entity_decode(htmlentities($var, ENT_COMPAT, $charset)), 'HTML'); - if ($shorten) - { - return self::shorten($string,$length); - } - return $string; - } - else - { - return ''; - } + return UtilitiesStringHelper::html( + $var, + $charset, + $shorten, + $length + ); } + /** + * Convert all int in a string to an English word string + * + * @input an string with numbers + * + * @returns a string + * @deprecated 3.3 Use UtilitiesStringHelper::numbers($string); + */ public static function replaceNumbers($string) { - // set numbers array - $numbers = array(); - // first get all numbers - preg_match_all('!\d+!', $string, $numbers); - // check if we have any numbers - if (isset($numbers[0]) && self::checkArray($numbers[0])) - { - foreach ($numbers[0] as $number) - { - $searchReplace[$number] = self::numberToString((int)$number); - } - // now replace numbers in string - $string = str_replace(array_keys($searchReplace), array_values($searchReplace),$string); - // check if we missed any, strange if we did. - return self::replaceNumbers($string); - } - // return the string with no numbers remaining. - return $string; + return UtilitiesStringHelper::numbers($string); } /** * Convert an integer into an English word string * Thanks to Tom Nicholson * - * @input an int + * @input an int * @returns a string + * @deprecated 3.3 Use UtilitiesStringHelper::number($x); */ public static function numberToString($x) { - $nwords = array( "zero", "one", "two", "three", "four", "five", "six", "seven", - "eight", "nine", "ten", "eleven", "twelve", "thirteen", - "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", - "nineteen", "twenty", 30 => "thirty", 40 => "forty", - 50 => "fifty", 60 => "sixty", 70 => "seventy", 80 => "eighty", - 90 => "ninety" ); - - if(!is_numeric($x)) - { - $w = $x; - } - elseif(fmod($x, 1) != 0) - { - $w = $x; - } - else - { - if($x < 0) - { - $w = 'minus '; - $x = -$x; - } - else - { - $w = ''; - // ... now $x is a non-negative integer. - } - - if($x < 21) // 0 to 20 - { - $w .= $nwords[$x]; - } - elseif($x < 100) // 21 to 99 - { - $w .= $nwords[10 * floor($x/10)]; - $r = fmod($x, 10); - if($r > 0) - { - $w .= ' '. $nwords[$r]; - } - } - elseif($x < 1000) // 100 to 999 - { - $w .= $nwords[floor($x/100)] .' hundred'; - $r = fmod($x, 100); - if($r > 0) - { - $w .= ' and '. self::numberToString($r); - } - } - elseif($x < 1000000) // 1000 to 999999 - { - $w .= self::numberToString(floor($x/1000)) .' thousand'; - $r = fmod($x, 1000); - if($r > 0) - { - $w .= ' '; - if($r < 100) - { - $w .= 'and '; - } - $w .= self::numberToString($r); - } - } - else // millions - { - $w .= self::numberToString(floor($x/1000000)) .' million'; - $r = fmod($x, 1000000); - if($r > 0) - { - $w .= ' '; - if($r < 100) - { - $w .= 'and '; - } - $w .= self::numberToString($r); - } - } - } - return $w; + return UtilitiesStringHelper::number($x); } /** * Random Key * * @returns a string + * @deprecated 3.3 Use UtilitiesStringHelper::random($size); */ public static function randomkey($size) { - $bag = "abcefghijknopqrstuwxyzABCDDEFGHIJKLLMMNOPQRSTUVVWXYZabcddefghijkllmmnopqrstuvvwxyzABCEFGHIJKNOPQRSTUWXYZ"; - $key = array(); - $bagsize = strlen($bag) - 1; - for ($i = 0; $i < $size; $i++) - { - $get = rand(0, $bagsize); - $key[] = $bag[$get]; - } - return implode($key); + return UtilitiesStringHelper::random($size); } } diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 6051e4d..8204bfa 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage headercheck.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,24 +26,36 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -class ehealth_portalHeaderCheck +use Joomla\CMS\Factory; + +class ehealthportalHeaderCheck { + protected $document = null; + protected $app = null; + function js_loaded($script_name) { // UIkit check point if (strpos($script_name,'uikit') !== false) { - $app = JFactory::getApplication(); - $getTemplateName = $app->getTemplate('template')->template; - + if (!$this->app) + { + $this->app = Factory::getApplication(); + } + + $getTemplateName = $this->app->getTemplate('template')->template; if (strpos($getTemplateName,'yoo') !== false) { return true; } } - - $document = JFactory::getDocument(); - $head_data = $document->getHeadData(); + + if (!$this->document) + { + $this->document = Factory::getDocument(); + } + + $head_data = $this->document->getHeadData(); foreach (array_keys($head_data['scripts']) as $script) { if (stristr($script, $script_name)) @@ -54,24 +66,30 @@ class ehealth_portalHeaderCheck return false; } - + function css_loaded($script_name) { // UIkit check point if (strpos($script_name,'uikit') !== false) { - $app = JFactory::getApplication(); - $getTemplateName = $app->getTemplate('template')->template; - + if (!$this->app) + { + $this->app = Factory::getApplication(); + } + + $getTemplateName = $this->app->getTemplate('template')->template; if (strpos($getTemplateName,'yoo') !== false) { return true; } } - - $document = JFactory::getDocument(); - $head_data = $document->getHeadData(); - + + if (!$this->document) + { + $this->document = Factory::getDocument(); + } + + $head_data = $this->document->getHeadData(); foreach (array_keys($head_data['styleSheets']) as $script) { if (stristr($script, $script_name)) @@ -82,4 +100,4 @@ class ehealth_portalHeaderCheck return false; } -} \ No newline at end of file +} diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 3638b95..5bc19da 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage batch_.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -39,7 +39,7 @@ abstract class JHtmlBatch_ * @var array * @since 3.0 */ - protected static $ListSelection = array(); + protected static $ListSelection = []; /** * Render the batch selection options. diff --git a/admin/language/en-GB/en-GB.com_ehealth_portal.ini b/admin/language/en-GB/en-GB.com_ehealth_portal.ini deleted file mode 100644 index 9d47860..0000000 --- a/admin/language/en-GB/en-GB.com_ehealth_portal.ini +++ /dev/null @@ -1,2850 +0,0 @@ -COM_EHEALTH_PORTAL="eHealth Portal" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART="Administration Part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS="Administration Parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_ACCESS="Administration Parts Access" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_ACCESS_DESC="Allows the users in this group to access access administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_BATCH_OPTIONS="Batch process the selected Administration Parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_BATCH_TIP="All changes will be applied to all selected Administration Parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_BATCH_USE="Administration Parts Batch Use" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION="Administration Parts Edit Description" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of administration part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_NAME="Administration Parts Edit Name" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_NAME_DESC="Allows the users in this group to edit name of administration part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_VERSION="Administration Parts Edit Version" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EXPORT="Administration Parts Export" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EXPORT_DESC="Allows the users in this group to export export administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_IMPORT="Administration Parts Import" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_IMPORT_DESC="Allows the users in this group to import import administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_ARCHIVED="%s Administration Parts archived." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_ARCHIVED_1="%s Administration Part archived." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_CHECKED_IN_0="No Administration Part successfully checked in." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_CHECKED_IN_1="%d Administration Part successfully checked in." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_CHECKED_IN_MORE="%d Administration Parts successfully checked in." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_DELETED="%s Administration Parts deleted." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_DELETED_1="%s Administration Part deleted." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_FAILED_PUBLISHING="%s Administration Parts failed publishing." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_FAILED_PUBLISHING_1="%s Administration Part failed publishing." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_FEATURED="%s Administration Parts featured." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_FEATURED_1="%s Administration Part featured." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_PUBLISHED="%s Administration Parts published." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_PUBLISHED_1="%s Administration Part published." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_TRASHED="%s Administration Parts trashed." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_TRASHED_1="%s Administration Part trashed." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNFEATURED="%s Administration Parts unfeatured." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNFEATURED_1="%s Administration Part unfeatured." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNPUBLISHED="%s Administration Parts unpublished." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNPUBLISHED_1="%s Administration Part unpublished." -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_SUBMENU="Administration Parts Submenu" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_SUBMENU_DESC="Allows the users in this group to submenu of administration part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_CREATED_BY_DESC="The user that created this Administration Part." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_CREATED_DATE_DESC="The date this Administration Part was created." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_DETAILS="Details" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_EDIT="Editing the Administration Part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_ERROR_UNIQUE_ALIAS="Another Administration Part has the same alias." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_ID="Id" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_MODIFIED_BY_DESC="The last user that modified this Administration Part." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_MODIFIED_DATE_DESC="The date this Administration Part was modified." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_NEW="A New Administration Part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Administration Part to customise the alias." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_STATUS="Status" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_VACCINES="Vaccine(s)" -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_VERSION_DESC="A count of the number of times this Administration Part has been revised." -COM_EHEALTH_PORTAL_ADMINISTRATION_PART_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_ANTENATAL_CARE="Antenatal Care" -COM_EHEALTH_PORTAL_ANTENATAL_CARES="Antenatal Cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_ACCESS="Antenatal Cares Access" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_ACCESS_DESC="Allows the users in this group to access access antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_BATCH_OPTIONS="Batch process the selected Antenatal Cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_BATCH_TIP="All changes will be applied to all selected Antenatal Cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_BATCH_USE="Antenatal Cares Batch Use" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_ADD="Antenatal Cares Dashboard Add" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of antenatal care" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_LIST="Antenatal Cares Dashboard List" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of antenatal care" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EDIT_VERSION="Antenatal Cares Edit Version" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EXPORT="Antenatal Cares Export" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EXPORT_DESC="Allows the users in this group to export export antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_IMPORT="Antenatal Cares Import" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_IMPORT_DESC="Allows the users in this group to import import antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_ARCHIVED="%s Antenatal Cares archived." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_ARCHIVED_1="%s Antenatal Care archived." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_CHECKED_IN_0="No Antenatal Care successfully checked in." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_CHECKED_IN_1="%d Antenatal Care successfully checked in." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_CHECKED_IN_MORE="%d Antenatal Cares successfully checked in." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_DELETED="%s Antenatal Cares deleted." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_DELETED_1="%s Antenatal Care deleted." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_FAILED_PUBLISHING="%s Antenatal Cares failed publishing." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_FAILED_PUBLISHING_1="%s Antenatal Care failed publishing." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_FEATURED="%s Antenatal Cares featured." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_FEATURED_1="%s Antenatal Care featured." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_PUBLISHED="%s Antenatal Cares published." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_PUBLISHED_1="%s Antenatal Care published." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_TRASHED="%s Antenatal Cares trashed." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_TRASHED_1="%s Antenatal Care trashed." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_UNFEATURED="%s Antenatal Cares unfeatured." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_UNFEATURED_1="%s Antenatal Care unfeatured." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_UNPUBLISHED="%s Antenatal Cares unpublished." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_N_ITEMS_UNPUBLISHED_1="%s Antenatal Care unpublished." -COM_EHEALTH_PORTAL_ANTENATAL_CARES_SUBMENU="Antenatal Cares Submenu" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_SUBMENU_DESC="Allows the users in this group to submenu of antenatal care" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_ABDOMINAL_EXAMINATION="Abdominal Examination" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_CAESAREAN_SECTIONS_LABEL="Number of caesarean sections?" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_CREATED_BY_DESC="The user that created this Antenatal Care." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_CREATED_DATE_DESC="The date this Antenatal Care was created." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_EDIT="Editing the Antenatal Care" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_ERROR_UNIQUE_ALIAS="Another Antenatal Care has the same alias." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_ENGAGEMENT_DESCRIPTION="Select engagement of presenting part" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_ENGAGEMENT_LABEL="Engagement of presenting part" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_HEART_RATE_DESCRIPTION="Enter foetal heart rate (bpm)" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_HEART_RATE_LABEL="Foetal heart rate (bpm)" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_LIE_DESCRIPTION="Select foetal poles/lie" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_LIE_LABEL="Foetal poles/lie" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_MOVEMENTS_DESCRIPTION="Add Foetal Movements Here" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_MOVEMENTS_HINT="Add Foetal Movements Here" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_MOVEMENTS_LABEL="Foetal Movements" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_PRESENTATION_DESCRIPTION="Select foetal presentation" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_FOETAL_PRESENTATION_LABEL="Foetal presentation" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_ID="Id" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_LAST_MENSTRUAL_PERIOD_DESCRIPTION="Enter last menstrual period" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_LAST_MENSTRUAL_PERIOD_LABEL="Last Menstrual Period (LMP)" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_LIVE_BIRTHS_LABEL="Number of live births?" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_MISCARRIAGES_LABEL="Number of Miscarriages?" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_MODIFIED_BY_DESC="The last user that modified this Antenatal Care." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_MODIFIED_DATE_DESC="The date this Antenatal Care was modified." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_NEW="A New Antenatal Care" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_NORMAL_BIRTHS_LABEL="Number of Normal Births?" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_PREGNANCIES_EXCL_LABEL="Number of pregnancies excluding this one?" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_PREGNANCY_HISTORY="Pregnancy History" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Antenatal Care to customise the alias." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_STATUS="Status" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_STILL_BIRTHS_LABEL="Number of still births" -COM_EHEALTH_PORTAL_ANTENATAL_CARE_VERSION_DESC="A count of the number of times this Antenatal Care has been revised." -COM_EHEALTH_PORTAL_ANTENATAL_CARE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_ARCHIVED="Archived" -COM_EHEALTH_PORTAL_AUTHOR="Author" -COM_EHEALTH_PORTAL_BACK="Back" -COM_EHEALTH_PORTAL_BREAST_CANCER="Breast Cancer" -COM_EHEALTH_PORTAL_BREAST_CANCERS="Breast Cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_ACCESS="Breast Cancers Access" -COM_EHEALTH_PORTAL_BREAST_CANCERS_ACCESS_DESC="Allows the users in this group to access access breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_BATCH_OPTIONS="Batch process the selected Breast Cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_BATCH_TIP="All changes will be applied to all selected Breast Cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_BATCH_USE="Breast Cancers Batch Use" -COM_EHEALTH_PORTAL_BREAST_CANCERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_ADD="Breast Cancers Dashboard Add" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of breast cancer" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_LIST="Breast Cancers Dashboard List" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of breast cancer" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EDIT_VERSION="Breast Cancers Edit Version" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EXPORT="Breast Cancers Export" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EXPORT_DESC="Allows the users in this group to export export breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_IMPORT="Breast Cancers Import" -COM_EHEALTH_PORTAL_BREAST_CANCERS_IMPORT_DESC="Allows the users in this group to import import breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_ARCHIVED="%s Breast Cancers archived." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_ARCHIVED_1="%s Breast Cancer archived." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_CHECKED_IN_0="No Breast Cancer successfully checked in." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_CHECKED_IN_1="%d Breast Cancer successfully checked in." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_CHECKED_IN_MORE="%d Breast Cancers successfully checked in." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_DELETED="%s Breast Cancers deleted." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_DELETED_1="%s Breast Cancer deleted." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_FAILED_PUBLISHING="%s Breast Cancers failed publishing." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_FAILED_PUBLISHING_1="%s Breast Cancer failed publishing." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_FEATURED="%s Breast Cancers featured." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_FEATURED_1="%s Breast Cancer featured." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_PUBLISHED="%s Breast Cancers published." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_PUBLISHED_1="%s Breast Cancer published." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_TRASHED="%s Breast Cancers trashed." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_TRASHED_1="%s Breast Cancer trashed." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_UNFEATURED="%s Breast Cancers unfeatured." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_UNFEATURED_1="%s Breast Cancer unfeatured." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_UNPUBLISHED="%s Breast Cancers unpublished." -COM_EHEALTH_PORTAL_BREAST_CANCERS_N_ITEMS_UNPUBLISHED_1="%s Breast Cancer unpublished." -COM_EHEALTH_PORTAL_BREAST_CANCERS_SUBMENU="Breast Cancers Submenu" -COM_EHEALTH_PORTAL_BREAST_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of breast cancer" -COM_EHEALTH_PORTAL_BREAST_CANCER_ASIAN="Asian" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_ABNORMAL_SKIN_DESCRIPTION="Scaly, red. or swollen skin on the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_ABNORMAL_SKIN_LABEL="Scaly, red. or swollen skin on the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_AGE_RANGE_DESCRIPTION="Age > 40 years" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_AGE_RANGE_LABEL="Age > 40 years" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_BREASTFEEDING_DESCRIPTION="Are you breastfeeding?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_BREASTFEEDING_LABEL="Are you breastfeeding?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_BREAST_SHAPE_DESCRIPTION="A change in the size or shape of the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_BREAST_SHAPE_LABEL="A change in the size or shape of the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_DIMPLING_DESCRIPTION="Dimpling or puckering (contact into wrinkles or small folds) in the skin of the breast. The skin may have ridges or pitting so that it looks like the skin of an orange" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_DIMPLING_LABEL="Dimpling or puckering (contact into wrinkles or small folds) in the skin of the breast. The skin may have ridges or pitting so that it looks like the skin of an orange" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_FAMILY_HISTORY_DESCRIPTION="Do you have a family history of breast cancer in the family, immediate family (mother / grandmother)?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_FAMILY_HISTORY_LABEL="Do you have a family history of breast cancer in the family, immediate family (mother / grandmother)?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_HISTORY_HRT_DESCRIPTION="Do you have a history of taking HRT (Oestrogen hormone replacement therapy)?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_HISTORY_HRT_LABEL="Do you have a history of taking HRT (Oestrogen hormone replacement therapy)?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_INWARD_NIPPLE_DESCRIPTION="A nipple turned inward into the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_INWARD_NIPPLE_LABEL="A nipple turned inward into the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_LUMP_NEAR_BREAST_DESCRIPTION="A lump or thickening in or near the breast or in the underarm area" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_LUMP_NEAR_BREAST_LABEL="A lump or thickening in or near the breast or in the underarm area" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_NIPPLE_DISCHARGE_DESCRIPTION="Discharge (fluid) from the nipple, especially if it's bloody" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_NIPPLE_DISCHARGE_LABEL="Discharge (fluid) from the nipple, especially if it's bloody" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_OVERWEIGHT_DESCRIPTION="Does the patient appear to be overweight?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_OVERWEIGHT_LABEL="Does the patient appear to be overweight?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_PREG_AGE_LABEL="At what age was your first pregnancy?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_PREG_FREQ_LABEL="How many times were you pregnant?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_RACE_LABEL="Race" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_REG_EXERCISE_DESCRIPTION="Do you do regular exercise?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BC_REG_EXERCISE_LABEL="Do you do regular exercise?" -COM_EHEALTH_PORTAL_BREAST_CANCER_BLACK="Black" -COM_EHEALTH_PORTAL_BREAST_CANCER_BREAST_EXAMINATION="Breast Examination" -COM_EHEALTH_PORTAL_BREAST_CANCER_COLOURED="Coloured" -COM_EHEALTH_PORTAL_BREAST_CANCER_CREATED_BY_DESC="The user that created this Breast Cancer." -COM_EHEALTH_PORTAL_BREAST_CANCER_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_BREAST_CANCER_CREATED_DATE_DESC="The date this Breast Cancer was created." -COM_EHEALTH_PORTAL_BREAST_CANCER_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_BREAST_CANCER_EDIT="Editing the Breast Cancer" -COM_EHEALTH_PORTAL_BREAST_CANCER_ERROR_UNIQUE_ALIAS="Another Breast Cancer has the same alias." -COM_EHEALTH_PORTAL_BREAST_CANCER_ID="Id" -COM_EHEALTH_PORTAL_BREAST_CANCER_MODIFIED_BY_DESC="The last user that modified this Breast Cancer." -COM_EHEALTH_PORTAL_BREAST_CANCER_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_BREAST_CANCER_MODIFIED_DATE_DESC="The date this Breast Cancer was modified." -COM_EHEALTH_PORTAL_BREAST_CANCER_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_BREAST_CANCER_NEW="A New Breast Cancer" -COM_EHEALTH_PORTAL_BREAST_CANCER_NO="No" -COM_EHEALTH_PORTAL_BREAST_CANCER_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_BREAST_CANCER_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_BREAST_CANCER_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_BREAST_CANCER_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_BREAST_CANCER_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_BREAST_CANCER_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_BREAST_CANCER_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_BREAST_CANCER_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_BREAST_CANCER_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_BREAST_CANCER_RISK_ASSESMENT="Risk Assesment" -COM_EHEALTH_PORTAL_BREAST_CANCER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Breast Cancer to customise the alias." -COM_EHEALTH_PORTAL_BREAST_CANCER_STATUS="Status" -COM_EHEALTH_PORTAL_BREAST_CANCER_THIRTY_YEARS="30+ years" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_ABNORMAL_SKIN_DESCRIPTION="Scaly, red. or swollen skin on the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_ABNORMAL_SKIN_HINT="Add text Here" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_ABNORMAL_SKIN_LABEL="Comments:" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_BREAST_SHAPE_DESCRIPTION="A change in the size or shape of the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_BREAST_SHAPE_HINT="Add text here" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_BREAST_SHAPE_LABEL="Comments:" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_DIMPLING_DESCRIPTION="Dimpling or puckering (contact into wrinkles or small folds) in the skin of the breast. The skin may have ridges or pitting so that it looks like the skin of an orange" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_DIMPLING_HINT="Add text Here" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_DIMPLING_LABEL="Comments:" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_INWARD_NIPPLE_DESCRIPTION="A nipple turned inward into the breast" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_INWARD_NIPPLE_HINT="Add text Here" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_INWARD_NIPPLE_LABEL="Comments:" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_LUMP_NEAR_BREAST_DESCRIPTION="A lump or thickening in or near the breast or in the underarm area" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_LUMP_NEAR_BREAST_HINT="Add text here" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_LUMP_NEAR_BREAST_LABEL="Comments:" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_NIPPLE_DISCHARGE_DESCRIPTION="Discharge (fluid) from the nipple, especially if it's bloody" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_NIPPLE_DISCHARGE_HINT="Add text Here" -COM_EHEALTH_PORTAL_BREAST_CANCER_TXT_BC_NIPPLE_DISCHARGE_LABEL="Comments:" -COM_EHEALTH_PORTAL_BREAST_CANCER_VERSION_DESC="A count of the number of times this Breast Cancer has been revised." -COM_EHEALTH_PORTAL_BREAST_CANCER_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_BREAST_CANCER_WHITE="White" -COM_EHEALTH_PORTAL_BREAST_CANCER_YES="Yes" -COM_EHEALTH_PORTAL_CERVICAL_CANCER="Cervical Cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS="Cervical Cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_ACCESS="Cervical Cancers Access" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_ACCESS_DESC="Allows the users in this group to access access cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_BATCH_OPTIONS="Batch process the selected Cervical Cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_BATCH_TIP="All changes will be applied to all selected Cervical Cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_BATCH_USE="Cervical Cancers Batch Use" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_ADD="Cervical Cancers Dashboard Add" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of cervical cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_LIST="Cervical Cancers Dashboard List" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of cervical cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EDIT_VERSION="Cervical Cancers Edit Version" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EXPORT="Cervical Cancers Export" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EXPORT_DESC="Allows the users in this group to export export cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_IMPORT="Cervical Cancers Import" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_IMPORT_DESC="Allows the users in this group to import import cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_ARCHIVED="%s Cervical Cancers archived." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_ARCHIVED_1="%s Cervical Cancer archived." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_CHECKED_IN_0="No Cervical Cancer successfully checked in." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_CHECKED_IN_1="%d Cervical Cancer successfully checked in." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_CHECKED_IN_MORE="%d Cervical Cancers successfully checked in." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_DELETED="%s Cervical Cancers deleted." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_DELETED_1="%s Cervical Cancer deleted." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_FAILED_PUBLISHING="%s Cervical Cancers failed publishing." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_FAILED_PUBLISHING_1="%s Cervical Cancer failed publishing." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_FEATURED="%s Cervical Cancers featured." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_FEATURED_1="%s Cervical Cancer featured." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_PUBLISHED="%s Cervical Cancers published." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_PUBLISHED_1="%s Cervical Cancer published." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_TRASHED="%s Cervical Cancers trashed." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_TRASHED_1="%s Cervical Cancer trashed." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_UNFEATURED="%s Cervical Cancers unfeatured." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_UNFEATURED_1="%s Cervical Cancer unfeatured." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_UNPUBLISHED="%s Cervical Cancers unpublished." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_N_ITEMS_UNPUBLISHED_1="%s Cervical Cancer unpublished." -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_SUBMENU="Cervical Cancers Submenu" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of cervical cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_PERIODS_DESCRIPTION="Periods that become heavier and last longer than usual" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_PERIODS_LABEL="Periods that become heavier and last longer than usual" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_REASON_DESCRIPTION="Enter Reason" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_REASON_HINT="Your Reason Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_REASON_MESSAGE="Error! Please add some text here." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_RESULT_DESCRIPTION="Results" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_RESULT_LABEL="Results" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_SEX_ACTVE_DESCRIPTION="Have you been sexually active from a young age?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_SEX_ACTVE_LABEL="Have you been sexually active from a young age?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_SEX_PARTNER_DESCRIPTION="Have you had multiple sexual partners?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_SEX_PARTNER_LABEL="Have you had multiple sexual partners?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_SMOKING_DESCRIPTION="Do you smoke?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_SMOKING_LABEL="Do you smoke?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_VIGINAL_BLEEDING_DESCRIPTION="Abnormal vaginal bleeding between periods, after intercourse, or after menopause" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_VIGINAL_BLEEDING_LABEL="Abnormal vaginal bleeding between periods, after intercourse, or after menopause" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_V_DISCHARGE_DESCRIPTION="Vaginal discharge that does not stop, and may be pale, watery, pink, brown, bloody, or foul-smelling" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CC_V_DISCHARGE_LABEL="Vaginal discharge that does not stop, and may be pale, watery, pink, brown, bloody, or foul-smelling" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CERVICAL_EXAMINATION="Cervical Examination" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CREATED_BY_DESC="The user that created this Cervical Cancer." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CREATED_DATE_DESC="The date this Cervical Cancer was created." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_EDIT="Editing the Cervical Cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_ERROR_UNIQUE_ALIAS="Another Cervical Cancer has the same alias." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_ID="Id" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_INCONCLUSIVE="Inconclusive" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_MODIFIED_BY_DESC="The last user that modified this Cervical Cancer." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_MODIFIED_DATE_DESC="The date this Cervical Cancer was modified." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_NEGATIVE="Negative" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_NEW="A New Cervical Cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO="No" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_PAP_SMEAR_COLLECTION_DESCRIPTION="Pap smear collected" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_PAP_SMEAR_COLLECTION_LABEL="Pap smear collected" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_POSITIVE="Positive" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_RISK_ASSESMENT="Risk Assesment" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Cervical Cancer to customise the alias." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_STATUS="Status" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_PERIODS_DESCRIPTION="Periods that become heavier and last longer than usual" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_PERIODS_HINT="Add text Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_PERIODS_LABEL="Comments:" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SEX_ACTVE_DESCRIPTION="Have you been sexually active from a young age?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SEX_ACTVE_HINT="Add text here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SEX_ACTVE_LABEL="Comments:" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SEX_PARTNER_DESCRIPTION="Have you had multiple sexual partners?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SEX_PARTNER_HINT="Add text here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SEX_PARTNER_LABEL="Comments:" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SMOKING_DESCRIPTION="Do you smoke?" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SMOKING_HINT="Add text Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_SMOKING_LABEL="Comments:" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_VIGINAL_BLEEDING_DESCRIPTION="Abnormal vaginal bleeding between periods, after intercourse, or after menopause" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_VIGINAL_BLEEDING_HINT="Add text Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_VIGINAL_BLEEDING_LABEL="Comments:" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_V_DISCHARGE_DESCRIPTION="Vaginal discharge that does not stop, and may be pale, watery, pink, brown, bloody, or foul-smelling" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_V_DISCHARGE_HINT="Add text Here" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_TXT_CC_V_DISCHARGE_LABEL="Comments:" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_VERSION_DESC="A count of the number of times this Cervical Cancer has been revised." -COM_EHEALTH_PORTAL_CERVICAL_CANCER_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES="Yes" -COM_EHEALTH_PORTAL_CLINIC="Clinic" -COM_EHEALTH_PORTAL_CLINICS="Clinics" -COM_EHEALTH_PORTAL_CLINICS_ACCESS="Clinics Access" -COM_EHEALTH_PORTAL_CLINICS_ACCESS_DESC="Allows the users in this group to access access clinics" -COM_EHEALTH_PORTAL_CLINICS_BATCH_OPTIONS="Batch process the selected Clinics" -COM_EHEALTH_PORTAL_CLINICS_BATCH_TIP="All changes will be applied to all selected Clinics" -COM_EHEALTH_PORTAL_CLINICS_BATCH_USE="Clinics Batch Use" -COM_EHEALTH_PORTAL_CLINICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch clinics" -COM_EHEALTH_PORTAL_CLINICS_EDIT_CLINIC_NAME="Clinics Edit Clinic Name" -COM_EHEALTH_PORTAL_CLINICS_EDIT_CLINIC_NAME_DESC="Allows the users in this group to edit clinic name of clinic" -COM_EHEALTH_PORTAL_CLINICS_EDIT_DESCRIPTION="Clinics Edit Description" -COM_EHEALTH_PORTAL_CLINICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of clinic" -COM_EHEALTH_PORTAL_CLINICS_EDIT_VERSION="Clinics Edit Version" -COM_EHEALTH_PORTAL_CLINICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version clinics" -COM_EHEALTH_PORTAL_CLINICS_EXPORT="Clinics Export" -COM_EHEALTH_PORTAL_CLINICS_EXPORT_DESC="Allows the users in this group to export export clinics" -COM_EHEALTH_PORTAL_CLINICS_IMPORT="Clinics Import" -COM_EHEALTH_PORTAL_CLINICS_IMPORT_DESC="Allows the users in this group to import import clinics" -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_ARCHIVED="%s Clinics archived." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_ARCHIVED_1="%s Clinic archived." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_CHECKED_IN_0="No Clinic successfully checked in." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_CHECKED_IN_1="%d Clinic successfully checked in." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_CHECKED_IN_MORE="%d Clinics successfully checked in." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_DELETED="%s Clinics deleted." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_DELETED_1="%s Clinic deleted." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_FAILED_PUBLISHING="%s Clinics failed publishing." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_FAILED_PUBLISHING_1="%s Clinic failed publishing." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_FEATURED="%s Clinics featured." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_FEATURED_1="%s Clinic featured." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_PUBLISHED="%s Clinics published." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_PUBLISHED_1="%s Clinic published." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_TRASHED="%s Clinics trashed." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_TRASHED_1="%s Clinic trashed." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_UNFEATURED="%s Clinics unfeatured." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_UNFEATURED_1="%s Clinic unfeatured." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_UNPUBLISHED="%s Clinics unpublished." -COM_EHEALTH_PORTAL_CLINICS_N_ITEMS_UNPUBLISHED_1="%s Clinic unpublished." -COM_EHEALTH_PORTAL_CLINIC_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_CLINIC_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_CLINIC_CLINIC_NAME_DESCRIPTION="Enter Clinic Name Here" -COM_EHEALTH_PORTAL_CLINIC_CLINIC_NAME_HINT="Clinic Name Here" -COM_EHEALTH_PORTAL_CLINIC_CLINIC_NAME_LABEL="Clinic Name" -COM_EHEALTH_PORTAL_CLINIC_CLINIC_NAME_MESSAGE="Error! Please add clinic name here." -COM_EHEALTH_PORTAL_CLINIC_CLINIC_TYPE_DESCRIPTION="Clinic Type" -COM_EHEALTH_PORTAL_CLINIC_CLINIC_TYPE_LABEL="Clinic Type" -COM_EHEALTH_PORTAL_CLINIC_CREATED_BY_DESC="The user that created this Clinic." -COM_EHEALTH_PORTAL_CLINIC_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_CLINIC_CREATED_DATE_DESC="The date this Clinic was created." -COM_EHEALTH_PORTAL_CLINIC_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_CLINIC_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_CLINIC_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_CLINIC_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_CLINIC_DETAILS="Details" -COM_EHEALTH_PORTAL_CLINIC_EDIT="Editing the Clinic" -COM_EHEALTH_PORTAL_CLINIC_ERROR_UNIQUE_ALIAS="Another Clinic has the same alias." -COM_EHEALTH_PORTAL_CLINIC_FIXED="Fixed" -COM_EHEALTH_PORTAL_CLINIC_ID="Id" -COM_EHEALTH_PORTAL_CLINIC_MOBILE="Mobile" -COM_EHEALTH_PORTAL_CLINIC_MODIFIED_BY_DESC="The last user that modified this Clinic." -COM_EHEALTH_PORTAL_CLINIC_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_CLINIC_MODIFIED_DATE_DESC="The date this Clinic was modified." -COM_EHEALTH_PORTAL_CLINIC_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_CLINIC_NEW="A New Clinic" -COM_EHEALTH_PORTAL_CLINIC_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_CLINIC_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_CLINIC_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_CLINIC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Clinic to customise the alias." -COM_EHEALTH_PORTAL_CLINIC_STATUS="Status" -COM_EHEALTH_PORTAL_CLINIC_VERSION_DESC="A count of the number of times this Clinic has been revised." -COM_EHEALTH_PORTAL_CLINIC_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_CLOSE_NEW="Close & New" -COM_EHEALTH_PORTAL_CONFIG_AUTHOR="Author Info" -COM_EHEALTH_PORTAL_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component." -COM_EHEALTH_PORTAL_CONFIG_AUTHOR_EMAIL_LABEL="Author Email" -COM_EHEALTH_PORTAL_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component." -COM_EHEALTH_PORTAL_CONFIG_AUTHOR_NAME_LABEL="Author Name" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_DESC="Set the intervals for the auto checkin fuction of tables that checks out the items to an user." -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_LABEL="Check in timer" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_OPTION_FIVE="Once a week" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_OPTION_FOUR="Every second day" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_OPTION_ONE="Every five hours" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_OPTION_SIX="Never" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_OPTION_THREE="Once a day" -COM_EHEALTH_PORTAL_CONFIG_CHECK_TIMER_OPTION_TWO="Every twelve hours" -COM_EHEALTH_PORTAL_CONFIG_GLOBAL_DESC="The Global Parameters" -COM_EHEALTH_PORTAL_CONFIG_GLOBAL_LABEL="Global" -COM_EHEALTH_PORTAL_CONTRIBUTOR="Contributor" -COM_EHEALTH_PORTAL_CONTRIBUTORS="Contributors" -COM_EHEALTH_PORTAL_COUNSELING_TYPE="Counseling Type" -COM_EHEALTH_PORTAL_COUNSELING_TYPES="Counseling Types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_ACCESS="Counseling Types Access" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_ACCESS_DESC="Allows the users in this group to access access counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_BATCH_OPTIONS="Batch process the selected Counseling Types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_BATCH_TIP="All changes will be applied to all selected Counseling Types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_BATCH_USE="Counseling Types Batch Use" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION="Counseling Types Edit Description" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of counseling type" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_NAME="Counseling Types Edit Name" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of counseling type" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_VERSION="Counseling Types Edit Version" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EXPORT="Counseling Types Export" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EXPORT_DESC="Allows the users in this group to export export counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_IMPORT="Counseling Types Import" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_IMPORT_DESC="Allows the users in this group to import import counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_ARCHIVED="%s Counseling Types archived." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_ARCHIVED_1="%s Counseling Type archived." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_CHECKED_IN_0="No Counseling Type successfully checked in." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_CHECKED_IN_1="%d Counseling Type successfully checked in." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Counseling Types successfully checked in." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_DELETED="%s Counseling Types deleted." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_DELETED_1="%s Counseling Type deleted." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Counseling Types failed publishing." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Counseling Type failed publishing." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_FEATURED="%s Counseling Types featured." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_FEATURED_1="%s Counseling Type featured." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_PUBLISHED="%s Counseling Types published." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_PUBLISHED_1="%s Counseling Type published." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_TRASHED="%s Counseling Types trashed." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_TRASHED_1="%s Counseling Type trashed." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_UNFEATURED="%s Counseling Types unfeatured." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_UNFEATURED_1="%s Counseling Type unfeatured." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_UNPUBLISHED="%s Counseling Types unpublished." -COM_EHEALTH_PORTAL_COUNSELING_TYPES_N_ITEMS_UNPUBLISHED_1="%s Counseling Type unpublished." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_CREATED_BY_DESC="The user that created this Counseling Type." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_CREATED_DATE_DESC="The date this Counseling Type was created." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_DETAILS="Details" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_EDIT="Editing the Counseling Type" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_ERROR_UNIQUE_ALIAS="Another Counseling Type has the same alias." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_ID="Id" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_MODIFIED_BY_DESC="The last user that modified this Counseling Type." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_MODIFIED_DATE_DESC="The date this Counseling Type was modified." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_NEW="A New Counseling Type" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Counseling Type to customise the alias." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_STATUS="Status" -COM_EHEALTH_PORTAL_COUNSELING_TYPE_VERSION_DESC="A count of the number of times this Counseling Type has been revised." -COM_EHEALTH_PORTAL_COUNSELING_TYPE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_CREATE_NEW_S="Create New %s" -COM_EHEALTH_PORTAL_DASH="Dashboard" -COM_EHEALTH_PORTAL_DASHBOARD="eHealth Portal Dashboard" -COM_EHEALTH_PORTAL_DASHBOARD_ANTENATAL_CARES="Antenatal Cares

" -COM_EHEALTH_PORTAL_DASHBOARD_ANTENATAL_CARE_ADD="Add Antenatal Care

" -COM_EHEALTH_PORTAL_DASHBOARD_BREAST_CANCERS="Breast Cancers

" -COM_EHEALTH_PORTAL_DASHBOARD_BREAST_CANCER_ADD="Add Breast Cancer

" -COM_EHEALTH_PORTAL_DASHBOARD_CERVICAL_CANCERS="Cervical Cancers

" -COM_EHEALTH_PORTAL_DASHBOARD_CERVICAL_CANCER_ADD="Add Cervical Cancer

" -COM_EHEALTH_PORTAL_DASHBOARD_FAMILY_PLANNINGS="Family Plannings

" -COM_EHEALTH_PORTAL_DASHBOARD_FAMILY_PLANNING_ADD="Add Family Planning

" -COM_EHEALTH_PORTAL_DASHBOARD_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups

" -COM_EHEALTH_PORTAL_DASHBOARD_GENERAL_MEDICAL_CHECK_UP_ADD="Add General Medical Check Up

" -COM_EHEALTH_PORTAL_DASHBOARD_HEALTH_EDUCATIONS="Health Educations

" -COM_EHEALTH_PORTAL_DASHBOARD_HEALTH_EDUCATION_ADD="Add Health Education

" -COM_EHEALTH_PORTAL_DASHBOARD_HIV_COUNSELINGS_AND_TESTINGS="Hiv Counselings And Testings

" -COM_EHEALTH_PORTAL_DASHBOARD_HIV_COUNSELING_AND_TESTING_ADD="Add Hiv Counseling And Testing

" -COM_EHEALTH_PORTAL_DASHBOARD_IMMUNISATIONS="Immunisations

" -COM_EHEALTH_PORTAL_DASHBOARD_IMMUNISATION_ADD="Add Immunisation

" -COM_EHEALTH_PORTAL_DASHBOARD_PATIENT_QUEUE="Patient Queue

" -COM_EHEALTH_PORTAL_DASHBOARD_PAYMENTS="Payments

" -COM_EHEALTH_PORTAL_DASHBOARD_PAYMENT_ADD="Add Payment

" -COM_EHEALTH_PORTAL_DASHBOARD_PROSTATE_AND_TESTICULAR_CANCERS="Prostate And Testicular Cancers

" -COM_EHEALTH_PORTAL_DASHBOARD_PROSTATE_AND_TESTICULAR_CANCER_ADD="Add Prostate And Testicular Cancer

" -COM_EHEALTH_PORTAL_DASHBOARD_TESTS="Tests

" -COM_EHEALTH_PORTAL_DASHBOARD_TEST_ADD="Add Test

" -COM_EHEALTH_PORTAL_DASHBOARD_TUBERCULOSES="Tuberculoses

" -COM_EHEALTH_PORTAL_DASHBOARD_TUBERCULOSIS_ADD="Add Tuberculosis

" -COM_EHEALTH_PORTAL_DASHBOARD_VMMCS="Vmmcs

" -COM_EHEALTH_PORTAL_DASHBOARD_VMMC_ADD="Add Vmmc

" -COM_EHEALTH_PORTAL_DATE="Date" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE="Diagnosis Type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES="Diagnosis Types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_ACCESS="Diagnosis Types Access" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_ACCESS_DESC="Allows the users in this group to access access diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_BATCH_OPTIONS="Batch process the selected Diagnosis Types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_BATCH_TIP="All changes will be applied to all selected Diagnosis Types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_BATCH_USE="Diagnosis Types Batch Use" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION="Diagnosis Types Edit Description" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of diagnosis type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_NAME="Diagnosis Types Edit Name" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of diagnosis type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_VERSION="Diagnosis Types Edit Version" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EXPORT="Diagnosis Types Export" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EXPORT_DESC="Allows the users in this group to export export diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_IMPORT="Diagnosis Types Import" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_IMPORT_DESC="Allows the users in this group to import import diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_ARCHIVED="%s Diagnosis Types archived." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_ARCHIVED_1="%s Diagnosis Type archived." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_CHECKED_IN_0="No Diagnosis Type successfully checked in." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_CHECKED_IN_1="%d Diagnosis Type successfully checked in." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Diagnosis Types successfully checked in." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_DELETED="%s Diagnosis Types deleted." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_DELETED_1="%s Diagnosis Type deleted." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Diagnosis Types failed publishing." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Diagnosis Type failed publishing." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_FEATURED="%s Diagnosis Types featured." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_FEATURED_1="%s Diagnosis Type featured." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_PUBLISHED="%s Diagnosis Types published." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_PUBLISHED_1="%s Diagnosis Type published." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_TRASHED="%s Diagnosis Types trashed." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_TRASHED_1="%s Diagnosis Type trashed." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNFEATURED="%s Diagnosis Types unfeatured." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNFEATURED_1="%s Diagnosis Type unfeatured." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNPUBLISHED="%s Diagnosis Types unpublished." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNPUBLISHED_1="%s Diagnosis Type unpublished." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_CREATED_BY_DESC="The user that created this Diagnosis Type." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_CREATED_DATE_DESC="The date this Diagnosis Type was created." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_DETAILS="Details" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_EDIT="Editing the Diagnosis Type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_ERROR_UNIQUE_ALIAS="Another Diagnosis Type has the same alias." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_ID="Id" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_MODIFIED_BY_DESC="The last user that modified this Diagnosis Type." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_MODIFIED_DATE_DESC="The date this Diagnosis Type was modified." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_NEW="A New Diagnosis Type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Diagnosis Type to customise the alias." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_STATUS="Status" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_VERSION_DESC="A count of the number of times this Diagnosis Type has been revised." -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_EDIT_CREATED_BY="Edit Created By" -COM_EHEALTH_PORTAL_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." -COM_EHEALTH_PORTAL_EDIT_CREATED_DATE="Edit Created Date" -COM_EHEALTH_PORTAL_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date." -COM_EHEALTH_PORTAL_EDIT_S="Edit %s" -COM_EHEALTH_PORTAL_EDIT_VERSIONS="Edit Version" -COM_EHEALTH_PORTAL_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." -COM_EHEALTH_PORTAL_EXPORT_DATA="Export Data" -COM_EHEALTH_PORTAL_EXPORT_DATA_DESC="Allows users in this group to export data." -COM_EHEALTH_PORTAL_EXPORT_FAILED="Export Failed" -COM_EHEALTH_PORTAL_FAMILY_PLANNING="Family Planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS="Family Plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_ACCESS="Family Plannings Access" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_ACCESS_DESC="Allows the users in this group to access access family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_BATCH_OPTIONS="Batch process the selected Family Plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_BATCH_TIP="All changes will be applied to all selected Family Plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_BATCH_USE="Family Plannings Batch Use" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD="Family Plannings Dashboard Add" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST="Family Plannings Dashboard List" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS="Family Plannings Edit Diagnosis" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS_DESC="Allows the users in this group to edit diagnosis of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_VERSION="Family Plannings Edit Version" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EXPORT="Family Plannings Export" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EXPORT_DESC="Allows the users in this group to export export family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_IMPORT="Family Plannings Import" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_IMPORT_DESC="Allows the users in this group to import import family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_ARCHIVED="%s Family Plannings archived." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_ARCHIVED_1="%s Family Planning archived." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_CHECKED_IN_0="No Family Planning successfully checked in." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_CHECKED_IN_1="%d Family Planning successfully checked in." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_CHECKED_IN_MORE="%d Family Plannings successfully checked in." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_DELETED="%s Family Plannings deleted." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_DELETED_1="%s Family Planning deleted." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_FAILED_PUBLISHING="%s Family Plannings failed publishing." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_FAILED_PUBLISHING_1="%s Family Planning failed publishing." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_FEATURED="%s Family Plannings featured." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_FEATURED_1="%s Family Planning featured." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_PUBLISHED="%s Family Plannings published." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_PUBLISHED_1="%s Family Planning published." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_TRASHED="%s Family Plannings trashed." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_TRASHED_1="%s Family Planning trashed." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_UNFEATURED="%s Family Plannings unfeatured." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_UNFEATURED_1="%s Family Planning unfeatured." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_UNPUBLISHED="%s Family Plannings unpublished." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_N_ITEMS_UNPUBLISHED_1="%s Family Planning unpublished." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_SUBMENU="Family Plannings Submenu" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_SUBMENU_DESC="Allows the users in this group to submenu of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_CREATED_BY_DESC="The user that created this Family Planning." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_CREATED_DATE_DESC="The date this Family Planning was created." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_DETAILS="Details" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_DIAGNOSIS_DESCRIPTION="Select Planning Type" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_DIAGNOSIS_LABEL="Select Family Planning Type" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_EDIT="Editing the Family Planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_ERROR_UNIQUE_ALIAS="Another Family Planning has the same alias." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_ID="Id" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_MODIFIED_BY_DESC="The last user that modified this Family Planning." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_MODIFIED_DATE_DESC="The date this Family Planning was modified." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_NEW="A New Family Planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Family Planning to customise the alias." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_STATUS="Status" -COM_EHEALTH_PORTAL_FAMILY_PLANNING_VERSION_DESC="A count of the number of times this Family Planning has been revised." -COM_EHEALTH_PORTAL_FAMILY_PLANNING_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_FILTER_ADMINISTRATION_PART_ASCENDING="Administration Part ascending" -COM_EHEALTH_PORTAL_FILTER_ADMINISTRATION_PART_DESCENDING="Administration Part descending" -COM_EHEALTH_PORTAL_FILTER_BPONEDIASTOLIC_ASCENDING="BP(1)-Diastolic ascending" -COM_EHEALTH_PORTAL_FILTER_BPONEDIASTOLIC_DESCENDING="BP(1)-Diastolic descending" -COM_EHEALTH_PORTAL_FILTER_BPONESYSTOLIC_ASCENDING="BP(1)-Systolic ascending" -COM_EHEALTH_PORTAL_FILTER_BPONESYSTOLIC_DESCENDING="BP(1)-Systolic descending" -COM_EHEALTH_PORTAL_FILTER_BPTWODIASTOLIC_ASCENDING="BP(2)-Diastolic ascending" -COM_EHEALTH_PORTAL_FILTER_BPTWODIASTOLIC_DESCENDING="BP(2)-Diastolic descending" -COM_EHEALTH_PORTAL_FILTER_BPTWOSYSTOLIC_ASCENDING="BP(2)-Systolic ascending" -COM_EHEALTH_PORTAL_FILTER_BPTWOSYSTOLIC_DESCENDING="BP(2)-Systolic descending" -COM_EHEALTH_PORTAL_FILTER_CLINIC_NAME_ASCENDING="Clinic Name ascending" -COM_EHEALTH_PORTAL_FILTER_CLINIC_NAME_DESCENDING="Clinic Name descending" -COM_EHEALTH_PORTAL_FILTER_DESCRIPTION_ASCENDING="Description ascending" -COM_EHEALTH_PORTAL_FILTER_DESCRIPTION_DESCENDING="Description descending" -COM_EHEALTH_PORTAL_FILTER_HEIGHT_M_ASCENDING="Height (m) ascending" -COM_EHEALTH_PORTAL_FILTER_HEIGHT_M_DESCENDING="Height (m) descending" -COM_EHEALTH_PORTAL_FILTER_NAME_ASCENDING="Name ascending" -COM_EHEALTH_PORTAL_FILTER_NAME_DESCENDING="Name descending" -COM_EHEALTH_PORTAL_FILTER_ONEST_TEMP_READING_C_ASCENDING="1st Temp. Reading (*C): ascending" -COM_EHEALTH_PORTAL_FILTER_ONEST_TEMP_READING_C_DESCENDING="1st Temp. Reading (*C): descending" -COM_EHEALTH_PORTAL_FILTER_PATIENT_NAME_ASCENDING="Patient Name ascending" -COM_EHEALTH_PORTAL_FILTER_PATIENT_NAME_DESCENDING="Patient Name descending" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED="Status" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_ADMINISTRATION_PARTS="Status options for administration parts" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_ANTENATAL_CARES="Status options for antenatal cares" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_BREAST_CANCERS="Status options for breast cancers" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_CERVICAL_CANCERS="Status options for cervical cancers" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_CLINICS="Status options for clinics" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_COUNSELING_TYPES="Status options for counseling types" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_DIAGNOSIS_TYPES="Status options for diagnosis types" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_FAMILY_PLANNINGS="Status options for family plannings" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_FOETAL_ENGAGEMENTS="Status options for foetal engagements" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_FOETAL_LIES="Status options for foetal lies" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_FOETAL_PRESENTATIONS="Status options for foetal presentations" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_GENERAL_MEDICAL_CHECK_UPS="Status options for general medical check ups" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_HEALTH_EDUCATIONS="Status options for health educations" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_HEALTH_EDUCATION_TOPICS="Status options for health education topics" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_HIV_COUNSELINGS_AND_TESTINGS="Status options for hiv counselings and testings" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_IMMUNISATIONS="Status options for immunisations" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_IMMUNISATION_TYPES="Status options for immunisation types" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_IMMUNISATION_VACCINE_TYPES="Status options for immunisation vaccine types" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_MEDICATIONS="Status options for medications" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_NONPAY_REASONS="Status options for nonpay reasons" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_PAYMENTS="Status options for payments" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_PAYMENT_AMOUNTS="Status options for payment amounts" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_PAYMENT_TYPES="Status options for payment types" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_PLANNING_TYPES="Status options for planning types" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_PROSTATE_AND_TESTICULAR_CANCERS="Status options for prostate and testicular cancers" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_REFERRALS="Status options for referrals" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_SITES="Status options for sites" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_STRENGTHS="Status options for strengths" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_TESTING_REASONS="Status options for testing reasons" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_TESTS="Status options for tests" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_TUBERCULOSES="Status options for tuberculoses" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_UNITS="Status options for units" -COM_EHEALTH_PORTAL_FILTER_PUBLISHED_VMMCS="Status options for vmmcs" -COM_EHEALTH_PORTAL_FILTER_PULSE_ASCENDING="Pulse ascending" -COM_EHEALTH_PORTAL_FILTER_PULSE_DESCENDING="Pulse descending" -COM_EHEALTH_PORTAL_FILTER_REFERRED_TO_ASCENDING="Referred to ascending" -COM_EHEALTH_PORTAL_FILTER_REFERRED_TO_DESCENDING="Referred to descending" -COM_EHEALTH_PORTAL_FILTER_SEARCH="Searchpayments" -COM_EHEALTH_PORTAL_FILTER_SEARCH_ADMINISTRATION_PARTS="Search the administration part items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_ANTENATAL_CARES="Search the antenatal care items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_BREAST_CANCERS="Search the breast cancer items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_CERVICAL_CANCERS="Search the cervical cancer items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_CLINICS="Search the clinic items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_COUNSELING_TYPES="Search the counseling type items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_DIAGNOSIS_TYPES="Search the diagnosis type items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_FAMILY_PLANNINGS="Search the family planning items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_FOETAL_ENGAGEMENTS="Search the foetal engagement items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_FOETAL_LIES="Search the foetal lie items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_FOETAL_PRESENTATIONS="Search the foetal presentation items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_GENERAL_MEDICAL_CHECK_UPS="Search the general medical check up items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_HEALTH_EDUCATIONS="Search the health education items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_HEALTH_EDUCATION_TOPICS="Search the health education topic items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_HIV_COUNSELINGS_AND_TESTINGS="Search the hiv counseling and testing items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_IMMUNISATIONS="Search the immunisation items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_IMMUNISATION_TYPES="Search the immunisation type items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_IMMUNISATION_VACCINE_TYPES="Search the immunisation vaccine type items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_MEDICATIONS="Search the medication items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_NONPAY_REASONS="Search the nonpay reason items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_PAYMENTS="Search the payment items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_PAYMENT_AMOUNTS="Search the payment amount items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_PAYMENT_TYPES="Search the payment type items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_PLANNING_TYPES="Search the planning type items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_PROSTATE_AND_TESTICULAR_CANCERS="Search the prostate and testicular cancer items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_REFERRALS="Search the referral items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_SITES="Search the site items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_STRENGTHS="Search the strength items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_TESTING_REASONS="Search the testing reason items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_TESTS="Search the test items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_TUBERCULOSES="Search the tuberculosis items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_UNITS="Search the unit items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SEARCH_VMMCS="Search the vmmc items. Prefix with ID: to search for an item by ID." -COM_EHEALTH_PORTAL_FILTER_SELECT_ACCESS="Select Access" -COM_EHEALTH_PORTAL_FILTER_SELECT_ADMINISTRATION_PART="Select Administration Part" -COM_EHEALTH_PORTAL_FILTER_SELECT_AMOUNT_N="Select Amount (N$):" -COM_EHEALTH_PORTAL_FILTER_SELECT_FAMILY_PLANNING_TYPE_ASCENDING="Select Family Planning Type ascending" -COM_EHEALTH_PORTAL_FILTER_SELECT_FAMILY_PLANNING_TYPE_DESCENDING="Select Family Planning Type descending" -COM_EHEALTH_PORTAL_FILTER_SELECT_FOETAL_POLESLIE="Select Foetal poles/lie" -COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME="Select Patient Name" -COM_EHEALTH_PORTAL_FILTER_SELECT_PAYMENT_CATEGORY="Select Payment Category" -COM_EHEALTH_PORTAL_FILTER_SELECT_REFERRED_TO="Select Referred to" -COM_EHEALTH_PORTAL_FILTER_SELECT_TOPIC_ASCENDING="Select Topic: ascending" -COM_EHEALTH_PORTAL_FILTER_SELECT_TOPIC_DESCENDING="Select Topic: descending" -COM_EHEALTH_PORTAL_FILTER_SELECT_TYPE="Select Type" -COM_EHEALTH_PORTAL_FILTER_SITE_NAME_ASCENDING="Site Name ascending" -COM_EHEALTH_PORTAL_FILTER_SITE_NAME_DESCENDING="Site Name descending" -COM_EHEALTH_PORTAL_FILTER_SITE_REGION_ASCENDING="Site Region ascending" -COM_EHEALTH_PORTAL_FILTER_SITE_REGION_DESCENDING="Site Region descending" -COM_EHEALTH_PORTAL_FILTER_TWOND_TEMP_READING_C_ASCENDING="2nd Temp. Reading (*C): ascending" -COM_EHEALTH_PORTAL_FILTER_TWOND_TEMP_READING_C_DESCENDING="2nd Temp. Reading (*C): descending" -COM_EHEALTH_PORTAL_FILTER_WEIGHT_KG_ASCENDING="Weight (kg) ascending" -COM_EHEALTH_PORTAL_FILTER_WEIGHT_KG_DESCENDING="Weight (kg) descending" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT="Foetal Engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS="Foetal Engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_ACCESS="Foetal Engagements Access" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_ACCESS_DESC="Allows the users in this group to access access foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_BATCH_OPTIONS="Batch process the selected Foetal Engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_BATCH_TIP="All changes will be applied to all selected Foetal Engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_BATCH_USE="Foetal Engagements Batch Use" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION="Foetal Engagements Edit Description" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME="Foetal Engagements Edit Name" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION="Foetal Engagements Edit Version" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EXPORT="Foetal Engagements Export" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EXPORT_DESC="Allows the users in this group to export export foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_IMPORT="Foetal Engagements Import" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_IMPORT_DESC="Allows the users in this group to import import foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_ARCHIVED="%s Foetal Engagements archived." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_ARCHIVED_1="%s Foetal Engagement archived." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_CHECKED_IN_0="No Foetal Engagement successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_CHECKED_IN_1="%d Foetal Engagement successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_CHECKED_IN_MORE="%d Foetal Engagements successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_DELETED="%s Foetal Engagements deleted." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_DELETED_1="%s Foetal Engagement deleted." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FAILED_PUBLISHING="%s Foetal Engagements failed publishing." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Foetal Engagement failed publishing." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FEATURED="%s Foetal Engagements featured." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FEATURED_1="%s Foetal Engagement featured." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_PUBLISHED="%s Foetal Engagements published." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_PUBLISHED_1="%s Foetal Engagement published." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_TRASHED="%s Foetal Engagements trashed." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_TRASHED_1="%s Foetal Engagement trashed." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNFEATURED="%s Foetal Engagements unfeatured." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNFEATURED_1="%s Foetal Engagement unfeatured." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNPUBLISHED="%s Foetal Engagements unpublished." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNPUBLISHED_1="%s Foetal Engagement unpublished." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_CREATED_BY_DESC="The user that created this Foetal Engagement." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_CREATED_DATE_DESC="The date this Foetal Engagement was created." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_DETAILS="Details" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_EDIT="Editing the Foetal Engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_ERROR_UNIQUE_ALIAS="Another Foetal Engagement has the same alias." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_ID="Id" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_MODIFIED_BY_DESC="The last user that modified this Foetal Engagement." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_MODIFIED_DATE_DESC="The date this Foetal Engagement was modified." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_NEW="A New Foetal Engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Foetal Engagement to customise the alias." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_STATUS="Status" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_VERSION_DESC="A count of the number of times this Foetal Engagement has been revised." -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_FOETAL_LIE="Foetal Lie" -COM_EHEALTH_PORTAL_FOETAL_LIES="Foetal Lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_ACCESS="Foetal Lies Access" -COM_EHEALTH_PORTAL_FOETAL_LIES_ACCESS_DESC="Allows the users in this group to access access foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_BATCH_OPTIONS="Batch process the selected Foetal Lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_BATCH_TIP="All changes will be applied to all selected Foetal Lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_BATCH_USE="Foetal Lies Batch Use" -COM_EHEALTH_PORTAL_FOETAL_LIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_DESCRIPTION="Foetal Lies Edit Description" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal lie" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_NAME="Foetal Lies Edit Name" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal lie" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_VERSION="Foetal Lies Edit Version" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_EXPORT="Foetal Lies Export" -COM_EHEALTH_PORTAL_FOETAL_LIES_EXPORT_DESC="Allows the users in this group to export export foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_IMPORT="Foetal Lies Import" -COM_EHEALTH_PORTAL_FOETAL_LIES_IMPORT_DESC="Allows the users in this group to import import foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_ARCHIVED="%s Foetal Lies archived." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_ARCHIVED_1="%s Foetal Lie archived." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_CHECKED_IN_0="No Foetal Lie successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_CHECKED_IN_1="%d Foetal Lie successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_CHECKED_IN_MORE="%d Foetal Lies successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_DELETED="%s Foetal Lies deleted." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_DELETED_1="%s Foetal Lie deleted." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_FAILED_PUBLISHING="%s Foetal Lies failed publishing." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_FAILED_PUBLISHING_1="%s Foetal Lie failed publishing." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_FEATURED="%s Foetal Lies featured." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_FEATURED_1="%s Foetal Lie featured." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_PUBLISHED="%s Foetal Lies published." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_PUBLISHED_1="%s Foetal Lie published." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_TRASHED="%s Foetal Lies trashed." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_TRASHED_1="%s Foetal Lie trashed." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_UNFEATURED="%s Foetal Lies unfeatured." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_UNFEATURED_1="%s Foetal Lie unfeatured." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_UNPUBLISHED="%s Foetal Lies unpublished." -COM_EHEALTH_PORTAL_FOETAL_LIES_N_ITEMS_UNPUBLISHED_1="%s Foetal Lie unpublished." -COM_EHEALTH_PORTAL_FOETAL_LIE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_FOETAL_LIE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_FOETAL_LIE_CREATED_BY_DESC="The user that created this Foetal Lie." -COM_EHEALTH_PORTAL_FOETAL_LIE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_FOETAL_LIE_CREATED_DATE_DESC="The date this Foetal Lie was created." -COM_EHEALTH_PORTAL_FOETAL_LIE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_FOETAL_LIE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_FOETAL_LIE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_FOETAL_LIE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_FOETAL_LIE_DETAILS="Details" -COM_EHEALTH_PORTAL_FOETAL_LIE_EDIT="Editing the Foetal Lie" -COM_EHEALTH_PORTAL_FOETAL_LIE_ERROR_UNIQUE_ALIAS="Another Foetal Lie has the same alias." -COM_EHEALTH_PORTAL_FOETAL_LIE_ID="Id" -COM_EHEALTH_PORTAL_FOETAL_LIE_MODIFIED_BY_DESC="The last user that modified this Foetal Lie." -COM_EHEALTH_PORTAL_FOETAL_LIE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_FOETAL_LIE_MODIFIED_DATE_DESC="The date this Foetal Lie was modified." -COM_EHEALTH_PORTAL_FOETAL_LIE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_FOETAL_LIE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_FOETAL_LIE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_FOETAL_LIE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_FOETAL_LIE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_FOETAL_LIE_NEW="A New Foetal Lie" -COM_EHEALTH_PORTAL_FOETAL_LIE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_FOETAL_LIE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_FOETAL_LIE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_FOETAL_LIE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Foetal Lie to customise the alias." -COM_EHEALTH_PORTAL_FOETAL_LIE_STATUS="Status" -COM_EHEALTH_PORTAL_FOETAL_LIE_VERSION_DESC="A count of the number of times this Foetal Lie has been revised." -COM_EHEALTH_PORTAL_FOETAL_LIE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION="Foetal Presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS="Foetal Presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_ACCESS="Foetal Presentations Access" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_ACCESS_DESC="Allows the users in this group to access access foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_BATCH_OPTIONS="Batch process the selected Foetal Presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_BATCH_TIP="All changes will be applied to all selected Foetal Presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_BATCH_USE="Foetal Presentations Batch Use" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION="Foetal Presentations Edit Description" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_NAME="Foetal Presentations Edit Name" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION="Foetal Presentations Edit Version" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EXPORT="Foetal Presentations Export" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EXPORT_DESC="Allows the users in this group to export export foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_IMPORT="Foetal Presentations Import" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_IMPORT_DESC="Allows the users in this group to import import foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_ARCHIVED="%s Foetal Presentations archived." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_ARCHIVED_1="%s Foetal Presentation archived." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_CHECKED_IN_0="No Foetal Presentation successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_CHECKED_IN_1="%d Foetal Presentation successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_CHECKED_IN_MORE="%d Foetal Presentations successfully checked in." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_DELETED="%s Foetal Presentations deleted." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_DELETED_1="%s Foetal Presentation deleted." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FAILED_PUBLISHING="%s Foetal Presentations failed publishing." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Foetal Presentation failed publishing." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FEATURED="%s Foetal Presentations featured." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FEATURED_1="%s Foetal Presentation featured." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_PUBLISHED="%s Foetal Presentations published." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_PUBLISHED_1="%s Foetal Presentation published." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_TRASHED="%s Foetal Presentations trashed." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_TRASHED_1="%s Foetal Presentation trashed." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNFEATURED="%s Foetal Presentations unfeatured." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNFEATURED_1="%s Foetal Presentation unfeatured." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNPUBLISHED="%s Foetal Presentations unpublished." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNPUBLISHED_1="%s Foetal Presentation unpublished." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_CREATED_BY_DESC="The user that created this Foetal Presentation." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_CREATED_DATE_DESC="The date this Foetal Presentation was created." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_DETAILS="Details" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_EDIT="Editing the Foetal Presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_ERROR_UNIQUE_ALIAS="Another Foetal Presentation has the same alias." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_ID="Id" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_MODIFIED_BY_DESC="The last user that modified this Foetal Presentation." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_MODIFIED_DATE_DESC="The date this Foetal Presentation was modified." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_NEW="A New Foetal Presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Foetal Presentation to customise the alias." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_STATUS="Status" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_VERSION_DESC="A count of the number of times this Foetal Presentation has been revised." -COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP="General Medical Check Up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS="General Medical Check Ups Access" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS_DESC="Allows the users in this group to access access general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_OPTIONS="Batch process the selected General Medical Check Ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_TIP="All changes will be applied to all selected General Medical Check Ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE="General Medical Check Ups Batch Use" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD="General Medical Check Ups Dashboard Add" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST="General Medical Check Ups Dashboard List" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT="General Medical Check Ups Edit Patient" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION="General Medical Check Ups Edit Version" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT="General Medical Check Ups Export" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT_DESC="Allows the users in this group to export export general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT="General Medical Check Ups Import" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT_DESC="Allows the users in this group to import import general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_ARCHIVED="%s General Medical Check Ups archived." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_ARCHIVED_1="%s General Medical Check Up archived." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_CHECKED_IN_0="No General Medical Check Up successfully checked in." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_CHECKED_IN_1="%d General Medical Check Up successfully checked in." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_CHECKED_IN_MORE="%d General Medical Check Ups successfully checked in." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_DELETED="%s General Medical Check Ups deleted." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_DELETED_1="%s General Medical Check Up deleted." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FAILED_PUBLISHING="%s General Medical Check Ups failed publishing." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FAILED_PUBLISHING_1="%s General Medical Check Up failed publishing." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FEATURED="%s General Medical Check Ups featured." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FEATURED_1="%s General Medical Check Up featured." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_PUBLISHED="%s General Medical Check Ups published." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_PUBLISHED_1="%s General Medical Check Up published." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_TRASHED="%s General Medical Check Ups trashed." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_TRASHED_1="%s General Medical Check Up trashed." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNFEATURED="%s General Medical Check Ups unfeatured." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNFEATURED_1="%s General Medical Check Up unfeatured." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNPUBLISHED="%s General Medical Check Ups unpublished." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNPUBLISHED_1="%s General Medical Check Up unpublished." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU="General Medical Check Ups Submenu" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU_DESC="Allows the users in this group to submenu of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BMI_DESCRIPTION="Enter pulse in beats per minute" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BMI_LABEL="BMI" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_ONE_DESCRIPTION="Enter BP(1)-Diastolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_ONE_LABEL="BP(1)-Diastolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_TWO_DESCRIPTION="Enter BP(2)-Diastolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_TWO_LABEL="BP(2)-Diastolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_ONE_DESCRIPTION="Enter BP(1)-Systolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_ONE_LABEL="BP(1)-Systolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_TWO_DESCRIPTION="Enter BP(2)-Systolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_TWO_LABEL="BP(2)-Systolic" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_CHRONIC_MEDICATION_DESCRIPTION="Chronic Medication" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_CHRONIC_MEDICATION_LABEL="Chronic Medication?" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_COMPLAINT_DESCRIPTION="Add Complaint Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_COMPLAINT_HINT="Add Complaint Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_COMPLAINT_LABEL="Complaint" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_BY_DESC="The user that created this General Medical Check Up." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_DATE_DESC="The date this General Medical Check Up was created." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_DIAGNOSIS="Diagnosis" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_DIAGNOSIS_DESCRIPTION="Select Diagnosis" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_DIAGNOSIS_LABEL="Select Diagnosis" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_DISPENSING="Dispensing" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_DISPENSING_LABEL="Dispensing" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_EDIT="Editing the General Medical Check Up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_ERROR_UNIQUE_ALIAS="Another General Medical Check Up has the same alias." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_HEIGHT_LABEL="Height (m)" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_ID="Id" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_INSTRUCTIONS_DESCRIPTION="Add Instructions Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_INSTRUCTIONS_HINT="Add Instructions Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_INSTRUCTIONS_LABEL="Instructions" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_INVESTIGATIONS_DESCRIPTION="Add Investigation Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_INVESTIGATIONS_HINT="Add Investigation Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_INVESTIGATIONS_LABEL="Investigations" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MEDICATION="Medication" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MEDICATION_DESCRIPTION="Select Medication" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MEDICATION_LABEL="Select Medication" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_BY_DESC="The last user that modified this General Medical Check Up." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_DATE_DESC="The date this General Medical Check Up was modified." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_NEW="A New General Medical Check Up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_NOTES_DESCRIPTION="Add Notes Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_NOTES_HINT="Add notes here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_NOTES_LABEL="Notes" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_PULSE_DESCRIPTION="Enter pulse in beats per minute" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_PULSE_LABEL="Pulse" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_QUANTITY_DESCRIPTION="Enter quantity" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_QUANTITY_LABEL="Quantity" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the General Medical Check Up to customise the alias." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_STATUS="Status" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_STRENGTH="Strength" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_STRENGTH_DESCRIPTION="Select Strength" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_STRENGTH_LABEL="Select Strength" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_ONE_DESCRIPTION="1st temperature reading in degree celsius" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_ONE_LABEL="1st Temp. Reading (*C):" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_TWO_DESCRIPTION="2nd temperature reading in degree celsius." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_TWO_LABEL="2nd Temp. Reading (*C):" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_UNIT="Unit" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_UNIT_DESCRIPTION="Select Units" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_UNIT_LABEL="Select Unit" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_VERSION_DESC="A count of the number of times this General Medical Check Up has been revised." -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_VITAL_SIGNS="Vital Signs" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_WEIGHT_LABEL="Weight (kg)" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION="Health Education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS="Health Educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_ACCESS="Health Educations Access" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_ACCESS_DESC="Allows the users in this group to access access health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_BATCH_OPTIONS="Batch process the selected Health Educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_BATCH_TIP="All changes will be applied to all selected Health Educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_BATCH_USE="Health Educations Batch Use" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD="Health Educations Dashboard Add" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST="Health Educations Dashboard List" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC="Health Educations Edit Health Education Topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC_DESC="Allows the users in this group to edit health education topic of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_VERSION="Health Educations Edit Version" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EXPORT="Health Educations Export" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EXPORT_DESC="Allows the users in this group to export export health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_IMPORT="Health Educations Import" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_IMPORT_DESC="Allows the users in this group to import import health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_ARCHIVED="%s Health Educations archived." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_ARCHIVED_1="%s Health Education archived." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_CHECKED_IN_0="No Health Education successfully checked in." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_CHECKED_IN_1="%d Health Education successfully checked in." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_CHECKED_IN_MORE="%d Health Educations successfully checked in." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_DELETED="%s Health Educations deleted." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_DELETED_1="%s Health Education deleted." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_FAILED_PUBLISHING="%s Health Educations failed publishing." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Health Education failed publishing." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_FEATURED="%s Health Educations featured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_FEATURED_1="%s Health Education featured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_PUBLISHED="%s Health Educations published." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_PUBLISHED_1="%s Health Education published." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_TRASHED="%s Health Educations trashed." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_TRASHED_1="%s Health Education trashed." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNFEATURED="%s Health Educations unfeatured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNFEATURED_1="%s Health Education unfeatured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNPUBLISHED="%s Health Educations unpublished." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNPUBLISHED_1="%s Health Education unpublished." -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_SUBMENU="Health Educations Submenu" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_SUBMENU_DESC="Allows the users in this group to submenu of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_CREATED_BY_DESC="The user that created this Health Education." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_CREATED_DATE_DESC="The date this Health Education was created." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_DETAILS="Details" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_EDIT="Editing the Health Education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_EDUCATION_TYPE_DESCRIPTION="Health education type" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_EDUCATION_TYPE_LABEL="Type" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_ERROR_UNIQUE_ALIAS="Another Health Education has the same alias." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_GROUP="Group" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_HEALTH_EDUCATION_TOPIC_DESCRIPTION="Select Health Education Topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_HEALTH_EDUCATION_TOPIC_LABEL="Select Topic:" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_ID="Id" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_INDIVIDUAL="Individual" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_MODIFIED_BY_DESC="The last user that modified this Health Education." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_MODIFIED_DATE_DESC="The date this Health Education was modified." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_NEW="A New Health Education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Health Education to customise the alias." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_STATUS="Status" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC="Health Education Topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS="Health Education Topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_ACCESS="Health Education Topics Access" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_ACCESS_DESC="Allows the users in this group to access access health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_BATCH_OPTIONS="Batch process the selected Health Education Topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_BATCH_TIP="All changes will be applied to all selected Health Education Topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE="Health Education Topics Batch Use" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION="Health Education Topics Edit Description" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of health education topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME="Health Education Topics Edit Name" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME_DESC="Allows the users in this group to edit name of health education topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION="Health Education Topics Edit Version" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EXPORT="Health Education Topics Export" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EXPORT_DESC="Allows the users in this group to export export health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_IMPORT="Health Education Topics Import" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_IMPORT_DESC="Allows the users in this group to import import health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_ARCHIVED="%s Health Education Topics archived." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_ARCHIVED_1="%s Health Education Topic archived." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_CHECKED_IN_0="No Health Education Topic successfully checked in." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_CHECKED_IN_1="%d Health Education Topic successfully checked in." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_CHECKED_IN_MORE="%d Health Education Topics successfully checked in." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_DELETED="%s Health Education Topics deleted." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_DELETED_1="%s Health Education Topic deleted." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FAILED_PUBLISHING="%s Health Education Topics failed publishing." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FAILED_PUBLISHING_1="%s Health Education Topic failed publishing." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FEATURED="%s Health Education Topics featured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FEATURED_1="%s Health Education Topic featured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_PUBLISHED="%s Health Education Topics published." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_PUBLISHED_1="%s Health Education Topic published." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_TRASHED="%s Health Education Topics trashed." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_TRASHED_1="%s Health Education Topic trashed." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNFEATURED="%s Health Education Topics unfeatured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNFEATURED_1="%s Health Education Topic unfeatured." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNPUBLISHED="%s Health Education Topics unpublished." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNPUBLISHED_1="%s Health Education Topic unpublished." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_CREATED_BY_DESC="The user that created this Health Education Topic." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_CREATED_DATE_DESC="The date this Health Education Topic was created." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_DETAILS="Details" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_EDIT="Editing the Health Education Topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_ERROR_UNIQUE_ALIAS="Another Health Education Topic has the same alias." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_ID="Id" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_BY_DESC="The last user that modified this Health Education Topic." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_DATE_DESC="The date this Health Education Topic was modified." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_NEW="A New Health Education Topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Health Education Topic to customise the alias." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_STATUS="Status" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_VERSION_DESC="A count of the number of times this Health Education Topic has been revised." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_VERSION_DESC="A count of the number of times this Health Education has been revised." -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_HELP_MANAGER="Help" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS="HIV Counselings and Testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS="Hiv Counselings And Testings Access" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS_DESC="Allows the users in this group to access access hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_OPTIONS="Batch process the selected HIV Counselings and Testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_TIP="All changes will be applied to all selected HIV Counselings and Testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE="Hiv Counselings And Testings Batch Use" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD="Hiv Counselings And Testings Dashboard Add" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of hiv counseling and testing" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST="Hiv Counselings And Testings Dashboard List" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of hiv counseling and testing" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION="Hiv Counselings And Testings Edit Version" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT="Hiv Counselings And Testings Export" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT_DESC="Allows the users in this group to export export hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT="Hiv Counselings And Testings Import" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT_DESC="Allows the users in this group to import import hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_ARCHIVED="%s HIV Counselings and Testings archived." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_ARCHIVED_1="%s HIV Counseling and Testing archived." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_CHECKED_IN_0="No HIV Counseling and Testing successfully checked in." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_CHECKED_IN_1="%d HIV Counseling and Testing successfully checked in." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_CHECKED_IN_MORE="%d HIV Counselings and Testings successfully checked in." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_DELETED="%s HIV Counselings and Testings deleted." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_DELETED_1="%s HIV Counseling and Testing deleted." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FAILED_PUBLISHING="%s HIV Counselings and Testings failed publishing." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FAILED_PUBLISHING_1="%s HIV Counseling and Testing failed publishing." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FEATURED="%s HIV Counselings and Testings featured." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FEATURED_1="%s HIV Counseling and Testing featured." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_PUBLISHED="%s HIV Counselings and Testings published." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_PUBLISHED_1="%s HIV Counseling and Testing published." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_TRASHED="%s HIV Counselings and Testings trashed." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_TRASHED_1="%s HIV Counseling and Testing trashed." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNFEATURED="%s HIV Counselings and Testings unfeatured." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNFEATURED_1="%s HIV Counseling and Testing unfeatured." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNPUBLISHED="%s HIV Counselings and Testings unpublished." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNPUBLISHED_1="%s HIV Counseling and Testing unpublished." -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU="Hiv Counselings And Testings Submenu" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU_DESC="Allows the users in this group to submenu of hiv counseling and testing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING="HIV Counseling and Testing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_COUNSELING_TYPE_LABEL="Type of counseling?" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_COUPLE="Couple" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_CREATED_BY_DESC="The user that created this HIV Counseling and Testing." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_CREATED_DATE_DESC="The date this HIV Counseling and Testing was created." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_DETAILS="Details" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_EDIT="Editing the HIV Counseling and Testing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_EQA_LABEL="EQA" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_ERROR_UNIQUE_ALIAS="Another HIV Counseling and Testing has the same alias." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_FINAL_TEST_RESULT_DESCRIPTION="Final test result" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_FINAL_TEST_RESULT_LABEL="Final test result" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_ID="Id" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE="Inconclusive" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_INDIVIDUAL="Individual" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_LAST_TEST_DATE_DESCRIPTION="When last did you test" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_LAST_TEST_DATE_LABEL="When last did you test" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_MINOR="Minor" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_BY_DESC="The last user that modified this HIV Counseling and Testing." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_DATE_DESC="The date this HIV Counseling and Testing was modified." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NA="N/A" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE="Negative" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEVER="Never" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEW="A New HIV Counseling and Testing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NO="No" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_ONESIX_MONTHS="1-6 Months" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE="Positive" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_PREV_TEST_RESULT_DESCRIPTION="Previous test results" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_PREV_TEST_RESULT_LABEL="Previous test results" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the HIV Counseling and Testing to customise the alias." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_SEVENTWELVE_MONTHS="7-12 Months" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_STATUS="Status" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_TESTING_REASON_DESCRIPTION="Select reason for testing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_TESTING_REASON_LABEL="Reason for testing" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_ONE_DESCRIPTION="Test result #1" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_ONE_LABEL="Test result #1" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_TWO_DESCRIPTION="Test result #2" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_TWO_LABEL="Test result #2" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN="Unknown" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_VERSION_DESC="A count of the number of times this HIV Counseling and Testing has been revised." -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_YES="Yes" -COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING__YEAR="> Year" -COM_EHEALTH_PORTAL_IMMUNISATION="Immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS="Immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_ACCESS="Immunisations Access" -COM_EHEALTH_PORTAL_IMMUNISATIONS_ACCESS_DESC="Allows the users in this group to access access immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_BATCH_OPTIONS="Batch process the selected Immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_BATCH_TIP="All changes will be applied to all selected Immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_BATCH_USE="Immunisations Batch Use" -COM_EHEALTH_PORTAL_IMMUNISATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_ADD="Immunisations Dashboard Add" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_LIST="Immunisations Dashboard List" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_PATIENT="Immunisations Edit Patient" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_VERSION="Immunisations Edit Version" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EXPORT="Immunisations Export" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EXPORT_DESC="Allows the users in this group to export export immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_IMPORT="Immunisations Import" -COM_EHEALTH_PORTAL_IMMUNISATIONS_IMPORT_DESC="Allows the users in this group to import import immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_ARCHIVED="%s Immunisations archived." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_ARCHIVED_1="%s Immunisation archived." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_CHECKED_IN_0="No Immunisation successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_CHECKED_IN_1="%d Immunisation successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_CHECKED_IN_MORE="%d Immunisations successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_DELETED="%s Immunisations deleted." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_DELETED_1="%s Immunisation deleted." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_FAILED_PUBLISHING="%s Immunisations failed publishing." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Immunisation failed publishing." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_FEATURED="%s Immunisations featured." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_FEATURED_1="%s Immunisation featured." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_PUBLISHED="%s Immunisations published." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_PUBLISHED_1="%s Immunisation published." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_TRASHED="%s Immunisations trashed." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_TRASHED_1="%s Immunisation trashed." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_UNFEATURED="%s Immunisations unfeatured." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_UNFEATURED_1="%s Immunisation unfeatured." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_UNPUBLISHED="%s Immunisations unpublished." -COM_EHEALTH_PORTAL_IMMUNISATIONS_N_ITEMS_UNPUBLISHED_1="%s Immunisation unpublished." -COM_EHEALTH_PORTAL_IMMUNISATIONS_SUBMENU="Immunisations Submenu" -COM_EHEALTH_PORTAL_IMMUNISATIONS_SUBMENU_DESC="Allows the users in this group to submenu of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATION_ADMINISTRATION_PART="Administration Part" -COM_EHEALTH_PORTAL_IMMUNISATION_ADMINISTRATION_PART_DESCRIPTION="Select Administration Body Part" -COM_EHEALTH_PORTAL_IMMUNISATION_ADMINISTRATION_PART_LABEL="Administration Part" -COM_EHEALTH_PORTAL_IMMUNISATION_CREATED_BY_DESC="The user that created this Immunisation." -COM_EHEALTH_PORTAL_IMMUNISATION_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_IMMUNISATION_CREATED_DATE_DESC="The date this Immunisation was created." -COM_EHEALTH_PORTAL_IMMUNISATION_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_IMMUNISATION_DETAILS="Details" -COM_EHEALTH_PORTAL_IMMUNISATION_EDIT="Editing the Immunisation" -COM_EHEALTH_PORTAL_IMMUNISATION_ERROR_UNIQUE_ALIAS="Another Immunisation has the same alias." -COM_EHEALTH_PORTAL_IMMUNISATION_ID="Id" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_LABEL="Immunisation" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_TYPE="Immunisation Type" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_TYPE_DESCRIPTION="Select immunisation type" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_TYPE_LABEL="Type" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_UP_TO_DATE_DESCRIPTION="Immunisation up-to-date" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_UP_TO_DATE_LABEL="Immunisation up-to-date" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_VACCINE_TYPE="Immunisation Vaccine Type" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_VACCINE_TYPE_DESCRIPTION="Select Immunisation Vaccine Type" -COM_EHEALTH_PORTAL_IMMUNISATION_IMMUNISATION_VACCINE_TYPE_LABEL="Vaccine" -COM_EHEALTH_PORTAL_IMMUNISATION_MODIFIED_BY_DESC="The last user that modified this Immunisation." -COM_EHEALTH_PORTAL_IMMUNISATION_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_IMMUNISATION_MODIFIED_DATE_DESC="The date this Immunisation was modified." -COM_EHEALTH_PORTAL_IMMUNISATION_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_IMMUNISATION_NEW="A New Immunisation" -COM_EHEALTH_PORTAL_IMMUNISATION_NO="No" -COM_EHEALTH_PORTAL_IMMUNISATION_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_IMMUNISATION_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_IMMUNISATION_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_IMMUNISATION_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_IMMUNISATION_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_IMMUNISATION_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_IMMUNISATION_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_IMMUNISATION_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_IMMUNISATION_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_IMMUNISATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Immunisation to customise the alias." -COM_EHEALTH_PORTAL_IMMUNISATION_STATUS="Status" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE="Immunisation Type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES="Immunisation Types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_ACCESS="Immunisation Types Access" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_BATCH_OPTIONS="Batch process the selected Immunisation Types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_BATCH_TIP="All changes will be applied to all selected Immunisation Types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_BATCH_USE="Immunisation Types Batch Use" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION="Immunisation Types Edit Description" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_NAME="Immunisation Types Edit Name" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_VERSION="Immunisation Types Edit Version" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EXPORT="Immunisation Types Export" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_IMPORT="Immunisation Types Import" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_ARCHIVED="%s Immunisation Types archived." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_ARCHIVED_1="%s Immunisation Type archived." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_CHECKED_IN_0="No Immunisation Type successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_CHECKED_IN_1="%d Immunisation Type successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Immunisation Types successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_DELETED="%s Immunisation Types deleted." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_DELETED_1="%s Immunisation Type deleted." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Immunisation Types failed publishing." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Immunisation Type failed publishing." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_FEATURED="%s Immunisation Types featured." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_FEATURED_1="%s Immunisation Type featured." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_PUBLISHED="%s Immunisation Types published." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_PUBLISHED_1="%s Immunisation Type published." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_TRASHED="%s Immunisation Types trashed." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_TRASHED_1="%s Immunisation Type trashed." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_UNFEATURED="%s Immunisation Types unfeatured." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_UNFEATURED_1="%s Immunisation Type unfeatured." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_UNPUBLISHED="%s Immunisation Types unpublished." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_N_ITEMS_UNPUBLISHED_1="%s Immunisation Type unpublished." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_CREATED_BY_DESC="The user that created this Immunisation Type." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_CREATED_DATE_DESC="The date this Immunisation Type was created." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_DETAILS="Details" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_EDIT="Editing the Immunisation Type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_ERROR_UNIQUE_ALIAS="Another Immunisation Type has the same alias." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_ID="Id" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_MODIFIED_BY_DESC="The last user that modified this Immunisation Type." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_MODIFIED_DATE_DESC="The date this Immunisation Type was modified." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_NEW="A New Immunisation Type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Immunisation Type to customise the alias." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_STATUS="Status" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_VERSION_DESC="A count of the number of times this Immunisation Type has been revised." -COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE="Immunisation Vaccine Type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES="Immunisation Vaccine Types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS="Immunisation Vaccine Types Access" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_OPTIONS="Batch process the selected Immunisation Vaccine Types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_TIP="All changes will be applied to all selected Immunisation Vaccine Types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE="Immunisation Vaccine Types Batch Use" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION="Immunisation Vaccine Types Edit Description" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation vaccine type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME="Immunisation Vaccine Types Edit Name" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation vaccine type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION="Immunisation Vaccine Types Edit Version" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT="Immunisation Vaccine Types Export" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT="Immunisation Vaccine Types Import" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_ARCHIVED="%s Immunisation Vaccine Types archived." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_ARCHIVED_1="%s Immunisation Vaccine Type archived." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_CHECKED_IN_0="No Immunisation Vaccine Type successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_CHECKED_IN_1="%d Immunisation Vaccine Type successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Immunisation Vaccine Types successfully checked in." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_DELETED="%s Immunisation Vaccine Types deleted." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_DELETED_1="%s Immunisation Vaccine Type deleted." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Immunisation Vaccine Types failed publishing." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Immunisation Vaccine Type failed publishing." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FEATURED="%s Immunisation Vaccine Types featured." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FEATURED_1="%s Immunisation Vaccine Type featured." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_PUBLISHED="%s Immunisation Vaccine Types published." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_PUBLISHED_1="%s Immunisation Vaccine Type published." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_TRASHED="%s Immunisation Vaccine Types trashed." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_TRASHED_1="%s Immunisation Vaccine Type trashed." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNFEATURED="%s Immunisation Vaccine Types unfeatured." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNFEATURED_1="%s Immunisation Vaccine Type unfeatured." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNPUBLISHED="%s Immunisation Vaccine Types unpublished." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNPUBLISHED_1="%s Immunisation Vaccine Type unpublished." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU="Immunisation Vaccine Types Submenu" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of immunisation vaccine type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ADMINISTRATION_PART_DESCRIPTION="Select Administration Body Part" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ADMINISTRATION_PART_LABEL="Administration Part" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_BY_DESC="The user that created this Immunisation Vaccine Type." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_DATE_DESC="The date this Immunisation Vaccine Type was created." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_DETAILS="Details" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_EDIT="Editing the Immunisation Vaccine Type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ERROR_UNIQUE_ALIAS="Another Immunisation Vaccine Type has the same alias." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ID="Id" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_BY_DESC="The last user that modified this Immunisation Vaccine Type." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_DATE_DESC="The date this Immunisation Vaccine Type was modified." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_NEW="A New Immunisation Vaccine Type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Immunisation Vaccine Type to customise the alias." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_STATUS="Status" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_VERSION_DESC="A count of the number of times this Immunisation Vaccine Type has been revised." -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_IMMUNISATION_VERSION_DESC="A count of the number of times this Immunisation has been revised." -COM_EHEALTH_PORTAL_IMMUNISATION_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_IMMUNISATION_YES="Yes" -COM_EHEALTH_PORTAL_IMPORT_CONTINUE="Continue" -COM_EHEALTH_PORTAL_IMPORT_DATA="Import Data" -COM_EHEALTH_PORTAL_IMPORT_DATA_DESC="Allows users in this group to import data." -COM_EHEALTH_PORTAL_IMPORT_ERROR="Import error." -COM_EHEALTH_PORTAL_IMPORT_FAILED="Import Failed" -COM_EHEALTH_PORTAL_IMPORT_FILE_COLUMNS="File Columns" -COM_EHEALTH_PORTAL_IMPORT_FORMATS_ACCEPTED="formats accepted" -COM_EHEALTH_PORTAL_IMPORT_FROM_DIRECTORY="Directory" -COM_EHEALTH_PORTAL_IMPORT_FROM_UPLOAD="Upload" -COM_EHEALTH_PORTAL_IMPORT_FROM_URL="URL" -COM_EHEALTH_PORTAL_IMPORT_GET_BOTTON="Get File" -COM_EHEALTH_PORTAL_IMPORT_IGNORE_COLUMN="-- Ignore This Column --" -COM_EHEALTH_PORTAL_IMPORT_LINK_FILE_TO_TABLE_COLUMNS="Link File to Table Columns" -COM_EHEALTH_PORTAL_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE="Does not have a valid file type." -COM_EHEALTH_PORTAL_IMPORT_MSG_ENTER_A_URL="Please enter a url." -COM_EHEALTH_PORTAL_IMPORT_MSG_INVALID_URL="Invalid url." -COM_EHEALTH_PORTAL_IMPORT_MSG_NO_FILE_SELECTED="No import file selected." -COM_EHEALTH_PORTAL_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE="Path does not have a valid file." -COM_EHEALTH_PORTAL_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY="Please enter the file directory." -COM_EHEALTH_PORTAL_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS="Please link all columns." -COM_EHEALTH_PORTAL_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY="Please enter the file directory." -COM_EHEALTH_PORTAL_IMPORT_MSG_PLEASE_SELECT_A_FILE="Please select a file to import." -COM_EHEALTH_PORTAL_IMPORT_MSG_WARNIMPORTFILE="Warning, import file error." -COM_EHEALTH_PORTAL_IMPORT_MSG_WARNIMPORTUPLOADERROR="Warning, import upload error." -COM_EHEALTH_PORTAL_IMPORT_NO_IMPORT_TYPE_FOUND="Import type not found." -COM_EHEALTH_PORTAL_IMPORT_PLEASE_SELECT_COLUMN="-- Please Select Column --" -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE="Select File" -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_DIRECTORY="Set the path to file" -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_ADMINISTRATION_PARTS="Select the file to import data to administration_parts." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_ANTENATAL_CARES="Select the file to import data to antenatal_cares." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_BREAST_CANCERS="Select the file to import data to breast_cancers." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_CERVICAL_CANCERS="Select the file to import data to cervical_cancers." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_CLINICS="Select the file to import data to clinics." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_COUNSELING_TYPES="Select the file to import data to counseling_types." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_DIAGNOSIS_TYPES="Select the file to import data to diagnosis_types." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FAMILY_PLANNINGS="Select the file to import data to family_plannings." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_ENGAGEMENTS="Select the file to import data to foetal_engagements." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_LIES="Select the file to import data to foetal_lies." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_PRESENTATIONS="Select the file to import data to foetal_presentations." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_GENERAL_MEDICAL_CHECK_UPS="Select the file to import data to general_medical_check_ups." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATIONS="Select the file to import data to health_educations." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATION_TOPICS="Select the file to import data to health_education_topics." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_HIV_COUNSELINGS_AND_TESTINGS="Select the file to import data to hiv_counselings_and_testings." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATIONS="Select the file to import data to immunisations." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_TYPES="Select the file to import data to immunisation_types." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_VACCINE_TYPES="Select the file to import data to immunisation_vaccine_types." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_MEDICATIONS="Select the file to import data to medications." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_NONPAY_REASONS="Select the file to import data to nonpay_reasons." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PAYMENTS="Select the file to import data to payments." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PAYMENT_AMOUNTS="Select the file to import data to payment_amounts." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PAYMENT_TYPES="Select the file to import data to payment_types." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PLANNING_TYPES="Select the file to import data to planning_types." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_PROSTATE_AND_TESTICULAR_CANCERS="Select the file to import data to prostate_and_testicular_cancers." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_REFERRALS="Select the file to import data to referrals." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_SITES="Select the file to import data to sites." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_STRENGTHS="Select the file to import data to strengths." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_TESTING_REASONS="Select the file to import data to testing_reasons." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_TESTS="Select the file to import data to tests." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_TUBERCULOSES="Select the file to import data to tuberculoses." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_UNITS="Select the file to import data to units." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_FOR_VMMCS="Select the file to import data to vmmcs." -COM_EHEALTH_PORTAL_IMPORT_SELECT_FILE_URL="Enter file URL" -COM_EHEALTH_PORTAL_IMPORT_SUCCESS="Great! Import successful." -COM_EHEALTH_PORTAL_IMPORT_TABLE_COLUMNS="Table Columns" -COM_EHEALTH_PORTAL_IMPORT_TITLE="Data Importer" -COM_EHEALTH_PORTAL_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found." -COM_EHEALTH_PORTAL_IMPORT_UPDATE_DATA="Import Data" -COM_EHEALTH_PORTAL_IMPORT_UPLOAD_BOTTON="Upload File" -COM_EHEALTH_PORTAL_INACTIVE="Inactive" -COM_EHEALTH_PORTAL_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" -COM_EHEALTH_PORTAL_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -" -COM_EHEALTH_PORTAL_KEEP_ORIGINAL_STATE="- Keep Original State -" -COM_EHEALTH_PORTAL_LICENSE="License" -COM_EHEALTH_PORTAL_MEDICATION="Medication" -COM_EHEALTH_PORTAL_MEDICATIONS="Medications" -COM_EHEALTH_PORTAL_MEDICATIONS_ACCESS="Medications Access" -COM_EHEALTH_PORTAL_MEDICATIONS_ACCESS_DESC="Allows the users in this group to access access medications" -COM_EHEALTH_PORTAL_MEDICATIONS_BATCH_OPTIONS="Batch process the selected Medications" -COM_EHEALTH_PORTAL_MEDICATIONS_BATCH_TIP="All changes will be applied to all selected Medications" -COM_EHEALTH_PORTAL_MEDICATIONS_BATCH_USE="Medications Batch Use" -COM_EHEALTH_PORTAL_MEDICATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch medications" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_DESCRIPTION="Medications Edit Description" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of medication" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_NAME="Medications Edit Name" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of medication" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_VERSION="Medications Edit Version" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version medications" -COM_EHEALTH_PORTAL_MEDICATIONS_EXPORT="Medications Export" -COM_EHEALTH_PORTAL_MEDICATIONS_EXPORT_DESC="Allows the users in this group to export export medications" -COM_EHEALTH_PORTAL_MEDICATIONS_IMPORT="Medications Import" -COM_EHEALTH_PORTAL_MEDICATIONS_IMPORT_DESC="Allows the users in this group to import import medications" -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_ARCHIVED="%s Medications archived." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_ARCHIVED_1="%s Medication archived." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_CHECKED_IN_0="No Medication successfully checked in." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_CHECKED_IN_1="%d Medication successfully checked in." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_CHECKED_IN_MORE="%d Medications successfully checked in." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_DELETED="%s Medications deleted." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_DELETED_1="%s Medication deleted." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_FAILED_PUBLISHING="%s Medications failed publishing." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Medication failed publishing." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_FEATURED="%s Medications featured." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_FEATURED_1="%s Medication featured." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_PUBLISHED="%s Medications published." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_PUBLISHED_1="%s Medication published." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_TRASHED="%s Medications trashed." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_TRASHED_1="%s Medication trashed." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_UNFEATURED="%s Medications unfeatured." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_UNFEATURED_1="%s Medication unfeatured." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_UNPUBLISHED="%s Medications unpublished." -COM_EHEALTH_PORTAL_MEDICATIONS_N_ITEMS_UNPUBLISHED_1="%s Medication unpublished." -COM_EHEALTH_PORTAL_MEDICATIONS_SUBMENU="Medications Submenu" -COM_EHEALTH_PORTAL_MEDICATIONS_SUBMENU_DESC="Allows the users in this group to submenu of medication" -COM_EHEALTH_PORTAL_MEDICATION_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_MEDICATION_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_MEDICATION_CREATED_BY_DESC="The user that created this Medication." -COM_EHEALTH_PORTAL_MEDICATION_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_MEDICATION_CREATED_DATE_DESC="The date this Medication was created." -COM_EHEALTH_PORTAL_MEDICATION_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_MEDICATION_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_MEDICATION_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_MEDICATION_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_MEDICATION_DETAILS="Details" -COM_EHEALTH_PORTAL_MEDICATION_EDIT="Editing the Medication" -COM_EHEALTH_PORTAL_MEDICATION_ERROR_UNIQUE_ALIAS="Another Medication has the same alias." -COM_EHEALTH_PORTAL_MEDICATION_ID="Id" -COM_EHEALTH_PORTAL_MEDICATION_MODIFIED_BY_DESC="The last user that modified this Medication." -COM_EHEALTH_PORTAL_MEDICATION_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_MEDICATION_MODIFIED_DATE_DESC="The date this Medication was modified." -COM_EHEALTH_PORTAL_MEDICATION_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_MEDICATION_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_MEDICATION_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_MEDICATION_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_MEDICATION_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_MEDICATION_NEW="A New Medication" -COM_EHEALTH_PORTAL_MEDICATION_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_MEDICATION_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_MEDICATION_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_MEDICATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Medication to customise the alias." -COM_EHEALTH_PORTAL_MEDICATION_STATUS="Status" -COM_EHEALTH_PORTAL_MEDICATION_VERSION_DESC="A count of the number of times this Medication has been revised." -COM_EHEALTH_PORTAL_MEDICATION_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_NEW="New" -COM_EHEALTH_PORTAL_NONPAY_REASON="NonPay Reason" -COM_EHEALTH_PORTAL_NONPAY_REASONS="NonPay Reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_ACCESS="Nonpay Reasons Access" -COM_EHEALTH_PORTAL_NONPAY_REASONS_ACCESS_DESC="Allows the users in this group to access access nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_BATCH_OPTIONS="Batch process the selected NonPay Reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_BATCH_TIP="All changes will be applied to all selected NonPay Reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_BATCH_USE="Nonpay Reasons Batch Use" -COM_EHEALTH_PORTAL_NONPAY_REASONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_DESCRIPTION="Nonpay Reasons Edit Description" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of nonpay reason" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_NAME="Nonpay Reasons Edit Name" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of nonpay reason" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_VERSION="Nonpay Reasons Edit Version" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EXPORT="Nonpay Reasons Export" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EXPORT_DESC="Allows the users in this group to export export nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_IMPORT="Nonpay Reasons Import" -COM_EHEALTH_PORTAL_NONPAY_REASONS_IMPORT_DESC="Allows the users in this group to import import nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_ARCHIVED="%s NonPay Reasons archived." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_ARCHIVED_1="%s NonPay Reason archived." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_CHECKED_IN_0="No NonPay Reason successfully checked in." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_CHECKED_IN_1="%d NonPay Reason successfully checked in." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_CHECKED_IN_MORE="%d NonPay Reasons successfully checked in." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_DELETED="%s NonPay Reasons deleted." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_DELETED_1="%s NonPay Reason deleted." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_FAILED_PUBLISHING="%s NonPay Reasons failed publishing." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_FAILED_PUBLISHING_1="%s NonPay Reason failed publishing." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_FEATURED="%s NonPay Reasons featured." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_FEATURED_1="%s NonPay Reason featured." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_PUBLISHED="%s NonPay Reasons published." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_PUBLISHED_1="%s NonPay Reason published." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_TRASHED="%s NonPay Reasons trashed." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_TRASHED_1="%s NonPay Reason trashed." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_UNFEATURED="%s NonPay Reasons unfeatured." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_UNFEATURED_1="%s NonPay Reason unfeatured." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_UNPUBLISHED="%s NonPay Reasons unpublished." -COM_EHEALTH_PORTAL_NONPAY_REASONS_N_ITEMS_UNPUBLISHED_1="%s NonPay Reason unpublished." -COM_EHEALTH_PORTAL_NONPAY_REASON_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_NONPAY_REASON_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_NONPAY_REASON_CREATED_BY_DESC="The user that created this NonPay Reason." -COM_EHEALTH_PORTAL_NONPAY_REASON_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_NONPAY_REASON_CREATED_DATE_DESC="The date this NonPay Reason was created." -COM_EHEALTH_PORTAL_NONPAY_REASON_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_NONPAY_REASON_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_NONPAY_REASON_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_NONPAY_REASON_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_NONPAY_REASON_DETAILS="Details" -COM_EHEALTH_PORTAL_NONPAY_REASON_EDIT="Editing the NonPay Reason" -COM_EHEALTH_PORTAL_NONPAY_REASON_ERROR_UNIQUE_ALIAS="Another NonPay Reason has the same alias." -COM_EHEALTH_PORTAL_NONPAY_REASON_ID="Id" -COM_EHEALTH_PORTAL_NONPAY_REASON_MODIFIED_BY_DESC="The last user that modified this NonPay Reason." -COM_EHEALTH_PORTAL_NONPAY_REASON_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_NONPAY_REASON_MODIFIED_DATE_DESC="The date this NonPay Reason was modified." -COM_EHEALTH_PORTAL_NONPAY_REASON_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_NONPAY_REASON_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_NONPAY_REASON_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_NONPAY_REASON_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_NONPAY_REASON_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_NONPAY_REASON_NEW="A New NonPay Reason" -COM_EHEALTH_PORTAL_NONPAY_REASON_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_NONPAY_REASON_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_NONPAY_REASON_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_NONPAY_REASON_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the NonPay Reason to customise the alias." -COM_EHEALTH_PORTAL_NONPAY_REASON_STATUS="Status" -COM_EHEALTH_PORTAL_NONPAY_REASON_VERSION_DESC="A count of the number of times this NonPay Reason has been revised." -COM_EHEALTH_PORTAL_NONPAY_REASON_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." -COM_EHEALTH_PORTAL_NO_ACCESS_GRANTED="No Access Granted!" -COM_EHEALTH_PORTAL_PATIENT_QUEUE="Patient Queue" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_ACCESS="Patient Queue Access" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_ACCESS_DESC="Allows the users in this group to access patient queue." -COM_EHEALTH_PORTAL_PATIENT_QUEUE_DASHBOARD_LIST="Patient Queue Dashboard List" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Patient Queue" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_DESC="A patient queue" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_SUBMENU="Patient Queue Submenu" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_SUBMENU_DESC="Allows the users in this group to submenu of Patient Queue" -COM_EHEALTH_PORTAL_PAYMENT="Payment" -COM_EHEALTH_PORTAL_PAYMENTS="Payments" -COM_EHEALTH_PORTAL_PAYMENTS_ACCESS="Payments Access" -COM_EHEALTH_PORTAL_PAYMENTS_ACCESS_DESC="Allows the users in this group to access access payments" -COM_EHEALTH_PORTAL_PAYMENTS_BATCH_OPTIONS="Batch process the selected Payments" -COM_EHEALTH_PORTAL_PAYMENTS_BATCH_TIP="All changes will be applied to all selected Payments" -COM_EHEALTH_PORTAL_PAYMENTS_BATCH_USE="Payments Batch Use" -COM_EHEALTH_PORTAL_PAYMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payments" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_ADD="Payments Dashboard Add" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of payment" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_LIST="Payments Dashboard List" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of payment" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_PATIENT="Payments Edit Patient" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of payment" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_VERSION="Payments Edit Version" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payments" -COM_EHEALTH_PORTAL_PAYMENTS_EXPORT="Payments Export" -COM_EHEALTH_PORTAL_PAYMENTS_EXPORT_DESC="Allows the users in this group to export export payments" -COM_EHEALTH_PORTAL_PAYMENTS_IMPORT="Payments Import" -COM_EHEALTH_PORTAL_PAYMENTS_IMPORT_DESC="Allows the users in this group to import import payments" -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_ARCHIVED="%s Payments archived." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_ARCHIVED_1="%s Payment archived." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_CHECKED_IN_0="No Payment successfully checked in." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_CHECKED_IN_1="%d Payment successfully checked in." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_CHECKED_IN_MORE="%d Payments successfully checked in." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_DELETED="%s Payments deleted." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_DELETED_1="%s Payment deleted." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_FAILED_PUBLISHING="%s Payments failed publishing." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Payment failed publishing." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_FEATURED="%s Payments featured." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_FEATURED_1="%s Payment featured." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_PUBLISHED="%s Payments published." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_PUBLISHED_1="%s Payment published." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_TRASHED="%s Payments trashed." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_TRASHED_1="%s Payment trashed." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_UNFEATURED="%s Payments unfeatured." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_UNFEATURED_1="%s Payment unfeatured." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_UNPUBLISHED="%s Payments unpublished." -COM_EHEALTH_PORTAL_PAYMENTS_N_ITEMS_UNPUBLISHED_1="%s Payment unpublished." -COM_EHEALTH_PORTAL_PAYMENTS_SUBMENU="Payments Submenu" -COM_EHEALTH_PORTAL_PAYMENTS_SUBMENU_DESC="Allows the users in this group to submenu of payment" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT="Payment Amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS="Payment Amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_ACCESS="Payment Amounts Access" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_ACCESS_DESC="Allows the users in this group to access access payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_BATCH_OPTIONS="Batch process the selected Payment Amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_BATCH_TIP="All changes will be applied to all selected Payment Amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_BATCH_USE="Payment Amounts Batch Use" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_DESCRIPTION="Payment Amounts Edit Description" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of payment amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_NAME="Payment Amounts Edit Name" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_NAME_DESC="Allows the users in this group to edit name of payment amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_VERSION="Payment Amounts Edit Version" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EXPORT="Payment Amounts Export" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EXPORT_DESC="Allows the users in this group to export export payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_IMPORT="Payment Amounts Import" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_IMPORT_DESC="Allows the users in this group to import import payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_ARCHIVED="%s Payment Amounts archived." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_ARCHIVED_1="%s Payment Amount archived." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_CHECKED_IN_0="No Payment Amount successfully checked in." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_CHECKED_IN_1="%d Payment Amount successfully checked in." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_CHECKED_IN_MORE="%d Payment Amounts successfully checked in." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_DELETED="%s Payment Amounts deleted." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_DELETED_1="%s Payment Amount deleted." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_FAILED_PUBLISHING="%s Payment Amounts failed publishing." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_FAILED_PUBLISHING_1="%s Payment Amount failed publishing." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_FEATURED="%s Payment Amounts featured." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_FEATURED_1="%s Payment Amount featured." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_PUBLISHED="%s Payment Amounts published." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_PUBLISHED_1="%s Payment Amount published." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_TRASHED="%s Payment Amounts trashed." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_TRASHED_1="%s Payment Amount trashed." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_UNFEATURED="%s Payment Amounts unfeatured." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_UNFEATURED_1="%s Payment Amount unfeatured." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_UNPUBLISHED="%s Payment Amounts unpublished." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_N_ITEMS_UNPUBLISHED_1="%s Payment Amount unpublished." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_CREATED_BY_DESC="The user that created this Payment Amount." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_CREATED_DATE_DESC="The date this Payment Amount was created." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_DETAILS="Details" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_EDIT="Editing the Payment Amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_ERROR_UNIQUE_ALIAS="Another Payment Amount has the same alias." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_ID="Id" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_MODIFIED_BY_DESC="The last user that modified this Payment Amount." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_MODIFIED_DATE_DESC="The date this Payment Amount was modified." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_NEW="A New Payment Amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Payment Amount to customise the alias." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_STATUS="Status" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_VERSION_DESC="A count of the number of times this Payment Amount has been revised." -COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_PAYMENT_CREATED_BY_DESC="The user that created this Payment." -COM_EHEALTH_PORTAL_PAYMENT_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_PAYMENT_CREATED_DATE_DESC="The date this Payment was created." -COM_EHEALTH_PORTAL_PAYMENT_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_PAYMENT_DEBT_PAYMENT="Debt Payment" -COM_EHEALTH_PORTAL_PAYMENT_DETAILS="Details" -COM_EHEALTH_PORTAL_PAYMENT_EDIT="Editing the Payment" -COM_EHEALTH_PORTAL_PAYMENT_ERROR_UNIQUE_ALIAS="Another Payment has the same alias." -COM_EHEALTH_PORTAL_PAYMENT_ID="Id" -COM_EHEALTH_PORTAL_PAYMENT_MODIFIED_BY_DESC="The last user that modified this Payment." -COM_EHEALTH_PORTAL_PAYMENT_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_PAYMENT_MODIFIED_DATE_DESC="The date this Payment was modified." -COM_EHEALTH_PORTAL_PAYMENT_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_PAYMENT_NEW="A New Payment" -COM_EHEALTH_PORTAL_PAYMENT_NONPAY_REASON_DESCRIPTION="Select Non-Payment Reason" -COM_EHEALTH_PORTAL_PAYMENT_NONPAY_REASON_LABEL="Non-Payment Reason" -COM_EHEALTH_PORTAL_PAYMENT_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_PAYMENT_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_PAYMENT_PAYMENT_AMOUNT_DESCRIPTION="Select Amount (N$)" -COM_EHEALTH_PORTAL_PAYMENT_PAYMENT_AMOUNT_LABEL="Amount (N$):" -COM_EHEALTH_PORTAL_PAYMENT_PAYMENT_CATEGORY_DESCRIPTION="Category under which payment falls under" -COM_EHEALTH_PORTAL_PAYMENT_PAYMENT_CATEGORY_LABEL="Payment Category" -COM_EHEALTH_PORTAL_PAYMENT_PAYMENT_TYPE_DESCRIPTION="Type of Payment" -COM_EHEALTH_PORTAL_PAYMENT_PAYMENT_TYPE_LABEL="Type of Payment" -COM_EHEALTH_PORTAL_PAYMENT_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_PAYMENT_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_PAYMENT_RECEIPT_NO_DESCRIPTION="Enter Receipt Number Here" -COM_EHEALTH_PORTAL_PAYMENT_RECEIPT_NO_HINT="Receipt Number Here" -COM_EHEALTH_PORTAL_PAYMENT_RECEIPT_NO_LABEL="Receipt Number" -COM_EHEALTH_PORTAL_PAYMENT_RECEIPT_NO_MESSAGE="Error! Please add Receipt Number here." -COM_EHEALTH_PORTAL_PAYMENT_RECEIVE_PAYMENT="Receive Payment" -COM_EHEALTH_PORTAL_PAYMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Payment to customise the alias." -COM_EHEALTH_PORTAL_PAYMENT_SELECT_AMOUNT_N="Select Amount (N$)" -COM_EHEALTH_PORTAL_PAYMENT_SEVENTY_FIVE="75" -COM_EHEALTH_PORTAL_PAYMENT_STATUS="Status" -COM_EHEALTH_PORTAL_PAYMENT_TEN="10" -COM_EHEALTH_PORTAL_PAYMENT_TYPE="Payment Type" -COM_EHEALTH_PORTAL_PAYMENT_TYPES="Payment Types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_ACCESS="Payment Types Access" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_ACCESS_DESC="Allows the users in this group to access access payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_BATCH_OPTIONS="Batch process the selected Payment Types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_BATCH_TIP="All changes will be applied to all selected Payment Types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_BATCH_USE="Payment Types Batch Use" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION="Payment Types Edit Description" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of payment type" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_NAME="Payment Types Edit Name" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of payment type" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_VERSION="Payment Types Edit Version" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EXPORT="Payment Types Export" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EXPORT_DESC="Allows the users in this group to export export payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_IMPORT="Payment Types Import" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_IMPORT_DESC="Allows the users in this group to import import payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_ARCHIVED="%s Payment Types archived." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_ARCHIVED_1="%s Payment Type archived." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_CHECKED_IN_0="No Payment Type successfully checked in." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_CHECKED_IN_1="%d Payment Type successfully checked in." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Payment Types successfully checked in." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_DELETED="%s Payment Types deleted." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_DELETED_1="%s Payment Type deleted." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Payment Types failed publishing." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Payment Type failed publishing." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_FEATURED="%s Payment Types featured." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_FEATURED_1="%s Payment Type featured." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_PUBLISHED="%s Payment Types published." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_PUBLISHED_1="%s Payment Type published." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_TRASHED="%s Payment Types trashed." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_TRASHED_1="%s Payment Type trashed." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_UNFEATURED="%s Payment Types unfeatured." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_UNFEATURED_1="%s Payment Type unfeatured." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_UNPUBLISHED="%s Payment Types unpublished." -COM_EHEALTH_PORTAL_PAYMENT_TYPES_N_ITEMS_UNPUBLISHED_1="%s Payment Type unpublished." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_CREATED_BY_DESC="The user that created this Payment Type." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_CREATED_DATE_DESC="The date this Payment Type was created." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_DETAILS="Details" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_EDIT="Editing the Payment Type" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_ERROR_UNIQUE_ALIAS="Another Payment Type has the same alias." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_ID="Id" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_MODIFIED_BY_DESC="The last user that modified this Payment Type." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_MODIFIED_DATE_DESC="The date this Payment Type was modified." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_NEW="A New Payment Type" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Payment Type to customise the alias." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_STATUS="Status" -COM_EHEALTH_PORTAL_PAYMENT_TYPE_VERSION_DESC="A count of the number of times this Payment Type has been revised." -COM_EHEALTH_PORTAL_PAYMENT_TYPE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_PAYMENT_VERSION_DESC="A count of the number of times this Payment has been revised." -COM_EHEALTH_PORTAL_PAYMENT_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_PAYMENT_ZERO="0" -COM_EHEALTH_PORTAL_PLANNING_TYPE="Planning Type" -COM_EHEALTH_PORTAL_PLANNING_TYPES="Planning Types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_ACCESS="Planning Types Access" -COM_EHEALTH_PORTAL_PLANNING_TYPES_ACCESS_DESC="Allows the users in this group to access access planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_BATCH_OPTIONS="Batch process the selected Planning Types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_BATCH_TIP="All changes will be applied to all selected Planning Types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_BATCH_USE="Planning Types Batch Use" -COM_EHEALTH_PORTAL_PLANNING_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_DESCRIPTION="Planning Types Edit Description" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of planning type" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_NAME="Planning Types Edit Name" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of planning type" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_VERSION="Planning Types Edit Version" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EXPORT="Planning Types Export" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EXPORT_DESC="Allows the users in this group to export export planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_IMPORT="Planning Types Import" -COM_EHEALTH_PORTAL_PLANNING_TYPES_IMPORT_DESC="Allows the users in this group to import import planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_ARCHIVED="%s Planning Types archived." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_ARCHIVED_1="%s Planning Type archived." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_CHECKED_IN_0="No Planning Type successfully checked in." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_CHECKED_IN_1="%d Planning Type successfully checked in." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Planning Types successfully checked in." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_DELETED="%s Planning Types deleted." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_DELETED_1="%s Planning Type deleted." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Planning Types failed publishing." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Planning Type failed publishing." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_FEATURED="%s Planning Types featured." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_FEATURED_1="%s Planning Type featured." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_PUBLISHED="%s Planning Types published." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_PUBLISHED_1="%s Planning Type published." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_TRASHED="%s Planning Types trashed." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_TRASHED_1="%s Planning Type trashed." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_UNFEATURED="%s Planning Types unfeatured." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_UNFEATURED_1="%s Planning Type unfeatured." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_UNPUBLISHED="%s Planning Types unpublished." -COM_EHEALTH_PORTAL_PLANNING_TYPES_N_ITEMS_UNPUBLISHED_1="%s Planning Type unpublished." -COM_EHEALTH_PORTAL_PLANNING_TYPE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_PLANNING_TYPE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_PLANNING_TYPE_CREATED_BY_DESC="The user that created this Planning Type." -COM_EHEALTH_PORTAL_PLANNING_TYPE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_PLANNING_TYPE_CREATED_DATE_DESC="The date this Planning Type was created." -COM_EHEALTH_PORTAL_PLANNING_TYPE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_PLANNING_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_PLANNING_TYPE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_PLANNING_TYPE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_PLANNING_TYPE_DETAILS="Details" -COM_EHEALTH_PORTAL_PLANNING_TYPE_EDIT="Editing the Planning Type" -COM_EHEALTH_PORTAL_PLANNING_TYPE_ERROR_UNIQUE_ALIAS="Another Planning Type has the same alias." -COM_EHEALTH_PORTAL_PLANNING_TYPE_ID="Id" -COM_EHEALTH_PORTAL_PLANNING_TYPE_MODIFIED_BY_DESC="The last user that modified this Planning Type." -COM_EHEALTH_PORTAL_PLANNING_TYPE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_PLANNING_TYPE_MODIFIED_DATE_DESC="The date this Planning Type was modified." -COM_EHEALTH_PORTAL_PLANNING_TYPE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_PLANNING_TYPE_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_PLANNING_TYPE_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_PLANNING_TYPE_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_PLANNING_TYPE_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_PLANNING_TYPE_NEW="A New Planning Type" -COM_EHEALTH_PORTAL_PLANNING_TYPE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_PLANNING_TYPE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_PLANNING_TYPE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_PLANNING_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Planning Type to customise the alias." -COM_EHEALTH_PORTAL_PLANNING_TYPE_STATUS="Status" -COM_EHEALTH_PORTAL_PLANNING_TYPE_VERSION_DESC="A count of the number of times this Planning Type has been revised." -COM_EHEALTH_PORTAL_PLANNING_TYPE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER="Prostate and Testicular Cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS="Prostate and Testicular Cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS="Prostate And Testicular Cancers Access" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS_DESC="Allows the users in this group to access access prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_OPTIONS="Batch process the selected Prostate and Testicular Cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_TIP="All changes will be applied to all selected Prostate and Testicular Cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE="Prostate And Testicular Cancers Batch Use" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD="Prostate And Testicular Cancers Dashboard Add" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of prostate and testicular cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST="Prostate And Testicular Cancers Dashboard List" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of prostate and testicular cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION="Prostate And Testicular Cancers Edit Version" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT="Prostate And Testicular Cancers Export" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT_DESC="Allows the users in this group to export export prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT="Prostate And Testicular Cancers Import" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT_DESC="Allows the users in this group to import import prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_ARCHIVED="%s Prostate and Testicular Cancers archived." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_ARCHIVED_1="%s Prostate and Testicular Cancer archived." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_CHECKED_IN_0="No Prostate and Testicular Cancer successfully checked in." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_CHECKED_IN_1="%d Prostate and Testicular Cancer successfully checked in." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_CHECKED_IN_MORE="%d Prostate and Testicular Cancers successfully checked in." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_DELETED="%s Prostate and Testicular Cancers deleted." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_DELETED_1="%s Prostate and Testicular Cancer deleted." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FAILED_PUBLISHING="%s Prostate and Testicular Cancers failed publishing." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FAILED_PUBLISHING_1="%s Prostate and Testicular Cancer failed publishing." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FEATURED="%s Prostate and Testicular Cancers featured." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FEATURED_1="%s Prostate and Testicular Cancer featured." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_PUBLISHED="%s Prostate and Testicular Cancers published." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_PUBLISHED_1="%s Prostate and Testicular Cancer published." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_TRASHED="%s Prostate and Testicular Cancers trashed." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_TRASHED_1="%s Prostate and Testicular Cancer trashed." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNFEATURED="%s Prostate and Testicular Cancers unfeatured." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNFEATURED_1="%s Prostate and Testicular Cancer unfeatured." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNPUBLISHED="%s Prostate and Testicular Cancers unpublished." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNPUBLISHED_1="%s Prostate and Testicular Cancer unpublished." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU="Prostate And Testicular Cancers Submenu" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of prostate and testicular cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_BY_DESC="The user that created this Prostate and Testicular Cancer." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_DATE_DESC="The date this Prostate and Testicular Cancer was created." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_DETAILS="Details" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_EDIT="Editing the Prostate and Testicular Cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_ERROR_UNIQUE_ALIAS="Another Prostate and Testicular Cancer has the same alias." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_ID="Id" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_BY_DESC="The last user that modified this Prostate and Testicular Cancer." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_DATE_DESC="The date this Prostate and Testicular Cancer was modified." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NEW="A New Prostate and Testicular Cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO="No" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_AGE_DESCRIPTION="Age > 40 years?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_AGE_LABEL="Age > 40 years?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_DIET_DESCRIPTION="Do you eat a high fat diet low in fruit and vegetables?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_DIET_LABEL="Do you eat a high fat diet low in fruit and vegetables?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_FAM_HISTORY_DESCRIPTION="Do you have a family history of a father, brother or grandfather with prostate or testicular cancer?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_FAM_HISTORY_LABEL="Do you have a family history of a father, brother or grandfather with prostate or testicular cancer?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_OVERWEIGHT_DESCRIPTION="Does the patient appear to be overweight?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_OVERWEIGHT_LABEL="Does the patient appear to be overweight?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_PHY_ACTIVITY_DESCRIPTION="Do you do regular physical activity?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_PHY_ACTIVITY_LABEL="Do you do regular physical activity?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINATE_DESCRIPTION="Do you experience difficulty passing urine?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINATE_LABEL="Do you experience difficulty passing urine?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINE_FREQ_DESCRIPTION="Do you pass urine more frequently than usual, especially at night?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINE_FREQ_LABEL="Do you pass urine more frequently than usual, especially at night?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Prostate and Testicular Cancer to customise the alias." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_STATUS="Status" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_AGE_DESCRIPTION="Age > 40 years?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_AGE_HINT="Add text here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_AGE_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_DIET_DESCRIPTION="Do you eat a high fat diet low in fruit and vegetables?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_DIET_HINT="Add text Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_DIET_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_FAM_HISTORY_DESCRIPTION="Do you have a family history of a father, brother or grandfather with prostate or testicular cancer?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_FAM_HISTORY_HINT="Add text here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_FAM_HISTORY_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_OVERWEIGHT_DESCRIPTION="Does the patient appear to be overweight?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_OVERWEIGHT_HINT="Add text Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_OVERWEIGHT_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_PHY_ACTIVITY_DESCRIPTION="Do you do regular physical activity?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_PHY_ACTIVITY_HINT="Add text Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_PHY_ACTIVITY_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINATE_DESCRIPTION="Do you experience difficulty passing urine?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINATE_HINT="Add text Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINATE_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINE_FREQ_DESCRIPTION="Do you pass urine more frequently than usual, especially at night?" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINE_FREQ_HINT="Add text Here" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINE_FREQ_LABEL="Comments:" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_VERSION_DESC="A count of the number of times this Prostate and Testicular Cancer has been revised." -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES="Yes" -COM_EHEALTH_PORTAL_PUBLISHED="Published" -COM_EHEALTH_PORTAL_REFERRAL="Referral" -COM_EHEALTH_PORTAL_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_REFERRALS_ACCESS="Referrals Access" -COM_EHEALTH_PORTAL_REFERRALS_ACCESS_DESC="Allows the users in this group to access access referrals" -COM_EHEALTH_PORTAL_REFERRALS_BATCH_OPTIONS="Batch process the selected Referrals" -COM_EHEALTH_PORTAL_REFERRALS_BATCH_TIP="All changes will be applied to all selected Referrals" -COM_EHEALTH_PORTAL_REFERRALS_BATCH_USE="Referrals Batch Use" -COM_EHEALTH_PORTAL_REFERRALS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch referrals" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_DESCRIPTION="Referrals Edit Description" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of referral" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_NAME="Referrals Edit Name" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_NAME_DESC="Allows the users in this group to edit name of referral" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_VERSION="Referrals Edit Version" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version referrals" -COM_EHEALTH_PORTAL_REFERRALS_EXPORT="Referrals Export" -COM_EHEALTH_PORTAL_REFERRALS_EXPORT_DESC="Allows the users in this group to export export referrals" -COM_EHEALTH_PORTAL_REFERRALS_IMPORT="Referrals Import" -COM_EHEALTH_PORTAL_REFERRALS_IMPORT_DESC="Allows the users in this group to import import referrals" -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_ARCHIVED="%s Referrals archived." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_ARCHIVED_1="%s Referral archived." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_CHECKED_IN_0="No Referral successfully checked in." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_CHECKED_IN_1="%d Referral successfully checked in." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_CHECKED_IN_MORE="%d Referrals successfully checked in." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_DELETED="%s Referrals deleted." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_DELETED_1="%s Referral deleted." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_FAILED_PUBLISHING="%s Referrals failed publishing." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_FAILED_PUBLISHING_1="%s Referral failed publishing." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_FEATURED="%s Referrals featured." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_FEATURED_1="%s Referral featured." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_PUBLISHED="%s Referrals published." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_PUBLISHED_1="%s Referral published." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_TRASHED="%s Referrals trashed." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_TRASHED_1="%s Referral trashed." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_UNFEATURED="%s Referrals unfeatured." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_UNFEATURED_1="%s Referral unfeatured." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_UNPUBLISHED="%s Referrals unpublished." -COM_EHEALTH_PORTAL_REFERRALS_N_ITEMS_UNPUBLISHED_1="%s Referral unpublished." -COM_EHEALTH_PORTAL_REFERRALS_SUBMENU="Referrals Submenu" -COM_EHEALTH_PORTAL_REFERRALS_SUBMENU_DESC="Allows the users in this group to submenu of referral" -COM_EHEALTH_PORTAL_REFERRAL_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_REFERRAL_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_REFERRAL_CREATED_BY_DESC="The user that created this Referral." -COM_EHEALTH_PORTAL_REFERRAL_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_REFERRAL_CREATED_DATE_DESC="The date this Referral was created." -COM_EHEALTH_PORTAL_REFERRAL_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_REFERRAL_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_REFERRAL_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_REFERRAL_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_REFERRAL_DETAILS="Details" -COM_EHEALTH_PORTAL_REFERRAL_EDIT="Editing the Referral" -COM_EHEALTH_PORTAL_REFERRAL_ERROR_UNIQUE_ALIAS="Another Referral has the same alias." -COM_EHEALTH_PORTAL_REFERRAL_ID="Id" -COM_EHEALTH_PORTAL_REFERRAL_MODIFIED_BY_DESC="The last user that modified this Referral." -COM_EHEALTH_PORTAL_REFERRAL_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_REFERRAL_MODIFIED_DATE_DESC="The date this Referral was modified." -COM_EHEALTH_PORTAL_REFERRAL_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_REFERRAL_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_REFERRAL_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_REFERRAL_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_REFERRAL_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_REFERRAL_NEW="A New Referral" -COM_EHEALTH_PORTAL_REFERRAL_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_REFERRAL_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_REFERRAL_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_REFERRAL_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Referral to customise the alias." -COM_EHEALTH_PORTAL_REFERRAL_STATUS="Status" -COM_EHEALTH_PORTAL_REFERRAL_VERSION_DESC="A count of the number of times this Referral has been revised." -COM_EHEALTH_PORTAL_REFERRAL_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_SAVE_SUCCESS="Great! Item successfully saved." -COM_EHEALTH_PORTAL_SAVE_WARNING="The value already existed so please select another." -COM_EHEALTH_PORTAL_SITE="Site" -COM_EHEALTH_PORTAL_SITES="Sites" -COM_EHEALTH_PORTAL_SITES_ACCESS="Sites Access" -COM_EHEALTH_PORTAL_SITES_ACCESS_DESC="Allows the users in this group to access access sites" -COM_EHEALTH_PORTAL_SITES_BATCH_OPTIONS="Batch process the selected Sites" -COM_EHEALTH_PORTAL_SITES_BATCH_TIP="All changes will be applied to all selected Sites" -COM_EHEALTH_PORTAL_SITES_BATCH_USE="Sites Batch Use" -COM_EHEALTH_PORTAL_SITES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch sites" -COM_EHEALTH_PORTAL_SITES_EDIT_DESCRIPTION="Sites Edit Description" -COM_EHEALTH_PORTAL_SITES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of site" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_NAME="Sites Edit Site Name" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_NAME_DESC="Allows the users in this group to edit site name of site" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_REGION="Sites Edit Site Region" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_REGION_DESC="Allows the users in this group to edit site region of site" -COM_EHEALTH_PORTAL_SITES_EDIT_VERSION="Sites Edit Version" -COM_EHEALTH_PORTAL_SITES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version sites" -COM_EHEALTH_PORTAL_SITES_EXPORT="Sites Export" -COM_EHEALTH_PORTAL_SITES_EXPORT_DESC="Allows the users in this group to export export sites" -COM_EHEALTH_PORTAL_SITES_IMPORT="Sites Import" -COM_EHEALTH_PORTAL_SITES_IMPORT_DESC="Allows the users in this group to import import sites" -COM_EHEALTH_PORTAL_SITES_N_ITEMS_ARCHIVED="%s Sites archived." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_ARCHIVED_1="%s Site archived." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_CHECKED_IN_0="No Site successfully checked in." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_CHECKED_IN_1="%d Site successfully checked in." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_CHECKED_IN_MORE="%d Sites successfully checked in." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_DELETED="%s Sites deleted." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_DELETED_1="%s Site deleted." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_FAILED_PUBLISHING="%s Sites failed publishing." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_FAILED_PUBLISHING_1="%s Site failed publishing." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_FEATURED="%s Sites featured." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_FEATURED_1="%s Site featured." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_PUBLISHED="%s Sites published." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_PUBLISHED_1="%s Site published." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_TRASHED="%s Sites trashed." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_TRASHED_1="%s Site trashed." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_UNFEATURED="%s Sites unfeatured." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_UNFEATURED_1="%s Site unfeatured." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_UNPUBLISHED="%s Sites unpublished." -COM_EHEALTH_PORTAL_SITES_N_ITEMS_UNPUBLISHED_1="%s Site unpublished." -COM_EHEALTH_PORTAL_SITE_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_SITE_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_SITE_CREATED_BY_DESC="The user that created this Site." -COM_EHEALTH_PORTAL_SITE_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_SITE_CREATED_DATE_DESC="The date this Site was created." -COM_EHEALTH_PORTAL_SITE_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_SITE_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_SITE_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_SITE_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_SITE_DETAILS="Details" -COM_EHEALTH_PORTAL_SITE_EDIT="Editing the Site" -COM_EHEALTH_PORTAL_SITE_ERROR_UNIQUE_ALIAS="Another Site has the same alias." -COM_EHEALTH_PORTAL_SITE_ID="Id" -COM_EHEALTH_PORTAL_SITE_MODIFIED_BY_DESC="The last user that modified this Site." -COM_EHEALTH_PORTAL_SITE_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_SITE_MODIFIED_DATE_DESC="The date this Site was modified." -COM_EHEALTH_PORTAL_SITE_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_SITE_NEW="A New Site" -COM_EHEALTH_PORTAL_SITE_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_SITE_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_SITE_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_SITE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Site to customise the alias." -COM_EHEALTH_PORTAL_SITE_SITE_NAME_DESCRIPTION="Enter Site Name Here" -COM_EHEALTH_PORTAL_SITE_SITE_NAME_HINT="Site Name Here" -COM_EHEALTH_PORTAL_SITE_SITE_NAME_LABEL="Site Name" -COM_EHEALTH_PORTAL_SITE_SITE_NAME_MESSAGE="Error! Please add Site Name here." -COM_EHEALTH_PORTAL_SITE_SITE_REGION_DESCRIPTION="Enter Site Region Here" -COM_EHEALTH_PORTAL_SITE_SITE_REGION_HINT="Site Region Here" -COM_EHEALTH_PORTAL_SITE_SITE_REGION_LABEL="Site Region" -COM_EHEALTH_PORTAL_SITE_SITE_REGION_MESSAGE="Error! Please add Site Region here." -COM_EHEALTH_PORTAL_SITE_STATUS="Status" -COM_EHEALTH_PORTAL_SITE_VERSION_DESC="A count of the number of times this Site has been revised." -COM_EHEALTH_PORTAL_SITE_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_STRENGTH="Strength" -COM_EHEALTH_PORTAL_STRENGTHS="Strengths" -COM_EHEALTH_PORTAL_STRENGTHS_ACCESS="Strengths Access" -COM_EHEALTH_PORTAL_STRENGTHS_ACCESS_DESC="Allows the users in this group to access access strengths" -COM_EHEALTH_PORTAL_STRENGTHS_BATCH_OPTIONS="Batch process the selected Strengths" -COM_EHEALTH_PORTAL_STRENGTHS_BATCH_TIP="All changes will be applied to all selected Strengths" -COM_EHEALTH_PORTAL_STRENGTHS_BATCH_USE="Strengths Batch Use" -COM_EHEALTH_PORTAL_STRENGTHS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch strengths" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_DESCRIPTION="Strengths Edit Description" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of strength" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_NAME="Strengths Edit Name" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_NAME_DESC="Allows the users in this group to edit name of strength" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_VERSION="Strengths Edit Version" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version strengths" -COM_EHEALTH_PORTAL_STRENGTHS_EXPORT="Strengths Export" -COM_EHEALTH_PORTAL_STRENGTHS_EXPORT_DESC="Allows the users in this group to export export strengths" -COM_EHEALTH_PORTAL_STRENGTHS_IMPORT="Strengths Import" -COM_EHEALTH_PORTAL_STRENGTHS_IMPORT_DESC="Allows the users in this group to import import strengths" -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_ARCHIVED="%s Strengths archived." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_ARCHIVED_1="%s Strength archived." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_CHECKED_IN_0="No Strength successfully checked in." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_CHECKED_IN_1="%d Strength successfully checked in." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_CHECKED_IN_MORE="%d Strengths successfully checked in." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_DELETED="%s Strengths deleted." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_DELETED_1="%s Strength deleted." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_FAILED_PUBLISHING="%s Strengths failed publishing." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_FAILED_PUBLISHING_1="%s Strength failed publishing." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_FEATURED="%s Strengths featured." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_FEATURED_1="%s Strength featured." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_PUBLISHED="%s Strengths published." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_PUBLISHED_1="%s Strength published." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_TRASHED="%s Strengths trashed." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_TRASHED_1="%s Strength trashed." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_UNFEATURED="%s Strengths unfeatured." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_UNFEATURED_1="%s Strength unfeatured." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_UNPUBLISHED="%s Strengths unpublished." -COM_EHEALTH_PORTAL_STRENGTHS_N_ITEMS_UNPUBLISHED_1="%s Strength unpublished." -COM_EHEALTH_PORTAL_STRENGTHS_SUBMENU="Strengths Submenu" -COM_EHEALTH_PORTAL_STRENGTHS_SUBMENU_DESC="Allows the users in this group to submenu of strength" -COM_EHEALTH_PORTAL_STRENGTH_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_STRENGTH_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_STRENGTH_CREATED_BY_DESC="The user that created this Strength." -COM_EHEALTH_PORTAL_STRENGTH_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_STRENGTH_CREATED_DATE_DESC="The date this Strength was created." -COM_EHEALTH_PORTAL_STRENGTH_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_STRENGTH_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_STRENGTH_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_STRENGTH_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_STRENGTH_DETAILS="Details" -COM_EHEALTH_PORTAL_STRENGTH_EDIT="Editing the Strength" -COM_EHEALTH_PORTAL_STRENGTH_ERROR_UNIQUE_ALIAS="Another Strength has the same alias." -COM_EHEALTH_PORTAL_STRENGTH_ID="Id" -COM_EHEALTH_PORTAL_STRENGTH_MODIFIED_BY_DESC="The last user that modified this Strength." -COM_EHEALTH_PORTAL_STRENGTH_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_STRENGTH_MODIFIED_DATE_DESC="The date this Strength was modified." -COM_EHEALTH_PORTAL_STRENGTH_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_STRENGTH_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_STRENGTH_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_STRENGTH_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_STRENGTH_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_STRENGTH_NEW="A New Strength" -COM_EHEALTH_PORTAL_STRENGTH_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_STRENGTH_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_STRENGTH_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_STRENGTH_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Strength to customise the alias." -COM_EHEALTH_PORTAL_STRENGTH_STATUS="Status" -COM_EHEALTH_PORTAL_STRENGTH_VERSION_DESC="A count of the number of times this Strength has been revised." -COM_EHEALTH_PORTAL_STRENGTH_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_SUBMENU_ADMINISTRATION_PARTS="Administration Parts" -COM_EHEALTH_PORTAL_SUBMENU_ANTENATAL_CARES="Antenatal Cares" -COM_EHEALTH_PORTAL_SUBMENU_BREAST_CANCERS="Breast Cancers" -COM_EHEALTH_PORTAL_SUBMENU_CERVICAL_CANCERS="Cervical Cancers" -COM_EHEALTH_PORTAL_SUBMENU_DASHBOARD="Dashboard" -COM_EHEALTH_PORTAL_SUBMENU_FAMILY_PLANNINGS="Family Plannings" -COM_EHEALTH_PORTAL_SUBMENU_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups" -COM_EHEALTH_PORTAL_SUBMENU_HEALTH_EDUCATIONS="Health Educations" -COM_EHEALTH_PORTAL_SUBMENU_HIV_COUNSELINGS_AND_TESTINGS="HIV Counselings and Testings" -COM_EHEALTH_PORTAL_SUBMENU_IMMUNISATIONS="Immunisations" -COM_EHEALTH_PORTAL_SUBMENU_IMMUNISATION_VACCINE_TYPES="Immunisation Vaccine Types" -COM_EHEALTH_PORTAL_SUBMENU_MEDICATIONS="Medications" -COM_EHEALTH_PORTAL_SUBMENU_PATIENT_QUEUE="Patient Queue" -COM_EHEALTH_PORTAL_SUBMENU_PAYMENTS="Payments" -COM_EHEALTH_PORTAL_SUBMENU_PROSTATE_AND_TESTICULAR_CANCERS="Prostate and Testicular Cancers" -COM_EHEALTH_PORTAL_SUBMENU_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_SUBMENU_STRENGTHS="Strengths" -COM_EHEALTH_PORTAL_SUBMENU_TESTS="Tests" -COM_EHEALTH_PORTAL_SUBMENU_TUBERCULOSES="Tuberculoses" -COM_EHEALTH_PORTAL_SUBMENU_UNITS="Units" -COM_EHEALTH_PORTAL_SUBMENU_VMMCS="VMMCs" -COM_EHEALTH_PORTAL_TEST="Test" -COM_EHEALTH_PORTAL_TESTING_REASON="Testing Reason" -COM_EHEALTH_PORTAL_TESTING_REASONS="Testing Reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_ACCESS="Testing Reasons Access" -COM_EHEALTH_PORTAL_TESTING_REASONS_ACCESS_DESC="Allows the users in this group to access access testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_BATCH_OPTIONS="Batch process the selected Testing Reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_BATCH_TIP="All changes will be applied to all selected Testing Reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_BATCH_USE="Testing Reasons Batch Use" -COM_EHEALTH_PORTAL_TESTING_REASONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_DESCRIPTION="Testing Reasons Edit Description" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of testing reason" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_NAME="Testing Reasons Edit Name" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of testing reason" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_VERSION="Testing Reasons Edit Version" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_EXPORT="Testing Reasons Export" -COM_EHEALTH_PORTAL_TESTING_REASONS_EXPORT_DESC="Allows the users in this group to export export testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_IMPORT="Testing Reasons Import" -COM_EHEALTH_PORTAL_TESTING_REASONS_IMPORT_DESC="Allows the users in this group to import import testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_ARCHIVED="%s Testing Reasons archived." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_ARCHIVED_1="%s Testing Reason archived." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_CHECKED_IN_0="No Testing Reason successfully checked in." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_CHECKED_IN_1="%d Testing Reason successfully checked in." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_CHECKED_IN_MORE="%d Testing Reasons successfully checked in." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_DELETED="%s Testing Reasons deleted." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_DELETED_1="%s Testing Reason deleted." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_FAILED_PUBLISHING="%s Testing Reasons failed publishing." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_FAILED_PUBLISHING_1="%s Testing Reason failed publishing." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_FEATURED="%s Testing Reasons featured." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_FEATURED_1="%s Testing Reason featured." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_PUBLISHED="%s Testing Reasons published." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_PUBLISHED_1="%s Testing Reason published." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_TRASHED="%s Testing Reasons trashed." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_TRASHED_1="%s Testing Reason trashed." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_UNFEATURED="%s Testing Reasons unfeatured." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_UNFEATURED_1="%s Testing Reason unfeatured." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_UNPUBLISHED="%s Testing Reasons unpublished." -COM_EHEALTH_PORTAL_TESTING_REASONS_N_ITEMS_UNPUBLISHED_1="%s Testing Reason unpublished." -COM_EHEALTH_PORTAL_TESTING_REASON_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_TESTING_REASON_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_TESTING_REASON_CREATED_BY_DESC="The user that created this Testing Reason." -COM_EHEALTH_PORTAL_TESTING_REASON_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_TESTING_REASON_CREATED_DATE_DESC="The date this Testing Reason was created." -COM_EHEALTH_PORTAL_TESTING_REASON_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_TESTING_REASON_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_TESTING_REASON_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_TESTING_REASON_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_TESTING_REASON_DETAILS="Details" -COM_EHEALTH_PORTAL_TESTING_REASON_EDIT="Editing the Testing Reason" -COM_EHEALTH_PORTAL_TESTING_REASON_ERROR_UNIQUE_ALIAS="Another Testing Reason has the same alias." -COM_EHEALTH_PORTAL_TESTING_REASON_ID="Id" -COM_EHEALTH_PORTAL_TESTING_REASON_MODIFIED_BY_DESC="The last user that modified this Testing Reason." -COM_EHEALTH_PORTAL_TESTING_REASON_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_TESTING_REASON_MODIFIED_DATE_DESC="The date this Testing Reason was modified." -COM_EHEALTH_PORTAL_TESTING_REASON_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_TESTING_REASON_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_TESTING_REASON_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_TESTING_REASON_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_TESTING_REASON_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_TESTING_REASON_NEW="A New Testing Reason" -COM_EHEALTH_PORTAL_TESTING_REASON_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_TESTING_REASON_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_TESTING_REASON_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_TESTING_REASON_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Testing Reason to customise the alias." -COM_EHEALTH_PORTAL_TESTING_REASON_STATUS="Status" -COM_EHEALTH_PORTAL_TESTING_REASON_VERSION_DESC="A count of the number of times this Testing Reason has been revised." -COM_EHEALTH_PORTAL_TESTING_REASON_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_TESTS="Tests" -COM_EHEALTH_PORTAL_TESTS_ACCESS="Tests Access" -COM_EHEALTH_PORTAL_TESTS_ACCESS_DESC="Allows the users in this group to access access tests" -COM_EHEALTH_PORTAL_TESTS_BATCH_OPTIONS="Batch process the selected Tests" -COM_EHEALTH_PORTAL_TESTS_BATCH_TIP="All changes will be applied to all selected Tests" -COM_EHEALTH_PORTAL_TESTS_BATCH_USE="Tests Batch Use" -COM_EHEALTH_PORTAL_TESTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch tests" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_ADD="Tests Dashboard Add" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of test" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_LIST="Tests Dashboard List" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of test" -COM_EHEALTH_PORTAL_TESTS_EDIT_VERSION="Tests Edit Version" -COM_EHEALTH_PORTAL_TESTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version tests" -COM_EHEALTH_PORTAL_TESTS_EXPORT="Tests Export" -COM_EHEALTH_PORTAL_TESTS_EXPORT_DESC="Allows the users in this group to export export tests" -COM_EHEALTH_PORTAL_TESTS_IMPORT="Tests Import" -COM_EHEALTH_PORTAL_TESTS_IMPORT_DESC="Allows the users in this group to import import tests" -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_ARCHIVED="%s Tests archived." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_ARCHIVED_1="%s Test archived." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_CHECKED_IN_0="No Test successfully checked in." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_CHECKED_IN_1="%d Test successfully checked in." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_CHECKED_IN_MORE="%d Tests successfully checked in." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_DELETED="%s Tests deleted." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_DELETED_1="%s Test deleted." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_FAILED_PUBLISHING="%s Tests failed publishing." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_FAILED_PUBLISHING_1="%s Test failed publishing." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_FEATURED="%s Tests featured." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_FEATURED_1="%s Test featured." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_PUBLISHED="%s Tests published." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_PUBLISHED_1="%s Test published." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_TRASHED="%s Tests trashed." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_TRASHED_1="%s Test trashed." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_UNFEATURED="%s Tests unfeatured." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_UNFEATURED_1="%s Test unfeatured." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_UNPUBLISHED="%s Tests unpublished." -COM_EHEALTH_PORTAL_TESTS_N_ITEMS_UNPUBLISHED_1="%s Test unpublished." -COM_EHEALTH_PORTAL_TESTS_SUBMENU="Tests Submenu" -COM_EHEALTH_PORTAL_TESTS_SUBMENU_DESC="Allows the users in this group to submenu of test" -COM_EHEALTH_PORTAL_TEST_ABNORMAL="Abnormal" -COM_EHEALTH_PORTAL_TEST_CHOLESTEROL="Cholesterol" -COM_EHEALTH_PORTAL_TEST_CHOLESTEROL_READING_DESCRIPTION="Enter Cholesterol reading (g/dL)" -COM_EHEALTH_PORTAL_TEST_CHOLESTEROL_READING_HINT="Your Cholesterol reading (g/dL) Here" -COM_EHEALTH_PORTAL_TEST_CHOLESTEROL_READING_LABEL="Cholesterol reading (g/dL):" -COM_EHEALTH_PORTAL_TEST_CREATED_BY_DESC="The user that created this Test." -COM_EHEALTH_PORTAL_TEST_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_TEST_CREATED_DATE_DESC="The date this Test was created." -COM_EHEALTH_PORTAL_TEST_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_TEST_EDIT="Editing the Test" -COM_EHEALTH_PORTAL_TEST_ERROR_UNIQUE_ALIAS="Another Test has the same alias." -COM_EHEALTH_PORTAL_TEST_GLUCOSE="Glucose" -COM_EHEALTH_PORTAL_TEST_GLUCOSE_FIRST_READING_DESCRIPTION="Enter Glucose 1st reading (mmol/L)" -COM_EHEALTH_PORTAL_TEST_GLUCOSE_FIRST_READING_HINT="Your Glucose 1st reading (mmol/L) Here" -COM_EHEALTH_PORTAL_TEST_GLUCOSE_FIRST_READING_LABEL="1st reading (mmol/L)" -COM_EHEALTH_PORTAL_TEST_GLUCOSE_SECOND_READING_DESCRIPTION="Enter Glucose 2nd reading (mmol/L)" -COM_EHEALTH_PORTAL_TEST_GLUCOSE_SECOND_READING_HINT="Your Glucose 2nd reading (mmol/L) Here" -COM_EHEALTH_PORTAL_TEST_GLUCOSE_SECOND_READING_LABEL="2nd reading (mmol/L):" -COM_EHEALTH_PORTAL_TEST_HAEMOGLOBIN="Haemoglobin" -COM_EHEALTH_PORTAL_TEST_HAEMOGLOBIN_READING_DESCRIPTION="Enter Haemoglobin reading (g/dL)" -COM_EHEALTH_PORTAL_TEST_HAEMOGLOBIN_READING_HINT="Your Haemoglobin reading (g/dL) Here" -COM_EHEALTH_PORTAL_TEST_HAEMOGLOBIN_READING_LABEL="Haemoglobin reading (g/dL):" -COM_EHEALTH_PORTAL_TEST_HEPATITIS_B="Hepatitis B" -COM_EHEALTH_PORTAL_TEST_HEPATITIS_FIRST_READING_DESCRIPTION="1st reading" -COM_EHEALTH_PORTAL_TEST_HEPATITIS_FIRST_READING_LABEL="1st reading:" -COM_EHEALTH_PORTAL_TEST_HEPATITIS_SECOND_READING_DESCRIPTION="2nd reading" -COM_EHEALTH_PORTAL_TEST_HEPATITIS_SECOND_READING_LABEL="2nd reading:" -COM_EHEALTH_PORTAL_TEST_ID="Id" -COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE="Inconclusive" -COM_EHEALTH_PORTAL_TEST_MALARIA="Malaria" -COM_EHEALTH_PORTAL_TEST_MALARIA_FIRST_READING_DESCRIPTION="1st reading" -COM_EHEALTH_PORTAL_TEST_MALARIA_FIRST_READING_LABEL="1st reading:" -COM_EHEALTH_PORTAL_TEST_MALARIA_SECOND_READING_DESCRIPTION="2nd reading" -COM_EHEALTH_PORTAL_TEST_MALARIA_SECOND_READING_LABEL="2nd reading:" -COM_EHEALTH_PORTAL_TEST_MODIFIED_BY_DESC="The last user that modified this Test." -COM_EHEALTH_PORTAL_TEST_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_TEST_MODIFIED_DATE_DESC="The date this Test was modified." -COM_EHEALTH_PORTAL_TEST_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_TEST_NEGATIVE="Negative" -COM_EHEALTH_PORTAL_TEST_NEW="A New Test" -COM_EHEALTH_PORTAL_TEST_NORMAL="Normal" -COM_EHEALTH_PORTAL_TEST_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_TEST_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_TEST_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_TEST_POSITIVE="Positive" -COM_EHEALTH_PORTAL_TEST_PREGNANCY="Pregnancy" -COM_EHEALTH_PORTAL_TEST_PREGNANCY_FIRST_READING_DESCRIPTION="1st reading" -COM_EHEALTH_PORTAL_TEST_PREGNANCY_FIRST_READING_LABEL="1st reading:" -COM_EHEALTH_PORTAL_TEST_PREGNANCY_SECOND_READING_DESCRIPTION="2nd reading" -COM_EHEALTH_PORTAL_TEST_PREGNANCY_SECOND_READING_LABEL="2nd reading:" -COM_EHEALTH_PORTAL_TEST_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_TEST_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_TEST_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_TEST_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_TEST_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_TEST_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_TEST_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Test to customise the alias." -COM_EHEALTH_PORTAL_TEST_STATUS="Status" -COM_EHEALTH_PORTAL_TEST_SYPHILIS_FIRST_READING_DESCRIPTION="1st reading" -COM_EHEALTH_PORTAL_TEST_SYPHILIS_FIRST_READING_LABEL="1st reading:" -COM_EHEALTH_PORTAL_TEST_SYPHILIS_SECOND_READING_DESCRIPTION="2nd reading" -COM_EHEALTH_PORTAL_TEST_SYPHILIS_SECOND_READING_LABEL="2nd reading:" -COM_EHEALTH_PORTAL_TEST_SYPHILLIS="Syphillis" -COM_EHEALTH_PORTAL_TEST_URINE="Urine" -COM_EHEALTH_PORTAL_TEST_URINE_TEST_RESULT_DESCRIPTION="Urine test result" -COM_EHEALTH_PORTAL_TEST_URINE_TEST_RESULT_LABEL="Urine test result" -COM_EHEALTH_PORTAL_TEST_VERSION_DESC="A count of the number of times this Test has been revised." -COM_EHEALTH_PORTAL_TEST_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_TRASHED="Trashed" -COM_EHEALTH_PORTAL_TUBERCULOSES="Tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_ACCESS="Tuberculoses Access" -COM_EHEALTH_PORTAL_TUBERCULOSES_ACCESS_DESC="Allows the users in this group to access access tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_BATCH_OPTIONS="Batch process the selected Tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_BATCH_TIP="All changes will be applied to all selected Tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_BATCH_USE="Tuberculoses Batch Use" -COM_EHEALTH_PORTAL_TUBERCULOSES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_ADD="Tuberculoses Dashboard Add" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_LIST="Tuberculoses Dashboard List" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_PATIENT="Tuberculoses Edit Patient" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_VERSION="Tuberculoses Edit Version" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_EXPORT="Tuberculoses Export" -COM_EHEALTH_PORTAL_TUBERCULOSES_EXPORT_DESC="Allows the users in this group to export export tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_IMPORT="Tuberculoses Import" -COM_EHEALTH_PORTAL_TUBERCULOSES_IMPORT_DESC="Allows the users in this group to import import tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_ARCHIVED="%s Tuberculoses archived." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_ARCHIVED_1="%s Tuberculosis archived." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_CHECKED_IN_0="No Tuberculosis successfully checked in." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_CHECKED_IN_1="%d Tuberculosis successfully checked in." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_CHECKED_IN_MORE="%d Tuberculoses successfully checked in." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_DELETED="%s Tuberculoses deleted." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_DELETED_1="%s Tuberculosis deleted." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_FAILED_PUBLISHING="%s Tuberculoses failed publishing." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_FAILED_PUBLISHING_1="%s Tuberculosis failed publishing." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_FEATURED="%s Tuberculoses featured." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_FEATURED_1="%s Tuberculosis featured." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_PUBLISHED="%s Tuberculoses published." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_PUBLISHED_1="%s Tuberculosis published." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_TRASHED="%s Tuberculoses trashed." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_TRASHED_1="%s Tuberculosis trashed." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_UNFEATURED="%s Tuberculoses unfeatured." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_UNFEATURED_1="%s Tuberculosis unfeatured." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_UNPUBLISHED="%s Tuberculoses unpublished." -COM_EHEALTH_PORTAL_TUBERCULOSES_N_ITEMS_UNPUBLISHED_1="%s Tuberculosis unpublished." -COM_EHEALTH_PORTAL_TUBERCULOSES_SUBMENU="Tuberculoses Submenu" -COM_EHEALTH_PORTAL_TUBERCULOSES_SUBMENU_DESC="Allows the users in this group to submenu of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSIS="Tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSIS_BLOOD_STREAKED_SPUTUM_DESCRIPTION="Coughing blood-streaked sputum" -COM_EHEALTH_PORTAL_TUBERCULOSIS_BLOOD_STREAKED_SPUTUM_LABEL="Coughing blood-streaked sputum" -COM_EHEALTH_PORTAL_TUBERCULOSIS_CREATED_BY_DESC="The user that created this Tuberculosis." -COM_EHEALTH_PORTAL_TUBERCULOSIS_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_TUBERCULOSIS_CREATED_DATE_DESC="The date this Tuberculosis was created." -COM_EHEALTH_PORTAL_TUBERCULOSIS_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_TUBERCULOSIS_DATE_OF_TREATMENT_DESCRIPTION="Enter date/year of treatment" -COM_EHEALTH_PORTAL_TUBERCULOSIS_DATE_OF_TREATMENT_LABEL="Date/year of treatment" -COM_EHEALTH_PORTAL_TUBERCULOSIS_DIAGNOSED_WITH_DISEASE_DESCRIPTION="Have you been recently diagnosed with diabetes, halitosis, HIV, renal/liver disease?" -COM_EHEALTH_PORTAL_TUBERCULOSIS_DIAGNOSED_WITH_DISEASE_LABEL="Have you been recently diagnosed with diabetes, halitosis, HIV, renal/liver disease?" -COM_EHEALTH_PORTAL_TUBERCULOSIS_EDIT="Editing the Tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSIS_ERROR_UNIQUE_ALIAS="Another Tuberculosis has the same alias." -COM_EHEALTH_PORTAL_TUBERCULOSIS_ID="Id" -COM_EHEALTH_PORTAL_TUBERCULOSIS_INCONCLUSIVE="Inconclusive" -COM_EHEALTH_PORTAL_TUBERCULOSIS_MODIFIED_BY_DESC="The last user that modified this Tuberculosis." -COM_EHEALTH_PORTAL_TUBERCULOSIS_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_TUBERCULOSIS_MODIFIED_DATE_DESC="The date this Tuberculosis was modified." -COM_EHEALTH_PORTAL_TUBERCULOSIS_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_TUBERCULOSIS_NEGATIVE="Negative" -COM_EHEALTH_PORTAL_TUBERCULOSIS_NEW="A New Tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSIS_NO="No" -COM_EHEALTH_PORTAL_TUBERCULOSIS_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PAIN_IN_CHEST_DESCRIPTION="Pain in chest when breathing or coughing" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PAIN_IN_CHEST_LABEL="Pain in chest when breathing or coughing" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PERSISTENT_COUGH_DESCRIPTION="Persistent cough of > 1 month duration" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PERSISTENT_COUGH_LABEL="Persistent cough of > 1 month duration" -COM_EHEALTH_PORTAL_TUBERCULOSIS_POSITIVE="Positive" -COM_EHEALTH_PORTAL_TUBERCULOSIS_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_TUBERCULOSIS_RECURRING_NIGHT_SWEATS_DESCRIPTION="Recurring night sweats during previous month" -COM_EHEALTH_PORTAL_TUBERCULOSIS_RECURRING_NIGHT_SWEATS_LABEL="Recurring night sweats during previous month" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REFERRED_SECOND_SPUTUM_DESCRIPTION="Referred for 2nd sputum" -COM_EHEALTH_PORTAL_TUBERCULOSIS_REFERRED_SECOND_SPUTUM_LABEL="Referred for 2nd sputum" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Tuberculosis to customise the alias." -COM_EHEALTH_PORTAL_TUBERCULOSIS_SCREENING="Screening" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SHORTNESS_OF_BREATH_DESCRIPTION="Shortness of breath (SOB) with increasing severity and frequency" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SHORTNESS_OF_BREATH_LABEL="Shortness of breath (SOB) with increasing severity and frequency" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_COLLECTION="Sputum Collection" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_COLLECTION_ONE_DESCRIPTION="1st Sputum collected" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_COLLECTION_ONE_LABEL="1st Sputum collected" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_RESULT_ONE_DESCRIPTION="1st Sputum result" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_RESULT_ONE_LABEL="1st Sputum result" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_RESULT_TWO_DESCRIPTION="2nd Sputum result" -COM_EHEALTH_PORTAL_TUBERCULOSIS_SPUTUM_RESULT_TWO_LABEL="2nd Sputum result" -COM_EHEALTH_PORTAL_TUBERCULOSIS_STATUS="Status" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_EXPOSED_DESCRIPTION="Have you recently been exposed to: a patient(s), colleague, close relative with suspected or confirmed active TB?" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_EXPOSED_LABEL="Have you recently been exposed to: a patient(s), colleague, close relative with suspected or confirmed active TB?" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_FEVER_DESCRIPTION="Fever lasting > 1 month" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_FEVER_LABEL="Fever lasting > 1 month" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_ONE_DESCRIPTION="Enter Reason" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_ONE_HINT="Your Reason Here" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_ONE_LABEL="Reason" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_ONE_MESSAGE="Error! Please add some text here." -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_TWO_DESCRIPTION="Enter Reason" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_TWO_HINT="Your Reason Here" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_TWO_LABEL="Reason" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_REASON_TWO_MESSAGE="Error! Please add some text here." -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_TREATMENT_DESCRIPTION="Have you ever been treated for TB before?" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TB_TREATMENT_LABEL="Have you ever been treated for TB before?" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TREATING_DHC_DESCRIPTION="Enter Treating doctor/hospital/clinic" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TREATING_DHC_HINT="Your Treating doctor/hospital/clinic Here" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TREATING_DHC_LABEL="Treating doctor/hospital/clinic" -COM_EHEALTH_PORTAL_TUBERCULOSIS_TREATING_DHC_MESSAGE="Error! Please add some text here." -COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN="Uncertain" -COM_EHEALTH_PORTAL_TUBERCULOSIS_UNUSUAL_TIREDNESS_DESCRIPTION="Unusual tiredness or weakness lasting weeks" -COM_EHEALTH_PORTAL_TUBERCULOSIS_UNUSUAL_TIREDNESS_LABEL="Unusual tiredness or weakness lasting weeks" -COM_EHEALTH_PORTAL_TUBERCULOSIS_VERSION_DESC="A count of the number of times this Tuberculosis has been revised." -COM_EHEALTH_PORTAL_TUBERCULOSIS_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_TUBERCULOSIS_WEIGHT_LOSS_WDIETING_DESCRIPTION="Weight loss without dieting in the previous 2-3 months" -COM_EHEALTH_PORTAL_TUBERCULOSIS_WEIGHT_LOSS_WDIETING_LABEL="Weight loss without dieting in the previous 2-3 months" -COM_EHEALTH_PORTAL_TUBERCULOSIS_YES="Yes" -COM_EHEALTH_PORTAL_UNIT="Unit" -COM_EHEALTH_PORTAL_UNITS="Units" -COM_EHEALTH_PORTAL_UNITS_ACCESS="Units Access" -COM_EHEALTH_PORTAL_UNITS_ACCESS_DESC="Allows the users in this group to access access units" -COM_EHEALTH_PORTAL_UNITS_BATCH_OPTIONS="Batch process the selected Units" -COM_EHEALTH_PORTAL_UNITS_BATCH_TIP="All changes will be applied to all selected Units" -COM_EHEALTH_PORTAL_UNITS_BATCH_USE="Units Batch Use" -COM_EHEALTH_PORTAL_UNITS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch units" -COM_EHEALTH_PORTAL_UNITS_EDIT_DESCRIPTION="Units Edit Description" -COM_EHEALTH_PORTAL_UNITS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of unit" -COM_EHEALTH_PORTAL_UNITS_EDIT_NAME="Units Edit Name" -COM_EHEALTH_PORTAL_UNITS_EDIT_NAME_DESC="Allows the users in this group to edit name of unit" -COM_EHEALTH_PORTAL_UNITS_EDIT_VERSION="Units Edit Version" -COM_EHEALTH_PORTAL_UNITS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version units" -COM_EHEALTH_PORTAL_UNITS_EXPORT="Units Export" -COM_EHEALTH_PORTAL_UNITS_EXPORT_DESC="Allows the users in this group to export export units" -COM_EHEALTH_PORTAL_UNITS_IMPORT="Units Import" -COM_EHEALTH_PORTAL_UNITS_IMPORT_DESC="Allows the users in this group to import import units" -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_ARCHIVED="%s Units archived." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_ARCHIVED_1="%s Unit archived." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_CHECKED_IN_0="No Unit successfully checked in." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_CHECKED_IN_1="%d Unit successfully checked in." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_CHECKED_IN_MORE="%d Units successfully checked in." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_DELETED="%s Units deleted." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_DELETED_1="%s Unit deleted." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_FAILED_PUBLISHING="%s Units failed publishing." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_FAILED_PUBLISHING_1="%s Unit failed publishing." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_FEATURED="%s Units featured." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_FEATURED_1="%s Unit featured." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_PUBLISHED="%s Units published." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_PUBLISHED_1="%s Unit published." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_TRASHED="%s Units trashed." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_TRASHED_1="%s Unit trashed." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_UNFEATURED="%s Units unfeatured." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_UNFEATURED_1="%s Unit unfeatured." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_UNPUBLISHED="%s Units unpublished." -COM_EHEALTH_PORTAL_UNITS_N_ITEMS_UNPUBLISHED_1="%s Unit unpublished." -COM_EHEALTH_PORTAL_UNITS_SUBMENU="Units Submenu" -COM_EHEALTH_PORTAL_UNITS_SUBMENU_DESC="Allows the users in this group to submenu of unit" -COM_EHEALTH_PORTAL_UNIT_ALIAS_HINT="Auto-generated from name" -COM_EHEALTH_PORTAL_UNIT_ALIAS_LABEL="Alias" -COM_EHEALTH_PORTAL_UNIT_CREATED_BY_DESC="The user that created this Unit." -COM_EHEALTH_PORTAL_UNIT_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_UNIT_CREATED_DATE_DESC="The date this Unit was created." -COM_EHEALTH_PORTAL_UNIT_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_UNIT_DESCRIPTION_DESCRIPTION="Add Description Here" -COM_EHEALTH_PORTAL_UNIT_DESCRIPTION_HINT="Add Description Here" -COM_EHEALTH_PORTAL_UNIT_DESCRIPTION_LABEL="Description" -COM_EHEALTH_PORTAL_UNIT_DETAILS="Details" -COM_EHEALTH_PORTAL_UNIT_EDIT="Editing the Unit" -COM_EHEALTH_PORTAL_UNIT_ERROR_UNIQUE_ALIAS="Another Unit has the same alias." -COM_EHEALTH_PORTAL_UNIT_ID="Id" -COM_EHEALTH_PORTAL_UNIT_MODIFIED_BY_DESC="The last user that modified this Unit." -COM_EHEALTH_PORTAL_UNIT_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_UNIT_MODIFIED_DATE_DESC="The date this Unit was modified." -COM_EHEALTH_PORTAL_UNIT_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_UNIT_NAME_DESCRIPTION="Enter Name Here" -COM_EHEALTH_PORTAL_UNIT_NAME_HINT="Name here" -COM_EHEALTH_PORTAL_UNIT_NAME_LABEL="Name" -COM_EHEALTH_PORTAL_UNIT_NAME_MESSAGE="Error! Please add name here." -COM_EHEALTH_PORTAL_UNIT_NEW="A New Unit" -COM_EHEALTH_PORTAL_UNIT_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_UNIT_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_UNIT_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_UNIT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Unit to customise the alias." -COM_EHEALTH_PORTAL_UNIT_STATUS="Status" -COM_EHEALTH_PORTAL_UNIT_VERSION_DESC="A count of the number of times this Unit has been revised." -COM_EHEALTH_PORTAL_UNIT_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_USE_BATCH="Use Batch" -COM_EHEALTH_PORTAL_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." -COM_EHEALTH_PORTAL_VERSION="Version" -COM_EHEALTH_PORTAL_VMMC="VMMC" -COM_EHEALTH_PORTAL_VMMCS="VMMCs" -COM_EHEALTH_PORTAL_VMMCS_ACCESS="Vmmcs Access" -COM_EHEALTH_PORTAL_VMMCS_ACCESS_DESC="Allows the users in this group to access access vmmcs" -COM_EHEALTH_PORTAL_VMMCS_BATCH_OPTIONS="Batch process the selected VMMCs" -COM_EHEALTH_PORTAL_VMMCS_BATCH_TIP="All changes will be applied to all selected VMMCs" -COM_EHEALTH_PORTAL_VMMCS_BATCH_USE="Vmmcs Batch Use" -COM_EHEALTH_PORTAL_VMMCS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch vmmcs" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_ADD="Vmmcs Dashboard Add" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of vmmc" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_LIST="Vmmcs Dashboard List" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of vmmc" -COM_EHEALTH_PORTAL_VMMCS_EDIT_VERSION="Vmmcs Edit Version" -COM_EHEALTH_PORTAL_VMMCS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version vmmcs" -COM_EHEALTH_PORTAL_VMMCS_EXPORT="Vmmcs Export" -COM_EHEALTH_PORTAL_VMMCS_EXPORT_DESC="Allows the users in this group to export export vmmcs" -COM_EHEALTH_PORTAL_VMMCS_IMPORT="Vmmcs Import" -COM_EHEALTH_PORTAL_VMMCS_IMPORT_DESC="Allows the users in this group to import import vmmcs" -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_ARCHIVED="%s VMMCs archived." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_ARCHIVED_1="%s VMMC archived." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_CHECKED_IN_0="No VMMC successfully checked in." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_CHECKED_IN_1="%d VMMC successfully checked in." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_CHECKED_IN_MORE="%d VMMCs successfully checked in." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_DELETED="%s VMMCs deleted." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_DELETED_1="%s VMMC deleted." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_FAILED_PUBLISHING="%s VMMCs failed publishing." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_FAILED_PUBLISHING_1="%s VMMC failed publishing." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_FEATURED="%s VMMCs featured." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_FEATURED_1="%s VMMC featured." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_PUBLISHED="%s VMMCs published." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_PUBLISHED_1="%s VMMC published." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_TRASHED="%s VMMCs trashed." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_TRASHED_1="%s VMMC trashed." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_UNFEATURED="%s VMMCs unfeatured." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_UNFEATURED_1="%s VMMC unfeatured." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_UNPUBLISHED="%s VMMCs unpublished." -COM_EHEALTH_PORTAL_VMMCS_N_ITEMS_UNPUBLISHED_1="%s VMMC unpublished." -COM_EHEALTH_PORTAL_VMMCS_SUBMENU="Vmmcs Submenu" -COM_EHEALTH_PORTAL_VMMCS_SUBMENU_DESC="Allows the users in this group to submenu of vmmc" -COM_EHEALTH_PORTAL_VMMC_ARE_YOU_CIRCUMCISED_DESCRIPTION="Are you circumcised?" -COM_EHEALTH_PORTAL_VMMC_ARE_YOU_CIRCUMCISED_LABEL="Are you circumcised?" -COM_EHEALTH_PORTAL_VMMC_CREATED_BY_DESC="The user that created this VMMC." -COM_EHEALTH_PORTAL_VMMC_CREATED_BY_LABEL="Created By" -COM_EHEALTH_PORTAL_VMMC_CREATED_DATE_DESC="The date this VMMC was created." -COM_EHEALTH_PORTAL_VMMC_CREATED_DATE_LABEL="Created Date" -COM_EHEALTH_PORTAL_VMMC_DETAILS="Details" -COM_EHEALTH_PORTAL_VMMC_EDIT="Editing the VMMC" -COM_EHEALTH_PORTAL_VMMC_ERROR_UNIQUE_ALIAS="Another VMMC has the same alias." -COM_EHEALTH_PORTAL_VMMC_FEMALE="Female" -COM_EHEALTH_PORTAL_VMMC_ID="Id" -COM_EHEALTH_PORTAL_VMMC_INFO_BEN_VMCC_DESCRIPTION="Provided with information on benefits of VMMC?" -COM_EHEALTH_PORTAL_VMMC_INFO_BEN_VMCC_LABEL="Provided with information on benefits of VMMC?" -COM_EHEALTH_PORTAL_VMMC_INTERESTED_IN_VMMC_DESCRIPTION="Are you interested in VMMC?" -COM_EHEALTH_PORTAL_VMMC_INTERESTED_IN_VMMC_LABEL="Are you interested in VMMC?" -COM_EHEALTH_PORTAL_VMMC_MALE="Male" -COM_EHEALTH_PORTAL_VMMC_MODIFIED_BY_DESC="The last user that modified this VMMC." -COM_EHEALTH_PORTAL_VMMC_MODIFIED_BY_LABEL="Modified By" -COM_EHEALTH_PORTAL_VMMC_MODIFIED_DATE_DESC="The date this VMMC was modified." -COM_EHEALTH_PORTAL_VMMC_MODIFIED_DATE_LABEL="Modified Date" -COM_EHEALTH_PORTAL_VMMC_NEW="A New VMMC" -COM_EHEALTH_PORTAL_VMMC_NO="No" -COM_EHEALTH_PORTAL_VMMC_ORDERING_LABEL="Ordering" -COM_EHEALTH_PORTAL_VMMC_PARTNER_CIRCUMCISED_DESCRIPTION="Is your partner circumcised?" -COM_EHEALTH_PORTAL_VMMC_PARTNER_CIRCUMCISED_LABEL="Is your partner circumcised?" -COM_EHEALTH_PORTAL_VMMC_PATIENT_LABEL="Patient Name" -COM_EHEALTH_PORTAL_VMMC_PERMISSION="Permissions" -COM_EHEALTH_PORTAL_VMMC_PUBLISHING="Publishing" -COM_EHEALTH_PORTAL_VMMC_REASON_DESCRIPTION="Add Reason Here" -COM_EHEALTH_PORTAL_VMMC_REASON_HINT="Add Reason Here" -COM_EHEALTH_PORTAL_VMMC_REASON_LABEL="Reason" -COM_EHEALTH_PORTAL_VMMC_REFERRALS="Referrals" -COM_EHEALTH_PORTAL_VMMC_REFERRAL_LABEL="Referred to" -COM_EHEALTH_PORTAL_VMMC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the VMMC to customise the alias." -COM_EHEALTH_PORTAL_VMMC_STATUS="Status" -COM_EHEALTH_PORTAL_VMMC_VERSION_DESC="A count of the number of times this VMMC has been revised." -COM_EHEALTH_PORTAL_VMMC_VERSION_LABEL="Version" -COM_EHEALTH_PORTAL_VMMC_VMMC_GENDER_DESCRIPTION="Gender" -COM_EHEALTH_PORTAL_VMMC_VMMC_GENDER_LABEL="Gender" -COM_EHEALTH_PORTAL_VMMC_YES="Yes" -COM_EHEALTH_PORTAL_WEBSITE="Website" \ No newline at end of file diff --git a/admin/language/en-GB/en-GB.com_ehealth_portal.sys.ini b/admin/language/en-GB/en-GB.com_ehealth_portal.sys.ini deleted file mode 100644 index 6f59fb6..0000000 --- a/admin/language/en-GB/en-GB.com_ehealth_portal.sys.ini +++ /dev/null @@ -1,549 +0,0 @@ -COM_EHEALTH_PORTAL="eHealth Portal" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_ACCESS="Administration Parts Access" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_ACCESS_DESC="Allows the users in this group to access access administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_BATCH_USE="Administration Parts Batch Use" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION="Administration Parts Edit Description" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of administration part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_NAME="Administration Parts Edit Name" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_NAME_DESC="Allows the users in this group to edit name of administration part" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_VERSION="Administration Parts Edit Version" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EXPORT="Administration Parts Export" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_EXPORT_DESC="Allows the users in this group to export export administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_IMPORT="Administration Parts Import" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_IMPORT_DESC="Allows the users in this group to import import administration parts" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_SUBMENU="Administration Parts Submenu" -COM_EHEALTH_PORTAL_ADMINISTRATION_PARTS_SUBMENU_DESC="Allows the users in this group to submenu of administration part" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_ACCESS="Antenatal Cares Access" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_ACCESS_DESC="Allows the users in this group to access access antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_BATCH_USE="Antenatal Cares Batch Use" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_ADD="Antenatal Cares Dashboard Add" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of antenatal care" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_LIST="Antenatal Cares Dashboard List" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of antenatal care" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EDIT_VERSION="Antenatal Cares Edit Version" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EXPORT="Antenatal Cares Export" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_EXPORT_DESC="Allows the users in this group to export export antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_IMPORT="Antenatal Cares Import" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_IMPORT_DESC="Allows the users in this group to import import antenatal cares" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_SUBMENU="Antenatal Cares Submenu" -COM_EHEALTH_PORTAL_ANTENATAL_CARES_SUBMENU_DESC="Allows the users in this group to submenu of antenatal care" -COM_EHEALTH_PORTAL_BREAST_CANCERS_ACCESS="Breast Cancers Access" -COM_EHEALTH_PORTAL_BREAST_CANCERS_ACCESS_DESC="Allows the users in this group to access access breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_BATCH_USE="Breast Cancers Batch Use" -COM_EHEALTH_PORTAL_BREAST_CANCERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_ADD="Breast Cancers Dashboard Add" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of breast cancer" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_LIST="Breast Cancers Dashboard List" -COM_EHEALTH_PORTAL_BREAST_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of breast cancer" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EDIT_VERSION="Breast Cancers Edit Version" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EXPORT="Breast Cancers Export" -COM_EHEALTH_PORTAL_BREAST_CANCERS_EXPORT_DESC="Allows the users in this group to export export breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_IMPORT="Breast Cancers Import" -COM_EHEALTH_PORTAL_BREAST_CANCERS_IMPORT_DESC="Allows the users in this group to import import breast cancers" -COM_EHEALTH_PORTAL_BREAST_CANCERS_SUBMENU="Breast Cancers Submenu" -COM_EHEALTH_PORTAL_BREAST_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of breast cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_ACCESS="Cervical Cancers Access" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_ACCESS_DESC="Allows the users in this group to access access cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_BATCH_USE="Cervical Cancers Batch Use" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_ADD="Cervical Cancers Dashboard Add" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of cervical cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_LIST="Cervical Cancers Dashboard List" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of cervical cancer" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EDIT_VERSION="Cervical Cancers Edit Version" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EXPORT="Cervical Cancers Export" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_EXPORT_DESC="Allows the users in this group to export export cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_IMPORT="Cervical Cancers Import" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_IMPORT_DESC="Allows the users in this group to import import cervical cancers" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_SUBMENU="Cervical Cancers Submenu" -COM_EHEALTH_PORTAL_CERVICAL_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of cervical cancer" -COM_EHEALTH_PORTAL_CLINICS_ACCESS="Clinics Access" -COM_EHEALTH_PORTAL_CLINICS_ACCESS_DESC="Allows the users in this group to access access clinics" -COM_EHEALTH_PORTAL_CLINICS_BATCH_USE="Clinics Batch Use" -COM_EHEALTH_PORTAL_CLINICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch clinics" -COM_EHEALTH_PORTAL_CLINICS_EDIT_CLINIC_NAME="Clinics Edit Clinic Name" -COM_EHEALTH_PORTAL_CLINICS_EDIT_CLINIC_NAME_DESC="Allows the users in this group to edit clinic name of clinic" -COM_EHEALTH_PORTAL_CLINICS_EDIT_DESCRIPTION="Clinics Edit Description" -COM_EHEALTH_PORTAL_CLINICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of clinic" -COM_EHEALTH_PORTAL_CLINICS_EDIT_VERSION="Clinics Edit Version" -COM_EHEALTH_PORTAL_CLINICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version clinics" -COM_EHEALTH_PORTAL_CLINICS_EXPORT="Clinics Export" -COM_EHEALTH_PORTAL_CLINICS_EXPORT_DESC="Allows the users in this group to export export clinics" -COM_EHEALTH_PORTAL_CLINICS_IMPORT="Clinics Import" -COM_EHEALTH_PORTAL_CLINICS_IMPORT_DESC="Allows the users in this group to import import clinics" -COM_EHEALTH_PORTAL_CONFIGURATION="eHealth Portal Configuration" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_ACCESS="Counseling Types Access" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_ACCESS_DESC="Allows the users in this group to access access counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_BATCH_USE="Counseling Types Batch Use" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION="Counseling Types Edit Description" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of counseling type" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_NAME="Counseling Types Edit Name" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of counseling type" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_VERSION="Counseling Types Edit Version" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EXPORT="Counseling Types Export" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_EXPORT_DESC="Allows the users in this group to export export counseling types" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_IMPORT="Counseling Types Import" -COM_EHEALTH_PORTAL_COUNSELING_TYPES_IMPORT_DESC="Allows the users in this group to import import counseling types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_ACCESS="Diagnosis Types Access" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_ACCESS_DESC="Allows the users in this group to access access diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_BATCH_USE="Diagnosis Types Batch Use" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION="Diagnosis Types Edit Description" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of diagnosis type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_NAME="Diagnosis Types Edit Name" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of diagnosis type" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_VERSION="Diagnosis Types Edit Version" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EXPORT="Diagnosis Types Export" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_EXPORT_DESC="Allows the users in this group to export export diagnosis types" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_IMPORT="Diagnosis Types Import" -COM_EHEALTH_PORTAL_DIAGNOSIS_TYPES_IMPORT_DESC="Allows the users in this group to import import diagnosis types" -COM_EHEALTH_PORTAL_EDIT_CREATED_BY="Edit Created By" -COM_EHEALTH_PORTAL_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." -COM_EHEALTH_PORTAL_EDIT_CREATED_DATE="Edit Created Date" -COM_EHEALTH_PORTAL_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date." -COM_EHEALTH_PORTAL_EDIT_VERSIONS="Edit Version" -COM_EHEALTH_PORTAL_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." -COM_EHEALTH_PORTAL_EXPORT_DATA="Export Data" -COM_EHEALTH_PORTAL_EXPORT_DATA_DESC="Allows users in this group to export data." -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_ACCESS="Family Plannings Access" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_ACCESS_DESC="Allows the users in this group to access access family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_BATCH_USE="Family Plannings Batch Use" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD="Family Plannings Dashboard Add" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST="Family Plannings Dashboard List" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS="Family Plannings Edit Diagnosis" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS_DESC="Allows the users in this group to edit diagnosis of family planning" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_VERSION="Family Plannings Edit Version" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EXPORT="Family Plannings Export" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_EXPORT_DESC="Allows the users in this group to export export family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_IMPORT="Family Plannings Import" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_IMPORT_DESC="Allows the users in this group to import import family plannings" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_SUBMENU="Family Plannings Submenu" -COM_EHEALTH_PORTAL_FAMILY_PLANNINGS_SUBMENU_DESC="Allows the users in this group to submenu of family planning" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_ACCESS="Foetal Engagements Access" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_ACCESS_DESC="Allows the users in this group to access access foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_BATCH_USE="Foetal Engagements Batch Use" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION="Foetal Engagements Edit Description" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME="Foetal Engagements Edit Name" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal engagement" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION="Foetal Engagements Edit Version" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EXPORT="Foetal Engagements Export" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_EXPORT_DESC="Allows the users in this group to export export foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_IMPORT="Foetal Engagements Import" -COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENTS_IMPORT_DESC="Allows the users in this group to import import foetal engagements" -COM_EHEALTH_PORTAL_FOETAL_LIES_ACCESS="Foetal Lies Access" -COM_EHEALTH_PORTAL_FOETAL_LIES_ACCESS_DESC="Allows the users in this group to access access foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_BATCH_USE="Foetal Lies Batch Use" -COM_EHEALTH_PORTAL_FOETAL_LIES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_DESCRIPTION="Foetal Lies Edit Description" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal lie" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_NAME="Foetal Lies Edit Name" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal lie" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_VERSION="Foetal Lies Edit Version" -COM_EHEALTH_PORTAL_FOETAL_LIES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_EXPORT="Foetal Lies Export" -COM_EHEALTH_PORTAL_FOETAL_LIES_EXPORT_DESC="Allows the users in this group to export export foetal lies" -COM_EHEALTH_PORTAL_FOETAL_LIES_IMPORT="Foetal Lies Import" -COM_EHEALTH_PORTAL_FOETAL_LIES_IMPORT_DESC="Allows the users in this group to import import foetal lies" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_ACCESS="Foetal Presentations Access" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_ACCESS_DESC="Allows the users in this group to access access foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_BATCH_USE="Foetal Presentations Batch Use" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION="Foetal Presentations Edit Description" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_NAME="Foetal Presentations Edit Name" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal presentation" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION="Foetal Presentations Edit Version" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EXPORT="Foetal Presentations Export" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_EXPORT_DESC="Allows the users in this group to export export foetal presentations" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_IMPORT="Foetal Presentations Import" -COM_EHEALTH_PORTAL_FOETAL_PRESENTATIONS_IMPORT_DESC="Allows the users in this group to import import foetal presentations" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS="General Medical Check Ups Access" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS_DESC="Allows the users in this group to access access general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE="General Medical Check Ups Batch Use" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD="General Medical Check Ups Dashboard Add" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST="General Medical Check Ups Dashboard List" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT="General Medical Check Ups Edit Patient" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of general medical check up" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION="General Medical Check Ups Edit Version" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT="General Medical Check Ups Export" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT_DESC="Allows the users in this group to export export general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT="General Medical Check Ups Import" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT_DESC="Allows the users in this group to import import general medical check ups" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU="General Medical Check Ups Submenu" -COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU_DESC="Allows the users in this group to submenu of general medical check up" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_ACCESS="Health Educations Access" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_ACCESS_DESC="Allows the users in this group to access access health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_BATCH_USE="Health Educations Batch Use" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD="Health Educations Dashboard Add" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST="Health Educations Dashboard List" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC="Health Educations Edit Health Education Topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC_DESC="Allows the users in this group to edit health education topic of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_VERSION="Health Educations Edit Version" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EXPORT="Health Educations Export" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_EXPORT_DESC="Allows the users in this group to export export health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_IMPORT="Health Educations Import" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_IMPORT_DESC="Allows the users in this group to import import health educations" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_SUBMENU="Health Educations Submenu" -COM_EHEALTH_PORTAL_HEALTH_EDUCATIONS_SUBMENU_DESC="Allows the users in this group to submenu of health education" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_ACCESS="Health Education Topics Access" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_ACCESS_DESC="Allows the users in this group to access access health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE="Health Education Topics Batch Use" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION="Health Education Topics Edit Description" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of health education topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME="Health Education Topics Edit Name" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME_DESC="Allows the users in this group to edit name of health education topic" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION="Health Education Topics Edit Version" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EXPORT="Health Education Topics Export" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_EXPORT_DESC="Allows the users in this group to export export health education topics" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_IMPORT="Health Education Topics Import" -COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPICS_IMPORT_DESC="Allows the users in this group to import import health education topics" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS="Hiv Counselings And Testings Access" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS_DESC="Allows the users in this group to access access hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE="Hiv Counselings And Testings Batch Use" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD="Hiv Counselings And Testings Dashboard Add" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of hiv counseling and testing" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST="Hiv Counselings And Testings Dashboard List" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of hiv counseling and testing" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION="Hiv Counselings And Testings Edit Version" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT="Hiv Counselings And Testings Export" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT_DESC="Allows the users in this group to export export hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT="Hiv Counselings And Testings Import" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT_DESC="Allows the users in this group to import import hiv counselings and testings" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU="Hiv Counselings And Testings Submenu" -COM_EHEALTH_PORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU_DESC="Allows the users in this group to submenu of hiv counseling and testing" -COM_EHEALTH_PORTAL_IMMUNISATIONS_ACCESS="Immunisations Access" -COM_EHEALTH_PORTAL_IMMUNISATIONS_ACCESS_DESC="Allows the users in this group to access access immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_BATCH_USE="Immunisations Batch Use" -COM_EHEALTH_PORTAL_IMMUNISATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_ADD="Immunisations Dashboard Add" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_LIST="Immunisations Dashboard List" -COM_EHEALTH_PORTAL_IMMUNISATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_PATIENT="Immunisations Edit Patient" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_VERSION="Immunisations Edit Version" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EXPORT="Immunisations Export" -COM_EHEALTH_PORTAL_IMMUNISATIONS_EXPORT_DESC="Allows the users in this group to export export immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_IMPORT="Immunisations Import" -COM_EHEALTH_PORTAL_IMMUNISATIONS_IMPORT_DESC="Allows the users in this group to import import immunisations" -COM_EHEALTH_PORTAL_IMMUNISATIONS_SUBMENU="Immunisations Submenu" -COM_EHEALTH_PORTAL_IMMUNISATIONS_SUBMENU_DESC="Allows the users in this group to submenu of immunisation" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_ACCESS="Immunisation Types Access" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_BATCH_USE="Immunisation Types Batch Use" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION="Immunisation Types Edit Description" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_NAME="Immunisation Types Edit Name" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation type" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_VERSION="Immunisation Types Edit Version" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EXPORT="Immunisation Types Export" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_IMPORT="Immunisation Types Import" -COM_EHEALTH_PORTAL_IMMUNISATION_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS="Immunisation Vaccine Types Access" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE="Immunisation Vaccine Types Batch Use" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION="Immunisation Vaccine Types Edit Description" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation vaccine type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME="Immunisation Vaccine Types Edit Name" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation vaccine type" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION="Immunisation Vaccine Types Edit Version" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT="Immunisation Vaccine Types Export" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT="Immunisation Vaccine Types Import" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation vaccine types" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU="Immunisation Vaccine Types Submenu" -COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of immunisation vaccine type" -COM_EHEALTH_PORTAL_IMPORT_DATA="Import Data" -COM_EHEALTH_PORTAL_IMPORT_DATA_DESC="Allows users in this group to import data." -COM_EHEALTH_PORTAL_MEDICATIONS_ACCESS="Medications Access" -COM_EHEALTH_PORTAL_MEDICATIONS_ACCESS_DESC="Allows the users in this group to access access medications" -COM_EHEALTH_PORTAL_MEDICATIONS_BATCH_USE="Medications Batch Use" -COM_EHEALTH_PORTAL_MEDICATIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch medications" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_DESCRIPTION="Medications Edit Description" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of medication" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_NAME="Medications Edit Name" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of medication" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_VERSION="Medications Edit Version" -COM_EHEALTH_PORTAL_MEDICATIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version medications" -COM_EHEALTH_PORTAL_MEDICATIONS_EXPORT="Medications Export" -COM_EHEALTH_PORTAL_MEDICATIONS_EXPORT_DESC="Allows the users in this group to export export medications" -COM_EHEALTH_PORTAL_MEDICATIONS_IMPORT="Medications Import" -COM_EHEALTH_PORTAL_MEDICATIONS_IMPORT_DESC="Allows the users in this group to import import medications" -COM_EHEALTH_PORTAL_MEDICATIONS_SUBMENU="Medications Submenu" -COM_EHEALTH_PORTAL_MEDICATIONS_SUBMENU_DESC="Allows the users in this group to submenu of medication" -COM_EHEALTH_PORTAL_MENU="» eHealth Portal" -COM_EHEALTH_PORTAL_MENU_ANTENATAL_CARES="Antenatal Cares" -COM_EHEALTH_PORTAL_MENU_BREAST_CANCERS="Breast Cancers" -COM_EHEALTH_PORTAL_MENU_CERVICAL_CANCERS="Cervical Cancers" -COM_EHEALTH_PORTAL_MENU_FAMILY_PLANNINGS="Family Plannings" -COM_EHEALTH_PORTAL_MENU_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups" -COM_EHEALTH_PORTAL_MENU_HEALTH_EDUCATIONS="Health Educations" -COM_EHEALTH_PORTAL_MENU_HIV_COUNSELINGS_AND_TESTINGS="HIV Counselings and Testings" -COM_EHEALTH_PORTAL_MENU_IMMUNISATIONS="Immunisations" -COM_EHEALTH_PORTAL_MENU_PATIENT_QUEUE="Patient Queue" -COM_EHEALTH_PORTAL_MENU_PAYMENTS="Payments" -COM_EHEALTH_PORTAL_MENU_PROSTATE_AND_TESTICULAR_CANCERS="Prostate and Testicular Cancers" -COM_EHEALTH_PORTAL_MENU_TESTS="Tests" -COM_EHEALTH_PORTAL_MENU_TUBERCULOSES="Tuberculoses" -COM_EHEALTH_PORTAL_MENU_VMMCS="VMMCs" -COM_EHEALTH_PORTAL_NONPAY_REASONS_ACCESS="Nonpay Reasons Access" -COM_EHEALTH_PORTAL_NONPAY_REASONS_ACCESS_DESC="Allows the users in this group to access access nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_BATCH_USE="Nonpay Reasons Batch Use" -COM_EHEALTH_PORTAL_NONPAY_REASONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_DESCRIPTION="Nonpay Reasons Edit Description" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of nonpay reason" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_NAME="Nonpay Reasons Edit Name" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of nonpay reason" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_VERSION="Nonpay Reasons Edit Version" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EXPORT="Nonpay Reasons Export" -COM_EHEALTH_PORTAL_NONPAY_REASONS_EXPORT_DESC="Allows the users in this group to export export nonpay reasons" -COM_EHEALTH_PORTAL_NONPAY_REASONS_IMPORT="Nonpay Reasons Import" -COM_EHEALTH_PORTAL_NONPAY_REASONS_IMPORT_DESC="Allows the users in this group to import import nonpay reasons" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_ACCESS="Patient Queue Access" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_ACCESS_DESC="Allows the users in this group to access patient queue." -COM_EHEALTH_PORTAL_PATIENT_QUEUE_DASHBOARD_LIST="Patient Queue Dashboard List" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Patient Queue" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_SUBMENU="Patient Queue Submenu" -COM_EHEALTH_PORTAL_PATIENT_QUEUE_SUBMENU_DESC="Allows the users in this group to submenu of Patient Queue" -COM_EHEALTH_PORTAL_PAYMENTS_ACCESS="Payments Access" -COM_EHEALTH_PORTAL_PAYMENTS_ACCESS_DESC="Allows the users in this group to access access payments" -COM_EHEALTH_PORTAL_PAYMENTS_BATCH_USE="Payments Batch Use" -COM_EHEALTH_PORTAL_PAYMENTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payments" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_ADD="Payments Dashboard Add" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of payment" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_LIST="Payments Dashboard List" -COM_EHEALTH_PORTAL_PAYMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of payment" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_PATIENT="Payments Edit Patient" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of payment" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_VERSION="Payments Edit Version" -COM_EHEALTH_PORTAL_PAYMENTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payments" -COM_EHEALTH_PORTAL_PAYMENTS_EXPORT="Payments Export" -COM_EHEALTH_PORTAL_PAYMENTS_EXPORT_DESC="Allows the users in this group to export export payments" -COM_EHEALTH_PORTAL_PAYMENTS_IMPORT="Payments Import" -COM_EHEALTH_PORTAL_PAYMENTS_IMPORT_DESC="Allows the users in this group to import import payments" -COM_EHEALTH_PORTAL_PAYMENTS_SUBMENU="Payments Submenu" -COM_EHEALTH_PORTAL_PAYMENTS_SUBMENU_DESC="Allows the users in this group to submenu of payment" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_ACCESS="Payment Amounts Access" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_ACCESS_DESC="Allows the users in this group to access access payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_BATCH_USE="Payment Amounts Batch Use" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_DESCRIPTION="Payment Amounts Edit Description" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of payment amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_NAME="Payment Amounts Edit Name" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_NAME_DESC="Allows the users in this group to edit name of payment amount" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_VERSION="Payment Amounts Edit Version" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EXPORT="Payment Amounts Export" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_EXPORT_DESC="Allows the users in this group to export export payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_IMPORT="Payment Amounts Import" -COM_EHEALTH_PORTAL_PAYMENT_AMOUNTS_IMPORT_DESC="Allows the users in this group to import import payment amounts" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_ACCESS="Payment Types Access" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_ACCESS_DESC="Allows the users in this group to access access payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_BATCH_USE="Payment Types Batch Use" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION="Payment Types Edit Description" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of payment type" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_NAME="Payment Types Edit Name" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of payment type" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_VERSION="Payment Types Edit Version" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EXPORT="Payment Types Export" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_EXPORT_DESC="Allows the users in this group to export export payment types" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_IMPORT="Payment Types Import" -COM_EHEALTH_PORTAL_PAYMENT_TYPES_IMPORT_DESC="Allows the users in this group to import import payment types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_ACCESS="Planning Types Access" -COM_EHEALTH_PORTAL_PLANNING_TYPES_ACCESS_DESC="Allows the users in this group to access access planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_BATCH_USE="Planning Types Batch Use" -COM_EHEALTH_PORTAL_PLANNING_TYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_DESCRIPTION="Planning Types Edit Description" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of planning type" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_NAME="Planning Types Edit Name" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of planning type" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_VERSION="Planning Types Edit Version" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EXPORT="Planning Types Export" -COM_EHEALTH_PORTAL_PLANNING_TYPES_EXPORT_DESC="Allows the users in this group to export export planning types" -COM_EHEALTH_PORTAL_PLANNING_TYPES_IMPORT="Planning Types Import" -COM_EHEALTH_PORTAL_PLANNING_TYPES_IMPORT_DESC="Allows the users in this group to import import planning types" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS="Prostate And Testicular Cancers Access" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS_DESC="Allows the users in this group to access access prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE="Prostate And Testicular Cancers Batch Use" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD="Prostate And Testicular Cancers Dashboard Add" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of prostate and testicular cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST="Prostate And Testicular Cancers Dashboard List" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of prostate and testicular cancer" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION="Prostate And Testicular Cancers Edit Version" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT="Prostate And Testicular Cancers Export" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT_DESC="Allows the users in this group to export export prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT="Prostate And Testicular Cancers Import" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT_DESC="Allows the users in this group to import import prostate and testicular cancers" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU="Prostate And Testicular Cancers Submenu" -COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of prostate and testicular cancer" -COM_EHEALTH_PORTAL_REFERRALS_ACCESS="Referrals Access" -COM_EHEALTH_PORTAL_REFERRALS_ACCESS_DESC="Allows the users in this group to access access referrals" -COM_EHEALTH_PORTAL_REFERRALS_BATCH_USE="Referrals Batch Use" -COM_EHEALTH_PORTAL_REFERRALS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch referrals" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_DESCRIPTION="Referrals Edit Description" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of referral" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_NAME="Referrals Edit Name" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_NAME_DESC="Allows the users in this group to edit name of referral" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_VERSION="Referrals Edit Version" -COM_EHEALTH_PORTAL_REFERRALS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version referrals" -COM_EHEALTH_PORTAL_REFERRALS_EXPORT="Referrals Export" -COM_EHEALTH_PORTAL_REFERRALS_EXPORT_DESC="Allows the users in this group to export export referrals" -COM_EHEALTH_PORTAL_REFERRALS_IMPORT="Referrals Import" -COM_EHEALTH_PORTAL_REFERRALS_IMPORT_DESC="Allows the users in this group to import import referrals" -COM_EHEALTH_PORTAL_REFERRALS_SUBMENU="Referrals Submenu" -COM_EHEALTH_PORTAL_REFERRALS_SUBMENU_DESC="Allows the users in this group to submenu of referral" -COM_EHEALTH_PORTAL_SITES_ACCESS="Sites Access" -COM_EHEALTH_PORTAL_SITES_ACCESS_DESC="Allows the users in this group to access access sites" -COM_EHEALTH_PORTAL_SITES_BATCH_USE="Sites Batch Use" -COM_EHEALTH_PORTAL_SITES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch sites" -COM_EHEALTH_PORTAL_SITES_EDIT_DESCRIPTION="Sites Edit Description" -COM_EHEALTH_PORTAL_SITES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of site" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_NAME="Sites Edit Site Name" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_NAME_DESC="Allows the users in this group to edit site name of site" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_REGION="Sites Edit Site Region" -COM_EHEALTH_PORTAL_SITES_EDIT_SITE_REGION_DESC="Allows the users in this group to edit site region of site" -COM_EHEALTH_PORTAL_SITES_EDIT_VERSION="Sites Edit Version" -COM_EHEALTH_PORTAL_SITES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version sites" -COM_EHEALTH_PORTAL_SITES_EXPORT="Sites Export" -COM_EHEALTH_PORTAL_SITES_EXPORT_DESC="Allows the users in this group to export export sites" -COM_EHEALTH_PORTAL_SITES_IMPORT="Sites Import" -COM_EHEALTH_PORTAL_SITES_IMPORT_DESC="Allows the users in this group to import import sites" -COM_EHEALTH_PORTAL_STRENGTHS_ACCESS="Strengths Access" -COM_EHEALTH_PORTAL_STRENGTHS_ACCESS_DESC="Allows the users in this group to access access strengths" -COM_EHEALTH_PORTAL_STRENGTHS_BATCH_USE="Strengths Batch Use" -COM_EHEALTH_PORTAL_STRENGTHS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch strengths" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_DESCRIPTION="Strengths Edit Description" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of strength" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_NAME="Strengths Edit Name" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_NAME_DESC="Allows the users in this group to edit name of strength" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_VERSION="Strengths Edit Version" -COM_EHEALTH_PORTAL_STRENGTHS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version strengths" -COM_EHEALTH_PORTAL_STRENGTHS_EXPORT="Strengths Export" -COM_EHEALTH_PORTAL_STRENGTHS_EXPORT_DESC="Allows the users in this group to export export strengths" -COM_EHEALTH_PORTAL_STRENGTHS_IMPORT="Strengths Import" -COM_EHEALTH_PORTAL_STRENGTHS_IMPORT_DESC="Allows the users in this group to import import strengths" -COM_EHEALTH_PORTAL_STRENGTHS_SUBMENU="Strengths Submenu" -COM_EHEALTH_PORTAL_STRENGTHS_SUBMENU_DESC="Allows the users in this group to submenu of strength" -COM_EHEALTH_PORTAL_TESTING_REASONS_ACCESS="Testing Reasons Access" -COM_EHEALTH_PORTAL_TESTING_REASONS_ACCESS_DESC="Allows the users in this group to access access testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_BATCH_USE="Testing Reasons Batch Use" -COM_EHEALTH_PORTAL_TESTING_REASONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_DESCRIPTION="Testing Reasons Edit Description" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of testing reason" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_NAME="Testing Reasons Edit Name" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of testing reason" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_VERSION="Testing Reasons Edit Version" -COM_EHEALTH_PORTAL_TESTING_REASONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_EXPORT="Testing Reasons Export" -COM_EHEALTH_PORTAL_TESTING_REASONS_EXPORT_DESC="Allows the users in this group to export export testing reasons" -COM_EHEALTH_PORTAL_TESTING_REASONS_IMPORT="Testing Reasons Import" -COM_EHEALTH_PORTAL_TESTING_REASONS_IMPORT_DESC="Allows the users in this group to import import testing reasons" -COM_EHEALTH_PORTAL_TESTS_ACCESS="Tests Access" -COM_EHEALTH_PORTAL_TESTS_ACCESS_DESC="Allows the users in this group to access access tests" -COM_EHEALTH_PORTAL_TESTS_BATCH_USE="Tests Batch Use" -COM_EHEALTH_PORTAL_TESTS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch tests" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_ADD="Tests Dashboard Add" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of test" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_LIST="Tests Dashboard List" -COM_EHEALTH_PORTAL_TESTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of test" -COM_EHEALTH_PORTAL_TESTS_EDIT_VERSION="Tests Edit Version" -COM_EHEALTH_PORTAL_TESTS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version tests" -COM_EHEALTH_PORTAL_TESTS_EXPORT="Tests Export" -COM_EHEALTH_PORTAL_TESTS_EXPORT_DESC="Allows the users in this group to export export tests" -COM_EHEALTH_PORTAL_TESTS_IMPORT="Tests Import" -COM_EHEALTH_PORTAL_TESTS_IMPORT_DESC="Allows the users in this group to import import tests" -COM_EHEALTH_PORTAL_TESTS_SUBMENU="Tests Submenu" -COM_EHEALTH_PORTAL_TESTS_SUBMENU_DESC="Allows the users in this group to submenu of test" -COM_EHEALTH_PORTAL_TUBERCULOSES_ACCESS="Tuberculoses Access" -COM_EHEALTH_PORTAL_TUBERCULOSES_ACCESS_DESC="Allows the users in this group to access access tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_BATCH_USE="Tuberculoses Batch Use" -COM_EHEALTH_PORTAL_TUBERCULOSES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_ADD="Tuberculoses Dashboard Add" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_LIST="Tuberculoses Dashboard List" -COM_EHEALTH_PORTAL_TUBERCULOSES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_PATIENT="Tuberculoses Edit Patient" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of tuberculosis" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_VERSION="Tuberculoses Edit Version" -COM_EHEALTH_PORTAL_TUBERCULOSES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_EXPORT="Tuberculoses Export" -COM_EHEALTH_PORTAL_TUBERCULOSES_EXPORT_DESC="Allows the users in this group to export export tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_IMPORT="Tuberculoses Import" -COM_EHEALTH_PORTAL_TUBERCULOSES_IMPORT_DESC="Allows the users in this group to import import tuberculoses" -COM_EHEALTH_PORTAL_TUBERCULOSES_SUBMENU="Tuberculoses Submenu" -COM_EHEALTH_PORTAL_TUBERCULOSES_SUBMENU_DESC="Allows the users in this group to submenu of tuberculosis" -COM_EHEALTH_PORTAL_UNITS_ACCESS="Units Access" -COM_EHEALTH_PORTAL_UNITS_ACCESS_DESC="Allows the users in this group to access access units" -COM_EHEALTH_PORTAL_UNITS_BATCH_USE="Units Batch Use" -COM_EHEALTH_PORTAL_UNITS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch units" -COM_EHEALTH_PORTAL_UNITS_EDIT_DESCRIPTION="Units Edit Description" -COM_EHEALTH_PORTAL_UNITS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of unit" -COM_EHEALTH_PORTAL_UNITS_EDIT_NAME="Units Edit Name" -COM_EHEALTH_PORTAL_UNITS_EDIT_NAME_DESC="Allows the users in this group to edit name of unit" -COM_EHEALTH_PORTAL_UNITS_EDIT_VERSION="Units Edit Version" -COM_EHEALTH_PORTAL_UNITS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version units" -COM_EHEALTH_PORTAL_UNITS_EXPORT="Units Export" -COM_EHEALTH_PORTAL_UNITS_EXPORT_DESC="Allows the users in this group to export export units" -COM_EHEALTH_PORTAL_UNITS_IMPORT="Units Import" -COM_EHEALTH_PORTAL_UNITS_IMPORT_DESC="Allows the users in this group to import import units" -COM_EHEALTH_PORTAL_UNITS_SUBMENU="Units Submenu" -COM_EHEALTH_PORTAL_UNITS_SUBMENU_DESC="Allows the users in this group to submenu of unit" -COM_EHEALTH_PORTAL_USE_BATCH="Use Batch" -COM_EHEALTH_PORTAL_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." -COM_EHEALTH_PORTAL_VMMCS_ACCESS="Vmmcs Access" -COM_EHEALTH_PORTAL_VMMCS_ACCESS_DESC="Allows the users in this group to access access vmmcs" -COM_EHEALTH_PORTAL_VMMCS_BATCH_USE="Vmmcs Batch Use" -COM_EHEALTH_PORTAL_VMMCS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch vmmcs" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_ADD="Vmmcs Dashboard Add" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of vmmc" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_LIST="Vmmcs Dashboard List" -COM_EHEALTH_PORTAL_VMMCS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of vmmc" -COM_EHEALTH_PORTAL_VMMCS_EDIT_VERSION="Vmmcs Edit Version" -COM_EHEALTH_PORTAL_VMMCS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version vmmcs" -COM_EHEALTH_PORTAL_VMMCS_EXPORT="Vmmcs Export" -COM_EHEALTH_PORTAL_VMMCS_EXPORT_DESC="Allows the users in this group to export export vmmcs" -COM_EHEALTH_PORTAL_VMMCS_IMPORT="Vmmcs Import" -COM_EHEALTH_PORTAL_VMMCS_IMPORT_DESC="Allows the users in this group to import import vmmcs" -COM_EHEALTH_PORTAL_VMMCS_SUBMENU="Vmmcs Submenu" -COM_EHEALTH_PORTAL_VMMCS_SUBMENU_DESC="Allows the users in this group to submenu of vmmc" \ No newline at end of file diff --git a/admin/language/en-GB/en-GB.com_ehealthportal.ini b/admin/language/en-GB/en-GB.com_ehealthportal.ini new file mode 100644 index 0000000..0be5ea7 --- /dev/null +++ b/admin/language/en-GB/en-GB.com_ehealthportal.ini @@ -0,0 +1,2946 @@ +COM_EHEALTHPORTAL="eHealth Portal" +COM_EHEALTHPORTAL_ADMINISTRATION_PART="Administration Part" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS="Administration Parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_ACCESS="Administration Parts Access" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_ACCESS_DESC="Allows the users in this group to access access administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_BATCH_OPTIONS="Batch process the selected Administration Parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_BATCH_TIP="All changes will be applied to all selected Administration Parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_BATCH_USE="Administration Parts Batch Use" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION="Administration Parts Edit Description" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of administration part" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_NAME="Administration Parts Edit Name" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_NAME_DESC="Allows the users in this group to edit name of administration part" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_VERSION="Administration Parts Edit Version" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EXPORT="Administration Parts Export" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EXPORT_DESC="Allows the users in this group to export export administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_IMPORT="Administration Parts Import" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_IMPORT_DESC="Allows the users in this group to import import administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_ARCHIVED="%s Administration Parts archived." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_ARCHIVED_1="%s Administration Part archived." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_CHECKED_IN_0="No Administration Part successfully checked in." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_CHECKED_IN_1="%d Administration Part successfully checked in." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_CHECKED_IN_MORE="%d Administration Parts successfully checked in." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_DELETED="%s Administration Parts deleted." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_DELETED_1="%s Administration Part deleted." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_FAILED_PUBLISHING="%s Administration Parts failed publishing." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_FAILED_PUBLISHING_1="%s Administration Part failed publishing." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_FEATURED="%s Administration Parts featured." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_FEATURED_1="%s Administration Part featured." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_PUBLISHED="%s Administration Parts published." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_PUBLISHED_1="%s Administration Part published." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_TRASHED="%s Administration Parts trashed." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_TRASHED_1="%s Administration Part trashed." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNFEATURED="%s Administration Parts unfeatured." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNFEATURED_1="%s Administration Part unfeatured." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNPUBLISHED="%s Administration Parts unpublished." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_N_ITEMS_UNPUBLISHED_1="%s Administration Part unpublished." +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_SUBMENU="Administration Parts Submenu" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_SUBMENU_DESC="Allows the users in this group to submenu of administration part" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_CREATED_BY_DESC="The user that created this Administration Part." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_CREATED_DATE_DESC="The date this Administration Part was created." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_DETAILS="Details" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_EDIT="Editing the Administration Part" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_ERROR_UNIQUE_ALIAS="Another Administration Part has the same alias." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Administration Part has the same alias ." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_ID="Id" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_MODIFIED_BY_DESC="The last user that modified this Administration Part." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_MODIFIED_DATE_DESC="The date this Administration Part was modified." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_NAME_HINT="Name here" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_NAME_LABEL="Name" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_NEW="A New Administration Part" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_PERMISSION="Permissions" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Administration Part to customise the alias." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_STATUS="Status" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_VACCINES="Vaccine(s)" +COM_EHEALTHPORTAL_ADMINISTRATION_PART_VERSION_DESC="A count of the number of times this Administration Part has been revised." +COM_EHEALTHPORTAL_ADMINISTRATION_PART_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_ANTENATAL_CARE="Antenatal Care" +COM_EHEALTHPORTAL_ANTENATAL_CARES="Antenatal Cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_ACCESS="Antenatal Cares Access" +COM_EHEALTHPORTAL_ANTENATAL_CARES_ACCESS_DESC="Allows the users in this group to access access antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_BATCH_OPTIONS="Batch process the selected Antenatal Cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_BATCH_TIP="All changes will be applied to all selected Antenatal Cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_BATCH_USE="Antenatal Cares Batch Use" +COM_EHEALTHPORTAL_ANTENATAL_CARES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_ADD="Antenatal Cares Dashboard Add" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of antenatal care" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_LIST="Antenatal Cares Dashboard List" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of antenatal care" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EDIT_VERSION="Antenatal Cares Edit Version" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EXPORT="Antenatal Cares Export" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EXPORT_DESC="Allows the users in this group to export export antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_IMPORT="Antenatal Cares Import" +COM_EHEALTHPORTAL_ANTENATAL_CARES_IMPORT_DESC="Allows the users in this group to import import antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_ARCHIVED="%s Antenatal Cares archived." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_ARCHIVED_1="%s Antenatal Care archived." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_CHECKED_IN_0="No Antenatal Care successfully checked in." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_CHECKED_IN_1="%d Antenatal Care successfully checked in." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_CHECKED_IN_MORE="%d Antenatal Cares successfully checked in." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_DELETED="%s Antenatal Cares deleted." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_DELETED_1="%s Antenatal Care deleted." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_FAILED_PUBLISHING="%s Antenatal Cares failed publishing." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_FAILED_PUBLISHING_1="%s Antenatal Care failed publishing." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_FEATURED="%s Antenatal Cares featured." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_FEATURED_1="%s Antenatal Care featured." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_PUBLISHED="%s Antenatal Cares published." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_PUBLISHED_1="%s Antenatal Care published." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_TRASHED="%s Antenatal Cares trashed." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_TRASHED_1="%s Antenatal Care trashed." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_UNFEATURED="%s Antenatal Cares unfeatured." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_UNFEATURED_1="%s Antenatal Care unfeatured." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_UNPUBLISHED="%s Antenatal Cares unpublished." +COM_EHEALTHPORTAL_ANTENATAL_CARES_N_ITEMS_UNPUBLISHED_1="%s Antenatal Care unpublished." +COM_EHEALTHPORTAL_ANTENATAL_CARES_SUBMENU="Antenatal Cares Submenu" +COM_EHEALTHPORTAL_ANTENATAL_CARES_SUBMENU_DESC="Allows the users in this group to submenu of antenatal care" +COM_EHEALTHPORTAL_ANTENATAL_CARE_ABDOMINAL_EXAMINATION="Abdominal Examination" +COM_EHEALTHPORTAL_ANTENATAL_CARE_CAESAREAN_SECTIONS_LABEL="Number of caesarean sections?" +COM_EHEALTHPORTAL_ANTENATAL_CARE_CREATED_BY_DESC="The user that created this Antenatal Care." +COM_EHEALTHPORTAL_ANTENATAL_CARE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_ANTENATAL_CARE_CREATED_DATE_DESC="The date this Antenatal Care was created." +COM_EHEALTHPORTAL_ANTENATAL_CARE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_ANTENATAL_CARE_EDIT="Editing the Antenatal Care" +COM_EHEALTHPORTAL_ANTENATAL_CARE_ERROR_UNIQUE_ALIAS="Another Antenatal Care has the same alias." +COM_EHEALTHPORTAL_ANTENATAL_CARE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Antenatal Care has the same alias ." +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_ENGAGEMENT_DESCRIPTION="Select engagement of presenting part" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_ENGAGEMENT_LABEL="Engagement of presenting part" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_HEART_RATE_DESCRIPTION="Enter foetal heart rate (bpm)" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_HEART_RATE_LABEL="Foetal heart rate (bpm)" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_LIE_DESCRIPTION="Select foetal poles/lie" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_LIE_LABEL="Foetal poles/lie" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_MOVEMENTS_DESCRIPTION="Add Foetal Movements Here" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_MOVEMENTS_HINT="Add Foetal Movements Here" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_MOVEMENTS_LABEL="Foetal Movements" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_PRESENTATION_DESCRIPTION="Select foetal presentation" +COM_EHEALTHPORTAL_ANTENATAL_CARE_FOETAL_PRESENTATION_LABEL="Foetal presentation" +COM_EHEALTHPORTAL_ANTENATAL_CARE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_ANTENATAL_CARE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_ANTENATAL_CARE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_ANTENATAL_CARE_ID="Id" +COM_EHEALTHPORTAL_ANTENATAL_CARE_LAST_MENSTRUAL_PERIOD_DESCRIPTION="Enter last menstrual period" +COM_EHEALTHPORTAL_ANTENATAL_CARE_LAST_MENSTRUAL_PERIOD_LABEL="Last Menstrual Period (LMP)" +COM_EHEALTHPORTAL_ANTENATAL_CARE_LIVE_BIRTHS_LABEL="Number of live births?" +COM_EHEALTHPORTAL_ANTENATAL_CARE_MISCARRIAGES_LABEL="Number of Miscarriages?" +COM_EHEALTHPORTAL_ANTENATAL_CARE_MODIFIED_BY_DESC="The last user that modified this Antenatal Care." +COM_EHEALTHPORTAL_ANTENATAL_CARE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_ANTENATAL_CARE_MODIFIED_DATE_DESC="The date this Antenatal Care was modified." +COM_EHEALTHPORTAL_ANTENATAL_CARE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_ANTENATAL_CARE_NEW="A New Antenatal Care" +COM_EHEALTHPORTAL_ANTENATAL_CARE_NORMAL_BIRTHS_LABEL="Number of Normal Births?" +COM_EHEALTHPORTAL_ANTENATAL_CARE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_ANTENATAL_CARE_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_ANTENATAL_CARE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_ANTENATAL_CARE_PREGNANCIES_EXCL_LABEL="Number of pregnancies excluding this one?" +COM_EHEALTHPORTAL_ANTENATAL_CARE_PREGNANCY_HISTORY="Pregnancy History" +COM_EHEALTHPORTAL_ANTENATAL_CARE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_ANTENATAL_CARE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Antenatal Care to customise the alias." +COM_EHEALTHPORTAL_ANTENATAL_CARE_STATUS="Status" +COM_EHEALTHPORTAL_ANTENATAL_CARE_STILL_BIRTHS_LABEL="Number of still births" +COM_EHEALTHPORTAL_ANTENATAL_CARE_VERSION_DESC="A count of the number of times this Antenatal Care has been revised." +COM_EHEALTHPORTAL_ANTENATAL_CARE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_ARCHIVED="Archived" +COM_EHEALTHPORTAL_AUTHOR="Author" +COM_EHEALTHPORTAL_BACK="Back" +COM_EHEALTHPORTAL_BREAST_CANCER="Breast Cancer" +COM_EHEALTHPORTAL_BREAST_CANCERS="Breast Cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_ACCESS="Breast Cancers Access" +COM_EHEALTHPORTAL_BREAST_CANCERS_ACCESS_DESC="Allows the users in this group to access access breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_BATCH_OPTIONS="Batch process the selected Breast Cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_BATCH_TIP="All changes will be applied to all selected Breast Cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_BATCH_USE="Breast Cancers Batch Use" +COM_EHEALTHPORTAL_BREAST_CANCERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_ADD="Breast Cancers Dashboard Add" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of breast cancer" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_LIST="Breast Cancers Dashboard List" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of breast cancer" +COM_EHEALTHPORTAL_BREAST_CANCERS_EDIT_VERSION="Breast Cancers Edit Version" +COM_EHEALTHPORTAL_BREAST_CANCERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_EXPORT="Breast Cancers Export" +COM_EHEALTHPORTAL_BREAST_CANCERS_EXPORT_DESC="Allows the users in this group to export export breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_IMPORT="Breast Cancers Import" +COM_EHEALTHPORTAL_BREAST_CANCERS_IMPORT_DESC="Allows the users in this group to import import breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_ARCHIVED="%s Breast Cancers archived." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_ARCHIVED_1="%s Breast Cancer archived." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_CHECKED_IN_0="No Breast Cancer successfully checked in." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_CHECKED_IN_1="%d Breast Cancer successfully checked in." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_CHECKED_IN_MORE="%d Breast Cancers successfully checked in." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_DELETED="%s Breast Cancers deleted." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_DELETED_1="%s Breast Cancer deleted." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_FAILED_PUBLISHING="%s Breast Cancers failed publishing." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_FAILED_PUBLISHING_1="%s Breast Cancer failed publishing." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_FEATURED="%s Breast Cancers featured." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_FEATURED_1="%s Breast Cancer featured." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_PUBLISHED="%s Breast Cancers published." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_PUBLISHED_1="%s Breast Cancer published." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_TRASHED="%s Breast Cancers trashed." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_TRASHED_1="%s Breast Cancer trashed." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_UNFEATURED="%s Breast Cancers unfeatured." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_UNFEATURED_1="%s Breast Cancer unfeatured." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_UNPUBLISHED="%s Breast Cancers unpublished." +COM_EHEALTHPORTAL_BREAST_CANCERS_N_ITEMS_UNPUBLISHED_1="%s Breast Cancer unpublished." +COM_EHEALTHPORTAL_BREAST_CANCERS_SUBMENU="Breast Cancers Submenu" +COM_EHEALTHPORTAL_BREAST_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of breast cancer" +COM_EHEALTHPORTAL_BREAST_CANCER_ASIAN="Asian" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_ABNORMAL_SKIN_DESCRIPTION="Scaly, red. or swollen skin on the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_ABNORMAL_SKIN_LABEL="Scaly, red. or swollen skin on the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_AGE_RANGE_DESCRIPTION="Age > 40 years" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_AGE_RANGE_LABEL="Age > 40 years" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_BREASTFEEDING_DESCRIPTION="Are you breastfeeding?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_BREASTFEEDING_LABEL="Are you breastfeeding?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_BREAST_SHAPE_DESCRIPTION="A change in the size or shape of the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_BREAST_SHAPE_LABEL="A change in the size or shape of the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_DIMPLING_DESCRIPTION="Dimpling or puckering (contact into wrinkles or small folds) in the skin of the breast. The skin may have ridges or pitting so that it looks like the skin of an orange" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_DIMPLING_LABEL="Dimpling or puckering (contact into wrinkles or small folds) in the skin of the breast. The skin may have ridges or pitting so that it looks like the skin of an orange" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_FAMILY_HISTORY_DESCRIPTION="Do you have a family history of breast cancer in the family, immediate family (mother / grandmother)?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_FAMILY_HISTORY_LABEL="Do you have a family history of breast cancer in the family, immediate family (mother / grandmother)?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_HISTORY_HRT_DESCRIPTION="Do you have a history of taking HRT (Oestrogen hormone replacement therapy)?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_HISTORY_HRT_LABEL="Do you have a history of taking HRT (Oestrogen hormone replacement therapy)?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_INWARD_NIPPLE_DESCRIPTION="A nipple turned inward into the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_INWARD_NIPPLE_LABEL="A nipple turned inward into the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_LUMP_NEAR_BREAST_DESCRIPTION="A lump or thickening in or near the breast or in the underarm area" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_LUMP_NEAR_BREAST_LABEL="A lump or thickening in or near the breast or in the underarm area" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_NIPPLE_DISCHARGE_DESCRIPTION="Discharge (fluid) from the nipple, especially if it's bloody" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_NIPPLE_DISCHARGE_LABEL="Discharge (fluid) from the nipple, especially if it's bloody" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_OVERWEIGHT_DESCRIPTION="Does the patient appear to be overweight?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_OVERWEIGHT_LABEL="Does the patient appear to be overweight?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_PREG_AGE_LABEL="At what age was your first pregnancy?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_PREG_FREQ_LABEL="How many times were you pregnant?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_RACE_LABEL="Race" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_REG_EXERCISE_DESCRIPTION="Do you do regular exercise?" +COM_EHEALTHPORTAL_BREAST_CANCER_BC_REG_EXERCISE_LABEL="Do you do regular exercise?" +COM_EHEALTHPORTAL_BREAST_CANCER_BLACK="Black" +COM_EHEALTHPORTAL_BREAST_CANCER_BREAST_EXAMINATION="Breast Examination" +COM_EHEALTHPORTAL_BREAST_CANCER_COLOURED="Coloured" +COM_EHEALTHPORTAL_BREAST_CANCER_CREATED_BY_DESC="The user that created this Breast Cancer." +COM_EHEALTHPORTAL_BREAST_CANCER_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_BREAST_CANCER_CREATED_DATE_DESC="The date this Breast Cancer was created." +COM_EHEALTHPORTAL_BREAST_CANCER_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_BREAST_CANCER_EDIT="Editing the Breast Cancer" +COM_EHEALTHPORTAL_BREAST_CANCER_ERROR_UNIQUE_ALIAS="Another Breast Cancer has the same alias." +COM_EHEALTHPORTAL_BREAST_CANCER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Breast Cancer has the same alias ." +COM_EHEALTHPORTAL_BREAST_CANCER_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_BREAST_CANCER_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_BREAST_CANCER_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_BREAST_CANCER_ID="Id" +COM_EHEALTHPORTAL_BREAST_CANCER_MODIFIED_BY_DESC="The last user that modified this Breast Cancer." +COM_EHEALTHPORTAL_BREAST_CANCER_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_BREAST_CANCER_MODIFIED_DATE_DESC="The date this Breast Cancer was modified." +COM_EHEALTHPORTAL_BREAST_CANCER_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_BREAST_CANCER_NEW="A New Breast Cancer" +COM_EHEALTHPORTAL_BREAST_CANCER_NO="No" +COM_EHEALTHPORTAL_BREAST_CANCER_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_BREAST_CANCER_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_BREAST_CANCER_PERMISSION="Permissions" +COM_EHEALTHPORTAL_BREAST_CANCER_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_BREAST_CANCER_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_BREAST_CANCER_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_BREAST_CANCER_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_BREAST_CANCER_REFERRALS="Referrals" +COM_EHEALTHPORTAL_BREAST_CANCER_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_BREAST_CANCER_RISK_ASSESMENT="Risk Assesment" +COM_EHEALTHPORTAL_BREAST_CANCER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Breast Cancer to customise the alias." +COM_EHEALTHPORTAL_BREAST_CANCER_STATUS="Status" +COM_EHEALTHPORTAL_BREAST_CANCER_THIRTY_YEARS="30+ years" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_ABNORMAL_SKIN_DESCRIPTION="Scaly, red. or swollen skin on the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_ABNORMAL_SKIN_HINT="Add text Here" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_ABNORMAL_SKIN_LABEL="Comments:" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_BREAST_SHAPE_DESCRIPTION="A change in the size or shape of the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_BREAST_SHAPE_HINT="Add text here" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_BREAST_SHAPE_LABEL="Comments:" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_DIMPLING_DESCRIPTION="Dimpling or puckering (contact into wrinkles or small folds) in the skin of the breast. The skin may have ridges or pitting so that it looks like the skin of an orange" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_DIMPLING_HINT="Add text Here" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_DIMPLING_LABEL="Comments:" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_INWARD_NIPPLE_DESCRIPTION="A nipple turned inward into the breast" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_INWARD_NIPPLE_HINT="Add text Here" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_INWARD_NIPPLE_LABEL="Comments:" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_LUMP_NEAR_BREAST_DESCRIPTION="A lump or thickening in or near the breast or in the underarm area" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_LUMP_NEAR_BREAST_HINT="Add text here" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_LUMP_NEAR_BREAST_LABEL="Comments:" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_NIPPLE_DISCHARGE_DESCRIPTION="Discharge (fluid) from the nipple, especially if it's bloody" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_NIPPLE_DISCHARGE_HINT="Add text Here" +COM_EHEALTHPORTAL_BREAST_CANCER_TXT_BC_NIPPLE_DISCHARGE_LABEL="Comments:" +COM_EHEALTHPORTAL_BREAST_CANCER_VERSION_DESC="A count of the number of times this Breast Cancer has been revised." +COM_EHEALTHPORTAL_BREAST_CANCER_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_BREAST_CANCER_WHITE="White" +COM_EHEALTHPORTAL_BREAST_CANCER_YES="Yes" +COM_EHEALTHPORTAL_CERVICAL_CANCER="Cervical Cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCERS="Cervical Cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_ACCESS="Cervical Cancers Access" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_ACCESS_DESC="Allows the users in this group to access access cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_BATCH_OPTIONS="Batch process the selected Cervical Cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_BATCH_TIP="All changes will be applied to all selected Cervical Cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_BATCH_USE="Cervical Cancers Batch Use" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_ADD="Cervical Cancers Dashboard Add" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of cervical cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_LIST="Cervical Cancers Dashboard List" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of cervical cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EDIT_VERSION="Cervical Cancers Edit Version" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EXPORT="Cervical Cancers Export" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EXPORT_DESC="Allows the users in this group to export export cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_IMPORT="Cervical Cancers Import" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_IMPORT_DESC="Allows the users in this group to import import cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_ARCHIVED="%s Cervical Cancers archived." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_ARCHIVED_1="%s Cervical Cancer archived." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_CHECKED_IN_0="No Cervical Cancer successfully checked in." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_CHECKED_IN_1="%d Cervical Cancer successfully checked in." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_CHECKED_IN_MORE="%d Cervical Cancers successfully checked in." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_DELETED="%s Cervical Cancers deleted." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_DELETED_1="%s Cervical Cancer deleted." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_FAILED_PUBLISHING="%s Cervical Cancers failed publishing." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_FAILED_PUBLISHING_1="%s Cervical Cancer failed publishing." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_FEATURED="%s Cervical Cancers featured." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_FEATURED_1="%s Cervical Cancer featured." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_PUBLISHED="%s Cervical Cancers published." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_PUBLISHED_1="%s Cervical Cancer published." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_TRASHED="%s Cervical Cancers trashed." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_TRASHED_1="%s Cervical Cancer trashed." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_UNFEATURED="%s Cervical Cancers unfeatured." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_UNFEATURED_1="%s Cervical Cancer unfeatured." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_UNPUBLISHED="%s Cervical Cancers unpublished." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_N_ITEMS_UNPUBLISHED_1="%s Cervical Cancer unpublished." +COM_EHEALTHPORTAL_CERVICAL_CANCERS_SUBMENU="Cervical Cancers Submenu" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of cervical cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_PERIODS_DESCRIPTION="Periods that become heavier and last longer than usual" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_PERIODS_LABEL="Periods that become heavier and last longer than usual" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_REASON_DESCRIPTION="Enter Reason" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_REASON_HINT="Your Reason Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_REASON_MESSAGE="Error! Please add some text here." +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_RESULT_DESCRIPTION="Results" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_RESULT_LABEL="Results" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_SEX_ACTVE_DESCRIPTION="Have you been sexually active from a young age?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_SEX_ACTVE_LABEL="Have you been sexually active from a young age?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_SEX_PARTNER_DESCRIPTION="Have you had multiple sexual partners?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_SEX_PARTNER_LABEL="Have you had multiple sexual partners?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_SMOKING_DESCRIPTION="Do you smoke?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_SMOKING_LABEL="Do you smoke?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_VIGINAL_BLEEDING_DESCRIPTION="Abnormal vaginal bleeding between periods, after intercourse, or after menopause" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_VIGINAL_BLEEDING_LABEL="Abnormal vaginal bleeding between periods, after intercourse, or after menopause" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_V_DISCHARGE_DESCRIPTION="Vaginal discharge that does not stop, and may be pale, watery, pink, brown, bloody, or foul-smelling" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CC_V_DISCHARGE_LABEL="Vaginal discharge that does not stop, and may be pale, watery, pink, brown, bloody, or foul-smelling" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CERVICAL_EXAMINATION="Cervical Examination" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CREATED_BY_DESC="The user that created this Cervical Cancer." +COM_EHEALTHPORTAL_CERVICAL_CANCER_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_CERVICAL_CANCER_CREATED_DATE_DESC="The date this Cervical Cancer was created." +COM_EHEALTHPORTAL_CERVICAL_CANCER_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_CERVICAL_CANCER_EDIT="Editing the Cervical Cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCER_ERROR_UNIQUE_ALIAS="Another Cervical Cancer has the same alias." +COM_EHEALTHPORTAL_CERVICAL_CANCER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Cervical Cancer has the same alias ." +COM_EHEALTHPORTAL_CERVICAL_CANCER_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_CERVICAL_CANCER_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_CERVICAL_CANCER_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_CERVICAL_CANCER_ID="Id" +COM_EHEALTHPORTAL_CERVICAL_CANCER_INCONCLUSIVE="Inconclusive" +COM_EHEALTHPORTAL_CERVICAL_CANCER_MODIFIED_BY_DESC="The last user that modified this Cervical Cancer." +COM_EHEALTHPORTAL_CERVICAL_CANCER_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_CERVICAL_CANCER_MODIFIED_DATE_DESC="The date this Cervical Cancer was modified." +COM_EHEALTHPORTAL_CERVICAL_CANCER_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_CERVICAL_CANCER_NEGATIVE="Negative" +COM_EHEALTHPORTAL_CERVICAL_CANCER_NEW="A New Cervical Cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCER_NO="No" +COM_EHEALTHPORTAL_CERVICAL_CANCER_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_CERVICAL_CANCER_PAP_SMEAR_COLLECTION_DESCRIPTION="Pap smear collected" +COM_EHEALTHPORTAL_CERVICAL_CANCER_PAP_SMEAR_COLLECTION_LABEL="Pap smear collected" +COM_EHEALTHPORTAL_CERVICAL_CANCER_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_CERVICAL_CANCER_PERMISSION="Permissions" +COM_EHEALTHPORTAL_CERVICAL_CANCER_POSITIVE="Positive" +COM_EHEALTHPORTAL_CERVICAL_CANCER_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_CERVICAL_CANCER_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_CERVICAL_CANCER_REFERRALS="Referrals" +COM_EHEALTHPORTAL_CERVICAL_CANCER_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_CERVICAL_CANCER_RISK_ASSESMENT="Risk Assesment" +COM_EHEALTHPORTAL_CERVICAL_CANCER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Cervical Cancer to customise the alias." +COM_EHEALTHPORTAL_CERVICAL_CANCER_STATUS="Status" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_PERIODS_DESCRIPTION="Periods that become heavier and last longer than usual" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_PERIODS_HINT="Add text Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_PERIODS_LABEL="Comments:" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SEX_ACTVE_DESCRIPTION="Have you been sexually active from a young age?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SEX_ACTVE_HINT="Add text here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SEX_ACTVE_LABEL="Comments:" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SEX_PARTNER_DESCRIPTION="Have you had multiple sexual partners?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SEX_PARTNER_HINT="Add text here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SEX_PARTNER_LABEL="Comments:" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SMOKING_DESCRIPTION="Do you smoke?" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SMOKING_HINT="Add text Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_SMOKING_LABEL="Comments:" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_VIGINAL_BLEEDING_DESCRIPTION="Abnormal vaginal bleeding between periods, after intercourse, or after menopause" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_VIGINAL_BLEEDING_HINT="Add text Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_VIGINAL_BLEEDING_LABEL="Comments:" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_V_DISCHARGE_DESCRIPTION="Vaginal discharge that does not stop, and may be pale, watery, pink, brown, bloody, or foul-smelling" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_V_DISCHARGE_HINT="Add text Here" +COM_EHEALTHPORTAL_CERVICAL_CANCER_TXT_CC_V_DISCHARGE_LABEL="Comments:" +COM_EHEALTHPORTAL_CERVICAL_CANCER_VERSION_DESC="A count of the number of times this Cervical Cancer has been revised." +COM_EHEALTHPORTAL_CERVICAL_CANCER_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_CERVICAL_CANCER_YES="Yes" +COM_EHEALTHPORTAL_CLINIC="Clinic" +COM_EHEALTHPORTAL_CLINICS="Clinics" +COM_EHEALTHPORTAL_CLINICS_ACCESS="Clinics Access" +COM_EHEALTHPORTAL_CLINICS_ACCESS_DESC="Allows the users in this group to access access clinics" +COM_EHEALTHPORTAL_CLINICS_BATCH_OPTIONS="Batch process the selected Clinics" +COM_EHEALTHPORTAL_CLINICS_BATCH_TIP="All changes will be applied to all selected Clinics" +COM_EHEALTHPORTAL_CLINICS_BATCH_USE="Clinics Batch Use" +COM_EHEALTHPORTAL_CLINICS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch clinics" +COM_EHEALTHPORTAL_CLINICS_EDIT_CLINIC_NAME="Clinics Edit Clinic Name" +COM_EHEALTHPORTAL_CLINICS_EDIT_CLINIC_NAME_DESC="Allows the users in this group to edit clinic name of clinic" +COM_EHEALTHPORTAL_CLINICS_EDIT_DESCRIPTION="Clinics Edit Description" +COM_EHEALTHPORTAL_CLINICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of clinic" +COM_EHEALTHPORTAL_CLINICS_EDIT_VERSION="Clinics Edit Version" +COM_EHEALTHPORTAL_CLINICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version clinics" +COM_EHEALTHPORTAL_CLINICS_EXPORT="Clinics Export" +COM_EHEALTHPORTAL_CLINICS_EXPORT_DESC="Allows the users in this group to export export clinics" +COM_EHEALTHPORTAL_CLINICS_IMPORT="Clinics Import" +COM_EHEALTHPORTAL_CLINICS_IMPORT_DESC="Allows the users in this group to import import clinics" +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_ARCHIVED="%s Clinics archived." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_ARCHIVED_1="%s Clinic archived." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_CHECKED_IN_0="No Clinic successfully checked in." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_CHECKED_IN_1="%d Clinic successfully checked in." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_CHECKED_IN_MORE="%d Clinics successfully checked in." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_DELETED="%s Clinics deleted." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_DELETED_1="%s Clinic deleted." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_FAILED_PUBLISHING="%s Clinics failed publishing." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_FAILED_PUBLISHING_1="%s Clinic failed publishing." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_FEATURED="%s Clinics featured." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_FEATURED_1="%s Clinic featured." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_PUBLISHED="%s Clinics published." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_PUBLISHED_1="%s Clinic published." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_TRASHED="%s Clinics trashed." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_TRASHED_1="%s Clinic trashed." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_UNFEATURED="%s Clinics unfeatured." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_UNFEATURED_1="%s Clinic unfeatured." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_UNPUBLISHED="%s Clinics unpublished." +COM_EHEALTHPORTAL_CLINICS_N_ITEMS_UNPUBLISHED_1="%s Clinic unpublished." +COM_EHEALTHPORTAL_CLINIC_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_CLINIC_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_CLINIC_CLINIC_NAME_DESCRIPTION="Enter Clinic Name Here" +COM_EHEALTHPORTAL_CLINIC_CLINIC_NAME_HINT="Clinic Name Here" +COM_EHEALTHPORTAL_CLINIC_CLINIC_NAME_LABEL="Clinic Name" +COM_EHEALTHPORTAL_CLINIC_CLINIC_NAME_MESSAGE="Error! Please add clinic name here." +COM_EHEALTHPORTAL_CLINIC_CLINIC_TYPE_DESCRIPTION="Clinic Type" +COM_EHEALTHPORTAL_CLINIC_CLINIC_TYPE_LABEL="Clinic Type" +COM_EHEALTHPORTAL_CLINIC_CREATED_BY_DESC="The user that created this Clinic." +COM_EHEALTHPORTAL_CLINIC_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_CLINIC_CREATED_DATE_DESC="The date this Clinic was created." +COM_EHEALTHPORTAL_CLINIC_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_CLINIC_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_CLINIC_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_CLINIC_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_CLINIC_DETAILS="Details" +COM_EHEALTHPORTAL_CLINIC_EDIT="Editing the Clinic" +COM_EHEALTHPORTAL_CLINIC_ERROR_UNIQUE_ALIAS="Another Clinic has the same alias." +COM_EHEALTHPORTAL_CLINIC_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Clinic has the same alias ." +COM_EHEALTHPORTAL_CLINIC_FIXED="Fixed" +COM_EHEALTHPORTAL_CLINIC_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_CLINIC_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_CLINIC_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_CLINIC_ID="Id" +COM_EHEALTHPORTAL_CLINIC_MOBILE="Mobile" +COM_EHEALTHPORTAL_CLINIC_MODIFIED_BY_DESC="The last user that modified this Clinic." +COM_EHEALTHPORTAL_CLINIC_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_CLINIC_MODIFIED_DATE_DESC="The date this Clinic was modified." +COM_EHEALTHPORTAL_CLINIC_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_CLINIC_NEW="A New Clinic" +COM_EHEALTHPORTAL_CLINIC_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_CLINIC_PERMISSION="Permissions" +COM_EHEALTHPORTAL_CLINIC_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_CLINIC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Clinic to customise the alias." +COM_EHEALTHPORTAL_CLINIC_STATUS="Status" +COM_EHEALTHPORTAL_CLINIC_VERSION_DESC="A count of the number of times this Clinic has been revised." +COM_EHEALTHPORTAL_CLINIC_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_CLOSE_NEW="Close & New" +COM_EHEALTHPORTAL_CONFIG_AUTHOR="Author Info" +COM_EHEALTHPORTAL_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component." +COM_EHEALTHPORTAL_CONFIG_AUTHOR_EMAIL_LABEL="Author Email" +COM_EHEALTHPORTAL_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component." +COM_EHEALTHPORTAL_CONFIG_AUTHOR_NAME_LABEL="Author Name" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_DESC="Set the intervals for the auto checkin fuction of tables that checks out the items to an user." +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_LABEL="Check in timer" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_FIVE="Once a week" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_FOUR="Every second day" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_ONE="Every five hours" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_SIX="Never" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_THREE="Once a day" +COM_EHEALTHPORTAL_CONFIG_CHECK_TIMER_OPTION_TWO="Every twelve hours" +COM_EHEALTHPORTAL_CONFIG_GLOBAL_DESC="The Global Parameters" +COM_EHEALTHPORTAL_CONFIG_GLOBAL_LABEL="Global" +COM_EHEALTHPORTAL_CONTRIBUTOR="Contributor" +COM_EHEALTHPORTAL_CONTRIBUTORS="Contributors" +COM_EHEALTHPORTAL_COUNSELING_TYPE="Counseling Type" +COM_EHEALTHPORTAL_COUNSELING_TYPES="Counseling Types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_ACCESS="Counseling Types Access" +COM_EHEALTHPORTAL_COUNSELING_TYPES_ACCESS_DESC="Allows the users in this group to access access counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_BATCH_OPTIONS="Batch process the selected Counseling Types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_BATCH_TIP="All changes will be applied to all selected Counseling Types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_BATCH_USE="Counseling Types Batch Use" +COM_EHEALTHPORTAL_COUNSELING_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION="Counseling Types Edit Description" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of counseling type" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_NAME="Counseling Types Edit Name" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of counseling type" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_VERSION="Counseling Types Edit Version" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EXPORT="Counseling Types Export" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EXPORT_DESC="Allows the users in this group to export export counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_IMPORT="Counseling Types Import" +COM_EHEALTHPORTAL_COUNSELING_TYPES_IMPORT_DESC="Allows the users in this group to import import counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_ARCHIVED="%s Counseling Types archived." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_ARCHIVED_1="%s Counseling Type archived." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_CHECKED_IN_0="No Counseling Type successfully checked in." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_CHECKED_IN_1="%d Counseling Type successfully checked in." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Counseling Types successfully checked in." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_DELETED="%s Counseling Types deleted." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_DELETED_1="%s Counseling Type deleted." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Counseling Types failed publishing." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Counseling Type failed publishing." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_FEATURED="%s Counseling Types featured." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_FEATURED_1="%s Counseling Type featured." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_PUBLISHED="%s Counseling Types published." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_PUBLISHED_1="%s Counseling Type published." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_TRASHED="%s Counseling Types trashed." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_TRASHED_1="%s Counseling Type trashed." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_UNFEATURED="%s Counseling Types unfeatured." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_UNFEATURED_1="%s Counseling Type unfeatured." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_UNPUBLISHED="%s Counseling Types unpublished." +COM_EHEALTHPORTAL_COUNSELING_TYPES_N_ITEMS_UNPUBLISHED_1="%s Counseling Type unpublished." +COM_EHEALTHPORTAL_COUNSELING_TYPE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_COUNSELING_TYPE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_COUNSELING_TYPE_CREATED_BY_DESC="The user that created this Counseling Type." +COM_EHEALTHPORTAL_COUNSELING_TYPE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_COUNSELING_TYPE_CREATED_DATE_DESC="The date this Counseling Type was created." +COM_EHEALTHPORTAL_COUNSELING_TYPE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_COUNSELING_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_COUNSELING_TYPE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_COUNSELING_TYPE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_COUNSELING_TYPE_DETAILS="Details" +COM_EHEALTHPORTAL_COUNSELING_TYPE_EDIT="Editing the Counseling Type" +COM_EHEALTHPORTAL_COUNSELING_TYPE_ERROR_UNIQUE_ALIAS="Another Counseling Type has the same alias." +COM_EHEALTHPORTAL_COUNSELING_TYPE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Counseling Type has the same alias ." +COM_EHEALTHPORTAL_COUNSELING_TYPE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_COUNSELING_TYPE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_COUNSELING_TYPE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_COUNSELING_TYPE_ID="Id" +COM_EHEALTHPORTAL_COUNSELING_TYPE_MODIFIED_BY_DESC="The last user that modified this Counseling Type." +COM_EHEALTHPORTAL_COUNSELING_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_COUNSELING_TYPE_MODIFIED_DATE_DESC="The date this Counseling Type was modified." +COM_EHEALTHPORTAL_COUNSELING_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_COUNSELING_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_COUNSELING_TYPE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_COUNSELING_TYPE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_COUNSELING_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_COUNSELING_TYPE_NEW="A New Counseling Type" +COM_EHEALTHPORTAL_COUNSELING_TYPE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_COUNSELING_TYPE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_COUNSELING_TYPE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_COUNSELING_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Counseling Type to customise the alias." +COM_EHEALTHPORTAL_COUNSELING_TYPE_STATUS="Status" +COM_EHEALTHPORTAL_COUNSELING_TYPE_VERSION_DESC="A count of the number of times this Counseling Type has been revised." +COM_EHEALTHPORTAL_COUNSELING_TYPE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_CREATE_NEW_S="Create New %s" +COM_EHEALTHPORTAL_DASH="Dashboard" +COM_EHEALTHPORTAL_DASHBOARD="eHealth Portal Dashboard" +COM_EHEALTHPORTAL_DASHBOARD_ANTENATAL_CARES="Antenatal Cares

" +COM_EHEALTHPORTAL_DASHBOARD_ANTENATAL_CARE_ADD="Add Antenatal Care

" +COM_EHEALTHPORTAL_DASHBOARD_BREAST_CANCERS="Breast Cancers

" +COM_EHEALTHPORTAL_DASHBOARD_BREAST_CANCER_ADD="Add Breast Cancer

" +COM_EHEALTHPORTAL_DASHBOARD_CERVICAL_CANCERS="Cervical Cancers

" +COM_EHEALTHPORTAL_DASHBOARD_CERVICAL_CANCER_ADD="Add Cervical Cancer

" +COM_EHEALTHPORTAL_DASHBOARD_FAMILY_PLANNINGS="Family Plannings

" +COM_EHEALTHPORTAL_DASHBOARD_FAMILY_PLANNING_ADD="Add Family Planning

" +COM_EHEALTHPORTAL_DASHBOARD_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups

" +COM_EHEALTHPORTAL_DASHBOARD_GENERAL_MEDICAL_CHECK_UP_ADD="Add General Medical Check Up

" +COM_EHEALTHPORTAL_DASHBOARD_HEALTH_EDUCATIONS="Health Educations

" +COM_EHEALTHPORTAL_DASHBOARD_HEALTH_EDUCATION_ADD="Add Health Education

" +COM_EHEALTHPORTAL_DASHBOARD_HIV_COUNSELINGS_AND_TESTINGS="Hiv Counselings And Testings

" +COM_EHEALTHPORTAL_DASHBOARD_HIV_COUNSELING_AND_TESTING_ADD="Add Hiv Counseling And Testing

" +COM_EHEALTHPORTAL_DASHBOARD_IMMUNISATIONS="Immunisations

" +COM_EHEALTHPORTAL_DASHBOARD_IMMUNISATION_ADD="Add Immunisation

" +COM_EHEALTHPORTAL_DASHBOARD_PATIENT_QUEUE="Patient Queue

" +COM_EHEALTHPORTAL_DASHBOARD_PAYMENTS="Payments

" +COM_EHEALTHPORTAL_DASHBOARD_PAYMENT_ADD="Add Payment

" +COM_EHEALTHPORTAL_DASHBOARD_PROSTATE_AND_TESTICULAR_CANCERS="Prostate And Testicular Cancers

" +COM_EHEALTHPORTAL_DASHBOARD_PROSTATE_AND_TESTICULAR_CANCER_ADD="Add Prostate And Testicular Cancer

" +COM_EHEALTHPORTAL_DASHBOARD_TESTS="Tests

" +COM_EHEALTHPORTAL_DASHBOARD_TEST_ADD="Add Test

" +COM_EHEALTHPORTAL_DASHBOARD_TUBERCULOSES="Tuberculoses

" +COM_EHEALTHPORTAL_DASHBOARD_TUBERCULOSIS_ADD="Add Tuberculosis

" +COM_EHEALTHPORTAL_DASHBOARD_VMMCS="Vmmcs

" +COM_EHEALTHPORTAL_DASHBOARD_VMMC_ADD="Add Vmmc

" +COM_EHEALTHPORTAL_DATE="Date" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE="Diagnosis Type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES="Diagnosis Types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_ACCESS="Diagnosis Types Access" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_ACCESS_DESC="Allows the users in this group to access access diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_BATCH_OPTIONS="Batch process the selected Diagnosis Types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_BATCH_TIP="All changes will be applied to all selected Diagnosis Types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_BATCH_USE="Diagnosis Types Batch Use" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION="Diagnosis Types Edit Description" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of diagnosis type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_NAME="Diagnosis Types Edit Name" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of diagnosis type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_VERSION="Diagnosis Types Edit Version" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EXPORT="Diagnosis Types Export" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EXPORT_DESC="Allows the users in this group to export export diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_IMPORT="Diagnosis Types Import" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_IMPORT_DESC="Allows the users in this group to import import diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_ARCHIVED="%s Diagnosis Types archived." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_ARCHIVED_1="%s Diagnosis Type archived." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_CHECKED_IN_0="No Diagnosis Type successfully checked in." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_CHECKED_IN_1="%d Diagnosis Type successfully checked in." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Diagnosis Types successfully checked in." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_DELETED="%s Diagnosis Types deleted." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_DELETED_1="%s Diagnosis Type deleted." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Diagnosis Types failed publishing." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Diagnosis Type failed publishing." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_FEATURED="%s Diagnosis Types featured." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_FEATURED_1="%s Diagnosis Type featured." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_PUBLISHED="%s Diagnosis Types published." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_PUBLISHED_1="%s Diagnosis Type published." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_TRASHED="%s Diagnosis Types trashed." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_TRASHED_1="%s Diagnosis Type trashed." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNFEATURED="%s Diagnosis Types unfeatured." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNFEATURED_1="%s Diagnosis Type unfeatured." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNPUBLISHED="%s Diagnosis Types unpublished." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_N_ITEMS_UNPUBLISHED_1="%s Diagnosis Type unpublished." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_CREATED_BY_DESC="The user that created this Diagnosis Type." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_CREATED_DATE_DESC="The date this Diagnosis Type was created." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_DETAILS="Details" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_EDIT="Editing the Diagnosis Type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ERROR_UNIQUE_ALIAS="Another Diagnosis Type has the same alias." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Diagnosis Type has the same alias ." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ID="Id" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_MODIFIED_BY_DESC="The last user that modified this Diagnosis Type." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_MODIFIED_DATE_DESC="The date this Diagnosis Type was modified." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_NEW="A New Diagnosis Type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Diagnosis Type to customise the alias." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_STATUS="Status" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_VERSION_DESC="A count of the number of times this Diagnosis Type has been revised." +COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_EDIT_CREATED_BY="Edit Created By" +COM_EHEALTHPORTAL_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." +COM_EHEALTHPORTAL_EDIT_CREATED_DATE="Edit Created Date" +COM_EHEALTHPORTAL_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date." +COM_EHEALTHPORTAL_EDIT_S="Edit %s" +COM_EHEALTHPORTAL_EDIT_VERSIONS="Edit Version" +COM_EHEALTHPORTAL_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." +COM_EHEALTHPORTAL_EXPORT_DATA="Export Data" +COM_EHEALTHPORTAL_EXPORT_DATA_DESC="Allows users in this group to export data." +COM_EHEALTHPORTAL_EXPORT_FAILED="Export Failed" +COM_EHEALTHPORTAL_FAMILY_PLANNING="Family Planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS="Family Plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_ACCESS="Family Plannings Access" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_ACCESS_DESC="Allows the users in this group to access access family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_BATCH_OPTIONS="Batch process the selected Family Plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_BATCH_TIP="All changes will be applied to all selected Family Plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_BATCH_USE="Family Plannings Batch Use" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD="Family Plannings Dashboard Add" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST="Family Plannings Dashboard List" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS="Family Plannings Edit Diagnosis" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS_DESC="Allows the users in this group to edit diagnosis of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_VERSION="Family Plannings Edit Version" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EXPORT="Family Plannings Export" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EXPORT_DESC="Allows the users in this group to export export family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_IMPORT="Family Plannings Import" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_IMPORT_DESC="Allows the users in this group to import import family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_ARCHIVED="%s Family Plannings archived." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_ARCHIVED_1="%s Family Planning archived." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_CHECKED_IN_0="No Family Planning successfully checked in." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_CHECKED_IN_1="%d Family Planning successfully checked in." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_CHECKED_IN_MORE="%d Family Plannings successfully checked in." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_DELETED="%s Family Plannings deleted." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_DELETED_1="%s Family Planning deleted." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_FAILED_PUBLISHING="%s Family Plannings failed publishing." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_FAILED_PUBLISHING_1="%s Family Planning failed publishing." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_FEATURED="%s Family Plannings featured." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_FEATURED_1="%s Family Planning featured." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_PUBLISHED="%s Family Plannings published." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_PUBLISHED_1="%s Family Planning published." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_TRASHED="%s Family Plannings trashed." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_TRASHED_1="%s Family Planning trashed." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_UNFEATURED="%s Family Plannings unfeatured." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_UNFEATURED_1="%s Family Planning unfeatured." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_UNPUBLISHED="%s Family Plannings unpublished." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_N_ITEMS_UNPUBLISHED_1="%s Family Planning unpublished." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_SUBMENU="Family Plannings Submenu" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_SUBMENU_DESC="Allows the users in this group to submenu of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNING_CREATED_BY_DESC="The user that created this Family Planning." +COM_EHEALTHPORTAL_FAMILY_PLANNING_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_FAMILY_PLANNING_CREATED_DATE_DESC="The date this Family Planning was created." +COM_EHEALTHPORTAL_FAMILY_PLANNING_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_FAMILY_PLANNING_DETAILS="Details" +COM_EHEALTHPORTAL_FAMILY_PLANNING_DIAGNOSIS_DESCRIPTION="Select Planning Type" +COM_EHEALTHPORTAL_FAMILY_PLANNING_DIAGNOSIS_LABEL="Select Family Planning Type" +COM_EHEALTHPORTAL_FAMILY_PLANNING_EDIT="Editing the Family Planning" +COM_EHEALTHPORTAL_FAMILY_PLANNING_ERROR_UNIQUE_ALIAS="Another Family Planning has the same alias." +COM_EHEALTHPORTAL_FAMILY_PLANNING_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Family Planning has the same alias ." +COM_EHEALTHPORTAL_FAMILY_PLANNING_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_FAMILY_PLANNING_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_FAMILY_PLANNING_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_FAMILY_PLANNING_ID="Id" +COM_EHEALTHPORTAL_FAMILY_PLANNING_MODIFIED_BY_DESC="The last user that modified this Family Planning." +COM_EHEALTHPORTAL_FAMILY_PLANNING_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_FAMILY_PLANNING_MODIFIED_DATE_DESC="The date this Family Planning was modified." +COM_EHEALTHPORTAL_FAMILY_PLANNING_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_FAMILY_PLANNING_NEW="A New Family Planning" +COM_EHEALTHPORTAL_FAMILY_PLANNING_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_FAMILY_PLANNING_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_FAMILY_PLANNING_PERMISSION="Permissions" +COM_EHEALTHPORTAL_FAMILY_PLANNING_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_FAMILY_PLANNING_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Family Planning to customise the alias." +COM_EHEALTHPORTAL_FAMILY_PLANNING_STATUS="Status" +COM_EHEALTHPORTAL_FAMILY_PLANNING_VERSION_DESC="A count of the number of times this Family Planning has been revised." +COM_EHEALTHPORTAL_FAMILY_PLANNING_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_FILTER_ADMINISTRATION_PART_ASCENDING="Administration Part ascending" +COM_EHEALTHPORTAL_FILTER_ADMINISTRATION_PART_DESCENDING="Administration Part descending" +COM_EHEALTHPORTAL_FILTER_BPONEDIASTOLIC_ASCENDING="BP(1)-Diastolic ascending" +COM_EHEALTHPORTAL_FILTER_BPONEDIASTOLIC_DESCENDING="BP(1)-Diastolic descending" +COM_EHEALTHPORTAL_FILTER_BPONESYSTOLIC_ASCENDING="BP(1)-Systolic ascending" +COM_EHEALTHPORTAL_FILTER_BPONESYSTOLIC_DESCENDING="BP(1)-Systolic descending" +COM_EHEALTHPORTAL_FILTER_BPTWODIASTOLIC_ASCENDING="BP(2)-Diastolic ascending" +COM_EHEALTHPORTAL_FILTER_BPTWODIASTOLIC_DESCENDING="BP(2)-Diastolic descending" +COM_EHEALTHPORTAL_FILTER_BPTWOSYSTOLIC_ASCENDING="BP(2)-Systolic ascending" +COM_EHEALTHPORTAL_FILTER_BPTWOSYSTOLIC_DESCENDING="BP(2)-Systolic descending" +COM_EHEALTHPORTAL_FILTER_CLINIC_NAME_ASCENDING="Clinic Name ascending" +COM_EHEALTHPORTAL_FILTER_CLINIC_NAME_DESCENDING="Clinic Name descending" +COM_EHEALTHPORTAL_FILTER_DESCRIPTION_ASCENDING="Description ascending" +COM_EHEALTHPORTAL_FILTER_DESCRIPTION_DESCENDING="Description descending" +COM_EHEALTHPORTAL_FILTER_HEIGHT_M_ASCENDING="Height (m) ascending" +COM_EHEALTHPORTAL_FILTER_HEIGHT_M_DESCENDING="Height (m) descending" +COM_EHEALTHPORTAL_FILTER_NAME_ASCENDING="Name ascending" +COM_EHEALTHPORTAL_FILTER_NAME_DESCENDING="Name descending" +COM_EHEALTHPORTAL_FILTER_ONEST_TEMP_READING_C_ASCENDING="1st Temp. Reading (*C): ascending" +COM_EHEALTHPORTAL_FILTER_ONEST_TEMP_READING_C_DESCENDING="1st Temp. Reading (*C): descending" +COM_EHEALTHPORTAL_FILTER_PATIENT_NAME_ASCENDING="Patient Name ascending" +COM_EHEALTHPORTAL_FILTER_PATIENT_NAME_DESCENDING="Patient Name descending" +COM_EHEALTHPORTAL_FILTER_PUBLISHED="Status" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_ADMINISTRATION_PARTS="Status options for administration parts" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_ANTENATAL_CARES="Status options for antenatal cares" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_BREAST_CANCERS="Status options for breast cancers" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_CERVICAL_CANCERS="Status options for cervical cancers" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_CLINICS="Status options for clinics" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_COUNSELING_TYPES="Status options for counseling types" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_DIAGNOSIS_TYPES="Status options for diagnosis types" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_FAMILY_PLANNINGS="Status options for family plannings" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_FOETAL_ENGAGEMENTS="Status options for foetal engagements" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_FOETAL_LIES="Status options for foetal lies" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_FOETAL_PRESENTATIONS="Status options for foetal presentations" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_GENERAL_MEDICAL_CHECK_UPS="Status options for general medical check ups" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_HEALTH_EDUCATIONS="Status options for health educations" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_HEALTH_EDUCATION_TOPICS="Status options for health education topics" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_HIV_COUNSELINGS_AND_TESTINGS="Status options for hiv counselings and testings" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_IMMUNISATIONS="Status options for immunisations" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_IMMUNISATION_TYPES="Status options for immunisation types" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_IMMUNISATION_VACCINE_TYPES="Status options for immunisation vaccine types" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_MEDICATIONS="Status options for medications" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_NONPAY_REASONS="Status options for nonpay reasons" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_PAYMENTS="Status options for payments" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_PAYMENT_TYPES="Status options for payment types" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_PLANNING_TYPES="Status options for planning types" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_PROSTATE_AND_TESTICULAR_CANCERS="Status options for prostate and testicular cancers" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_REFERRALS="Status options for referrals" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_SITES="Status options for sites" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_STRENGTHS="Status options for strengths" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_TESTING_REASONS="Status options for testing reasons" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_TESTS="Status options for tests" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_TUBERCULOSES="Status options for tuberculoses" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_UNITS="Status options for units" +COM_EHEALTHPORTAL_FILTER_PUBLISHED_VMMCS="Status options for vmmcs" +COM_EHEALTHPORTAL_FILTER_PULSE_ASCENDING="Pulse ascending" +COM_EHEALTHPORTAL_FILTER_PULSE_DESCENDING="Pulse descending" +COM_EHEALTHPORTAL_FILTER_REFERRED_TO_ASCENDING="Referred to ascending" +COM_EHEALTHPORTAL_FILTER_REFERRED_TO_DESCENDING="Referred to descending" +COM_EHEALTHPORTAL_FILTER_SEARCH="Searchpayments" +COM_EHEALTHPORTAL_FILTER_SEARCH_ADMINISTRATION_PARTS="Search the administration part items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_ANTENATAL_CARES="Search the antenatal care items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_BREAST_CANCERS="Search the breast cancer items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_CERVICAL_CANCERS="Search the cervical cancer items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_CLINICS="Search the clinic items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_COUNSELING_TYPES="Search the counseling type items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_DIAGNOSIS_TYPES="Search the diagnosis type items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_FAMILY_PLANNINGS="Search the family planning items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_FOETAL_ENGAGEMENTS="Search the foetal engagement items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_FOETAL_LIES="Search the foetal lie items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_FOETAL_PRESENTATIONS="Search the foetal presentation items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_GENERAL_MEDICAL_CHECK_UPS="Search the general medical check up items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_HEALTH_EDUCATIONS="Search the health education items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_HEALTH_EDUCATION_TOPICS="Search the health education topic items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_HIV_COUNSELINGS_AND_TESTINGS="Search the hiv counseling and testing items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_IMMUNISATIONS="Search the immunisation items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_IMMUNISATION_TYPES="Search the immunisation type items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_IMMUNISATION_VACCINE_TYPES="Search the immunisation vaccine type items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_MEDICATIONS="Search the medication items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_NONPAY_REASONS="Search the nonpay reason items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_PAYMENTS="Search the payment items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_PAYMENT_TYPES="Search the payment type items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_PLANNING_TYPES="Search the planning type items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_PROSTATE_AND_TESTICULAR_CANCERS="Search the prostate and testicular cancer items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_REFERRALS="Search the referral items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_SITES="Search the site items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_STRENGTHS="Search the strength items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_TESTING_REASONS="Search the testing reason items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_TESTS="Search the test items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_TUBERCULOSES="Search the tuberculosis items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_UNITS="Search the unit items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SEARCH_VMMCS="Search the vmmc items. Prefix with ID: to search for an item by ID." +COM_EHEALTHPORTAL_FILTER_SELECT_ACCESS="Select Access" +COM_EHEALTHPORTAL_FILTER_SELECT_ADMINISTRATION_PART="Select Administration Part" +COM_EHEALTHPORTAL_FILTER_SELECT_AMOUNT_N="Select Amount (N$):" +COM_EHEALTHPORTAL_FILTER_SELECT_FAMILY_PLANNING_TYPE_ASCENDING="Select Family Planning Type ascending" +COM_EHEALTHPORTAL_FILTER_SELECT_FAMILY_PLANNING_TYPE_DESCENDING="Select Family Planning Type descending" +COM_EHEALTHPORTAL_FILTER_SELECT_FOETAL_POLESLIE="Select Foetal poles/lie" +COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME="Select Patient Name" +COM_EHEALTHPORTAL_FILTER_SELECT_PAYMENT_CATEGORY="Select Payment Category" +COM_EHEALTHPORTAL_FILTER_SELECT_REFERRED_TO="Select Referred to" +COM_EHEALTHPORTAL_FILTER_SELECT_TOPIC_ASCENDING="Select Topic: ascending" +COM_EHEALTHPORTAL_FILTER_SELECT_TOPIC_DESCENDING="Select Topic: descending" +COM_EHEALTHPORTAL_FILTER_SELECT_TYPE="Select Type" +COM_EHEALTHPORTAL_FILTER_SITE_NAME_ASCENDING="Site Name ascending" +COM_EHEALTHPORTAL_FILTER_SITE_NAME_DESCENDING="Site Name descending" +COM_EHEALTHPORTAL_FILTER_SITE_REGION_ASCENDING="Site Region ascending" +COM_EHEALTHPORTAL_FILTER_SITE_REGION_DESCENDING="Site Region descending" +COM_EHEALTHPORTAL_FILTER_TWOND_TEMP_READING_C_ASCENDING="2nd Temp. Reading (*C): ascending" +COM_EHEALTHPORTAL_FILTER_TWOND_TEMP_READING_C_DESCENDING="2nd Temp. Reading (*C): descending" +COM_EHEALTHPORTAL_FILTER_WEIGHT_KG_ASCENDING="Weight (kg) ascending" +COM_EHEALTHPORTAL_FILTER_WEIGHT_KG_DESCENDING="Weight (kg) descending" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT="Foetal Engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS="Foetal Engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_ACCESS="Foetal Engagements Access" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_ACCESS_DESC="Allows the users in this group to access access foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_BATCH_OPTIONS="Batch process the selected Foetal Engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_BATCH_TIP="All changes will be applied to all selected Foetal Engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_BATCH_USE="Foetal Engagements Batch Use" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION="Foetal Engagements Edit Description" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME="Foetal Engagements Edit Name" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION="Foetal Engagements Edit Version" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EXPORT="Foetal Engagements Export" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EXPORT_DESC="Allows the users in this group to export export foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_IMPORT="Foetal Engagements Import" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_IMPORT_DESC="Allows the users in this group to import import foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_ARCHIVED="%s Foetal Engagements archived." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_ARCHIVED_1="%s Foetal Engagement archived." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_CHECKED_IN_0="No Foetal Engagement successfully checked in." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_CHECKED_IN_1="%d Foetal Engagement successfully checked in." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_CHECKED_IN_MORE="%d Foetal Engagements successfully checked in." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_DELETED="%s Foetal Engagements deleted." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_DELETED_1="%s Foetal Engagement deleted." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FAILED_PUBLISHING="%s Foetal Engagements failed publishing." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Foetal Engagement failed publishing." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FEATURED="%s Foetal Engagements featured." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_FEATURED_1="%s Foetal Engagement featured." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_PUBLISHED="%s Foetal Engagements published." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_PUBLISHED_1="%s Foetal Engagement published." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_TRASHED="%s Foetal Engagements trashed." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_TRASHED_1="%s Foetal Engagement trashed." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNFEATURED="%s Foetal Engagements unfeatured." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNFEATURED_1="%s Foetal Engagement unfeatured." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNPUBLISHED="%s Foetal Engagements unpublished." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_N_ITEMS_UNPUBLISHED_1="%s Foetal Engagement unpublished." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_CREATED_BY_DESC="The user that created this Foetal Engagement." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_CREATED_DATE_DESC="The date this Foetal Engagement was created." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_DETAILS="Details" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_EDIT="Editing the Foetal Engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ERROR_UNIQUE_ALIAS="Another Foetal Engagement has the same alias." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Foetal Engagement has the same alias ." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ID="Id" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_MODIFIED_BY_DESC="The last user that modified this Foetal Engagement." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_MODIFIED_DATE_DESC="The date this Foetal Engagement was modified." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_NAME_HINT="Name here" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_NAME_LABEL="Name" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_NEW="A New Foetal Engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_PERMISSION="Permissions" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Foetal Engagement to customise the alias." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_STATUS="Status" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_VERSION_DESC="A count of the number of times this Foetal Engagement has been revised." +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_FOETAL_LIE="Foetal Lie" +COM_EHEALTHPORTAL_FOETAL_LIES="Foetal Lies" +COM_EHEALTHPORTAL_FOETAL_LIES_ACCESS="Foetal Lies Access" +COM_EHEALTHPORTAL_FOETAL_LIES_ACCESS_DESC="Allows the users in this group to access access foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_BATCH_OPTIONS="Batch process the selected Foetal Lies" +COM_EHEALTHPORTAL_FOETAL_LIES_BATCH_TIP="All changes will be applied to all selected Foetal Lies" +COM_EHEALTHPORTAL_FOETAL_LIES_BATCH_USE="Foetal Lies Batch Use" +COM_EHEALTHPORTAL_FOETAL_LIES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_DESCRIPTION="Foetal Lies Edit Description" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal lie" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_NAME="Foetal Lies Edit Name" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal lie" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_VERSION="Foetal Lies Edit Version" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_EXPORT="Foetal Lies Export" +COM_EHEALTHPORTAL_FOETAL_LIES_EXPORT_DESC="Allows the users in this group to export export foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_IMPORT="Foetal Lies Import" +COM_EHEALTHPORTAL_FOETAL_LIES_IMPORT_DESC="Allows the users in this group to import import foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_ARCHIVED="%s Foetal Lies archived." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_ARCHIVED_1="%s Foetal Lie archived." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_CHECKED_IN_0="No Foetal Lie successfully checked in." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_CHECKED_IN_1="%d Foetal Lie successfully checked in." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_CHECKED_IN_MORE="%d Foetal Lies successfully checked in." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_DELETED="%s Foetal Lies deleted." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_DELETED_1="%s Foetal Lie deleted." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_FAILED_PUBLISHING="%s Foetal Lies failed publishing." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_FAILED_PUBLISHING_1="%s Foetal Lie failed publishing." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_FEATURED="%s Foetal Lies featured." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_FEATURED_1="%s Foetal Lie featured." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_PUBLISHED="%s Foetal Lies published." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_PUBLISHED_1="%s Foetal Lie published." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_TRASHED="%s Foetal Lies trashed." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_TRASHED_1="%s Foetal Lie trashed." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_UNFEATURED="%s Foetal Lies unfeatured." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_UNFEATURED_1="%s Foetal Lie unfeatured." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_UNPUBLISHED="%s Foetal Lies unpublished." +COM_EHEALTHPORTAL_FOETAL_LIES_N_ITEMS_UNPUBLISHED_1="%s Foetal Lie unpublished." +COM_EHEALTHPORTAL_FOETAL_LIE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_FOETAL_LIE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_FOETAL_LIE_CREATED_BY_DESC="The user that created this Foetal Lie." +COM_EHEALTHPORTAL_FOETAL_LIE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_FOETAL_LIE_CREATED_DATE_DESC="The date this Foetal Lie was created." +COM_EHEALTHPORTAL_FOETAL_LIE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_FOETAL_LIE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_FOETAL_LIE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_FOETAL_LIE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_FOETAL_LIE_DETAILS="Details" +COM_EHEALTHPORTAL_FOETAL_LIE_EDIT="Editing the Foetal Lie" +COM_EHEALTHPORTAL_FOETAL_LIE_ERROR_UNIQUE_ALIAS="Another Foetal Lie has the same alias." +COM_EHEALTHPORTAL_FOETAL_LIE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Foetal Lie has the same alias ." +COM_EHEALTHPORTAL_FOETAL_LIE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_FOETAL_LIE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_FOETAL_LIE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_FOETAL_LIE_ID="Id" +COM_EHEALTHPORTAL_FOETAL_LIE_MODIFIED_BY_DESC="The last user that modified this Foetal Lie." +COM_EHEALTHPORTAL_FOETAL_LIE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_FOETAL_LIE_MODIFIED_DATE_DESC="The date this Foetal Lie was modified." +COM_EHEALTHPORTAL_FOETAL_LIE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_FOETAL_LIE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_FOETAL_LIE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_FOETAL_LIE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_FOETAL_LIE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_FOETAL_LIE_NEW="A New Foetal Lie" +COM_EHEALTHPORTAL_FOETAL_LIE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_FOETAL_LIE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_FOETAL_LIE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_FOETAL_LIE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Foetal Lie to customise the alias." +COM_EHEALTHPORTAL_FOETAL_LIE_STATUS="Status" +COM_EHEALTHPORTAL_FOETAL_LIE_VERSION_DESC="A count of the number of times this Foetal Lie has been revised." +COM_EHEALTHPORTAL_FOETAL_LIE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION="Foetal Presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS="Foetal Presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_ACCESS="Foetal Presentations Access" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_ACCESS_DESC="Allows the users in this group to access access foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_BATCH_OPTIONS="Batch process the selected Foetal Presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_BATCH_TIP="All changes will be applied to all selected Foetal Presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_BATCH_USE="Foetal Presentations Batch Use" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION="Foetal Presentations Edit Description" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_NAME="Foetal Presentations Edit Name" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION="Foetal Presentations Edit Version" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EXPORT="Foetal Presentations Export" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EXPORT_DESC="Allows the users in this group to export export foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_IMPORT="Foetal Presentations Import" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_IMPORT_DESC="Allows the users in this group to import import foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_ARCHIVED="%s Foetal Presentations archived." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_ARCHIVED_1="%s Foetal Presentation archived." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_CHECKED_IN_0="No Foetal Presentation successfully checked in." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_CHECKED_IN_1="%d Foetal Presentation successfully checked in." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_CHECKED_IN_MORE="%d Foetal Presentations successfully checked in." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_DELETED="%s Foetal Presentations deleted." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_DELETED_1="%s Foetal Presentation deleted." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FAILED_PUBLISHING="%s Foetal Presentations failed publishing." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Foetal Presentation failed publishing." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FEATURED="%s Foetal Presentations featured." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_FEATURED_1="%s Foetal Presentation featured." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_PUBLISHED="%s Foetal Presentations published." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_PUBLISHED_1="%s Foetal Presentation published." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_TRASHED="%s Foetal Presentations trashed." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_TRASHED_1="%s Foetal Presentation trashed." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNFEATURED="%s Foetal Presentations unfeatured." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNFEATURED_1="%s Foetal Presentation unfeatured." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNPUBLISHED="%s Foetal Presentations unpublished." +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_N_ITEMS_UNPUBLISHED_1="%s Foetal Presentation unpublished." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_CREATED_BY_DESC="The user that created this Foetal Presentation." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_CREATED_DATE_DESC="The date this Foetal Presentation was created." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_DETAILS="Details" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_EDIT="Editing the Foetal Presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ERROR_UNIQUE_ALIAS="Another Foetal Presentation has the same alias." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Foetal Presentation has the same alias ." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ID="Id" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_MODIFIED_BY_DESC="The last user that modified this Foetal Presentation." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_MODIFIED_DATE_DESC="The date this Foetal Presentation was modified." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_NAME_HINT="Name here" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_NAME_LABEL="Name" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_NEW="A New Foetal Presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_PERMISSION="Permissions" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Foetal Presentation to customise the alias." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_STATUS="Status" +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_VERSION_DESC="A count of the number of times this Foetal Presentation has been revised." +COM_EHEALTHPORTAL_FOETAL_PRESENTATION_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP="General Medical Check Up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS="General Medical Check Ups Access" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS_DESC="Allows the users in this group to access access general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_OPTIONS="Batch process the selected General Medical Check Ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_TIP="All changes will be applied to all selected General Medical Check Ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE="General Medical Check Ups Batch Use" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD="General Medical Check Ups Dashboard Add" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST="General Medical Check Ups Dashboard List" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT="General Medical Check Ups Edit Patient" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION="General Medical Check Ups Edit Version" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT="General Medical Check Ups Export" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT_DESC="Allows the users in this group to export export general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT="General Medical Check Ups Import" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT_DESC="Allows the users in this group to import import general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_ARCHIVED="%s General Medical Check Ups archived." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_ARCHIVED_1="%s General Medical Check Up archived." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_CHECKED_IN_0="No General Medical Check Up successfully checked in." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_CHECKED_IN_1="%d General Medical Check Up successfully checked in." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_CHECKED_IN_MORE="%d General Medical Check Ups successfully checked in." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_DELETED="%s General Medical Check Ups deleted." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_DELETED_1="%s General Medical Check Up deleted." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FAILED_PUBLISHING="%s General Medical Check Ups failed publishing." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FAILED_PUBLISHING_1="%s General Medical Check Up failed publishing." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FEATURED="%s General Medical Check Ups featured." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_FEATURED_1="%s General Medical Check Up featured." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_PUBLISHED="%s General Medical Check Ups published." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_PUBLISHED_1="%s General Medical Check Up published." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_TRASHED="%s General Medical Check Ups trashed." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_TRASHED_1="%s General Medical Check Up trashed." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNFEATURED="%s General Medical Check Ups unfeatured." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNFEATURED_1="%s General Medical Check Up unfeatured." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNPUBLISHED="%s General Medical Check Ups unpublished." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_N_ITEMS_UNPUBLISHED_1="%s General Medical Check Up unpublished." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU="General Medical Check Ups Submenu" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU_DESC="Allows the users in this group to submenu of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BMI_DESCRIPTION="Enter pulse in beats per minute" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BMI_LABEL="BMI" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_ONE_DESCRIPTION="Enter BP(1)-Diastolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_ONE_LABEL="BP(1)-Diastolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_TWO_DESCRIPTION="Enter BP(2)-Diastolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_DIASTOLIC_TWO_LABEL="BP(2)-Diastolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_ONE_DESCRIPTION="Enter BP(1)-Systolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_ONE_LABEL="BP(1)-Systolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_TWO_DESCRIPTION="Enter BP(2)-Systolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_BP_SYSTOLIC_TWO_LABEL="BP(2)-Systolic" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_CHRONIC_MEDICATION_DESCRIPTION="Chronic Medication" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_CHRONIC_MEDICATION_LABEL="Chronic Medication?" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_COMPLAINT_DESCRIPTION="Add Complaint Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_COMPLAINT_HINT="Add Complaint Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_COMPLAINT_LABEL="Complaint" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_BY_DESC="The user that created this General Medical Check Up." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_DATE_DESC="The date this General Medical Check Up was created." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_DIAGNOSIS="Diagnosis" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_DIAGNOSIS_DESCRIPTION="Select Diagnosis" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_DIAGNOSIS_LABEL="Select Diagnosis" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_DISPENSING="Dispensing" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_DISPENSING_LABEL="Dispensing" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_EDIT="Editing the General Medical Check Up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_ERROR_UNIQUE_ALIAS="Another General Medical Check Up has the same alias." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_ERROR_UNIQUE_ALIAS_TRASHED="A trashed General Medical Check Up has the same alias ." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_HEIGHT_LABEL="Height (m)" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_ID="Id" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_INSTRUCTIONS_DESCRIPTION="Add Instructions Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_INSTRUCTIONS_HINT="Add Instructions Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_INSTRUCTIONS_LABEL="Instructions" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_INVESTIGATIONS_DESCRIPTION="Add Investigation Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_INVESTIGATIONS_HINT="Add Investigation Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_INVESTIGATIONS_LABEL="Investigations" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MEDICATION="Medication" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MEDICATION_DESCRIPTION="Select Medication" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MEDICATION_LABEL="Select Medication" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_BY_DESC="The last user that modified this General Medical Check Up." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_DATE_DESC="The date this General Medical Check Up was modified." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_NEW="A New General Medical Check Up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_NOTES_DESCRIPTION="Add Notes Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_NOTES_HINT="Add notes here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_NOTES_LABEL="Notes" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_PERMISSION="Permissions" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_PULSE_DESCRIPTION="Enter pulse in beats per minute" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_PULSE_LABEL="Pulse" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_QUANTITY_DESCRIPTION="Enter quantity" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_QUANTITY_LABEL="Quantity" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_REFERRALS="Referrals" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the General Medical Check Up to customise the alias." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_STATUS="Status" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_STRENGTH="Strength" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_STRENGTH_DESCRIPTION="Select Strength" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_STRENGTH_LABEL="Select Strength" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_ONE_DESCRIPTION="1st temperature reading in degree celsius" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_ONE_LABEL="1st Temp. Reading (*C):" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_TWO_DESCRIPTION="2nd temperature reading in degree celsius." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_TEMP_TWO_LABEL="2nd Temp. Reading (*C):" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_UNIT="Unit" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_UNIT_DESCRIPTION="Select Units" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_UNIT_LABEL="Select Unit" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_VERSION_DESC="A count of the number of times this General Medical Check Up has been revised." +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_VITAL_SIGNS="Vital Signs" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_WEIGHT_LABEL="Weight (kg)" +COM_EHEALTHPORTAL_HEALTH_EDUCATION="Health Education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS="Health Educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_ACCESS="Health Educations Access" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_ACCESS_DESC="Allows the users in this group to access access health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_BATCH_OPTIONS="Batch process the selected Health Educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_BATCH_TIP="All changes will be applied to all selected Health Educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_BATCH_USE="Health Educations Batch Use" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD="Health Educations Dashboard Add" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST="Health Educations Dashboard List" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC="Health Educations Edit Health Education Topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC_DESC="Allows the users in this group to edit health education topic of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_VERSION="Health Educations Edit Version" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EXPORT="Health Educations Export" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EXPORT_DESC="Allows the users in this group to export export health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_IMPORT="Health Educations Import" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_IMPORT_DESC="Allows the users in this group to import import health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_ARCHIVED="%s Health Educations archived." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_ARCHIVED_1="%s Health Education archived." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_CHECKED_IN_0="No Health Education successfully checked in." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_CHECKED_IN_1="%d Health Education successfully checked in." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_CHECKED_IN_MORE="%d Health Educations successfully checked in." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_DELETED="%s Health Educations deleted." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_DELETED_1="%s Health Education deleted." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_FAILED_PUBLISHING="%s Health Educations failed publishing." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Health Education failed publishing." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_FEATURED="%s Health Educations featured." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_FEATURED_1="%s Health Education featured." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_PUBLISHED="%s Health Educations published." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_PUBLISHED_1="%s Health Education published." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_TRASHED="%s Health Educations trashed." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_TRASHED_1="%s Health Education trashed." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNFEATURED="%s Health Educations unfeatured." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNFEATURED_1="%s Health Education unfeatured." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNPUBLISHED="%s Health Educations unpublished." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_N_ITEMS_UNPUBLISHED_1="%s Health Education unpublished." +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_SUBMENU="Health Educations Submenu" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_SUBMENU_DESC="Allows the users in this group to submenu of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_CREATED_BY_DESC="The user that created this Health Education." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_CREATED_DATE_DESC="The date this Health Education was created." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_DETAILS="Details" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_EDIT="Editing the Health Education" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_EDUCATION_TYPE_DESCRIPTION="Health education type" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_EDUCATION_TYPE_LABEL="Type" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_ERROR_UNIQUE_ALIAS="Another Health Education has the same alias." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Health Education has the same alias ." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_GROUP="Group" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_HEALTH_EDUCATION_TOPIC_DESCRIPTION="Select Health Education Topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_HEALTH_EDUCATION_TOPIC_LABEL="Select Topic:" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_ID="Id" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_INDIVIDUAL="Individual" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_MODIFIED_BY_DESC="The last user that modified this Health Education." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_MODIFIED_DATE_DESC="The date this Health Education was modified." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_NEW="A New Health Education" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_PERMISSION="Permissions" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Health Education to customise the alias." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_STATUS="Status" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC="Health Education Topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS="Health Education Topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_ACCESS="Health Education Topics Access" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_ACCESS_DESC="Allows the users in this group to access access health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_BATCH_OPTIONS="Batch process the selected Health Education Topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_BATCH_TIP="All changes will be applied to all selected Health Education Topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE="Health Education Topics Batch Use" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION="Health Education Topics Edit Description" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of health education topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME="Health Education Topics Edit Name" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME_DESC="Allows the users in this group to edit name of health education topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION="Health Education Topics Edit Version" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EXPORT="Health Education Topics Export" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EXPORT_DESC="Allows the users in this group to export export health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_IMPORT="Health Education Topics Import" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_IMPORT_DESC="Allows the users in this group to import import health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_ARCHIVED="%s Health Education Topics archived." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_ARCHIVED_1="%s Health Education Topic archived." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_CHECKED_IN_0="No Health Education Topic successfully checked in." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_CHECKED_IN_1="%d Health Education Topic successfully checked in." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_CHECKED_IN_MORE="%d Health Education Topics successfully checked in." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_DELETED="%s Health Education Topics deleted." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_DELETED_1="%s Health Education Topic deleted." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FAILED_PUBLISHING="%s Health Education Topics failed publishing." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FAILED_PUBLISHING_1="%s Health Education Topic failed publishing." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FEATURED="%s Health Education Topics featured." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_FEATURED_1="%s Health Education Topic featured." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_PUBLISHED="%s Health Education Topics published." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_PUBLISHED_1="%s Health Education Topic published." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_TRASHED="%s Health Education Topics trashed." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_TRASHED_1="%s Health Education Topic trashed." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNFEATURED="%s Health Education Topics unfeatured." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNFEATURED_1="%s Health Education Topic unfeatured." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNPUBLISHED="%s Health Education Topics unpublished." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_N_ITEMS_UNPUBLISHED_1="%s Health Education Topic unpublished." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_CREATED_BY_DESC="The user that created this Health Education Topic." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_CREATED_DATE_DESC="The date this Health Education Topic was created." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_DETAILS="Details" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_EDIT="Editing the Health Education Topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ERROR_UNIQUE_ALIAS="Another Health Education Topic has the same alias." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Health Education Topic has the same alias ." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ID="Id" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_BY_DESC="The last user that modified this Health Education Topic." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_DATE_DESC="The date this Health Education Topic was modified." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_NAME_HINT="Name here" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_NAME_LABEL="Name" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_NEW="A New Health Education Topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_PERMISSION="Permissions" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Health Education Topic to customise the alias." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_STATUS="Status" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_VERSION_DESC="A count of the number of times this Health Education Topic has been revised." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_VERSION_DESC="A count of the number of times this Health Education has been revised." +COM_EHEALTHPORTAL_HEALTH_EDUCATION_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_HELP_MANAGER="Help" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS="HIV Counselings and Testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS="Hiv Counselings And Testings Access" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS_DESC="Allows the users in this group to access access hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_OPTIONS="Batch process the selected HIV Counselings and Testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_TIP="All changes will be applied to all selected HIV Counselings and Testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE="Hiv Counselings And Testings Batch Use" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD="Hiv Counselings And Testings Dashboard Add" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of hiv counseling and testing" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST="Hiv Counselings And Testings Dashboard List" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of hiv counseling and testing" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION="Hiv Counselings And Testings Edit Version" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT="Hiv Counselings And Testings Export" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT_DESC="Allows the users in this group to export export hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT="Hiv Counselings And Testings Import" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT_DESC="Allows the users in this group to import import hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_ARCHIVED="%s HIV Counselings and Testings archived." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_ARCHIVED_1="%s HIV Counseling and Testing archived." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_CHECKED_IN_0="No HIV Counseling and Testing successfully checked in." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_CHECKED_IN_1="%d HIV Counseling and Testing successfully checked in." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_CHECKED_IN_MORE="%d HIV Counselings and Testings successfully checked in." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_DELETED="%s HIV Counselings and Testings deleted." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_DELETED_1="%s HIV Counseling and Testing deleted." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FAILED_PUBLISHING="%s HIV Counselings and Testings failed publishing." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FAILED_PUBLISHING_1="%s HIV Counseling and Testing failed publishing." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FEATURED="%s HIV Counselings and Testings featured." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_FEATURED_1="%s HIV Counseling and Testing featured." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_PUBLISHED="%s HIV Counselings and Testings published." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_PUBLISHED_1="%s HIV Counseling and Testing published." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_TRASHED="%s HIV Counselings and Testings trashed." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_TRASHED_1="%s HIV Counseling and Testing trashed." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNFEATURED="%s HIV Counselings and Testings unfeatured." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNFEATURED_1="%s HIV Counseling and Testing unfeatured." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNPUBLISHED="%s HIV Counselings and Testings unpublished." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_N_ITEMS_UNPUBLISHED_1="%s HIV Counseling and Testing unpublished." +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU="Hiv Counselings And Testings Submenu" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU_DESC="Allows the users in this group to submenu of hiv counseling and testing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING="HIV Counseling and Testing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_COUNSELING_TYPE_LABEL="Type of counseling?" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_COUPLE="Couple" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_CREATED_BY_DESC="The user that created this HIV Counseling and Testing." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_CREATED_DATE_DESC="The date this HIV Counseling and Testing was created." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_DETAILS="Details" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_EDIT="Editing the HIV Counseling and Testing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_EQA_LABEL="EQA" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ERROR_UNIQUE_ALIAS="Another HIV Counseling and Testing has the same alias." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ERROR_UNIQUE_ALIAS_TRASHED="A trashed HIV Counseling and Testing has the same alias ." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_FINAL_TEST_RESULT_DESCRIPTION="Final test result" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_FINAL_TEST_RESULT_LABEL="Final test result" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ID="Id" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE="Inconclusive" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INDIVIDUAL="Individual" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_LAST_TEST_DATE_DESCRIPTION="When last did you test" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_LAST_TEST_DATE_LABEL="When last did you test" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MINOR="Minor" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_BY_DESC="The last user that modified this HIV Counseling and Testing." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_DATE_DESC="The date this HIV Counseling and Testing was modified." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NA="N/A" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE="Negative" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEVER="Never" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEW="A New HIV Counseling and Testing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NO="No" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ONESIX_MONTHS="1-6 Months" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_PERMISSION="Permissions" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE="Positive" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_PREV_TEST_RESULT_DESCRIPTION="Previous test results" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_PREV_TEST_RESULT_LABEL="Previous test results" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_REFERRALS="Referrals" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the HIV Counseling and Testing to customise the alias." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_SEVENTWELVE_MONTHS="7-12 Months" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_STATUS="Status" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_TESTING_REASON_DESCRIPTION="Select reason for testing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_TESTING_REASON_LABEL="Reason for testing" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_ONE_DESCRIPTION="Test result #1" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_ONE_LABEL="Test result #1" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_TWO_DESCRIPTION="Test result #2" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_TEST_RESULT_TWO_LABEL="Test result #2" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN="Unknown" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_VERSION_DESC="A count of the number of times this HIV Counseling and Testing has been revised." +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_YES="Yes" +COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING__YEAR="> Year" +COM_EHEALTHPORTAL_IMMUNISATION="Immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS="Immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_ACCESS="Immunisations Access" +COM_EHEALTHPORTAL_IMMUNISATIONS_ACCESS_DESC="Allows the users in this group to access access immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_BATCH_OPTIONS="Batch process the selected Immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_BATCH_TIP="All changes will be applied to all selected Immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_BATCH_USE="Immunisations Batch Use" +COM_EHEALTHPORTAL_IMMUNISATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_ADD="Immunisations Dashboard Add" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_LIST="Immunisations Dashboard List" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_PATIENT="Immunisations Edit Patient" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_VERSION="Immunisations Edit Version" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_EXPORT="Immunisations Export" +COM_EHEALTHPORTAL_IMMUNISATIONS_EXPORT_DESC="Allows the users in this group to export export immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_IMPORT="Immunisations Import" +COM_EHEALTHPORTAL_IMMUNISATIONS_IMPORT_DESC="Allows the users in this group to import import immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_ARCHIVED="%s Immunisations archived." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_ARCHIVED_1="%s Immunisation archived." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_CHECKED_IN_0="No Immunisation successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_CHECKED_IN_1="%d Immunisation successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_CHECKED_IN_MORE="%d Immunisations successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_DELETED="%s Immunisations deleted." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_DELETED_1="%s Immunisation deleted." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_FAILED_PUBLISHING="%s Immunisations failed publishing." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Immunisation failed publishing." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_FEATURED="%s Immunisations featured." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_FEATURED_1="%s Immunisation featured." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_PUBLISHED="%s Immunisations published." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_PUBLISHED_1="%s Immunisation published." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_TRASHED="%s Immunisations trashed." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_TRASHED_1="%s Immunisation trashed." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_UNFEATURED="%s Immunisations unfeatured." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_UNFEATURED_1="%s Immunisation unfeatured." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_UNPUBLISHED="%s Immunisations unpublished." +COM_EHEALTHPORTAL_IMMUNISATIONS_N_ITEMS_UNPUBLISHED_1="%s Immunisation unpublished." +COM_EHEALTHPORTAL_IMMUNISATIONS_SUBMENU="Immunisations Submenu" +COM_EHEALTHPORTAL_IMMUNISATIONS_SUBMENU_DESC="Allows the users in this group to submenu of immunisation" +COM_EHEALTHPORTAL_IMMUNISATION_ADMINISTRATION_PART="Administration Part" +COM_EHEALTHPORTAL_IMMUNISATION_ADMINISTRATION_PART_DESCRIPTION="Select Administration Body Part" +COM_EHEALTHPORTAL_IMMUNISATION_ADMINISTRATION_PART_LABEL="Administration Part" +COM_EHEALTHPORTAL_IMMUNISATION_CREATED_BY_DESC="The user that created this Immunisation." +COM_EHEALTHPORTAL_IMMUNISATION_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_IMMUNISATION_CREATED_DATE_DESC="The date this Immunisation was created." +COM_EHEALTHPORTAL_IMMUNISATION_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_IMMUNISATION_DETAILS="Details" +COM_EHEALTHPORTAL_IMMUNISATION_EDIT="Editing the Immunisation" +COM_EHEALTHPORTAL_IMMUNISATION_ERROR_UNIQUE_ALIAS="Another Immunisation has the same alias." +COM_EHEALTHPORTAL_IMMUNISATION_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Immunisation has the same alias ." +COM_EHEALTHPORTAL_IMMUNISATION_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_IMMUNISATION_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_IMMUNISATION_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_IMMUNISATION_ID="Id" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_LABEL="Immunisation" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_TYPE="Immunisation Type" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_TYPE_DESCRIPTION="Select immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_TYPE_LABEL="Type" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_UP_TO_DATE_DESCRIPTION="Immunisation up-to-date" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_UP_TO_DATE_LABEL="Immunisation up-to-date" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_VACCINE_TYPE="Immunisation Vaccine Type" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_VACCINE_TYPE_DESCRIPTION="Select Immunisation Vaccine Type" +COM_EHEALTHPORTAL_IMMUNISATION_IMMUNISATION_VACCINE_TYPE_LABEL="Vaccine" +COM_EHEALTHPORTAL_IMMUNISATION_MODIFIED_BY_DESC="The last user that modified this Immunisation." +COM_EHEALTHPORTAL_IMMUNISATION_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_IMMUNISATION_MODIFIED_DATE_DESC="The date this Immunisation was modified." +COM_EHEALTHPORTAL_IMMUNISATION_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_IMMUNISATION_NEW="A New Immunisation" +COM_EHEALTHPORTAL_IMMUNISATION_NO="No" +COM_EHEALTHPORTAL_IMMUNISATION_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_IMMUNISATION_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_IMMUNISATION_PERMISSION="Permissions" +COM_EHEALTHPORTAL_IMMUNISATION_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_IMMUNISATION_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_IMMUNISATION_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_IMMUNISATION_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_IMMUNISATION_REFERRALS="Referrals" +COM_EHEALTHPORTAL_IMMUNISATION_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_IMMUNISATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Immunisation to customise the alias." +COM_EHEALTHPORTAL_IMMUNISATION_STATUS="Status" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE="Immunisation Type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES="Immunisation Types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_ACCESS="Immunisation Types Access" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_BATCH_OPTIONS="Batch process the selected Immunisation Types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_BATCH_TIP="All changes will be applied to all selected Immunisation Types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_BATCH_USE="Immunisation Types Batch Use" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION="Immunisation Types Edit Description" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_NAME="Immunisation Types Edit Name" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_VERSION="Immunisation Types Edit Version" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EXPORT="Immunisation Types Export" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_IMPORT="Immunisation Types Import" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_ARCHIVED="%s Immunisation Types archived." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_ARCHIVED_1="%s Immunisation Type archived." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_CHECKED_IN_0="No Immunisation Type successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_CHECKED_IN_1="%d Immunisation Type successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Immunisation Types successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_DELETED="%s Immunisation Types deleted." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_DELETED_1="%s Immunisation Type deleted." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Immunisation Types failed publishing." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Immunisation Type failed publishing." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_FEATURED="%s Immunisation Types featured." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_FEATURED_1="%s Immunisation Type featured." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_PUBLISHED="%s Immunisation Types published." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_PUBLISHED_1="%s Immunisation Type published." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_TRASHED="%s Immunisation Types trashed." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_TRASHED_1="%s Immunisation Type trashed." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_UNFEATURED="%s Immunisation Types unfeatured." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_UNFEATURED_1="%s Immunisation Type unfeatured." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_UNPUBLISHED="%s Immunisation Types unpublished." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_N_ITEMS_UNPUBLISHED_1="%s Immunisation Type unpublished." +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_SUBMENU="Immunisation Types Submenu" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_CREATED_BY_DESC="The user that created this Immunisation Type." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_CREATED_DATE_DESC="The date this Immunisation Type was created." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_DETAILS="Details" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_EDIT="Editing the Immunisation Type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ERROR_UNIQUE_ALIAS="Another Immunisation Type has the same alias." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Immunisation Type has the same alias ." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ID="Id" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_MODIFIED_BY_DESC="The last user that modified this Immunisation Type." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_MODIFIED_DATE_DESC="The date this Immunisation Type was modified." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_NEW="A New Immunisation Type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Immunisation Type to customise the alias." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_STATUS="Status" +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_VERSION_DESC="A count of the number of times this Immunisation Type has been revised." +COM_EHEALTHPORTAL_IMMUNISATION_TYPE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE="Immunisation Vaccine Type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES="Immunisation Vaccine Types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS="Immunisation Vaccine Types Access" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_OPTIONS="Batch process the selected Immunisation Vaccine Types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_TIP="All changes will be applied to all selected Immunisation Vaccine Types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE="Immunisation Vaccine Types Batch Use" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION="Immunisation Vaccine Types Edit Description" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation vaccine type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME="Immunisation Vaccine Types Edit Name" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation vaccine type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION="Immunisation Vaccine Types Edit Version" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT="Immunisation Vaccine Types Export" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT="Immunisation Vaccine Types Import" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_ARCHIVED="%s Immunisation Vaccine Types archived." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_ARCHIVED_1="%s Immunisation Vaccine Type archived." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_CHECKED_IN_0="No Immunisation Vaccine Type successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_CHECKED_IN_1="%d Immunisation Vaccine Type successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Immunisation Vaccine Types successfully checked in." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_DELETED="%s Immunisation Vaccine Types deleted." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_DELETED_1="%s Immunisation Vaccine Type deleted." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Immunisation Vaccine Types failed publishing." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Immunisation Vaccine Type failed publishing." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FEATURED="%s Immunisation Vaccine Types featured." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_FEATURED_1="%s Immunisation Vaccine Type featured." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_PUBLISHED="%s Immunisation Vaccine Types published." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_PUBLISHED_1="%s Immunisation Vaccine Type published." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_TRASHED="%s Immunisation Vaccine Types trashed." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_TRASHED_1="%s Immunisation Vaccine Type trashed." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNFEATURED="%s Immunisation Vaccine Types unfeatured." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNFEATURED_1="%s Immunisation Vaccine Type unfeatured." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNPUBLISHED="%s Immunisation Vaccine Types unpublished." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_N_ITEMS_UNPUBLISHED_1="%s Immunisation Vaccine Type unpublished." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU="Immunisation Vaccine Types Submenu" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of immunisation vaccine type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ADMINISTRATION_PART_DESCRIPTION="Select Administration Body Part" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ADMINISTRATION_PART_LABEL="Administration Part" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_BY_DESC="The user that created this Immunisation Vaccine Type." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_DATE_DESC="The date this Immunisation Vaccine Type was created." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_DETAILS="Details" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_EDIT="Editing the Immunisation Vaccine Type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ERROR_UNIQUE_ALIAS="Another Immunisation Vaccine Type has the same alias." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Immunisation Vaccine Type has the same alias ." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ID="Id" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_BY_DESC="The last user that modified this Immunisation Vaccine Type." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_DATE_DESC="The date this Immunisation Vaccine Type was modified." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_NEW="A New Immunisation Vaccine Type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Immunisation Vaccine Type to customise the alias." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_STATUS="Status" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_VERSION_DESC="A count of the number of times this Immunisation Vaccine Type has been revised." +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_IMMUNISATION_VERSION_DESC="A count of the number of times this Immunisation has been revised." +COM_EHEALTHPORTAL_IMMUNISATION_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_IMMUNISATION_YES="Yes" +COM_EHEALTHPORTAL_IMPORT_CONTINUE="Continue" +COM_EHEALTHPORTAL_IMPORT_DATA="Import Data" +COM_EHEALTHPORTAL_IMPORT_DATA_DESC="Allows users in this group to import data." +COM_EHEALTHPORTAL_IMPORT_ERROR="Import error." +COM_EHEALTHPORTAL_IMPORT_FAILED="Import Failed" +COM_EHEALTHPORTAL_IMPORT_FILE_COLUMNS="File Columns" +COM_EHEALTHPORTAL_IMPORT_FORMATS_ACCEPTED="formats accepted" +COM_EHEALTHPORTAL_IMPORT_FROM_DIRECTORY="Directory" +COM_EHEALTHPORTAL_IMPORT_FROM_UPLOAD="Upload" +COM_EHEALTHPORTAL_IMPORT_FROM_URL="URL" +COM_EHEALTHPORTAL_IMPORT_GET_BOTTON="Get File" +COM_EHEALTHPORTAL_IMPORT_IGNORE_COLUMN="-- Ignore This Column --" +COM_EHEALTHPORTAL_IMPORT_LINK_FILE_TO_TABLE_COLUMNS="Link File to Table Columns" +COM_EHEALTHPORTAL_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE="Does not have a valid file type." +COM_EHEALTHPORTAL_IMPORT_MSG_ENTER_A_URL="Please enter a url." +COM_EHEALTHPORTAL_IMPORT_MSG_INVALID_URL="Invalid url." +COM_EHEALTHPORTAL_IMPORT_MSG_NO_FILE_SELECTED="No import file selected." +COM_EHEALTHPORTAL_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE="Path does not have a valid file." +COM_EHEALTHPORTAL_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY="Please enter the file directory." +COM_EHEALTHPORTAL_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS="Please link all columns." +COM_EHEALTHPORTAL_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY="Please enter the file directory." +COM_EHEALTHPORTAL_IMPORT_MSG_PLEASE_SELECT_A_FILE="Please select a file to import." +COM_EHEALTHPORTAL_IMPORT_MSG_WARNIMPORTFILE="Warning, import file error." +COM_EHEALTHPORTAL_IMPORT_MSG_WARNIMPORTUPLOADERROR="Warning, import upload error." +COM_EHEALTHPORTAL_IMPORT_NO_IMPORT_TYPE_FOUND="Import type not found." +COM_EHEALTHPORTAL_IMPORT_PLEASE_SELECT_COLUMN="-- Please Select Column --" +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE="Select File" +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_DIRECTORY="Set the path to file" +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_ADMINISTRATION_PARTS="Select the file to import data to administration_parts." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_ANTENATAL_CARES="Select the file to import data to antenatal_cares." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_BREAST_CANCERS="Select the file to import data to breast_cancers." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_CERVICAL_CANCERS="Select the file to import data to cervical_cancers." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_CLINICS="Select the file to import data to clinics." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_COUNSELING_TYPES="Select the file to import data to counseling_types." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_DIAGNOSIS_TYPES="Select the file to import data to diagnosis_types." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FAMILY_PLANNINGS="Select the file to import data to family_plannings." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_ENGAGEMENTS="Select the file to import data to foetal_engagements." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_LIES="Select the file to import data to foetal_lies." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_FOETAL_PRESENTATIONS="Select the file to import data to foetal_presentations." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_GENERAL_MEDICAL_CHECK_UPS="Select the file to import data to general_medical_check_ups." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATIONS="Select the file to import data to health_educations." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_HEALTH_EDUCATION_TOPICS="Select the file to import data to health_education_topics." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_HIV_COUNSELINGS_AND_TESTINGS="Select the file to import data to hiv_counselings_and_testings." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATIONS="Select the file to import data to immunisations." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_TYPES="Select the file to import data to immunisation_types." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_IMMUNISATION_VACCINE_TYPES="Select the file to import data to immunisation_vaccine_types." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_MEDICATIONS="Select the file to import data to medications." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_NONPAY_REASONS="Select the file to import data to nonpay_reasons." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PAYMENTS="Select the file to import data to payments." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PAYMENT_TYPES="Select the file to import data to payment_types." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PLANNING_TYPES="Select the file to import data to planning_types." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_PROSTATE_AND_TESTICULAR_CANCERS="Select the file to import data to prostate_and_testicular_cancers." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_REFERRALS="Select the file to import data to referrals." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_SITES="Select the file to import data to sites." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_STRENGTHS="Select the file to import data to strengths." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_TESTING_REASONS="Select the file to import data to testing_reasons." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_TESTS="Select the file to import data to tests." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_TUBERCULOSES="Select the file to import data to tuberculoses." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_UNITS="Select the file to import data to units." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_FOR_VMMCS="Select the file to import data to vmmcs." +COM_EHEALTHPORTAL_IMPORT_SELECT_FILE_URL="Enter file URL" +COM_EHEALTHPORTAL_IMPORT_SUCCESS="Great! Import successful." +COM_EHEALTHPORTAL_IMPORT_TABLE_COLUMNS="Table Columns" +COM_EHEALTHPORTAL_IMPORT_TITLE="Data Importer" +COM_EHEALTHPORTAL_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found." +COM_EHEALTHPORTAL_IMPORT_UPDATE_DATA="Import Data" +COM_EHEALTHPORTAL_IMPORT_UPLOAD_BOTTON="Upload File" +COM_EHEALTHPORTAL_INACTIVE="Inactive" +COM_EHEALTHPORTAL_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" +COM_EHEALTHPORTAL_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -" +COM_EHEALTHPORTAL_KEEP_ORIGINAL_STATE="- Keep Original State -" +COM_EHEALTHPORTAL_LICENSE="License" +COM_EHEALTHPORTAL_MEDICATION="Medication" +COM_EHEALTHPORTAL_MEDICATIONS="Medications" +COM_EHEALTHPORTAL_MEDICATIONS_ACCESS="Medications Access" +COM_EHEALTHPORTAL_MEDICATIONS_ACCESS_DESC="Allows the users in this group to access access medications" +COM_EHEALTHPORTAL_MEDICATIONS_BATCH_OPTIONS="Batch process the selected Medications" +COM_EHEALTHPORTAL_MEDICATIONS_BATCH_TIP="All changes will be applied to all selected Medications" +COM_EHEALTHPORTAL_MEDICATIONS_BATCH_USE="Medications Batch Use" +COM_EHEALTHPORTAL_MEDICATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch medications" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_DESCRIPTION="Medications Edit Description" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of medication" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_NAME="Medications Edit Name" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of medication" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_VERSION="Medications Edit Version" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version medications" +COM_EHEALTHPORTAL_MEDICATIONS_EXPORT="Medications Export" +COM_EHEALTHPORTAL_MEDICATIONS_EXPORT_DESC="Allows the users in this group to export export medications" +COM_EHEALTHPORTAL_MEDICATIONS_IMPORT="Medications Import" +COM_EHEALTHPORTAL_MEDICATIONS_IMPORT_DESC="Allows the users in this group to import import medications" +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_ARCHIVED="%s Medications archived." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_ARCHIVED_1="%s Medication archived." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_CHECKED_IN_0="No Medication successfully checked in." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_CHECKED_IN_1="%d Medication successfully checked in." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_CHECKED_IN_MORE="%d Medications successfully checked in." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_DELETED="%s Medications deleted." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_DELETED_1="%s Medication deleted." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_FAILED_PUBLISHING="%s Medications failed publishing." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_FAILED_PUBLISHING_1="%s Medication failed publishing." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_FEATURED="%s Medications featured." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_FEATURED_1="%s Medication featured." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_PUBLISHED="%s Medications published." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_PUBLISHED_1="%s Medication published." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_TRASHED="%s Medications trashed." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_TRASHED_1="%s Medication trashed." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_UNFEATURED="%s Medications unfeatured." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_UNFEATURED_1="%s Medication unfeatured." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_UNPUBLISHED="%s Medications unpublished." +COM_EHEALTHPORTAL_MEDICATIONS_N_ITEMS_UNPUBLISHED_1="%s Medication unpublished." +COM_EHEALTHPORTAL_MEDICATIONS_SUBMENU="Medications Submenu" +COM_EHEALTHPORTAL_MEDICATIONS_SUBMENU_DESC="Allows the users in this group to submenu of medication" +COM_EHEALTHPORTAL_MEDICATION_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_MEDICATION_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_MEDICATION_CREATED_BY_DESC="The user that created this Medication." +COM_EHEALTHPORTAL_MEDICATION_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_MEDICATION_CREATED_DATE_DESC="The date this Medication was created." +COM_EHEALTHPORTAL_MEDICATION_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_MEDICATION_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_MEDICATION_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_MEDICATION_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_MEDICATION_DETAILS="Details" +COM_EHEALTHPORTAL_MEDICATION_EDIT="Editing the Medication" +COM_EHEALTHPORTAL_MEDICATION_ERROR_UNIQUE_ALIAS="Another Medication has the same alias." +COM_EHEALTHPORTAL_MEDICATION_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Medication has the same alias ." +COM_EHEALTHPORTAL_MEDICATION_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_MEDICATION_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_MEDICATION_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_MEDICATION_ID="Id" +COM_EHEALTHPORTAL_MEDICATION_MODIFIED_BY_DESC="The last user that modified this Medication." +COM_EHEALTHPORTAL_MEDICATION_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_MEDICATION_MODIFIED_DATE_DESC="The date this Medication was modified." +COM_EHEALTHPORTAL_MEDICATION_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_MEDICATION_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_MEDICATION_NAME_HINT="Name here" +COM_EHEALTHPORTAL_MEDICATION_NAME_LABEL="Name" +COM_EHEALTHPORTAL_MEDICATION_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_MEDICATION_NEW="A New Medication" +COM_EHEALTHPORTAL_MEDICATION_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_MEDICATION_PERMISSION="Permissions" +COM_EHEALTHPORTAL_MEDICATION_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_MEDICATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Medication to customise the alias." +COM_EHEALTHPORTAL_MEDICATION_STATUS="Status" +COM_EHEALTHPORTAL_MEDICATION_VERSION_DESC="A count of the number of times this Medication has been revised." +COM_EHEALTHPORTAL_MEDICATION_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_NEW="New" +COM_EHEALTHPORTAL_NONPAY_REASON="NonPay Reason" +COM_EHEALTHPORTAL_NONPAY_REASONS="NonPay Reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_ACCESS="Nonpay Reasons Access" +COM_EHEALTHPORTAL_NONPAY_REASONS_ACCESS_DESC="Allows the users in this group to access access nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_BATCH_OPTIONS="Batch process the selected NonPay Reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_BATCH_TIP="All changes will be applied to all selected NonPay Reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_BATCH_USE="Nonpay Reasons Batch Use" +COM_EHEALTHPORTAL_NONPAY_REASONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_DESCRIPTION="Nonpay Reasons Edit Description" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of nonpay reason" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_NAME="Nonpay Reasons Edit Name" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of nonpay reason" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_VERSION="Nonpay Reasons Edit Version" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_EXPORT="Nonpay Reasons Export" +COM_EHEALTHPORTAL_NONPAY_REASONS_EXPORT_DESC="Allows the users in this group to export export nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_IMPORT="Nonpay Reasons Import" +COM_EHEALTHPORTAL_NONPAY_REASONS_IMPORT_DESC="Allows the users in this group to import import nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_ARCHIVED="%s NonPay Reasons archived." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_ARCHIVED_1="%s NonPay Reason archived." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_CHECKED_IN_0="No NonPay Reason successfully checked in." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_CHECKED_IN_1="%d NonPay Reason successfully checked in." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_CHECKED_IN_MORE="%d NonPay Reasons successfully checked in." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_DELETED="%s NonPay Reasons deleted." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_DELETED_1="%s NonPay Reason deleted." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_FAILED_PUBLISHING="%s NonPay Reasons failed publishing." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_FAILED_PUBLISHING_1="%s NonPay Reason failed publishing." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_FEATURED="%s NonPay Reasons featured." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_FEATURED_1="%s NonPay Reason featured." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_PUBLISHED="%s NonPay Reasons published." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_PUBLISHED_1="%s NonPay Reason published." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_TRASHED="%s NonPay Reasons trashed." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_TRASHED_1="%s NonPay Reason trashed." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_UNFEATURED="%s NonPay Reasons unfeatured." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_UNFEATURED_1="%s NonPay Reason unfeatured." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_UNPUBLISHED="%s NonPay Reasons unpublished." +COM_EHEALTHPORTAL_NONPAY_REASONS_N_ITEMS_UNPUBLISHED_1="%s NonPay Reason unpublished." +COM_EHEALTHPORTAL_NONPAY_REASON_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_NONPAY_REASON_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_NONPAY_REASON_CREATED_BY_DESC="The user that created this NonPay Reason." +COM_EHEALTHPORTAL_NONPAY_REASON_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_NONPAY_REASON_CREATED_DATE_DESC="The date this NonPay Reason was created." +COM_EHEALTHPORTAL_NONPAY_REASON_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_NONPAY_REASON_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_NONPAY_REASON_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_NONPAY_REASON_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_NONPAY_REASON_DETAILS="Details" +COM_EHEALTHPORTAL_NONPAY_REASON_EDIT="Editing the NonPay Reason" +COM_EHEALTHPORTAL_NONPAY_REASON_ERROR_UNIQUE_ALIAS="Another NonPay Reason has the same alias." +COM_EHEALTHPORTAL_NONPAY_REASON_ERROR_UNIQUE_ALIAS_TRASHED="A trashed NonPay Reason has the same alias ." +COM_EHEALTHPORTAL_NONPAY_REASON_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_NONPAY_REASON_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_NONPAY_REASON_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_NONPAY_REASON_ID="Id" +COM_EHEALTHPORTAL_NONPAY_REASON_MODIFIED_BY_DESC="The last user that modified this NonPay Reason." +COM_EHEALTHPORTAL_NONPAY_REASON_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_NONPAY_REASON_MODIFIED_DATE_DESC="The date this NonPay Reason was modified." +COM_EHEALTHPORTAL_NONPAY_REASON_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_NONPAY_REASON_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_NONPAY_REASON_NAME_HINT="Name here" +COM_EHEALTHPORTAL_NONPAY_REASON_NAME_LABEL="Name" +COM_EHEALTHPORTAL_NONPAY_REASON_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_NONPAY_REASON_NEW="A New NonPay Reason" +COM_EHEALTHPORTAL_NONPAY_REASON_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_NONPAY_REASON_PERMISSION="Permissions" +COM_EHEALTHPORTAL_NONPAY_REASON_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_NONPAY_REASON_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the NonPay Reason to customise the alias." +COM_EHEALTHPORTAL_NONPAY_REASON_STATUS="Status" +COM_EHEALTHPORTAL_NONPAY_REASON_VERSION_DESC="A count of the number of times this NonPay Reason has been revised." +COM_EHEALTHPORTAL_NONPAY_REASON_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." +COM_EHEALTHPORTAL_NO_ACCESS_GRANTED="No Access Granted!" +COM_EHEALTHPORTAL_PATIENT_QUEUE="Patient Queue" +COM_EHEALTHPORTAL_PATIENT_QUEUE_ACCESS="Patient Queue Access" +COM_EHEALTHPORTAL_PATIENT_QUEUE_ACCESS_DESC="Allows the users in this group to access patient queue." +COM_EHEALTHPORTAL_PATIENT_QUEUE_DASHBOARD_LIST="Patient Queue Dashboard List" +COM_EHEALTHPORTAL_PATIENT_QUEUE_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Patient Queue" +COM_EHEALTHPORTAL_PATIENT_QUEUE_DESC="A patient queue" +COM_EHEALTHPORTAL_PATIENT_QUEUE_SUBMENU="Patient Queue Submenu" +COM_EHEALTHPORTAL_PATIENT_QUEUE_SUBMENU_DESC="Allows the users in this group to submenu of Patient Queue" +COM_EHEALTHPORTAL_PAYMENT="Payment" +COM_EHEALTHPORTAL_PAYMENTS="Payments" +COM_EHEALTHPORTAL_PAYMENTS_ACCESS="Payments Access" +COM_EHEALTHPORTAL_PAYMENTS_ACCESS_DESC="Allows the users in this group to access access payments" +COM_EHEALTHPORTAL_PAYMENTS_BATCH_OPTIONS="Batch process the selected Payments" +COM_EHEALTHPORTAL_PAYMENTS_BATCH_TIP="All changes will be applied to all selected Payments" +COM_EHEALTHPORTAL_PAYMENTS_BATCH_USE="Payments Batch Use" +COM_EHEALTHPORTAL_PAYMENTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch payments" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_ADD="Payments Dashboard Add" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of payment" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_LIST="Payments Dashboard List" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of payment" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_PATIENT="Payments Edit Patient" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of payment" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_VERSION="Payments Edit Version" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version payments" +COM_EHEALTHPORTAL_PAYMENTS_EXPORT="Payments Export" +COM_EHEALTHPORTAL_PAYMENTS_EXPORT_DESC="Allows the users in this group to export export payments" +COM_EHEALTHPORTAL_PAYMENTS_IMPORT="Payments Import" +COM_EHEALTHPORTAL_PAYMENTS_IMPORT_DESC="Allows the users in this group to import import payments" +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_ARCHIVED="%s Payments archived." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_ARCHIVED_1="%s Payment archived." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_CHECKED_IN_0="No Payment successfully checked in." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_CHECKED_IN_1="%d Payment successfully checked in." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_CHECKED_IN_MORE="%d Payments successfully checked in." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_DELETED="%s Payments deleted." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_DELETED_1="%s Payment deleted." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_FAILED_PUBLISHING="%s Payments failed publishing." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_FAILED_PUBLISHING_1="%s Payment failed publishing." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_FEATURED="%s Payments featured." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_FEATURED_1="%s Payment featured." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_PUBLISHED="%s Payments published." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_PUBLISHED_1="%s Payment published." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_TRASHED="%s Payments trashed." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_TRASHED_1="%s Payment trashed." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_UNFEATURED="%s Payments unfeatured." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_UNFEATURED_1="%s Payment unfeatured." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_UNPUBLISHED="%s Payments unpublished." +COM_EHEALTHPORTAL_PAYMENTS_N_ITEMS_UNPUBLISHED_1="%s Payment unpublished." +COM_EHEALTHPORTAL_PAYMENTS_SUBMENU="Payments Submenu" +COM_EHEALTHPORTAL_PAYMENTS_SUBMENU_DESC="Allows the users in this group to submenu of payment" +COM_EHEALTHPORTAL_PAYMENT_CREATED_BY_DESC="The user that created this Payment." +COM_EHEALTHPORTAL_PAYMENT_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_PAYMENT_CREATED_DATE_DESC="The date this Payment was created." +COM_EHEALTHPORTAL_PAYMENT_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_PAYMENT_DEBT_PAYMENT="Debt Payment" +COM_EHEALTHPORTAL_PAYMENT_DETAILS="Details" +COM_EHEALTHPORTAL_PAYMENT_EDIT="Editing the Payment" +COM_EHEALTHPORTAL_PAYMENT_ERROR_UNIQUE_ALIAS="Another Payment has the same alias." +COM_EHEALTHPORTAL_PAYMENT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Payment has the same alias ." +COM_EHEALTHPORTAL_PAYMENT_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_PAYMENT_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_PAYMENT_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_PAYMENT_ID="Id" +COM_EHEALTHPORTAL_PAYMENT_MODIFIED_BY_DESC="The last user that modified this Payment." +COM_EHEALTHPORTAL_PAYMENT_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_PAYMENT_MODIFIED_DATE_DESC="The date this Payment was modified." +COM_EHEALTHPORTAL_PAYMENT_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_PAYMENT_NEW="A New Payment" +COM_EHEALTHPORTAL_PAYMENT_NONPAY_REASON_DESCRIPTION="Select Non-Payment Reason" +COM_EHEALTHPORTAL_PAYMENT_NONPAY_REASON_LABEL="Non-Payment Reason" +COM_EHEALTHPORTAL_PAYMENT_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_PAYMENT_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_PAYMENT_PAYMENT_AMOUNT_DESCRIPTION="Select Amount (N$)" +COM_EHEALTHPORTAL_PAYMENT_PAYMENT_AMOUNT_LABEL="Amount (N$):" +COM_EHEALTHPORTAL_PAYMENT_PAYMENT_CATEGORY_DESCRIPTION="Category under which payment falls under" +COM_EHEALTHPORTAL_PAYMENT_PAYMENT_CATEGORY_LABEL="Payment Category" +COM_EHEALTHPORTAL_PAYMENT_PAYMENT_TYPE_DESCRIPTION="Type of Payment" +COM_EHEALTHPORTAL_PAYMENT_PAYMENT_TYPE_LABEL="Type of Payment" +COM_EHEALTHPORTAL_PAYMENT_PERMISSION="Permissions" +COM_EHEALTHPORTAL_PAYMENT_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_PAYMENT_RECEIPT_NO_DESCRIPTION="Enter Receipt Number Here" +COM_EHEALTHPORTAL_PAYMENT_RECEIPT_NO_HINT="Receipt Number Here" +COM_EHEALTHPORTAL_PAYMENT_RECEIPT_NO_LABEL="Receipt Number" +COM_EHEALTHPORTAL_PAYMENT_RECEIPT_NO_MESSAGE="Error! Please add Receipt Number here." +COM_EHEALTHPORTAL_PAYMENT_RECEIVE_PAYMENT="Receive Payment" +COM_EHEALTHPORTAL_PAYMENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Payment to customise the alias." +COM_EHEALTHPORTAL_PAYMENT_SELECT_AMOUNT_N="Select Amount (N$)" +COM_EHEALTHPORTAL_PAYMENT_SEVENTY_FIVE="75" +COM_EHEALTHPORTAL_PAYMENT_STATUS="Status" +COM_EHEALTHPORTAL_PAYMENT_TEN="10" +COM_EHEALTHPORTAL_PAYMENT_TYPE="Payment Type" +COM_EHEALTHPORTAL_PAYMENT_TYPES="Payment Types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_ACCESS="Payment Types Access" +COM_EHEALTHPORTAL_PAYMENT_TYPES_ACCESS_DESC="Allows the users in this group to access access payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_BATCH_OPTIONS="Batch process the selected Payment Types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_BATCH_TIP="All changes will be applied to all selected Payment Types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_BATCH_USE="Payment Types Batch Use" +COM_EHEALTHPORTAL_PAYMENT_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION="Payment Types Edit Description" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of payment type" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_NAME="Payment Types Edit Name" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of payment type" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_VERSION="Payment Types Edit Version" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EXPORT="Payment Types Export" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EXPORT_DESC="Allows the users in this group to export export payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_IMPORT="Payment Types Import" +COM_EHEALTHPORTAL_PAYMENT_TYPES_IMPORT_DESC="Allows the users in this group to import import payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_ARCHIVED="%s Payment Types archived." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_ARCHIVED_1="%s Payment Type archived." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_CHECKED_IN_0="No Payment Type successfully checked in." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_CHECKED_IN_1="%d Payment Type successfully checked in." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Payment Types successfully checked in." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_DELETED="%s Payment Types deleted." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_DELETED_1="%s Payment Type deleted." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Payment Types failed publishing." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Payment Type failed publishing." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_FEATURED="%s Payment Types featured." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_FEATURED_1="%s Payment Type featured." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_PUBLISHED="%s Payment Types published." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_PUBLISHED_1="%s Payment Type published." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_TRASHED="%s Payment Types trashed." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_TRASHED_1="%s Payment Type trashed." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_UNFEATURED="%s Payment Types unfeatured." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_UNFEATURED_1="%s Payment Type unfeatured." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_UNPUBLISHED="%s Payment Types unpublished." +COM_EHEALTHPORTAL_PAYMENT_TYPES_N_ITEMS_UNPUBLISHED_1="%s Payment Type unpublished." +COM_EHEALTHPORTAL_PAYMENT_TYPE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_PAYMENT_TYPE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_PAYMENT_TYPE_CREATED_BY_DESC="The user that created this Payment Type." +COM_EHEALTHPORTAL_PAYMENT_TYPE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_PAYMENT_TYPE_CREATED_DATE_DESC="The date this Payment Type was created." +COM_EHEALTHPORTAL_PAYMENT_TYPE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_PAYMENT_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_PAYMENT_TYPE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_PAYMENT_TYPE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_PAYMENT_TYPE_DETAILS="Details" +COM_EHEALTHPORTAL_PAYMENT_TYPE_EDIT="Editing the Payment Type" +COM_EHEALTHPORTAL_PAYMENT_TYPE_ERROR_UNIQUE_ALIAS="Another Payment Type has the same alias." +COM_EHEALTHPORTAL_PAYMENT_TYPE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Payment Type has the same alias ." +COM_EHEALTHPORTAL_PAYMENT_TYPE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_PAYMENT_TYPE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_PAYMENT_TYPE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_PAYMENT_TYPE_ID="Id" +COM_EHEALTHPORTAL_PAYMENT_TYPE_MODIFIED_BY_DESC="The last user that modified this Payment Type." +COM_EHEALTHPORTAL_PAYMENT_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_PAYMENT_TYPE_MODIFIED_DATE_DESC="The date this Payment Type was modified." +COM_EHEALTHPORTAL_PAYMENT_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_PAYMENT_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_PAYMENT_TYPE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_PAYMENT_TYPE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_PAYMENT_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_PAYMENT_TYPE_NEW="A New Payment Type" +COM_EHEALTHPORTAL_PAYMENT_TYPE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_PAYMENT_TYPE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_PAYMENT_TYPE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_PAYMENT_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Payment Type to customise the alias." +COM_EHEALTHPORTAL_PAYMENT_TYPE_STATUS="Status" +COM_EHEALTHPORTAL_PAYMENT_TYPE_VERSION_DESC="A count of the number of times this Payment Type has been revised." +COM_EHEALTHPORTAL_PAYMENT_TYPE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_PAYMENT_VERSION_DESC="A count of the number of times this Payment has been revised." +COM_EHEALTHPORTAL_PAYMENT_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_PAYMENT_ZERO="0" +COM_EHEALTHPORTAL_PLANNING_TYPE="Planning Type" +COM_EHEALTHPORTAL_PLANNING_TYPES="Planning Types" +COM_EHEALTHPORTAL_PLANNING_TYPES_ACCESS="Planning Types Access" +COM_EHEALTHPORTAL_PLANNING_TYPES_ACCESS_DESC="Allows the users in this group to access access planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_BATCH_OPTIONS="Batch process the selected Planning Types" +COM_EHEALTHPORTAL_PLANNING_TYPES_BATCH_TIP="All changes will be applied to all selected Planning Types" +COM_EHEALTHPORTAL_PLANNING_TYPES_BATCH_USE="Planning Types Batch Use" +COM_EHEALTHPORTAL_PLANNING_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_DESCRIPTION="Planning Types Edit Description" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of planning type" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_NAME="Planning Types Edit Name" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of planning type" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_VERSION="Planning Types Edit Version" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_EXPORT="Planning Types Export" +COM_EHEALTHPORTAL_PLANNING_TYPES_EXPORT_DESC="Allows the users in this group to export export planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_IMPORT="Planning Types Import" +COM_EHEALTHPORTAL_PLANNING_TYPES_IMPORT_DESC="Allows the users in this group to import import planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_ARCHIVED="%s Planning Types archived." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_ARCHIVED_1="%s Planning Type archived." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_CHECKED_IN_0="No Planning Type successfully checked in." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_CHECKED_IN_1="%d Planning Type successfully checked in." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_CHECKED_IN_MORE="%d Planning Types successfully checked in." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_DELETED="%s Planning Types deleted." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_DELETED_1="%s Planning Type deleted." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_FAILED_PUBLISHING="%s Planning Types failed publishing." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_FAILED_PUBLISHING_1="%s Planning Type failed publishing." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_FEATURED="%s Planning Types featured." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_FEATURED_1="%s Planning Type featured." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_PUBLISHED="%s Planning Types published." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_PUBLISHED_1="%s Planning Type published." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_TRASHED="%s Planning Types trashed." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_TRASHED_1="%s Planning Type trashed." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_UNFEATURED="%s Planning Types unfeatured." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_UNFEATURED_1="%s Planning Type unfeatured." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_UNPUBLISHED="%s Planning Types unpublished." +COM_EHEALTHPORTAL_PLANNING_TYPES_N_ITEMS_UNPUBLISHED_1="%s Planning Type unpublished." +COM_EHEALTHPORTAL_PLANNING_TYPE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_PLANNING_TYPE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_PLANNING_TYPE_CREATED_BY_DESC="The user that created this Planning Type." +COM_EHEALTHPORTAL_PLANNING_TYPE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_PLANNING_TYPE_CREATED_DATE_DESC="The date this Planning Type was created." +COM_EHEALTHPORTAL_PLANNING_TYPE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_PLANNING_TYPE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_PLANNING_TYPE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_PLANNING_TYPE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_PLANNING_TYPE_DETAILS="Details" +COM_EHEALTHPORTAL_PLANNING_TYPE_EDIT="Editing the Planning Type" +COM_EHEALTHPORTAL_PLANNING_TYPE_ERROR_UNIQUE_ALIAS="Another Planning Type has the same alias." +COM_EHEALTHPORTAL_PLANNING_TYPE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Planning Type has the same alias ." +COM_EHEALTHPORTAL_PLANNING_TYPE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_PLANNING_TYPE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_PLANNING_TYPE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_PLANNING_TYPE_ID="Id" +COM_EHEALTHPORTAL_PLANNING_TYPE_MODIFIED_BY_DESC="The last user that modified this Planning Type." +COM_EHEALTHPORTAL_PLANNING_TYPE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_PLANNING_TYPE_MODIFIED_DATE_DESC="The date this Planning Type was modified." +COM_EHEALTHPORTAL_PLANNING_TYPE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_PLANNING_TYPE_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_PLANNING_TYPE_NAME_HINT="Name here" +COM_EHEALTHPORTAL_PLANNING_TYPE_NAME_LABEL="Name" +COM_EHEALTHPORTAL_PLANNING_TYPE_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_PLANNING_TYPE_NEW="A New Planning Type" +COM_EHEALTHPORTAL_PLANNING_TYPE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_PLANNING_TYPE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_PLANNING_TYPE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_PLANNING_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Planning Type to customise the alias." +COM_EHEALTHPORTAL_PLANNING_TYPE_STATUS="Status" +COM_EHEALTHPORTAL_PLANNING_TYPE_VERSION_DESC="A count of the number of times this Planning Type has been revised." +COM_EHEALTHPORTAL_PLANNING_TYPE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER="Prostate and Testicular Cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS="Prostate and Testicular Cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS="Prostate And Testicular Cancers Access" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS_DESC="Allows the users in this group to access access prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_OPTIONS="Batch process the selected Prostate and Testicular Cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_TIP="All changes will be applied to all selected Prostate and Testicular Cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE="Prostate And Testicular Cancers Batch Use" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD="Prostate And Testicular Cancers Dashboard Add" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of prostate and testicular cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST="Prostate And Testicular Cancers Dashboard List" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of prostate and testicular cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION="Prostate And Testicular Cancers Edit Version" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT="Prostate And Testicular Cancers Export" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT_DESC="Allows the users in this group to export export prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT="Prostate And Testicular Cancers Import" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT_DESC="Allows the users in this group to import import prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_ARCHIVED="%s Prostate and Testicular Cancers archived." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_ARCHIVED_1="%s Prostate and Testicular Cancer archived." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_CHECKED_IN_0="No Prostate and Testicular Cancer successfully checked in." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_CHECKED_IN_1="%d Prostate and Testicular Cancer successfully checked in." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_CHECKED_IN_MORE="%d Prostate and Testicular Cancers successfully checked in." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_DELETED="%s Prostate and Testicular Cancers deleted." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_DELETED_1="%s Prostate and Testicular Cancer deleted." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FAILED_PUBLISHING="%s Prostate and Testicular Cancers failed publishing." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FAILED_PUBLISHING_1="%s Prostate and Testicular Cancer failed publishing." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FEATURED="%s Prostate and Testicular Cancers featured." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_FEATURED_1="%s Prostate and Testicular Cancer featured." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_PUBLISHED="%s Prostate and Testicular Cancers published." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_PUBLISHED_1="%s Prostate and Testicular Cancer published." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_TRASHED="%s Prostate and Testicular Cancers trashed." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_TRASHED_1="%s Prostate and Testicular Cancer trashed." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNFEATURED="%s Prostate and Testicular Cancers unfeatured." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNFEATURED_1="%s Prostate and Testicular Cancer unfeatured." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNPUBLISHED="%s Prostate and Testicular Cancers unpublished." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_N_ITEMS_UNPUBLISHED_1="%s Prostate and Testicular Cancer unpublished." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU="Prostate And Testicular Cancers Submenu" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of prostate and testicular cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_BY_DESC="The user that created this Prostate and Testicular Cancer." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_DATE_DESC="The date this Prostate and Testicular Cancer was created." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_DETAILS="Details" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_EDIT="Editing the Prostate and Testicular Cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_ERROR_UNIQUE_ALIAS="Another Prostate and Testicular Cancer has the same alias." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Prostate and Testicular Cancer has the same alias ." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_ID="Id" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_BY_DESC="The last user that modified this Prostate and Testicular Cancer." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_DATE_DESC="The date this Prostate and Testicular Cancer was modified." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NEW="A New Prostate and Testicular Cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO="No" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PERMISSION="Permissions" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_AGE_DESCRIPTION="Age > 40 years?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_AGE_LABEL="Age > 40 years?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_DIET_DESCRIPTION="Do you eat a high fat diet low in fruit and vegetables?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_DIET_LABEL="Do you eat a high fat diet low in fruit and vegetables?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_FAM_HISTORY_DESCRIPTION="Do you have a family history of a father, brother or grandfather with prostate or testicular cancer?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_FAM_HISTORY_LABEL="Do you have a family history of a father, brother or grandfather with prostate or testicular cancer?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_OVERWEIGHT_DESCRIPTION="Does the patient appear to be overweight?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_OVERWEIGHT_LABEL="Does the patient appear to be overweight?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_PHY_ACTIVITY_DESCRIPTION="Do you do regular physical activity?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_PHY_ACTIVITY_LABEL="Do you do regular physical activity?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINATE_DESCRIPTION="Do you experience difficulty passing urine?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINATE_LABEL="Do you experience difficulty passing urine?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINE_FREQ_DESCRIPTION="Do you pass urine more frequently than usual, especially at night?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PTC_URINE_FREQ_LABEL="Do you pass urine more frequently than usual, especially at night?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_REFERRALS="Referrals" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Prostate and Testicular Cancer to customise the alias." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_STATUS="Status" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_AGE_DESCRIPTION="Age > 40 years?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_AGE_HINT="Add text here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_AGE_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_DIET_DESCRIPTION="Do you eat a high fat diet low in fruit and vegetables?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_DIET_HINT="Add text Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_DIET_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_FAM_HISTORY_DESCRIPTION="Do you have a family history of a father, brother or grandfather with prostate or testicular cancer?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_FAM_HISTORY_HINT="Add text here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_FAM_HISTORY_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_OVERWEIGHT_DESCRIPTION="Does the patient appear to be overweight?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_OVERWEIGHT_HINT="Add text Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_OVERWEIGHT_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_PHY_ACTIVITY_DESCRIPTION="Do you do regular physical activity?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_PHY_ACTIVITY_HINT="Add text Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_PHY_ACTIVITY_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINATE_DESCRIPTION="Do you experience difficulty passing urine?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINATE_HINT="Add text Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINATE_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINE_FREQ_DESCRIPTION="Do you pass urine more frequently than usual, especially at night?" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINE_FREQ_HINT="Add text Here" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_TXT_PTC_URINE_FREQ_LABEL="Comments:" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_VERSION_DESC="A count of the number of times this Prostate and Testicular Cancer has been revised." +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES="Yes" +COM_EHEALTHPORTAL_PUBLISHED="Published" +COM_EHEALTHPORTAL_REFERRAL="Referral" +COM_EHEALTHPORTAL_REFERRALS="Referrals" +COM_EHEALTHPORTAL_REFERRALS_ACCESS="Referrals Access" +COM_EHEALTHPORTAL_REFERRALS_ACCESS_DESC="Allows the users in this group to access access referrals" +COM_EHEALTHPORTAL_REFERRALS_BATCH_OPTIONS="Batch process the selected Referrals" +COM_EHEALTHPORTAL_REFERRALS_BATCH_TIP="All changes will be applied to all selected Referrals" +COM_EHEALTHPORTAL_REFERRALS_BATCH_USE="Referrals Batch Use" +COM_EHEALTHPORTAL_REFERRALS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch referrals" +COM_EHEALTHPORTAL_REFERRALS_EDIT_DESCRIPTION="Referrals Edit Description" +COM_EHEALTHPORTAL_REFERRALS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of referral" +COM_EHEALTHPORTAL_REFERRALS_EDIT_NAME="Referrals Edit Name" +COM_EHEALTHPORTAL_REFERRALS_EDIT_NAME_DESC="Allows the users in this group to edit name of referral" +COM_EHEALTHPORTAL_REFERRALS_EDIT_VERSION="Referrals Edit Version" +COM_EHEALTHPORTAL_REFERRALS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version referrals" +COM_EHEALTHPORTAL_REFERRALS_EXPORT="Referrals Export" +COM_EHEALTHPORTAL_REFERRALS_EXPORT_DESC="Allows the users in this group to export export referrals" +COM_EHEALTHPORTAL_REFERRALS_IMPORT="Referrals Import" +COM_EHEALTHPORTAL_REFERRALS_IMPORT_DESC="Allows the users in this group to import import referrals" +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_ARCHIVED="%s Referrals archived." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_ARCHIVED_1="%s Referral archived." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_CHECKED_IN_0="No Referral successfully checked in." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_CHECKED_IN_1="%d Referral successfully checked in." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_CHECKED_IN_MORE="%d Referrals successfully checked in." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_DELETED="%s Referrals deleted." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_DELETED_1="%s Referral deleted." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_FAILED_PUBLISHING="%s Referrals failed publishing." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_FAILED_PUBLISHING_1="%s Referral failed publishing." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_FEATURED="%s Referrals featured." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_FEATURED_1="%s Referral featured." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_PUBLISHED="%s Referrals published." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_PUBLISHED_1="%s Referral published." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_TRASHED="%s Referrals trashed." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_TRASHED_1="%s Referral trashed." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_UNFEATURED="%s Referrals unfeatured." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_UNFEATURED_1="%s Referral unfeatured." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_UNPUBLISHED="%s Referrals unpublished." +COM_EHEALTHPORTAL_REFERRALS_N_ITEMS_UNPUBLISHED_1="%s Referral unpublished." +COM_EHEALTHPORTAL_REFERRALS_SUBMENU="Referrals Submenu" +COM_EHEALTHPORTAL_REFERRALS_SUBMENU_DESC="Allows the users in this group to submenu of referral" +COM_EHEALTHPORTAL_REFERRAL_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_REFERRAL_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_REFERRAL_CREATED_BY_DESC="The user that created this Referral." +COM_EHEALTHPORTAL_REFERRAL_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_REFERRAL_CREATED_DATE_DESC="The date this Referral was created." +COM_EHEALTHPORTAL_REFERRAL_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_REFERRAL_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_REFERRAL_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_REFERRAL_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_REFERRAL_DETAILS="Details" +COM_EHEALTHPORTAL_REFERRAL_EDIT="Editing the Referral" +COM_EHEALTHPORTAL_REFERRAL_ERROR_UNIQUE_ALIAS="Another Referral has the same alias." +COM_EHEALTHPORTAL_REFERRAL_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Referral has the same alias ." +COM_EHEALTHPORTAL_REFERRAL_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_REFERRAL_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_REFERRAL_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_REFERRAL_ID="Id" +COM_EHEALTHPORTAL_REFERRAL_MODIFIED_BY_DESC="The last user that modified this Referral." +COM_EHEALTHPORTAL_REFERRAL_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_REFERRAL_MODIFIED_DATE_DESC="The date this Referral was modified." +COM_EHEALTHPORTAL_REFERRAL_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_REFERRAL_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_REFERRAL_NAME_HINT="Name here" +COM_EHEALTHPORTAL_REFERRAL_NAME_LABEL="Name" +COM_EHEALTHPORTAL_REFERRAL_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_REFERRAL_NEW="A New Referral" +COM_EHEALTHPORTAL_REFERRAL_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_REFERRAL_PERMISSION="Permissions" +COM_EHEALTHPORTAL_REFERRAL_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_REFERRAL_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Referral to customise the alias." +COM_EHEALTHPORTAL_REFERRAL_STATUS="Status" +COM_EHEALTHPORTAL_REFERRAL_VERSION_DESC="A count of the number of times this Referral has been revised." +COM_EHEALTHPORTAL_REFERRAL_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_SAVE_SUCCESS="Great! Item successfully saved." +COM_EHEALTHPORTAL_SAVE_WARNING="The value already existed so please select another." +COM_EHEALTHPORTAL_SELECT_AN_OPTION="Select an option" +COM_EHEALTHPORTAL_SELECT_OPTION="Select Option" +COM_EHEALTHPORTAL_SITE="Site" +COM_EHEALTHPORTAL_SITES="Sites" +COM_EHEALTHPORTAL_SITES_ACCESS="Sites Access" +COM_EHEALTHPORTAL_SITES_ACCESS_DESC="Allows the users in this group to access access sites" +COM_EHEALTHPORTAL_SITES_BATCH_OPTIONS="Batch process the selected Sites" +COM_EHEALTHPORTAL_SITES_BATCH_TIP="All changes will be applied to all selected Sites" +COM_EHEALTHPORTAL_SITES_BATCH_USE="Sites Batch Use" +COM_EHEALTHPORTAL_SITES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch sites" +COM_EHEALTHPORTAL_SITES_EDIT_DESCRIPTION="Sites Edit Description" +COM_EHEALTHPORTAL_SITES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of site" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_NAME="Sites Edit Site Name" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_NAME_DESC="Allows the users in this group to edit site name of site" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_REGION="Sites Edit Site Region" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_REGION_DESC="Allows the users in this group to edit site region of site" +COM_EHEALTHPORTAL_SITES_EDIT_VERSION="Sites Edit Version" +COM_EHEALTHPORTAL_SITES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version sites" +COM_EHEALTHPORTAL_SITES_EXPORT="Sites Export" +COM_EHEALTHPORTAL_SITES_EXPORT_DESC="Allows the users in this group to export export sites" +COM_EHEALTHPORTAL_SITES_IMPORT="Sites Import" +COM_EHEALTHPORTAL_SITES_IMPORT_DESC="Allows the users in this group to import import sites" +COM_EHEALTHPORTAL_SITES_N_ITEMS_ARCHIVED="%s Sites archived." +COM_EHEALTHPORTAL_SITES_N_ITEMS_ARCHIVED_1="%s Site archived." +COM_EHEALTHPORTAL_SITES_N_ITEMS_CHECKED_IN_0="No Site successfully checked in." +COM_EHEALTHPORTAL_SITES_N_ITEMS_CHECKED_IN_1="%d Site successfully checked in." +COM_EHEALTHPORTAL_SITES_N_ITEMS_CHECKED_IN_MORE="%d Sites successfully checked in." +COM_EHEALTHPORTAL_SITES_N_ITEMS_DELETED="%s Sites deleted." +COM_EHEALTHPORTAL_SITES_N_ITEMS_DELETED_1="%s Site deleted." +COM_EHEALTHPORTAL_SITES_N_ITEMS_FAILED_PUBLISHING="%s Sites failed publishing." +COM_EHEALTHPORTAL_SITES_N_ITEMS_FAILED_PUBLISHING_1="%s Site failed publishing." +COM_EHEALTHPORTAL_SITES_N_ITEMS_FEATURED="%s Sites featured." +COM_EHEALTHPORTAL_SITES_N_ITEMS_FEATURED_1="%s Site featured." +COM_EHEALTHPORTAL_SITES_N_ITEMS_PUBLISHED="%s Sites published." +COM_EHEALTHPORTAL_SITES_N_ITEMS_PUBLISHED_1="%s Site published." +COM_EHEALTHPORTAL_SITES_N_ITEMS_TRASHED="%s Sites trashed." +COM_EHEALTHPORTAL_SITES_N_ITEMS_TRASHED_1="%s Site trashed." +COM_EHEALTHPORTAL_SITES_N_ITEMS_UNFEATURED="%s Sites unfeatured." +COM_EHEALTHPORTAL_SITES_N_ITEMS_UNFEATURED_1="%s Site unfeatured." +COM_EHEALTHPORTAL_SITES_N_ITEMS_UNPUBLISHED="%s Sites unpublished." +COM_EHEALTHPORTAL_SITES_N_ITEMS_UNPUBLISHED_1="%s Site unpublished." +COM_EHEALTHPORTAL_SITE_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_SITE_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_SITE_CREATED_BY_DESC="The user that created this Site." +COM_EHEALTHPORTAL_SITE_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_SITE_CREATED_DATE_DESC="The date this Site was created." +COM_EHEALTHPORTAL_SITE_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_SITE_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_SITE_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_SITE_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_SITE_DETAILS="Details" +COM_EHEALTHPORTAL_SITE_EDIT="Editing the Site" +COM_EHEALTHPORTAL_SITE_ERROR_UNIQUE_ALIAS="Another Site has the same alias." +COM_EHEALTHPORTAL_SITE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Site has the same alias ." +COM_EHEALTHPORTAL_SITE_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_SITE_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_SITE_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_SITE_ID="Id" +COM_EHEALTHPORTAL_SITE_MODIFIED_BY_DESC="The last user that modified this Site." +COM_EHEALTHPORTAL_SITE_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_SITE_MODIFIED_DATE_DESC="The date this Site was modified." +COM_EHEALTHPORTAL_SITE_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_SITE_NEW="A New Site" +COM_EHEALTHPORTAL_SITE_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_SITE_PERMISSION="Permissions" +COM_EHEALTHPORTAL_SITE_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_SITE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Site to customise the alias." +COM_EHEALTHPORTAL_SITE_SITE_NAME_DESCRIPTION="Enter Site Name Here" +COM_EHEALTHPORTAL_SITE_SITE_NAME_HINT="Site Name Here" +COM_EHEALTHPORTAL_SITE_SITE_NAME_LABEL="Site Name" +COM_EHEALTHPORTAL_SITE_SITE_NAME_MESSAGE="Error! Please add Site Name here." +COM_EHEALTHPORTAL_SITE_SITE_REGION_DESCRIPTION="Enter Site Region Here" +COM_EHEALTHPORTAL_SITE_SITE_REGION_HINT="Site Region Here" +COM_EHEALTHPORTAL_SITE_SITE_REGION_LABEL="Site Region" +COM_EHEALTHPORTAL_SITE_SITE_REGION_MESSAGE="Error! Please add Site Region here." +COM_EHEALTHPORTAL_SITE_STATUS="Status" +COM_EHEALTHPORTAL_SITE_VERSION_DESC="A count of the number of times this Site has been revised." +COM_EHEALTHPORTAL_SITE_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_STRENGTH="Strength" +COM_EHEALTHPORTAL_STRENGTHS="Strengths" +COM_EHEALTHPORTAL_STRENGTHS_ACCESS="Strengths Access" +COM_EHEALTHPORTAL_STRENGTHS_ACCESS_DESC="Allows the users in this group to access access strengths" +COM_EHEALTHPORTAL_STRENGTHS_BATCH_OPTIONS="Batch process the selected Strengths" +COM_EHEALTHPORTAL_STRENGTHS_BATCH_TIP="All changes will be applied to all selected Strengths" +COM_EHEALTHPORTAL_STRENGTHS_BATCH_USE="Strengths Batch Use" +COM_EHEALTHPORTAL_STRENGTHS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch strengths" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_DESCRIPTION="Strengths Edit Description" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of strength" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_NAME="Strengths Edit Name" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_NAME_DESC="Allows the users in this group to edit name of strength" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_VERSION="Strengths Edit Version" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version strengths" +COM_EHEALTHPORTAL_STRENGTHS_EXPORT="Strengths Export" +COM_EHEALTHPORTAL_STRENGTHS_EXPORT_DESC="Allows the users in this group to export export strengths" +COM_EHEALTHPORTAL_STRENGTHS_IMPORT="Strengths Import" +COM_EHEALTHPORTAL_STRENGTHS_IMPORT_DESC="Allows the users in this group to import import strengths" +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_ARCHIVED="%s Strengths archived." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_ARCHIVED_1="%s Strength archived." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_CHECKED_IN_0="No Strength successfully checked in." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_CHECKED_IN_1="%d Strength successfully checked in." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_CHECKED_IN_MORE="%d Strengths successfully checked in." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_DELETED="%s Strengths deleted." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_DELETED_1="%s Strength deleted." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_FAILED_PUBLISHING="%s Strengths failed publishing." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_FAILED_PUBLISHING_1="%s Strength failed publishing." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_FEATURED="%s Strengths featured." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_FEATURED_1="%s Strength featured." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_PUBLISHED="%s Strengths published." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_PUBLISHED_1="%s Strength published." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_TRASHED="%s Strengths trashed." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_TRASHED_1="%s Strength trashed." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_UNFEATURED="%s Strengths unfeatured." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_UNFEATURED_1="%s Strength unfeatured." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_UNPUBLISHED="%s Strengths unpublished." +COM_EHEALTHPORTAL_STRENGTHS_N_ITEMS_UNPUBLISHED_1="%s Strength unpublished." +COM_EHEALTHPORTAL_STRENGTHS_SUBMENU="Strengths Submenu" +COM_EHEALTHPORTAL_STRENGTHS_SUBMENU_DESC="Allows the users in this group to submenu of strength" +COM_EHEALTHPORTAL_STRENGTH_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_STRENGTH_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_STRENGTH_CREATED_BY_DESC="The user that created this Strength." +COM_EHEALTHPORTAL_STRENGTH_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_STRENGTH_CREATED_DATE_DESC="The date this Strength was created." +COM_EHEALTHPORTAL_STRENGTH_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_STRENGTH_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_STRENGTH_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_STRENGTH_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_STRENGTH_DETAILS="Details" +COM_EHEALTHPORTAL_STRENGTH_EDIT="Editing the Strength" +COM_EHEALTHPORTAL_STRENGTH_ERROR_UNIQUE_ALIAS="Another Strength has the same alias." +COM_EHEALTHPORTAL_STRENGTH_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Strength has the same alias ." +COM_EHEALTHPORTAL_STRENGTH_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_STRENGTH_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_STRENGTH_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_STRENGTH_ID="Id" +COM_EHEALTHPORTAL_STRENGTH_MODIFIED_BY_DESC="The last user that modified this Strength." +COM_EHEALTHPORTAL_STRENGTH_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_STRENGTH_MODIFIED_DATE_DESC="The date this Strength was modified." +COM_EHEALTHPORTAL_STRENGTH_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_STRENGTH_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_STRENGTH_NAME_HINT="Name here" +COM_EHEALTHPORTAL_STRENGTH_NAME_LABEL="Name" +COM_EHEALTHPORTAL_STRENGTH_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_STRENGTH_NEW="A New Strength" +COM_EHEALTHPORTAL_STRENGTH_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_STRENGTH_PERMISSION="Permissions" +COM_EHEALTHPORTAL_STRENGTH_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_STRENGTH_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Strength to customise the alias." +COM_EHEALTHPORTAL_STRENGTH_STATUS="Status" +COM_EHEALTHPORTAL_STRENGTH_VERSION_DESC="A count of the number of times this Strength has been revised." +COM_EHEALTHPORTAL_STRENGTH_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_SUBMENU_ADMINISTRATION_PARTS="Administration Parts" +COM_EHEALTHPORTAL_SUBMENU_ANTENATAL_CARES="Antenatal Cares" +COM_EHEALTHPORTAL_SUBMENU_BREAST_CANCERS="Breast Cancers" +COM_EHEALTHPORTAL_SUBMENU_CERVICAL_CANCERS="Cervical Cancers" +COM_EHEALTHPORTAL_SUBMENU_DASHBOARD="Dashboard" +COM_EHEALTHPORTAL_SUBMENU_FAMILY_PLANNINGS="Family Plannings" +COM_EHEALTHPORTAL_SUBMENU_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups" +COM_EHEALTHPORTAL_SUBMENU_HEALTH_EDUCATIONS="Health Educations" +COM_EHEALTHPORTAL_SUBMENU_HIV_COUNSELINGS_AND_TESTINGS="HIV Counselings and Testings" +COM_EHEALTHPORTAL_SUBMENU_IMMUNISATIONS="Immunisations" +COM_EHEALTHPORTAL_SUBMENU_IMMUNISATION_TYPES="Immunisation Types" +COM_EHEALTHPORTAL_SUBMENU_IMMUNISATION_VACCINE_TYPES="Immunisation Vaccine Types" +COM_EHEALTHPORTAL_SUBMENU_MEDICATIONS="Medications" +COM_EHEALTHPORTAL_SUBMENU_PATIENT_QUEUE="Patient Queue" +COM_EHEALTHPORTAL_SUBMENU_PAYMENTS="Payments" +COM_EHEALTHPORTAL_SUBMENU_PROSTATE_AND_TESTICULAR_CANCERS="Prostate and Testicular Cancers" +COM_EHEALTHPORTAL_SUBMENU_REFERRALS="Referrals" +COM_EHEALTHPORTAL_SUBMENU_STRENGTHS="Strengths" +COM_EHEALTHPORTAL_SUBMENU_TESTS="Tests" +COM_EHEALTHPORTAL_SUBMENU_TUBERCULOSES="Tuberculoses" +COM_EHEALTHPORTAL_SUBMENU_UNITS="Units" +COM_EHEALTHPORTAL_SUBMENU_VMMCS="VMMCs" +COM_EHEALTHPORTAL_TEST="Test" +COM_EHEALTHPORTAL_TESTING_REASON="Testing Reason" +COM_EHEALTHPORTAL_TESTING_REASONS="Testing Reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_ACCESS="Testing Reasons Access" +COM_EHEALTHPORTAL_TESTING_REASONS_ACCESS_DESC="Allows the users in this group to access access testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_BATCH_OPTIONS="Batch process the selected Testing Reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_BATCH_TIP="All changes will be applied to all selected Testing Reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_BATCH_USE="Testing Reasons Batch Use" +COM_EHEALTHPORTAL_TESTING_REASONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_DESCRIPTION="Testing Reasons Edit Description" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of testing reason" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_NAME="Testing Reasons Edit Name" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of testing reason" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_VERSION="Testing Reasons Edit Version" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_EXPORT="Testing Reasons Export" +COM_EHEALTHPORTAL_TESTING_REASONS_EXPORT_DESC="Allows the users in this group to export export testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_IMPORT="Testing Reasons Import" +COM_EHEALTHPORTAL_TESTING_REASONS_IMPORT_DESC="Allows the users in this group to import import testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_ARCHIVED="%s Testing Reasons archived." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_ARCHIVED_1="%s Testing Reason archived." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_CHECKED_IN_0="No Testing Reason successfully checked in." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_CHECKED_IN_1="%d Testing Reason successfully checked in." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_CHECKED_IN_MORE="%d Testing Reasons successfully checked in." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_DELETED="%s Testing Reasons deleted." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_DELETED_1="%s Testing Reason deleted." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_FAILED_PUBLISHING="%s Testing Reasons failed publishing." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_FAILED_PUBLISHING_1="%s Testing Reason failed publishing." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_FEATURED="%s Testing Reasons featured." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_FEATURED_1="%s Testing Reason featured." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_PUBLISHED="%s Testing Reasons published." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_PUBLISHED_1="%s Testing Reason published." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_TRASHED="%s Testing Reasons trashed." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_TRASHED_1="%s Testing Reason trashed." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_UNFEATURED="%s Testing Reasons unfeatured." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_UNFEATURED_1="%s Testing Reason unfeatured." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_UNPUBLISHED="%s Testing Reasons unpublished." +COM_EHEALTHPORTAL_TESTING_REASONS_N_ITEMS_UNPUBLISHED_1="%s Testing Reason unpublished." +COM_EHEALTHPORTAL_TESTING_REASON_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_TESTING_REASON_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_TESTING_REASON_CREATED_BY_DESC="The user that created this Testing Reason." +COM_EHEALTHPORTAL_TESTING_REASON_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_TESTING_REASON_CREATED_DATE_DESC="The date this Testing Reason was created." +COM_EHEALTHPORTAL_TESTING_REASON_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_TESTING_REASON_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_TESTING_REASON_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_TESTING_REASON_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_TESTING_REASON_DETAILS="Details" +COM_EHEALTHPORTAL_TESTING_REASON_EDIT="Editing the Testing Reason" +COM_EHEALTHPORTAL_TESTING_REASON_ERROR_UNIQUE_ALIAS="Another Testing Reason has the same alias." +COM_EHEALTHPORTAL_TESTING_REASON_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Testing Reason has the same alias ." +COM_EHEALTHPORTAL_TESTING_REASON_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_TESTING_REASON_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_TESTING_REASON_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_TESTING_REASON_ID="Id" +COM_EHEALTHPORTAL_TESTING_REASON_MODIFIED_BY_DESC="The last user that modified this Testing Reason." +COM_EHEALTHPORTAL_TESTING_REASON_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_TESTING_REASON_MODIFIED_DATE_DESC="The date this Testing Reason was modified." +COM_EHEALTHPORTAL_TESTING_REASON_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_TESTING_REASON_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_TESTING_REASON_NAME_HINT="Name here" +COM_EHEALTHPORTAL_TESTING_REASON_NAME_LABEL="Name" +COM_EHEALTHPORTAL_TESTING_REASON_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_TESTING_REASON_NEW="A New Testing Reason" +COM_EHEALTHPORTAL_TESTING_REASON_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_TESTING_REASON_PERMISSION="Permissions" +COM_EHEALTHPORTAL_TESTING_REASON_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_TESTING_REASON_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Testing Reason to customise the alias." +COM_EHEALTHPORTAL_TESTING_REASON_STATUS="Status" +COM_EHEALTHPORTAL_TESTING_REASON_VERSION_DESC="A count of the number of times this Testing Reason has been revised." +COM_EHEALTHPORTAL_TESTING_REASON_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_TESTS="Tests" +COM_EHEALTHPORTAL_TESTS_ACCESS="Tests Access" +COM_EHEALTHPORTAL_TESTS_ACCESS_DESC="Allows the users in this group to access access tests" +COM_EHEALTHPORTAL_TESTS_BATCH_OPTIONS="Batch process the selected Tests" +COM_EHEALTHPORTAL_TESTS_BATCH_TIP="All changes will be applied to all selected Tests" +COM_EHEALTHPORTAL_TESTS_BATCH_USE="Tests Batch Use" +COM_EHEALTHPORTAL_TESTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch tests" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_ADD="Tests Dashboard Add" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of test" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_LIST="Tests Dashboard List" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of test" +COM_EHEALTHPORTAL_TESTS_EDIT_VERSION="Tests Edit Version" +COM_EHEALTHPORTAL_TESTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version tests" +COM_EHEALTHPORTAL_TESTS_EXPORT="Tests Export" +COM_EHEALTHPORTAL_TESTS_EXPORT_DESC="Allows the users in this group to export export tests" +COM_EHEALTHPORTAL_TESTS_IMPORT="Tests Import" +COM_EHEALTHPORTAL_TESTS_IMPORT_DESC="Allows the users in this group to import import tests" +COM_EHEALTHPORTAL_TESTS_N_ITEMS_ARCHIVED="%s Tests archived." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_ARCHIVED_1="%s Test archived." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_CHECKED_IN_0="No Test successfully checked in." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_CHECKED_IN_1="%d Test successfully checked in." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_CHECKED_IN_MORE="%d Tests successfully checked in." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_DELETED="%s Tests deleted." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_DELETED_1="%s Test deleted." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_FAILED_PUBLISHING="%s Tests failed publishing." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_FAILED_PUBLISHING_1="%s Test failed publishing." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_FEATURED="%s Tests featured." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_FEATURED_1="%s Test featured." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_PUBLISHED="%s Tests published." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_PUBLISHED_1="%s Test published." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_TRASHED="%s Tests trashed." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_TRASHED_1="%s Test trashed." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_UNFEATURED="%s Tests unfeatured." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_UNFEATURED_1="%s Test unfeatured." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_UNPUBLISHED="%s Tests unpublished." +COM_EHEALTHPORTAL_TESTS_N_ITEMS_UNPUBLISHED_1="%s Test unpublished." +COM_EHEALTHPORTAL_TESTS_SUBMENU="Tests Submenu" +COM_EHEALTHPORTAL_TESTS_SUBMENU_DESC="Allows the users in this group to submenu of test" +COM_EHEALTHPORTAL_TEST_ABNORMAL="Abnormal" +COM_EHEALTHPORTAL_TEST_CHOLESTEROL="Cholesterol" +COM_EHEALTHPORTAL_TEST_CHOLESTEROL_READING_DESCRIPTION="Enter Cholesterol reading (g/dL)" +COM_EHEALTHPORTAL_TEST_CHOLESTEROL_READING_HINT="Your Cholesterol reading (g/dL) Here" +COM_EHEALTHPORTAL_TEST_CHOLESTEROL_READING_LABEL="Cholesterol reading (g/dL):" +COM_EHEALTHPORTAL_TEST_CREATED_BY_DESC="The user that created this Test." +COM_EHEALTHPORTAL_TEST_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_TEST_CREATED_DATE_DESC="The date this Test was created." +COM_EHEALTHPORTAL_TEST_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_TEST_EDIT="Editing the Test" +COM_EHEALTHPORTAL_TEST_ERROR_UNIQUE_ALIAS="Another Test has the same alias." +COM_EHEALTHPORTAL_TEST_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Test has the same alias ." +COM_EHEALTHPORTAL_TEST_GLUCOSE="Glucose" +COM_EHEALTHPORTAL_TEST_GLUCOSE_FIRST_READING_DESCRIPTION="Enter Glucose 1st reading (mmol/L)" +COM_EHEALTHPORTAL_TEST_GLUCOSE_FIRST_READING_HINT="Your Glucose 1st reading (mmol/L) Here" +COM_EHEALTHPORTAL_TEST_GLUCOSE_FIRST_READING_LABEL="1st reading (mmol/L)" +COM_EHEALTHPORTAL_TEST_GLUCOSE_SECOND_READING_DESCRIPTION="Enter Glucose 2nd reading (mmol/L)" +COM_EHEALTHPORTAL_TEST_GLUCOSE_SECOND_READING_HINT="Your Glucose 2nd reading (mmol/L) Here" +COM_EHEALTHPORTAL_TEST_GLUCOSE_SECOND_READING_LABEL="2nd reading (mmol/L):" +COM_EHEALTHPORTAL_TEST_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_TEST_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_TEST_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_TEST_HAEMOGLOBIN="Haemoglobin" +COM_EHEALTHPORTAL_TEST_HAEMOGLOBIN_READING_DESCRIPTION="Enter Haemoglobin reading (g/dL)" +COM_EHEALTHPORTAL_TEST_HAEMOGLOBIN_READING_HINT="Your Haemoglobin reading (g/dL) Here" +COM_EHEALTHPORTAL_TEST_HAEMOGLOBIN_READING_LABEL="Haemoglobin reading (g/dL):" +COM_EHEALTHPORTAL_TEST_HEPATITIS_B="Hepatitis B" +COM_EHEALTHPORTAL_TEST_HEPATITIS_FIRST_READING_DESCRIPTION="1st reading" +COM_EHEALTHPORTAL_TEST_HEPATITIS_FIRST_READING_LABEL="1st reading:" +COM_EHEALTHPORTAL_TEST_HEPATITIS_SECOND_READING_DESCRIPTION="2nd reading" +COM_EHEALTHPORTAL_TEST_HEPATITIS_SECOND_READING_LABEL="2nd reading:" +COM_EHEALTHPORTAL_TEST_ID="Id" +COM_EHEALTHPORTAL_TEST_INCONCLUSIVE="Inconclusive" +COM_EHEALTHPORTAL_TEST_MALARIA="Malaria" +COM_EHEALTHPORTAL_TEST_MALARIA_FIRST_READING_DESCRIPTION="1st reading" +COM_EHEALTHPORTAL_TEST_MALARIA_FIRST_READING_LABEL="1st reading:" +COM_EHEALTHPORTAL_TEST_MALARIA_SECOND_READING_DESCRIPTION="2nd reading" +COM_EHEALTHPORTAL_TEST_MALARIA_SECOND_READING_LABEL="2nd reading:" +COM_EHEALTHPORTAL_TEST_MODIFIED_BY_DESC="The last user that modified this Test." +COM_EHEALTHPORTAL_TEST_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_TEST_MODIFIED_DATE_DESC="The date this Test was modified." +COM_EHEALTHPORTAL_TEST_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_TEST_NEGATIVE="Negative" +COM_EHEALTHPORTAL_TEST_NEW="A New Test" +COM_EHEALTHPORTAL_TEST_NORMAL="Normal" +COM_EHEALTHPORTAL_TEST_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_TEST_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_TEST_PERMISSION="Permissions" +COM_EHEALTHPORTAL_TEST_POSITIVE="Positive" +COM_EHEALTHPORTAL_TEST_PREGNANCY="Pregnancy" +COM_EHEALTHPORTAL_TEST_PREGNANCY_FIRST_READING_DESCRIPTION="1st reading" +COM_EHEALTHPORTAL_TEST_PREGNANCY_FIRST_READING_LABEL="1st reading:" +COM_EHEALTHPORTAL_TEST_PREGNANCY_SECOND_READING_DESCRIPTION="2nd reading" +COM_EHEALTHPORTAL_TEST_PREGNANCY_SECOND_READING_LABEL="2nd reading:" +COM_EHEALTHPORTAL_TEST_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_TEST_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_TEST_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_TEST_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_TEST_REFERRALS="Referrals" +COM_EHEALTHPORTAL_TEST_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_TEST_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Test to customise the alias." +COM_EHEALTHPORTAL_TEST_STATUS="Status" +COM_EHEALTHPORTAL_TEST_SYPHILIS_FIRST_READING_DESCRIPTION="1st reading" +COM_EHEALTHPORTAL_TEST_SYPHILIS_FIRST_READING_LABEL="1st reading:" +COM_EHEALTHPORTAL_TEST_SYPHILIS_SECOND_READING_DESCRIPTION="2nd reading" +COM_EHEALTHPORTAL_TEST_SYPHILIS_SECOND_READING_LABEL="2nd reading:" +COM_EHEALTHPORTAL_TEST_SYPHILLIS="Syphillis" +COM_EHEALTHPORTAL_TEST_URINE="Urine" +COM_EHEALTHPORTAL_TEST_URINE_TEST_RESULT_DESCRIPTION="Urine test result" +COM_EHEALTHPORTAL_TEST_URINE_TEST_RESULT_LABEL="Urine test result" +COM_EHEALTHPORTAL_TEST_VERSION_DESC="A count of the number of times this Test has been revised." +COM_EHEALTHPORTAL_TEST_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_TRASHED="Trashed" +COM_EHEALTHPORTAL_TUBERCULOSES="Tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_ACCESS="Tuberculoses Access" +COM_EHEALTHPORTAL_TUBERCULOSES_ACCESS_DESC="Allows the users in this group to access access tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_BATCH_OPTIONS="Batch process the selected Tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_BATCH_TIP="All changes will be applied to all selected Tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_BATCH_USE="Tuberculoses Batch Use" +COM_EHEALTHPORTAL_TUBERCULOSES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_ADD="Tuberculoses Dashboard Add" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_LIST="Tuberculoses Dashboard List" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_PATIENT="Tuberculoses Edit Patient" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_VERSION="Tuberculoses Edit Version" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_EXPORT="Tuberculoses Export" +COM_EHEALTHPORTAL_TUBERCULOSES_EXPORT_DESC="Allows the users in this group to export export tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_IMPORT="Tuberculoses Import" +COM_EHEALTHPORTAL_TUBERCULOSES_IMPORT_DESC="Allows the users in this group to import import tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_ARCHIVED="%s Tuberculoses archived." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_ARCHIVED_1="%s Tuberculosis archived." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_CHECKED_IN_0="No Tuberculosis successfully checked in." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_CHECKED_IN_1="%d Tuberculosis successfully checked in." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_CHECKED_IN_MORE="%d Tuberculoses successfully checked in." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_DELETED="%s Tuberculoses deleted." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_DELETED_1="%s Tuberculosis deleted." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_FAILED_PUBLISHING="%s Tuberculoses failed publishing." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_FAILED_PUBLISHING_1="%s Tuberculosis failed publishing." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_FEATURED="%s Tuberculoses featured." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_FEATURED_1="%s Tuberculosis featured." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_PUBLISHED="%s Tuberculoses published." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_PUBLISHED_1="%s Tuberculosis published." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_TRASHED="%s Tuberculoses trashed." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_TRASHED_1="%s Tuberculosis trashed." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_UNFEATURED="%s Tuberculoses unfeatured." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_UNFEATURED_1="%s Tuberculosis unfeatured." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_UNPUBLISHED="%s Tuberculoses unpublished." +COM_EHEALTHPORTAL_TUBERCULOSES_N_ITEMS_UNPUBLISHED_1="%s Tuberculosis unpublished." +COM_EHEALTHPORTAL_TUBERCULOSES_SUBMENU="Tuberculoses Submenu" +COM_EHEALTHPORTAL_TUBERCULOSES_SUBMENU_DESC="Allows the users in this group to submenu of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSIS="Tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSIS_BLOOD_STREAKED_SPUTUM_DESCRIPTION="Coughing blood-streaked sputum" +COM_EHEALTHPORTAL_TUBERCULOSIS_BLOOD_STREAKED_SPUTUM_LABEL="Coughing blood-streaked sputum" +COM_EHEALTHPORTAL_TUBERCULOSIS_CREATED_BY_DESC="The user that created this Tuberculosis." +COM_EHEALTHPORTAL_TUBERCULOSIS_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_TUBERCULOSIS_CREATED_DATE_DESC="The date this Tuberculosis was created." +COM_EHEALTHPORTAL_TUBERCULOSIS_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_TUBERCULOSIS_DATE_OF_TREATMENT_DESCRIPTION="Enter date/year of treatment" +COM_EHEALTHPORTAL_TUBERCULOSIS_DATE_OF_TREATMENT_LABEL="Date/year of treatment" +COM_EHEALTHPORTAL_TUBERCULOSIS_DIAGNOSED_WITH_DISEASE_DESCRIPTION="Have you been recently diagnosed with diabetes, halitosis, HIV, renal/liver disease?" +COM_EHEALTHPORTAL_TUBERCULOSIS_DIAGNOSED_WITH_DISEASE_LABEL="Have you been recently diagnosed with diabetes, halitosis, HIV, renal/liver disease?" +COM_EHEALTHPORTAL_TUBERCULOSIS_EDIT="Editing the Tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSIS_ERROR_UNIQUE_ALIAS="Another Tuberculosis has the same alias." +COM_EHEALTHPORTAL_TUBERCULOSIS_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Tuberculosis has the same alias ." +COM_EHEALTHPORTAL_TUBERCULOSIS_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_TUBERCULOSIS_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_TUBERCULOSIS_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_TUBERCULOSIS_ID="Id" +COM_EHEALTHPORTAL_TUBERCULOSIS_INCONCLUSIVE="Inconclusive" +COM_EHEALTHPORTAL_TUBERCULOSIS_MODIFIED_BY_DESC="The last user that modified this Tuberculosis." +COM_EHEALTHPORTAL_TUBERCULOSIS_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_TUBERCULOSIS_MODIFIED_DATE_DESC="The date this Tuberculosis was modified." +COM_EHEALTHPORTAL_TUBERCULOSIS_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_TUBERCULOSIS_NEGATIVE="Negative" +COM_EHEALTHPORTAL_TUBERCULOSIS_NEW="A New Tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSIS_NO="No" +COM_EHEALTHPORTAL_TUBERCULOSIS_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_TUBERCULOSIS_PAIN_IN_CHEST_DESCRIPTION="Pain in chest when breathing or coughing" +COM_EHEALTHPORTAL_TUBERCULOSIS_PAIN_IN_CHEST_LABEL="Pain in chest when breathing or coughing" +COM_EHEALTHPORTAL_TUBERCULOSIS_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_TUBERCULOSIS_PERMISSION="Permissions" +COM_EHEALTHPORTAL_TUBERCULOSIS_PERSISTENT_COUGH_DESCRIPTION="Persistent cough of > 1 month duration" +COM_EHEALTHPORTAL_TUBERCULOSIS_PERSISTENT_COUGH_LABEL="Persistent cough of > 1 month duration" +COM_EHEALTHPORTAL_TUBERCULOSIS_POSITIVE="Positive" +COM_EHEALTHPORTAL_TUBERCULOSIS_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_TUBERCULOSIS_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_TUBERCULOSIS_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_TUBERCULOSIS_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_TUBERCULOSIS_RECURRING_NIGHT_SWEATS_DESCRIPTION="Recurring night sweats during previous month" +COM_EHEALTHPORTAL_TUBERCULOSIS_RECURRING_NIGHT_SWEATS_LABEL="Recurring night sweats during previous month" +COM_EHEALTHPORTAL_TUBERCULOSIS_REFERRALS="Referrals" +COM_EHEALTHPORTAL_TUBERCULOSIS_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_TUBERCULOSIS_REFERRED_SECOND_SPUTUM_DESCRIPTION="Referred for 2nd sputum" +COM_EHEALTHPORTAL_TUBERCULOSIS_REFERRED_SECOND_SPUTUM_LABEL="Referred for 2nd sputum" +COM_EHEALTHPORTAL_TUBERCULOSIS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Tuberculosis to customise the alias." +COM_EHEALTHPORTAL_TUBERCULOSIS_SCREENING="Screening" +COM_EHEALTHPORTAL_TUBERCULOSIS_SHORTNESS_OF_BREATH_DESCRIPTION="Shortness of breath (SOB) with increasing severity and frequency" +COM_EHEALTHPORTAL_TUBERCULOSIS_SHORTNESS_OF_BREATH_LABEL="Shortness of breath (SOB) with increasing severity and frequency" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_COLLECTION="Sputum Collection" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_COLLECTION_ONE_DESCRIPTION="1st Sputum collected" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_COLLECTION_ONE_LABEL="1st Sputum collected" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_RESULT_ONE_DESCRIPTION="1st Sputum result" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_RESULT_ONE_LABEL="1st Sputum result" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_RESULT_TWO_DESCRIPTION="2nd Sputum result" +COM_EHEALTHPORTAL_TUBERCULOSIS_SPUTUM_RESULT_TWO_LABEL="2nd Sputum result" +COM_EHEALTHPORTAL_TUBERCULOSIS_STATUS="Status" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_EXPOSED_DESCRIPTION="Have you recently been exposed to: a patient(s), colleague, close relative with suspected or confirmed active TB?" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_EXPOSED_LABEL="Have you recently been exposed to: a patient(s), colleague, close relative with suspected or confirmed active TB?" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_FEVER_DESCRIPTION="Fever lasting > 1 month" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_FEVER_LABEL="Fever lasting > 1 month" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_ONE_DESCRIPTION="Enter Reason" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_ONE_HINT="Your Reason Here" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_ONE_LABEL="Reason" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_ONE_MESSAGE="Error! Please add some text here." +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_TWO_DESCRIPTION="Enter Reason" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_TWO_HINT="Your Reason Here" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_TWO_LABEL="Reason" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_REASON_TWO_MESSAGE="Error! Please add some text here." +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_TREATMENT_DESCRIPTION="Have you ever been treated for TB before?" +COM_EHEALTHPORTAL_TUBERCULOSIS_TB_TREATMENT_LABEL="Have you ever been treated for TB before?" +COM_EHEALTHPORTAL_TUBERCULOSIS_TREATING_DHC_DESCRIPTION="Enter Treating doctor/hospital/clinic" +COM_EHEALTHPORTAL_TUBERCULOSIS_TREATING_DHC_HINT="Your Treating doctor/hospital/clinic Here" +COM_EHEALTHPORTAL_TUBERCULOSIS_TREATING_DHC_LABEL="Treating doctor/hospital/clinic" +COM_EHEALTHPORTAL_TUBERCULOSIS_TREATING_DHC_MESSAGE="Error! Please add some text here." +COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN="Uncertain" +COM_EHEALTHPORTAL_TUBERCULOSIS_UNUSUAL_TIREDNESS_DESCRIPTION="Unusual tiredness or weakness lasting weeks" +COM_EHEALTHPORTAL_TUBERCULOSIS_UNUSUAL_TIREDNESS_LABEL="Unusual tiredness or weakness lasting weeks" +COM_EHEALTHPORTAL_TUBERCULOSIS_VERSION_DESC="A count of the number of times this Tuberculosis has been revised." +COM_EHEALTHPORTAL_TUBERCULOSIS_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_TUBERCULOSIS_WEIGHT_LOSS_WDIETING_DESCRIPTION="Weight loss without dieting in the previous 2-3 months" +COM_EHEALTHPORTAL_TUBERCULOSIS_WEIGHT_LOSS_WDIETING_LABEL="Weight loss without dieting in the previous 2-3 months" +COM_EHEALTHPORTAL_TUBERCULOSIS_YES="Yes" +COM_EHEALTHPORTAL_TYPE_ADMINISTRATION_PART="Administration Part" +COM_EHEALTHPORTAL_TYPE_ANTENATAL_CARE="Antenatal Care" +COM_EHEALTHPORTAL_TYPE_BREAST_CANCER="Breast Cancer" +COM_EHEALTHPORTAL_TYPE_CERVICAL_CANCER="Cervical Cancer" +COM_EHEALTHPORTAL_TYPE_CLINIC="Clinic" +COM_EHEALTHPORTAL_TYPE_COUNSELING_TYPE="Counseling Type" +COM_EHEALTHPORTAL_TYPE_DIAGNOSIS_TYPE="Diagnosis Type" +COM_EHEALTHPORTAL_TYPE_FAMILY_PLANNING="Family Planning" +COM_EHEALTHPORTAL_TYPE_FOETAL_ENGAGEMENT="Foetal Engagement" +COM_EHEALTHPORTAL_TYPE_FOETAL_LIE="Foetal Lie" +COM_EHEALTHPORTAL_TYPE_FOETAL_PRESENTATION="Foetal Presentation" +COM_EHEALTHPORTAL_TYPE_GENERAL_MEDICAL_CHECK_UP="General Medical Check Up" +COM_EHEALTHPORTAL_TYPE_HEALTH_EDUCATION="Health Education" +COM_EHEALTHPORTAL_TYPE_HEALTH_EDUCATION_TOPIC="Health Education Topic" +COM_EHEALTHPORTAL_TYPE_HIV_COUNSELING_AND_TESTING="HIV Counseling and Testing" +COM_EHEALTHPORTAL_TYPE_IMMUNISATION="Immunisation" +COM_EHEALTHPORTAL_TYPE_IMMUNISATION_TYPE="Immunisation Type" +COM_EHEALTHPORTAL_TYPE_IMMUNISATION_VACCINE_TYPE="Immunisation Vaccine Type" +COM_EHEALTHPORTAL_TYPE_MEDICATION="Medication" +COM_EHEALTHPORTAL_TYPE_NONPAY_REASON="NonPay Reason" +COM_EHEALTHPORTAL_TYPE_PAYMENT="Payment" +COM_EHEALTHPORTAL_TYPE_PAYMENT_TYPE="Payment Type" +COM_EHEALTHPORTAL_TYPE_PLANNING_TYPE="Planning Type" +COM_EHEALTHPORTAL_TYPE_PROSTATE_AND_TESTICULAR_CANCER="Prostate and Testicular Cancer" +COM_EHEALTHPORTAL_TYPE_REFERRAL="Referral" +COM_EHEALTHPORTAL_TYPE_SITE="Site" +COM_EHEALTHPORTAL_TYPE_STRENGTH="Strength" +COM_EHEALTHPORTAL_TYPE_TEST="Test" +COM_EHEALTHPORTAL_TYPE_TESTING_REASON="Testing Reason" +COM_EHEALTHPORTAL_TYPE_TUBERCULOSIS="Tuberculosis" +COM_EHEALTHPORTAL_TYPE_UNIT="Unit" +COM_EHEALTHPORTAL_TYPE_VMMC="VMMC" +COM_EHEALTHPORTAL_UNIT="Unit" +COM_EHEALTHPORTAL_UNITS="Units" +COM_EHEALTHPORTAL_UNITS_ACCESS="Units Access" +COM_EHEALTHPORTAL_UNITS_ACCESS_DESC="Allows the users in this group to access access units" +COM_EHEALTHPORTAL_UNITS_BATCH_OPTIONS="Batch process the selected Units" +COM_EHEALTHPORTAL_UNITS_BATCH_TIP="All changes will be applied to all selected Units" +COM_EHEALTHPORTAL_UNITS_BATCH_USE="Units Batch Use" +COM_EHEALTHPORTAL_UNITS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch units" +COM_EHEALTHPORTAL_UNITS_EDIT_DESCRIPTION="Units Edit Description" +COM_EHEALTHPORTAL_UNITS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of unit" +COM_EHEALTHPORTAL_UNITS_EDIT_NAME="Units Edit Name" +COM_EHEALTHPORTAL_UNITS_EDIT_NAME_DESC="Allows the users in this group to edit name of unit" +COM_EHEALTHPORTAL_UNITS_EDIT_VERSION="Units Edit Version" +COM_EHEALTHPORTAL_UNITS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version units" +COM_EHEALTHPORTAL_UNITS_EXPORT="Units Export" +COM_EHEALTHPORTAL_UNITS_EXPORT_DESC="Allows the users in this group to export export units" +COM_EHEALTHPORTAL_UNITS_IMPORT="Units Import" +COM_EHEALTHPORTAL_UNITS_IMPORT_DESC="Allows the users in this group to import import units" +COM_EHEALTHPORTAL_UNITS_N_ITEMS_ARCHIVED="%s Units archived." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_ARCHIVED_1="%s Unit archived." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_CHECKED_IN_0="No Unit successfully checked in." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_CHECKED_IN_1="%d Unit successfully checked in." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_CHECKED_IN_MORE="%d Units successfully checked in." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_DELETED="%s Units deleted." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_DELETED_1="%s Unit deleted." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_FAILED_PUBLISHING="%s Units failed publishing." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_FAILED_PUBLISHING_1="%s Unit failed publishing." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_FEATURED="%s Units featured." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_FEATURED_1="%s Unit featured." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_PUBLISHED="%s Units published." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_PUBLISHED_1="%s Unit published." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_TRASHED="%s Units trashed." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_TRASHED_1="%s Unit trashed." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_UNFEATURED="%s Units unfeatured." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_UNFEATURED_1="%s Unit unfeatured." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_UNPUBLISHED="%s Units unpublished." +COM_EHEALTHPORTAL_UNITS_N_ITEMS_UNPUBLISHED_1="%s Unit unpublished." +COM_EHEALTHPORTAL_UNITS_SUBMENU="Units Submenu" +COM_EHEALTHPORTAL_UNITS_SUBMENU_DESC="Allows the users in this group to submenu of unit" +COM_EHEALTHPORTAL_UNIT_ALIAS_HINT="Auto-generated from name" +COM_EHEALTHPORTAL_UNIT_ALIAS_LABEL="Alias" +COM_EHEALTHPORTAL_UNIT_CREATED_BY_DESC="The user that created this Unit." +COM_EHEALTHPORTAL_UNIT_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_UNIT_CREATED_DATE_DESC="The date this Unit was created." +COM_EHEALTHPORTAL_UNIT_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_UNIT_DESCRIPTION_DESCRIPTION="Add Description Here" +COM_EHEALTHPORTAL_UNIT_DESCRIPTION_HINT="Add Description Here" +COM_EHEALTHPORTAL_UNIT_DESCRIPTION_LABEL="Description" +COM_EHEALTHPORTAL_UNIT_DETAILS="Details" +COM_EHEALTHPORTAL_UNIT_EDIT="Editing the Unit" +COM_EHEALTHPORTAL_UNIT_ERROR_UNIQUE_ALIAS="Another Unit has the same alias." +COM_EHEALTHPORTAL_UNIT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Unit has the same alias ." +COM_EHEALTHPORTAL_UNIT_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_UNIT_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_UNIT_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_UNIT_ID="Id" +COM_EHEALTHPORTAL_UNIT_MODIFIED_BY_DESC="The last user that modified this Unit." +COM_EHEALTHPORTAL_UNIT_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_UNIT_MODIFIED_DATE_DESC="The date this Unit was modified." +COM_EHEALTHPORTAL_UNIT_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_UNIT_NAME_DESCRIPTION="Enter Name Here" +COM_EHEALTHPORTAL_UNIT_NAME_HINT="Name here" +COM_EHEALTHPORTAL_UNIT_NAME_LABEL="Name" +COM_EHEALTHPORTAL_UNIT_NAME_MESSAGE="Error! Please add name here." +COM_EHEALTHPORTAL_UNIT_NEW="A New Unit" +COM_EHEALTHPORTAL_UNIT_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_UNIT_PERMISSION="Permissions" +COM_EHEALTHPORTAL_UNIT_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_UNIT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Unit to customise the alias." +COM_EHEALTHPORTAL_UNIT_STATUS="Status" +COM_EHEALTHPORTAL_UNIT_VERSION_DESC="A count of the number of times this Unit has been revised." +COM_EHEALTHPORTAL_UNIT_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_USE_BATCH="Use Batch" +COM_EHEALTHPORTAL_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." +COM_EHEALTHPORTAL_VERSION="Version" +COM_EHEALTHPORTAL_VMMC="VMMC" +COM_EHEALTHPORTAL_VMMCS="VMMCs" +COM_EHEALTHPORTAL_VMMCS_ACCESS="Vmmcs Access" +COM_EHEALTHPORTAL_VMMCS_ACCESS_DESC="Allows the users in this group to access access vmmcs" +COM_EHEALTHPORTAL_VMMCS_BATCH_OPTIONS="Batch process the selected VMMCs" +COM_EHEALTHPORTAL_VMMCS_BATCH_TIP="All changes will be applied to all selected VMMCs" +COM_EHEALTHPORTAL_VMMCS_BATCH_USE="Vmmcs Batch Use" +COM_EHEALTHPORTAL_VMMCS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch vmmcs" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_ADD="Vmmcs Dashboard Add" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of vmmc" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_LIST="Vmmcs Dashboard List" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of vmmc" +COM_EHEALTHPORTAL_VMMCS_EDIT_VERSION="Vmmcs Edit Version" +COM_EHEALTHPORTAL_VMMCS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version vmmcs" +COM_EHEALTHPORTAL_VMMCS_EXPORT="Vmmcs Export" +COM_EHEALTHPORTAL_VMMCS_EXPORT_DESC="Allows the users in this group to export export vmmcs" +COM_EHEALTHPORTAL_VMMCS_IMPORT="Vmmcs Import" +COM_EHEALTHPORTAL_VMMCS_IMPORT_DESC="Allows the users in this group to import import vmmcs" +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_ARCHIVED="%s VMMCs archived." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_ARCHIVED_1="%s VMMC archived." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_CHECKED_IN_0="No VMMC successfully checked in." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_CHECKED_IN_1="%d VMMC successfully checked in." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_CHECKED_IN_MORE="%d VMMCs successfully checked in." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_DELETED="%s VMMCs deleted." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_DELETED_1="%s VMMC deleted." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_FAILED_PUBLISHING="%s VMMCs failed publishing." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_FAILED_PUBLISHING_1="%s VMMC failed publishing." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_FEATURED="%s VMMCs featured." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_FEATURED_1="%s VMMC featured." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_PUBLISHED="%s VMMCs published." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_PUBLISHED_1="%s VMMC published." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_TRASHED="%s VMMCs trashed." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_TRASHED_1="%s VMMC trashed." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_UNFEATURED="%s VMMCs unfeatured." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_UNFEATURED_1="%s VMMC unfeatured." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_UNPUBLISHED="%s VMMCs unpublished." +COM_EHEALTHPORTAL_VMMCS_N_ITEMS_UNPUBLISHED_1="%s VMMC unpublished." +COM_EHEALTHPORTAL_VMMCS_SUBMENU="Vmmcs Submenu" +COM_EHEALTHPORTAL_VMMCS_SUBMENU_DESC="Allows the users in this group to submenu of vmmc" +COM_EHEALTHPORTAL_VMMC_ARE_YOU_CIRCUMCISED_DESCRIPTION="Are you circumcised?" +COM_EHEALTHPORTAL_VMMC_ARE_YOU_CIRCUMCISED_LABEL="Are you circumcised?" +COM_EHEALTHPORTAL_VMMC_CREATED_BY_DESC="The user that created this VMMC." +COM_EHEALTHPORTAL_VMMC_CREATED_BY_LABEL="Created By" +COM_EHEALTHPORTAL_VMMC_CREATED_DATE_DESC="The date this VMMC was created." +COM_EHEALTHPORTAL_VMMC_CREATED_DATE_LABEL="Created Date" +COM_EHEALTHPORTAL_VMMC_DETAILS="Details" +COM_EHEALTHPORTAL_VMMC_EDIT="Editing the VMMC" +COM_EHEALTHPORTAL_VMMC_ERROR_UNIQUE_ALIAS="Another VMMC has the same alias." +COM_EHEALTHPORTAL_VMMC_ERROR_UNIQUE_ALIAS_TRASHED="A trashed VMMC has the same alias ." +COM_EHEALTHPORTAL_VMMC_FEMALE="Female" +COM_EHEALTHPORTAL_VMMC_GUID_DESCRIPTION="Globally Unique Identifier" +COM_EHEALTHPORTAL_VMMC_GUID_HINT="Auto Generated" +COM_EHEALTHPORTAL_VMMC_GUID_LABEL="GUID" +COM_EHEALTHPORTAL_VMMC_ID="Id" +COM_EHEALTHPORTAL_VMMC_INFO_BEN_VMCC_DESCRIPTION="Provided with information on benefits of VMMC?" +COM_EHEALTHPORTAL_VMMC_INFO_BEN_VMCC_LABEL="Provided with information on benefits of VMMC?" +COM_EHEALTHPORTAL_VMMC_INTERESTED_IN_VMMC_DESCRIPTION="Are you interested in VMMC?" +COM_EHEALTHPORTAL_VMMC_INTERESTED_IN_VMMC_LABEL="Are you interested in VMMC?" +COM_EHEALTHPORTAL_VMMC_MALE="Male" +COM_EHEALTHPORTAL_VMMC_MODIFIED_BY_DESC="The last user that modified this VMMC." +COM_EHEALTHPORTAL_VMMC_MODIFIED_BY_LABEL="Modified By" +COM_EHEALTHPORTAL_VMMC_MODIFIED_DATE_DESC="The date this VMMC was modified." +COM_EHEALTHPORTAL_VMMC_MODIFIED_DATE_LABEL="Modified Date" +COM_EHEALTHPORTAL_VMMC_NEW="A New VMMC" +COM_EHEALTHPORTAL_VMMC_NO="No" +COM_EHEALTHPORTAL_VMMC_ORDERING_LABEL="Ordering" +COM_EHEALTHPORTAL_VMMC_PARTNER_CIRCUMCISED_DESCRIPTION="Is your partner circumcised?" +COM_EHEALTHPORTAL_VMMC_PARTNER_CIRCUMCISED_LABEL="Is your partner circumcised?" +COM_EHEALTHPORTAL_VMMC_PATIENT_LABEL="Patient Name" +COM_EHEALTHPORTAL_VMMC_PERMISSION="Permissions" +COM_EHEALTHPORTAL_VMMC_PUBLISHING="Publishing" +COM_EHEALTHPORTAL_VMMC_REASON_DESCRIPTION="Add Reason Here" +COM_EHEALTHPORTAL_VMMC_REASON_HINT="Add Reason Here" +COM_EHEALTHPORTAL_VMMC_REASON_LABEL="Reason" +COM_EHEALTHPORTAL_VMMC_REFERRALS="Referrals" +COM_EHEALTHPORTAL_VMMC_REFERRAL_LABEL="Referred to" +COM_EHEALTHPORTAL_VMMC_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the VMMC to customise the alias." +COM_EHEALTHPORTAL_VMMC_STATUS="Status" +COM_EHEALTHPORTAL_VMMC_VERSION_DESC="A count of the number of times this VMMC has been revised." +COM_EHEALTHPORTAL_VMMC_VERSION_LABEL="Version" +COM_EHEALTHPORTAL_VMMC_VMMC_GENDER_DESCRIPTION="Gender" +COM_EHEALTHPORTAL_VMMC_VMMC_GENDER_LABEL="Gender" +COM_EHEALTHPORTAL_VMMC_YES="Yes" +COM_EHEALTHPORTAL_WEBSITE="Website" \ No newline at end of file diff --git a/admin/language/en-GB/en-GB.com_ehealthportal.sys.ini b/admin/language/en-GB/en-GB.com_ehealthportal.sys.ini new file mode 100644 index 0000000..4cd1520 --- /dev/null +++ b/admin/language/en-GB/en-GB.com_ehealthportal.sys.ini @@ -0,0 +1,545 @@ +COM_EHEALTHPORTAL="eHealth Portal" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_ACCESS="Administration Parts Access" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_ACCESS_DESC="Allows the users in this group to access access administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_BATCH_USE="Administration Parts Batch Use" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION="Administration Parts Edit Description" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of administration part" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_NAME="Administration Parts Edit Name" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_NAME_DESC="Allows the users in this group to edit name of administration part" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_VERSION="Administration Parts Edit Version" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EXPORT="Administration Parts Export" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_EXPORT_DESC="Allows the users in this group to export export administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_IMPORT="Administration Parts Import" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_IMPORT_DESC="Allows the users in this group to import import administration parts" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_SUBMENU="Administration Parts Submenu" +COM_EHEALTHPORTAL_ADMINISTRATION_PARTS_SUBMENU_DESC="Allows the users in this group to submenu of administration part" +COM_EHEALTHPORTAL_ANTENATAL_CARES_ACCESS="Antenatal Cares Access" +COM_EHEALTHPORTAL_ANTENATAL_CARES_ACCESS_DESC="Allows the users in this group to access access antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_BATCH_USE="Antenatal Cares Batch Use" +COM_EHEALTHPORTAL_ANTENATAL_CARES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_ADD="Antenatal Cares Dashboard Add" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of antenatal care" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_LIST="Antenatal Cares Dashboard List" +COM_EHEALTHPORTAL_ANTENATAL_CARES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of antenatal care" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EDIT_VERSION="Antenatal Cares Edit Version" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EXPORT="Antenatal Cares Export" +COM_EHEALTHPORTAL_ANTENATAL_CARES_EXPORT_DESC="Allows the users in this group to export export antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_IMPORT="Antenatal Cares Import" +COM_EHEALTHPORTAL_ANTENATAL_CARES_IMPORT_DESC="Allows the users in this group to import import antenatal cares" +COM_EHEALTHPORTAL_ANTENATAL_CARES_SUBMENU="Antenatal Cares Submenu" +COM_EHEALTHPORTAL_ANTENATAL_CARES_SUBMENU_DESC="Allows the users in this group to submenu of antenatal care" +COM_EHEALTHPORTAL_BREAST_CANCERS_ACCESS="Breast Cancers Access" +COM_EHEALTHPORTAL_BREAST_CANCERS_ACCESS_DESC="Allows the users in this group to access access breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_BATCH_USE="Breast Cancers Batch Use" +COM_EHEALTHPORTAL_BREAST_CANCERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_ADD="Breast Cancers Dashboard Add" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of breast cancer" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_LIST="Breast Cancers Dashboard List" +COM_EHEALTHPORTAL_BREAST_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of breast cancer" +COM_EHEALTHPORTAL_BREAST_CANCERS_EDIT_VERSION="Breast Cancers Edit Version" +COM_EHEALTHPORTAL_BREAST_CANCERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_EXPORT="Breast Cancers Export" +COM_EHEALTHPORTAL_BREAST_CANCERS_EXPORT_DESC="Allows the users in this group to export export breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_IMPORT="Breast Cancers Import" +COM_EHEALTHPORTAL_BREAST_CANCERS_IMPORT_DESC="Allows the users in this group to import import breast cancers" +COM_EHEALTHPORTAL_BREAST_CANCERS_SUBMENU="Breast Cancers Submenu" +COM_EHEALTHPORTAL_BREAST_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of breast cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_ACCESS="Cervical Cancers Access" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_ACCESS_DESC="Allows the users in this group to access access cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_BATCH_USE="Cervical Cancers Batch Use" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_ADD="Cervical Cancers Dashboard Add" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of cervical cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_LIST="Cervical Cancers Dashboard List" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of cervical cancer" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EDIT_VERSION="Cervical Cancers Edit Version" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EXPORT="Cervical Cancers Export" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_EXPORT_DESC="Allows the users in this group to export export cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_IMPORT="Cervical Cancers Import" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_IMPORT_DESC="Allows the users in this group to import import cervical cancers" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_SUBMENU="Cervical Cancers Submenu" +COM_EHEALTHPORTAL_CERVICAL_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of cervical cancer" +COM_EHEALTHPORTAL_CLINICS_ACCESS="Clinics Access" +COM_EHEALTHPORTAL_CLINICS_ACCESS_DESC="Allows the users in this group to access access clinics" +COM_EHEALTHPORTAL_CLINICS_BATCH_USE="Clinics Batch Use" +COM_EHEALTHPORTAL_CLINICS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch clinics" +COM_EHEALTHPORTAL_CLINICS_EDIT_CLINIC_NAME="Clinics Edit Clinic Name" +COM_EHEALTHPORTAL_CLINICS_EDIT_CLINIC_NAME_DESC="Allows the users in this group to edit clinic name of clinic" +COM_EHEALTHPORTAL_CLINICS_EDIT_DESCRIPTION="Clinics Edit Description" +COM_EHEALTHPORTAL_CLINICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of clinic" +COM_EHEALTHPORTAL_CLINICS_EDIT_VERSION="Clinics Edit Version" +COM_EHEALTHPORTAL_CLINICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version clinics" +COM_EHEALTHPORTAL_CLINICS_EXPORT="Clinics Export" +COM_EHEALTHPORTAL_CLINICS_EXPORT_DESC="Allows the users in this group to export export clinics" +COM_EHEALTHPORTAL_CLINICS_IMPORT="Clinics Import" +COM_EHEALTHPORTAL_CLINICS_IMPORT_DESC="Allows the users in this group to import import clinics" +COM_EHEALTHPORTAL_CONFIGURATION="eHealth Portal Configuration" +COM_EHEALTHPORTAL_CONFIG_ACTIVATE="Activate" +COM_EHEALTHPORTAL_CONFIG_DEACTIVATE="Deactivate" +COM_EHEALTHPORTAL_CONFIG_EXPORT_TEXT_ONLY_DESCRIPTION="This option enables the export of string/text instead of linked IDs in all admin views that have an export option." +COM_EHEALTHPORTAL_CONFIG_EXPORT_TEXT_ONLY_LABEL="Export Text Only" +COM_EHEALTHPORTAL_CONFIG_EXPORT_TEXT_ONLY_TAB_DESCRIPTION="Here are some extra option to adjust the export behavior of admin views." +COM_EHEALTHPORTAL_CONFIG_EXPORT_TEXT_ONLY_TAB_LABEL="Export Options" +COM_EHEALTHPORTAL_CONFIG_STRICT_PERMISSION_PER_FIELD_DESCRIPTION="Use strict permissions per/field in the export methods where there are fields permissions in a view." +COM_EHEALTHPORTAL_CONFIG_STRICT_PERMISSION_PER_FIELD_LABEL="Use Strict Permission per/field" +COM_EHEALTHPORTAL_COUNSELING_TYPES_ACCESS="Counseling Types Access" +COM_EHEALTHPORTAL_COUNSELING_TYPES_ACCESS_DESC="Allows the users in this group to access access counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_BATCH_USE="Counseling Types Batch Use" +COM_EHEALTHPORTAL_COUNSELING_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION="Counseling Types Edit Description" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of counseling type" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_NAME="Counseling Types Edit Name" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of counseling type" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_VERSION="Counseling Types Edit Version" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EXPORT="Counseling Types Export" +COM_EHEALTHPORTAL_COUNSELING_TYPES_EXPORT_DESC="Allows the users in this group to export export counseling types" +COM_EHEALTHPORTAL_COUNSELING_TYPES_IMPORT="Counseling Types Import" +COM_EHEALTHPORTAL_COUNSELING_TYPES_IMPORT_DESC="Allows the users in this group to import import counseling types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_ACCESS="Diagnosis Types Access" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_ACCESS_DESC="Allows the users in this group to access access diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_BATCH_USE="Diagnosis Types Batch Use" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION="Diagnosis Types Edit Description" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of diagnosis type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_NAME="Diagnosis Types Edit Name" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of diagnosis type" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_VERSION="Diagnosis Types Edit Version" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EXPORT="Diagnosis Types Export" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_EXPORT_DESC="Allows the users in this group to export export diagnosis types" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_IMPORT="Diagnosis Types Import" +COM_EHEALTHPORTAL_DIAGNOSIS_TYPES_IMPORT_DESC="Allows the users in this group to import import diagnosis types" +COM_EHEALTHPORTAL_EDIT_CREATED_BY="Edit Created By" +COM_EHEALTHPORTAL_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." +COM_EHEALTHPORTAL_EDIT_CREATED_DATE="Edit Created Date" +COM_EHEALTHPORTAL_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date." +COM_EHEALTHPORTAL_EDIT_VERSIONS="Edit Version" +COM_EHEALTHPORTAL_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." +COM_EHEALTHPORTAL_EXPORT_DATA="Export Data" +COM_EHEALTHPORTAL_EXPORT_DATA_DESC="Allows users in this group to export data." +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_ACCESS="Family Plannings Access" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_ACCESS_DESC="Allows the users in this group to access access family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_BATCH_USE="Family Plannings Batch Use" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD="Family Plannings Dashboard Add" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST="Family Plannings Dashboard List" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS="Family Plannings Edit Diagnosis" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_DIAGNOSIS_DESC="Allows the users in this group to edit diagnosis of family planning" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_VERSION="Family Plannings Edit Version" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EXPORT="Family Plannings Export" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_EXPORT_DESC="Allows the users in this group to export export family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_IMPORT="Family Plannings Import" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_IMPORT_DESC="Allows the users in this group to import import family plannings" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_SUBMENU="Family Plannings Submenu" +COM_EHEALTHPORTAL_FAMILY_PLANNINGS_SUBMENU_DESC="Allows the users in this group to submenu of family planning" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_ACCESS="Foetal Engagements Access" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_ACCESS_DESC="Allows the users in this group to access access foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_BATCH_USE="Foetal Engagements Batch Use" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION="Foetal Engagements Edit Description" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME="Foetal Engagements Edit Name" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal engagement" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION="Foetal Engagements Edit Version" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EXPORT="Foetal Engagements Export" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_EXPORT_DESC="Allows the users in this group to export export foetal engagements" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_IMPORT="Foetal Engagements Import" +COM_EHEALTHPORTAL_FOETAL_ENGAGEMENTS_IMPORT_DESC="Allows the users in this group to import import foetal engagements" +COM_EHEALTHPORTAL_FOETAL_LIES_ACCESS="Foetal Lies Access" +COM_EHEALTHPORTAL_FOETAL_LIES_ACCESS_DESC="Allows the users in this group to access access foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_BATCH_USE="Foetal Lies Batch Use" +COM_EHEALTHPORTAL_FOETAL_LIES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_DESCRIPTION="Foetal Lies Edit Description" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal lie" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_NAME="Foetal Lies Edit Name" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal lie" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_VERSION="Foetal Lies Edit Version" +COM_EHEALTHPORTAL_FOETAL_LIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_EXPORT="Foetal Lies Export" +COM_EHEALTHPORTAL_FOETAL_LIES_EXPORT_DESC="Allows the users in this group to export export foetal lies" +COM_EHEALTHPORTAL_FOETAL_LIES_IMPORT="Foetal Lies Import" +COM_EHEALTHPORTAL_FOETAL_LIES_IMPORT_DESC="Allows the users in this group to import import foetal lies" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_ACCESS="Foetal Presentations Access" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_ACCESS_DESC="Allows the users in this group to access access foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_BATCH_USE="Foetal Presentations Batch Use" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION="Foetal Presentations Edit Description" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of foetal presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_NAME="Foetal Presentations Edit Name" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of foetal presentation" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION="Foetal Presentations Edit Version" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EXPORT="Foetal Presentations Export" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_EXPORT_DESC="Allows the users in this group to export export foetal presentations" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_IMPORT="Foetal Presentations Import" +COM_EHEALTHPORTAL_FOETAL_PRESENTATIONS_IMPORT_DESC="Allows the users in this group to import import foetal presentations" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS="General Medical Check Ups Access" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_ACCESS_DESC="Allows the users in this group to access access general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE="General Medical Check Ups Batch Use" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD="General Medical Check Ups Dashboard Add" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST="General Medical Check Ups Dashboard List" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT="General Medical Check Ups Edit Patient" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of general medical check up" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION="General Medical Check Ups Edit Version" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT="General Medical Check Ups Export" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_EXPORT_DESC="Allows the users in this group to export export general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT="General Medical Check Ups Import" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_IMPORT_DESC="Allows the users in this group to import import general medical check ups" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU="General Medical Check Ups Submenu" +COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UPS_SUBMENU_DESC="Allows the users in this group to submenu of general medical check up" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_ACCESS="Health Educations Access" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_ACCESS_DESC="Allows the users in this group to access access health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_BATCH_USE="Health Educations Batch Use" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD="Health Educations Dashboard Add" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST="Health Educations Dashboard List" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC="Health Educations Edit Health Education Topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_HEALTH_EDUCATION_TOPIC_DESC="Allows the users in this group to edit health education topic of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_VERSION="Health Educations Edit Version" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EXPORT="Health Educations Export" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_EXPORT_DESC="Allows the users in this group to export export health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_IMPORT="Health Educations Import" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_IMPORT_DESC="Allows the users in this group to import import health educations" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_SUBMENU="Health Educations Submenu" +COM_EHEALTHPORTAL_HEALTH_EDUCATIONS_SUBMENU_DESC="Allows the users in this group to submenu of health education" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_ACCESS="Health Education Topics Access" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_ACCESS_DESC="Allows the users in this group to access access health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE="Health Education Topics Batch Use" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION="Health Education Topics Edit Description" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of health education topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME="Health Education Topics Edit Name" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_NAME_DESC="Allows the users in this group to edit name of health education topic" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION="Health Education Topics Edit Version" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EXPORT="Health Education Topics Export" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_EXPORT_DESC="Allows the users in this group to export export health education topics" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_IMPORT="Health Education Topics Import" +COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPICS_IMPORT_DESC="Allows the users in this group to import import health education topics" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS="Hiv Counselings And Testings Access" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_ACCESS_DESC="Allows the users in this group to access access hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE="Hiv Counselings And Testings Batch Use" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD="Hiv Counselings And Testings Dashboard Add" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of hiv counseling and testing" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST="Hiv Counselings And Testings Dashboard List" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of hiv counseling and testing" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION="Hiv Counselings And Testings Edit Version" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT="Hiv Counselings And Testings Export" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_EXPORT_DESC="Allows the users in this group to export export hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT="Hiv Counselings And Testings Import" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_IMPORT_DESC="Allows the users in this group to import import hiv counselings and testings" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU="Hiv Counselings And Testings Submenu" +COM_EHEALTHPORTAL_HIV_COUNSELINGS_AND_TESTINGS_SUBMENU_DESC="Allows the users in this group to submenu of hiv counseling and testing" +COM_EHEALTHPORTAL_IMMUNISATIONS_ACCESS="Immunisations Access" +COM_EHEALTHPORTAL_IMMUNISATIONS_ACCESS_DESC="Allows the users in this group to access access immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_BATCH_USE="Immunisations Batch Use" +COM_EHEALTHPORTAL_IMMUNISATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_ADD="Immunisations Dashboard Add" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_LIST="Immunisations Dashboard List" +COM_EHEALTHPORTAL_IMMUNISATIONS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_PATIENT="Immunisations Edit Patient" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of immunisation" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_VERSION="Immunisations Edit Version" +COM_EHEALTHPORTAL_IMMUNISATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_EXPORT="Immunisations Export" +COM_EHEALTHPORTAL_IMMUNISATIONS_EXPORT_DESC="Allows the users in this group to export export immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_IMPORT="Immunisations Import" +COM_EHEALTHPORTAL_IMMUNISATIONS_IMPORT_DESC="Allows the users in this group to import import immunisations" +COM_EHEALTHPORTAL_IMMUNISATIONS_SUBMENU="Immunisations Submenu" +COM_EHEALTHPORTAL_IMMUNISATIONS_SUBMENU_DESC="Allows the users in this group to submenu of immunisation" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_ACCESS="Immunisation Types Access" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_BATCH_USE="Immunisation Types Batch Use" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION="Immunisation Types Edit Description" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_NAME="Immunisation Types Edit Name" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_VERSION="Immunisation Types Edit Version" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EXPORT="Immunisation Types Export" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_IMPORT="Immunisation Types Import" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation types" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_SUBMENU="Immunisation Types Submenu" +COM_EHEALTHPORTAL_IMMUNISATION_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of immunisation type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS="Immunisation Vaccine Types Access" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_ACCESS_DESC="Allows the users in this group to access access immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE="Immunisation Vaccine Types Batch Use" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION="Immunisation Vaccine Types Edit Description" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of immunisation vaccine type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME="Immunisation Vaccine Types Edit Name" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of immunisation vaccine type" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION="Immunisation Vaccine Types Edit Version" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT="Immunisation Vaccine Types Export" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_EXPORT_DESC="Allows the users in this group to export export immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT="Immunisation Vaccine Types Import" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_IMPORT_DESC="Allows the users in this group to import import immunisation vaccine types" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU="Immunisation Vaccine Types Submenu" +COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of immunisation vaccine type" +COM_EHEALTHPORTAL_IMPORT_DATA="Import Data" +COM_EHEALTHPORTAL_IMPORT_DATA_DESC="Allows users in this group to import data." +COM_EHEALTHPORTAL_MEDICATIONS_ACCESS="Medications Access" +COM_EHEALTHPORTAL_MEDICATIONS_ACCESS_DESC="Allows the users in this group to access access medications" +COM_EHEALTHPORTAL_MEDICATIONS_BATCH_USE="Medications Batch Use" +COM_EHEALTHPORTAL_MEDICATIONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch medications" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_DESCRIPTION="Medications Edit Description" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of medication" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_NAME="Medications Edit Name" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_NAME_DESC="Allows the users in this group to edit name of medication" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_VERSION="Medications Edit Version" +COM_EHEALTHPORTAL_MEDICATIONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version medications" +COM_EHEALTHPORTAL_MEDICATIONS_EXPORT="Medications Export" +COM_EHEALTHPORTAL_MEDICATIONS_EXPORT_DESC="Allows the users in this group to export export medications" +COM_EHEALTHPORTAL_MEDICATIONS_IMPORT="Medications Import" +COM_EHEALTHPORTAL_MEDICATIONS_IMPORT_DESC="Allows the users in this group to import import medications" +COM_EHEALTHPORTAL_MEDICATIONS_SUBMENU="Medications Submenu" +COM_EHEALTHPORTAL_MEDICATIONS_SUBMENU_DESC="Allows the users in this group to submenu of medication" +COM_EHEALTHPORTAL_MENU="» eHealth Portal" +COM_EHEALTHPORTAL_MENU_ANTENATAL_CARES="Antenatal Cares" +COM_EHEALTHPORTAL_MENU_BREAST_CANCERS="Breast Cancers" +COM_EHEALTHPORTAL_MENU_CERVICAL_CANCERS="Cervical Cancers" +COM_EHEALTHPORTAL_MENU_FAMILY_PLANNINGS="Family Plannings" +COM_EHEALTHPORTAL_MENU_GENERAL_MEDICAL_CHECK_UPS="General Medical Check Ups" +COM_EHEALTHPORTAL_MENU_HEALTH_EDUCATIONS="Health Educations" +COM_EHEALTHPORTAL_MENU_HIV_COUNSELINGS_AND_TESTINGS="HIV Counselings and Testings" +COM_EHEALTHPORTAL_MENU_IMMUNISATIONS="Immunisations" +COM_EHEALTHPORTAL_MENU_PATIENT_QUEUE="Patient Queue" +COM_EHEALTHPORTAL_MENU_PAYMENTS="Payments" +COM_EHEALTHPORTAL_MENU_PROSTATE_AND_TESTICULAR_CANCERS="Prostate and Testicular Cancers" +COM_EHEALTHPORTAL_MENU_TESTS="Tests" +COM_EHEALTHPORTAL_MENU_TUBERCULOSES="Tuberculoses" +COM_EHEALTHPORTAL_MENU_VMMCS="VMMCs" +COM_EHEALTHPORTAL_NONPAY_REASONS_ACCESS="Nonpay Reasons Access" +COM_EHEALTHPORTAL_NONPAY_REASONS_ACCESS_DESC="Allows the users in this group to access access nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_BATCH_USE="Nonpay Reasons Batch Use" +COM_EHEALTHPORTAL_NONPAY_REASONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_DESCRIPTION="Nonpay Reasons Edit Description" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of nonpay reason" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_NAME="Nonpay Reasons Edit Name" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of nonpay reason" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_VERSION="Nonpay Reasons Edit Version" +COM_EHEALTHPORTAL_NONPAY_REASONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_EXPORT="Nonpay Reasons Export" +COM_EHEALTHPORTAL_NONPAY_REASONS_EXPORT_DESC="Allows the users in this group to export export nonpay reasons" +COM_EHEALTHPORTAL_NONPAY_REASONS_IMPORT="Nonpay Reasons Import" +COM_EHEALTHPORTAL_NONPAY_REASONS_IMPORT_DESC="Allows the users in this group to import import nonpay reasons" +COM_EHEALTHPORTAL_PATIENT_QUEUE_ACCESS="Patient Queue Access" +COM_EHEALTHPORTAL_PATIENT_QUEUE_ACCESS_DESC="Allows the users in this group to access patient queue." +COM_EHEALTHPORTAL_PATIENT_QUEUE_DASHBOARD_LIST="Patient Queue Dashboard List" +COM_EHEALTHPORTAL_PATIENT_QUEUE_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Patient Queue" +COM_EHEALTHPORTAL_PATIENT_QUEUE_SUBMENU="Patient Queue Submenu" +COM_EHEALTHPORTAL_PATIENT_QUEUE_SUBMENU_DESC="Allows the users in this group to submenu of Patient Queue" +COM_EHEALTHPORTAL_PAYMENTS_ACCESS="Payments Access" +COM_EHEALTHPORTAL_PAYMENTS_ACCESS_DESC="Allows the users in this group to access access payments" +COM_EHEALTHPORTAL_PAYMENTS_BATCH_USE="Payments Batch Use" +COM_EHEALTHPORTAL_PAYMENTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch payments" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_ADD="Payments Dashboard Add" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of payment" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_LIST="Payments Dashboard List" +COM_EHEALTHPORTAL_PAYMENTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of payment" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_PATIENT="Payments Edit Patient" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of payment" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_VERSION="Payments Edit Version" +COM_EHEALTHPORTAL_PAYMENTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version payments" +COM_EHEALTHPORTAL_PAYMENTS_EXPORT="Payments Export" +COM_EHEALTHPORTAL_PAYMENTS_EXPORT_DESC="Allows the users in this group to export export payments" +COM_EHEALTHPORTAL_PAYMENTS_IMPORT="Payments Import" +COM_EHEALTHPORTAL_PAYMENTS_IMPORT_DESC="Allows the users in this group to import import payments" +COM_EHEALTHPORTAL_PAYMENTS_SUBMENU="Payments Submenu" +COM_EHEALTHPORTAL_PAYMENTS_SUBMENU_DESC="Allows the users in this group to submenu of payment" +COM_EHEALTHPORTAL_PAYMENT_TYPES_ACCESS="Payment Types Access" +COM_EHEALTHPORTAL_PAYMENT_TYPES_ACCESS_DESC="Allows the users in this group to access access payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_BATCH_USE="Payment Types Batch Use" +COM_EHEALTHPORTAL_PAYMENT_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION="Payment Types Edit Description" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of payment type" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_NAME="Payment Types Edit Name" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of payment type" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_VERSION="Payment Types Edit Version" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EXPORT="Payment Types Export" +COM_EHEALTHPORTAL_PAYMENT_TYPES_EXPORT_DESC="Allows the users in this group to export export payment types" +COM_EHEALTHPORTAL_PAYMENT_TYPES_IMPORT="Payment Types Import" +COM_EHEALTHPORTAL_PAYMENT_TYPES_IMPORT_DESC="Allows the users in this group to import import payment types" +COM_EHEALTHPORTAL_PLANNING_TYPES_ACCESS="Planning Types Access" +COM_EHEALTHPORTAL_PLANNING_TYPES_ACCESS_DESC="Allows the users in this group to access access planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_BATCH_USE="Planning Types Batch Use" +COM_EHEALTHPORTAL_PLANNING_TYPES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_DESCRIPTION="Planning Types Edit Description" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of planning type" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_NAME="Planning Types Edit Name" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_NAME_DESC="Allows the users in this group to edit name of planning type" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_VERSION="Planning Types Edit Version" +COM_EHEALTHPORTAL_PLANNING_TYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_EXPORT="Planning Types Export" +COM_EHEALTHPORTAL_PLANNING_TYPES_EXPORT_DESC="Allows the users in this group to export export planning types" +COM_EHEALTHPORTAL_PLANNING_TYPES_IMPORT="Planning Types Import" +COM_EHEALTHPORTAL_PLANNING_TYPES_IMPORT_DESC="Allows the users in this group to import import planning types" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS="Prostate And Testicular Cancers Access" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_ACCESS_DESC="Allows the users in this group to access access prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE="Prostate And Testicular Cancers Batch Use" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD="Prostate And Testicular Cancers Dashboard Add" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of prostate and testicular cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST="Prostate And Testicular Cancers Dashboard List" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of prostate and testicular cancer" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION="Prostate And Testicular Cancers Edit Version" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT="Prostate And Testicular Cancers Export" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_EXPORT_DESC="Allows the users in this group to export export prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT="Prostate And Testicular Cancers Import" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_IMPORT_DESC="Allows the users in this group to import import prostate and testicular cancers" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU="Prostate And Testicular Cancers Submenu" +COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCERS_SUBMENU_DESC="Allows the users in this group to submenu of prostate and testicular cancer" +COM_EHEALTHPORTAL_REFERRALS_ACCESS="Referrals Access" +COM_EHEALTHPORTAL_REFERRALS_ACCESS_DESC="Allows the users in this group to access access referrals" +COM_EHEALTHPORTAL_REFERRALS_BATCH_USE="Referrals Batch Use" +COM_EHEALTHPORTAL_REFERRALS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch referrals" +COM_EHEALTHPORTAL_REFERRALS_EDIT_DESCRIPTION="Referrals Edit Description" +COM_EHEALTHPORTAL_REFERRALS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of referral" +COM_EHEALTHPORTAL_REFERRALS_EDIT_NAME="Referrals Edit Name" +COM_EHEALTHPORTAL_REFERRALS_EDIT_NAME_DESC="Allows the users in this group to edit name of referral" +COM_EHEALTHPORTAL_REFERRALS_EDIT_VERSION="Referrals Edit Version" +COM_EHEALTHPORTAL_REFERRALS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version referrals" +COM_EHEALTHPORTAL_REFERRALS_EXPORT="Referrals Export" +COM_EHEALTHPORTAL_REFERRALS_EXPORT_DESC="Allows the users in this group to export export referrals" +COM_EHEALTHPORTAL_REFERRALS_IMPORT="Referrals Import" +COM_EHEALTHPORTAL_REFERRALS_IMPORT_DESC="Allows the users in this group to import import referrals" +COM_EHEALTHPORTAL_REFERRALS_SUBMENU="Referrals Submenu" +COM_EHEALTHPORTAL_REFERRALS_SUBMENU_DESC="Allows the users in this group to submenu of referral" +COM_EHEALTHPORTAL_SITES_ACCESS="Sites Access" +COM_EHEALTHPORTAL_SITES_ACCESS_DESC="Allows the users in this group to access access sites" +COM_EHEALTHPORTAL_SITES_BATCH_USE="Sites Batch Use" +COM_EHEALTHPORTAL_SITES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch sites" +COM_EHEALTHPORTAL_SITES_EDIT_DESCRIPTION="Sites Edit Description" +COM_EHEALTHPORTAL_SITES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of site" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_NAME="Sites Edit Site Name" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_NAME_DESC="Allows the users in this group to edit site name of site" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_REGION="Sites Edit Site Region" +COM_EHEALTHPORTAL_SITES_EDIT_SITE_REGION_DESC="Allows the users in this group to edit site region of site" +COM_EHEALTHPORTAL_SITES_EDIT_VERSION="Sites Edit Version" +COM_EHEALTHPORTAL_SITES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version sites" +COM_EHEALTHPORTAL_SITES_EXPORT="Sites Export" +COM_EHEALTHPORTAL_SITES_EXPORT_DESC="Allows the users in this group to export export sites" +COM_EHEALTHPORTAL_SITES_IMPORT="Sites Import" +COM_EHEALTHPORTAL_SITES_IMPORT_DESC="Allows the users in this group to import import sites" +COM_EHEALTHPORTAL_STRENGTHS_ACCESS="Strengths Access" +COM_EHEALTHPORTAL_STRENGTHS_ACCESS_DESC="Allows the users in this group to access access strengths" +COM_EHEALTHPORTAL_STRENGTHS_BATCH_USE="Strengths Batch Use" +COM_EHEALTHPORTAL_STRENGTHS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch strengths" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_DESCRIPTION="Strengths Edit Description" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of strength" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_NAME="Strengths Edit Name" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_NAME_DESC="Allows the users in this group to edit name of strength" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_VERSION="Strengths Edit Version" +COM_EHEALTHPORTAL_STRENGTHS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version strengths" +COM_EHEALTHPORTAL_STRENGTHS_EXPORT="Strengths Export" +COM_EHEALTHPORTAL_STRENGTHS_EXPORT_DESC="Allows the users in this group to export export strengths" +COM_EHEALTHPORTAL_STRENGTHS_IMPORT="Strengths Import" +COM_EHEALTHPORTAL_STRENGTHS_IMPORT_DESC="Allows the users in this group to import import strengths" +COM_EHEALTHPORTAL_STRENGTHS_SUBMENU="Strengths Submenu" +COM_EHEALTHPORTAL_STRENGTHS_SUBMENU_DESC="Allows the users in this group to submenu of strength" +COM_EHEALTHPORTAL_TESTING_REASONS_ACCESS="Testing Reasons Access" +COM_EHEALTHPORTAL_TESTING_REASONS_ACCESS_DESC="Allows the users in this group to access access testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_BATCH_USE="Testing Reasons Batch Use" +COM_EHEALTHPORTAL_TESTING_REASONS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_DESCRIPTION="Testing Reasons Edit Description" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of testing reason" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_NAME="Testing Reasons Edit Name" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_NAME_DESC="Allows the users in this group to edit name of testing reason" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_VERSION="Testing Reasons Edit Version" +COM_EHEALTHPORTAL_TESTING_REASONS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_EXPORT="Testing Reasons Export" +COM_EHEALTHPORTAL_TESTING_REASONS_EXPORT_DESC="Allows the users in this group to export export testing reasons" +COM_EHEALTHPORTAL_TESTING_REASONS_IMPORT="Testing Reasons Import" +COM_EHEALTHPORTAL_TESTING_REASONS_IMPORT_DESC="Allows the users in this group to import import testing reasons" +COM_EHEALTHPORTAL_TESTS_ACCESS="Tests Access" +COM_EHEALTHPORTAL_TESTS_ACCESS_DESC="Allows the users in this group to access access tests" +COM_EHEALTHPORTAL_TESTS_BATCH_USE="Tests Batch Use" +COM_EHEALTHPORTAL_TESTS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch tests" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_ADD="Tests Dashboard Add" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of test" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_LIST="Tests Dashboard List" +COM_EHEALTHPORTAL_TESTS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of test" +COM_EHEALTHPORTAL_TESTS_EDIT_VERSION="Tests Edit Version" +COM_EHEALTHPORTAL_TESTS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version tests" +COM_EHEALTHPORTAL_TESTS_EXPORT="Tests Export" +COM_EHEALTHPORTAL_TESTS_EXPORT_DESC="Allows the users in this group to export export tests" +COM_EHEALTHPORTAL_TESTS_IMPORT="Tests Import" +COM_EHEALTHPORTAL_TESTS_IMPORT_DESC="Allows the users in this group to import import tests" +COM_EHEALTHPORTAL_TESTS_SUBMENU="Tests Submenu" +COM_EHEALTHPORTAL_TESTS_SUBMENU_DESC="Allows the users in this group to submenu of test" +COM_EHEALTHPORTAL_TUBERCULOSES_ACCESS="Tuberculoses Access" +COM_EHEALTHPORTAL_TUBERCULOSES_ACCESS_DESC="Allows the users in this group to access access tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_BATCH_USE="Tuberculoses Batch Use" +COM_EHEALTHPORTAL_TUBERCULOSES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_ADD="Tuberculoses Dashboard Add" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_LIST="Tuberculoses Dashboard List" +COM_EHEALTHPORTAL_TUBERCULOSES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_PATIENT="Tuberculoses Edit Patient" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_PATIENT_DESC="Allows the users in this group to edit patient of tuberculosis" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_VERSION="Tuberculoses Edit Version" +COM_EHEALTHPORTAL_TUBERCULOSES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_EXPORT="Tuberculoses Export" +COM_EHEALTHPORTAL_TUBERCULOSES_EXPORT_DESC="Allows the users in this group to export export tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_IMPORT="Tuberculoses Import" +COM_EHEALTHPORTAL_TUBERCULOSES_IMPORT_DESC="Allows the users in this group to import import tuberculoses" +COM_EHEALTHPORTAL_TUBERCULOSES_SUBMENU="Tuberculoses Submenu" +COM_EHEALTHPORTAL_TUBERCULOSES_SUBMENU_DESC="Allows the users in this group to submenu of tuberculosis" +COM_EHEALTHPORTAL_UNITS_ACCESS="Units Access" +COM_EHEALTHPORTAL_UNITS_ACCESS_DESC="Allows the users in this group to access access units" +COM_EHEALTHPORTAL_UNITS_BATCH_USE="Units Batch Use" +COM_EHEALTHPORTAL_UNITS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch units" +COM_EHEALTHPORTAL_UNITS_EDIT_DESCRIPTION="Units Edit Description" +COM_EHEALTHPORTAL_UNITS_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of unit" +COM_EHEALTHPORTAL_UNITS_EDIT_NAME="Units Edit Name" +COM_EHEALTHPORTAL_UNITS_EDIT_NAME_DESC="Allows the users in this group to edit name of unit" +COM_EHEALTHPORTAL_UNITS_EDIT_VERSION="Units Edit Version" +COM_EHEALTHPORTAL_UNITS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version units" +COM_EHEALTHPORTAL_UNITS_EXPORT="Units Export" +COM_EHEALTHPORTAL_UNITS_EXPORT_DESC="Allows the users in this group to export export units" +COM_EHEALTHPORTAL_UNITS_IMPORT="Units Import" +COM_EHEALTHPORTAL_UNITS_IMPORT_DESC="Allows the users in this group to import import units" +COM_EHEALTHPORTAL_UNITS_SUBMENU="Units Submenu" +COM_EHEALTHPORTAL_UNITS_SUBMENU_DESC="Allows the users in this group to submenu of unit" +COM_EHEALTHPORTAL_USE_BATCH="Use Batch" +COM_EHEALTHPORTAL_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." +COM_EHEALTHPORTAL_VMMCS_ACCESS="Vmmcs Access" +COM_EHEALTHPORTAL_VMMCS_ACCESS_DESC="Allows the users in this group to access access vmmcs" +COM_EHEALTHPORTAL_VMMCS_BATCH_USE="Vmmcs Batch Use" +COM_EHEALTHPORTAL_VMMCS_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch vmmcs" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_ADD="Vmmcs Dashboard Add" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of vmmc" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_LIST="Vmmcs Dashboard List" +COM_EHEALTHPORTAL_VMMCS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of vmmc" +COM_EHEALTHPORTAL_VMMCS_EDIT_VERSION="Vmmcs Edit Version" +COM_EHEALTHPORTAL_VMMCS_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version vmmcs" +COM_EHEALTHPORTAL_VMMCS_EXPORT="Vmmcs Export" +COM_EHEALTHPORTAL_VMMCS_EXPORT_DESC="Allows the users in this group to export export vmmcs" +COM_EHEALTHPORTAL_VMMCS_IMPORT="Vmmcs Import" +COM_EHEALTHPORTAL_VMMCS_IMPORT_DESC="Allows the users in this group to import import vmmcs" +COM_EHEALTHPORTAL_VMMCS_SUBMENU="Vmmcs Submenu" +COM_EHEALTHPORTAL_VMMCS_SUBMENU_DESC="Allows the users in this group to submenu of vmmc" \ No newline at end of file diff --git a/admin/layouts/administration_part/details_above.php b/admin/layouts/administration_part/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/administration_part/details_above.php +++ b/admin/layouts/administration_part/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/administration_part/details_fullwidth.php b/admin/layouts/administration_part/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/administration_part/details_fullwidth.php +++ b/admin/layouts/administration_part/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/administration_part/publishing.php b/admin/layouts/administration_part/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/administration_part/publishing.php +++ b/admin/layouts/administration_part/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/administration_part/publlshing.php b/admin/layouts/administration_part/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/administration_part/publlshing.php +++ b/admin/layouts/administration_part/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/administration_part/vaccines_fullwidth.php b/admin/layouts/administration_part/vaccines_fullwidth.php index c0c14da..536caf2 100644 --- a/admin/layouts/administration_part/vaccines_fullwidth.php +++ b/admin/layouts/administration_part/vaccines_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vaccines_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,22 +26,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; +use VDM\Joomla\Utilities\StringHelper; + // set the defaults $items = $displayData->vvyvaccines; -$user = JFactory::getUser(); +$user = Factory::getUser(); $id = $displayData->item->id; // set the edit URL -$edit = "index.php?option=com_ehealth_portal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit"; +$edit = "index.php?option=com_ehealthportal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit"; // set a return value -$return = ($id) ? "index.php?option=com_ehealth_portal&view=administration_part&layout=edit&id=" . $id : ""; +$return = ($id) ? "index.php?option=com_ehealthportal&view=administration_part&layout=edit&id=" . $id : ""; // check for a return value -$jinput = JFactory::getApplication()->input; +$jinput = Factory::getApplication()->input; if ($_return = $jinput->get('return', null, 'base64')) { $return .= "&return=" . $_return; } // check if return value was set -if (Ehealth_portalHelper::checkString($return)) +if (StringHelper::check($return)) { // set the referral values $ref = ($id) ? "&ref=administration_part&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return)); @@ -51,38 +56,38 @@ else $ref = ($id) ? "&ref=administration_part&refid=" . $id : ""; } // set the create new URL -$new = "index.php?option=com_ehealth_portal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit" . $ref; +$new = "index.php?option=com_ehealthportal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit" . $ref; // set the create new and close URL -$close_new = "index.php?option=com_ehealth_portal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit"; +$close_new = "index.php?option=com_ehealthportal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit"; // load the action object -$can = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); +$can = EhealthportalHelper::getActions('immunisation_vaccine_type'); ?>
get('core.create')): ?>
- - + +


- - + +
- - - - - @@ -90,15 +95,15 @@ $can = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); $item): ?> authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = JFactory::getUser($item->checked_out); - $canDo = Ehealth_portalHelper::getActions('immunisation_vaccine_type',$item,'immunisation_vaccine_types'); + $userChkOut = Factory::getUser($item->checked_out); + $canDo = EhealthportalHelper::getActions('immunisation_vaccine_type',$item,'immunisation_vaccine_types'); ?> published == 1): ?> published == 0): ?> published == 2): ?> published == -2): ?> @@ -141,10 +146,17 @@ $can = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); + + + + +
- + + - + + - + + - + + - + +
get('core.edit')): ?> escape($item->name); ?> checked_out): ?> - name, $item->checked_out_time, 'immunisation_vaccine_types.', $canCheckin); ?> + name, $item->checked_out_time, 'immunisation_vaccine_types.', $canCheckin); ?> escape($item->name); ?> @@ -112,26 +117,26 @@ $can = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); - - + + - - + + - - + + - - + +
+ +
- +
diff --git a/admin/layouts/antenatal_care/abdominal_examination_left.php b/admin/layouts/antenatal_care/abdominal_examination_left.php index b5c6ba7..a06513a 100644 --- a/admin/layouts/antenatal_care/abdominal_examination_left.php +++ b/admin/layouts/antenatal_care/abdominal_examination_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage abdominal_examination_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'foetal_heart_rate' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/antenatal_care/pregnancy_history_above.php b/admin/layouts/antenatal_care/pregnancy_history_above.php index 88c640b..1297fab 100644 --- a/admin/layouts/antenatal_care/pregnancy_history_above.php +++ b/admin/layouts/antenatal_care/pregnancy_history_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage pregnancy_history_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/antenatal_care/pregnancy_history_fullwidth.php b/admin/layouts/antenatal_care/pregnancy_history_fullwidth.php index b0e442f..20d6488 100644 --- a/admin/layouts/antenatal_care/pregnancy_history_fullwidth.php +++ b/admin/layouts/antenatal_care/pregnancy_history_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage pregnancy_history_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'foetal_movements' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/antenatal_care/pregnancy_history_left.php b/admin/layouts/antenatal_care/pregnancy_history_left.php index 1437b3d..81d199d 100644 --- a/admin/layouts/antenatal_care/pregnancy_history_left.php +++ b/admin/layouts/antenatal_care/pregnancy_history_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage pregnancy_history_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'still_births' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/antenatal_care/pregnancy_history_right.php b/admin/layouts/antenatal_care/pregnancy_history_right.php index baedd79..d080b21 100644 --- a/admin/layouts/antenatal_care/pregnancy_history_right.php +++ b/admin/layouts/antenatal_care/pregnancy_history_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage pregnancy_history_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -45,7 +45,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'last_menstrual_period' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/antenatal_care/publishing.php b/admin/layouts/antenatal_care/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/antenatal_care/publishing.php +++ b/admin/layouts/antenatal_care/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/antenatal_care/publlshing.php b/admin/layouts/antenatal_care/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/antenatal_care/publlshing.php +++ b/admin/layouts/antenatal_care/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index ef144cb..2b97e1b 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage batchselection.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,6 +26,7 @@ // No direct access to this file defined('JPATH_BASE') or die; +use Joomla\CMS\Language\Text; JHtmlBehavior::core(); $divWrapper = range(1,120,2); $counter = 0; @@ -33,8 +34,8 @@ $counter = 0; ListSelection) : ?>
ListSelection as $ListSelection) : ?> -
-
+
+
-
+
- +
- - -
+ + +
\ No newline at end of file diff --git a/admin/layouts/breast_cancer/breast_examination_left.php b/admin/layouts/breast_cancer/breast_examination_left.php index 4d4fc43..f26a4c4 100644 --- a/admin/layouts/breast_cancer/breast_examination_left.php +++ b/admin/layouts/breast_cancer/breast_examination_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_examination_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'txt_bc_dimpling' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/breast_examination_right.php b/admin/layouts/breast_cancer/breast_examination_right.php index f5d9680..fbd6c08 100644 --- a/admin/layouts/breast_cancer/breast_examination_right.php +++ b/admin/layouts/breast_cancer/breast_examination_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_examination_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'txt_bc_breast_shape' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/publishing.php b/admin/layouts/breast_cancer/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/breast_cancer/publishing.php +++ b/admin/layouts/breast_cancer/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/publlshing.php b/admin/layouts/breast_cancer/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/breast_cancer/publlshing.php +++ b/admin/layouts/breast_cancer/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/referrals_left.php b/admin/layouts/breast_cancer/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/breast_cancer/referrals_left.php +++ b/admin/layouts/breast_cancer/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/referrals_right.php b/admin/layouts/breast_cancer/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/breast_cancer/referrals_right.php +++ b/admin/layouts/breast_cancer/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/risk_assesment_above.php b/admin/layouts/breast_cancer/risk_assesment_above.php index 0f2a95f..2c2b1c8 100644 --- a/admin/layouts/breast_cancer/risk_assesment_above.php +++ b/admin/layouts/breast_cancer/risk_assesment_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage risk_assesment_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/breast_cancer/risk_assesment_left.php b/admin/layouts/breast_cancer/risk_assesment_left.php index c8d29c7..8389ec0 100644 --- a/admin/layouts/breast_cancer/risk_assesment_left.php +++ b/admin/layouts/breast_cancer/risk_assesment_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage risk_assesment_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -51,7 +51,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'bc_overweight' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/cervical_examination_left.php b/admin/layouts/cervical_cancer/cervical_examination_left.php index c89696c..4056335 100644 --- a/admin/layouts/cervical_cancer/cervical_examination_left.php +++ b/admin/layouts/cervical_cancer/cervical_examination_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_examination_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -45,7 +45,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'cc_result' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/publishing.php b/admin/layouts/cervical_cancer/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/cervical_cancer/publishing.php +++ b/admin/layouts/cervical_cancer/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/publlshing.php b/admin/layouts/cervical_cancer/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/cervical_cancer/publlshing.php +++ b/admin/layouts/cervical_cancer/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/referrals_left.php b/admin/layouts/cervical_cancer/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/cervical_cancer/referrals_left.php +++ b/admin/layouts/cervical_cancer/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/referrals_right.php b/admin/layouts/cervical_cancer/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/cervical_cancer/referrals_right.php +++ b/admin/layouts/cervical_cancer/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/risk_assesment_above.php b/admin/layouts/cervical_cancer/risk_assesment_above.php index 0f2a95f..2c2b1c8 100644 --- a/admin/layouts/cervical_cancer/risk_assesment_above.php +++ b/admin/layouts/cervical_cancer/risk_assesment_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage risk_assesment_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/risk_assesment_left.php b/admin/layouts/cervical_cancer/risk_assesment_left.php index 7c906ce..6d69d06 100644 --- a/admin/layouts/cervical_cancer/risk_assesment_left.php +++ b/admin/layouts/cervical_cancer/risk_assesment_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage risk_assesment_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'txt_cc_periods' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/cervical_cancer/risk_assesment_right.php b/admin/layouts/cervical_cancer/risk_assesment_right.php index b0581f4..92c9631 100644 --- a/admin/layouts/cervical_cancer/risk_assesment_right.php +++ b/admin/layouts/cervical_cancer/risk_assesment_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage risk_assesment_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'txt_cc_sex_partner' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/clinic/details_above.php b/admin/layouts/clinic/details_above.php index 9230e4c..50db8b9 100644 --- a/admin/layouts/clinic/details_above.php +++ b/admin/layouts/clinic/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -45,7 +45,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'clinic_type' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/clinic/details_fullwidth.php b/admin/layouts/clinic/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/clinic/details_fullwidth.php +++ b/admin/layouts/clinic/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/clinic/publishing.php b/admin/layouts/clinic/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/clinic/publishing.php +++ b/admin/layouts/clinic/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/clinic/publlshing.php b/admin/layouts/clinic/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/clinic/publlshing.php +++ b/admin/layouts/clinic/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/counseling_type/details_above.php b/admin/layouts/counseling_type/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/counseling_type/details_above.php +++ b/admin/layouts/counseling_type/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/counseling_type/details_fullwidth.php b/admin/layouts/counseling_type/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/counseling_type/details_fullwidth.php +++ b/admin/layouts/counseling_type/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/counseling_type/publishing.php b/admin/layouts/counseling_type/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/counseling_type/publishing.php +++ b/admin/layouts/counseling_type/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/counseling_type/publlshing.php b/admin/layouts/counseling_type/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/counseling_type/publlshing.php +++ b/admin/layouts/counseling_type/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/diagnosis_type/details_above.php b/admin/layouts/diagnosis_type/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/diagnosis_type/details_above.php +++ b/admin/layouts/diagnosis_type/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/diagnosis_type/details_fullwidth.php b/admin/layouts/diagnosis_type/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/diagnosis_type/details_fullwidth.php +++ b/admin/layouts/diagnosis_type/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/diagnosis_type/publishing.php b/admin/layouts/diagnosis_type/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/diagnosis_type/publishing.php +++ b/admin/layouts/diagnosis_type/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/diagnosis_type/publlshing.php b/admin/layouts/diagnosis_type/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/diagnosis_type/publlshing.php +++ b/admin/layouts/diagnosis_type/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/family_planning/details_above.php b/admin/layouts/family_planning/details_above.php index 5b2dd4f..314df2d 100644 --- a/admin/layouts/family_planning/details_above.php +++ b/admin/layouts/family_planning/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/family_planning/details_left.php b/admin/layouts/family_planning/details_left.php index c5ada16..ffc5a2a 100644 --- a/admin/layouts/family_planning/details_left.php +++ b/admin/layouts/family_planning/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'diagnosis' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/family_planning/publishing.php b/admin/layouts/family_planning/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/family_planning/publishing.php +++ b/admin/layouts/family_planning/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/family_planning/publlshing.php b/admin/layouts/family_planning/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/family_planning/publlshing.php +++ b/admin/layouts/family_planning/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_engagement/details_above.php b/admin/layouts/foetal_engagement/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/foetal_engagement/details_above.php +++ b/admin/layouts/foetal_engagement/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_engagement/details_fullwidth.php b/admin/layouts/foetal_engagement/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/foetal_engagement/details_fullwidth.php +++ b/admin/layouts/foetal_engagement/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_engagement/publishing.php b/admin/layouts/foetal_engagement/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/foetal_engagement/publishing.php +++ b/admin/layouts/foetal_engagement/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_engagement/publlshing.php b/admin/layouts/foetal_engagement/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/foetal_engagement/publlshing.php +++ b/admin/layouts/foetal_engagement/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_lie/details_above.php b/admin/layouts/foetal_lie/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/foetal_lie/details_above.php +++ b/admin/layouts/foetal_lie/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_lie/details_fullwidth.php b/admin/layouts/foetal_lie/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/foetal_lie/details_fullwidth.php +++ b/admin/layouts/foetal_lie/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_lie/publishing.php b/admin/layouts/foetal_lie/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/foetal_lie/publishing.php +++ b/admin/layouts/foetal_lie/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_lie/publlshing.php b/admin/layouts/foetal_lie/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/foetal_lie/publlshing.php +++ b/admin/layouts/foetal_lie/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_presentation/details_above.php b/admin/layouts/foetal_presentation/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/foetal_presentation/details_above.php +++ b/admin/layouts/foetal_presentation/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_presentation/details_fullwidth.php b/admin/layouts/foetal_presentation/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/foetal_presentation/details_fullwidth.php +++ b/admin/layouts/foetal_presentation/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_presentation/publishing.php b/admin/layouts/foetal_presentation/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/foetal_presentation/publishing.php +++ b/admin/layouts/foetal_presentation/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/foetal_presentation/publlshing.php b/admin/layouts/foetal_presentation/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/foetal_presentation/publlshing.php +++ b/admin/layouts/foetal_presentation/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/diagnosis_fullwidth.php b/admin/layouts/general_medical_check_up/diagnosis_fullwidth.php index fbe6ac8..58e64f4 100644 --- a/admin/layouts/general_medical_check_up/diagnosis_fullwidth.php +++ b/admin/layouts/general_medical_check_up/diagnosis_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'diagnosis' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/dispensing_fullwidth.php b/admin/layouts/general_medical_check_up/dispensing_fullwidth.php index 9ea417e..59b63dd 100644 --- a/admin/layouts/general_medical_check_up/dispensing_fullwidth.php +++ b/admin/layouts/general_medical_check_up/dispensing_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage dispensing_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'dispensing' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/publishing.php b/admin/layouts/general_medical_check_up/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/general_medical_check_up/publishing.php +++ b/admin/layouts/general_medical_check_up/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/publlshing.php b/admin/layouts/general_medical_check_up/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/general_medical_check_up/publlshing.php +++ b/admin/layouts/general_medical_check_up/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/referrals_left.php b/admin/layouts/general_medical_check_up/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/general_medical_check_up/referrals_left.php +++ b/admin/layouts/general_medical_check_up/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/referrals_right.php b/admin/layouts/general_medical_check_up/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/general_medical_check_up/referrals_right.php +++ b/admin/layouts/general_medical_check_up/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/vital_signs_above.php b/admin/layouts/general_medical_check_up/vital_signs_above.php index 295a8fe..395a634 100644 --- a/admin/layouts/general_medical_check_up/vital_signs_above.php +++ b/admin/layouts/general_medical_check_up/vital_signs_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vital_signs_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/vital_signs_fullwidth.php b/admin/layouts/general_medical_check_up/vital_signs_fullwidth.php index d30ebfc..bbe4464 100644 --- a/admin/layouts/general_medical_check_up/vital_signs_fullwidth.php +++ b/admin/layouts/general_medical_check_up/vital_signs_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vital_signs_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -45,7 +45,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'notes' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/vital_signs_left.php b/admin/layouts/general_medical_check_up/vital_signs_left.php index 87a959a..0e16248 100644 --- a/admin/layouts/general_medical_check_up/vital_signs_left.php +++ b/admin/layouts/general_medical_check_up/vital_signs_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vital_signs_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'chronic_medication' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/general_medical_check_up/vital_signs_right.php b/admin/layouts/general_medical_check_up/vital_signs_right.php index 11a74ec..71111a4 100644 --- a/admin/layouts/general_medical_check_up/vital_signs_right.php +++ b/admin/layouts/general_medical_check_up/vital_signs_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vital_signs_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -47,7 +47,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'bmi' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education/details_above.php b/admin/layouts/health_education/details_above.php index 2e3aac4..93db487 100644 --- a/admin/layouts/health_education/details_above.php +++ b/admin/layouts/health_education/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'education_type' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education/details_left.php b/admin/layouts/health_education/details_left.php index dc5d16f..5a5880e 100644 --- a/admin/layouts/health_education/details_left.php +++ b/admin/layouts/health_education/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'health_education_topic' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education/publishing.php b/admin/layouts/health_education/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/health_education/publishing.php +++ b/admin/layouts/health_education/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education/publlshing.php b/admin/layouts/health_education/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/health_education/publlshing.php +++ b/admin/layouts/health_education/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education_topic/details_above.php b/admin/layouts/health_education_topic/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/health_education_topic/details_above.php +++ b/admin/layouts/health_education_topic/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education_topic/details_fullwidth.php b/admin/layouts/health_education_topic/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/health_education_topic/details_fullwidth.php +++ b/admin/layouts/health_education_topic/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education_topic/publishing.php b/admin/layouts/health_education_topic/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/health_education_topic/publishing.php +++ b/admin/layouts/health_education_topic/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/health_education_topic/publlshing.php b/admin/layouts/health_education_topic/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/health_education_topic/publlshing.php +++ b/admin/layouts/health_education_topic/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/hiv_counseling_and_testing/details_above.php b/admin/layouts/hiv_counseling_and_testing/details_above.php index 5b2dd4f..314df2d 100644 --- a/admin/layouts/hiv_counseling_and_testing/details_above.php +++ b/admin/layouts/hiv_counseling_and_testing/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/hiv_counseling_and_testing/details_left.php b/admin/layouts/hiv_counseling_and_testing/details_left.php index 265d1c9..6f199c2 100644 --- a/admin/layouts/hiv_counseling_and_testing/details_left.php +++ b/admin/layouts/hiv_counseling_and_testing/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -50,7 +50,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'eqa' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/hiv_counseling_and_testing/publishing.php b/admin/layouts/hiv_counseling_and_testing/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/hiv_counseling_and_testing/publishing.php +++ b/admin/layouts/hiv_counseling_and_testing/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/hiv_counseling_and_testing/publlshing.php b/admin/layouts/hiv_counseling_and_testing/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/hiv_counseling_and_testing/publlshing.php +++ b/admin/layouts/hiv_counseling_and_testing/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/hiv_counseling_and_testing/referrals_left.php b/admin/layouts/hiv_counseling_and_testing/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/hiv_counseling_and_testing/referrals_left.php +++ b/admin/layouts/hiv_counseling_and_testing/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/hiv_counseling_and_testing/referrals_right.php b/admin/layouts/hiv_counseling_and_testing/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/hiv_counseling_and_testing/referrals_right.php +++ b/admin/layouts/hiv_counseling_and_testing/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/details_above.php b/admin/layouts/immunisation/details_above.php index 5b2dd4f..314df2d 100644 --- a/admin/layouts/immunisation/details_above.php +++ b/admin/layouts/immunisation/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/details_fullwidth.php b/admin/layouts/immunisation/details_fullwidth.php index 9c8aa24..5bf1926 100644 --- a/admin/layouts/immunisation/details_fullwidth.php +++ b/admin/layouts/immunisation/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'immunisation' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/details_left.php b/admin/layouts/immunisation/details_left.php index 8322696..73e0feb 100644 --- a/admin/layouts/immunisation/details_left.php +++ b/admin/layouts/immunisation/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'immunisation_up_to_date' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/details_under.php b/admin/layouts/immunisation/details_under.php deleted file mode 100644 index 09a8231..0000000 --- a/admin/layouts/immunisation/details_under.php +++ /dev/null @@ -1,59 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// get the form -$form = $displayData->getForm(); - -// get the layout fields override method name (from layout path/ID) -$layout_path_array = explode('.', $this->getLayoutId()); -// Since we cannot pass the layout and tab names as parameters to the model method -// this name combination of tab and layout in the method name is the only work around -// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. -// example of layout name: details_left.php -// example of method name: getFields_details_left() -$fields_tab_layout = 'fields_' . $layout_path_array[1]; - -// get the fields -$fields = $displayData->get($fields_tab_layout) ?: array( - 'immunisation_vaccine_type', - 'administration_part' -); - -$hiddenFields = $displayData->get('hidden_fields') ?: array(); - -?> - -
- - - setFieldAttribute($field, 'type', 'hidden'); ?> - - renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> - -
- diff --git a/admin/layouts/immunisation/publishing.php b/admin/layouts/immunisation/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/immunisation/publishing.php +++ b/admin/layouts/immunisation/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/publlshing.php b/admin/layouts/immunisation/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/immunisation/publlshing.php +++ b/admin/layouts/immunisation/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/referrals_left.php b/admin/layouts/immunisation/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/immunisation/referrals_left.php +++ b/admin/layouts/immunisation/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation/referrals_right.php b/admin/layouts/immunisation/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/immunisation/referrals_right.php +++ b/admin/layouts/immunisation/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_type/details_above.php b/admin/layouts/immunisation_type/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/immunisation_type/details_above.php +++ b/admin/layouts/immunisation_type/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_type/details_fullwidth.php b/admin/layouts/immunisation_type/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/immunisation_type/details_fullwidth.php +++ b/admin/layouts/immunisation_type/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_type/publishing.php b/admin/layouts/immunisation_type/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/immunisation_type/publishing.php +++ b/admin/layouts/immunisation_type/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_type/publlshing.php b/admin/layouts/immunisation_type/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/immunisation_type/publlshing.php +++ b/admin/layouts/immunisation_type/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_vaccine_type/details_above.php b/admin/layouts/immunisation_vaccine_type/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/immunisation_vaccine_type/details_above.php +++ b/admin/layouts/immunisation_vaccine_type/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_vaccine_type/details_fullwidth.php b/admin/layouts/immunisation_vaccine_type/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/immunisation_vaccine_type/details_fullwidth.php +++ b/admin/layouts/immunisation_vaccine_type/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_vaccine_type/details_left.php b/admin/layouts/immunisation_vaccine_type/details_left.php index e0d1efc..8e2c2fe 100644 --- a/admin/layouts/immunisation_vaccine_type/details_left.php +++ b/admin/layouts/immunisation_vaccine_type/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'administration_part' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_vaccine_type/publishing.php b/admin/layouts/immunisation_vaccine_type/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/immunisation_vaccine_type/publishing.php +++ b/admin/layouts/immunisation_vaccine_type/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/immunisation_vaccine_type/publlshing.php b/admin/layouts/immunisation_vaccine_type/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/immunisation_vaccine_type/publlshing.php +++ b/admin/layouts/immunisation_vaccine_type/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/medication/details_above.php b/admin/layouts/medication/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/medication/details_above.php +++ b/admin/layouts/medication/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/medication/details_fullwidth.php b/admin/layouts/medication/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/medication/details_fullwidth.php +++ b/admin/layouts/medication/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/medication/publishing.php b/admin/layouts/medication/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/medication/publishing.php +++ b/admin/layouts/medication/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/medication/publlshing.php b/admin/layouts/medication/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/medication/publlshing.php +++ b/admin/layouts/medication/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/nonpay_reason/details_above.php b/admin/layouts/nonpay_reason/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/nonpay_reason/details_above.php +++ b/admin/layouts/nonpay_reason/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/nonpay_reason/details_fullwidth.php b/admin/layouts/nonpay_reason/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/nonpay_reason/details_fullwidth.php +++ b/admin/layouts/nonpay_reason/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/nonpay_reason/publishing.php b/admin/layouts/nonpay_reason/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/nonpay_reason/publishing.php +++ b/admin/layouts/nonpay_reason/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/nonpay_reason/publlshing.php b/admin/layouts/nonpay_reason/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/nonpay_reason/publlshing.php +++ b/admin/layouts/nonpay_reason/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment/details_above.php b/admin/layouts/payment/details_above.php index 55dc45f..b4fa292 100644 --- a/admin/layouts/payment/details_above.php +++ b/admin/layouts/payment/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'payment_category' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment/details_left.php b/admin/layouts/payment/details_left.php index 4b3976c..f26f013 100644 --- a/admin/layouts/payment/details_left.php +++ b/admin/layouts/payment/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'receipt_no' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment/publishing.php b/admin/layouts/payment/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/payment/publishing.php +++ b/admin/layouts/payment/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment/publlshing.php b/admin/layouts/payment/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/payment/publlshing.php +++ b/admin/layouts/payment/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment_amount/details_above.php b/admin/layouts/payment_amount/details_above.php deleted file mode 100644 index 10065f8..0000000 --- a/admin/layouts/payment_amount/details_above.php +++ /dev/null @@ -1,59 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// get the form -$form = $displayData->getForm(); - -// get the layout fields override method name (from layout path/ID) -$layout_path_array = explode('.', $this->getLayoutId()); -// Since we cannot pass the layout and tab names as parameters to the model method -// this name combination of tab and layout in the method name is the only work around -// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. -// example of layout name: details_left.php -// example of method name: getFields_details_left() -$fields_tab_layout = 'fields_' . $layout_path_array[1]; - -// get the fields -$fields = $displayData->get($fields_tab_layout) ?: array( - 'name', - 'alias' -); - -$hiddenFields = $displayData->get('hidden_fields') ?: array(); - -?> - -
- - - setFieldAttribute($field, 'type', 'hidden'); ?> - - renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> - -
- diff --git a/admin/layouts/payment_amount/details_fullwidth.php b/admin/layouts/payment_amount/details_fullwidth.php deleted file mode 100644 index 38dbb66..0000000 --- a/admin/layouts/payment_amount/details_fullwidth.php +++ /dev/null @@ -1,58 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// get the form -$form = $displayData->getForm(); - -// get the layout fields override method name (from layout path/ID) -$layout_path_array = explode('.', $this->getLayoutId()); -// Since we cannot pass the layout and tab names as parameters to the model method -// this name combination of tab and layout in the method name is the only work around -// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. -// example of layout name: details_left.php -// example of method name: getFields_details_left() -$fields_tab_layout = 'fields_' . $layout_path_array[1]; - -// get the fields -$fields = $displayData->get($fields_tab_layout) ?: array( - 'description' -); - -$hiddenFields = $displayData->get('hidden_fields') ?: array(); - -?> - -
- - - setFieldAttribute($field, 'type', 'hidden'); ?> - - renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> - -
- diff --git a/admin/layouts/payment_amount/publishing.php b/admin/layouts/payment_amount/publishing.php deleted file mode 100644 index 409229e..0000000 --- a/admin/layouts/payment_amount/publishing.php +++ /dev/null @@ -1,60 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// get the form -$form = $displayData->getForm(); - -// get the layout fields override method name (from layout path/ID) -$layout_path_array = explode('.', $this->getLayoutId()); -// Since we cannot pass the layout and tab names as parameters to the model method -// this name combination of tab and layout in the method name is the only work around -// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. -// example of layout name: details_left.php -// example of method name: getFields_details_left() -$fields_tab_layout = 'fields_' . $layout_path_array[1]; - -// get the fields -$fields = $displayData->get($fields_tab_layout) ?: array( - 'title', - 'created', - 'created_by', - 'modified', - 'modified_by' -); - -$hiddenFields = $displayData->get('hidden_fields') ?: array(); - -?> - - - - setFieldAttribute($field, 'type', 'hidden'); ?> - - renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> - - diff --git a/admin/layouts/payment_amount/publlshing.php b/admin/layouts/payment_amount/publlshing.php deleted file mode 100644 index 3d84e5e..0000000 --- a/admin/layouts/payment_amount/publlshing.php +++ /dev/null @@ -1,61 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// get the form -$form = $displayData->getForm(); - -// get the layout fields override method name (from layout path/ID) -$layout_path_array = explode('.', $this->getLayoutId()); -// Since we cannot pass the layout and tab names as parameters to the model method -// this name combination of tab and layout in the method name is the only work around -// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. -// example of layout name: details_left.php -// example of method name: getFields_details_left() -$fields_tab_layout = 'fields_' . $layout_path_array[1]; - -// get the fields -$fields = $displayData->get($fields_tab_layout) ?: array( - 'published', - 'ordering', - 'access', - 'version', - 'hits', - 'id' -); - -$hiddenFields = $displayData->get('hidden_fields') ?: array(); - -?> - - - - setFieldAttribute($field, 'type', 'hidden'); ?> - - renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> - - diff --git a/admin/layouts/payment_type/details_above.php b/admin/layouts/payment_type/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/payment_type/details_above.php +++ b/admin/layouts/payment_type/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment_type/details_fullwidth.php b/admin/layouts/payment_type/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/payment_type/details_fullwidth.php +++ b/admin/layouts/payment_type/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment_type/publishing.php b/admin/layouts/payment_type/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/payment_type/publishing.php +++ b/admin/layouts/payment_type/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/payment_type/publlshing.php b/admin/layouts/payment_type/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/payment_type/publlshing.php +++ b/admin/layouts/payment_type/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/planning_type/details_above.php b/admin/layouts/planning_type/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/planning_type/details_above.php +++ b/admin/layouts/planning_type/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/planning_type/details_fullwidth.php b/admin/layouts/planning_type/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/planning_type/details_fullwidth.php +++ b/admin/layouts/planning_type/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/planning_type/publishing.php b/admin/layouts/planning_type/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/planning_type/publishing.php +++ b/admin/layouts/planning_type/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/planning_type/publlshing.php b/admin/layouts/planning_type/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/planning_type/publlshing.php +++ b/admin/layouts/planning_type/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/details_above.php b/admin/layouts/prostate_and_testicular_cancer/details_above.php index 5b2dd4f..314df2d 100644 --- a/admin/layouts/prostate_and_testicular_cancer/details_above.php +++ b/admin/layouts/prostate_and_testicular_cancer/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/details_left.php b/admin/layouts/prostate_and_testicular_cancer/details_left.php index a8212c3..6ad7d15 100644 --- a/admin/layouts/prostate_and_testicular_cancer/details_left.php +++ b/admin/layouts/prostate_and_testicular_cancer/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -50,7 +50,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'txt_ptc_phy_activity' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/details_right.php b/admin/layouts/prostate_and_testicular_cancer/details_right.php index 3895b3a..a7acca4 100644 --- a/admin/layouts/prostate_and_testicular_cancer/details_right.php +++ b/admin/layouts/prostate_and_testicular_cancer/details_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'txt_ptc_urine_freq' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/publishing.php b/admin/layouts/prostate_and_testicular_cancer/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/prostate_and_testicular_cancer/publishing.php +++ b/admin/layouts/prostate_and_testicular_cancer/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/publlshing.php b/admin/layouts/prostate_and_testicular_cancer/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/prostate_and_testicular_cancer/publlshing.php +++ b/admin/layouts/prostate_and_testicular_cancer/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/referrals_left.php b/admin/layouts/prostate_and_testicular_cancer/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/prostate_and_testicular_cancer/referrals_left.php +++ b/admin/layouts/prostate_and_testicular_cancer/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/prostate_and_testicular_cancer/referrals_right.php b/admin/layouts/prostate_and_testicular_cancer/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/prostate_and_testicular_cancer/referrals_right.php +++ b/admin/layouts/prostate_and_testicular_cancer/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/referral/details_above.php b/admin/layouts/referral/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/referral/details_above.php +++ b/admin/layouts/referral/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/referral/details_fullwidth.php b/admin/layouts/referral/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/referral/details_fullwidth.php +++ b/admin/layouts/referral/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/referral/publishing.php b/admin/layouts/referral/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/referral/publishing.php +++ b/admin/layouts/referral/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/referral/publlshing.php b/admin/layouts/referral/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/referral/publlshing.php +++ b/admin/layouts/referral/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/site/details_above.php b/admin/layouts/site/details_above.php index 2c9ad21..76e1f8e 100644 --- a/admin/layouts/site/details_above.php +++ b/admin/layouts/site/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/site/details_fullwidth.php b/admin/layouts/site/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/site/details_fullwidth.php +++ b/admin/layouts/site/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/site/details_left.php b/admin/layouts/site/details_left.php index f7f76a3..2fe4e68 100644 --- a/admin/layouts/site/details_left.php +++ b/admin/layouts/site/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'site_region' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/site/publishing.php b/admin/layouts/site/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/site/publishing.php +++ b/admin/layouts/site/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/site/publlshing.php b/admin/layouts/site/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/site/publlshing.php +++ b/admin/layouts/site/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/strength/details_above.php b/admin/layouts/strength/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/strength/details_above.php +++ b/admin/layouts/strength/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/strength/details_fullwidth.php b/admin/layouts/strength/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/strength/details_fullwidth.php +++ b/admin/layouts/strength/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/strength/publishing.php b/admin/layouts/strength/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/strength/publishing.php +++ b/admin/layouts/strength/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/strength/publlshing.php b/admin/layouts/strength/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/strength/publlshing.php +++ b/admin/layouts/strength/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/cholesterol_left.php b/admin/layouts/test/cholesterol_left.php index 15ebaab..149a4de 100644 --- a/admin/layouts/test/cholesterol_left.php +++ b/admin/layouts/test/cholesterol_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cholesterol_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'cholesterol_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/glucose_left.php b/admin/layouts/test/glucose_left.php index 64da32d..900babe 100644 --- a/admin/layouts/test/glucose_left.php +++ b/admin/layouts/test/glucose_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage glucose_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'glucose_second_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/haemoglobin_left.php b/admin/layouts/test/haemoglobin_left.php index 9ef02a6..29d7326 100644 --- a/admin/layouts/test/haemoglobin_left.php +++ b/admin/layouts/test/haemoglobin_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage haemoglobin_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'haemoglobin_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/hepatitis_b_left.php b/admin/layouts/test/hepatitis_b_left.php index 9fc98ea..b13d1d9 100644 --- a/admin/layouts/test/hepatitis_b_left.php +++ b/admin/layouts/test/hepatitis_b_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hepatitis_b_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'hepatitis_second_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/malaria_left.php b/admin/layouts/test/malaria_left.php index 2195bb0..30c62c6 100644 --- a/admin/layouts/test/malaria_left.php +++ b/admin/layouts/test/malaria_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage malaria_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'malaria_second_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/pregnancy_left.php b/admin/layouts/test/pregnancy_left.php index c2055f1..5a2460b 100644 --- a/admin/layouts/test/pregnancy_left.php +++ b/admin/layouts/test/pregnancy_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage pregnancy_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'pregnancy_second_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/publishing.php b/admin/layouts/test/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/test/publishing.php +++ b/admin/layouts/test/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/publlshing.php b/admin/layouts/test/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/test/publlshing.php +++ b/admin/layouts/test/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/referrals_left.php b/admin/layouts/test/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/test/referrals_left.php +++ b/admin/layouts/test/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/referrals_right.php b/admin/layouts/test/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/test/referrals_right.php +++ b/admin/layouts/test/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/syphillis_left.php b/admin/layouts/test/syphillis_left.php index 04c11f8..1126f61 100644 --- a/admin/layouts/test/syphillis_left.php +++ b/admin/layouts/test/syphillis_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage syphillis_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'syphilis_second_reading' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/urine_above.php b/admin/layouts/test/urine_above.php index d360d6f..a20bccf 100644 --- a/admin/layouts/test/urine_above.php +++ b/admin/layouts/test/urine_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage urine_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/test/urine_left.php b/admin/layouts/test/urine_left.php index fa0bacc..2713209 100644 --- a/admin/layouts/test/urine_left.php +++ b/admin/layouts/test/urine_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage urine_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'urine_test_result' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/testing_reason/details_above.php b/admin/layouts/testing_reason/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/testing_reason/details_above.php +++ b/admin/layouts/testing_reason/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/testing_reason/details_fullwidth.php b/admin/layouts/testing_reason/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/testing_reason/details_fullwidth.php +++ b/admin/layouts/testing_reason/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/testing_reason/publishing.php b/admin/layouts/testing_reason/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/testing_reason/publishing.php +++ b/admin/layouts/testing_reason/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/testing_reason/publlshing.php b/admin/layouts/testing_reason/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/testing_reason/publlshing.php +++ b/admin/layouts/testing_reason/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/publishing.php b/admin/layouts/tuberculosis/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/tuberculosis/publishing.php +++ b/admin/layouts/tuberculosis/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/publlshing.php b/admin/layouts/tuberculosis/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/tuberculosis/publlshing.php +++ b/admin/layouts/tuberculosis/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/referrals_left.php b/admin/layouts/tuberculosis/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/tuberculosis/referrals_left.php +++ b/admin/layouts/tuberculosis/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/referrals_right.php b/admin/layouts/tuberculosis/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/tuberculosis/referrals_right.php +++ b/admin/layouts/tuberculosis/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/screening_above.php b/admin/layouts/tuberculosis/screening_above.php index 2856398..b4dd492 100644 --- a/admin/layouts/tuberculosis/screening_above.php +++ b/admin/layouts/tuberculosis/screening_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage screening_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'patient' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/screening_left.php b/admin/layouts/tuberculosis/screening_left.php index 2e050d7..313fbcb 100644 --- a/admin/layouts/tuberculosis/screening_left.php +++ b/admin/layouts/tuberculosis/screening_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage screening_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -50,7 +50,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'shortness_of_breath' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/screening_right.php b/admin/layouts/tuberculosis/screening_right.php index 7043177..1dff549 100644 --- a/admin/layouts/tuberculosis/screening_right.php +++ b/admin/layouts/tuberculosis/screening_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage screening_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -47,7 +47,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'treating_dhc' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/tuberculosis/sputum_collection_left.php b/admin/layouts/tuberculosis/sputum_collection_left.php index 49941da..0818c8d 100644 --- a/admin/layouts/tuberculosis/sputum_collection_left.php +++ b/admin/layouts/tuberculosis/sputum_collection_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage sputum_collection_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'sputum_result_two' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/unit/details_above.php b/admin/layouts/unit/details_above.php index 10065f8..dfcfb17 100644 --- a/admin/layouts/unit/details_above.php +++ b/admin/layouts/unit/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'alias' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/unit/details_fullwidth.php b/admin/layouts/unit/details_fullwidth.php index 38dbb66..b70b01b 100644 --- a/admin/layouts/unit/details_fullwidth.php +++ b/admin/layouts/unit/details_fullwidth.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_fullwidth.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/unit/publishing.php b/admin/layouts/unit/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/unit/publishing.php +++ b/admin/layouts/unit/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/unit/publlshing.php b/admin/layouts/unit/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/unit/publlshing.php +++ b/admin/layouts/unit/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/vmmc/details_above.php b/admin/layouts/vmmc/details_above.php index 07b6e96..924b4a8 100644 --- a/admin/layouts/vmmc/details_above.php +++ b/admin/layouts/vmmc/details_above.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_above.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -44,7 +44,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'vmmc_gender' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/vmmc/details_left.php b/admin/layouts/vmmc/details_left.php index 4df5777..fd02a80 100644 --- a/admin/layouts/vmmc/details_left.php +++ b/admin/layouts/vmmc/details_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage details_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -46,7 +46,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'info_ben_vmcc' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/vmmc/publishing.php b/admin/layouts/vmmc/publishing.php index 409229e..5be6075 100644 --- a/admin/layouts/vmmc/publishing.php +++ b/admin/layouts/vmmc/publishing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publishing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1]; // get the fields $fields = $displayData->get($fields_tab_layout) ?: array( + 'guid', 'title', 'created', 'created_by', @@ -47,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'modified_by' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/vmmc/publlshing.php b/admin/layouts/vmmc/publlshing.php index 3d84e5e..c7309a8 100644 --- a/admin/layouts/vmmc/publlshing.php +++ b/admin/layouts/vmmc/publlshing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage publlshing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -48,7 +48,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'id' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/vmmc/referrals_left.php b/admin/layouts/vmmc/referrals_left.php index f0c0337..286cc50 100644 --- a/admin/layouts/vmmc/referrals_left.php +++ b/admin/layouts/vmmc/referrals_left.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_left.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'referral' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/layouts/vmmc/referrals_right.php b/admin/layouts/vmmc/referrals_right.php index 710b162..2f07e5a 100644 --- a/admin/layouts/vmmc/referrals_right.php +++ b/admin/layouts/vmmc/referrals_right.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals_right.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -43,7 +43,7 @@ $fields = $displayData->get($fields_tab_layout) ?: array( 'reason' ); -$hiddenFields = $displayData->get('hidden_fields') ?: array(); +$hiddenFields = $displayData->get('hidden_fields') ?: []; ?> diff --git a/admin/models/administration_part.php b/admin/models/administration_part.php index be786b7..6fed8e9 100644 --- a/admin/models/administration_part.php +++ b/admin/models/administration_part.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_part.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Administration_part Model + * Ehealthportal Administration_part Admin Model */ -class Ehealth_portalModelAdministration_part extends JModelAdmin +class EhealthportalModelAdministration_part extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.administration_part'; + public $typeAlias = 'com_ehealthportal.administration_part'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'administration_part', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'administration_part', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.administration_part'); - } } $this->administration_partvvvv = $item->id; @@ -133,20 +136,20 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin public function getVvyvaccines() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_immunisation_vaccine_type table - $query->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type', 'a')); + // From the ehealthportal_immunisation_vaccine_type table + $query->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type', 'a')); - // From the ehealth_portal_administration_part table. + // From the ehealthportal_administration_part table. $query->select($db->quoteName('g.name','administration_part_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_administration_part', 'g') . ' ON (' . $db->quoteName('a.administration_part') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_administration_part', 'g') . ' ON (' . $db->quoteName('a.administration_part') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by administration_partvvvv global. $administration_partvvvv = $this->administration_partvvvv; @@ -172,7 +175,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +183,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -212,7 +215,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -232,14 +235,14 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.administration_part', 'administration_part', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.administration_part', 'administration_part', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -252,12 +255,12 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.administration_part.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.administration_part.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -273,7 +276,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -283,7 +286,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -291,8 +294,8 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('administration_part.edit.name', 'com_ehealth_portal.administration_part.' . (int) $id)) - || ($id == 0 && !$user->authorise('administration_part.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('administration_part.edit.name', 'com_ehealthportal.administration_part.' . (int) $id)) + || ($id == 0 && !$user->authorise('administration_part.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -308,8 +311,8 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('administration_part.edit.description', 'com_ehealth_portal.administration_part.' . (int) $id)) - || ($id == 0 && !$user->authorise('administration_part.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('administration_part.edit.description', 'com_ehealthportal.administration_part.' . (int) $id)) + || ($id == 0 && !$user->authorise('administration_part.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -341,19 +344,26 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/administration_part.js'; + return 'media/com_ehealthportal/js/administration_part.js'; } - + /** * Method to test whether a record can be deleted. * @@ -372,9 +382,9 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.administration_part.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.administration_part.' . (int) $record->id); } return false; } @@ -390,42 +400,42 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.administration_part.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.administration_part.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.administration_part.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.administration_part.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -433,19 +443,19 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -457,10 +467,10 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_administration_part')); + ->from($db->quoteName('#__ehealthportal_administration_part')); $db->setQuery($query); $max = $db->loadResult(); @@ -472,7 +482,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -487,16 +497,16 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.administration_part.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.administration_part.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.administration_part', $data); + $this->preprocessData('com_ehealthportal.administration_part', $data); } return $data; @@ -511,9 +521,9 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -529,7 +539,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin { return false; } - + return true; } @@ -549,10 +559,10 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -578,30 +588,30 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('administration_part'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('administration_part'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -638,8 +648,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -665,13 +674,13 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('administration_part'); + $this->canDo = EhealthportalHelper::getActions('administration_part'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('administration_part.batch')) { return false; } @@ -691,7 +700,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -704,7 +713,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -720,14 +729,14 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -739,7 +748,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -803,15 +812,15 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('administration_part'); + $this->canDo = EhealthportalHelper::getActions('administration_part'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('administration_part.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -828,7 +837,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -844,13 +853,13 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -894,7 +903,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -906,23 +915,38 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('administration_part', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "administration_part", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -955,27 +979,27 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('administration_part', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_ADMINISTRATION_PART_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_ADMINISTRATION_PART_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -985,7 +1009,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -993,14 +1017,14 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -1013,7 +1037,6 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -1040,10 +1063,10 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -1058,7 +1081,7 @@ class Ehealth_portalModelAdministration_part extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/administration_parts.php b/admin/models/administration_parts.php index 55d8cc9..ae0c4c1 100644 --- a/admin/models/administration_parts.php +++ b/admin/models/administration_parts.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_parts.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Administration_parts Model + * Administration_parts List Model */ -class Ehealth_portalModelAdministration_parts extends JModelList +class EhealthportalModelAdministration_parts extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelAdministration_parts extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_administration_part', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_administration_part', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelAdministration_parts extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_administration_part table - $query->from($db->quoteName('#__ehealth_portal_administration_part', 'a')); + // From the ehealthportal_administration_part table + $query->from($db->quoteName('#__ehealthportal_administration_part', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelAdministration_parts extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelAdministration_parts extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_administration_part"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_administration_part"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelAdministration_parts extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelAdministration_parts extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelAdministration_parts extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_administration_part')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_administration_part')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelAdministration_parts extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_administration_part'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_administration_part'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/ajax.php b/admin/models/ajax.php index abcfbb2..5274431 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage ajax.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,21 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; /** - * Ehealth_portal Ajax Model + * Ehealthportal Ajax List Model */ -class Ehealth_portalModelAjax extends JModelList +class EhealthportalModelAjax extends ListModel { protected $app_params; - - public function __construct() - { - parent::__construct(); + + public function __construct() + { + parent::__construct(); // get params - $this->app_params = JComponentHelper::getParams('com_ehealth_portal'); - + $this->app_params = ComponentHelper::getParams('com_ehealthportal'); + } // Used in immunisation @@ -51,7 +56,7 @@ class Ehealth_portalModelAjax extends JModelList // Create a new query object. $query = $db->getQuery(true); $query->select($db->quoteName( array('a.id') )); - $query->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type', 'a')); + $query->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); // check for administration part and immunisation vaccine type $query->where($db->quoteName('a.administration_part') . ' = '. (int) $administration_part); diff --git a/admin/models/antenatal_care.php b/admin/models/antenatal_care.php index cd1a624..02bb790 100644 --- a/admin/models/antenatal_care.php +++ b/admin/models/antenatal_care.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_care.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Antenatal_care Model + * Ehealthportal Antenatal_care Admin Model */ -class Ehealth_portalModelAntenatal_care extends JModelAdmin +class EhealthportalModelAntenatal_care extends AdminModel { /** * The tab layout fields array. @@ -74,7 +83,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -82,7 +91,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.antenatal_care'; + public $typeAlias = 'com_ehealthportal.antenatal_care'; /** * Returns a Table object, always creating it @@ -91,18 +100,18 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'antenatal_care', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'antenatal_care', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -131,12 +140,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.antenatal_care'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -153,7 +157,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -173,14 +177,14 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.antenatal_care', 'antenatal_care', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.antenatal_care', 'antenatal_care', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -193,12 +197,12 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.antenatal_care.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.antenatal_care.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -214,7 +218,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -224,7 +228,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -248,19 +252,26 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/antenatal_care.js'; + return 'media/com_ehealthportal/js/antenatal_care.js'; } - + /** * Method to test whether a record can be deleted. * @@ -279,9 +290,9 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.antenatal_care.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.antenatal_care.' . (int) $record->id); } return false; } @@ -297,42 +308,42 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.antenatal_care.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.antenatal_care.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.antenatal_care.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.antenatal_care.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -340,19 +351,19 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -364,10 +375,10 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_antenatal_care')); + ->from($db->quoteName('#__ehealthportal_antenatal_care')); $db->setQuery($query); $max = $db->loadResult(); @@ -379,7 +390,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -394,16 +405,16 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.antenatal_care.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.antenatal_care.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.antenatal_care', $data); + $this->preprocessData('com_ehealthportal.antenatal_care', $data); } return $data; @@ -418,9 +429,9 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -436,7 +447,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin { return false; } - + return true; } @@ -456,10 +467,10 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -485,30 +496,30 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('antenatal_care'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('antenatal_care'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -545,8 +556,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -572,13 +582,13 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('antenatal_care'); + $this->canDo = EhealthportalHelper::getActions('antenatal_care'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('antenatal_care.batch')) { return false; } @@ -598,7 +608,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -611,7 +621,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -627,13 +637,19 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -645,7 +661,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -709,15 +725,15 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('antenatal_care'); + $this->canDo = EhealthportalHelper::getActions('antenatal_care'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('antenatal_care.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -734,7 +750,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -750,13 +766,13 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -800,7 +816,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -812,23 +828,39 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('antenatal_care', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "antenatal_care", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -838,7 +870,7 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -846,14 +878,14 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -866,7 +898,6 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -877,4 +908,26 @@ class Ehealth_portalModelAntenatal_care extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/antenatal_cares.php b/admin/models/antenatal_cares.php index 6dd5f19..a91d1e5 100644 --- a/admin/models/antenatal_cares.php +++ b/admin/models/antenatal_cares.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_cares.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Antenatal_cares Model + * Antenatal_cares List Model */ -class Ehealth_portalModelAntenatal_cares extends JModelList +class EhealthportalModelAntenatal_cares extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,46 +132,60 @@ class Ehealth_portalModelAntenatal_cares extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_antenatal_care', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_antenatal_care', 'a')); - // From the ehealth_portal_foetal_lie table. + // From the ehealthportal_foetal_lie table. $query->select($db->quoteName('g.name','foetal_lie_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_foetal_lie', 'g') . ' ON (' . $db->quoteName('a.foetal_lie') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_foetal_lie', 'g') . ' ON (' . $db->quoteName('a.foetal_lie') . ' = ' . $db->quoteName('g.id') . ')'); - // From the ehealth_portal_foetal_presentation table. + // From the ehealthportal_foetal_presentation table. $query->select($db->quoteName('h.name','foetal_presentation_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_foetal_presentation', 'h') . ' ON (' . $db->quoteName('a.foetal_presentation') . ' = ' . $db->quoteName('h.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_foetal_presentation', 'h') . ' ON (' . $db->quoteName('a.foetal_presentation') . ' = ' . $db->quoteName('h.id') . ')'); - // From the ehealth_portal_foetal_engagement table. + // From the ehealthportal_foetal_engagement table. $query->select($db->quoteName('i.name','foetal_engagement_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_foetal_engagement', 'i') . ' ON (' . $db->quoteName('a.foetal_engagement') . ' = ' . $db->quoteName('i.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_foetal_engagement', 'i') . ' ON (' . $db->quoteName('a.foetal_engagement') . ' = ' . $db->quoteName('i.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -184,7 +207,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -192,7 +215,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -225,7 +248,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -242,7 +265,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList $query->where('a.foetal_lie = ' . (int) $_foetal_lie); } } - elseif (Ehealth_portalHelper::checkString($_foetal_lie)) + elseif (EhealthportalHelper::checkString($_foetal_lie)) { $query->where('a.foetal_lie = ' . $db->quote($db->escape($_foetal_lie))); } @@ -269,24 +292,24 @@ class Ehealth_portalModelAntenatal_cares extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_antenatal_care table - $query->from($db->quoteName('#__ehealth_portal_antenatal_care', 'a')); + // From the ehealthportal_antenatal_care table + $query->from($db->quoteName('#__ehealthportal_antenatal_care', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -305,8 +328,26 @@ class Ehealth_portalModelAntenatal_cares extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_foetal_lie table. + $query->select($db->quoteName('g.name','foetal_lie')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_foetal_lie', 'g') . ' ON (' . $db->quoteName('a.foetal_lie') . ' = ' . $db->quoteName('g.id') . ')'); + + // From the ehealthportal_foetal_presentation table. + $query->select($db->quoteName('h.name','foetal_presentation')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_foetal_presentation', 'h') . ' ON (' . $db->quoteName('a.foetal_presentation') . ' = ' . $db->quoteName('h.id') . ')'); + + // From the ehealthportal_foetal_engagement table. + $query->select($db->quoteName('i.name','foetal_engagement')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_foetal_engagement', 'i') . ' ON (' . $db->quoteName('a.foetal_engagement') . ' = ' . $db->quoteName('i.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -323,10 +364,11 @@ class Ehealth_portalModelAntenatal_cares extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -335,7 +377,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -353,10 +395,10 @@ class Ehealth_portalModelAntenatal_cares extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_antenatal_care"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_antenatal_care"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -371,7 +413,7 @@ class Ehealth_portalModelAntenatal_cares extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -386,13 +428,13 @@ class Ehealth_portalModelAntenatal_cares extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -414,24 +456,26 @@ class Ehealth_portalModelAntenatal_cares extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_antenatal_care')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_antenatal_care')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -446,8 +490,8 @@ class Ehealth_portalModelAntenatal_cares extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_antenatal_care'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_antenatal_care'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/breast_cancer.php b/admin/models/breast_cancer.php index b302072..a11f016 100644 --- a/admin/models/breast_cancer.php +++ b/admin/models/breast_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Breast_cancer Model + * Ehealthportal Breast_cancer Admin Model */ -class Ehealth_portalModelBreast_cancer extends JModelAdmin +class EhealthportalModelBreast_cancer extends AdminModel { /** * The tab layout fields array. @@ -89,7 +98,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -97,7 +106,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.breast_cancer'; + public $typeAlias = 'com_ehealthportal.breast_cancer'; /** * Returns a Table object, always creating it @@ -106,18 +115,18 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'breast_cancer', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'breast_cancer', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -146,12 +155,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.breast_cancer'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -168,7 +172,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -188,14 +192,14 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.breast_cancer', 'breast_cancer', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.breast_cancer', 'breast_cancer', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -208,12 +212,12 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.breast_cancer.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.breast_cancer.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -229,7 +233,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -239,7 +243,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -263,19 +267,26 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/breast_cancer.js'; + return 'media/com_ehealthportal/js/breast_cancer.js'; } - + /** * Method to test whether a record can be deleted. * @@ -294,9 +305,9 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.breast_cancer.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.breast_cancer.' . (int) $record->id); } return false; } @@ -312,42 +323,42 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.breast_cancer.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.breast_cancer.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.breast_cancer.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.breast_cancer.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -355,19 +366,19 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -379,10 +390,10 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_breast_cancer')); + ->from($db->quoteName('#__ehealthportal_breast_cancer')); $db->setQuery($query); $max = $db->loadResult(); @@ -394,7 +405,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -409,16 +420,16 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.breast_cancer.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.breast_cancer.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.breast_cancer', $data); + $this->preprocessData('com_ehealthportal.breast_cancer', $data); } return $data; @@ -433,9 +444,9 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -451,7 +462,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin { return false; } - + return true; } @@ -471,10 +482,10 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -500,30 +511,30 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('breast_cancer'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('breast_cancer'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -560,8 +571,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -587,13 +597,13 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('breast_cancer'); + $this->canDo = EhealthportalHelper::getActions('breast_cancer'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('breast_cancer.batch')) { return false; } @@ -613,7 +623,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -626,7 +636,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -642,13 +652,19 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -660,7 +676,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -724,15 +740,15 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('breast_cancer'); + $this->canDo = EhealthportalHelper::getActions('breast_cancer'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('breast_cancer.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -749,7 +765,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -765,13 +781,13 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -815,7 +831,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -827,23 +843,39 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('breast_cancer', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "breast_cancer", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -853,7 +885,7 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -861,14 +893,14 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -881,7 +913,6 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -892,4 +923,26 @@ class Ehealth_portalModelBreast_cancer extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/breast_cancers.php b/admin/models/breast_cancers.php index 3904336..8c5ad8d 100644 --- a/admin/models/breast_cancers.php +++ b/admin/models/breast_cancers.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancers.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Breast_cancers Model + * Breast_cancers List Model */ -class Ehealth_portalModelBreast_cancers extends JModelList +class EhealthportalModelBreast_cancers extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelBreast_cancers extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -157,7 +180,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList } } - + // return items return $items; } @@ -173,11 +196,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_age_range') { $bc_age_rangeArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_age_rangeArray[$value]) && Ehealth_portalHelper::checkString($bc_age_rangeArray[$value])) + if (isset($bc_age_rangeArray[$value]) && StringHelper::check($bc_age_rangeArray[$value])) { return $bc_age_rangeArray[$value]; } @@ -186,11 +209,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_family_history') { $bc_family_historyArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_family_historyArray[$value]) && Ehealth_portalHelper::checkString($bc_family_historyArray[$value])) + if (isset($bc_family_historyArray[$value]) && StringHelper::check($bc_family_historyArray[$value])) { return $bc_family_historyArray[$value]; } @@ -199,13 +222,13 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_race') { $bc_raceArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_WHITE', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_COLOURED', - 2 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_BLACK', - 3 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_ASIAN' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_WHITE', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_COLOURED', + 2 => 'COM_EHEALTHPORTAL_BREAST_CANCER_BLACK', + 3 => 'COM_EHEALTHPORTAL_BREAST_CANCER_ASIAN' ); // Now check if value is found in this array - if (isset($bc_raceArray[$value]) && Ehealth_portalHelper::checkString($bc_raceArray[$value])) + if (isset($bc_raceArray[$value]) && StringHelper::check($bc_raceArray[$value])) { return $bc_raceArray[$value]; } @@ -214,11 +237,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_breastfeeding') { $bc_breastfeedingArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_breastfeedingArray[$value]) && Ehealth_portalHelper::checkString($bc_breastfeedingArray[$value])) + if (isset($bc_breastfeedingArray[$value]) && StringHelper::check($bc_breastfeedingArray[$value])) { return $bc_breastfeedingArray[$value]; } @@ -227,11 +250,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_preg_age') { $bc_preg_ageArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_THIRTY_YEARS', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_THIRTY_YEARS' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_THIRTY_YEARS', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_THIRTY_YEARS' ); // Now check if value is found in this array - if (isset($bc_preg_ageArray[$value]) && Ehealth_portalHelper::checkString($bc_preg_ageArray[$value])) + if (isset($bc_preg_ageArray[$value]) && StringHelper::check($bc_preg_ageArray[$value])) { return $bc_preg_ageArray[$value]; } @@ -240,11 +263,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_history_hrt') { $bc_history_hrtArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_history_hrtArray[$value]) && Ehealth_portalHelper::checkString($bc_history_hrtArray[$value])) + if (isset($bc_history_hrtArray[$value]) && StringHelper::check($bc_history_hrtArray[$value])) { return $bc_history_hrtArray[$value]; } @@ -253,11 +276,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_reg_exercise') { $bc_reg_exerciseArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_reg_exerciseArray[$value]) && Ehealth_portalHelper::checkString($bc_reg_exerciseArray[$value])) + if (isset($bc_reg_exerciseArray[$value]) && StringHelper::check($bc_reg_exerciseArray[$value])) { return $bc_reg_exerciseArray[$value]; } @@ -266,11 +289,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_overweight') { $bc_overweightArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_overweightArray[$value]) && Ehealth_portalHelper::checkString($bc_overweightArray[$value])) + if (isset($bc_overweightArray[$value]) && StringHelper::check($bc_overweightArray[$value])) { return $bc_overweightArray[$value]; } @@ -279,11 +302,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_lump_near_breast') { $bc_lump_near_breastArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_lump_near_breastArray[$value]) && Ehealth_portalHelper::checkString($bc_lump_near_breastArray[$value])) + if (isset($bc_lump_near_breastArray[$value]) && StringHelper::check($bc_lump_near_breastArray[$value])) { return $bc_lump_near_breastArray[$value]; } @@ -292,11 +315,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_dimpling') { $bc_dimplingArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_dimplingArray[$value]) && Ehealth_portalHelper::checkString($bc_dimplingArray[$value])) + if (isset($bc_dimplingArray[$value]) && StringHelper::check($bc_dimplingArray[$value])) { return $bc_dimplingArray[$value]; } @@ -305,11 +328,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_inward_nipple') { $bc_inward_nippleArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_inward_nippleArray[$value]) && Ehealth_portalHelper::checkString($bc_inward_nippleArray[$value])) + if (isset($bc_inward_nippleArray[$value]) && StringHelper::check($bc_inward_nippleArray[$value])) { return $bc_inward_nippleArray[$value]; } @@ -318,11 +341,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_nipple_discharge') { $bc_nipple_dischargeArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_nipple_dischargeArray[$value]) && Ehealth_portalHelper::checkString($bc_nipple_dischargeArray[$value])) + if (isset($bc_nipple_dischargeArray[$value]) && StringHelper::check($bc_nipple_dischargeArray[$value])) { return $bc_nipple_dischargeArray[$value]; } @@ -331,11 +354,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_abnormal_skin') { $bc_abnormal_skinArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_abnormal_skinArray[$value]) && Ehealth_portalHelper::checkString($bc_abnormal_skinArray[$value])) + if (isset($bc_abnormal_skinArray[$value]) && StringHelper::check($bc_abnormal_skinArray[$value])) { return $bc_abnormal_skinArray[$value]; } @@ -344,40 +367,40 @@ class Ehealth_portalModelBreast_cancers extends JModelList if ($name === 'bc_breast_shape') { $bc_breast_shapeArray = array( - 0 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_BREAST_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_BREAST_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_BREAST_CANCER_NO' ); // Now check if value is found in this array - if (isset($bc_breast_shapeArray[$value]) && Ehealth_portalHelper::checkString($bc_breast_shapeArray[$value])) + if (isset($bc_breast_shapeArray[$value]) && StringHelper::check($bc_breast_shapeArray[$value])) { return $bc_breast_shapeArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_breast_cancer', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_breast_cancer', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -399,7 +422,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -407,7 +430,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -440,7 +463,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -467,24 +490,24 @@ class Ehealth_portalModelBreast_cancers extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_breast_cancer table - $query->from($db->quoteName('#__ehealth_portal_breast_cancer', 'a')); + // From the ehealthportal_breast_cancer table + $query->from($db->quoteName('#__ehealthportal_breast_cancer', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -503,8 +526,18 @@ class Ehealth_portalModelBreast_cancers extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -521,10 +554,11 @@ class Ehealth_portalModelBreast_cancers extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -533,10 +567,51 @@ class Ehealth_portalModelBreast_cancers extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert bc_age_range + $item->bc_age_range = $this->selectionTranslation($item->bc_age_range, 'bc_age_range'); + // convert bc_family_history + $item->bc_family_history = $this->selectionTranslation($item->bc_family_history, 'bc_family_history'); + // convert bc_race + $item->bc_race = $this->selectionTranslation($item->bc_race, 'bc_race'); + // convert bc_breastfeeding + $item->bc_breastfeeding = $this->selectionTranslation($item->bc_breastfeeding, 'bc_breastfeeding'); + // convert bc_preg_age + $item->bc_preg_age = $this->selectionTranslation($item->bc_preg_age, 'bc_preg_age'); + // convert bc_history_hrt + $item->bc_history_hrt = $this->selectionTranslation($item->bc_history_hrt, 'bc_history_hrt'); + // convert bc_reg_exercise + $item->bc_reg_exercise = $this->selectionTranslation($item->bc_reg_exercise, 'bc_reg_exercise'); + // convert bc_overweight + $item->bc_overweight = $this->selectionTranslation($item->bc_overweight, 'bc_overweight'); + // convert bc_lump_near_breast + $item->bc_lump_near_breast = $this->selectionTranslation($item->bc_lump_near_breast, 'bc_lump_near_breast'); + // convert bc_dimpling + $item->bc_dimpling = $this->selectionTranslation($item->bc_dimpling, 'bc_dimpling'); + // convert bc_inward_nipple + $item->bc_inward_nipple = $this->selectionTranslation($item->bc_inward_nipple, 'bc_inward_nipple'); + // convert bc_nipple_discharge + $item->bc_nipple_discharge = $this->selectionTranslation($item->bc_nipple_discharge, 'bc_nipple_discharge'); + // convert bc_abnormal_skin + $item->bc_abnormal_skin = $this->selectionTranslation($item->bc_abnormal_skin, 'bc_abnormal_skin'); + // convert bc_breast_shape + $item->bc_breast_shape = $this->selectionTranslation($item->bc_breast_shape, 'bc_breast_shape'); + } + } + + } return $items; } } @@ -551,10 +626,10 @@ class Ehealth_portalModelBreast_cancers extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_breast_cancer"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_breast_cancer"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -569,7 +644,7 @@ class Ehealth_portalModelBreast_cancers extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -584,13 +659,13 @@ class Ehealth_portalModelBreast_cancers extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -611,24 +686,26 @@ class Ehealth_portalModelBreast_cancers extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_breast_cancer')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_breast_cancer')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -643,8 +720,8 @@ class Ehealth_portalModelBreast_cancers extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_breast_cancer'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_breast_cancer'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/cervical_cancer.php b/admin/models/cervical_cancer.php index ed914cf..3a6c911 100644 --- a/admin/models/cervical_cancer.php +++ b/admin/models/cervical_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Cervical_cancer Model + * Ehealthportal Cervical_cancer Admin Model */ -class Ehealth_portalModelCervical_cancer extends JModelAdmin +class EhealthportalModelCervical_cancer extends AdminModel { /** * The tab layout fields array. @@ -83,7 +92,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -91,7 +100,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.cervical_cancer'; + public $typeAlias = 'com_ehealthportal.cervical_cancer'; /** * Returns a Table object, always creating it @@ -100,18 +109,18 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'cervical_cancer', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'cervical_cancer', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -140,12 +149,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.cervical_cancer'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -162,7 +166,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -182,14 +186,14 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.cervical_cancer', 'cervical_cancer', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.cervical_cancer', 'cervical_cancer', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -202,12 +206,12 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.cervical_cancer.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.cervical_cancer.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -223,7 +227,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -233,7 +237,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -257,19 +261,26 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/cervical_cancer.js'; + return 'media/com_ehealthportal/js/cervical_cancer.js'; } - + /** * Method to test whether a record can be deleted. * @@ -288,9 +299,9 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.cervical_cancer.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.cervical_cancer.' . (int) $record->id); } return false; } @@ -306,42 +317,42 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.cervical_cancer.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.cervical_cancer.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.cervical_cancer.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.cervical_cancer.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -349,19 +360,19 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -373,10 +384,10 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_cervical_cancer')); + ->from($db->quoteName('#__ehealthportal_cervical_cancer')); $db->setQuery($query); $max = $db->loadResult(); @@ -388,7 +399,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -403,16 +414,16 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.cervical_cancer.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.cervical_cancer.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.cervical_cancer', $data); + $this->preprocessData('com_ehealthportal.cervical_cancer', $data); } return $data; @@ -427,9 +438,9 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -445,7 +456,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin { return false; } - + return true; } @@ -465,10 +476,10 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -494,30 +505,30 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('cervical_cancer'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('cervical_cancer'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -554,8 +565,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -581,13 +591,13 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('cervical_cancer'); + $this->canDo = EhealthportalHelper::getActions('cervical_cancer'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('cervical_cancer.batch')) { return false; } @@ -607,7 +617,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -620,7 +630,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -636,13 +646,19 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -654,7 +670,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -718,15 +734,15 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('cervical_cancer'); + $this->canDo = EhealthportalHelper::getActions('cervical_cancer'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('cervical_cancer.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -743,7 +759,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -759,13 +775,13 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -809,7 +825,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -821,23 +837,39 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('cervical_cancer', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "cervical_cancer", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -847,7 +879,7 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -855,14 +887,14 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -875,7 +907,6 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -886,4 +917,26 @@ class Ehealth_portalModelCervical_cancer extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/cervical_cancers.php b/admin/models/cervical_cancers.php index 298482d..41c8d31 100644 --- a/admin/models/cervical_cancers.php +++ b/admin/models/cervical_cancers.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancers.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Cervical_cancers Model + * Cervical_cancers List Model */ -class Ehealth_portalModelCervical_cancers extends JModelList +class EhealthportalModelCervical_cancers extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelCervical_cancers extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -145,7 +168,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList } } - + // return items return $items; } @@ -161,11 +184,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_viginal_bleeding') { $cc_viginal_bleedingArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($cc_viginal_bleedingArray[$value]) && Ehealth_portalHelper::checkString($cc_viginal_bleedingArray[$value])) + if (isset($cc_viginal_bleedingArray[$value]) && StringHelper::check($cc_viginal_bleedingArray[$value])) { return $cc_viginal_bleedingArray[$value]; } @@ -174,11 +197,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_v_discharge') { $cc_v_dischargeArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($cc_v_dischargeArray[$value]) && Ehealth_portalHelper::checkString($cc_v_dischargeArray[$value])) + if (isset($cc_v_dischargeArray[$value]) && StringHelper::check($cc_v_dischargeArray[$value])) { return $cc_v_dischargeArray[$value]; } @@ -187,11 +210,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_periods') { $cc_periodsArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($cc_periodsArray[$value]) && Ehealth_portalHelper::checkString($cc_periodsArray[$value])) + if (isset($cc_periodsArray[$value]) && StringHelper::check($cc_periodsArray[$value])) { return $cc_periodsArray[$value]; } @@ -200,11 +223,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_smoking') { $cc_smokingArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($cc_smokingArray[$value]) && Ehealth_portalHelper::checkString($cc_smokingArray[$value])) + if (isset($cc_smokingArray[$value]) && StringHelper::check($cc_smokingArray[$value])) { return $cc_smokingArray[$value]; } @@ -213,11 +236,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_sex_actve') { $cc_sex_actveArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($cc_sex_actveArray[$value]) && Ehealth_portalHelper::checkString($cc_sex_actveArray[$value])) + if (isset($cc_sex_actveArray[$value]) && StringHelper::check($cc_sex_actveArray[$value])) { return $cc_sex_actveArray[$value]; } @@ -226,11 +249,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_sex_partner') { $cc_sex_partnerArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($cc_sex_partnerArray[$value]) && Ehealth_portalHelper::checkString($cc_sex_partnerArray[$value])) + if (isset($cc_sex_partnerArray[$value]) && StringHelper::check($cc_sex_partnerArray[$value])) { return $cc_sex_partnerArray[$value]; } @@ -239,11 +262,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'pap_smear_collection') { $pap_smear_collectionArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NO' ); // Now check if value is found in this array - if (isset($pap_smear_collectionArray[$value]) && Ehealth_portalHelper::checkString($pap_smear_collectionArray[$value])) + if (isset($pap_smear_collectionArray[$value]) && StringHelper::check($pap_smear_collectionArray[$value])) { return $pap_smear_collectionArray[$value]; } @@ -252,41 +275,41 @@ class Ehealth_portalModelCervical_cancers extends JModelList if ($name === 'cc_result') { $cc_resultArray = array( - 0 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_CERVICAL_CANCER_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_CERVICAL_CANCER_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($cc_resultArray[$value]) && Ehealth_portalHelper::checkString($cc_resultArray[$value])) + if (isset($cc_resultArray[$value]) && StringHelper::check($cc_resultArray[$value])) { return $cc_resultArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_cervical_cancer', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_cervical_cancer', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -308,7 +331,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -316,7 +339,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -349,7 +372,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -376,24 +399,24 @@ class Ehealth_portalModelCervical_cancers extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_cervical_cancer table - $query->from($db->quoteName('#__ehealth_portal_cervical_cancer', 'a')); + // From the ehealthportal_cervical_cancer table + $query->from($db->quoteName('#__ehealthportal_cervical_cancer', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -412,8 +435,18 @@ class Ehealth_portalModelCervical_cancers extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -430,10 +463,11 @@ class Ehealth_portalModelCervical_cancers extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -442,10 +476,39 @@ class Ehealth_portalModelCervical_cancers extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert cc_viginal_bleeding + $item->cc_viginal_bleeding = $this->selectionTranslation($item->cc_viginal_bleeding, 'cc_viginal_bleeding'); + // convert cc_v_discharge + $item->cc_v_discharge = $this->selectionTranslation($item->cc_v_discharge, 'cc_v_discharge'); + // convert cc_periods + $item->cc_periods = $this->selectionTranslation($item->cc_periods, 'cc_periods'); + // convert cc_smoking + $item->cc_smoking = $this->selectionTranslation($item->cc_smoking, 'cc_smoking'); + // convert cc_sex_actve + $item->cc_sex_actve = $this->selectionTranslation($item->cc_sex_actve, 'cc_sex_actve'); + // convert cc_sex_partner + $item->cc_sex_partner = $this->selectionTranslation($item->cc_sex_partner, 'cc_sex_partner'); + // convert pap_smear_collection + $item->pap_smear_collection = $this->selectionTranslation($item->pap_smear_collection, 'pap_smear_collection'); + // convert cc_result + $item->cc_result = $this->selectionTranslation($item->cc_result, 'cc_result'); + } + } + + } return $items; } } @@ -460,10 +523,10 @@ class Ehealth_portalModelCervical_cancers extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_cervical_cancer"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_cervical_cancer"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -478,7 +541,7 @@ class Ehealth_portalModelCervical_cancers extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -493,13 +556,13 @@ class Ehealth_portalModelCervical_cancers extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -520,24 +583,26 @@ class Ehealth_portalModelCervical_cancers extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_cervical_cancer')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_cervical_cancer')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -552,8 +617,8 @@ class Ehealth_portalModelCervical_cancers extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_cervical_cancer'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_cervical_cancer'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/clinic.php b/admin/models/clinic.php index 446781a..6f4a12c 100644 --- a/admin/models/clinic.php +++ b/admin/models/clinic.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinic.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Clinic Model + * Ehealthportal Clinic Admin Model */ -class Ehealth_portalModelClinic extends JModelAdmin +class EhealthportalModelClinic extends AdminModel { /** * The tab layout fields array. @@ -57,7 +66,7 @@ class Ehealth_portalModelClinic extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -65,7 +74,7 @@ class Ehealth_portalModelClinic extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.clinic'; + public $typeAlias = 'com_ehealthportal.clinic'; /** * Returns a Table object, always creating it @@ -74,18 +83,18 @@ class Ehealth_portalModelClinic extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'clinic', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'clinic', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -114,12 +123,6 @@ class Ehealth_portalModelClinic extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.clinic'); - } } return $item; @@ -136,7 +139,7 @@ class Ehealth_portalModelClinic extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -156,14 +159,14 @@ class Ehealth_portalModelClinic extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.clinic', 'clinic', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.clinic', 'clinic', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -176,12 +179,12 @@ class Ehealth_portalModelClinic extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.clinic.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.clinic.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -197,7 +200,7 @@ class Ehealth_portalModelClinic extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -207,7 +210,7 @@ class Ehealth_portalModelClinic extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -215,8 +218,8 @@ class Ehealth_portalModelClinic extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Clinic Name access controls. - if ($id != 0 && (!$user->authorise('clinic.edit.clinic_name', 'com_ehealth_portal.clinic.' . (int) $id)) - || ($id == 0 && !$user->authorise('clinic.edit.clinic_name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('clinic.edit.clinic_name', 'com_ehealthportal.clinic.' . (int) $id)) + || ($id == 0 && !$user->authorise('clinic.edit.clinic_name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('clinic_name', 'disabled', 'true'); @@ -232,8 +235,8 @@ class Ehealth_portalModelClinic extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('clinic.edit.description', 'com_ehealth_portal.clinic.' . (int) $id)) - || ($id == 0 && !$user->authorise('clinic.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('clinic.edit.description', 'com_ehealthportal.clinic.' . (int) $id)) + || ($id == 0 && !$user->authorise('clinic.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -265,19 +268,26 @@ class Ehealth_portalModelClinic extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/clinic.js'; + return 'media/com_ehealthportal/js/clinic.js'; } - + /** * Method to test whether a record can be deleted. * @@ -296,9 +306,9 @@ class Ehealth_portalModelClinic extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.clinic.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.clinic.' . (int) $record->id); } return false; } @@ -314,42 +324,42 @@ class Ehealth_portalModelClinic extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.clinic.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.clinic.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.clinic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.clinic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -357,19 +367,19 @@ class Ehealth_portalModelClinic extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -381,10 +391,10 @@ class Ehealth_portalModelClinic extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_clinic')); + ->from($db->quoteName('#__ehealthportal_clinic')); $db->setQuery($query); $max = $db->loadResult(); @@ -396,7 +406,7 @@ class Ehealth_portalModelClinic extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -411,16 +421,16 @@ class Ehealth_portalModelClinic extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.clinic.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.clinic.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.clinic', $data); + $this->preprocessData('com_ehealthportal.clinic', $data); } return $data; @@ -435,9 +445,9 @@ class Ehealth_portalModelClinic extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -453,7 +463,7 @@ class Ehealth_portalModelClinic extends JModelAdmin { return false; } - + return true; } @@ -473,10 +483,10 @@ class Ehealth_portalModelClinic extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -502,30 +512,30 @@ class Ehealth_portalModelClinic extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('clinic'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('clinic'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -562,8 +572,7 @@ class Ehealth_portalModelClinic extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -589,13 +598,13 @@ class Ehealth_portalModelClinic extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('clinic'); + $this->canDo = EhealthportalHelper::getActions('clinic'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('clinic.batch')) { return false; } @@ -615,7 +624,7 @@ class Ehealth_portalModelClinic extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -628,7 +637,7 @@ class Ehealth_portalModelClinic extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -644,14 +653,14 @@ class Ehealth_portalModelClinic extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->clinic_name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->clinic_name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -663,7 +672,7 @@ class Ehealth_portalModelClinic extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -727,15 +736,15 @@ class Ehealth_portalModelClinic extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('clinic'); + $this->canDo = EhealthportalHelper::getActions('clinic'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('clinic.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -752,7 +761,7 @@ class Ehealth_portalModelClinic extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -768,13 +777,13 @@ class Ehealth_portalModelClinic extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -818,7 +827,7 @@ class Ehealth_portalModelClinic extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -830,23 +839,38 @@ class Ehealth_portalModelClinic extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('clinic', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "clinic", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -879,27 +903,27 @@ class Ehealth_portalModelClinic extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['clinic_name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['clinic_name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['clinic_name']); + $data['alias'] = OutputFilter::stringURLSafe($data['clinic_name']); } - $table = JTable::getInstance('clinic', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_CLINIC_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_CLINIC_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -909,7 +933,7 @@ class Ehealth_portalModelClinic extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -917,14 +941,14 @@ class Ehealth_portalModelClinic extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -937,7 +961,6 @@ class Ehealth_portalModelClinic extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -964,10 +987,10 @@ class Ehealth_portalModelClinic extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -982,7 +1005,7 @@ class Ehealth_portalModelClinic extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/clinics.php b/admin/models/clinics.php index 5b4cee4..634a98f 100644 --- a/admin/models/clinics.php +++ b/admin/models/clinics.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinics.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Clinics Model + * Clinics List Model */ -class Ehealth_portalModelClinics extends JModelList +class EhealthportalModelClinics extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelClinics extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelClinics extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelClinics extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_clinic', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_clinic', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelClinics extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelClinics extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelClinics extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_clinic table - $query->from($db->quoteName('#__ehealth_portal_clinic', 'a')); + // From the ehealthportal_clinic table + $query->from($db->quoteName('#__ehealthportal_clinic', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelClinics extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelClinics extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelClinics extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelClinics extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_clinic"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_clinic"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelClinics extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelClinics extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelClinics extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_clinic')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_clinic')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelClinics extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_clinic'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_clinic'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/counseling_type.php b/admin/models/counseling_type.php index c40d6ea..e5c6766 100644 --- a/admin/models/counseling_type.php +++ b/admin/models/counseling_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Counseling_type Model + * Ehealthportal Counseling_type Admin Model */ -class Ehealth_portalModelCounseling_type extends JModelAdmin +class EhealthportalModelCounseling_type extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.counseling_type'; + public $typeAlias = 'com_ehealthportal.counseling_type'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'counseling_type', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'counseling_type', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.counseling_type'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.counseling_type', 'counseling_type', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.counseling_type', 'counseling_type', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.counseling_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.counseling_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('counseling_type.edit.name', 'com_ehealth_portal.counseling_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('counseling_type.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('counseling_type.edit.name', 'com_ehealthportal.counseling_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('counseling_type.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('counseling_type.edit.description', 'com_ehealth_portal.counseling_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('counseling_type.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('counseling_type.edit.description', 'com_ehealthportal.counseling_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('counseling_type.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/counseling_type.js'; + return 'media/com_ehealthportal/js/counseling_type.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.counseling_type.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.counseling_type.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.counseling_type.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.counseling_type.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.counseling_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.counseling_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_counseling_type')); + ->from($db->quoteName('#__ehealthportal_counseling_type')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.counseling_type.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.counseling_type.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.counseling_type', $data); + $this->preprocessData('com_ehealthportal.counseling_type', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('counseling_type'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('counseling_type'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('counseling_type'); + $this->canDo = EhealthportalHelper::getActions('counseling_type'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('counseling_type.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('counseling_type'); + $this->canDo = EhealthportalHelper::getActions('counseling_type'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('counseling_type.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('counseling_type', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "counseling_type", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('counseling_type', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_COUNSELING_TYPE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_COUNSELING_TYPE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelCounseling_type extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/counseling_types.php b/admin/models/counseling_types.php index e9ddc35..94bfeb2 100644 --- a/admin/models/counseling_types.php +++ b/admin/models/counseling_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Counseling_types Model + * Counseling_types List Model */ -class Ehealth_portalModelCounseling_types extends JModelList +class EhealthportalModelCounseling_types extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelCounseling_types extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelCounseling_types extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelCounseling_types extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_counseling_type', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_counseling_type', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelCounseling_types extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelCounseling_types extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelCounseling_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_counseling_type table - $query->from($db->quoteName('#__ehealth_portal_counseling_type', 'a')); + // From the ehealthportal_counseling_type table + $query->from($db->quoteName('#__ehealthportal_counseling_type', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelCounseling_types extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelCounseling_types extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelCounseling_types extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelCounseling_types extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_counseling_type"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_counseling_type"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelCounseling_types extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelCounseling_types extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelCounseling_types extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_counseling_type')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_counseling_type')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelCounseling_types extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_counseling_type'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_counseling_type'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/diagnosis_type.php b/admin/models/diagnosis_type.php index c8cb681..d9daf26 100644 --- a/admin/models/diagnosis_type.php +++ b/admin/models/diagnosis_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Diagnosis_type Model + * Ehealthportal Diagnosis_type Admin Model */ -class Ehealth_portalModelDiagnosis_type extends JModelAdmin +class EhealthportalModelDiagnosis_type extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.diagnosis_type'; + public $typeAlias = 'com_ehealthportal.diagnosis_type'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'diagnosis_type', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'diagnosis_type', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.diagnosis_type'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.diagnosis_type', 'diagnosis_type', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.diagnosis_type', 'diagnosis_type', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.diagnosis_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.diagnosis_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('diagnosis_type.edit.name', 'com_ehealth_portal.diagnosis_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('diagnosis_type.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('diagnosis_type.edit.name', 'com_ehealthportal.diagnosis_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('diagnosis_type.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('diagnosis_type.edit.description', 'com_ehealth_portal.diagnosis_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('diagnosis_type.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('diagnosis_type.edit.description', 'com_ehealthportal.diagnosis_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('diagnosis_type.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/diagnosis_type.js'; + return 'media/com_ehealthportal/js/diagnosis_type.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.diagnosis_type.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.diagnosis_type.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.diagnosis_type.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.diagnosis_type.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.diagnosis_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.diagnosis_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_diagnosis_type')); + ->from($db->quoteName('#__ehealthportal_diagnosis_type')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.diagnosis_type.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.diagnosis_type.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.diagnosis_type', $data); + $this->preprocessData('com_ehealthportal.diagnosis_type', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('diagnosis_type'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('diagnosis_type'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('diagnosis_type'); + $this->canDo = EhealthportalHelper::getActions('diagnosis_type'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('diagnosis_type.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('diagnosis_type'); + $this->canDo = EhealthportalHelper::getActions('diagnosis_type'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('diagnosis_type.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('diagnosis_type', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "diagnosis_type", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('diagnosis_type', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelDiagnosis_type extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/diagnosis_types.php b/admin/models/diagnosis_types.php index 5c4519f..38b5c1e 100644 --- a/admin/models/diagnosis_types.php +++ b/admin/models/diagnosis_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Diagnosis_types Model + * Diagnosis_types List Model */ -class Ehealth_portalModelDiagnosis_types extends JModelList +class EhealthportalModelDiagnosis_types extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelDiagnosis_types extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_diagnosis_type', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_diagnosis_type', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelDiagnosis_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_diagnosis_type table - $query->from($db->quoteName('#__ehealth_portal_diagnosis_type', 'a')); + // From the ehealthportal_diagnosis_type table + $query->from($db->quoteName('#__ehealthportal_diagnosis_type', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelDiagnosis_types extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelDiagnosis_types extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_diagnosis_type"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_diagnosis_type"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelDiagnosis_types extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelDiagnosis_types extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelDiagnosis_types extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_diagnosis_type')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_diagnosis_type')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelDiagnosis_types extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_diagnosis_type'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_diagnosis_type'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/ehealth_portal.php b/admin/models/ehealthportal.php similarity index 73% rename from admin/models/ehealth_portal.php rename to admin/models/ehealthportal.php index 0860906..ba8aa51 100644 --- a/admin/models/ehealth_portal.php +++ b/admin/models/ehealthportal.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal - @subpackage ehealth_portal.php - @author Oh Martin + @subpackage ehealthportal.php + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,23 +26,35 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\Session\Session; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\Utilities\ArrayHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\StringHelper; + /** - * Ehealth_portal Model + * Ehealthportal List Model */ -class Ehealth_portalModelEhealth_portal extends JModelList +class EhealthportalModelEhealthportal extends ListModel { public function getIcons() { // load user for access menus - $user = JFactory::getUser(); + $user = Factory::getUser(); // reset icon array - $icons = array(); + $icons = []; // view groups array $viewGroups = array( 'main' => array('png.payment.add', 'png.payments', 'png.general_medical_check_up.add', 'png.general_medical_check_ups', 'png.antenatal_care.add', 'png.antenatal_cares', 'png.immunisation.add', 'png.immunisations', 'png.vmmc.add', 'png.vmmcs', 'png.prostate_and_testicular_cancer.add', 'png.prostate_and_testicular_cancers', 'png.tuberculosis.add', 'png.tuberculoses', 'png.hiv_counseling_and_testing.add', 'png.hiv_counselings_and_testings', 'png.family_planning.add', 'png.family_plannings', 'png.health_education.add', 'png.health_educations', 'png.cervical_cancer.add', 'png.cervical_cancers', 'png.breast_cancer.add', 'png.breast_cancers', 'png.test.add', 'png.tests', 'png.patient_queue') ); // view access array - $viewAccess = array( + $viewAccess = [ 'patient_queue.access' => 'patient_queue.access', 'patient_queue.submenu' => 'patient_queue.submenu', 'patient_queue.dashboard_list' => 'patient_queue.dashboard_list', @@ -111,28 +123,27 @@ class Ehealth_portalModelEhealth_portal extends JModelList 'tests.submenu' => 'test.submenu', 'tests.dashboard_list' => 'test.dashboard_list', 'test.dashboard_add' => 'test.dashboard_add', + 'foetal_lies.access' => 'foetal_lie.access', + 'foetal_lie.access' => 'foetal_lie.access', 'immunisation_vaccine_types.access' => 'immunisation_vaccine_type.access', 'immunisation_vaccine_type.access' => 'immunisation_vaccine_type.access', 'immunisation_vaccine_types.submenu' => 'immunisation_vaccine_type.submenu', - 'foetal_presentations.access' => 'foetal_presentation.access', - 'foetal_presentation.access' => 'foetal_presentation.access', - 'foetal_lies.access' => 'foetal_lie.access', - 'foetal_lie.access' => 'foetal_lie.access', - 'counseling_types.access' => 'counseling_type.access', - 'counseling_type.access' => 'counseling_type.access', 'foetal_engagements.access' => 'foetal_engagement.access', 'foetal_engagement.access' => 'foetal_engagement.access', - 'health_education_topics.access' => 'health_education_topic.access', - 'health_education_topic.access' => 'health_education_topic.access', + 'foetal_presentations.access' => 'foetal_presentation.access', + 'foetal_presentation.access' => 'foetal_presentation.access', 'testing_reasons.access' => 'testing_reason.access', 'testing_reason.access' => 'testing_reason.access', - 'clinics.access' => 'clinic.access', - 'clinic.access' => 'clinic.access', + 'counseling_types.access' => 'counseling_type.access', + 'counseling_type.access' => 'counseling_type.access', + 'health_education_topics.access' => 'health_education_topic.access', + 'health_education_topic.access' => 'health_education_topic.access', 'immunisation_types.access' => 'immunisation_type.access', 'immunisation_type.access' => 'immunisation_type.access', - 'units.access' => 'unit.access', - 'unit.access' => 'unit.access', - 'units.submenu' => 'unit.submenu', + 'immunisation_types.submenu' => 'immunisation_type.submenu', + 'strengths.access' => 'strength.access', + 'strength.access' => 'strength.access', + 'strengths.submenu' => 'strength.submenu', 'referrals.access' => 'referral.access', 'referral.access' => 'referral.access', 'referrals.submenu' => 'referral.submenu', @@ -145,23 +156,24 @@ class Ehealth_portalModelEhealth_portal extends JModelList 'medications.access' => 'medication.access', 'medication.access' => 'medication.access', 'medications.submenu' => 'medication.submenu', - 'payment_amounts.access' => 'payment_amount.access', - 'payment_amount.access' => 'payment_amount.access', + 'payment_types.access' => 'payment_type.access', + 'payment_type.access' => 'payment_type.access', 'administration_parts.access' => 'administration_part.access', 'administration_part.access' => 'administration_part.access', 'administration_parts.submenu' => 'administration_part.submenu', - 'payment_types.access' => 'payment_type.access', - 'payment_type.access' => 'payment_type.access', - 'strengths.access' => 'strength.access', - 'strength.access' => 'strength.access', - 'strengths.submenu' => 'strength.submenu', 'sites.access' => 'site.access', - 'site.access' => 'site.access'); + 'site.access' => 'site.access', + 'units.access' => 'unit.access', + 'unit.access' => 'unit.access', + 'units.submenu' => 'unit.submenu', + 'clinics.access' => 'clinic.access', + 'clinic.access' => 'clinic.access', + ]; // loop over the $views foreach($viewGroups as $group => $views) { $i = 0; - if (Ehealth_portalHelper::checkArray($views)) + if (UtilitiesArrayHelper::check($views)) { foreach($views as $view) { @@ -173,11 +185,11 @@ class Ehealth_portalModelEhealth_portal extends JModelList if (count($dwd) == 3) { list($type, $name, $url) = $dwd; - $viewName = $name; - $alt = $name; - $url = $url; - $image = $name . '.' . $type; - $name = 'COM_EHEALTH_PORTAL_DASHBOARD_' . Ehealth_portalHelper::safeString($name,'U'); + $viewName = $name; + $alt = $name; + $url = $url; + $image = $name . '.' . $type; + $name = 'COM_EHEALTHPORTAL_DASHBOARD_' . StringHelper::safe($name,'U'); } } // internal views @@ -199,11 +211,11 @@ class Ehealth_portalModelEhealth_portal extends JModelList switch($action) { case 'add': - $url = 'index.php?option=com_ehealth_portal&view=' . $name . '&layout=edit'; - $image = $name . '_' . $action. '.' . $type; - $alt = $name . ' ' . $action; - $name = 'COM_EHEALTH_PORTAL_DASHBOARD_'.Ehealth_portalHelper::safeString($name,'U').'_ADD'; - $add = true; + $url = 'index.php?option=com_ehealthportal&view=' . $name . '&layout=edit'; + $image = $name . '_' . $action. '.' . $type; + $alt = $name . ' ' . $action; + $name = 'COM_EHEALTHPORTAL_DASHBOARD_'.StringHelper::safe($name,'U').'_ADD'; + $add = true; break; default: // check for new convention (more stable) @@ -214,36 +226,36 @@ class Ehealth_portalModelEhealth_portal extends JModelList } else { - $extension = 'com_ehealth_portal.' . $name; + $extension = 'com_ehealthportal.' . $name; } - $url = 'index.php?option=com_categories&view=categories&extension=' . $extension; - $image = $name . '_' . $action . '.' . $type; - $alt = $viewName . ' ' . $action; - $name = 'COM_EHEALTH_PORTAL_DASHBOARD_' . Ehealth_portalHelper::safeString($name,'U') . '_' . Ehealth_portalHelper::safeString($action,'U'); + $url = 'index.php?option=com_categories&view=categories&extension=' . $extension; + $image = $name . '_' . $action . '.' . $type; + $alt = $viewName . ' ' . $action; + $name = 'COM_EHEALTHPORTAL_DASHBOARD_' . StringHelper::safe($name,'U') . '_' . StringHelper::safe($action,'U'); break; } } else { - $viewName = $name; - $alt = $name; - $url = 'index.php?option=com_ehealth_portal&view=' . $name; - $image = $name . '.' . $type; - $name = 'COM_EHEALTH_PORTAL_DASHBOARD_' . Ehealth_portalHelper::safeString($name,'U'); - $hover = false; + $viewName = $name; + $alt = $name; + $url = 'index.php?option=com_ehealthportal&view=' . $name; + $image = $name . '.' . $type; + $name = 'COM_EHEALTHPORTAL_DASHBOARD_' . StringHelper::safe($name,'U'); + $hover = false; } } else { - $viewName = $view; - $alt = $view; - $url = 'index.php?option=com_ehealth_portal&view=' . $view; - $image = $view . '.png'; - $name = ucwords($view).'

'; - $hover = false; + $viewName = $view; + $alt = $view; + $url = 'index.php?option=com_ehealthportal&view=' . $view; + $image = $view . '.png'; + $name = ucwords($view).'

'; + $hover = false; } // first make sure the view access is set - if (Ehealth_portalHelper::checkArray($viewAccess)) + if (UtilitiesArrayHelper::check($viewAccess)) { // setup some defaults $dashboard_add = false; @@ -251,11 +263,11 @@ class Ehealth_portalModelEhealth_portal extends JModelList $accessTo = ''; $accessAdd = ''; // access checking start - $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? Ehealth_portalHelper::checkString($viewAccess[$viewName.'.create']):false; - $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? Ehealth_portalHelper::checkString($viewAccess[$viewName.'.access']):false; + $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? StringHelper::check($viewAccess[$viewName.'.create']):false; + $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? StringHelper::check($viewAccess[$viewName.'.access']):false; // set main controllers - $accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? Ehealth_portalHelper::checkString($viewAccess[$viewName.'.dashboard_add']):false; - $accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? Ehealth_portalHelper::checkString($viewAccess[$viewName.'.dashboard_list']):false; + $accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? StringHelper::check($viewAccess[$viewName.'.dashboard_add']):false; + $accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? StringHelper::check($viewAccess[$viewName.'.dashboard_list']):false; // check for adding access if ($add && $accessCreate) { @@ -273,64 +285,64 @@ class Ehealth_portalModelEhealth_portal extends JModelList // set main access controllers if ($accessDashboard_add) { - $dashboard_add = $user->authorise($viewAccess[$viewName.'.dashboard_add'], 'com_ehealth_portal'); + $dashboard_add = $user->authorise($viewAccess[$viewName.'.dashboard_add'], 'com_ehealthportal'); } if ($accessDashboard_list) { - $dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_ehealth_portal'); + $dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_ehealthportal'); } - if (Ehealth_portalHelper::checkString($accessAdd) && Ehealth_portalHelper::checkString($accessTo)) + if (StringHelper::check($accessAdd) && StringHelper::check($accessTo)) { // check access - if($user->authorise($accessAdd, 'com_ehealth_portal') && $user->authorise($accessTo, 'com_ehealth_portal') && $dashboard_add) + if($user->authorise($accessAdd, 'com_ehealthportal') && $user->authorise($accessTo, 'com_ehealthportal') && $dashboard_add) { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; } } - elseif (Ehealth_portalHelper::checkString($accessTo)) + elseif (StringHelper::check($accessTo)) { // check access - if($user->authorise($accessTo, 'com_ehealth_portal') && $dashboard_list) + if($user->authorise($accessTo, 'com_ehealthportal') && $dashboard_list) { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; } } - elseif (Ehealth_portalHelper::checkString($accessAdd)) + elseif (StringHelper::check($accessAdd)) { // check access - if($user->authorise($accessAdd, 'com_ehealth_portal') && $dashboard_add) + if($user->authorise($accessAdd, 'com_ehealthportal') && $dashboard_add) { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; } } else { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; } } else { - $icons[$group][$i] = new StdClass; - $icons[$group][$i]->url = $url; - $icons[$group][$i]->name = $name; - $icons[$group][$i]->image = $image; - $icons[$group][$i]->alt = $alt; + $icons[$group][$i] = new StdClass; + $icons[$group][$i]->url = $url; + $icons[$group][$i]->name = $name; + $icons[$group][$i]->image = $image; + $icons[$group][$i]->alt = $alt; } $i++; } diff --git a/admin/models/family_planning.php b/admin/models/family_planning.php index 4a92468..a280712 100644 --- a/admin/models/family_planning.php +++ b/admin/models/family_planning.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_planning.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Family_planning Model + * Ehealthportal Family_planning Admin Model */ -class Ehealth_portalModelFamily_planning extends JModelAdmin +class EhealthportalModelFamily_planning extends AdminModel { /** * The tab layout fields array. @@ -55,7 +64,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -63,7 +72,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.family_planning'; + public $typeAlias = 'com_ehealthportal.family_planning'; /** * Returns a Table object, always creating it @@ -72,18 +81,18 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'family_planning', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'family_planning', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -112,12 +121,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.family_planning'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -134,7 +138,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -154,14 +158,14 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.family_planning', 'family_planning', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.family_planning', 'family_planning', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -174,12 +178,12 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.family_planning.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.family_planning.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -195,7 +199,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -205,7 +209,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -213,8 +217,8 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Diagnosis access controls. - if ($id != 0 && (!$user->authorise('family_planning.edit.diagnosis', 'com_ehealth_portal.family_planning.' . (int) $id)) - || ($id == 0 && !$user->authorise('family_planning.edit.diagnosis', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('family_planning.edit.diagnosis', 'com_ehealthportal.family_planning.' . (int) $id)) + || ($id == 0 && !$user->authorise('family_planning.edit.diagnosis', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('diagnosis', 'disabled', 'true'); @@ -246,19 +250,26 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/family_planning.js'; + return 'media/com_ehealthportal/js/family_planning.js'; } - + /** * Method to test whether a record can be deleted. * @@ -277,9 +288,9 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.family_planning.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.family_planning.' . (int) $record->id); } return false; } @@ -295,42 +306,42 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.family_planning.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.family_planning.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.family_planning.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.family_planning.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -338,19 +349,19 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -362,10 +373,10 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_family_planning')); + ->from($db->quoteName('#__ehealthportal_family_planning')); $db->setQuery($query); $max = $db->loadResult(); @@ -377,7 +388,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -392,16 +403,16 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.family_planning.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.family_planning.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.family_planning', $data); + $this->preprocessData('com_ehealthportal.family_planning', $data); } return $data; @@ -416,9 +427,9 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -434,7 +445,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin { return false; } - + return true; } @@ -454,10 +465,10 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -483,30 +494,30 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('family_planning'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('family_planning'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -543,8 +554,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -570,13 +580,13 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('family_planning'); + $this->canDo = EhealthportalHelper::getActions('family_planning'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('family_planning.batch')) { return false; } @@ -596,7 +606,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -609,7 +619,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -625,13 +635,19 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->diagnosis) && !is_numeric($this->table->diagnosis)) + { + $this->table->diagnosis = $this->generateUnique('diagnosis',$this->table->diagnosis); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -643,7 +659,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -707,15 +723,15 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('family_planning'); + $this->canDo = EhealthportalHelper::getActions('family_planning'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('family_planning.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -732,7 +748,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -748,13 +764,13 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -798,7 +814,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -810,23 +826,39 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('family_planning', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "family_planning", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -836,7 +868,7 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -844,14 +876,14 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -864,7 +896,6 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -875,4 +906,26 @@ class Ehealth_portalModelFamily_planning extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/family_plannings.php b/admin/models/family_plannings.php index b1e6155..ca90111 100644 --- a/admin/models/family_plannings.php +++ b/admin/models/family_plannings.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_plannings.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Family_plannings Model + * Family_plannings List Model */ -class Ehealth_portalModelFamily_plannings extends JModelList +class EhealthportalModelFamily_plannings extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,38 +132,52 @@ class Ehealth_portalModelFamily_plannings extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_family_planning', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_family_planning', 'a')); - // From the ehealth_portal_planning_type table. + // From the ehealthportal_planning_type table. $query->select($db->quoteName('g.name','diagnosis_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_planning_type', 'g') . ' ON (' . $db->quoteName('a.diagnosis') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_planning_type', 'g') . ' ON (' . $db->quoteName('a.diagnosis') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -176,7 +199,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -184,7 +207,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -217,7 +240,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -244,24 +267,24 @@ class Ehealth_portalModelFamily_plannings extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_family_planning table - $query->from($db->quoteName('#__ehealth_portal_family_planning', 'a')); + // From the ehealthportal_family_planning table + $query->from($db->quoteName('#__ehealthportal_family_planning', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -280,8 +303,18 @@ class Ehealth_portalModelFamily_plannings extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_planning_type table. + $query->select($db->quoteName('g.name','diagnosis')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_planning_type', 'g') . ' ON (' . $db->quoteName('a.diagnosis') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -298,10 +331,11 @@ class Ehealth_portalModelFamily_plannings extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -310,7 +344,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -328,10 +362,10 @@ class Ehealth_portalModelFamily_plannings extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_family_planning"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_family_planning"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -346,7 +380,7 @@ class Ehealth_portalModelFamily_plannings extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -361,13 +395,13 @@ class Ehealth_portalModelFamily_plannings extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -389,24 +423,26 @@ class Ehealth_portalModelFamily_plannings extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_family_planning')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_family_planning')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -421,8 +457,8 @@ class Ehealth_portalModelFamily_plannings extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_family_planning'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_family_planning'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/fields/administrationparts.php b/admin/models/fields/administrationparts.php index 772d934..ce860eb 100644 --- a/admin/models/fields/administrationparts.php +++ b/admin/models/fields/administrationparts.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administrationparts.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Administrationparts Form Field class for the Ehealth_portal component + * Administrationparts Form Field class for the Ehealthportal component */ class JFormFieldAdministrationparts extends JFormFieldList { /** * The administrationparts field type. * - * @var string + * @var string */ public $type = 'administrationparts'; @@ -62,7 +66,7 @@ class JFormFieldAdministrationparts extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldAdministrationparts extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldAdministrationparts extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create administration_part - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit administration_part - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldAdministrationparts extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=administration_parts&task=administration_part.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=administration_parts&task=administration_part.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldAdministrationparts extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldAdministrationparts extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldAdministrationparts extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','administration_part_name'))); - $query->from($db->quoteName('#__ehealth_portal_administration_part', 'a')); + $query->from($db->quoteName('#__ehealthportal_administration_part', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_administration_part'); + $columns = $db->getTableColumns('#__ehealthportal_administration_part'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/antenatalcaresfilterpatient.php b/admin/models/fields/antenatalcaresfilterpatient.php index ebe797b..f6cd5de 100644 --- a/admin/models/fields/antenatalcaresfilterpatient.php +++ b/admin/models/fields/antenatalcaresfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatalcaresfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Antenatalcaresfilterpatient Form Field class for the Ehealth_portal component + * Antenatalcaresfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldAntenatalcaresfilterpatient extends JFormFieldList { /** * The antenatalcaresfilterpatient field type. * - * @var string + * @var string */ public $type = 'antenatalcaresfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_antenatal_care')); + $query->from($db->quoteName('#__ehealthportal_antenatal_care')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/breastcancersfilterpatient.php b/admin/models/fields/breastcancersfilterpatient.php index b5424c1..364d849 100644 --- a/admin/models/fields/breastcancersfilterpatient.php +++ b/admin/models/fields/breastcancersfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breastcancersfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Breastcancersfilterpatient Form Field class for the Ehealth_portal component + * Breastcancersfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldBreastcancersfilterpatient extends JFormFieldList { /** * The breastcancersfilterpatient field type. * - * @var string + * @var string */ public $type = 'breastcancersfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_breast_cancer')); + $query->from($db->quoteName('#__ehealthportal_breast_cancer')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/cervicalcancersfilterpatient.php b/admin/models/fields/cervicalcancersfilterpatient.php index 4d89548..9adc682 100644 --- a/admin/models/fields/cervicalcancersfilterpatient.php +++ b/admin/models/fields/cervicalcancersfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervicalcancersfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Cervicalcancersfilterpatient Form Field class for the Ehealth_portal component + * Cervicalcancersfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldCervicalcancersfilterpatient extends JFormFieldList { /** * The cervicalcancersfilterpatient field type. * - * @var string + * @var string */ public $type = 'cervicalcancersfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_cervical_cancer')); + $query->from($db->quoteName('#__ehealthportal_cervical_cancer')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/diagnosis.php b/admin/models/fields/diagnosis.php index a7f00c4..22e0706 100644 --- a/admin/models/fields/diagnosis.php +++ b/admin/models/fields/diagnosis.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Diagnosis Form Field class for the Ehealth_portal component + * Diagnosis Form Field class for the Ehealthportal component */ class JFormFieldDiagnosis extends JFormFieldList { /** * The diagnosis field type. * - * @var string + * @var string */ public $type = 'diagnosis'; @@ -62,7 +66,7 @@ class JFormFieldDiagnosis extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldDiagnosis extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldDiagnosis extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create diagnosis_type - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit diagnosis_type - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldDiagnosis extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=diagnosis_types&task=diagnosis_type.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=diagnosis_types&task=diagnosis_type.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldDiagnosis extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldDiagnosis extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldDiagnosis extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','diagnosis_name'))); - $query->from($db->quoteName('#__ehealth_portal_diagnosis_type', 'a')); + $query->from($db->quoteName('#__ehealthportal_diagnosis_type', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_diagnosis_type'); + $columns = $db->getTableColumns('#__ehealthportal_diagnosis_type'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); @@ -177,7 +181,10 @@ class JFormFieldDiagnosis extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_EHEALTHPORTAL_SELECT_AN_OPTION')); + } foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->diagnosis_name); diff --git a/admin/models/fields/familyplanning.php b/admin/models/fields/familyplanning.php index df04405..4487af6 100644 --- a/admin/models/fields/familyplanning.php +++ b/admin/models/fields/familyplanning.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage familyplanning.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Familyplanning Form Field class for the Ehealth_portal component + * Familyplanning Form Field class for the Ehealthportal component */ class JFormFieldFamilyplanning extends JFormFieldList { /** * The familyplanning field type. * - * @var string + * @var string */ public $type = 'familyplanning'; @@ -62,7 +66,7 @@ class JFormFieldFamilyplanning extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldFamilyplanning extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldFamilyplanning extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create planning_type - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit planning_type - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldFamilyplanning extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=planning_types&task=planning_type.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=planning_types&task=planning_type.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldFamilyplanning extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldFamilyplanning extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldFamilyplanning extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','diagnosis_name'))); - $query->from($db->quoteName('#__ehealth_portal_planning_type', 'a')); + $query->from($db->quoteName('#__ehealthportal_planning_type', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_planning_type'); + $columns = $db->getTableColumns('#__ehealthportal_planning_type'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/familyplanningsfilterpatient.php b/admin/models/fields/familyplanningsfilterpatient.php index e24ee57..18b47fe 100644 --- a/admin/models/fields/familyplanningsfilterpatient.php +++ b/admin/models/fields/familyplanningsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage familyplanningsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Familyplanningsfilterpatient Form Field class for the Ehealth_portal component + * Familyplanningsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldFamilyplanningsfilterpatient extends JFormFieldList { /** * The familyplanningsfilterpatient field type. * - * @var string + * @var string */ public $type = 'familyplanningsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_family_planning')); + $query->from($db->quoteName('#__ehealthportal_family_planning')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/foetalengagement.php b/admin/models/fields/foetalengagement.php index 7e50935..609f0f0 100644 --- a/admin/models/fields/foetalengagement.php +++ b/admin/models/fields/foetalengagement.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetalengagement.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Foetalengagement Form Field class for the Ehealth_portal component + * Foetalengagement Form Field class for the Ehealthportal component */ class JFormFieldFoetalengagement extends JFormFieldList { /** * The foetalengagement field type. * - * @var string + * @var string */ public $type = 'foetalengagement'; @@ -62,7 +66,7 @@ class JFormFieldFoetalengagement extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldFoetalengagement extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldFoetalengagement extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create foetal_engagement - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit foetal_engagement - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldFoetalengagement extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=foetal_engagements&task=foetal_engagement.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=foetal_engagements&task=foetal_engagement.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldFoetalengagement extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldFoetalengagement extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldFoetalengagement extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','foetal_engagement_name'))); - $query->from($db->quoteName('#__ehealth_portal_foetal_engagement', 'a')); + $query->from($db->quoteName('#__ehealthportal_foetal_engagement', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_foetal_engagement'); + $columns = $db->getTableColumns('#__ehealthportal_foetal_engagement'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/foetallie.php b/admin/models/fields/foetallie.php index 857868f..101528f 100644 --- a/admin/models/fields/foetallie.php +++ b/admin/models/fields/foetallie.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetallie.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Foetallie Form Field class for the Ehealth_portal component + * Foetallie Form Field class for the Ehealthportal component */ class JFormFieldFoetallie extends JFormFieldList { /** * The foetallie field type. * - * @var string + * @var string */ public $type = 'foetallie'; @@ -62,7 +66,7 @@ class JFormFieldFoetallie extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldFoetallie extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldFoetallie extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create foetal_lie - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit foetal_lie - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldFoetallie extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=foetal_lies&task=foetal_lie.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=foetal_lies&task=foetal_lie.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldFoetallie extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldFoetallie extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldFoetallie extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','foetal_lie_name'))); - $query->from($db->quoteName('#__ehealth_portal_foetal_lie', 'a')); + $query->from($db->quoteName('#__ehealthportal_foetal_lie', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_foetal_lie'); + $columns = $db->getTableColumns('#__ehealthportal_foetal_lie'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/foetalpresentation.php b/admin/models/fields/foetalpresentation.php index d66afd4..2dd2347 100644 --- a/admin/models/fields/foetalpresentation.php +++ b/admin/models/fields/foetalpresentation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetalpresentation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Foetalpresentation Form Field class for the Ehealth_portal component + * Foetalpresentation Form Field class for the Ehealthportal component */ class JFormFieldFoetalpresentation extends JFormFieldList { /** * The foetalpresentation field type. * - * @var string + * @var string */ public $type = 'foetalpresentation'; @@ -62,7 +66,7 @@ class JFormFieldFoetalpresentation extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldFoetalpresentation extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldFoetalpresentation extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create foetal_presentation - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit foetal_presentation - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldFoetalpresentation extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=foetal_presentations&task=foetal_presentation.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=foetal_presentations&task=foetal_presentation.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldFoetalpresentation extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldFoetalpresentation extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldFoetalpresentation extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','foetal_presentation_name'))); - $query->from($db->quoteName('#__ehealth_portal_foetal_presentation', 'a')); + $query->from($db->quoteName('#__ehealthportal_foetal_presentation', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_foetal_presentation'); + $columns = $db->getTableColumns('#__ehealthportal_foetal_presentation'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/generalmedicalcheckupsfilterpatient.php b/admin/models/fields/generalmedicalcheckupsfilterpatient.php index 9714d89..fa396d6 100644 --- a/admin/models/fields/generalmedicalcheckupsfilterpatient.php +++ b/admin/models/fields/generalmedicalcheckupsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage generalmedicalcheckupsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Generalmedicalcheckupsfilterpatient Form Field class for the Ehealth_portal component + * Generalmedicalcheckupsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldGeneralmedicalcheckupsfilterpatient extends JFormFieldList { /** * The generalmedicalcheckupsfilterpatient field type. * - * @var string + * @var string */ public $type = 'generalmedicalcheckupsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_general_medical_check_up')); + $query->from($db->quoteName('#__ehealthportal_general_medical_check_up')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/healtheducationsfiltereducationtype.php b/admin/models/fields/healtheducationsfiltereducationtype.php index 3921b00..c5148d9 100644 --- a/admin/models/fields/healtheducationsfiltereducationtype.php +++ b/admin/models/fields/healtheducationsfiltereducationtype.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage healtheducationsfiltereducationtype.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,58 +26,62 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Healtheducationsfiltereducationtype Form Field class for the Ehealth_portal component + * Healtheducationsfiltereducationtype Form Field class for the Ehealthportal component */ class JFormFieldHealtheducationsfiltereducationtype extends JFormFieldList { /** * The healtheducationsfiltereducationtype field type. * - * @var string + * @var string */ public $type = 'healtheducationsfiltereducationtype'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('education_type')); - $query->from($db->quoteName('#__ehealth_portal_health_education')); + $query->from($db->quoteName('#__ehealthportal_health_education')); $query->order($db->quoteName('education_type') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_TYPE') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_TYPE') . ' -'); - if ($results) + if ($_results) { // get health_educationsmodel - $model = Ehealth_portalHelper::getModel('health_educations'); - $results = array_unique($results); - foreach ($results as $education_type) + $_model = EhealthportalHelper::getModel('health_educations'); + $_results = array_unique($_results); + foreach ($_results as $education_type) { // Translate the education_type selection - $text = $model->selectionTranslation($education_type,'education_type'); + $_text = $_model->selectionTranslation($education_type,'education_type'); // Now add the education_type and its text to the options array - $_filter[] = JHtml::_('select.option', $education_type, JText::_($text)); + $_filter[] = Html::_('select.option', $education_type, Text::_($_text)); } } return $_filter; diff --git a/admin/models/fields/healtheducationsfilterpatient.php b/admin/models/fields/healtheducationsfilterpatient.php index 0174342..db1e608 100644 --- a/admin/models/fields/healtheducationsfilterpatient.php +++ b/admin/models/fields/healtheducationsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage healtheducationsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,53 +26,57 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Healtheducationsfilterpatient Form Field class for the Ehealth_portal component + * Healtheducationsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldHealtheducationsfilterpatient extends JFormFieldList { /** * The healtheducationsfilterpatient field type. * - * @var string + * @var string */ public $type = 'healtheducationsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_health_education')); + $query->from($db->quoteName('#__ehealthportal_health_education')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); + $_results = $db->loadColumn(); + $_filter = []; - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/healtheducationtopics.php b/admin/models/fields/healtheducationtopics.php index de28c21..fb123f6 100644 --- a/admin/models/fields/healtheducationtopics.php +++ b/admin/models/fields/healtheducationtopics.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage healtheducationtopics.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Healtheducationtopics Form Field class for the Ehealth_portal component + * Healtheducationtopics Form Field class for the Ehealthportal component */ class JFormFieldHealtheducationtopics extends JFormFieldList { /** * The healtheducationtopics field type. * - * @var string + * @var string */ public $type = 'healtheducationtopics'; @@ -62,7 +66,7 @@ class JFormFieldHealtheducationtopics extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldHealtheducationtopics extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldHealtheducationtopics extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create health_education_topic - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit health_education_topic - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldHealtheducationtopics extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=health_education_topics&task=health_education_topic.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=health_education_topics&task=health_education_topic.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldHealtheducationtopics extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldHealtheducationtopics extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldHealtheducationtopics extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','health_education_topic_name'))); - $query->from($db->quoteName('#__ehealth_portal_health_education_topic', 'a')); + $query->from($db->quoteName('#__ehealthportal_health_education_topic', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_health_education_topic'); + $columns = $db->getTableColumns('#__ehealthportal_health_education_topic'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/hivcounselingsandtestingsfilterpatient.php b/admin/models/fields/hivcounselingsandtestingsfilterpatient.php index af571d0..52213b7 100644 --- a/admin/models/fields/hivcounselingsandtestingsfilterpatient.php +++ b/admin/models/fields/hivcounselingsandtestingsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hivcounselingsandtestingsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Hivcounselingsandtestingsfilterpatient Form Field class for the Ehealth_portal component + * Hivcounselingsandtestingsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldHivcounselingsandtestingsfilterpatient extends JFormFieldList { /** * The hivcounselingsandtestingsfilterpatient field type. * - * @var string + * @var string */ public $type = 'hivcounselingsandtestingsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_hiv_counseling_and_testing')); + $query->from($db->quoteName('#__ehealthportal_hiv_counseling_and_testing')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/immunisationsfilterpatient.php b/admin/models/fields/immunisationsfilterpatient.php index ca4aabd..c7e9d06 100644 --- a/admin/models/fields/immunisationsfilterpatient.php +++ b/admin/models/fields/immunisationsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisationsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Immunisationsfilterpatient Form Field class for the Ehealth_portal component + * Immunisationsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldImmunisationsfilterpatient extends JFormFieldList { /** * The immunisationsfilterpatient field type. * - * @var string + * @var string */ public $type = 'immunisationsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_immunisation')); + $query->from($db->quoteName('#__ehealthportal_immunisation')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/immunisationtype.php b/admin/models/fields/immunisationtype.php index ae71a45..f5fe9a8 100644 --- a/admin/models/fields/immunisationtype.php +++ b/admin/models/fields/immunisationtype.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisationtype.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,26 +26,30 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Immunisationtype Form Field class for the Ehealth_portal component + * Immunisationtype Form Field class for the Ehealthportal component */ class JFormFieldImmunisationtype extends JFormFieldList { /** * The immunisationtype field type. * - * @var string + * @var string */ public $type = 'immunisationtype'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -55,13 +59,13 @@ class JFormFieldImmunisationtype extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','immunisation_type_name'))); - $query->from($db->quoteName('#__ehealth_portal_immunisation_type', 'a')); + $query->from($db->quoteName('#__ehealthportal_immunisation_type', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_immunisation_type'); + $columns = $db->getTableColumns('#__ehealthportal_immunisation_type'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/immunisationvaccinetypes.php b/admin/models/fields/immunisationvaccinetypes.php index 5ede20c..c331cdb 100644 --- a/admin/models/fields/immunisationvaccinetypes.php +++ b/admin/models/fields/immunisationvaccinetypes.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisationvaccinetypes.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,130 +26,30 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Immunisationvaccinetypes Form Field class for the Ehealth_portal component + * Immunisationvaccinetypes Form Field class for the Ehealthportal component */ class JFormFieldImmunisationvaccinetypes extends JFormFieldList { /** * The immunisationvaccinetypes field type. * - * @var string + * @var string */ public $type = 'immunisationvaccinetypes'; - /** - * Override to add new button - * - * @return string The field input markup. - * - * @since 3.2 - */ - protected function getInput() - { - // see if we should add buttons - $set_button = $this->getAttribute('button'); - // get html - $html = parent::getInput(); - // if true set button - if ($set_button === 'true') - { - $button = array(); - $script = array(); - $button_code_name = $this->getAttribute('name'); - // get the input from url - $app = JFactory::getApplication(); - $jinput = $app->input; - // get the view name & id - $values = $jinput->getArray(array( - 'id' => 'int', - 'view' => 'word' - )); - // check if new item - $ref = ''; - $refJ = ''; - if (!is_null($values['id']) && strlen($values['view'])) - { - // only load referral if not new item. - $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; - $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; - // get the return value. - $_uri = (string) JUri::getInstance(); - $_return = urlencode(base64_encode($_uri)); - // load return value. - $ref .= '&return=' . $_return; - $refJ .= '&return=' . $_return; - } - // get button label - $button_label = trim($button_code_name); - $button_label = preg_replace('/_+/', ' ', $button_label); - $button_label = preg_replace('/\s+/', ' ', $button_label); - $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); - $button_label = ucfirst(strtolower($button_label)); - // get user object - $user = JFactory::getUser(); - // only add if user allowed to create immunisation_vaccine_type - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. - { - // build Create button - $button[] = ' - '; - } - // only add if user allowed to edit immunisation_vaccine_type - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. - { - // build edit button - $button[] = ''; - // build script - $script[] = " - jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { - e.preventDefault(); - var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); - ".$button_code_name."Button(".$button_code_name."Value); - }); - var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); - ".$button_code_name."Button(".$button_code_name."Value); - }); - function ".$button_code_name."Button(value) { - if (value > 0) { - // hide the create button - jQuery('#".$button_code_name."Create').hide(); - // show edit button - jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=immunisation_vaccine_types&task=immunisation_vaccine_type.edit&id='+value+'".$refJ."'; - jQuery('#".$button_code_name."Edit').attr('href', url); - } else { - // show the create button - jQuery('#".$button_code_name."Create').show(); - // hide edit button - jQuery('#".$button_code_name."Edit').hide(); - } - }"; - } - // check if button was created for immunisation_vaccine_type field. - if (is_array($button) && count($button) > 0) - { - // Load the needed script. - $document = JFactory::getDocument(); - $document->addScriptDeclaration(implode(' ',$script)); - // return the button attached to input field. - return '
' .$html . implode('',$button).'
'; - } - } - return $html; - } - /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +59,13 @@ class JFormFieldImmunisationvaccinetypes extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','immunisation_vaccine_type_name'))); - $query->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type', 'a')); + $query->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_immunisation_vaccine_type'); + $columns = $db->getTableColumns('#__ehealthportal_immunisation_vaccine_type'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/medication.php b/admin/models/fields/medication.php index 86afee5..e43b341 100644 --- a/admin/models/fields/medication.php +++ b/admin/models/fields/medication.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medication.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,26 +26,30 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Medication Form Field class for the Ehealth_portal component + * Medication Form Field class for the Ehealthportal component */ class JFormFieldMedication extends JFormFieldList { /** * The medication field type. * - * @var string + * @var string */ public $type = 'medication'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -55,13 +59,13 @@ class JFormFieldMedication extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','medication_name'))); - $query->from($db->quoteName('#__ehealth_portal_medication', 'a')); + $query->from($db->quoteName('#__ehealthportal_medication', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_medication'); + $columns = $db->getTableColumns('#__ehealthportal_medication'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/nonpayreason.php b/admin/models/fields/nonpayreason.php index b7a3953..816c8d0 100644 --- a/admin/models/fields/nonpayreason.php +++ b/admin/models/fields/nonpayreason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpayreason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Nonpayreason Form Field class for the Ehealth_portal component + * Nonpayreason Form Field class for the Ehealthportal component */ class JFormFieldNonpayreason extends JFormFieldList { /** * The nonpayreason field type. * - * @var string + * @var string */ public $type = 'nonpayreason'; @@ -62,7 +66,7 @@ class JFormFieldNonpayreason extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldNonpayreason extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldNonpayreason extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create nonpay_reason - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit nonpay_reason - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldNonpayreason extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=nonpay_reasons&task=nonpay_reason.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=nonpay_reasons&task=nonpay_reason.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldNonpayreason extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldNonpayreason extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldNonpayreason extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','nonpay_reason_name'))); - $query->from($db->quoteName('#__ehealth_portal_nonpay_reason', 'a')); + $query->from($db->quoteName('#__ehealthportal_nonpay_reason', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_nonpay_reason'); + $columns = $db->getTableColumns('#__ehealthportal_nonpay_reason'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/paymentsfilterpatient.php b/admin/models/fields/paymentsfilterpatient.php index bec82ab..75b90a0 100644 --- a/admin/models/fields/paymentsfilterpatient.php +++ b/admin/models/fields/paymentsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage paymentsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Paymentsfilterpatient Form Field class for the Ehealth_portal component + * Paymentsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldPaymentsfilterpatient extends JFormFieldList { /** * The paymentsfilterpatient field type. * - * @var string + * @var string */ public $type = 'paymentsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_payment')); + $query->from($db->quoteName('#__ehealthportal_payment')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/paymentsfilterpaymentamount.php b/admin/models/fields/paymentsfilterpaymentamount.php index ee139c1..fac677f 100644 --- a/admin/models/fields/paymentsfilterpaymentamount.php +++ b/admin/models/fields/paymentsfilterpaymentamount.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage paymentsfilterpaymentamount.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,57 +26,61 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Paymentsfilterpaymentamount Form Field class for the Ehealth_portal component + * Paymentsfilterpaymentamount Form Field class for the Ehealthportal component */ class JFormFieldPaymentsfilterpaymentamount extends JFormFieldList { /** * The paymentsfilterpaymentamount field type. * - * @var string + * @var string */ public $type = 'paymentsfilterpaymentamount'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('payment_amount')); - $query->from($db->quoteName('#__ehealth_portal_payment')); + $query->from($db->quoteName('#__ehealthportal_payment')); $query->order($db->quoteName('payment_amount') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); + $_results = $db->loadColumn(); + $_filter = []; - if ($results) + if ($_results) { // get paymentsmodel - $model = Ehealth_portalHelper::getModel('payments'); - $results = array_unique($results); - foreach ($results as $payment_amount) + $_model = EhealthportalHelper::getModel('payments'); + $_results = array_unique($_results); + foreach ($_results as $payment_amount) { // Translate the payment_amount selection - $text = $model->selectionTranslation($payment_amount,'payment_amount'); + $_text = $_model->selectionTranslation($payment_amount,'payment_amount'); // Now add the payment_amount and its text to the options array - $_filter[] = JHtml::_('select.option', $payment_amount, JText::_($text)); + $_filter[] = Html::_('select.option', $payment_amount, Text::_($_text)); } } return $_filter; diff --git a/admin/models/fields/paymentsfilterpaymentcategory.php b/admin/models/fields/paymentsfilterpaymentcategory.php index b2d7986..2de77ac 100644 --- a/admin/models/fields/paymentsfilterpaymentcategory.php +++ b/admin/models/fields/paymentsfilterpaymentcategory.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage paymentsfilterpaymentcategory.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,58 +26,62 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Paymentsfilterpaymentcategory Form Field class for the Ehealth_portal component + * Paymentsfilterpaymentcategory Form Field class for the Ehealthportal component */ class JFormFieldPaymentsfilterpaymentcategory extends JFormFieldList { /** * The paymentsfilterpaymentcategory field type. * - * @var string + * @var string */ public $type = 'paymentsfilterpaymentcategory'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('payment_category')); - $query->from($db->quoteName('#__ehealth_portal_payment')); + $query->from($db->quoteName('#__ehealthportal_payment')); $query->order($db->quoteName('payment_category') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PAYMENT_CATEGORY') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PAYMENT_CATEGORY') . ' -'); - if ($results) + if ($_results) { // get paymentsmodel - $model = Ehealth_portalHelper::getModel('payments'); - $results = array_unique($results); - foreach ($results as $payment_category) + $_model = EhealthportalHelper::getModel('payments'); + $_results = array_unique($_results); + foreach ($_results as $payment_category) { // Translate the payment_category selection - $text = $model->selectionTranslation($payment_category,'payment_category'); + $_text = $_model->selectionTranslation($payment_category,'payment_category'); // Now add the payment_category and its text to the options array - $_filter[] = JHtml::_('select.option', $payment_category, JText::_($text)); + $_filter[] = Html::_('select.option', $payment_category, Text::_($_text)); } } return $_filter; diff --git a/admin/models/fields/paymenttype.php b/admin/models/fields/paymenttype.php index 44024ce..0a32439 100644 --- a/admin/models/fields/paymenttype.php +++ b/admin/models/fields/paymenttype.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage paymenttype.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Paymenttype Form Field class for the Ehealth_portal component + * Paymenttype Form Field class for the Ehealthportal component */ class JFormFieldPaymenttype extends JFormFieldList { /** * The paymenttype field type. * - * @var string + * @var string */ public $type = 'paymenttype'; @@ -62,7 +66,7 @@ class JFormFieldPaymenttype extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldPaymenttype extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldPaymenttype extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create payment_type - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit payment_type - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldPaymenttype extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=payment_types&task=payment_type.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=payment_types&task=payment_type.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldPaymenttype extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldPaymenttype extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldPaymenttype extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','payment_type_name'))); - $query->from($db->quoteName('#__ehealth_portal_payment_type', 'a')); + $query->from($db->quoteName('#__ehealthportal_payment_type', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_payment_type'); + $columns = $db->getTableColumns('#__ehealthportal_payment_type'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/prostateandtesticularcancersfilterpatient.php b/admin/models/fields/prostateandtesticularcancersfilterpatient.php index 2ffa7d3..5b1f96e 100644 --- a/admin/models/fields/prostateandtesticularcancersfilterpatient.php +++ b/admin/models/fields/prostateandtesticularcancersfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostateandtesticularcancersfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Prostateandtesticularcancersfilterpatient Form Field class for the Ehealth_portal component + * Prostateandtesticularcancersfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldProstateandtesticularcancersfilterpatient extends JFormFieldList { /** * The prostateandtesticularcancersfilterpatient field type. * - * @var string + * @var string */ public $type = 'prostateandtesticularcancersfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_prostate_and_testicular_cancer')); + $query->from($db->quoteName('#__ehealthportal_prostate_and_testicular_cancer')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/referrals.php b/admin/models/fields/referrals.php index d7b5278..f1aec08 100644 --- a/admin/models/fields/referrals.php +++ b/admin/models/fields/referrals.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Referrals Form Field class for the Ehealth_portal component + * Referrals Form Field class for the Ehealthportal component */ class JFormFieldReferrals extends JFormFieldList { /** * The referrals field type. * - * @var string + * @var string */ public $type = 'referrals'; @@ -62,7 +66,7 @@ class JFormFieldReferrals extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldReferrals extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldReferrals extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create referral - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit referral - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldReferrals extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=referrals&task=referral.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=referrals&task=referral.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldReferrals extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldReferrals extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,34 +163,33 @@ class JFormFieldReferrals extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','referral_name'))); - $query->from($db->quoteName('#__ehealth_portal_referral', 'a')); + $query->from($db->quoteName('#__ehealthportal_referral', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_referral'); + $columns = $db->getTableColumns('#__ehealthportal_referral'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } } - $db->setQuery((string)$query); $items = $db->loadObjectList(); $options = array(); if ($items) { - if ($this->multiple === false) { - $options[] = JHtml::_('select.option', '', 'Select Referral'); + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_EHEALTHPORTAL_SELECT_OPTION')); } foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->referral_name); } } - return $options; - + return $options; } } diff --git a/admin/models/fields/stengths.php b/admin/models/fields/stengths.php index f1ae0ab..eabb8b0 100644 --- a/admin/models/fields/stengths.php +++ b/admin/models/fields/stengths.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage stengths.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,26 +26,30 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Stengths Form Field class for the Ehealth_portal component + * Stengths Form Field class for the Ehealthportal component */ class JFormFieldStengths extends JFormFieldList { /** * The stengths field type. * - * @var string + * @var string */ public $type = 'stengths'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -55,13 +59,13 @@ class JFormFieldStengths extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','strength_name'))); - $query->from($db->quoteName('#__ehealth_portal_strength', 'a')); + $query->from($db->quoteName('#__ehealthportal_strength', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_strength'); + $columns = $db->getTableColumns('#__ehealthportal_strength'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/testingreason.php b/admin/models/fields/testingreason.php index a5f7a3a..d74282f 100644 --- a/admin/models/fields/testingreason.php +++ b/admin/models/fields/testingreason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testingreason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,19 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Testingreason Form Field class for the Ehealth_portal component + * Testingreason Form Field class for the Ehealthportal component */ class JFormFieldTestingreason extends JFormFieldList { /** * The testingreason field type. * - * @var string + * @var string */ public $type = 'testingreason'; @@ -62,7 +66,7 @@ class JFormFieldTestingreason extends JFormFieldList $script = array(); $button_code_name = $this->getAttribute('name'); // get the input from url - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $jinput = $app->input; // get the view name & id $values = $jinput->getArray(array( @@ -78,7 +82,7 @@ class JFormFieldTestingreason extends JFormFieldList $ref = '&ref=' . $values['view'] . '&refid=' . $values['id']; $refJ = '&ref=' . $values['view'] . '&refid=' . $values['id']; // get the return value. - $_uri = (string) JUri::getInstance(); + $_uri = (string) \Joomla\CMS\Uri\Uri::getInstance(); $_return = urlencode(base64_encode($_uri)); // load return value. $ref .= '&return=' . $_return; @@ -91,20 +95,20 @@ class JFormFieldTestingreason extends JFormFieldList $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); $button_label = ucfirst(strtolower($button_label)); // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // only add if user allowed to create testing_reason - if ($user->authorise('core.create', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.create', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build Create button - $button[] = ' + $button[] = ' '; } // only add if user allowed to edit testing_reason - if ($user->authorise('core.edit', 'com_ehealth_portal') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_ehealthportal') && $app->isClient('administrator')) // TODO for now only in admin area. { // build edit button - $button[] = ''; // build script $script[] = " @@ -123,7 +127,7 @@ class JFormFieldTestingreason extends JFormFieldList jQuery('#".$button_code_name."Create').hide(); // show edit button jQuery('#".$button_code_name."Edit').show(); - var url = 'index.php?option=com_ehealth_portal&view=testing_reasons&task=testing_reason.edit&id='+value+'".$refJ."'; + var url = 'index.php?option=com_ehealthportal&view=testing_reasons&task=testing_reason.edit&id='+value+'".$refJ."'; jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button @@ -137,7 +141,7 @@ class JFormFieldTestingreason extends JFormFieldList if (is_array($button) && count($button) > 0) { // Load the needed script. - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $document->addScriptDeclaration(implode(' ',$script)); // return the button attached to input field. return '
' .$html . implode('',$button).'
'; @@ -149,7 +153,7 @@ class JFormFieldTestingreason extends JFormFieldList /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -159,13 +163,13 @@ class JFormFieldTestingreason extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','testing_reason_name'))); - $query->from($db->quoteName('#__ehealth_portal_testing_reason', 'a')); + $query->from($db->quoteName('#__ehealthportal_testing_reason', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_testing_reason'); + $columns = $db->getTableColumns('#__ehealthportal_testing_reason'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); diff --git a/admin/models/fields/testsfilterpatient.php b/admin/models/fields/testsfilterpatient.php index 87ebc23..4a55dea 100644 --- a/admin/models/fields/testsfilterpatient.php +++ b/admin/models/fields/testsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Testsfilterpatient Form Field class for the Ehealth_portal component + * Testsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldTestsfilterpatient extends JFormFieldList { /** * The testsfilterpatient field type. * - * @var string + * @var string */ public $type = 'testsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_test')); + $query->from($db->quoteName('#__ehealthportal_test')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/tuberculosesfilterpatient.php b/admin/models/fields/tuberculosesfilterpatient.php index 85095c3..dbf1bff 100644 --- a/admin/models/fields/tuberculosesfilterpatient.php +++ b/admin/models/fields/tuberculosesfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculosesfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Tuberculosesfilterpatient Form Field class for the Ehealth_portal component + * Tuberculosesfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldTuberculosesfilterpatient extends JFormFieldList { /** * The tuberculosesfilterpatient field type. * - * @var string + * @var string */ public $type = 'tuberculosesfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_tuberculosis')); + $query->from($db->quoteName('#__ehealthportal_tuberculosis')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/fields/units.php b/admin/models/fields/units.php index 158e407..dc2522e 100644 --- a/admin/models/fields/units.php +++ b/admin/models/fields/units.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage units.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,26 +26,30 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Units Form Field class for the Ehealth_portal component + * Units Form Field class for the Ehealthportal component */ class JFormFieldUnits extends JFormFieldList { /** * The units field type. * - * @var string + * @var string */ public $type = 'units'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { @@ -55,13 +59,13 @@ class JFormFieldUnits extends JFormFieldList $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.id','a.name'),array('id','unit_name'))); - $query->from($db->quoteName('#__ehealth_portal_unit', 'a')); + $query->from($db->quoteName('#__ehealthportal_unit', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.name ASC'); // Implement View Level Access (if set in table) - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { - $columns = $db->getTableColumns('#__ehealth_portal_unit'); + $columns = $db->getTableColumns('#__ehealthportal_unit'); if(isset($columns['access'])) { $groups = implode(',', $user->getAuthorisedViewLevels()); @@ -73,7 +77,10 @@ class JFormFieldUnits extends JFormFieldList $options = array(); if ($items) { - $options[] = JHtml::_('select.option', '', 'Select an option'); + if ($this->multiple === false) + { + $options[] = JHtml::_('select.option', '', JText::_('COM_EHEALTHPORTAL_SELECT_AN_OPTION')); + } foreach($items as $item) { $options[] = JHtml::_('select.option', $item->id, $item->unit_name); diff --git a/admin/models/fields/vmmcsfilterpatient.php b/admin/models/fields/vmmcsfilterpatient.php index ca6cf67..33ca56c 100644 --- a/admin/models/fields/vmmcsfilterpatient.php +++ b/admin/models/fields/vmmcsfilterpatient.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmcsfilterpatient.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,54 +26,58 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; + // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** - * Vmmcsfilterpatient Form Field class for the Ehealth_portal component + * Vmmcsfilterpatient Form Field class for the Ehealthportal component */ class JFormFieldVmmcsfilterpatient extends JFormFieldList { /** * The vmmcsfilterpatient field type. * - * @var string + * @var string */ public $type = 'vmmcsfilterpatient'; /** * Method to get a list of options for a list input. * - * @return array An array of JHtml options. + * @return array An array of Html options. */ protected function getOptions() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the text. $query->select($db->quoteName('patient')); - $query->from($db->quoteName('#__ehealth_portal_vmmc')); + $query->from($db->quoteName('#__ehealthportal_vmmc')); $query->order($db->quoteName('patient') . ' ASC'); // Reset the query using our newly populated query object. $db->setQuery($query); - $results = $db->loadColumn(); - $_filter = array(); - $_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_EHEALTH_PORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); + $_results = $db->loadColumn(); + $_filter = []; + $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_EHEALTHPORTAL_FILTER_SELECT_PATIENT_NAME') . ' -'); - if ($results) + if ($_results) { - $results = array_unique($results); - foreach ($results as $patient) + $_results = array_unique($_results); + foreach ($_results as $patient) { // Now add the patient and its text to the options array - $_filter[] = JHtml::_('select.option', $patient, JFactory::getUser($patient)->name); + $_filter[] = Html::_('select.option', $patient, Factory::getUser($patient)->name); } } return $_filter; diff --git a/admin/models/foetal_engagement.php b/admin/models/foetal_engagement.php index 4a0325a..c8647f9 100644 --- a/admin/models/foetal_engagement.php +++ b/admin/models/foetal_engagement.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagement.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Foetal_engagement Model + * Ehealthportal Foetal_engagement Admin Model */ -class Ehealth_portalModelFoetal_engagement extends JModelAdmin +class EhealthportalModelFoetal_engagement extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.foetal_engagement'; + public $typeAlias = 'com_ehealthportal.foetal_engagement'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'foetal_engagement', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'foetal_engagement', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.foetal_engagement'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.foetal_engagement', 'foetal_engagement', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.foetal_engagement', 'foetal_engagement', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.foetal_engagement.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.foetal_engagement.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('foetal_engagement.edit.name', 'com_ehealth_portal.foetal_engagement.' . (int) $id)) - || ($id == 0 && !$user->authorise('foetal_engagement.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('foetal_engagement.edit.name', 'com_ehealthportal.foetal_engagement.' . (int) $id)) + || ($id == 0 && !$user->authorise('foetal_engagement.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('foetal_engagement.edit.description', 'com_ehealth_portal.foetal_engagement.' . (int) $id)) - || ($id == 0 && !$user->authorise('foetal_engagement.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('foetal_engagement.edit.description', 'com_ehealthportal.foetal_engagement.' . (int) $id)) + || ($id == 0 && !$user->authorise('foetal_engagement.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/foetal_engagement.js'; + return 'media/com_ehealthportal/js/foetal_engagement.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.foetal_engagement.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.foetal_engagement.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.foetal_engagement.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.foetal_engagement.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.foetal_engagement.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.foetal_engagement.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_foetal_engagement')); + ->from($db->quoteName('#__ehealthportal_foetal_engagement')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.foetal_engagement.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.foetal_engagement.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.foetal_engagement', $data); + $this->preprocessData('com_ehealthportal.foetal_engagement', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('foetal_engagement'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('foetal_engagement'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('foetal_engagement'); + $this->canDo = EhealthportalHelper::getActions('foetal_engagement'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('foetal_engagement.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('foetal_engagement'); + $this->canDo = EhealthportalHelper::getActions('foetal_engagement'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('foetal_engagement.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('foetal_engagement', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "foetal_engagement", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('foetal_engagement', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelFoetal_engagement extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/foetal_engagements.php b/admin/models/foetal_engagements.php index 3c0055e..89367cf 100644 --- a/admin/models/foetal_engagements.php +++ b/admin/models/foetal_engagements.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagements.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Foetal_engagements Model + * Foetal_engagements List Model */ -class Ehealth_portalModelFoetal_engagements extends JModelList +class EhealthportalModelFoetal_engagements extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelFoetal_engagements extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_foetal_engagement', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_foetal_engagement', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelFoetal_engagements extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_foetal_engagement table - $query->from($db->quoteName('#__ehealth_portal_foetal_engagement', 'a')); + // From the ehealthportal_foetal_engagement table + $query->from($db->quoteName('#__ehealthportal_foetal_engagement', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelFoetal_engagements extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelFoetal_engagements extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_foetal_engagement"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_foetal_engagement"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelFoetal_engagements extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelFoetal_engagements extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelFoetal_engagements extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_foetal_engagement')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_foetal_engagement')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelFoetal_engagements extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_foetal_engagement'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_foetal_engagement'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/foetal_lie.php b/admin/models/foetal_lie.php index 30206e8..430fc5e 100644 --- a/admin/models/foetal_lie.php +++ b/admin/models/foetal_lie.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lie.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Foetal_lie Model + * Ehealthportal Foetal_lie Admin Model */ -class Ehealth_portalModelFoetal_lie extends JModelAdmin +class EhealthportalModelFoetal_lie extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.foetal_lie'; + public $typeAlias = 'com_ehealthportal.foetal_lie'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'foetal_lie', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'foetal_lie', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.foetal_lie'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.foetal_lie', 'foetal_lie', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.foetal_lie', 'foetal_lie', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.foetal_lie.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.foetal_lie.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('foetal_lie.edit.name', 'com_ehealth_portal.foetal_lie.' . (int) $id)) - || ($id == 0 && !$user->authorise('foetal_lie.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('foetal_lie.edit.name', 'com_ehealthportal.foetal_lie.' . (int) $id)) + || ($id == 0 && !$user->authorise('foetal_lie.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('foetal_lie.edit.description', 'com_ehealth_portal.foetal_lie.' . (int) $id)) - || ($id == 0 && !$user->authorise('foetal_lie.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('foetal_lie.edit.description', 'com_ehealthportal.foetal_lie.' . (int) $id)) + || ($id == 0 && !$user->authorise('foetal_lie.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/foetal_lie.js'; + return 'media/com_ehealthportal/js/foetal_lie.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.foetal_lie.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.foetal_lie.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.foetal_lie.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.foetal_lie.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.foetal_lie.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.foetal_lie.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_foetal_lie')); + ->from($db->quoteName('#__ehealthportal_foetal_lie')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.foetal_lie.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.foetal_lie.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.foetal_lie', $data); + $this->preprocessData('com_ehealthportal.foetal_lie', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('foetal_lie'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('foetal_lie'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('foetal_lie'); + $this->canDo = EhealthportalHelper::getActions('foetal_lie'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('foetal_lie.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('foetal_lie'); + $this->canDo = EhealthportalHelper::getActions('foetal_lie'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('foetal_lie.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('foetal_lie', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "foetal_lie", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('foetal_lie', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_FOETAL_LIE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_FOETAL_LIE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelFoetal_lie extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/foetal_lies.php b/admin/models/foetal_lies.php index 9b76b9b..96d711b 100644 --- a/admin/models/foetal_lies.php +++ b/admin/models/foetal_lies.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lies.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Foetal_lies Model + * Foetal_lies List Model */ -class Ehealth_portalModelFoetal_lies extends JModelList +class EhealthportalModelFoetal_lies extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelFoetal_lies extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_foetal_lie', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_foetal_lie', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelFoetal_lies extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_foetal_lie table - $query->from($db->quoteName('#__ehealth_portal_foetal_lie', 'a')); + // From the ehealthportal_foetal_lie table + $query->from($db->quoteName('#__ehealthportal_foetal_lie', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelFoetal_lies extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelFoetal_lies extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_foetal_lie"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_foetal_lie"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelFoetal_lies extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelFoetal_lies extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelFoetal_lies extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_foetal_lie')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_foetal_lie')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelFoetal_lies extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_foetal_lie'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_foetal_lie'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/foetal_presentation.php b/admin/models/foetal_presentation.php index f0dabe5..b575eb2 100644 --- a/admin/models/foetal_presentation.php +++ b/admin/models/foetal_presentation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Foetal_presentation Model + * Ehealthportal Foetal_presentation Admin Model */ -class Ehealth_portalModelFoetal_presentation extends JModelAdmin +class EhealthportalModelFoetal_presentation extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.foetal_presentation'; + public $typeAlias = 'com_ehealthportal.foetal_presentation'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'foetal_presentation', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'foetal_presentation', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.foetal_presentation'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.foetal_presentation', 'foetal_presentation', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.foetal_presentation', 'foetal_presentation', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.foetal_presentation.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.foetal_presentation.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('foetal_presentation.edit.name', 'com_ehealth_portal.foetal_presentation.' . (int) $id)) - || ($id == 0 && !$user->authorise('foetal_presentation.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('foetal_presentation.edit.name', 'com_ehealthportal.foetal_presentation.' . (int) $id)) + || ($id == 0 && !$user->authorise('foetal_presentation.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('foetal_presentation.edit.description', 'com_ehealth_portal.foetal_presentation.' . (int) $id)) - || ($id == 0 && !$user->authorise('foetal_presentation.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('foetal_presentation.edit.description', 'com_ehealthportal.foetal_presentation.' . (int) $id)) + || ($id == 0 && !$user->authorise('foetal_presentation.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/foetal_presentation.js'; + return 'media/com_ehealthportal/js/foetal_presentation.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.foetal_presentation.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.foetal_presentation.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.foetal_presentation.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.foetal_presentation.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.foetal_presentation.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.foetal_presentation.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_foetal_presentation')); + ->from($db->quoteName('#__ehealthportal_foetal_presentation')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.foetal_presentation.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.foetal_presentation.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.foetal_presentation', $data); + $this->preprocessData('com_ehealthportal.foetal_presentation', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('foetal_presentation'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('foetal_presentation'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('foetal_presentation'); + $this->canDo = EhealthportalHelper::getActions('foetal_presentation'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('foetal_presentation.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('foetal_presentation'); + $this->canDo = EhealthportalHelper::getActions('foetal_presentation'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('foetal_presentation.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('foetal_presentation', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "foetal_presentation", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('foetal_presentation', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_FOETAL_PRESENTATION_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelFoetal_presentation extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/foetal_presentations.php b/admin/models/foetal_presentations.php index 7f43ed4..049cbaf 100644 --- a/admin/models/foetal_presentations.php +++ b/admin/models/foetal_presentations.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentations.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Foetal_presentations Model + * Foetal_presentations List Model */ -class Ehealth_portalModelFoetal_presentations extends JModelList +class EhealthportalModelFoetal_presentations extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelFoetal_presentations extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_foetal_presentation', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_foetal_presentation', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelFoetal_presentations extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_foetal_presentation table - $query->from($db->quoteName('#__ehealth_portal_foetal_presentation', 'a')); + // From the ehealthportal_foetal_presentation table + $query->from($db->quoteName('#__ehealthportal_foetal_presentation', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelFoetal_presentations extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelFoetal_presentations extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_foetal_presentation"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_foetal_presentation"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelFoetal_presentations extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelFoetal_presentations extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelFoetal_presentations extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_foetal_presentation')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_foetal_presentation')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelFoetal_presentations extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_foetal_presentation'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_foetal_presentation'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/forms/administration_part.xml b/admin/models/forms/administration_part.xml index 7ca6943..7626a92 100644 --- a/admin/models/forms/administration_part.xml +++ b/admin/models/forms/administration_part.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="administration_part" />
diff --git a/admin/models/forms/antenatal_care.xml b/admin/models/forms/antenatal_care.xml index c6d5df1..e1144a6 100644 --- a/admin/models/forms/antenatal_care.xml +++ b/admin/models/forms/antenatal_care.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -243,7 +258,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="antenatal_care" />
diff --git a/admin/models/forms/breast_cancer.xml b/admin/models/forms/breast_cancer.xml index a33864e..a4ccce1 100644 --- a/admin/models/forms/breast_cancer.xml +++ b/admin/models/forms/breast_cancer.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_WHITE + COM_EHEALTHPORTAL_BREAST_CANCER_COLOURED + COM_EHEALTHPORTAL_BREAST_CANCER_BLACK + COM_EHEALTHPORTAL_BREAST_CANCER_ASIAN + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_THIRTY_YEARS + COM_EHEALTHPORTAL_BREAST_CANCER_THIRTY_YEARS + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + COM_EHEALTHPORTAL_BREAST_CANCER_YES + COM_EHEALTHPORTAL_BREAST_CANCER_NO + +
- +
@@ -446,7 +461,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="breast_cancer" />
diff --git a/admin/models/forms/cervical_cancer.xml b/admin/models/forms/cervical_cancer.xml index 3622502..4249440 100644 --- a/admin/models/forms/cervical_cancer.xml +++ b/admin/models/forms/cervical_cancer.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_YES + COM_EHEALTHPORTAL_CERVICAL_CANCER_NO + COM_EHEALTHPORTAL_CERVICAL_CANCER_POSITIVE + COM_EHEALTHPORTAL_CERVICAL_CANCER_NEGATIVE + COM_EHEALTHPORTAL_CERVICAL_CANCER_INCONCLUSIVE - - - - - - - + - - + + + + + + + + + +
- +
@@ -359,7 +374,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="cervical_cancer" />
diff --git a/admin/models/forms/clinic.xml b/admin/models/forms/clinic.xml index 4656fbb..22018e0 100644 --- a/admin/models/forms/clinic.xml +++ b/admin/models/forms/clinic.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + + + COM_EHEALTHPORTAL_CLINIC_FIXED + COM_EHEALTHPORTAL_CLINIC_MOBILE
- +
@@ -166,7 +180,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="clinic" />
diff --git a/admin/models/forms/counseling_type.xml b/admin/models/forms/counseling_type.xml index 5eefde6..a433e94 100644 --- a/admin/models/forms/counseling_type.xml +++ b/admin/models/forms/counseling_type.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="counseling_type" />
diff --git a/admin/models/forms/diagnosis_type.xml b/admin/models/forms/diagnosis_type.xml index a7f99d8..ac37a82 100644 --- a/admin/models/forms/diagnosis_type.xml +++ b/admin/models/forms/diagnosis_type.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="diagnosis_type" />
diff --git a/admin/models/forms/family_planning.xml b/admin/models/forms/family_planning.xml index 9d73d28..fe9cd3e 100644 --- a/admin/models/forms/family_planning.xml +++ b/admin/models/forms/family_planning.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -129,7 +144,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="family_planning" />
diff --git a/admin/models/forms/filter_administration_parts.xml b/admin/models/forms/filter_administration_parts.xml index 904d95b..3da0ae6 100644 --- a/admin/models/forms/filter_administration_parts.xml +++ b/admin/models/forms/filter_administration_parts.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_antenatal_cares.xml b/admin/models/forms/filter_antenatal_cares.xml index 5c97fa9..836eb06 100644 --- a/admin/models/forms/filter_antenatal_cares.xml +++ b/admin/models/forms/filter_antenatal_cares.xml @@ -1,22 +1,22 @@ @@ -33,14 +33,14 @@ @@ -62,8 +62,8 @@ - - + + diff --git a/admin/models/forms/filter_breast_cancers.xml b/admin/models/forms/filter_breast_cancers.xml index 23a1d5c..fac3b84 100644 --- a/admin/models/forms/filter_breast_cancers.xml +++ b/admin/models/forms/filter_breast_cancers.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_cervical_cancers.xml b/admin/models/forms/filter_cervical_cancers.xml index 756779f..f685182 100644 --- a/admin/models/forms/filter_cervical_cancers.xml +++ b/admin/models/forms/filter_cervical_cancers.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_clinics.xml b/admin/models/forms/filter_clinics.xml index e9cd438..6d09b29 100644 --- a/admin/models/forms/filter_clinics.xml +++ b/admin/models/forms/filter_clinics.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_counseling_types.xml b/admin/models/forms/filter_counseling_types.xml index e087cff..ef8b3f8 100644 --- a/admin/models/forms/filter_counseling_types.xml +++ b/admin/models/forms/filter_counseling_types.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_diagnosis_types.xml b/admin/models/forms/filter_diagnosis_types.xml index 270b70d..a1099ec 100644 --- a/admin/models/forms/filter_diagnosis_types.xml +++ b/admin/models/forms/filter_diagnosis_types.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_family_plannings.xml b/admin/models/forms/filter_family_plannings.xml index fda08e4..f8c3a1e 100644 --- a/admin/models/forms/filter_family_plannings.xml +++ b/admin/models/forms/filter_family_plannings.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,10 +55,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_foetal_engagements.xml b/admin/models/forms/filter_foetal_engagements.xml index 3dead1b..dd649ab 100644 --- a/admin/models/forms/filter_foetal_engagements.xml +++ b/admin/models/forms/filter_foetal_engagements.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_foetal_lies.xml b/admin/models/forms/filter_foetal_lies.xml index 69da086..70afcb2 100644 --- a/admin/models/forms/filter_foetal_lies.xml +++ b/admin/models/forms/filter_foetal_lies.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_foetal_presentations.xml b/admin/models/forms/filter_foetal_presentations.xml index 973e66b..7f1eff5 100644 --- a/admin/models/forms/filter_foetal_presentations.xml +++ b/admin/models/forms/filter_foetal_presentations.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_general_medical_check_ups.xml b/admin/models/forms/filter_general_medical_check_ups.xml index 5a2e08e..7863482 100644 --- a/admin/models/forms/filter_general_medical_check_ups.xml +++ b/admin/models/forms/filter_general_medical_check_ups.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,28 +55,28 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/models/forms/filter_health_education_topics.xml b/admin/models/forms/filter_health_education_topics.xml index 3aef82d..9fdfd26 100644 --- a/admin/models/forms/filter_health_education_topics.xml +++ b/admin/models/forms/filter_health_education_topics.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_health_educations.xml b/admin/models/forms/filter_health_educations.xml index e0545a8..522df7c 100644 --- a/admin/models/forms/filter_health_educations.xml +++ b/admin/models/forms/filter_health_educations.xml @@ -1,22 +1,22 @@ @@ -33,14 +33,14 @@ JGRID_HEADING_ORDERING_DESC - - - - + + + + diff --git a/admin/models/forms/filter_hiv_counselings_and_testings.xml b/admin/models/forms/filter_hiv_counselings_and_testings.xml index 54a49bf..9f40ad6 100644 --- a/admin/models/forms/filter_hiv_counselings_and_testings.xml +++ b/admin/models/forms/filter_hiv_counselings_and_testings.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_immunisation_types.xml b/admin/models/forms/filter_immunisation_types.xml index 893ce7c..22a62e3 100644 --- a/admin/models/forms/filter_immunisation_types.xml +++ b/admin/models/forms/filter_immunisation_types.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_immunisation_vaccine_types.xml b/admin/models/forms/filter_immunisation_vaccine_types.xml index b80e423..5f04943 100644 --- a/admin/models/forms/filter_immunisation_vaccine_types.xml +++ b/admin/models/forms/filter_immunisation_vaccine_types.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,12 +55,12 @@ - - - - - - + + + + + + diff --git a/admin/models/forms/filter_immunisations.xml b/admin/models/forms/filter_immunisations.xml index b537658..e84ac5a 100644 --- a/admin/models/forms/filter_immunisations.xml +++ b/admin/models/forms/filter_immunisations.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_medications.xml b/admin/models/forms/filter_medications.xml index d2ae6e1..5e1d40e 100644 --- a/admin/models/forms/filter_medications.xml +++ b/admin/models/forms/filter_medications.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_nonpay_reasons.xml b/admin/models/forms/filter_nonpay_reasons.xml index 854804a..65a7b36 100644 --- a/admin/models/forms/filter_nonpay_reasons.xml +++ b/admin/models/forms/filter_nonpay_reasons.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_payment_amounts.xml b/admin/models/forms/filter_payment_amounts.xml deleted file mode 100644 index 98ff2e5..0000000 --- a/admin/models/forms/filter_payment_amounts.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/admin/models/forms/filter_payment_types.xml b/admin/models/forms/filter_payment_types.xml index 3b8995a..69ad34d 100644 --- a/admin/models/forms/filter_payment_types.xml +++ b/admin/models/forms/filter_payment_types.xml @@ -1,22 +1,22 @@
@@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_payments.xml b/admin/models/forms/filter_payments.xml index 383ae1d..7f7cb70 100644 --- a/admin/models/forms/filter_payments.xml +++ b/admin/models/forms/filter_payments.xml @@ -1,22 +1,22 @@ @@ -33,21 +33,21 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_prostate_and_testicular_cancers.xml b/admin/models/forms/filter_prostate_and_testicular_cancers.xml index f157d1b..e1c0b61 100644 --- a/admin/models/forms/filter_prostate_and_testicular_cancers.xml +++ b/admin/models/forms/filter_prostate_and_testicular_cancers.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_referrals.xml b/admin/models/forms/filter_referrals.xml index 15a9a26..fa53024 100644 --- a/admin/models/forms/filter_referrals.xml +++ b/admin/models/forms/filter_referrals.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_sites.xml b/admin/models/forms/filter_sites.xml index cc76c00..56b0a8d 100644 --- a/admin/models/forms/filter_sites.xml +++ b/admin/models/forms/filter_sites.xml @@ -1,22 +1,22 @@ @@ -48,12 +48,12 @@ - - - - - - + + + + + + diff --git a/admin/models/forms/filter_strengths.xml b/admin/models/forms/filter_strengths.xml index 404976a..1e66f7d 100644 --- a/admin/models/forms/filter_strengths.xml +++ b/admin/models/forms/filter_strengths.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_testing_reasons.xml b/admin/models/forms/filter_testing_reasons.xml index f4a3c3c..457f289 100644 --- a/admin/models/forms/filter_testing_reasons.xml +++ b/admin/models/forms/filter_testing_reasons.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_tests.xml b/admin/models/forms/filter_tests.xml index 443d8c5..db9bf0d 100644 --- a/admin/models/forms/filter_tests.xml +++ b/admin/models/forms/filter_tests.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_tuberculoses.xml b/admin/models/forms/filter_tuberculoses.xml index 18e53c7..8278f89 100644 --- a/admin/models/forms/filter_tuberculoses.xml +++ b/admin/models/forms/filter_tuberculoses.xml @@ -1,22 +1,22 @@ @@ -33,7 +33,7 @@ @@ -55,8 +55,8 @@ - - + + diff --git a/admin/models/forms/filter_units.xml b/admin/models/forms/filter_units.xml index 8cb259f..c66c46b 100644 --- a/admin/models/forms/filter_units.xml +++ b/admin/models/forms/filter_units.xml @@ -1,22 +1,22 @@ @@ -48,10 +48,10 @@ - - - - + + + + diff --git a/admin/models/forms/filter_vmmcs.xml b/admin/models/forms/filter_vmmcs.xml index 703784f..ceb97c6 100644 --- a/admin/models/forms/filter_vmmcs.xml +++ b/admin/models/forms/filter_vmmcs.xml @@ -1,22 +1,22 @@ @@ -33,14 +33,14 @@ JGRID_HEADING_ORDERING_DESC - - + + diff --git a/admin/models/forms/foetal_engagement.xml b/admin/models/forms/foetal_engagement.xml index 9e04985..bf2b4a6 100644 --- a/admin/models/forms/foetal_engagement.xml +++ b/admin/models/forms/foetal_engagement.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="foetal_engagement" />
diff --git a/admin/models/forms/foetal_lie.xml b/admin/models/forms/foetal_lie.xml index 8d5d1e2..3008c92 100644 --- a/admin/models/forms/foetal_lie.xml +++ b/admin/models/forms/foetal_lie.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="foetal_lie" />
diff --git a/admin/models/forms/foetal_presentation.xml b/admin/models/forms/foetal_presentation.xml index 4c00145..936f699 100644 --- a/admin/models/forms/foetal_presentation.xml +++ b/admin/models/forms/foetal_presentation.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="foetal_presentation" />
diff --git a/admin/models/forms/general_medical_check_up.xml b/admin/models/forms/general_medical_check_up.xml index 1c10f5e..63c2418 100644 --- a/admin/models/forms/general_medical_check_up.xml +++ b/admin/models/forms/general_medical_check_up.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -381,7 +396,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="general_medical_check_up" />
diff --git a/admin/models/forms/health_education.xml b/admin/models/forms/health_education.xml index 8d2e907..58ac637 100644 --- a/admin/models/forms/health_education.xml +++ b/admin/models/forms/health_education.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_HEALTH_EDUCATION_INDIVIDUAL + COM_EHEALTHPORTAL_HEALTH_EDUCATION_GROUP + +
- +
@@ -145,7 +160,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="health_education" />
diff --git a/admin/models/forms/health_education_topic.xml b/admin/models/forms/health_education_topic.xml index bfa266a..52c5f50 100644 --- a/admin/models/forms/health_education_topic.xml +++ b/admin/models/forms/health_education_topic.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="health_education_topic" />
diff --git a/admin/models/forms/hiv_counseling_and_testing.xml b/admin/models/forms/hiv_counseling_and_testing.xml index 54b0845..90da8c1 100644 --- a/admin/models/forms/hiv_counseling_and_testing.xml +++ b/admin/models/forms/hiv_counseling_and_testing.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INDIVIDUAL + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_COUPLE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MINOR + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ONESIX_MONTHS + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_SEVENTWELVE_MONTHS + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING__YEAR + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEVER + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NA + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NA + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_YES + COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NO + +
- +
@@ -278,7 +293,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="hiv_counseling_and_testing" />
diff --git a/admin/models/forms/immunisation.xml b/admin/models/forms/immunisation.xml index 8357690..dcf4685 100644 --- a/admin/models/forms/immunisation.xml +++ b/admin/models/forms/immunisation.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_IMMUNISATION_YES + COM_EHEALTHPORTAL_IMMUNISATION_NO - + - -
- +
@@ -224,7 +217,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="immunisation" />
diff --git a/admin/models/forms/immunisation_type.xml b/admin/models/forms/immunisation_type.xml index cda7be3..42a9562 100644 --- a/admin/models/forms/immunisation_type.xml +++ b/admin/models/forms/immunisation_type.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="immunisation_type" />
diff --git a/admin/models/forms/immunisation_vaccine_type.xml b/admin/models/forms/immunisation_vaccine_type.xml index 0a013d3..cd16cea 100644 --- a/admin/models/forms/immunisation_vaccine_type.xml +++ b/admin/models/forms/immunisation_vaccine_type.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -160,7 +174,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="immunisation_vaccine_type" />
diff --git a/admin/models/forms/medication.xml b/admin/models/forms/medication.xml index 407c17e..63bbafc 100644 --- a/admin/models/forms/medication.xml +++ b/admin/models/forms/medication.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="medication" />
diff --git a/admin/models/forms/nonpay_reason.xml b/admin/models/forms/nonpay_reason.xml index 5333f57..07c9813 100644 --- a/admin/models/forms/nonpay_reason.xml +++ b/admin/models/forms/nonpay_reason.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="nonpay_reason" />
diff --git a/admin/models/forms/payment.xml b/admin/models/forms/payment.xml index 3b3b5d3..143ff6a 100644 --- a/admin/models/forms/payment.xml +++ b/admin/models/forms/payment.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_PAYMENT_DEBT_PAYMENT + COM_EHEALTHPORTAL_PAYMENT_RECEIVE_PAYMENT + COM_EHEALTHPORTAL_PAYMENT_SELECT_AMOUNT_N + COM_EHEALTHPORTAL_PAYMENT_ZERO + COM_EHEALTHPORTAL_PAYMENT_TEN + COM_EHEALTHPORTAL_PAYMENT_SEVENTY_FIVE + +
- +
@@ -193,7 +208,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="payment" />
diff --git a/admin/models/forms/payment_amount.xml b/admin/models/forms/payment_amount.xml deleted file mode 100644 index ad879f3..0000000 --- a/admin/models/forms/payment_amount.xml +++ /dev/null @@ -1,156 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - -
-
\ No newline at end of file diff --git a/admin/models/forms/payment_type.xml b/admin/models/forms/payment_type.xml index 262c16a..832e462 100644 --- a/admin/models/forms/payment_type.xml +++ b/admin/models/forms/payment_type.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="payment_type" />
diff --git a/admin/models/forms/planning_type.xml b/admin/models/forms/planning_type.xml index b0efc9d..2741afe 100644 --- a/admin/models/forms/planning_type.xml +++ b/admin/models/forms/planning_type.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="planning_type" />
diff --git a/admin/models/forms/prostate_and_testicular_cancer.xml b/admin/models/forms/prostate_and_testicular_cancer.xml index db9a6f9..de6155e 100644 --- a/admin/models/forms/prostate_and_testicular_cancer.xml +++ b/admin/models/forms/prostate_and_testicular_cancer.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES + COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO - - - - + + + + + +
- +
@@ -336,7 +351,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="prostate_and_testicular_cancer" />
diff --git a/admin/models/forms/referral.xml b/admin/models/forms/referral.xml index dde9f4b..7da950a 100644 --- a/admin/models/forms/referral.xml +++ b/admin/models/forms/referral.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="referral" />
diff --git a/admin/models/forms/site.xml b/admin/models/forms/site.xml index 4bed40c..50a026a 100644 --- a/admin/models/forms/site.xml +++ b/admin/models/forms/site.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -165,7 +179,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="site" />
diff --git a/admin/models/forms/strength.xml b/admin/models/forms/strength.xml index 4a8a8f9..5918aa4 100644 --- a/admin/models/forms/strength.xml +++ b/admin/models/forms/strength.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="strength" />
diff --git a/admin/models/forms/test.xml b/admin/models/forms/test.xml index 85aec64..8869211 100644 --- a/admin/models/forms/test.xml +++ b/admin/models/forms/test.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_TEST_NORMAL + COM_EHEALTHPORTAL_TEST_ABNORMAL + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + COM_EHEALTHPORTAL_TEST_POSITIVE + COM_EHEALTHPORTAL_TEST_NEGATIVE + COM_EHEALTHPORTAL_TEST_INCONCLUSIVE + +
- +
@@ -362,7 +377,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="test" />
diff --git a/admin/models/forms/testing_reason.xml b/admin/models/forms/testing_reason.xml index d3c9791..02a1b70 100644 --- a/admin/models/forms/testing_reason.xml +++ b/admin/models/forms/testing_reason.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="testing_reason" />
diff --git a/admin/models/forms/tuberculosis.xml b/admin/models/forms/tuberculosis.xml index 6a15b82..5a8d969 100644 --- a/admin/models/forms/tuberculosis.xml +++ b/admin/models/forms/tuberculosis.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_POSITIVE + COM_EHEALTHPORTAL_TUBERCULOSIS_NEGATIVE + COM_EHEALTHPORTAL_TUBERCULOSIS_INCONCLUSIVE + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_POSITIVE + COM_EHEALTHPORTAL_TUBERCULOSIS_NEGATIVE + COM_EHEALTHPORTAL_TUBERCULOSIS_INCONCLUSIVE + COM_EHEALTHPORTAL_TUBERCULOSIS_YES + COM_EHEALTHPORTAL_TUBERCULOSIS_NO + COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN + + + + - -
- +
@@ -462,7 +477,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="tuberculosis" />
diff --git a/admin/models/forms/unit.xml b/admin/models/forms/unit.xml index 8540afe..741a320 100644 --- a/admin/models/forms/unit.xml +++ b/admin/models/forms/unit.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + +
- +
@@ -149,7 +163,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="unit" />
diff --git a/admin/models/forms/vmmc.xml b/admin/models/forms/vmmc.xml index 21f7995..e3e07e0 100644 --- a/admin/models/forms/vmmc.xml +++ b/admin/models/forms/vmmc.xml @@ -1,7 +1,7 @@
@@ -16,8 +16,8 @@ + COM_EHEALTHPORTAL_VMMC_YES + COM_EHEALTHPORTAL_VMMC_NO + COM_EHEALTHPORTAL_VMMC_YES + COM_EHEALTHPORTAL_VMMC_NO + COM_EHEALTHPORTAL_VMMC_YES + COM_EHEALTHPORTAL_VMMC_NO + COM_EHEALTHPORTAL_VMMC_MALE + COM_EHEALTHPORTAL_VMMC_FEMALE + + + COM_EHEALTHPORTAL_VMMC_YES + COM_EHEALTHPORTAL_VMMC_NO
- +
@@ -220,7 +235,7 @@ filter="rules" validate="rules" class="inputbox" - component="com_ehealth_portal" + component="com_ehealthportal" section="vmmc" />
diff --git a/admin/models/general_medical_check_up.php b/admin/models/general_medical_check_up.php index aaea0c6..f0c063f 100644 --- a/admin/models/general_medical_check_up.php +++ b/admin/models/general_medical_check_up.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_up.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal General_medical_check_up Model + * Ehealthportal General_medical_check_up Admin Model */ -class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin +class EhealthportalModelGeneral_medical_check_up extends AdminModel { /** * The tab layout fields array. @@ -90,7 +99,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -98,7 +107,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.general_medical_check_up'; + public $typeAlias = 'com_ehealthportal.general_medical_check_up'; /** * Returns a Table object, always creating it @@ -107,18 +116,18 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'general_medical_check_up', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'general_medical_check_up', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -147,6 +156,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); if (!empty($item->dispensing)) { @@ -155,12 +165,6 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $dispensing->loadString($item->dispensing); $item->dispensing = $dispensing->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.general_medical_check_up'); - } } return $item; @@ -177,7 +181,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -197,14 +201,14 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.general_medical_check_up', 'general_medical_check_up', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.general_medical_check_up', 'general_medical_check_up', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -217,12 +221,12 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.general_medical_check_up.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.general_medical_check_up.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -238,7 +242,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -248,7 +252,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -256,8 +260,8 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Patient access controls. - if ($id != 0 && (!$user->authorise('general_medical_check_up.edit.patient', 'com_ehealth_portal.general_medical_check_up.' . (int) $id)) - || ($id == 0 && !$user->authorise('general_medical_check_up.edit.patient', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('general_medical_check_up.edit.patient', 'com_ehealthportal.general_medical_check_up.' . (int) $id)) + || ($id == 0 && !$user->authorise('general_medical_check_up.edit.patient', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('patient', 'disabled', 'true'); @@ -289,19 +293,26 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/general_medical_check_up.js'; + return 'media/com_ehealthportal/js/general_medical_check_up.js'; } - + /** * Method to test whether a record can be deleted. * @@ -320,9 +331,9 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.general_medical_check_up.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.general_medical_check_up.' . (int) $record->id); } return false; } @@ -338,42 +349,42 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.general_medical_check_up.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.general_medical_check_up.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.general_medical_check_up.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.general_medical_check_up.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -381,19 +392,19 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -405,10 +416,10 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_general_medical_check_up')); + ->from($db->quoteName('#__ehealthportal_general_medical_check_up')); $db->setQuery($query); $max = $db->loadResult(); @@ -420,7 +431,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -435,16 +446,16 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.general_medical_check_up.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.general_medical_check_up.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.general_medical_check_up', $data); + $this->preprocessData('com_ehealthportal.general_medical_check_up', $data); } return $data; @@ -459,9 +470,9 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -477,7 +488,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin { return false; } - + return true; } @@ -497,10 +508,10 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -526,30 +537,30 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('general_medical_check_up'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('general_medical_check_up'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -586,8 +597,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -613,13 +623,13 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('general_medical_check_up'); + $this->canDo = EhealthportalHelper::getActions('general_medical_check_up'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('general_medical_check_up.batch')) { return false; } @@ -639,7 +649,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -652,7 +662,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -668,13 +678,19 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -686,7 +702,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -750,15 +766,15 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('general_medical_check_up'); + $this->canDo = EhealthportalHelper::getActions('general_medical_check_up'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('general_medical_check_up.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -775,7 +791,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -791,13 +807,13 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -841,7 +857,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -853,15 +869,15 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } @@ -872,6 +888,21 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin $data['chronic_medication'] = ''; } + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('general_medical_check_up', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "general_medical_check_up", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the dispensing items to data. if (isset($data['dispensing']) && is_array($data['dispensing'])) { @@ -884,11 +915,12 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin // Set the empty dispensing to data $data['dispensing'] = ''; } - + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -898,7 +930,7 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -906,14 +938,14 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -926,7 +958,6 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -937,4 +968,26 @@ class Ehealth_portalModelGeneral_medical_check_up extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/general_medical_check_ups.php b/admin/models/general_medical_check_ups.php index 81c3973..282bd0c 100644 --- a/admin/models/general_medical_check_ups.php +++ b/admin/models/general_medical_check_ups.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_ups.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * General_medical_check_ups Model + * General_medical_check_ups List Model */ -class Ehealth_portalModelGeneral_medical_check_ups extends JModelList +class EhealthportalModelGeneral_medical_check_ups extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -74,7 +83,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -187,7 +196,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -195,42 +204,56 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_general_medical_check_up', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_general_medical_check_up', 'a')); - // From the ehealth_portal_diagnosis_type table. + // From the ehealthportal_diagnosis_type table. $query->select($db->quoteName('g.name','diagnosis_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_diagnosis_type', 'g') . ' ON (' . $db->quoteName('a.diagnosis') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_diagnosis_type', 'g') . ' ON (' . $db->quoteName('a.diagnosis') . ' = ' . $db->quoteName('g.id') . ')'); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('h.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'h') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('h.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'h') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('h.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -252,7 +275,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -260,7 +283,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -293,7 +316,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -320,24 +343,24 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_general_medical_check_up table - $query->from($db->quoteName('#__ehealth_portal_general_medical_check_up', 'a')); + // From the ehealthportal_general_medical_check_up table + $query->from($db->quoteName('#__ehealthportal_general_medical_check_up', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -356,8 +379,22 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_diagnosis_type table. + $query->select($db->quoteName('g.name','diagnosis')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_diagnosis_type', 'g') . ' ON (' . $db->quoteName('a.diagnosis') . ' = ' . $db->quoteName('g.id') . ')'); + + // From the ehealthportal_referral table. + $query->select($db->quoteName('h.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'h') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('h.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -374,10 +411,11 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -386,7 +424,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -404,10 +442,10 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_general_medical_check_up"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_general_medical_check_up"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -422,7 +460,7 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -437,13 +475,13 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -474,24 +512,26 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_general_medical_check_up')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_general_medical_check_up')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -506,8 +546,8 @@ class Ehealth_portalModelGeneral_medical_check_ups extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_general_medical_check_up'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_general_medical_check_up'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/health_education.php b/admin/models/health_education.php index b013030..5aab1b5 100644 --- a/admin/models/health_education.php +++ b/admin/models/health_education.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Health_education Model + * Ehealthportal Health_education Admin Model */ -class Ehealth_portalModelHealth_education extends JModelAdmin +class EhealthportalModelHealth_education extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.health_education'; + public $typeAlias = 'com_ehealthportal.health_education'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelHealth_education extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'health_education', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'health_education', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.health_education'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -135,7 +139,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +159,14 @@ class Ehealth_portalModelHealth_education extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.health_education', 'health_education', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.health_education', 'health_education', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +179,12 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.health_education.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.health_education.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +200,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +210,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +218,8 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Health Education Topic access controls. - if ($id != 0 && (!$user->authorise('health_education.edit.health_education_topic', 'com_ehealth_portal.health_education.' . (int) $id)) - || ($id == 0 && !$user->authorise('health_education.edit.health_education_topic', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('health_education.edit.health_education_topic', 'com_ehealthportal.health_education.' . (int) $id)) + || ($id == 0 && !$user->authorise('health_education.edit.health_education_topic', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('health_education_topic', 'disabled', 'true'); @@ -247,19 +251,26 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/health_education.js'; + return 'media/com_ehealthportal/js/health_education.js'; } - + /** * Method to test whether a record can be deleted. * @@ -278,9 +289,9 @@ class Ehealth_portalModelHealth_education extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.health_education.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.health_education.' . (int) $record->id); } return false; } @@ -296,42 +307,42 @@ class Ehealth_portalModelHealth_education extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.health_education.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.health_education.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.health_education.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.health_education.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -339,19 +350,19 @@ class Ehealth_portalModelHealth_education extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -363,10 +374,10 @@ class Ehealth_portalModelHealth_education extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_health_education')); + ->from($db->quoteName('#__ehealthportal_health_education')); $db->setQuery($query); $max = $db->loadResult(); @@ -378,7 +389,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -393,16 +404,16 @@ class Ehealth_portalModelHealth_education extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.health_education.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.health_education.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.health_education', $data); + $this->preprocessData('com_ehealthportal.health_education', $data); } return $data; @@ -417,9 +428,9 @@ class Ehealth_portalModelHealth_education extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -435,7 +446,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin { return false; } - + return true; } @@ -455,10 +466,10 @@ class Ehealth_portalModelHealth_education extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -484,30 +495,30 @@ class Ehealth_portalModelHealth_education extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('health_education'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('health_education'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -544,8 +555,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -571,13 +581,13 @@ class Ehealth_portalModelHealth_education extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('health_education'); + $this->canDo = EhealthportalHelper::getActions('health_education'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('health_education.batch')) { return false; } @@ -597,7 +607,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -610,7 +620,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -626,13 +636,19 @@ class Ehealth_portalModelHealth_education extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -644,7 +660,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -708,15 +724,15 @@ class Ehealth_portalModelHealth_education extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('health_education'); + $this->canDo = EhealthportalHelper::getActions('health_education'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('health_education.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -733,7 +749,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -749,13 +765,13 @@ class Ehealth_portalModelHealth_education extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -799,7 +815,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -811,23 +827,39 @@ class Ehealth_portalModelHealth_education extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('health_education', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "health_education", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -837,7 +869,7 @@ class Ehealth_portalModelHealth_education extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -845,14 +877,14 @@ class Ehealth_portalModelHealth_education extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -865,7 +897,6 @@ class Ehealth_portalModelHealth_education extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -876,4 +907,26 @@ class Ehealth_portalModelHealth_education extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/health_education_topic.php b/admin/models/health_education_topic.php index 3f99f5b..19a5bbb 100644 --- a/admin/models/health_education_topic.php +++ b/admin/models/health_education_topic.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topic.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Health_education_topic Model + * Ehealthportal Health_education_topic Admin Model */ -class Ehealth_portalModelHealth_education_topic extends JModelAdmin +class EhealthportalModelHealth_education_topic extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.health_education_topic'; + public $typeAlias = 'com_ehealthportal.health_education_topic'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'health_education_topic', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'health_education_topic', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.health_education_topic'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.health_education_topic', 'health_education_topic', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.health_education_topic', 'health_education_topic', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.health_education_topic.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.health_education_topic.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('health_education_topic.edit.name', 'com_ehealth_portal.health_education_topic.' . (int) $id)) - || ($id == 0 && !$user->authorise('health_education_topic.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('health_education_topic.edit.name', 'com_ehealthportal.health_education_topic.' . (int) $id)) + || ($id == 0 && !$user->authorise('health_education_topic.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('health_education_topic.edit.description', 'com_ehealth_portal.health_education_topic.' . (int) $id)) - || ($id == 0 && !$user->authorise('health_education_topic.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('health_education_topic.edit.description', 'com_ehealthportal.health_education_topic.' . (int) $id)) + || ($id == 0 && !$user->authorise('health_education_topic.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/health_education_topic.js'; + return 'media/com_ehealthportal/js/health_education_topic.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.health_education_topic.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.health_education_topic.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.health_education_topic.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.health_education_topic.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.health_education_topic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.health_education_topic.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_health_education_topic')); + ->from($db->quoteName('#__ehealthportal_health_education_topic')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.health_education_topic.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.health_education_topic.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.health_education_topic', $data); + $this->preprocessData('com_ehealthportal.health_education_topic', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('health_education_topic'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('health_education_topic'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('health_education_topic'); + $this->canDo = EhealthportalHelper::getActions('health_education_topic'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('health_education_topic.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('health_education_topic'); + $this->canDo = EhealthportalHelper::getActions('health_education_topic'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('health_education_topic.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('health_education_topic', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "health_education_topic", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('health_education_topic', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelHealth_education_topic extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/health_education_topics.php b/admin/models/health_education_topics.php index ea17b5f..f80a5c1 100644 --- a/admin/models/health_education_topics.php +++ b/admin/models/health_education_topics.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topics.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Health_education_topics Model + * Health_education_topics List Model */ -class Ehealth_portalModelHealth_education_topics extends JModelList +class EhealthportalModelHealth_education_topics extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelHealth_education_topics extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_health_education_topic', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_health_education_topic', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelHealth_education_topics extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_health_education_topic table - $query->from($db->quoteName('#__ehealth_portal_health_education_topic', 'a')); + // From the ehealthportal_health_education_topic table + $query->from($db->quoteName('#__ehealthportal_health_education_topic', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelHealth_education_topics extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelHealth_education_topics extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_health_education_topic"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_health_education_topic"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelHealth_education_topics extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelHealth_education_topics extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelHealth_education_topics extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_health_education_topic')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_health_education_topic')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelHealth_education_topics extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_health_education_topic'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_health_education_topic'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/health_educations.php b/admin/models/health_educations.php index c96cf1e..0c15592 100644 --- a/admin/models/health_educations.php +++ b/admin/models/health_educations.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_educations.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Health_educations Model + * Health_educations List Model */ -class Ehealth_portalModelHealth_educations extends JModelList +class EhealthportalModelHealth_educations extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -66,7 +75,7 @@ class Ehealth_portalModelHealth_educations extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -123,7 +132,7 @@ class Ehealth_portalModelHealth_educations extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -131,14 +140,28 @@ class Ehealth_portalModelHealth_educations extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -147,7 +170,7 @@ class Ehealth_portalModelHealth_educations extends JModelList } } - + // return items return $items; } @@ -163,40 +186,40 @@ class Ehealth_portalModelHealth_educations extends JModelList if ($name === 'education_type') { $education_typeArray = array( - 0 => 'COM_EHEALTH_PORTAL_HEALTH_EDUCATION_INDIVIDUAL', - 1 => 'COM_EHEALTH_PORTAL_HEALTH_EDUCATION_GROUP' + 0 => 'COM_EHEALTHPORTAL_HEALTH_EDUCATION_INDIVIDUAL', + 1 => 'COM_EHEALTHPORTAL_HEALTH_EDUCATION_GROUP' ); // Now check if value is found in this array - if (isset($education_typeArray[$value]) && Ehealth_portalHelper::checkString($education_typeArray[$value])) + if (isset($education_typeArray[$value]) && StringHelper::check($education_typeArray[$value])) { return $education_typeArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_health_education', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_health_education', 'a')); - // From the ehealth_portal_health_education_topic table. + // From the ehealthportal_health_education_topic table. $query->select($db->quoteName('g.name','health_education_topic_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_health_education_topic', 'g') . ' ON (' . $db->quoteName('a.health_education_topic') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_health_education_topic', 'g') . ' ON (' . $db->quoteName('a.health_education_topic') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -218,7 +241,7 @@ class Ehealth_portalModelHealth_educations extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -226,7 +249,7 @@ class Ehealth_portalModelHealth_educations extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -259,7 +282,7 @@ class Ehealth_portalModelHealth_educations extends JModelList $query->where('a.education_type = ' . (int) $_education_type); } } - elseif (Ehealth_portalHelper::checkString($_education_type)) + elseif (EhealthportalHelper::checkString($_education_type)) { $query->where('a.education_type = ' . $db->quote($db->escape($_education_type))); } @@ -276,11 +299,11 @@ class Ehealth_portalModelHealth_educations extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } - elseif (Ehealth_portalHelper::checkArray($_patient)) + elseif (EhealthportalHelper::checkArray($_patient)) { // Secure the array for the query $_patient = array_map( function ($val) use(&$db) { @@ -295,7 +318,7 @@ class Ehealth_portalModelHealth_educations extends JModelList return (int) $val; } } - elseif (Ehealth_portalHelper::checkString($val)) + elseif (EhealthportalHelper::checkString($val)) { return $db->quote($db->escape($val)); } @@ -326,24 +349,24 @@ class Ehealth_portalModelHealth_educations extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_health_education table - $query->from($db->quoteName('#__ehealth_portal_health_education', 'a')); + // From the ehealthportal_health_education table + $query->from($db->quoteName('#__ehealthportal_health_education', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -362,8 +385,18 @@ class Ehealth_portalModelHealth_educations extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_health_education_topic table. + $query->select($db->quoteName('g.name','health_education_topic')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_health_education_topic', 'g') . ' ON (' . $db->quoteName('a.health_education_topic') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -380,10 +413,11 @@ class Ehealth_portalModelHealth_educations extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -392,10 +426,25 @@ class Ehealth_portalModelHealth_educations extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert education_type + $item->education_type = $this->selectionTranslation($item->education_type, 'education_type'); + } + } + + } return $items; } } @@ -410,10 +459,10 @@ class Ehealth_portalModelHealth_educations extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_health_education"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_health_education"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -428,7 +477,7 @@ class Ehealth_portalModelHealth_educations extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -443,13 +492,13 @@ class Ehealth_portalModelHealth_educations extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -459,13 +508,13 @@ class Ehealth_portalModelHealth_educations extends JModelList $id .= ':' . $this->getState('filter.education_type'); // Check if the value is an array $_patient = $this->getState('filter.patient'); - if (Ehealth_portalHelper::checkArray($_patient)) + if (UtilitiesArrayHelper::check($_patient)) { $id .= ':' . implode(':', $_patient); } // Check if this is only an number or string elseif (is_numeric($_patient) - || Ehealth_portalHelper::checkString($_patient)) + || StringHelper::check($_patient)) { $id .= ':' . $_patient; } @@ -483,24 +532,26 @@ class Ehealth_portalModelHealth_educations extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_health_education')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_health_education')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -515,8 +566,8 @@ class Ehealth_portalModelHealth_educations extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_health_education'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_health_education'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/hiv_counseling_and_testing.php b/admin/models/hiv_counseling_and_testing.php index 138cd85..6e5f2bb 100644 --- a/admin/models/hiv_counseling_and_testing.php +++ b/admin/models/hiv_counseling_and_testing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counseling_and_testing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Hiv_counseling_and_testing Model + * Ehealthportal Hiv_counseling_and_testing Admin Model */ -class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin +class EhealthportalModelHiv_counseling_and_testing extends AdminModel { /** * The tab layout fields array. @@ -70,7 +79,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -78,7 +87,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.hiv_counseling_and_testing'; + public $typeAlias = 'com_ehealthportal.hiv_counseling_and_testing'; /** * Returns a Table object, always creating it @@ -87,18 +96,18 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'hiv_counseling_and_testing', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'hiv_counseling_and_testing', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -127,12 +136,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.hiv_counseling_and_testing'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -149,7 +153,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -169,14 +173,14 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.hiv_counseling_and_testing', 'hiv_counseling_and_testing', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.hiv_counseling_and_testing', 'hiv_counseling_and_testing', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -189,12 +193,12 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.hiv_counseling_and_testing.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.hiv_counseling_and_testing.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -210,7 +214,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -220,7 +224,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -244,19 +248,26 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/hiv_counseling_and_testing.js'; + return 'media/com_ehealthportal/js/hiv_counseling_and_testing.js'; } - + /** * Method to test whether a record can be deleted. * @@ -275,9 +286,9 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.hiv_counseling_and_testing.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.hiv_counseling_and_testing.' . (int) $record->id); } return false; } @@ -293,42 +304,42 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.hiv_counseling_and_testing.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.hiv_counseling_and_testing.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.hiv_counseling_and_testing.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.hiv_counseling_and_testing.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -336,19 +347,19 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -360,10 +371,10 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_hiv_counseling_and_testing')); + ->from($db->quoteName('#__ehealthportal_hiv_counseling_and_testing')); $db->setQuery($query); $max = $db->loadResult(); @@ -375,7 +386,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -390,16 +401,16 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.hiv_counseling_and_testing.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.hiv_counseling_and_testing.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.hiv_counseling_and_testing', $data); + $this->preprocessData('com_ehealthportal.hiv_counseling_and_testing', $data); } return $data; @@ -414,9 +425,9 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -432,7 +443,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin { return false; } - + return true; } @@ -452,10 +463,10 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -481,30 +492,30 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('hiv_counseling_and_testing'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('hiv_counseling_and_testing'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -541,8 +552,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -568,13 +578,13 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('hiv_counseling_and_testing'); + $this->canDo = EhealthportalHelper::getActions('hiv_counseling_and_testing'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('hiv_counseling_and_testing.batch')) { return false; } @@ -594,7 +604,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -607,7 +617,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -623,13 +633,19 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -641,7 +657,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -705,15 +721,15 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('hiv_counseling_and_testing'); + $this->canDo = EhealthportalHelper::getActions('hiv_counseling_and_testing'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('hiv_counseling_and_testing.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -730,7 +746,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -746,13 +762,13 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -796,7 +812,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -808,23 +824,39 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('hiv_counseling_and_testing', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "hiv_counseling_and_testing", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -834,7 +866,7 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -842,14 +874,14 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -862,7 +894,6 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -873,4 +904,26 @@ class Ehealth_portalModelHiv_counseling_and_testing extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/hiv_counselings_and_testings.php b/admin/models/hiv_counselings_and_testings.php index 38b3aa1..f8c933e 100644 --- a/admin/models/hiv_counselings_and_testings.php +++ b/admin/models/hiv_counselings_and_testings.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counselings_and_testings.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Hiv_counselings_and_testings Model + * Hiv_counselings_and_testings List Model */ -class Ehealth_portalModelHiv_counselings_and_testings extends JModelList +class EhealthportalModelHiv_counselings_and_testings extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -143,7 +166,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList } } - + // return items return $items; } @@ -159,12 +182,12 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'counseling_type') { $counseling_typeArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_INDIVIDUAL', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_COUPLE', - 2 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_MINOR' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INDIVIDUAL', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_COUPLE', + 2 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_MINOR' ); // Now check if value is found in this array - if (isset($counseling_typeArray[$value]) && Ehealth_portalHelper::checkString($counseling_typeArray[$value])) + if (isset($counseling_typeArray[$value]) && StringHelper::check($counseling_typeArray[$value])) { return $counseling_typeArray[$value]; } @@ -173,13 +196,13 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'last_test_date') { $last_test_dateArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_ONESIX_MONTHS', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_SEVENTWELVE_MONTHS', - 2 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING__YEAR', - 3 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEVER' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ONESIX_MONTHS', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_SEVENTWELVE_MONTHS', + 2 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING__YEAR', + 3 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEVER' ); // Now check if value is found in this array - if (isset($last_test_dateArray[$value]) && Ehealth_portalHelper::checkString($last_test_dateArray[$value])) + if (isset($last_test_dateArray[$value]) && StringHelper::check($last_test_dateArray[$value])) { return $last_test_dateArray[$value]; } @@ -188,13 +211,13 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'prev_test_result') { $prev_test_resultArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', - 2 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN', - 3 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NA' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', + 2 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN', + 3 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NA' ); // Now check if value is found in this array - if (isset($prev_test_resultArray[$value]) && Ehealth_portalHelper::checkString($prev_test_resultArray[$value])) + if (isset($prev_test_resultArray[$value]) && StringHelper::check($prev_test_resultArray[$value])) { return $prev_test_resultArray[$value]; } @@ -203,12 +226,12 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'test_result_one') { $test_result_oneArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($test_result_oneArray[$value]) && Ehealth_portalHelper::checkString($test_result_oneArray[$value])) + if (isset($test_result_oneArray[$value]) && StringHelper::check($test_result_oneArray[$value])) { return $test_result_oneArray[$value]; } @@ -217,12 +240,12 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'test_result_two') { $test_result_twoArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($test_result_twoArray[$value]) && Ehealth_portalHelper::checkString($test_result_twoArray[$value])) + if (isset($test_result_twoArray[$value]) && StringHelper::check($test_result_twoArray[$value])) { return $test_result_twoArray[$value]; } @@ -231,13 +254,13 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'final_test_result') { $final_test_resultArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', - 2 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN', - 3 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NA' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NEGATIVE', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_POSITIVE', + 2 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_UNKNOWN', + 3 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NA' ); // Now check if value is found in this array - if (isset($final_test_resultArray[$value]) && Ehealth_portalHelper::checkString($final_test_resultArray[$value])) + if (isset($final_test_resultArray[$value]) && StringHelper::check($final_test_resultArray[$value])) { return $final_test_resultArray[$value]; } @@ -246,44 +269,44 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList if ($name === 'eqa') { $eqaArray = array( - 0 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_YES', - 1 => 'COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_NO' + 0 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_YES', + 1 => 'COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_NO' ); // Now check if value is found in this array - if (isset($eqaArray[$value]) && Ehealth_portalHelper::checkString($eqaArray[$value])) + if (isset($eqaArray[$value]) && StringHelper::check($eqaArray[$value])) { return $eqaArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_hiv_counseling_and_testing', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_hiv_counseling_and_testing', 'a')); - // From the ehealth_portal_testing_reason table. + // From the ehealthportal_testing_reason table. $query->select($db->quoteName('g.name','testing_reason_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_testing_reason', 'g') . ' ON (' . $db->quoteName('a.testing_reason') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_testing_reason', 'g') . ' ON (' . $db->quoteName('a.testing_reason') . ' = ' . $db->quoteName('g.id') . ')'); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('h.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'h') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('h.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'h') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('h.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -305,7 +328,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -313,7 +336,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -346,7 +369,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -373,24 +396,24 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_hiv_counseling_and_testing table - $query->from($db->quoteName('#__ehealth_portal_hiv_counseling_and_testing', 'a')); + // From the ehealthportal_hiv_counseling_and_testing table + $query->from($db->quoteName('#__ehealthportal_hiv_counseling_and_testing', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -409,8 +432,22 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_testing_reason table. + $query->select($db->quoteName('g.name','testing_reason')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_testing_reason', 'g') . ' ON (' . $db->quoteName('a.testing_reason') . ' = ' . $db->quoteName('g.id') . ')'); + + // From the ehealthportal_referral table. + $query->select($db->quoteName('h.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'h') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('h.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -427,10 +464,11 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -439,10 +477,37 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert counseling_type + $item->counseling_type = $this->selectionTranslation($item->counseling_type, 'counseling_type'); + // convert last_test_date + $item->last_test_date = $this->selectionTranslation($item->last_test_date, 'last_test_date'); + // convert prev_test_result + $item->prev_test_result = $this->selectionTranslation($item->prev_test_result, 'prev_test_result'); + // convert test_result_one + $item->test_result_one = $this->selectionTranslation($item->test_result_one, 'test_result_one'); + // convert test_result_two + $item->test_result_two = $this->selectionTranslation($item->test_result_two, 'test_result_two'); + // convert final_test_result + $item->final_test_result = $this->selectionTranslation($item->final_test_result, 'final_test_result'); + // convert eqa + $item->eqa = $this->selectionTranslation($item->eqa, 'eqa'); + } + } + + } return $items; } } @@ -457,10 +522,10 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_hiv_counseling_and_testing"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_hiv_counseling_and_testing"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -475,7 +540,7 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -490,13 +555,13 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -517,24 +582,26 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_hiv_counseling_and_testing')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_hiv_counseling_and_testing')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -549,8 +616,8 @@ class Ehealth_portalModelHiv_counselings_and_testings extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_hiv_counseling_and_testing'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_hiv_counseling_and_testing'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/immunisation.php b/admin/models/immunisation.php index 4539142..fa5a05f 100644 --- a/admin/models/immunisation.php +++ b/admin/models/immunisation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Immunisation Model + * Ehealthportal Immunisation Admin Model */ -class Ehealth_portalModelImmunisation extends JModelAdmin +class EhealthportalModelImmunisation extends AdminModel { /** * The tab layout fields array. @@ -50,10 +59,6 @@ class Ehealth_portalModelImmunisation extends JModelAdmin ), 'above' => array( 'patient' - ), - 'under' => array( - 'immunisation_vaccine_type', - 'administration_part' ) ), 'referrals' => array( @@ -70,7 +75,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -78,7 +83,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.immunisation'; + public $typeAlias = 'com_ehealthportal.immunisation'; /** * Returns a Table object, always creating it @@ -87,18 +92,18 @@ class Ehealth_portalModelImmunisation extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'immunisation', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'immunisation', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -127,6 +132,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); if (!empty($item->immunisation)) { @@ -135,12 +141,6 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $immunisation->loadString($item->immunisation); $item->immunisation = $immunisation->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.immunisation'); - } } return $item; @@ -157,7 +157,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -177,14 +177,14 @@ class Ehealth_portalModelImmunisation extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.immunisation', 'immunisation', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.immunisation', 'immunisation', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -197,12 +197,12 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.immunisation.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.immunisation.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -218,7 +218,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -228,7 +228,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -236,8 +236,8 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Patient access controls. - if ($id != 0 && (!$user->authorise('immunisation.edit.patient', 'com_ehealth_portal.immunisation.' . (int) $id)) - || ($id == 0 && !$user->authorise('immunisation.edit.patient', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('immunisation.edit.patient', 'com_ehealthportal.immunisation.' . (int) $id)) + || ($id == 0 && !$user->authorise('immunisation.edit.patient', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('patient', 'disabled', 'true'); @@ -269,19 +269,26 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/immunisation.js'; + return 'media/com_ehealthportal/js/immunisation.js'; } - + /** * Method to test whether a record can be deleted. * @@ -300,9 +307,9 @@ class Ehealth_portalModelImmunisation extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.immunisation.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.immunisation.' . (int) $record->id); } return false; } @@ -318,42 +325,42 @@ class Ehealth_portalModelImmunisation extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.immunisation.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.immunisation.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.immunisation.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.immunisation.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -361,19 +368,19 @@ class Ehealth_portalModelImmunisation extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -385,10 +392,10 @@ class Ehealth_portalModelImmunisation extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_immunisation')); + ->from($db->quoteName('#__ehealthportal_immunisation')); $db->setQuery($query); $max = $db->loadResult(); @@ -400,7 +407,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -415,16 +422,16 @@ class Ehealth_portalModelImmunisation extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.immunisation.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.immunisation.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.immunisation', $data); + $this->preprocessData('com_ehealthportal.immunisation', $data); } return $data; @@ -439,9 +446,9 @@ class Ehealth_portalModelImmunisation extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -457,7 +464,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin { return false; } - + return true; } @@ -477,10 +484,10 @@ class Ehealth_portalModelImmunisation extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -506,30 +513,30 @@ class Ehealth_portalModelImmunisation extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('immunisation'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('immunisation'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -566,8 +573,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -593,13 +599,13 @@ class Ehealth_portalModelImmunisation extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('immunisation'); + $this->canDo = EhealthportalHelper::getActions('immunisation'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('immunisation.batch')) { return false; } @@ -619,7 +625,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -632,7 +638,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -648,13 +654,19 @@ class Ehealth_portalModelImmunisation extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -666,7 +678,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -730,15 +742,15 @@ class Ehealth_portalModelImmunisation extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('immunisation'); + $this->canDo = EhealthportalHelper::getActions('immunisation'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('immunisation.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -755,7 +767,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -771,13 +783,13 @@ class Ehealth_portalModelImmunisation extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -821,7 +833,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -833,19 +845,34 @@ class Ehealth_portalModelImmunisation extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('immunisation', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "immunisation", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the immunisation items to data. if (isset($data['immunisation']) && is_array($data['immunisation'])) { @@ -858,11 +885,12 @@ class Ehealth_portalModelImmunisation extends JModelAdmin // Set the empty immunisation to data $data['immunisation'] = ''; } - + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -872,7 +900,7 @@ class Ehealth_portalModelImmunisation extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -880,14 +908,14 @@ class Ehealth_portalModelImmunisation extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -900,7 +928,6 @@ class Ehealth_portalModelImmunisation extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -911,4 +938,26 @@ class Ehealth_portalModelImmunisation extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/immunisation_type.php b/admin/models/immunisation_type.php index 56fb934..4f8aaa3 100644 --- a/admin/models/immunisation_type.php +++ b/admin/models/immunisation_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Immunisation_type Model + * Ehealthportal Immunisation_type Admin Model */ -class Ehealth_portalModelImmunisation_type extends JModelAdmin +class EhealthportalModelImmunisation_type extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.immunisation_type'; + public $typeAlias = 'com_ehealthportal.immunisation_type'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'immunisation_type', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'immunisation_type', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.immunisation_type'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.immunisation_type', 'immunisation_type', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.immunisation_type', 'immunisation_type', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.immunisation_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.immunisation_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('immunisation_type.edit.name', 'com_ehealth_portal.immunisation_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('immunisation_type.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('immunisation_type.edit.name', 'com_ehealthportal.immunisation_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('immunisation_type.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('immunisation_type.edit.description', 'com_ehealth_portal.immunisation_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('immunisation_type.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('immunisation_type.edit.description', 'com_ehealthportal.immunisation_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('immunisation_type.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/immunisation_type.js'; + return 'media/com_ehealthportal/js/immunisation_type.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.immunisation_type.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.immunisation_type.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.immunisation_type.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.immunisation_type.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.immunisation_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.immunisation_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_immunisation_type')); + ->from($db->quoteName('#__ehealthportal_immunisation_type')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.immunisation_type.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.immunisation_type.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.immunisation_type', $data); + $this->preprocessData('com_ehealthportal.immunisation_type', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('immunisation_type'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('immunisation_type'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('immunisation_type'); + $this->canDo = EhealthportalHelper::getActions('immunisation_type'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('immunisation_type.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('immunisation_type'); + $this->canDo = EhealthportalHelper::getActions('immunisation_type'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('immunisation_type.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('immunisation_type', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "immunisation_type", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('immunisation_type', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_IMMUNISATION_TYPE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelImmunisation_type extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/immunisation_types.php b/admin/models/immunisation_types.php index 2d31480..be1eb46 100644 --- a/admin/models/immunisation_types.php +++ b/admin/models/immunisation_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Immunisation_types Model + * Immunisation_types List Model */ -class Ehealth_portalModelImmunisation_types extends JModelList +class EhealthportalModelImmunisation_types extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelImmunisation_types extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_immunisation_type', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_immunisation_type', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelImmunisation_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_immunisation_type table - $query->from($db->quoteName('#__ehealth_portal_immunisation_type', 'a')); + // From the ehealthportal_immunisation_type table + $query->from($db->quoteName('#__ehealthportal_immunisation_type', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelImmunisation_types extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelImmunisation_types extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_immunisation_type"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_immunisation_type"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelImmunisation_types extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelImmunisation_types extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelImmunisation_types extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_immunisation_type')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_immunisation_type')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelImmunisation_types extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_immunisation_type'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_immunisation_type'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/immunisation_vaccine_type.php b/admin/models/immunisation_vaccine_type.php index b515a72..e0531fd 100644 --- a/admin/models/immunisation_vaccine_type.php +++ b/admin/models/immunisation_vaccine_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Immunisation_vaccine_type Model + * Ehealthportal Immunisation_vaccine_type Admin Model */ -class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin +class EhealthportalModelImmunisation_vaccine_type extends AdminModel { /** * The tab layout fields array. @@ -59,7 +68,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -67,7 +76,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.immunisation_vaccine_type'; + public $typeAlias = 'com_ehealthportal.immunisation_vaccine_type'; /** * Returns a Table object, always creating it @@ -76,18 +85,18 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'immunisation_vaccine_type', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'immunisation_vaccine_type', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -116,12 +125,6 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.immunisation_vaccine_type'); - } } return $item; @@ -138,7 +141,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -158,14 +161,14 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.immunisation_vaccine_type', 'immunisation_vaccine_type', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.immunisation_vaccine_type', 'immunisation_vaccine_type', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -178,12 +181,12 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.immunisation_vaccine_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.immunisation_vaccine_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -199,7 +202,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -209,7 +212,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -217,8 +220,8 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('immunisation_vaccine_type.edit.name', 'com_ehealth_portal.immunisation_vaccine_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('immunisation_vaccine_type.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('immunisation_vaccine_type.edit.name', 'com_ehealthportal.immunisation_vaccine_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('immunisation_vaccine_type.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -234,8 +237,8 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('immunisation_vaccine_type.edit.description', 'com_ehealth_portal.immunisation_vaccine_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('immunisation_vaccine_type.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('immunisation_vaccine_type.edit.description', 'com_ehealthportal.immunisation_vaccine_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('immunisation_vaccine_type.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -267,19 +270,26 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/immunisation_vaccine_type.js'; + return 'media/com_ehealthportal/js/immunisation_vaccine_type.js'; } - + /** * Method to test whether a record can be deleted. * @@ -298,9 +308,9 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.immunisation_vaccine_type.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.immunisation_vaccine_type.' . (int) $record->id); } return false; } @@ -316,42 +326,42 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.immunisation_vaccine_type.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.immunisation_vaccine_type.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.immunisation_vaccine_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.immunisation_vaccine_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -359,19 +369,19 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -383,10 +393,10 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type')); + ->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type')); $db->setQuery($query); $max = $db->loadResult(); @@ -398,7 +408,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -413,16 +423,16 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.immunisation_vaccine_type.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.immunisation_vaccine_type.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.immunisation_vaccine_type', $data); + $this->preprocessData('com_ehealthportal.immunisation_vaccine_type', $data); } return $data; @@ -437,9 +447,9 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -455,7 +465,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin { return false; } - + return true; } @@ -475,10 +485,10 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -504,30 +514,30 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('immunisation_vaccine_type'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -564,8 +574,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -591,13 +600,13 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); + $this->canDo = EhealthportalHelper::getActions('immunisation_vaccine_type'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('immunisation_vaccine_type.batch')) { return false; } @@ -617,7 +626,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -630,7 +639,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -646,14 +655,14 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -665,7 +674,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -729,15 +738,15 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('immunisation_vaccine_type'); + $this->canDo = EhealthportalHelper::getActions('immunisation_vaccine_type'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('immunisation_vaccine_type.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -754,7 +763,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -770,13 +779,13 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -820,7 +829,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -832,23 +841,38 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('immunisation_vaccine_type', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "immunisation_vaccine_type", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -881,27 +905,27 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('immunisation_vaccine_type', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -911,7 +935,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -919,14 +943,14 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -939,7 +963,6 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -966,10 +989,10 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -984,7 +1007,7 @@ class Ehealth_portalModelImmunisation_vaccine_type extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/immunisation_vaccine_types.php b/admin/models/immunisation_vaccine_types.php index 57be898..fa6715b 100644 --- a/admin/models/immunisation_vaccine_types.php +++ b/admin/models/immunisation_vaccine_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Immunisation_vaccine_types Model + * Immunisation_vaccine_types List Model */ -class Ehealth_portalModelImmunisation_vaccine_types extends JModelList +class EhealthportalModelImmunisation_vaccine_types extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -66,7 +75,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -123,7 +132,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -131,38 +140,38 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type', 'a')); - // From the ehealth_portal_administration_part table. + // From the ehealthportal_administration_part table. $query->select($db->quoteName('g.name','administration_part_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_administration_part', 'g') . ' ON (' . $db->quoteName('a.administration_part') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_administration_part', 'g') . ' ON (' . $db->quoteName('a.administration_part') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -184,7 +193,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -192,7 +201,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -225,7 +234,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList $query->where('a.administration_part = ' . (int) $_administration_part); } } - elseif (Ehealth_portalHelper::checkString($_administration_part)) + elseif (EhealthportalHelper::checkString($_administration_part)) { $query->where('a.administration_part = ' . $db->quote($db->escape($_administration_part))); } @@ -252,24 +261,24 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_immunisation_vaccine_type table - $query->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type', 'a')); + // From the ehealthportal_immunisation_vaccine_type table + $query->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -288,8 +297,18 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_administration_part table. + $query->select($db->quoteName('g.name','administration_part')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_administration_part', 'g') . ' ON (' . $db->quoteName('a.administration_part') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -306,7 +325,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -318,7 +337,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -336,10 +355,10 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_immunisation_vaccine_type"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_immunisation_vaccine_type"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -354,7 +373,7 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -369,13 +388,13 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -398,24 +417,26 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_immunisation_vaccine_type')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_immunisation_vaccine_type')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -430,8 +451,8 @@ class Ehealth_portalModelImmunisation_vaccine_types extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_immunisation_vaccine_type'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_immunisation_vaccine_type'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/immunisations.php b/admin/models/immunisations.php index be835e7..754cf85 100644 --- a/admin/models/immunisations.php +++ b/admin/models/immunisations.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisations.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Immunisations Model + * Immunisations List Model */ -class Ehealth_portalModelImmunisations extends JModelList +class EhealthportalModelImmunisations extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelImmunisations extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelImmunisations extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelImmunisations extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -131,7 +154,7 @@ class Ehealth_portalModelImmunisations extends JModelList } } - + // return items return $items; } @@ -147,48 +170,40 @@ class Ehealth_portalModelImmunisations extends JModelList if ($name === 'immunisation_up_to_date') { $immunisation_up_to_dateArray = array( - 0 => 'COM_EHEALTH_PORTAL_IMMUNISATION_YES', - 1 => 'COM_EHEALTH_PORTAL_IMMUNISATION_NO' + 0 => 'COM_EHEALTHPORTAL_IMMUNISATION_YES', + 1 => 'COM_EHEALTHPORTAL_IMMUNISATION_NO' ); // Now check if value is found in this array - if (isset($immunisation_up_to_dateArray[$value]) && Ehealth_portalHelper::checkString($immunisation_up_to_dateArray[$value])) + if (isset($immunisation_up_to_dateArray[$value]) && StringHelper::check($immunisation_up_to_dateArray[$value])) { return $immunisation_up_to_dateArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_immunisation', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_immunisation', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); - - // From the ehealth_portal_immunisation_vaccine_type table. - $query->select($db->quoteName('h.name','immunisation_vaccine_type_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_immunisation_vaccine_type', 'h') . ' ON (' . $db->quoteName('a.immunisation_vaccine_type') . ' = ' . $db->quoteName('h.id') . ')'); - - // From the ehealth_portal_administration_part table. - $query->select($db->quoteName('i.name','administration_part_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_administration_part', 'i') . ' ON (' . $db->quoteName('a.administration_part') . ' = ' . $db->quoteName('i.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -210,7 +225,7 @@ class Ehealth_portalModelImmunisations extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -218,7 +233,7 @@ class Ehealth_portalModelImmunisations extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -251,7 +266,7 @@ class Ehealth_portalModelImmunisations extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -278,24 +293,24 @@ class Ehealth_portalModelImmunisations extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_immunisation table - $query->from($db->quoteName('#__ehealth_portal_immunisation', 'a')); + // From the ehealthportal_immunisation table + $query->from($db->quoteName('#__ehealthportal_immunisation', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -314,8 +329,18 @@ class Ehealth_portalModelImmunisations extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -332,10 +357,11 @@ class Ehealth_portalModelImmunisations extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -344,10 +370,25 @@ class Ehealth_portalModelImmunisations extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert immunisation_up_to_date + $item->immunisation_up_to_date = $this->selectionTranslation($item->immunisation_up_to_date, 'immunisation_up_to_date'); + } + } + + } return $items; } } @@ -362,10 +403,10 @@ class Ehealth_portalModelImmunisations extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_immunisation"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_immunisation"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -380,7 +421,7 @@ class Ehealth_portalModelImmunisations extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -395,13 +436,13 @@ class Ehealth_portalModelImmunisations extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -422,24 +463,26 @@ class Ehealth_portalModelImmunisations extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_immunisation')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_immunisation')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -454,8 +497,8 @@ class Ehealth_portalModelImmunisations extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_immunisation'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_immunisation'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/import.php b/admin/models/import.php index 16dc494..7f320e5 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage import.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,21 +26,29 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\Folder; +use Joomla\CMS\Filesystem\Path; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\Installer\InstallerHelper; +use Joomla\CMS\MVC\Model\BaseDatabaseModel; +use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; -/** - * Ehealth_portal Import Model +/*** + * Ehealthportal Import Base Database Model */ -class Ehealth_portalModelImport extends JModelLegacy +class EhealthportalModelImport extends BaseDatabaseModel { // set uploading values protected $use_streams = false; protected $allow_unsafe = false; - protected $safeFileOptions = array(); - + protected $safeFileOptions = []; + /** * @var object JTable object */ @@ -56,14 +64,14 @@ class Ehealth_portalModelImport extends JModelLegacy * * @var string */ - protected $_context = 'com_ehealth_portal.import'; - + protected $_context = 'com_ehealthportal.import'; + /** * Import Settings */ - protected $getType = NULL; - protected $dataType = NULL; - + protected $getType = NULL; + protected $dataType = NULL; + /** * Method to auto-populate the model state. * @@ -74,10 +82,10 @@ class Ehealth_portalModelImport extends JModelLegacy */ protected function populateState() { - $app = JFactory::getApplication('administrator'); + $app = Factory::getApplication('administrator'); - $this->setState('message', $app->getUserState('com_ehealth_portal.message')); - $app->setUserState('com_ehealth_portal.message', ''); + $this->setState('message', $app->getUserState('com_ehealthportal.message')); + $app->setUserState('com_ehealthportal.message', ''); // Recall the 'Import from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); @@ -94,14 +102,14 @@ class Ehealth_portalModelImport extends JModelLegacy public function import() { $this->setState('action', 'import'); - $app = JFactory::getApplication(); - $session = JFactory::getSession(); + $app = Factory::getApplication(); + $session = Factory::getSession(); $package = null; $continue = false; // get import type $this->getType = $app->input->getString('gettype', NULL); // get import type - $this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL); + $this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL); if ($package === null) { @@ -122,9 +130,9 @@ class Ehealth_portalModelImport extends JModelLegacy break; case 'continue': - $continue = true; - $package = $session->get('package', null); - $package = json_decode($package, true); + $continue = true; + $package = $session->get('package', null); + $package = json_decode($package, true); // clear session $session->clear('package'); $session->clear('dataType'); @@ -132,7 +140,7 @@ class Ehealth_portalModelImport extends JModelLegacy break; default: - $app->setUserState('com_ehealth_portal.message', JText::_('COM_EHEALTH_PORTAL_IMPORT_NO_IMPORT_TYPE_FOUND')); + $app->setUserState('com_ehealthportal.message', Text::_('COM_EHEALTHPORTAL_IMPORT_NO_IMPORT_TYPE_FOUND')); return false; break; @@ -146,10 +154,10 @@ class Ehealth_portalModelImport extends JModelLegacy $this->remove($package['packagename']); } - $app->setUserState('com_ehealth_portal.message', JText::_('COM_EHEALTH_PORTAL_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); + $app->setUserState('com_ehealthportal.message', Text::_('COM_EHEALTHPORTAL_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); return false; } - + // first link data to table headers if(!$continue){ $package = json_encode($package); @@ -158,17 +166,17 @@ class Ehealth_portalModelImport extends JModelLegacy $session->set('hasPackage', true); return true; } - + // set the data $headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false), true); if (!$this->setData($package,$this->dataType,$headerList)) { // There was an error importing the package - $msg = JText::_('COM_EHEALTH_PORTAL_IMPORT_ERROR'); + $msg = Text::_('COM_EHEALTHPORTAL_IMPORT_ERROR'); $back = $session->get('backto_VDM_IMPORT', NULL); if ($back) { - $app->setUserState('com_ehealth_portal.redirect_url', 'index.php?option=com_ehealth_portal&view='.$back); + $app->setUserState('com_ehealthportal.redirect_url', 'index.php?option=com_ehealthportal&view='.$back); $session->clear('backto_VDM_IMPORT'); } $result = false; @@ -176,12 +184,12 @@ class Ehealth_portalModelImport extends JModelLegacy else { // Package imported sucessfully - $msg = JText::sprintf('COM_EHEALTH_PORTAL_IMPORT_SUCCESS', $package['packagename']); + $msg = Text::sprintf('COM_EHEALTHPORTAL_IMPORT_SUCCESS', $package['packagename']); $back = $session->get('backto_VDM_IMPORT', NULL); if ($back) { - $app->setUserState('com_ehealth_portal.redirect_url', 'index.php?option=com_ehealth_portal&view='.$back); - $session->clear('backto_VDM_IMPORT'); + $app->setUserState('com_ehealthportal.redirect_url', 'index.php?option=com_ehealthportal&view='.$back); + $session->clear('backto_VDM_IMPORT'); } $result = true; } @@ -192,7 +200,7 @@ class Ehealth_portalModelImport extends JModelLegacy // remove file after import $this->remove($package['packagename']); $session->clear($this->getType.'_VDM_IMPORTHEADERS'); - + return $result; } @@ -202,48 +210,47 @@ class Ehealth_portalModelImport extends JModelLegacy * @return spreadsheet definition or false on failure */ protected function _getPackageFromUpload() - { + { // Get the uploaded file information - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $input = $app->input; // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. $userfile = $input->files->get('import_package', null, 'raw'); - + // Make sure that file uploads are enabled in php if (!(bool) ini_get('file_uploads')) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); return false; } // If there is no uploaded file, we have a problem... if (!is_array($userfile)) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); return false; } // Check if there was a problem uploading the file. if ($userfile['error'] || $userfile['size'] < 1) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); return false; } // Build the appropriate paths - $config = JFactory::getConfig(); + $config = Factory::getConfig(); $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; $tmp_src = $userfile['tmp_name']; // Move uploaded file - jimport('joomla.filesystem.file'); $p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions); // Was the package downloaded? if (!$p_file) { - $session = JFactory::getSession(); + $session = Factory::getSession(); $session->clear('package'); $session->clear('dataType'); $session->clear('hasPackage'); @@ -265,16 +272,16 @@ class Ehealth_portalModelImport extends JModelLegacy */ protected function _getPackageFromFolder() { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $input = $app->input; // Get the path to the package to import $p_dir = $input->getString('import_directory'); - $p_dir = JPath::clean($p_dir); + $p_dir = Path::clean($p_dir); // Did you give us a valid path? if (!file_exists($p_dir)) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); return false; } @@ -284,17 +291,17 @@ class Ehealth_portalModelImport extends JModelLegacy // Did you give us a valid package? if (!$type) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); } - + // check the extention if(!$this->checkExtension($p_dir)) { // set error message - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; } - + $package['packagename'] = null; $package['dir'] = $p_dir; $package['type'] = $type; @@ -310,26 +317,26 @@ class Ehealth_portalModelImport extends JModelLegacy */ protected function _getPackageFromUrl() { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $input = $app->input; - + // Get the URL of the package to import $url = $input->getString('import_url'); // Did you give us a URL? if (!$url) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_ENTER_A_URL'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_ENTER_A_URL'), 'warning'); return false; } // Download the package at the URL given - $p_file = JInstallerHelper::downloadPackage($url); + $p_file = InstallerHelper::downloadPackage($url); // Was the package downloaded? if (!$p_file) { - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_INVALID_URL'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_INVALID_URL'), 'warning'); return false; } @@ -338,7 +345,7 @@ class Ehealth_portalModelImport extends JModelLegacy return $package; } - + /** * Check a file and verifies it as a spreadsheet file * Supports .csv .xlsx .xls and .ods @@ -350,29 +357,29 @@ class Ehealth_portalModelImport extends JModelLegacy */ protected function check($archivename) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Clean the name - $archivename = JPath::clean($archivename); - + $archivename = Path::clean($archivename); + // check the extention if(!$this->checkExtension($archivename)) { // Cleanup the import files $this->remove($archivename); - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; } - - $config = JFactory::getConfig(); + + $config = Factory::getConfig(); // set Package Name $check['packagename'] = $archivename; - + // set directory $check['dir'] = $config->get('tmp_path'). '/' .$archivename; - + // set type $check['type'] = $this->getType; - + return $check; } @@ -409,8 +416,8 @@ class Ehealth_portalModelImport extends JModelLegacy protected function remove($package) { jimport('joomla.filesystem.file'); - - $config = JFactory::getConfig(); + + $config = Factory::getConfig(); $package = $config->get('tmp_path'). '/' .$package; // Is the package file a valid file? @@ -418,10 +425,10 @@ class Ehealth_portalModelImport extends JModelLegacy { File::delete($package); } - elseif (is_file(JPath::clean($package))) + elseif (is_file(Path::clean($package))) { // It might also be just a base filename - File::delete(JPath::clean($package)); + File::delete(Path::clean($package)); } } @@ -435,11 +442,11 @@ class Ehealth_portalModelImport extends JModelLegacy **/ protected function setData($package,$table,$target_headers) { - if (Ehealth_portalHelper::checkArray($target_headers)) + if (UtilitiesArrayHelper::check($target_headers)) { // make sure the file is loaded - Ehealth_portalHelper::composerAutoload('phpspreadsheet'); - $jinput = JFactory::getApplication()->input; + EhealthportalHelper::composerAutoload('phpspreadsheet'); + $jinput = Factory::getApplication()->input; foreach($target_headers as $header) { if (($column = $jinput->getString($header, false)) !== false || @@ -479,10 +486,10 @@ class Ehealth_portalModelImport extends JModelLegacy protected function save($data,$table) { // import the data if there is any - if(Ehealth_portalHelper::checkArray($data['array'])) + if(UtilitiesArrayHelper::check($data['array'])) { // get user object - $user = JFactory::getUser(); + $user = Factory::getUser(); // remove header if it has headers $id_key = $data['target_headers']['id']; $published_key = $data['target_headers']['published']; @@ -497,16 +504,16 @@ class Ehealth_portalModelImport extends JModelLegacy } // make sure there is still values in array and that it was not only headers - if(Ehealth_portalHelper::checkArray($data['array']) && $user->authorise($table.'.import', 'com_ehealth_portal') && $user->authorise('core.import', 'com_ehealth_portal')) + if(UtilitiesArrayHelper::check($data['array']) && $user->authorise($table.'.import', 'com_ehealthportal') && $user->authorise('core.import', 'com_ehealthportal')) { // set target. $target = array_flip($data['target_headers']); // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // set some defaults - $todayDate = JFactory::getDate()->toSql(); + $todayDate = Factory::getDate()->toSql(); // get global action permissions - $canDo = Ehealth_portalHelper::getActions($table); + $canDo = EhealthportalHelper::getActions($table); $canEdit = $canDo->get('core.edit'); $canState = $canDo->get('core.edit.state'); $canCreate = $canDo->get('core.create'); @@ -521,7 +528,7 @@ class Ehealth_portalModelImport extends JModelLegacy $query = $db->getQuery(true); $query ->select('version') - ->from($db->quoteName('#__ehealth_portal_'.$table)) + ->from($db->quoteName('#__ehealthportal_'.$table)) ->where($db->quoteName('id') . ' = '. $db->quote($row[$id_key])); // Reset the query using our newly populated query object. $db->setQuery($query); @@ -588,7 +595,7 @@ class Ehealth_portalModelImport extends JModelLegacy $db->quoteName('id') . ' = ' . $id ); - $query->update($db->quoteName('#__ehealth_portal_'.$table))->set($fields)->where($conditions); + $query->update($db->quoteName('#__ehealthportal_'.$table))->set($fields)->where($conditions); $db->setQuery($query); $db->execute(); } @@ -664,7 +671,7 @@ class Ehealth_portalModelImport extends JModelLegacy } // Prepare the insert query. $query - ->insert($db->quoteName('#__ehealth_portal_'.$table)) + ->insert($db->quoteName('#__ehealthportal_'.$table)) ->columns($db->quoteName($columns)) ->values(implode(',', $values)); // Set the query using our newly populated query object and execute it. @@ -674,7 +681,7 @@ class Ehealth_portalModelImport extends JModelLegacy { $aId = $db->insertid(); // make sure the access of asset is set - Ehealth_portalHelper::setAsset($aId,$table); + EhealthportalHelper::setAsset($aId,$table); } } else @@ -691,13 +698,13 @@ class Ehealth_portalModelImport extends JModelLegacy protected function getAlias($name,$type = false) { // sanitize the name to an alias - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $alias = JFilterOutput::stringURLUnicodeSlug($name); + $alias = OutputFilter::stringURLUnicodeSlug($name); } else { - $alias = JFilterOutput::stringURLSafe($name); + $alias = OutputFilter::stringURLSafe($name); } // must be a uniqe alias if ($type) @@ -706,7 +713,7 @@ class Ehealth_portalModelImport extends JModelLegacy } return $alias; } - + /** * Method to generate a uniqe value. * @@ -721,23 +728,23 @@ class Ehealth_portalModelImport extends JModelLegacy // insure the filed is always uniqe while (isset($this->uniqeValueArray[$type][$field][$value])) { - $value = JString::increment($value, 'dash'); + $value = StringHelper::increment($value, 'dash'); } $this->uniqeValueArray[$type][$field][$value] = $value; return $value; } - + protected function getAliasesUsed($table) { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // first we check if there is a alias column - $columns = $db->getTableColumns('#__ehealth_portal_'.$table); + $columns = $db->getTableColumns('#__ehealthportal_'.$table); if(isset($columns['alias'])){ // Create a new query object. $query = $db->getQuery(true); $query->select($db->quoteName(array('alias'))); - $query->from($db->quoteName('#__ehealth_portal_'.$table)); + $query->from($db->quoteName('#__ehealthportal_'.$table)); $db->setQuery($query); $db->execute(); if ($db->getNumRows()) diff --git a/admin/models/medication.php b/admin/models/medication.php index e786993..cd0e38a 100644 --- a/admin/models/medication.php +++ b/admin/models/medication.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medication.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Medication Model + * Ehealthportal Medication Admin Model */ -class Ehealth_portalModelMedication extends JModelAdmin +class EhealthportalModelMedication extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelMedication extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelMedication extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.medication'; + public $typeAlias = 'com_ehealthportal.medication'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelMedication extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'medication', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'medication', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelMedication extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.medication'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelMedication extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelMedication extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.medication', 'medication', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.medication', 'medication', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelMedication extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.medication.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.medication.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelMedication extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelMedication extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelMedication extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('medication.edit.name', 'com_ehealth_portal.medication.' . (int) $id)) - || ($id == 0 && !$user->authorise('medication.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('medication.edit.name', 'com_ehealthportal.medication.' . (int) $id)) + || ($id == 0 && !$user->authorise('medication.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelMedication extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('medication.edit.description', 'com_ehealth_portal.medication.' . (int) $id)) - || ($id == 0 && !$user->authorise('medication.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('medication.edit.description', 'com_ehealthportal.medication.' . (int) $id)) + || ($id == 0 && !$user->authorise('medication.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelMedication extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/medication.js'; + return 'media/com_ehealthportal/js/medication.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelMedication extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.medication.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.medication.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelMedication extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.medication.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.medication.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.medication.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.medication.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelMedication extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelMedication extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_medication')); + ->from($db->quoteName('#__ehealthportal_medication')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelMedication extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelMedication extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.medication.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.medication.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.medication', $data); + $this->preprocessData('com_ehealthportal.medication', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelMedication extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelMedication extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelMedication extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelMedication extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('medication'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('medication'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelMedication extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelMedication extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('medication'); + $this->canDo = EhealthportalHelper::getActions('medication'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('medication.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelMedication extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelMedication extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelMedication extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelMedication extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelMedication extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('medication'); + $this->canDo = EhealthportalHelper::getActions('medication'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('medication.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelMedication extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelMedication extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelMedication extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelMedication extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('medication', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "medication", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelMedication extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('medication', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_MEDICATION_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_MEDICATION_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelMedication extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelMedication extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelMedication extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelMedication extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelMedication extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/medications.php b/admin/models/medications.php index a579778..9a10070 100644 --- a/admin/models/medications.php +++ b/admin/models/medications.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medications.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Medications Model + * Medications List Model */ -class Ehealth_portalModelMedications extends JModelList +class EhealthportalModelMedications extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelMedications extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelMedications extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelMedications extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_medication', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_medication', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelMedications extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelMedications extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelMedications extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_medication table - $query->from($db->quoteName('#__ehealth_portal_medication', 'a')); + // From the ehealthportal_medication table + $query->from($db->quoteName('#__ehealthportal_medication', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelMedications extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelMedications extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelMedications extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelMedications extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_medication"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_medication"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelMedications extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelMedications extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelMedications extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_medication')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_medication')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelMedications extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_medication'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_medication'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/nonpay_reason.php b/admin/models/nonpay_reason.php index f84ac0a..1189895 100644 --- a/admin/models/nonpay_reason.php +++ b/admin/models/nonpay_reason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Nonpay_reason Model + * Ehealthportal Nonpay_reason Admin Model */ -class Ehealth_portalModelNonpay_reason extends JModelAdmin +class EhealthportalModelNonpay_reason extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.nonpay_reason'; + public $typeAlias = 'com_ehealthportal.nonpay_reason'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'nonpay_reason', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'nonpay_reason', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.nonpay_reason'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.nonpay_reason', 'nonpay_reason', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.nonpay_reason', 'nonpay_reason', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.nonpay_reason.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.nonpay_reason.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('nonpay_reason.edit.name', 'com_ehealth_portal.nonpay_reason.' . (int) $id)) - || ($id == 0 && !$user->authorise('nonpay_reason.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('nonpay_reason.edit.name', 'com_ehealthportal.nonpay_reason.' . (int) $id)) + || ($id == 0 && !$user->authorise('nonpay_reason.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('nonpay_reason.edit.description', 'com_ehealth_portal.nonpay_reason.' . (int) $id)) - || ($id == 0 && !$user->authorise('nonpay_reason.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('nonpay_reason.edit.description', 'com_ehealthportal.nonpay_reason.' . (int) $id)) + || ($id == 0 && !$user->authorise('nonpay_reason.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/nonpay_reason.js'; + return 'media/com_ehealthportal/js/nonpay_reason.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.nonpay_reason.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.nonpay_reason.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.nonpay_reason.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.nonpay_reason.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.nonpay_reason.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.nonpay_reason.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_nonpay_reason')); + ->from($db->quoteName('#__ehealthportal_nonpay_reason')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.nonpay_reason.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.nonpay_reason.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.nonpay_reason', $data); + $this->preprocessData('com_ehealthportal.nonpay_reason', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('nonpay_reason'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('nonpay_reason'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('nonpay_reason'); + $this->canDo = EhealthportalHelper::getActions('nonpay_reason'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('nonpay_reason.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('nonpay_reason'); + $this->canDo = EhealthportalHelper::getActions('nonpay_reason'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('nonpay_reason.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('nonpay_reason', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "nonpay_reason", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('nonpay_reason', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_NONPAY_REASON_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_NONPAY_REASON_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelNonpay_reason extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/nonpay_reasons.php b/admin/models/nonpay_reasons.php index 5d5ed01..f27f74b 100644 --- a/admin/models/nonpay_reasons.php +++ b/admin/models/nonpay_reasons.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reasons.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Nonpay_reasons Model + * Nonpay_reasons List Model */ -class Ehealth_portalModelNonpay_reasons extends JModelList +class EhealthportalModelNonpay_reasons extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelNonpay_reasons extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_nonpay_reason', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_nonpay_reason', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelNonpay_reasons extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_nonpay_reason table - $query->from($db->quoteName('#__ehealth_portal_nonpay_reason', 'a')); + // From the ehealthportal_nonpay_reason table + $query->from($db->quoteName('#__ehealthportal_nonpay_reason', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelNonpay_reasons extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelNonpay_reasons extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_nonpay_reason"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_nonpay_reason"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelNonpay_reasons extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelNonpay_reasons extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelNonpay_reasons extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_nonpay_reason')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_nonpay_reason')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelNonpay_reasons extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_nonpay_reason'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_nonpay_reason'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/patient_queue.php b/admin/models/patient_queue.php index 84e962d..e5da003 100644 --- a/admin/models/patient_queue.php +++ b/admin/models/patient_queue.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage patient_queue.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,21 +26,28 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\Model\ItemModel; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Uri\Uri; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; /** - * Ehealth_portal Patient_queue Model + * Ehealthportal Patient_queue Item Model */ -class Ehealth_portalModelPatient_queue extends JModelItem +class EhealthportalModelPatient_queue extends ItemModel { /** * Model context string. * * @var string */ - protected $_context = 'com_ehealth_portal.patient_queue'; + protected $_context = 'com_ehealthportal.patient_queue'; - /** + /** * Model user data. * * @var strings @@ -70,7 +77,7 @@ class Ehealth_portalModelPatient_queue extends JModelItem */ protected function populateState() { - $this->app = JFactory::getApplication(); + $this->app = Factory::getApplication(); $this->input = $this->app->input; // Get the item main id $id = $this->input->getInt('id', null); @@ -89,14 +96,14 @@ class Ehealth_portalModelPatient_queue extends JModelItem */ public function getItem($pk = null) { - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); // check if this user has permission to access item - if (!$this->user->authorise('patient_queue.access', 'com_ehealth_portal')) + if (!$this->user->authorise('patient_queue.access', 'com_ehealthportal')) { - $app = JFactory::getApplication(); - $app->enqueueMessage(JText::_('Not authorised!'), 'error'); + $app = Factory::getApplication(); + $app->enqueueMessage(Text::_('Not authorised!'), 'error'); // redirect away if not a correct to cPanel/default view - $app->redirect('index.php?option=com_ehealth_portal'); + $app->redirect('index.php?option=com_ehealthportal'); return false; } $this->userId = $this->user->get('id'); @@ -107,10 +114,10 @@ class Ehealth_portalModelPatient_queue extends JModelItem $this->initSet = true; $pk = (!empty($pk)) ? $pk : (int) $this->getState('patient_queue.id'); - + if ($this->_item === null) { - $this->_item = array(); + $this->_item = []; } if (!isset($this->_item[$pk])) @@ -118,7 +125,7 @@ class Ehealth_portalModelPatient_queue extends JModelItem try { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Create a new query object. $query = $db->getQuery(true); @@ -136,10 +143,10 @@ class Ehealth_portalModelPatient_queue extends JModelItem if (empty($data)) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // If no data is found redirect to default page and show warning. - $app->enqueueMessage(JText::_('COM_EHEALTH_PORTAL_NOT_FOUND_OR_ACCESS_DENIED'), 'warning'); - $app->redirect('index.php?option=com_ehealth_portal'); + $app->enqueueMessage(Text::_('COM_EHEALTHPORTAL_NOT_FOUND_OR_ACCESS_DENIED'), 'warning'); + $app->redirect('index.php?option=com_ehealthportal'); return false; } @@ -151,7 +158,7 @@ class Ehealth_portalModelPatient_queue extends JModelItem if ($e->getCode() == 404) { // Need to go thru the error handler to allow Redirect to work. - JError::raiseWarning(404, $e->getMessage()); + JError::raiseError(404, $e->getMessage()); } else { diff --git a/admin/models/payment.php b/admin/models/payment.php index ff28a83..b46129d 100644 --- a/admin/models/payment.php +++ b/admin/models/payment.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Payment Model + * Ehealthportal Payment Admin Model */ -class Ehealth_portalModelPayment extends JModelAdmin +class EhealthportalModelPayment extends AdminModel { /** * The tab layout fields array. @@ -59,7 +68,7 @@ class Ehealth_portalModelPayment extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -67,7 +76,7 @@ class Ehealth_portalModelPayment extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.payment'; + public $typeAlias = 'com_ehealthportal.payment'; /** * Returns a Table object, always creating it @@ -76,18 +85,18 @@ class Ehealth_portalModelPayment extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'payment', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'payment', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -116,12 +125,7 @@ class Ehealth_portalModelPayment extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.payment'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -138,7 +142,7 @@ class Ehealth_portalModelPayment extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -158,14 +162,14 @@ class Ehealth_portalModelPayment extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.payment', 'payment', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.payment', 'payment', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -178,12 +182,12 @@ class Ehealth_portalModelPayment extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.payment.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.payment.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -199,7 +203,7 @@ class Ehealth_portalModelPayment extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -209,7 +213,7 @@ class Ehealth_portalModelPayment extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -217,8 +221,8 @@ class Ehealth_portalModelPayment extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Patient access controls. - if ($id != 0 && (!$user->authorise('payment.edit.patient', 'com_ehealth_portal.payment.' . (int) $id)) - || ($id == 0 && !$user->authorise('payment.edit.patient', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('payment.edit.patient', 'com_ehealthportal.payment.' . (int) $id)) + || ($id == 0 && !$user->authorise('payment.edit.patient', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('patient', 'disabled', 'true'); @@ -250,19 +254,26 @@ class Ehealth_portalModelPayment extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/payment.js'; + return 'media/com_ehealthportal/js/payment.js'; } - + /** * Method to test whether a record can be deleted. * @@ -281,9 +292,9 @@ class Ehealth_portalModelPayment extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.payment.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.payment.' . (int) $record->id); } return false; } @@ -299,42 +310,42 @@ class Ehealth_portalModelPayment extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.payment.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.payment.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.payment.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.payment.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -342,19 +353,19 @@ class Ehealth_portalModelPayment extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -366,10 +377,10 @@ class Ehealth_portalModelPayment extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_payment')); + ->from($db->quoteName('#__ehealthportal_payment')); $db->setQuery($query); $max = $db->loadResult(); @@ -381,7 +392,7 @@ class Ehealth_portalModelPayment extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -396,16 +407,16 @@ class Ehealth_portalModelPayment extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.payment.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.payment.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.payment', $data); + $this->preprocessData('com_ehealthportal.payment', $data); } return $data; @@ -420,9 +431,9 @@ class Ehealth_portalModelPayment extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -438,7 +449,7 @@ class Ehealth_portalModelPayment extends JModelAdmin { return false; } - + return true; } @@ -458,10 +469,10 @@ class Ehealth_portalModelPayment extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -487,30 +498,30 @@ class Ehealth_portalModelPayment extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('payment'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('payment'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -547,8 +558,7 @@ class Ehealth_portalModelPayment extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -574,13 +584,13 @@ class Ehealth_portalModelPayment extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('payment'); + $this->canDo = EhealthportalHelper::getActions('payment'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('payment.batch')) { return false; } @@ -600,7 +610,7 @@ class Ehealth_portalModelPayment extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -613,7 +623,7 @@ class Ehealth_portalModelPayment extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -629,13 +639,19 @@ class Ehealth_portalModelPayment extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -647,7 +663,7 @@ class Ehealth_portalModelPayment extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -711,15 +727,15 @@ class Ehealth_portalModelPayment extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('payment'); + $this->canDo = EhealthportalHelper::getActions('payment'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('payment.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -736,7 +752,7 @@ class Ehealth_portalModelPayment extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -752,13 +768,13 @@ class Ehealth_portalModelPayment extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -802,7 +818,7 @@ class Ehealth_portalModelPayment extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -814,23 +830,39 @@ class Ehealth_portalModelPayment extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('payment', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "payment", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -840,7 +872,7 @@ class Ehealth_portalModelPayment extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -848,14 +880,14 @@ class Ehealth_portalModelPayment extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -868,7 +900,6 @@ class Ehealth_portalModelPayment extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -879,4 +910,26 @@ class Ehealth_portalModelPayment extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/payment_amount.php b/admin/models/payment_amount.php deleted file mode 100644 index c973bf3..0000000 --- a/admin/models/payment_amount.php +++ /dev/null @@ -1,997 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\Registry\Registry; -use Joomla\String\StringHelper; -use Joomla\Utilities\ArrayHelper; - -/** - * Ehealth_portal Payment_amount Model - */ -class Ehealth_portalModelPayment_amount extends JModelAdmin -{ - /** - * The tab layout fields array. - * - * @var array - */ - protected $tabLayoutFields = array( - 'details' => array( - 'fullwidth' => array( - 'description' - ), - 'above' => array( - 'name', - 'alias' - ) - ) - ); - - /** - * @var string The prefix to use with controller messages. - * @since 1.6 - */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; - - /** - * The type alias for this content type. - * - * @var string - * @since 3.2 - */ - public $typeAlias = 'com_ehealth_portal.payment_amount'; - - /** - * Returns a Table object, always creating it - * - * @param type $type The table type to instantiate - * @param string $prefix A prefix for the table class name. Optional. - * @param array $config Configuration array for model. Optional. - * - * @return JTable A database object - * - * @since 1.6 - */ - public function getTable($type = 'payment_amount', $prefix = 'Ehealth_portalTable', $config = array()) - { - // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); - // get instance of the table - return JTable::getInstance($type, $prefix, $config); - } - - /** - * Method to get a single record. - * - * @param integer $pk The id of the primary key. - * - * @return mixed Object on success, false on failure. - * - * @since 1.6 - */ - public function getItem($pk = null) - { - if ($item = parent::getItem($pk)) - { - if (!empty($item->params) && !is_array($item->params)) - { - // Convert the params field to an array. - $registry = new Registry; - $registry->loadString($item->params); - $item->params = $registry->toArray(); - } - - if (!empty($item->metadata)) - { - // Convert the metadata field to an array. - $registry = new Registry; - $registry->loadString($item->metadata); - $item->metadata = $registry->toArray(); - } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.payment_amount'); - } - } - - return $item; - } - - /** - * Method to get the record form. - * - * @param array $data Data for the form. - * @param boolean $loadData True if the form is to load its own data (default case), false if not. - * @param array $options Optional array of options for the form creation. - * - * @return mixed A JForm object on success, false on failure - * - * @since 1.6 - */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) - { - // set load data option - $options['load_data'] = $loadData; - // check if xpath was set in options - $xpath = false; - if (isset($options['xpath'])) - { - $xpath = $options['xpath']; - unset($options['xpath']); - } - // check if clear form was set in options - $clear = false; - if (isset($options['clear'])) - { - $clear = $options['clear']; - unset($options['clear']); - } - - // Get the form. - $form = $this->loadForm('com_ehealth_portal.payment_amount', 'payment_amount', $options, $clear, $xpath); - - if (empty($form)) - { - return false; - } - - $jinput = JFactory::getApplication()->input; - - // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. - if ($jinput->get('a_id')) - { - $id = $jinput->get('a_id', 0, 'INT'); - } - // The back end uses id so we use that the rest of the time and set it to 0 by default. - else - { - $id = $jinput->get('id', 0, 'INT'); - } - - $user = JFactory::getUser(); - - // Check for existing item. - // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.payment_amount.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) - { - // Disable fields for display. - $form->setFieldAttribute('ordering', 'disabled', 'true'); - $form->setFieldAttribute('published', 'disabled', 'true'); - // Disable fields while saving. - $form->setFieldAttribute('ordering', 'filter', 'unset'); - $form->setFieldAttribute('published', 'filter', 'unset'); - } - // If this is a new item insure the greated by is set. - if (0 == $id) - { - // Set the created_by to this user - $form->setValue('created_by', null, $user->id); - } - // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) - { - // Disable fields for display. - $form->setFieldAttribute('created_by', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('created_by', 'readonly', 'true'); - // Disable fields while saving. - $form->setFieldAttribute('created_by', 'filter', 'unset'); - } - // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) - { - // Disable fields for display. - $form->setFieldAttribute('created', 'disabled', 'true'); - // Disable fields while saving. - $form->setFieldAttribute('created', 'filter', 'unset'); - } - // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('payment_amount.edit.name', 'com_ehealth_portal.payment_amount.' . (int) $id)) - || ($id == 0 && !$user->authorise('payment_amount.edit.name', 'com_ehealth_portal'))) - { - // Disable fields for display. - $form->setFieldAttribute('name', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('name', 'readonly', 'true'); - // If there is no value continue. - if (!$form->getValue('name')) - { - // Disable fields while saving. - $form->setFieldAttribute('name', 'filter', 'unset'); - // Disable fields while saving. - $form->setFieldAttribute('name', 'required', 'false'); - } - } - // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('payment_amount.edit.description', 'com_ehealth_portal.payment_amount.' . (int) $id)) - || ($id == 0 && !$user->authorise('payment_amount.edit.description', 'com_ehealth_portal'))) - { - // Disable fields for display. - $form->setFieldAttribute('description', 'disabled', 'true'); - // Disable fields for display. - $form->setFieldAttribute('description', 'readonly', 'true'); - // If there is no value continue. - if (!$form->getValue('description')) - { - // Disable fields while saving. - $form->setFieldAttribute('description', 'filter', 'unset'); - // Disable fields while saving. - $form->setFieldAttribute('description', 'required', 'false'); - } - } - // Only load these values if no id is found - if (0 == $id) - { - // Set redirected view name - $redirectedView = $jinput->get('ref', null, 'STRING'); - // Set field name (or fall back to view name) - $redirectedField = $jinput->get('field', $redirectedView, 'STRING'); - // Set redirected view id - $redirectedId = $jinput->get('refid', 0, 'INT'); - // Set field id (or fall back to redirected view id) - $redirectedValue = $jinput->get('field_id', $redirectedId, 'INT'); - if (0 != $redirectedValue && $redirectedField) - { - // Now set the local-redirected field default value - $form->setValue($redirectedField, null, $redirectedValue); - } - } - return $form; - } - - /** - * Method to get the script that have to be included on the form - * - * @return string script files - */ - public function getScript() - { - return 'media/com_ehealth_portal/js/payment_amount.js'; - } - - /** - * Method to test whether a record can be deleted. - * - * @param object $record A record object. - * - * @return boolean True if allowed to delete the record. Defaults to the permission set in the component. - * - * @since 1.6 - */ - protected function canDelete($record) - { - if (!empty($record->id)) - { - if ($record->published != -2) - { - return; - } - - $user = JFactory::getUser(); - // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.payment_amount.' . (int) $record->id); - } - return false; - } - - /** - * Method to test whether a record can have its state edited. - * - * @param object $record A record object. - * - * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. - * - * @since 1.6 - */ - protected function canEditState($record) - { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; - - if ($recordId) - { - // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.payment_amount.' . (int) $recordId); - if (!$permission && !is_null($permission)) - { - return false; - } - } - // In the absense of better information, revert to the component permissions. - return parent::canEditState($record); - } - - /** - * Method override to check if you can edit an existing record. - * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. - * - * @return boolean - * @since 2.5 - */ - protected function allowEdit($data = array(), $key = 'id') - { - // Check specific edit permission then general edit permission. - - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.payment_amount.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); - } - - /** - * Prepare and sanitise the table data prior to saving. - * - * @param JTable $table A JTable object. - * - * @return void - * - * @since 1.6 - */ - protected function prepareTable($table) - { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - - if (isset($table->name)) - { - $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); - } - - if (isset($table->alias) && empty($table->alias)) - { - $table->generateAlias(); - } - - if (empty($table->id)) - { - $table->created = $date->toSql(); - // set the user - if ($table->created_by == 0 || empty($table->created_by)) - { - $table->created_by = $user->id; - } - // Set ordering to the last item if not set - if (empty($table->ordering)) - { - $db = JFactory::getDbo(); - $query = $db->getQuery(true) - ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_payment_amount')); - $db->setQuery($query); - $max = $db->loadResult(); - - $table->ordering = $max + 1; - } - } - else - { - $table->modified = $date->toSql(); - $table->modified_by = $user->id; - } - - if (!empty($table->id)) - { - // Increment the items version number. - $table->version++; - } - } - - /** - * Method to get the data that should be injected in the form. - * - * @return mixed The data for the form. - * - * @since 1.6 - */ - protected function loadFormData() - { - // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.payment_amount.data', array()); - - if (empty($data)) - { - $data = $this->getItem(); - // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.payment_amount', $data); - } - - return $data; - } - - /** - * Method to get the unique fields of this table. - * - * @return mixed An array of field names, boolean false if none is set. - * - * @since 3.0 - */ - protected function getUniqueFields() - { - return false; - } - - /** - * Method to delete one or more records. - * - * @param array &$pks An array of record primary keys. - * - * @return boolean True if successful, false if an error occurs. - * - * @since 12.2 - */ - public function delete(&$pks) - { - if (!parent::delete($pks)) - { - return false; - } - - return true; - } - - /** - * Method to change the published state of one or more records. - * - * @param array &$pks A list of the primary keys to change. - * @param integer $value The value of the published state. - * - * @return boolean True on success. - * - * @since 12.2 - */ - public function publish(&$pks, $value = 1) - { - if (!parent::publish($pks, $value)) - { - return false; - } - - return true; - } - - /** - * Method to perform batch operations on an item or a set of items. - * - * @param array $commands An array of commands to perform. - * @param array $pks An array of item ids. - * @param array $contexts An array of item contexts. - * - * @return boolean Returns true on success, false on failure. - * - * @since 12.2 - */ - public function batch($commands, $pks, $contexts) - { - // Sanitize ids. - $pks = array_unique($pks); - ArrayHelper::toInteger($pks); - - // Remove any values of zero. - if (array_search(0, $pks, true)) - { - unset($pks[array_search(0, $pks, true)]); - } - - if (empty($pks)) - { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); - return false; - } - - $done = false; - - // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('payment_amount'); - $this->batchSet = true; - - if (!$this->canDo->get('core.batch')) - { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - return false; - } - - if ($this->type == false) - { - $type = new JUcmType; - $this->type = $type->getTypeByAlias($this->typeAlias); - } - - $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags'); - - if (!empty($commands['move_copy'])) - { - $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c'); - - if ($cmd == 'c') - { - $result = $this->batchCopy($commands, $pks, $contexts); - - if (is_array($result)) - { - foreach ($result as $old => $new) - { - $contexts[$new] = $contexts[$old]; - } - $pks = array_values($result); - } - else - { - return false; - } - } - elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts)) - { - return false; - } - - $done = true; - } - - if (!$done) - { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - - return false; - } - - // Clear the cache - $this->cleanCache(); - - return true; - } - - /** - * Batch copy items to a new category or current. - * - * @param integer $values The new values. - * @param array $pks An array of row IDs. - * @param array $contexts An array of item contexts. - * - * @return mixed An array of new IDs on success, boolean false on failure. - * - * @since 12.2 - */ - protected function batchCopy($values, $pks, $contexts) - { - if (empty($this->batchSet)) - { - // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('payment_amount'); - } - - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) - { - return false; - } - - // get list of unique fields - $uniqueFields = $this->getUniqueFields(); - // remove move_copy from array - unset($values['move_copy']); - - // make sure published is set - if (!isset($values['published'])) - { - $values['published'] = 0; - } - elseif (isset($values['published']) && !$this->canDo->get('core.edit.state')) - { - $values['published'] = 0; - } - - $newIds = array(); - // Parent exists so let's proceed - while (!empty($pks)) - { - // Pop the first ID off the stack - $pk = array_shift($pks); - - $this->table->reset(); - - // only allow copy if user may edit this item. - if (!$this->user->authorise('core.edit', $contexts[$pk])) - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } - - // Check that the row actually exists - if (!$this->table->load($pk)) - { - if ($error = $this->table->getError()) - { - // Fatal error - $this->setError($error); - return false; - } - else - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } - } - list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); - - // insert all set values - if (Ehealth_portalHelper::checkArray($values)) - { - foreach ($values as $key => $value) - { - if (strlen($value) > 0 && isset($this->table->$key)) - { - $this->table->$key = $value; - } - } - } - - // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) - { - foreach ($uniqueFields as $uniqueField) - { - $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField); - } - } - - // Reset the ID because we are making a copy - $this->table->id = 0; - - // TODO: Deal with ordering? - // $this->table->ordering = 1; - - // Check the row. - if (!$this->table->check()) - { - $this->setError($this->table->getError()); - - return false; - } - - if (!empty($this->type)) - { - $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); - } - - // Store the row. - if (!$this->table->store()) - { - $this->setError($this->table->getError()); - - return false; - } - - // Get the new item ID - $newId = $this->table->get('id'); - - // Add the new ID to the array - $newIds[$pk] = $newId; - } - - // Clean the cache - $this->cleanCache(); - - return $newIds; - } - - /** - * Batch move items to a new category - * - * @param integer $value The new category ID. - * @param array $pks An array of row IDs. - * @param array $contexts An array of item contexts. - * - * @return boolean True if successful, false otherwise and internal error is set. - * - * @since 12.2 - */ - protected function batchMove($values, $pks, $contexts) - { - if (empty($this->batchSet)) - { - // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('payment_amount'); - } - - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) - { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; - } - - // make sure published only updates if user has the permission. - if (isset($values['published']) && !$this->canDo->get('core.edit.state')) - { - unset($values['published']); - } - // remove move_copy from array - unset($values['move_copy']); - - // Parent exists so we proceed - foreach ($pks as $pk) - { - if (!$this->user->authorise('core.edit', $contexts[$pk])) - { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); - return false; - } - - // Check that the row actually exists - if (!$this->table->load($pk)) - { - if ($error = $this->table->getError()) - { - // Fatal error - $this->setError($error); - return false; - } - else - { - // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); - continue; - } - } - - // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) - { - foreach ($values as $key => $value) - { - // Do special action for access. - if ('access' === $key && strlen($value) > 0) - { - $this->table->$key = $value; - } - elseif (strlen($value) > 0 && isset($this->table->$key)) - { - $this->table->$key = $value; - } - } - } - - - // Check the row. - if (!$this->table->check()) - { - $this->setError($this->table->getError()); - - return false; - } - - if (!empty($this->type)) - { - $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); - } - - // Store the row. - if (!$this->table->store()) - { - $this->setError($this->table->getError()); - - return false; - } - } - - // Clean the cache - $this->cleanCache(); - - return true; - } - - /** - * Method to save the form data. - * - * @param array $data The form data. - * - * @return boolean True on success. - * - * @since 1.6 - */ - public function save($data) - { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - - // set the metadata to the Item Data - if (isset($data['metadata']) && isset($data['metadata']['author'])) - { - $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; - $metadata->loadArray($data['metadata']); - $data['metadata'] = (string) $metadata; - } - - // Set the Params Items to data - if (isset($data['params']) && is_array($data['params'])) - { - $params = new JRegistry; - $params->loadArray($data['params']); - $data['params'] = (string) $params; - } - - // Alter the name for save as copy - if ($input->get('task') === 'save2copy') - { - $origTable = clone $this->getTable(); - $origTable->load($input->getInt('id')); - - if ($data['name'] == $origTable->name) - { - list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']); - $data['name'] = $name; - $data['alias'] = $alias; - } - else - { - if ($data['alias'] == $origTable->alias) - { - $data['alias'] = ''; - } - } - - $data['published'] = 0; - } - - // Automatic handling of alias for empty fields - if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0) - { - if ($data['alias'] == null || empty($data['alias'])) - { - if (JFactory::getConfig()->get('unicodeslugs') == 1) - { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); - } - else - { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); - } - - $table = JTable::getInstance('payment_amount', 'ehealth_portalTable'); - - if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) - { - $msg = JText::_('COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_SAVE_WARNING'); - } - - $data['alias'] = $this->_generateNewTitle($data['alias']); - - if (isset($msg)) - { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); - } - } - } - - // Alter the unique field for save as copy - if ($input->get('task') === 'save2copy') - { - // Automatic handling of other unique fields - $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) - { - foreach ($uniqueFields as $uniqueField) - { - $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]); - } - } - } - - if (parent::save($data)) - { - return true; - } - return false; - } - - /** - * Method to generate a unique value. - * - * @param string $field name. - * @param string $value data. - * - * @return string New value. - * - * @since 3.0 - */ - protected function generateUnique($field,$value) - { - - // set field value unique - $table = $this->getTable(); - - while ($table->load(array($field => $value))) - { - $value = StringHelper::increment($value); - } - - return $value; - } - - /** - * Method to change the title/s & alias. - * - * @param string $alias The alias. - * @param string/array $title The title. - * - * @return array/string Contains the modified title/s and/or alias. - * - */ - protected function _generateNewTitle($alias, $title = null) - { - - // Alter the title/s & alias - $table = $this->getTable(); - - while ($table->load(array('alias' => $alias))) - { - // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) - { - foreach($title as $nr => &$_title) - { - $_title = StringHelper::increment($_title); - } - } - // Make sure we have a title - elseif ($title) - { - $title = StringHelper::increment($title); - } - $alias = StringHelper::increment($alias, 'dash'); - } - // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) - { - $title[] = $alias; - return $title; - } - // Make sure we have a title - elseif ($title) - { - return array($title, $alias); - } - // We only had an alias - return $alias; - } -} diff --git a/admin/models/payment_amounts.php b/admin/models/payment_amounts.php deleted file mode 100644 index d3388e9..0000000 --- a/admin/models/payment_amounts.php +++ /dev/null @@ -1,414 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\Utilities\ArrayHelper; - -/** - * Payment_amounts Model - */ -class Ehealth_portalModelPayment_amounts extends JModelList -{ - public function __construct($config = array()) - { - if (empty($config['filter_fields'])) - { - $config['filter_fields'] = array( - 'a.id','id', - 'a.published','published', - 'a.access','access', - 'a.ordering','ordering', - 'a.created_by','created_by', - 'a.modified_by','modified_by', - 'a.name','name', - 'a.description','description' - ); - } - - parent::__construct($config); - } - - /** - * Method to auto-populate the model state. - * - * Note. Calling getState in this method will result in recursion. - * - * @param string $ordering An optional ordering field. - * @param string $direction An optional direction (asc|desc). - * - * @return void - * - */ - protected function populateState($ordering = null, $direction = null) - { - $app = JFactory::getApplication(); - - // Adjust the context to support modal layouts. - if ($layout = $app->input->get('layout')) - { - $this->context .= '.' . $layout; - } - - // Check if the form was submitted - $formSubmited = $app->input->post->get('form_submited'); - - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); - if ($formSubmited) - { - $access = $app->input->post->get('access'); - $this->setState('filter.access', $access); - } - - $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); - $this->setState('filter.published', $published); - - $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', ''); - $this->setState('filter.created_by', $created_by); - - $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); - $this->setState('filter.created', $created); - - $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); - $this->setState('filter.sorting', $sorting); - - $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); - $this->setState('filter.search', $search); - - $name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name'); - if ($formSubmited) - { - $name = $app->input->post->get('name'); - $this->setState('filter.name', $name); - } - - $description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description'); - if ($formSubmited) - { - $description = $app->input->post->get('description'); - $this->setState('filter.description', $description); - } - - // List state information. - parent::populateState($ordering, $direction); - } - - /** - * Method to get an array of data items. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getItems() - { - // check in items - $this->checkInNow(); - - // load parent items - $items = parent::getItems(); - - // return items - return $items; - } - - /** - * Method to build an SQL query to load the list data. - * - * @return string An SQL query - */ - protected function getListQuery() - { - // Get the user object. - $user = JFactory::getUser(); - // Create a new query object. - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - - // Select some fields - $query->select('a.*'); - - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_payment_amount', 'a')); - - // Filter by published state - $published = $this->getState('filter.published'); - if (is_numeric($published)) - { - $query->where('a.published = ' . (int) $published); - } - elseif ($published === '') - { - $query->where('(a.published = 0 OR a.published = 1)'); - } - - // Join over the asset groups. - $query->select('ag.title AS access_level'); - $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); - // Filter by access level. - $_access = $this->getState('filter.access'); - if ($_access && is_numeric($_access)) - { - $query->where('a.access = ' . (int) $_access); - } - elseif (Ehealth_portalHelper::checkArray($_access)) - { - // Secure the array for the query - $_access = ArrayHelper::toInteger($_access); - // Filter by the Access Array. - $query->where('a.access IN (' . implode(',', $_access) . ')'); - } - // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } - // Filter by search. - $search = $this->getState('filter.search'); - if (!empty($search)) - { - if (stripos($search, 'id:') === 0) - { - $query->where('a.id = ' . (int) substr($search, 3)); - } - else - { - $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.name LIKE '.$search.' OR a.description LIKE '.$search.' OR a.alias LIKE '.$search.')'); - } - } - - - // Add the list ordering clause. - $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'desc'); - if ($orderCol != '') - { - $query->order($db->escape($orderCol . ' ' . $orderDirn)); - } - - return $query; - } - - /** - * Method to get list export data. - * - * @param array $pks The ids of the items to get - * @param JUser $user The user making the request - * - * @return mixed An array of data items on success, false on failure. - */ - public function getExportData($pks, $user = null) - { - // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) - { - // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) - $_export = true; - // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) - { - $user = JFactory::getUser(); - } - // Create a new query object. - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - - // Select some fields - $query->select('a.*'); - - // From the ehealth_portal_payment_amount table - $query->from($db->quoteName('#__ehealth_portal_payment_amount', 'a')); - // The bulk export path - if ('bulk' === $pks) - { - $query->where('a.id > 0'); - } - // A large array of ID's will not work out well - elseif ($pks_size > 500) - { - // Use lowest ID - $query->where('a.id >= ' . (int) min($pks)); - // Use highest ID - $query->where('a.id <= ' . (int) max($pks)); - } - // The normal default path - else - { - $query->where('a.id IN (' . implode(',',$pks) . ')'); - } - // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } - - // Order the results by ordering - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) - { - foreach ($items as $nr => &$item) - { - // unset the values we don't want exported. - unset($item->asset_id); - unset($item->checked_out); - unset($item->checked_out_time); - } - } - // Add headers to items array. - $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) - { - array_unshift($items,$headers); - } - return $items; - } - } - return false; - } - - /** - * Method to get header. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getExImPortHeaders() - { - // Get a db connection. - $db = JFactory::getDbo(); - // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_payment_amount"); - if (Ehealth_portalHelper::checkArray($columns)) - { - // remove the headers you don't import/export. - unset($columns['asset_id']); - unset($columns['checked_out']); - unset($columns['checked_out_time']); - $headers = new stdClass(); - foreach ($columns as $column => $type) - { - $headers->{$column} = $column; - } - return $headers; - } - return false; - } - - /** - * Method to get a store id based on model configuration state. - * - * @return string A store id. - * - */ - protected function getStoreId($id = '') - { - // Compile the store id. - $id .= ':' . $this->getState('filter.id'); - $id .= ':' . $this->getState('filter.search'); - $id .= ':' . $this->getState('filter.published'); - // Check if the value is an array - $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) - { - $id .= ':' . implode(':', $_access); - } - // Check if this is only an number or string - elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) - { - $id .= ':' . $_access; - } - $id .= ':' . $this->getState('filter.ordering'); - $id .= ':' . $this->getState('filter.created_by'); - $id .= ':' . $this->getState('filter.modified_by'); - $id .= ':' . $this->getState('filter.name'); - $id .= ':' . $this->getState('filter.description'); - - return parent::getStoreId($id); - } - - /** - * Build an SQL query to checkin all items left checked out longer then a set time. - * - * @return a bool - * - */ - protected function checkInNow() - { - // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); - - if ($time) - { - - // Get a db connection. - $db = JFactory::getDbo(); - // reset query - $query = $db->getQuery(true); - $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_payment_amount')); - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query - $query = $db->getQuery(true); - - // Fields to update. - $fields = array( - $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'', - $db->quoteName('checked_out') . '=0' - ); - - // Conditions for which records should be updated. - $conditions = array( - $db->quoteName('checked_out') . '!=0', - $db->quoteName('checked_out_time') . '<\''.$date.'\'' - ); - - // Check table - $query->update($db->quoteName('#__ehealth_portal_payment_amount'))->set($fields)->where($conditions); - - $db->setQuery($query); - - $db->execute(); - } - } - - return false; - } -} diff --git a/admin/models/payment_type.php b/admin/models/payment_type.php index f26bde3..7979622 100644 --- a/admin/models/payment_type.php +++ b/admin/models/payment_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Payment_type Model + * Ehealthportal Payment_type Admin Model */ -class Ehealth_portalModelPayment_type extends JModelAdmin +class EhealthportalModelPayment_type extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.payment_type'; + public $typeAlias = 'com_ehealthportal.payment_type'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelPayment_type extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'payment_type', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'payment_type', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.payment_type'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelPayment_type extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.payment_type', 'payment_type', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.payment_type', 'payment_type', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.payment_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.payment_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('payment_type.edit.name', 'com_ehealth_portal.payment_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('payment_type.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('payment_type.edit.name', 'com_ehealthportal.payment_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('payment_type.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelPayment_type extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('payment_type.edit.description', 'com_ehealth_portal.payment_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('payment_type.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('payment_type.edit.description', 'com_ehealthportal.payment_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('payment_type.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/payment_type.js'; + return 'media/com_ehealthportal/js/payment_type.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelPayment_type extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.payment_type.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.payment_type.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelPayment_type extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.payment_type.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.payment_type.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.payment_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.payment_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelPayment_type extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelPayment_type extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_payment_type')); + ->from($db->quoteName('#__ehealthportal_payment_type')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelPayment_type extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.payment_type.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.payment_type.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.payment_type', $data); + $this->preprocessData('com_ehealthportal.payment_type', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelPayment_type extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelPayment_type extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelPayment_type extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('payment_type'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('payment_type'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelPayment_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('payment_type'); + $this->canDo = EhealthportalHelper::getActions('payment_type'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('payment_type.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelPayment_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelPayment_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('payment_type'); + $this->canDo = EhealthportalHelper::getActions('payment_type'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('payment_type.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelPayment_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelPayment_type extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('payment_type', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "payment_type", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelPayment_type extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('payment_type', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_PAYMENT_TYPE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_PAYMENT_TYPE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelPayment_type extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelPayment_type extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelPayment_type extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelPayment_type extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/payment_types.php b/admin/models/payment_types.php index 29e6371..01c9a23 100644 --- a/admin/models/payment_types.php +++ b/admin/models/payment_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Payment_types Model + * Payment_types List Model */ -class Ehealth_portalModelPayment_types extends JModelList +class EhealthportalModelPayment_types extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelPayment_types extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelPayment_types extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelPayment_types extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_payment_type', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_payment_type', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelPayment_types extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelPayment_types extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelPayment_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_payment_type table - $query->from($db->quoteName('#__ehealth_portal_payment_type', 'a')); + // From the ehealthportal_payment_type table + $query->from($db->quoteName('#__ehealthportal_payment_type', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelPayment_types extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelPayment_types extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelPayment_types extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelPayment_types extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_payment_type"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_payment_type"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelPayment_types extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelPayment_types extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelPayment_types extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_payment_type')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_payment_type')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelPayment_types extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_payment_type'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_payment_type'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/payments.php b/admin/models/payments.php index 2fa0c9e..6536c9d 100644 --- a/admin/models/payments.php +++ b/admin/models/payments.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payments.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Payments Model + * Payments List Model */ -class Ehealth_portalModelPayments extends JModelList +class EhealthportalModelPayments extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -66,7 +75,7 @@ class Ehealth_portalModelPayments extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -123,7 +132,7 @@ class Ehealth_portalModelPayments extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -131,14 +140,28 @@ class Ehealth_portalModelPayments extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -149,7 +172,7 @@ class Ehealth_portalModelPayments extends JModelList } } - + // return items return $items; } @@ -165,11 +188,11 @@ class Ehealth_portalModelPayments extends JModelList if ($name === 'payment_category') { $payment_categoryArray = array( - 0 => 'COM_EHEALTH_PORTAL_PAYMENT_DEBT_PAYMENT', - 1 => 'COM_EHEALTH_PORTAL_PAYMENT_RECEIVE_PAYMENT' + 0 => 'COM_EHEALTHPORTAL_PAYMENT_DEBT_PAYMENT', + 1 => 'COM_EHEALTHPORTAL_PAYMENT_RECEIVE_PAYMENT' ); // Now check if value is found in this array - if (isset($payment_categoryArray[$value]) && Ehealth_portalHelper::checkString($payment_categoryArray[$value])) + if (isset($payment_categoryArray[$value]) && StringHelper::check($payment_categoryArray[$value])) { return $payment_categoryArray[$value]; } @@ -178,46 +201,46 @@ class Ehealth_portalModelPayments extends JModelList if ($name === 'payment_amount') { $payment_amountArray = array( - 0 => 'COM_EHEALTH_PORTAL_PAYMENT_SELECT_AMOUNT_N', - 1 => 'COM_EHEALTH_PORTAL_PAYMENT_ZERO', - 2 => 'COM_EHEALTH_PORTAL_PAYMENT_TEN', - 3 => 'COM_EHEALTH_PORTAL_PAYMENT_SEVENTY_FIVE' + 0 => 'COM_EHEALTHPORTAL_PAYMENT_SELECT_AMOUNT_N', + 1 => 'COM_EHEALTHPORTAL_PAYMENT_ZERO', + 2 => 'COM_EHEALTHPORTAL_PAYMENT_TEN', + 3 => 'COM_EHEALTHPORTAL_PAYMENT_SEVENTY_FIVE' ); // Now check if value is found in this array - if (isset($payment_amountArray[$value]) && Ehealth_portalHelper::checkString($payment_amountArray[$value])) + if (isset($payment_amountArray[$value]) && StringHelper::check($payment_amountArray[$value])) { return $payment_amountArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_payment', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_payment', 'a')); - // From the ehealth_portal_payment_type table. + // From the ehealthportal_payment_type table. $query->select($db->quoteName('g.name','payment_type_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_payment_type', 'g') . ' ON (' . $db->quoteName('a.payment_type') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_payment_type', 'g') . ' ON (' . $db->quoteName('a.payment_type') . ' = ' . $db->quoteName('g.id') . ')'); - // From the ehealth_portal_nonpay_reason table. + // From the ehealthportal_nonpay_reason table. $query->select($db->quoteName('h.name','nonpay_reason_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_nonpay_reason', 'h') . ' ON (' . $db->quoteName('a.nonpay_reason') . ' = ' . $db->quoteName('h.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_nonpay_reason', 'h') . ' ON (' . $db->quoteName('a.nonpay_reason') . ' = ' . $db->quoteName('h.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -239,7 +262,7 @@ class Ehealth_portalModelPayments extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -247,7 +270,7 @@ class Ehealth_portalModelPayments extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -280,7 +303,7 @@ class Ehealth_portalModelPayments extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -297,7 +320,7 @@ class Ehealth_portalModelPayments extends JModelList $query->where('a.payment_category = ' . (int) $_payment_category); } } - elseif (Ehealth_portalHelper::checkString($_payment_category)) + elseif (EhealthportalHelper::checkString($_payment_category)) { $query->where('a.payment_category = ' . $db->quote($db->escape($_payment_category))); } @@ -314,11 +337,11 @@ class Ehealth_portalModelPayments extends JModelList $query->where('a.payment_amount = ' . (int) $_payment_amount); } } - elseif (Ehealth_portalHelper::checkString($_payment_amount)) + elseif (EhealthportalHelper::checkString($_payment_amount)) { $query->where('a.payment_amount = ' . $db->quote($db->escape($_payment_amount))); } - elseif (Ehealth_portalHelper::checkArray($_payment_amount)) + elseif (EhealthportalHelper::checkArray($_payment_amount)) { // Secure the array for the query $_payment_amount = array_map( function ($val) use(&$db) { @@ -333,7 +356,7 @@ class Ehealth_portalModelPayments extends JModelList return (int) $val; } } - elseif (Ehealth_portalHelper::checkString($val)) + elseif (EhealthportalHelper::checkString($val)) { return $db->quote($db->escape($val)); } @@ -364,24 +387,24 @@ class Ehealth_portalModelPayments extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_payment table - $query->from($db->quoteName('#__ehealth_portal_payment', 'a')); + // From the ehealthportal_payment table + $query->from($db->quoteName('#__ehealthportal_payment', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -400,8 +423,22 @@ class Ehealth_portalModelPayments extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_payment_type table. + $query->select($db->quoteName('g.name','payment_type')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_payment_type', 'g') . ' ON (' . $db->quoteName('a.payment_type') . ' = ' . $db->quoteName('g.id') . ')'); + + // From the ehealthportal_nonpay_reason table. + $query->select($db->quoteName('h.name','nonpay_reason')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_nonpay_reason', 'h') . ' ON (' . $db->quoteName('a.nonpay_reason') . ' = ' . $db->quoteName('h.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -418,10 +455,11 @@ class Ehealth_portalModelPayments extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -430,10 +468,27 @@ class Ehealth_portalModelPayments extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert payment_category + $item->payment_category = $this->selectionTranslation($item->payment_category, 'payment_category'); + // convert payment_amount + $item->payment_amount = $this->selectionTranslation($item->payment_amount, 'payment_amount'); + } + } + + } return $items; } } @@ -448,10 +503,10 @@ class Ehealth_portalModelPayments extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_payment"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_payment"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -466,7 +521,7 @@ class Ehealth_portalModelPayments extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -481,13 +536,13 @@ class Ehealth_portalModelPayments extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -498,13 +553,13 @@ class Ehealth_portalModelPayments extends JModelList $id .= ':' . $this->getState('filter.payment_category'); // Check if the value is an array $_payment_amount = $this->getState('filter.payment_amount'); - if (Ehealth_portalHelper::checkArray($_payment_amount)) + if (UtilitiesArrayHelper::check($_payment_amount)) { $id .= ':' . implode(':', $_payment_amount); } // Check if this is only an number or string elseif (is_numeric($_payment_amount) - || Ehealth_portalHelper::checkString($_payment_amount)) + || StringHelper::check($_payment_amount)) { $id .= ':' . $_payment_amount; } @@ -521,24 +576,26 @@ class Ehealth_portalModelPayments extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_payment')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_payment')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -553,8 +610,8 @@ class Ehealth_portalModelPayments extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_payment'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_payment'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/planning_type.php b/admin/models/planning_type.php index e78c481..542ab97 100644 --- a/admin/models/planning_type.php +++ b/admin/models/planning_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Planning_type Model + * Ehealthportal Planning_type Admin Model */ -class Ehealth_portalModelPlanning_type extends JModelAdmin +class EhealthportalModelPlanning_type extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.planning_type'; + public $typeAlias = 'com_ehealthportal.planning_type'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'planning_type', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'planning_type', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.planning_type'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.planning_type', 'planning_type', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.planning_type', 'planning_type', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.planning_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.planning_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('planning_type.edit.name', 'com_ehealth_portal.planning_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('planning_type.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('planning_type.edit.name', 'com_ehealthportal.planning_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('planning_type.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('planning_type.edit.description', 'com_ehealth_portal.planning_type.' . (int) $id)) - || ($id == 0 && !$user->authorise('planning_type.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('planning_type.edit.description', 'com_ehealthportal.planning_type.' . (int) $id)) + || ($id == 0 && !$user->authorise('planning_type.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/planning_type.js'; + return 'media/com_ehealthportal/js/planning_type.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.planning_type.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.planning_type.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.planning_type.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.planning_type.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.planning_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.planning_type.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_planning_type')); + ->from($db->quoteName('#__ehealthportal_planning_type')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.planning_type.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.planning_type.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.planning_type', $data); + $this->preprocessData('com_ehealthportal.planning_type', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('planning_type'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('planning_type'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('planning_type'); + $this->canDo = EhealthportalHelper::getActions('planning_type'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('planning_type.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('planning_type'); + $this->canDo = EhealthportalHelper::getActions('planning_type'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('planning_type.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('planning_type', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "planning_type", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('planning_type', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_PLANNING_TYPE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_PLANNING_TYPE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelPlanning_type extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/planning_types.php b/admin/models/planning_types.php index ee28131..3eb574d 100644 --- a/admin/models/planning_types.php +++ b/admin/models/planning_types.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_types.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Planning_types Model + * Planning_types List Model */ -class Ehealth_portalModelPlanning_types extends JModelList +class EhealthportalModelPlanning_types extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelPlanning_types extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelPlanning_types extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelPlanning_types extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_planning_type', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_planning_type', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelPlanning_types extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelPlanning_types extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelPlanning_types extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_planning_type table - $query->from($db->quoteName('#__ehealth_portal_planning_type', 'a')); + // From the ehealthportal_planning_type table + $query->from($db->quoteName('#__ehealthportal_planning_type', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelPlanning_types extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelPlanning_types extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelPlanning_types extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelPlanning_types extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_planning_type"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_planning_type"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelPlanning_types extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelPlanning_types extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelPlanning_types extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_planning_type')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_planning_type')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelPlanning_types extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_planning_type'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_planning_type'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/prostate_and_testicular_cancer.php b/admin/models/prostate_and_testicular_cancer.php index eca4232..17a8768 100644 --- a/admin/models/prostate_and_testicular_cancer.php +++ b/admin/models/prostate_and_testicular_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Prostate_and_testicular_cancer Model + * Ehealthportal Prostate_and_testicular_cancer Admin Model */ -class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin +class EhealthportalModelProstate_and_testicular_cancer extends AdminModel { /** * The tab layout fields array. @@ -78,7 +87,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -86,7 +95,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.prostate_and_testicular_cancer'; + public $typeAlias = 'com_ehealthportal.prostate_and_testicular_cancer'; /** * Returns a Table object, always creating it @@ -95,18 +104,18 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'prostate_and_testicular_cancer', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'prostate_and_testicular_cancer', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -135,12 +144,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.prostate_and_testicular_cancer'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -157,7 +161,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -177,14 +181,14 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.prostate_and_testicular_cancer', 'prostate_and_testicular_cancer', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.prostate_and_testicular_cancer', 'prostate_and_testicular_cancer', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -197,12 +201,12 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.prostate_and_testicular_cancer.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.prostate_and_testicular_cancer.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -218,7 +222,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -228,7 +232,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -252,19 +256,26 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/prostate_and_testicular_cancer.js'; + return 'media/com_ehealthportal/js/prostate_and_testicular_cancer.js'; } - + /** * Method to test whether a record can be deleted. * @@ -283,9 +294,9 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.prostate_and_testicular_cancer.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.prostate_and_testicular_cancer.' . (int) $record->id); } return false; } @@ -301,42 +312,42 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.prostate_and_testicular_cancer.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.prostate_and_testicular_cancer.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.prostate_and_testicular_cancer.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.prostate_and_testicular_cancer.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -344,19 +355,19 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -368,10 +379,10 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_prostate_and_testicular_cancer')); + ->from($db->quoteName('#__ehealthportal_prostate_and_testicular_cancer')); $db->setQuery($query); $max = $db->loadResult(); @@ -383,7 +394,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -398,16 +409,16 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.prostate_and_testicular_cancer.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.prostate_and_testicular_cancer.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.prostate_and_testicular_cancer', $data); + $this->preprocessData('com_ehealthportal.prostate_and_testicular_cancer', $data); } return $data; @@ -422,9 +433,9 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -440,7 +451,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin { return false; } - + return true; } @@ -460,10 +471,10 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -489,30 +500,30 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('prostate_and_testicular_cancer'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('prostate_and_testicular_cancer'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -549,8 +560,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -576,13 +586,13 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('prostate_and_testicular_cancer'); + $this->canDo = EhealthportalHelper::getActions('prostate_and_testicular_cancer'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('prostate_and_testicular_cancer.batch')) { return false; } @@ -602,7 +612,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -615,7 +625,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -631,13 +641,19 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -649,7 +665,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -713,15 +729,15 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('prostate_and_testicular_cancer'); + $this->canDo = EhealthportalHelper::getActions('prostate_and_testicular_cancer'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('prostate_and_testicular_cancer.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -738,7 +754,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -754,13 +770,13 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -804,7 +820,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -816,23 +832,39 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('prostate_and_testicular_cancer', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "prostate_and_testicular_cancer", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -842,7 +874,7 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -850,14 +882,14 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -870,7 +902,6 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -881,4 +912,26 @@ class Ehealth_portalModelProstate_and_testicular_cancer extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/prostate_and_testicular_cancers.php b/admin/models/prostate_and_testicular_cancers.php index 8ea17b1..8071ad0 100644 --- a/admin/models/prostate_and_testicular_cancers.php +++ b/admin/models/prostate_and_testicular_cancers.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancers.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Prostate_and_testicular_cancers Model + * Prostate_and_testicular_cancers List Model */ -class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList +class EhealthportalModelProstate_and_testicular_cancers extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -143,7 +166,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList } } - + // return items return $items; } @@ -159,11 +182,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_age') { $ptc_ageArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_ageArray[$value]) && Ehealth_portalHelper::checkString($ptc_ageArray[$value])) + if (isset($ptc_ageArray[$value]) && StringHelper::check($ptc_ageArray[$value])) { return $ptc_ageArray[$value]; } @@ -172,11 +195,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_fam_history') { $ptc_fam_historyArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_fam_historyArray[$value]) && Ehealth_portalHelper::checkString($ptc_fam_historyArray[$value])) + if (isset($ptc_fam_historyArray[$value]) && StringHelper::check($ptc_fam_historyArray[$value])) { return $ptc_fam_historyArray[$value]; } @@ -185,11 +208,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_diet') { $ptc_dietArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_dietArray[$value]) && Ehealth_portalHelper::checkString($ptc_dietArray[$value])) + if (isset($ptc_dietArray[$value]) && StringHelper::check($ptc_dietArray[$value])) { return $ptc_dietArray[$value]; } @@ -198,11 +221,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_phy_activity') { $ptc_phy_activityArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_phy_activityArray[$value]) && Ehealth_portalHelper::checkString($ptc_phy_activityArray[$value])) + if (isset($ptc_phy_activityArray[$value]) && StringHelper::check($ptc_phy_activityArray[$value])) { return $ptc_phy_activityArray[$value]; } @@ -211,11 +234,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_overweight') { $ptc_overweightArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_overweightArray[$value]) && Ehealth_portalHelper::checkString($ptc_overweightArray[$value])) + if (isset($ptc_overweightArray[$value]) && StringHelper::check($ptc_overweightArray[$value])) { return $ptc_overweightArray[$value]; } @@ -224,11 +247,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_urinate') { $ptc_urinateArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_urinateArray[$value]) && Ehealth_portalHelper::checkString($ptc_urinateArray[$value])) + if (isset($ptc_urinateArray[$value]) && StringHelper::check($ptc_urinateArray[$value])) { return $ptc_urinateArray[$value]; } @@ -237,40 +260,40 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList if ($name === 'ptc_urine_freq') { $ptc_urine_freqArray = array( - 0 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', - 1 => 'COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' + 0 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_YES', + 1 => 'COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_NO' ); // Now check if value is found in this array - if (isset($ptc_urine_freqArray[$value]) && Ehealth_portalHelper::checkString($ptc_urine_freqArray[$value])) + if (isset($ptc_urine_freqArray[$value]) && StringHelper::check($ptc_urine_freqArray[$value])) { return $ptc_urine_freqArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_prostate_and_testicular_cancer', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_prostate_and_testicular_cancer', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -292,7 +315,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -300,7 +323,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -333,7 +356,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -360,24 +383,24 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_prostate_and_testicular_cancer table - $query->from($db->quoteName('#__ehealth_portal_prostate_and_testicular_cancer', 'a')); + // From the ehealthportal_prostate_and_testicular_cancer table + $query->from($db->quoteName('#__ehealthportal_prostate_and_testicular_cancer', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -396,8 +419,18 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -414,10 +447,11 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -426,10 +460,37 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert ptc_age + $item->ptc_age = $this->selectionTranslation($item->ptc_age, 'ptc_age'); + // convert ptc_fam_history + $item->ptc_fam_history = $this->selectionTranslation($item->ptc_fam_history, 'ptc_fam_history'); + // convert ptc_diet + $item->ptc_diet = $this->selectionTranslation($item->ptc_diet, 'ptc_diet'); + // convert ptc_phy_activity + $item->ptc_phy_activity = $this->selectionTranslation($item->ptc_phy_activity, 'ptc_phy_activity'); + // convert ptc_overweight + $item->ptc_overweight = $this->selectionTranslation($item->ptc_overweight, 'ptc_overweight'); + // convert ptc_urinate + $item->ptc_urinate = $this->selectionTranslation($item->ptc_urinate, 'ptc_urinate'); + // convert ptc_urine_freq + $item->ptc_urine_freq = $this->selectionTranslation($item->ptc_urine_freq, 'ptc_urine_freq'); + } + } + + } return $items; } } @@ -444,10 +505,10 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_prostate_and_testicular_cancer"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_prostate_and_testicular_cancer"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -462,7 +523,7 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -477,13 +538,13 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -504,24 +565,26 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_prostate_and_testicular_cancer')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_prostate_and_testicular_cancer')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -536,8 +599,8 @@ class Ehealth_portalModelProstate_and_testicular_cancers extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_prostate_and_testicular_cancer'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_prostate_and_testicular_cancer'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/referral.php b/admin/models/referral.php index 1f65fa8..076f3bd 100644 --- a/admin/models/referral.php +++ b/admin/models/referral.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referral.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Referral Model + * Ehealthportal Referral Admin Model */ -class Ehealth_portalModelReferral extends JModelAdmin +class EhealthportalModelReferral extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelReferral extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelReferral extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.referral'; + public $typeAlias = 'com_ehealthportal.referral'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelReferral extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'referral', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'referral', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelReferral extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.referral'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelReferral extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelReferral extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.referral', 'referral', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.referral', 'referral', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelReferral extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.referral.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.referral.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelReferral extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelReferral extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelReferral extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('referral.edit.name', 'com_ehealth_portal.referral.' . (int) $id)) - || ($id == 0 && !$user->authorise('referral.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('referral.edit.name', 'com_ehealthportal.referral.' . (int) $id)) + || ($id == 0 && !$user->authorise('referral.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelReferral extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('referral.edit.description', 'com_ehealth_portal.referral.' . (int) $id)) - || ($id == 0 && !$user->authorise('referral.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('referral.edit.description', 'com_ehealthportal.referral.' . (int) $id)) + || ($id == 0 && !$user->authorise('referral.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelReferral extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/referral.js'; + return 'media/com_ehealthportal/js/referral.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelReferral extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.referral.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.referral.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelReferral extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.referral.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.referral.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.referral.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.referral.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelReferral extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelReferral extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_referral')); + ->from($db->quoteName('#__ehealthportal_referral')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelReferral extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelReferral extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.referral.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.referral.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.referral', $data); + $this->preprocessData('com_ehealthportal.referral', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelReferral extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelReferral extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelReferral extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelReferral extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('referral'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('referral'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelReferral extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelReferral extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('referral'); + $this->canDo = EhealthportalHelper::getActions('referral'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('referral.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelReferral extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelReferral extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelReferral extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelReferral extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelReferral extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('referral'); + $this->canDo = EhealthportalHelper::getActions('referral'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('referral.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelReferral extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelReferral extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelReferral extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelReferral extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('referral', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "referral", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelReferral extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('referral', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_REFERRAL_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_REFERRAL_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelReferral extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelReferral extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelReferral extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelReferral extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelReferral extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/referrals.php b/admin/models/referrals.php index 300aab7..a4f4036 100644 --- a/admin/models/referrals.php +++ b/admin/models/referrals.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referrals.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Referrals Model + * Referrals List Model */ -class Ehealth_portalModelReferrals extends JModelList +class EhealthportalModelReferrals extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelReferrals extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelReferrals extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelReferrals extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_referral', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_referral', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelReferrals extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelReferrals extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelReferrals extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_referral table - $query->from($db->quoteName('#__ehealth_portal_referral', 'a')); + // From the ehealthportal_referral table + $query->from($db->quoteName('#__ehealthportal_referral', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelReferrals extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelReferrals extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelReferrals extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelReferrals extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_referral"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_referral"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelReferrals extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelReferrals extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelReferrals extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_referral')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_referral')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelReferrals extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_referral'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_referral'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/rules/guid.php b/admin/models/rules/guid.php new file mode 100644 index 0000000..ee16d25 --- /dev/null +++ b/admin/models/rules/guid.php @@ -0,0 +1,71 @@ + + @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Portal for mobile health clinics + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('JPATH_PLATFORM') or die; + +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Form\Form; +use Joomla\CMS\Form\FormRule; +use Joomla\Registry\Registry; +use Joomla\CMS\HTML\HTMLHelper as Html; + +/** + * Form Rule (Guid) class for the Joomla Platform. + */ +class JFormRuleGuid extends FormRule +{ + /** + * Method to test for a Globally Unique Identifier. + * + * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param Registry $input An optional Registry object with the entire data set to validate against the entire form. + * @param Form $form The form object for which the field is being tested. + * + * @return boolean True if the value is valid, false otherwise. + * + */ + public function test(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null) + { + $value = trim($value); + + // If the field is empty and not required, the field is valid. + $required = ((string) $element['required'] == 'true' || (string) $element['required'] == 'required'); + + if (!$required && empty($value)) + { + return true; + } + + // thanks to Lewie https://stackoverflow.com/a/1515456/1429677 + return preg_match("/^(\{)?[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}(?(1)\})$/i", $value); + } + +} diff --git a/admin/models/site.php b/admin/models/site.php index 0771c9a..19bbb71 100644 --- a/admin/models/site.php +++ b/admin/models/site.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage site.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Site Model + * Ehealthportal Site Admin Model */ -class Ehealth_portalModelSite extends JModelAdmin +class EhealthportalModelSite extends AdminModel { /** * The tab layout fields array. @@ -59,7 +68,7 @@ class Ehealth_portalModelSite extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -67,7 +76,7 @@ class Ehealth_portalModelSite extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.site'; + public $typeAlias = 'com_ehealthportal.site'; /** * Returns a Table object, always creating it @@ -76,18 +85,18 @@ class Ehealth_portalModelSite extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'site', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'site', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -116,12 +125,6 @@ class Ehealth_portalModelSite extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.site'); - } } return $item; @@ -138,7 +141,7 @@ class Ehealth_portalModelSite extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -158,14 +161,14 @@ class Ehealth_portalModelSite extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.site', 'site', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.site', 'site', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -178,12 +181,12 @@ class Ehealth_portalModelSite extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.site.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.site.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -199,7 +202,7 @@ class Ehealth_portalModelSite extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -209,7 +212,7 @@ class Ehealth_portalModelSite extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -217,8 +220,8 @@ class Ehealth_portalModelSite extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Site Name access controls. - if ($id != 0 && (!$user->authorise('site.edit.site_name', 'com_ehealth_portal.site.' . (int) $id)) - || ($id == 0 && !$user->authorise('site.edit.site_name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('site.edit.site_name', 'com_ehealthportal.site.' . (int) $id)) + || ($id == 0 && !$user->authorise('site.edit.site_name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('site_name', 'disabled', 'true'); @@ -234,8 +237,8 @@ class Ehealth_portalModelSite extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('site.edit.description', 'com_ehealth_portal.site.' . (int) $id)) - || ($id == 0 && !$user->authorise('site.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('site.edit.description', 'com_ehealthportal.site.' . (int) $id)) + || ($id == 0 && !$user->authorise('site.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -251,8 +254,8 @@ class Ehealth_portalModelSite extends JModelAdmin } } // Modify the form based on Edit Site Region access controls. - if ($id != 0 && (!$user->authorise('site.edit.site_region', 'com_ehealth_portal.site.' . (int) $id)) - || ($id == 0 && !$user->authorise('site.edit.site_region', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('site.edit.site_region', 'com_ehealthportal.site.' . (int) $id)) + || ($id == 0 && !$user->authorise('site.edit.site_region', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('site_region', 'disabled', 'true'); @@ -284,19 +287,26 @@ class Ehealth_portalModelSite extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/site.js'; + return 'media/com_ehealthportal/js/site.js'; } - + /** * Method to test whether a record can be deleted. * @@ -315,9 +325,9 @@ class Ehealth_portalModelSite extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.site.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.site.' . (int) $record->id); } return false; } @@ -333,42 +343,42 @@ class Ehealth_portalModelSite extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.site.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.site.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.site.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.site.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -376,19 +386,19 @@ class Ehealth_portalModelSite extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -400,10 +410,10 @@ class Ehealth_portalModelSite extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_site')); + ->from($db->quoteName('#__ehealthportal_site')); $db->setQuery($query); $max = $db->loadResult(); @@ -415,7 +425,7 @@ class Ehealth_portalModelSite extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -430,16 +440,16 @@ class Ehealth_portalModelSite extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.site.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.site.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.site', $data); + $this->preprocessData('com_ehealthportal.site', $data); } return $data; @@ -454,9 +464,9 @@ class Ehealth_portalModelSite extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -472,7 +482,7 @@ class Ehealth_portalModelSite extends JModelAdmin { return false; } - + return true; } @@ -492,10 +502,10 @@ class Ehealth_portalModelSite extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -521,30 +531,30 @@ class Ehealth_portalModelSite extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('site'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('site'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -581,8 +591,7 @@ class Ehealth_portalModelSite extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -608,13 +617,13 @@ class Ehealth_portalModelSite extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('site'); + $this->canDo = EhealthportalHelper::getActions('site'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('site.batch')) { return false; } @@ -634,7 +643,7 @@ class Ehealth_portalModelSite extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -647,7 +656,7 @@ class Ehealth_portalModelSite extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -663,14 +672,14 @@ class Ehealth_portalModelSite extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->site_name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->site_name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -682,7 +691,7 @@ class Ehealth_portalModelSite extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -746,15 +755,15 @@ class Ehealth_portalModelSite extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('site'); + $this->canDo = EhealthportalHelper::getActions('site'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('site.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -771,7 +780,7 @@ class Ehealth_portalModelSite extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -787,13 +796,13 @@ class Ehealth_portalModelSite extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -837,7 +846,7 @@ class Ehealth_portalModelSite extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -849,23 +858,38 @@ class Ehealth_portalModelSite extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('site', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "site", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -898,27 +922,27 @@ class Ehealth_portalModelSite extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['site_name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['site_name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['site_name']); + $data['alias'] = OutputFilter::stringURLSafe($data['site_name']); } - $table = JTable::getInstance('site', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_SITE_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_SITE_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -928,7 +952,7 @@ class Ehealth_portalModelSite extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -936,14 +960,14 @@ class Ehealth_portalModelSite extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -956,7 +980,6 @@ class Ehealth_portalModelSite extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -983,10 +1006,10 @@ class Ehealth_portalModelSite extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -1001,7 +1024,7 @@ class Ehealth_portalModelSite extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/sites.php b/admin/models/sites.php index d13cb63..2f22c0e 100644 --- a/admin/models/sites.php +++ b/admin/models/sites.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage sites.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Sites Model + * Sites List Model */ -class Ehealth_portalModelSites extends JModelList +class EhealthportalModelSites extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -66,7 +75,7 @@ class Ehealth_portalModelSites extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -123,7 +132,7 @@ class Ehealth_portalModelSites extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -131,34 +140,34 @@ class Ehealth_portalModelSites extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_site', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_site', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -180,7 +189,7 @@ class Ehealth_portalModelSites extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -188,7 +197,7 @@ class Ehealth_portalModelSites extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -231,24 +240,24 @@ class Ehealth_portalModelSites extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_site table - $query->from($db->quoteName('#__ehealth_portal_site', 'a')); + // From the ehealthportal_site table + $query->from($db->quoteName('#__ehealthportal_site', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -267,8 +276,10 @@ class Ehealth_portalModelSites extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -285,7 +296,7 @@ class Ehealth_portalModelSites extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -297,7 +308,7 @@ class Ehealth_portalModelSites extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -315,10 +326,10 @@ class Ehealth_portalModelSites extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_site"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_site"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -333,7 +344,7 @@ class Ehealth_portalModelSites extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -348,13 +359,13 @@ class Ehealth_portalModelSites extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -377,24 +388,26 @@ class Ehealth_portalModelSites extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_site')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_site')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -409,8 +422,8 @@ class Ehealth_portalModelSites extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_site'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_site'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/strength.php b/admin/models/strength.php index 5fc7663..8efe429 100644 --- a/admin/models/strength.php +++ b/admin/models/strength.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strength.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Strength Model + * Ehealthportal Strength Admin Model */ -class Ehealth_portalModelStrength extends JModelAdmin +class EhealthportalModelStrength extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelStrength extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelStrength extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.strength'; + public $typeAlias = 'com_ehealthportal.strength'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelStrength extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'strength', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'strength', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelStrength extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.strength'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelStrength extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelStrength extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.strength', 'strength', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.strength', 'strength', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelStrength extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.strength.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.strength.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelStrength extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelStrength extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelStrength extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('strength.edit.name', 'com_ehealth_portal.strength.' . (int) $id)) - || ($id == 0 && !$user->authorise('strength.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('strength.edit.name', 'com_ehealthportal.strength.' . (int) $id)) + || ($id == 0 && !$user->authorise('strength.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelStrength extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('strength.edit.description', 'com_ehealth_portal.strength.' . (int) $id)) - || ($id == 0 && !$user->authorise('strength.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('strength.edit.description', 'com_ehealthportal.strength.' . (int) $id)) + || ($id == 0 && !$user->authorise('strength.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelStrength extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/strength.js'; + return 'media/com_ehealthportal/js/strength.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelStrength extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.strength.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.strength.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelStrength extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.strength.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.strength.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.strength.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.strength.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelStrength extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelStrength extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_strength')); + ->from($db->quoteName('#__ehealthportal_strength')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelStrength extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelStrength extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.strength.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.strength.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.strength', $data); + $this->preprocessData('com_ehealthportal.strength', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelStrength extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelStrength extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelStrength extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelStrength extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('strength'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('strength'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelStrength extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelStrength extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('strength'); + $this->canDo = EhealthportalHelper::getActions('strength'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('strength.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelStrength extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelStrength extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelStrength extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelStrength extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelStrength extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('strength'); + $this->canDo = EhealthportalHelper::getActions('strength'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('strength.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelStrength extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelStrength extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelStrength extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelStrength extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('strength', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "strength", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelStrength extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('strength', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_STRENGTH_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_STRENGTH_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelStrength extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelStrength extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelStrength extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelStrength extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelStrength extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/strengths.php b/admin/models/strengths.php index b143645..77016f8 100644 --- a/admin/models/strengths.php +++ b/admin/models/strengths.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strengths.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Strengths Model + * Strengths List Model */ -class Ehealth_portalModelStrengths extends JModelList +class EhealthportalModelStrengths extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelStrengths extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelStrengths extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelStrengths extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_strength', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_strength', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelStrengths extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelStrengths extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelStrengths extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_strength table - $query->from($db->quoteName('#__ehealth_portal_strength', 'a')); + // From the ehealthportal_strength table + $query->from($db->quoteName('#__ehealthportal_strength', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelStrengths extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelStrengths extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelStrengths extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelStrengths extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_strength"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_strength"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelStrengths extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelStrengths extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelStrengths extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_strength')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_strength')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelStrengths extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_strength'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_strength'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/test.php b/admin/models/test.php index 237cf88..7f3e52f 100644 --- a/admin/models/test.php +++ b/admin/models/test.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage test.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Test Model + * Ehealthportal Test Admin Model */ -class Ehealth_portalModelTest extends JModelAdmin +class EhealthportalModelTest extends AdminModel { /** * The tab layout fields array. @@ -103,7 +112,7 @@ class Ehealth_portalModelTest extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -111,7 +120,7 @@ class Ehealth_portalModelTest extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.test'; + public $typeAlias = 'com_ehealthportal.test'; /** * Returns a Table object, always creating it @@ -120,18 +129,18 @@ class Ehealth_portalModelTest extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'test', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'test', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -160,12 +169,7 @@ class Ehealth_portalModelTest extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.test'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -182,7 +186,7 @@ class Ehealth_portalModelTest extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -202,14 +206,14 @@ class Ehealth_portalModelTest extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.test', 'test', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.test', 'test', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -222,12 +226,12 @@ class Ehealth_portalModelTest extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.test.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.test.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -243,7 +247,7 @@ class Ehealth_portalModelTest extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -253,7 +257,7 @@ class Ehealth_portalModelTest extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -277,19 +281,26 @@ class Ehealth_portalModelTest extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/test.js'; + return 'media/com_ehealthportal/js/test.js'; } - + /** * Method to test whether a record can be deleted. * @@ -308,9 +319,9 @@ class Ehealth_portalModelTest extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.test.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.test.' . (int) $record->id); } return false; } @@ -326,42 +337,42 @@ class Ehealth_portalModelTest extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.test.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.test.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.test.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.test.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -369,19 +380,19 @@ class Ehealth_portalModelTest extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -393,10 +404,10 @@ class Ehealth_portalModelTest extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_test')); + ->from($db->quoteName('#__ehealthportal_test')); $db->setQuery($query); $max = $db->loadResult(); @@ -408,7 +419,7 @@ class Ehealth_portalModelTest extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -423,16 +434,16 @@ class Ehealth_portalModelTest extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.test.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.test.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.test', $data); + $this->preprocessData('com_ehealthportal.test', $data); } return $data; @@ -447,9 +458,9 @@ class Ehealth_portalModelTest extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -465,7 +476,7 @@ class Ehealth_portalModelTest extends JModelAdmin { return false; } - + return true; } @@ -485,10 +496,10 @@ class Ehealth_portalModelTest extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -514,30 +525,30 @@ class Ehealth_portalModelTest extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('test'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('test'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -574,8 +585,7 @@ class Ehealth_portalModelTest extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -601,13 +611,13 @@ class Ehealth_portalModelTest extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('test'); + $this->canDo = EhealthportalHelper::getActions('test'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('test.batch')) { return false; } @@ -627,7 +637,7 @@ class Ehealth_portalModelTest extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -640,7 +650,7 @@ class Ehealth_portalModelTest extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -656,13 +666,19 @@ class Ehealth_portalModelTest extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -674,7 +690,7 @@ class Ehealth_portalModelTest extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -738,15 +754,15 @@ class Ehealth_portalModelTest extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('test'); + $this->canDo = EhealthportalHelper::getActions('test'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('test.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -763,7 +779,7 @@ class Ehealth_portalModelTest extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -779,13 +795,13 @@ class Ehealth_portalModelTest extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -829,7 +845,7 @@ class Ehealth_portalModelTest extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -841,23 +857,39 @@ class Ehealth_portalModelTest extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('test', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "test", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -867,7 +899,7 @@ class Ehealth_portalModelTest extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -875,14 +907,14 @@ class Ehealth_portalModelTest extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -895,7 +927,6 @@ class Ehealth_portalModelTest extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -906,4 +937,26 @@ class Ehealth_portalModelTest extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/testing_reason.php b/admin/models/testing_reason.php index 75569f5..4245004 100644 --- a/admin/models/testing_reason.php +++ b/admin/models/testing_reason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Testing_reason Model + * Ehealthportal Testing_reason Admin Model */ -class Ehealth_portalModelTesting_reason extends JModelAdmin +class EhealthportalModelTesting_reason extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.testing_reason'; + public $typeAlias = 'com_ehealthportal.testing_reason'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'testing_reason', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'testing_reason', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.testing_reason'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.testing_reason', 'testing_reason', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.testing_reason', 'testing_reason', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.testing_reason.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.testing_reason.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('testing_reason.edit.name', 'com_ehealth_portal.testing_reason.' . (int) $id)) - || ($id == 0 && !$user->authorise('testing_reason.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('testing_reason.edit.name', 'com_ehealthportal.testing_reason.' . (int) $id)) + || ($id == 0 && !$user->authorise('testing_reason.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('testing_reason.edit.description', 'com_ehealth_portal.testing_reason.' . (int) $id)) - || ($id == 0 && !$user->authorise('testing_reason.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('testing_reason.edit.description', 'com_ehealthportal.testing_reason.' . (int) $id)) + || ($id == 0 && !$user->authorise('testing_reason.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/testing_reason.js'; + return 'media/com_ehealthportal/js/testing_reason.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.testing_reason.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.testing_reason.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.testing_reason.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.testing_reason.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.testing_reason.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.testing_reason.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_testing_reason')); + ->from($db->quoteName('#__ehealthportal_testing_reason')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.testing_reason.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.testing_reason.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.testing_reason', $data); + $this->preprocessData('com_ehealthportal.testing_reason', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('testing_reason'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('testing_reason'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('testing_reason'); + $this->canDo = EhealthportalHelper::getActions('testing_reason'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('testing_reason.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('testing_reason'); + $this->canDo = EhealthportalHelper::getActions('testing_reason'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('testing_reason.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('testing_reason', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "testing_reason", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('testing_reason', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_TESTING_REASON_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_TESTING_REASON_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelTesting_reason extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/testing_reasons.php b/admin/models/testing_reasons.php index 0be721f..3aec0ec 100644 --- a/admin/models/testing_reasons.php +++ b/admin/models/testing_reasons.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reasons.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Testing_reasons Model + * Testing_reasons List Model */ -class Ehealth_portalModelTesting_reasons extends JModelList +class EhealthportalModelTesting_reasons extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelTesting_reasons extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_testing_reason', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_testing_reason', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelTesting_reasons extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_testing_reason table - $query->from($db->quoteName('#__ehealth_portal_testing_reason', 'a')); + // From the ehealthportal_testing_reason table + $query->from($db->quoteName('#__ehealthportal_testing_reason', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelTesting_reasons extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelTesting_reasons extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_testing_reason"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_testing_reason"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelTesting_reasons extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelTesting_reasons extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelTesting_reasons extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_testing_reason')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_testing_reason')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelTesting_reasons extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_testing_reason'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_testing_reason'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/tests.php b/admin/models/tests.php index daf520a..b8fb493 100644 --- a/admin/models/tests.php +++ b/admin/models/tests.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tests.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Tests Model + * Tests List Model */ -class Ehealth_portalModelTests extends JModelList +class EhealthportalModelTests extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelTests extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelTests extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelTests extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -147,7 +170,7 @@ class Ehealth_portalModelTests extends JModelList } } - + // return items return $items; } @@ -163,11 +186,11 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'urine_test_result') { $urine_test_resultArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_NORMAL', - 1 => 'COM_EHEALTH_PORTAL_TEST_ABNORMAL' + 0 => 'COM_EHEALTHPORTAL_TEST_NORMAL', + 1 => 'COM_EHEALTHPORTAL_TEST_ABNORMAL' ); // Now check if value is found in this array - if (isset($urine_test_resultArray[$value]) && Ehealth_portalHelper::checkString($urine_test_resultArray[$value])) + if (isset($urine_test_resultArray[$value]) && StringHelper::check($urine_test_resultArray[$value])) { return $urine_test_resultArray[$value]; } @@ -176,12 +199,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'syphilis_first_reading') { $syphilis_first_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($syphilis_first_readingArray[$value]) && Ehealth_portalHelper::checkString($syphilis_first_readingArray[$value])) + if (isset($syphilis_first_readingArray[$value]) && StringHelper::check($syphilis_first_readingArray[$value])) { return $syphilis_first_readingArray[$value]; } @@ -190,12 +213,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'syphilis_second_reading') { $syphilis_second_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($syphilis_second_readingArray[$value]) && Ehealth_portalHelper::checkString($syphilis_second_readingArray[$value])) + if (isset($syphilis_second_readingArray[$value]) && StringHelper::check($syphilis_second_readingArray[$value])) { return $syphilis_second_readingArray[$value]; } @@ -204,12 +227,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'hepatitis_first_reading') { $hepatitis_first_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($hepatitis_first_readingArray[$value]) && Ehealth_portalHelper::checkString($hepatitis_first_readingArray[$value])) + if (isset($hepatitis_first_readingArray[$value]) && StringHelper::check($hepatitis_first_readingArray[$value])) { return $hepatitis_first_readingArray[$value]; } @@ -218,12 +241,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'hepatitis_second_reading') { $hepatitis_second_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($hepatitis_second_readingArray[$value]) && Ehealth_portalHelper::checkString($hepatitis_second_readingArray[$value])) + if (isset($hepatitis_second_readingArray[$value]) && StringHelper::check($hepatitis_second_readingArray[$value])) { return $hepatitis_second_readingArray[$value]; } @@ -232,12 +255,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'malaria_first_reading') { $malaria_first_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($malaria_first_readingArray[$value]) && Ehealth_portalHelper::checkString($malaria_first_readingArray[$value])) + if (isset($malaria_first_readingArray[$value]) && StringHelper::check($malaria_first_readingArray[$value])) { return $malaria_first_readingArray[$value]; } @@ -246,12 +269,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'malaria_second_reading') { $malaria_second_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($malaria_second_readingArray[$value]) && Ehealth_portalHelper::checkString($malaria_second_readingArray[$value])) + if (isset($malaria_second_readingArray[$value]) && StringHelper::check($malaria_second_readingArray[$value])) { return $malaria_second_readingArray[$value]; } @@ -260,12 +283,12 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'pregnancy_first_reading') { $pregnancy_first_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($pregnancy_first_readingArray[$value]) && Ehealth_portalHelper::checkString($pregnancy_first_readingArray[$value])) + if (isset($pregnancy_first_readingArray[$value]) && StringHelper::check($pregnancy_first_readingArray[$value])) { return $pregnancy_first_readingArray[$value]; } @@ -274,41 +297,41 @@ class Ehealth_portalModelTests extends JModelList if ($name === 'pregnancy_second_reading') { $pregnancy_second_readingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TEST_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TEST_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TEST_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TEST_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TEST_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TEST_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($pregnancy_second_readingArray[$value]) && Ehealth_portalHelper::checkString($pregnancy_second_readingArray[$value])) + if (isset($pregnancy_second_readingArray[$value]) && StringHelper::check($pregnancy_second_readingArray[$value])) { return $pregnancy_second_readingArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_test', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_test', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -330,7 +353,7 @@ class Ehealth_portalModelTests extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -338,7 +361,7 @@ class Ehealth_portalModelTests extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -371,7 +394,7 @@ class Ehealth_portalModelTests extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -398,24 +421,24 @@ class Ehealth_portalModelTests extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_test table - $query->from($db->quoteName('#__ehealth_portal_test', 'a')); + // From the ehealthportal_test table + $query->from($db->quoteName('#__ehealthportal_test', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -434,8 +457,18 @@ class Ehealth_portalModelTests extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -452,10 +485,11 @@ class Ehealth_portalModelTests extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -464,10 +498,41 @@ class Ehealth_portalModelTests extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert urine_test_result + $item->urine_test_result = $this->selectionTranslation($item->urine_test_result, 'urine_test_result'); + // convert syphilis_first_reading + $item->syphilis_first_reading = $this->selectionTranslation($item->syphilis_first_reading, 'syphilis_first_reading'); + // convert syphilis_second_reading + $item->syphilis_second_reading = $this->selectionTranslation($item->syphilis_second_reading, 'syphilis_second_reading'); + // convert hepatitis_first_reading + $item->hepatitis_first_reading = $this->selectionTranslation($item->hepatitis_first_reading, 'hepatitis_first_reading'); + // convert hepatitis_second_reading + $item->hepatitis_second_reading = $this->selectionTranslation($item->hepatitis_second_reading, 'hepatitis_second_reading'); + // convert malaria_first_reading + $item->malaria_first_reading = $this->selectionTranslation($item->malaria_first_reading, 'malaria_first_reading'); + // convert malaria_second_reading + $item->malaria_second_reading = $this->selectionTranslation($item->malaria_second_reading, 'malaria_second_reading'); + // convert pregnancy_first_reading + $item->pregnancy_first_reading = $this->selectionTranslation($item->pregnancy_first_reading, 'pregnancy_first_reading'); + // convert pregnancy_second_reading + $item->pregnancy_second_reading = $this->selectionTranslation($item->pregnancy_second_reading, 'pregnancy_second_reading'); + } + } + + } return $items; } } @@ -482,10 +547,10 @@ class Ehealth_portalModelTests extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_test"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_test"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -500,7 +565,7 @@ class Ehealth_portalModelTests extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -515,13 +580,13 @@ class Ehealth_portalModelTests extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -542,24 +607,26 @@ class Ehealth_portalModelTests extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_test')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_test')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -574,8 +641,8 @@ class Ehealth_portalModelTests extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_test'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_test'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/tuberculoses.php b/admin/models/tuberculoses.php index 6f94528..e5fc3fe 100644 --- a/admin/models/tuberculoses.php +++ b/admin/models/tuberculoses.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculoses.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Tuberculoses Model + * Tuberculoses List Model */ -class Ehealth_portalModelTuberculoses extends JModelList +class EhealthportalModelTuberculoses extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -64,7 +73,7 @@ class Ehealth_portalModelTuberculoses extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -107,7 +116,7 @@ class Ehealth_portalModelTuberculoses extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -115,14 +124,28 @@ class Ehealth_portalModelTuberculoses extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -159,7 +182,7 @@ class Ehealth_portalModelTuberculoses extends JModelList } } - + // return items return $items; } @@ -175,12 +198,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'recurring_night_sweats') { $recurring_night_sweatsArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($recurring_night_sweatsArray[$value]) && Ehealth_portalHelper::checkString($recurring_night_sweatsArray[$value])) + if (isset($recurring_night_sweatsArray[$value]) && StringHelper::check($recurring_night_sweatsArray[$value])) { return $recurring_night_sweatsArray[$value]; } @@ -189,12 +212,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'tb_fever') { $tb_feverArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($tb_feverArray[$value]) && Ehealth_portalHelper::checkString($tb_feverArray[$value])) + if (isset($tb_feverArray[$value]) && StringHelper::check($tb_feverArray[$value])) { return $tb_feverArray[$value]; } @@ -203,12 +226,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'persistent_cough') { $persistent_coughArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($persistent_coughArray[$value]) && Ehealth_portalHelper::checkString($persistent_coughArray[$value])) + if (isset($persistent_coughArray[$value]) && StringHelper::check($persistent_coughArray[$value])) { return $persistent_coughArray[$value]; } @@ -217,12 +240,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'blood_streaked_sputum') { $blood_streaked_sputumArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($blood_streaked_sputumArray[$value]) && Ehealth_portalHelper::checkString($blood_streaked_sputumArray[$value])) + if (isset($blood_streaked_sputumArray[$value]) && StringHelper::check($blood_streaked_sputumArray[$value])) { return $blood_streaked_sputumArray[$value]; } @@ -231,12 +254,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'unusual_tiredness') { $unusual_tirednessArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($unusual_tirednessArray[$value]) && Ehealth_portalHelper::checkString($unusual_tirednessArray[$value])) + if (isset($unusual_tirednessArray[$value]) && StringHelper::check($unusual_tirednessArray[$value])) { return $unusual_tirednessArray[$value]; } @@ -245,12 +268,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'pain_in_chest') { $pain_in_chestArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($pain_in_chestArray[$value]) && Ehealth_portalHelper::checkString($pain_in_chestArray[$value])) + if (isset($pain_in_chestArray[$value]) && StringHelper::check($pain_in_chestArray[$value])) { return $pain_in_chestArray[$value]; } @@ -259,12 +282,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'shortness_of_breath') { $shortness_of_breathArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($shortness_of_breathArray[$value]) && Ehealth_portalHelper::checkString($shortness_of_breathArray[$value])) + if (isset($shortness_of_breathArray[$value]) && StringHelper::check($shortness_of_breathArray[$value])) { return $shortness_of_breathArray[$value]; } @@ -273,11 +296,11 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'diagnosed_with_disease') { $diagnosed_with_diseaseArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO' ); // Now check if value is found in this array - if (isset($diagnosed_with_diseaseArray[$value]) && Ehealth_portalHelper::checkString($diagnosed_with_diseaseArray[$value])) + if (isset($diagnosed_with_diseaseArray[$value]) && StringHelper::check($diagnosed_with_diseaseArray[$value])) { return $diagnosed_with_diseaseArray[$value]; } @@ -286,12 +309,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'tb_exposed') { $tb_exposedArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($tb_exposedArray[$value]) && Ehealth_portalHelper::checkString($tb_exposedArray[$value])) + if (isset($tb_exposedArray[$value]) && StringHelper::check($tb_exposedArray[$value])) { return $tb_exposedArray[$value]; } @@ -300,11 +323,11 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'tb_treatment') { $tb_treatmentArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO' ); // Now check if value is found in this array - if (isset($tb_treatmentArray[$value]) && Ehealth_portalHelper::checkString($tb_treatmentArray[$value])) + if (isset($tb_treatmentArray[$value]) && StringHelper::check($tb_treatmentArray[$value])) { return $tb_treatmentArray[$value]; } @@ -313,11 +336,11 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'sputum_collection_one') { $sputum_collection_oneArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO' ); // Now check if value is found in this array - if (isset($sputum_collection_oneArray[$value]) && Ehealth_portalHelper::checkString($sputum_collection_oneArray[$value])) + if (isset($sputum_collection_oneArray[$value]) && StringHelper::check($sputum_collection_oneArray[$value])) { return $sputum_collection_oneArray[$value]; } @@ -326,12 +349,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'sputum_result_one') { $sputum_result_oneArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($sputum_result_oneArray[$value]) && Ehealth_portalHelper::checkString($sputum_result_oneArray[$value])) + if (isset($sputum_result_oneArray[$value]) && StringHelper::check($sputum_result_oneArray[$value])) { return $sputum_result_oneArray[$value]; } @@ -340,11 +363,11 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'referred_second_sputum') { $referred_second_sputumArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO' ); // Now check if value is found in this array - if (isset($referred_second_sputumArray[$value]) && Ehealth_portalHelper::checkString($referred_second_sputumArray[$value])) + if (isset($referred_second_sputumArray[$value]) && StringHelper::check($referred_second_sputumArray[$value])) { return $referred_second_sputumArray[$value]; } @@ -353,12 +376,12 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'sputum_result_two') { $sputum_result_twoArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_POSITIVE', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NEGATIVE', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_INCONCLUSIVE' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_POSITIVE', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NEGATIVE', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_INCONCLUSIVE' ); // Now check if value is found in this array - if (isset($sputum_result_twoArray[$value]) && Ehealth_portalHelper::checkString($sputum_result_twoArray[$value])) + if (isset($sputum_result_twoArray[$value]) && StringHelper::check($sputum_result_twoArray[$value])) { return $sputum_result_twoArray[$value]; } @@ -367,41 +390,41 @@ class Ehealth_portalModelTuberculoses extends JModelList if ($name === 'weight_loss_wdieting') { $weight_loss_wdietingArray = array( - 0 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_YES', - 1 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_NO', - 2 => 'COM_EHEALTH_PORTAL_TUBERCULOSIS_UNCERTAIN' + 0 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_YES', + 1 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_NO', + 2 => 'COM_EHEALTHPORTAL_TUBERCULOSIS_UNCERTAIN' ); // Now check if value is found in this array - if (isset($weight_loss_wdietingArray[$value]) && Ehealth_portalHelper::checkString($weight_loss_wdietingArray[$value])) + if (isset($weight_loss_wdietingArray[$value]) && StringHelper::check($weight_loss_wdietingArray[$value])) { return $weight_loss_wdietingArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_tuberculosis', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_tuberculosis', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -423,7 +446,7 @@ class Ehealth_portalModelTuberculoses extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -431,7 +454,7 @@ class Ehealth_portalModelTuberculoses extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -464,7 +487,7 @@ class Ehealth_portalModelTuberculoses extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -491,24 +514,24 @@ class Ehealth_portalModelTuberculoses extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_tuberculosis table - $query->from($db->quoteName('#__ehealth_portal_tuberculosis', 'a')); + // From the ehealthportal_tuberculosis table + $query->from($db->quoteName('#__ehealthportal_tuberculosis', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -527,8 +550,18 @@ class Ehealth_portalModelTuberculoses extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -545,10 +578,11 @@ class Ehealth_portalModelTuberculoses extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -557,10 +591,53 @@ class Ehealth_portalModelTuberculoses extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert recurring_night_sweats + $item->recurring_night_sweats = $this->selectionTranslation($item->recurring_night_sweats, 'recurring_night_sweats'); + // convert tb_fever + $item->tb_fever = $this->selectionTranslation($item->tb_fever, 'tb_fever'); + // convert persistent_cough + $item->persistent_cough = $this->selectionTranslation($item->persistent_cough, 'persistent_cough'); + // convert blood_streaked_sputum + $item->blood_streaked_sputum = $this->selectionTranslation($item->blood_streaked_sputum, 'blood_streaked_sputum'); + // convert unusual_tiredness + $item->unusual_tiredness = $this->selectionTranslation($item->unusual_tiredness, 'unusual_tiredness'); + // convert pain_in_chest + $item->pain_in_chest = $this->selectionTranslation($item->pain_in_chest, 'pain_in_chest'); + // convert shortness_of_breath + $item->shortness_of_breath = $this->selectionTranslation($item->shortness_of_breath, 'shortness_of_breath'); + // convert diagnosed_with_disease + $item->diagnosed_with_disease = $this->selectionTranslation($item->diagnosed_with_disease, 'diagnosed_with_disease'); + // convert tb_exposed + $item->tb_exposed = $this->selectionTranslation($item->tb_exposed, 'tb_exposed'); + // convert tb_treatment + $item->tb_treatment = $this->selectionTranslation($item->tb_treatment, 'tb_treatment'); + // convert sputum_collection_one + $item->sputum_collection_one = $this->selectionTranslation($item->sputum_collection_one, 'sputum_collection_one'); + // convert sputum_result_one + $item->sputum_result_one = $this->selectionTranslation($item->sputum_result_one, 'sputum_result_one'); + // convert referred_second_sputum + $item->referred_second_sputum = $this->selectionTranslation($item->referred_second_sputum, 'referred_second_sputum'); + // convert sputum_result_two + $item->sputum_result_two = $this->selectionTranslation($item->sputum_result_two, 'sputum_result_two'); + // convert weight_loss_wdieting + $item->weight_loss_wdieting = $this->selectionTranslation($item->weight_loss_wdieting, 'weight_loss_wdieting'); + } + } + + } return $items; } } @@ -575,10 +652,10 @@ class Ehealth_portalModelTuberculoses extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_tuberculosis"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_tuberculosis"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -593,7 +670,7 @@ class Ehealth_portalModelTuberculoses extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -608,13 +685,13 @@ class Ehealth_portalModelTuberculoses extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -635,24 +712,26 @@ class Ehealth_portalModelTuberculoses extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_tuberculosis')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_tuberculosis')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -667,8 +746,8 @@ class Ehealth_portalModelTuberculoses extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_tuberculosis'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_tuberculosis'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/tuberculosis.php b/admin/models/tuberculosis.php index d7be599..61a64e9 100644 --- a/admin/models/tuberculosis.php +++ b/admin/models/tuberculosis.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculosis.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Tuberculosis Model + * Ehealthportal Tuberculosis Admin Model */ -class Ehealth_portalModelTuberculosis extends JModelAdmin +class EhealthportalModelTuberculosis extends AdminModel { /** * The tab layout fields array. @@ -87,7 +96,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -95,7 +104,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.tuberculosis'; + public $typeAlias = 'com_ehealthportal.tuberculosis'; /** * Returns a Table object, always creating it @@ -104,18 +113,18 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'tuberculosis', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'tuberculosis', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -144,12 +153,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.tuberculosis'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -166,7 +170,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -186,14 +190,14 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.tuberculosis', 'tuberculosis', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.tuberculosis', 'tuberculosis', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -206,12 +210,12 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.tuberculosis.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.tuberculosis.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -227,7 +231,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -237,7 +241,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -245,8 +249,8 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Patient access controls. - if ($id != 0 && (!$user->authorise('tuberculosis.edit.patient', 'com_ehealth_portal.tuberculosis.' . (int) $id)) - || ($id == 0 && !$user->authorise('tuberculosis.edit.patient', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('tuberculosis.edit.patient', 'com_ehealthportal.tuberculosis.' . (int) $id)) + || ($id == 0 && !$user->authorise('tuberculosis.edit.patient', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('patient', 'disabled', 'true'); @@ -278,19 +282,26 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/tuberculosis.js'; + return 'media/com_ehealthportal/js/tuberculosis.js'; } - + /** * Method to test whether a record can be deleted. * @@ -309,9 +320,9 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.tuberculosis.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.tuberculosis.' . (int) $record->id); } return false; } @@ -327,42 +338,42 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.tuberculosis.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.tuberculosis.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.tuberculosis.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.tuberculosis.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -370,19 +381,19 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -394,10 +405,10 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_tuberculosis')); + ->from($db->quoteName('#__ehealthportal_tuberculosis')); $db->setQuery($query); $max = $db->loadResult(); @@ -409,7 +420,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -424,16 +435,16 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.tuberculosis.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.tuberculosis.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.tuberculosis', $data); + $this->preprocessData('com_ehealthportal.tuberculosis', $data); } return $data; @@ -448,9 +459,9 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -466,7 +477,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin { return false; } - + return true; } @@ -486,10 +497,10 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -515,30 +526,30 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('tuberculosis'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('tuberculosis'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -575,8 +586,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -602,13 +612,13 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('tuberculosis'); + $this->canDo = EhealthportalHelper::getActions('tuberculosis'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('tuberculosis.batch')) { return false; } @@ -628,7 +638,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -641,7 +651,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -657,13 +667,19 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -675,7 +691,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -739,15 +755,15 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('tuberculosis'); + $this->canDo = EhealthportalHelper::getActions('tuberculosis'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('tuberculosis.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -764,7 +780,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -780,13 +796,13 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -830,7 +846,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -842,23 +858,39 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('tuberculosis', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "tuberculosis", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -868,7 +900,7 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -876,14 +908,14 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -896,7 +928,6 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -907,4 +938,26 @@ class Ehealth_portalModelTuberculosis extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/unit.php b/admin/models/unit.php index 442e3ef..8ea29ac 100644 --- a/admin/models/unit.php +++ b/admin/models/unit.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage unit.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,23 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Unit Model + * Ehealthportal Unit Admin Model */ -class Ehealth_portalModelUnit extends JModelAdmin +class EhealthportalModelUnit extends AdminModel { /** * The tab layout fields array. @@ -56,7 +65,7 @@ class Ehealth_portalModelUnit extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -64,7 +73,7 @@ class Ehealth_portalModelUnit extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.unit'; + public $typeAlias = 'com_ehealthportal.unit'; /** * Returns a Table object, always creating it @@ -73,18 +82,18 @@ class Ehealth_portalModelUnit extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'unit', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'unit', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -113,12 +122,6 @@ class Ehealth_portalModelUnit extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.unit'); - } } return $item; @@ -135,7 +138,7 @@ class Ehealth_portalModelUnit extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -155,14 +158,14 @@ class Ehealth_portalModelUnit extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.unit', 'unit', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.unit', 'unit', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -175,12 +178,12 @@ class Ehealth_portalModelUnit extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.unit.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.unit.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -196,7 +199,7 @@ class Ehealth_portalModelUnit extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -206,7 +209,7 @@ class Ehealth_portalModelUnit extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -214,8 +217,8 @@ class Ehealth_portalModelUnit extends JModelAdmin $form->setFieldAttribute('created', 'filter', 'unset'); } // Modify the form based on Edit Name access controls. - if ($id != 0 && (!$user->authorise('unit.edit.name', 'com_ehealth_portal.unit.' . (int) $id)) - || ($id == 0 && !$user->authorise('unit.edit.name', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('unit.edit.name', 'com_ehealthportal.unit.' . (int) $id)) + || ($id == 0 && !$user->authorise('unit.edit.name', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('name', 'disabled', 'true'); @@ -231,8 +234,8 @@ class Ehealth_portalModelUnit extends JModelAdmin } } // Modify the form based on Edit Description access controls. - if ($id != 0 && (!$user->authorise('unit.edit.description', 'com_ehealth_portal.unit.' . (int) $id)) - || ($id == 0 && !$user->authorise('unit.edit.description', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('unit.edit.description', 'com_ehealthportal.unit.' . (int) $id)) + || ($id == 0 && !$user->authorise('unit.edit.description', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('description', 'disabled', 'true'); @@ -264,19 +267,26 @@ class Ehealth_portalModelUnit extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/unit.js'; + return 'media/com_ehealthportal/js/unit.js'; } - + /** * Method to test whether a record can be deleted. * @@ -295,9 +305,9 @@ class Ehealth_portalModelUnit extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.unit.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.unit.' . (int) $record->id); } return false; } @@ -313,42 +323,42 @@ class Ehealth_portalModelUnit extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.unit.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.unit.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.unit.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.unit.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -356,19 +366,19 @@ class Ehealth_portalModelUnit extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -380,10 +390,10 @@ class Ehealth_portalModelUnit extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_unit')); + ->from($db->quoteName('#__ehealthportal_unit')); $db->setQuery($query); $max = $db->loadResult(); @@ -395,7 +405,7 @@ class Ehealth_portalModelUnit extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -410,16 +420,16 @@ class Ehealth_portalModelUnit extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.unit.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.unit.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.unit', $data); + $this->preprocessData('com_ehealthportal.unit', $data); } return $data; @@ -434,9 +444,9 @@ class Ehealth_portalModelUnit extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -452,7 +462,7 @@ class Ehealth_portalModelUnit extends JModelAdmin { return false; } - + return true; } @@ -472,10 +482,10 @@ class Ehealth_portalModelUnit extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -501,30 +511,30 @@ class Ehealth_portalModelUnit extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('unit'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('unit'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -561,8 +571,7 @@ class Ehealth_portalModelUnit extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -588,13 +597,13 @@ class Ehealth_portalModelUnit extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('unit'); + $this->canDo = EhealthportalHelper::getActions('unit'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('unit.batch')) { return false; } @@ -614,7 +623,7 @@ class Ehealth_portalModelUnit extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -627,7 +636,7 @@ class Ehealth_portalModelUnit extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -643,14 +652,14 @@ class Ehealth_portalModelUnit extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name); // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -662,7 +671,7 @@ class Ehealth_portalModelUnit extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -726,15 +735,15 @@ class Ehealth_portalModelUnit extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('unit'); + $this->canDo = EhealthportalHelper::getActions('unit'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('unit.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -751,7 +760,7 @@ class Ehealth_portalModelUnit extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -767,13 +776,13 @@ class Ehealth_portalModelUnit extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -817,7 +826,7 @@ class Ehealth_portalModelUnit extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -829,23 +838,38 @@ class Ehealth_portalModelUnit extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('unit', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "unit", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -878,27 +902,27 @@ class Ehealth_portalModelUnit extends JModelAdmin { if ($data['alias'] == null || empty($data['alias'])) { - if (JFactory::getConfig()->get('unicodeslugs') == 1) + if (Factory::getConfig()->get('unicodeslugs') == 1) { - $data['alias'] = JFilterOutput::stringURLUnicodeSlug($data['name']); + $data['alias'] = OutputFilter::stringURLUnicodeSlug($data['name']); } else { - $data['alias'] = JFilterOutput::stringURLSafe($data['name']); + $data['alias'] = OutputFilter::stringURLSafe($data['name']); } - $table = JTable::getInstance('unit', 'ehealth_portalTable'); + $table = clone $this->getTable(); if ($table->load(array('alias' => $data['alias'])) && ($table->id != $data['id'] || $data['id'] == 0)) { - $msg = JText::_('COM_EHEALTH_PORTAL_UNIT_SAVE_WARNING'); + $msg = Text::_('COM_EHEALTHPORTAL_UNIT_SAVE_WARNING'); } $data['alias'] = $this->_generateNewTitle($data['alias']); if (isset($msg)) { - JFactory::getApplication()->enqueueMessage($msg, 'warning'); + Factory::getApplication()->enqueueMessage($msg, 'warning'); } } } @@ -908,7 +932,7 @@ class Ehealth_portalModelUnit extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -916,14 +940,14 @@ class Ehealth_portalModelUnit extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -936,7 +960,6 @@ class Ehealth_portalModelUnit extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -963,10 +986,10 @@ class Ehealth_portalModelUnit extends JModelAdmin // Alter the title/s & alias $table = $this->getTable(); - while ($table->load(array('alias' => $alias))) + while ($table->load(['alias' => $alias])) { // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { foreach($title as $nr => &$_title) { @@ -981,7 +1004,7 @@ class Ehealth_portalModelUnit extends JModelAdmin $alias = StringHelper::increment($alias, 'dash'); } // Check if this is an array of titles - if (Ehealth_portalHelper::checkArray($title)) + if (UtilitiesArrayHelper::check($title)) { $title[] = $alias; return $title; diff --git a/admin/models/units.php b/admin/models/units.php index eb1220f..a42659e 100644 --- a/admin/models/units.php +++ b/admin/models/units.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage units.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Units Model + * Units List Model */ -class Ehealth_portalModelUnits extends JModelList +class EhealthportalModelUnits extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelUnits extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelUnits extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,34 +132,34 @@ class Ehealth_portalModelUnits extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); - + // return items return $items; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_unit', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_unit', 'a')); // Filter by published state $published = $this->getState('filter.published'); @@ -172,7 +181,7 @@ class Ehealth_portalModelUnits extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -180,7 +189,7 @@ class Ehealth_portalModelUnits extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -223,24 +232,24 @@ class Ehealth_portalModelUnits extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_unit table - $query->from($db->quoteName('#__ehealth_portal_unit', 'a')); + // From the ehealthportal_unit table + $query->from($db->quoteName('#__ehealthportal_unit', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -259,8 +268,10 @@ class Ehealth_portalModelUnits extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -277,7 +288,7 @@ class Ehealth_portalModelUnits extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -289,7 +300,7 @@ class Ehealth_portalModelUnits extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } @@ -307,10 +318,10 @@ class Ehealth_portalModelUnits extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_unit"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_unit"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -325,7 +336,7 @@ class Ehealth_portalModelUnits extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -340,13 +351,13 @@ class Ehealth_portalModelUnits extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -368,24 +379,26 @@ class Ehealth_portalModelUnits extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_unit')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_unit')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -400,8 +413,8 @@ class Ehealth_portalModelUnits extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_unit'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_unit'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/models/vmmc.php b/admin/models/vmmc.php index d4d7d73..1411f21 100644 --- a/admin/models/vmmc.php +++ b/admin/models/vmmc.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmc.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,24 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Filter\InputFilter; +use Joomla\CMS\Filter\OutputFilter; +use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; +use Joomla\CMS\UCM\UCMType; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; /** - * Ehealth_portal Vmmc Model + * Ehealthportal Vmmc Admin Model */ -class Ehealth_portalModelVmmc extends JModelAdmin +class EhealthportalModelVmmc extends AdminModel { /** * The tab layout fields array. @@ -67,7 +77,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin * @var string The prefix to use with controller messages. * @since 1.6 */ - protected $text_prefix = 'COM_EHEALTH_PORTAL'; + protected $text_prefix = 'COM_EHEALTHPORTAL'; /** * The type alias for this content type. @@ -75,7 +85,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin * @var string * @since 3.2 */ - public $typeAlias = 'com_ehealth_portal.vmmc'; + public $typeAlias = 'com_ehealthportal.vmmc'; /** * Returns a Table object, always creating it @@ -84,18 +94,18 @@ class Ehealth_portalModelVmmc extends JModelAdmin * @param string $prefix A prefix for the table class name. Optional. * @param array $config Configuration array for model. Optional. * - * @return JTable A database object + * @return Table A database object * * @since 1.6 */ - public function getTable($type = 'vmmc', $prefix = 'Ehealth_portalTable', $config = array()) + public function getTable($type = 'vmmc', $prefix = 'EhealthportalTable', $config = []) { // add table path for when model gets used from other component - $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealth_portal/tables'); + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_ehealthportal/tables'); // get instance of the table - return JTable::getInstance($type, $prefix, $config); + return Table::getInstance($type, $prefix, $config); } - + /** * Method to get a single record. * @@ -124,12 +134,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } - - if (!empty($item->id)) - { - $item->tags = new JHelperTags; - $item->tags->getTagIds($item->id, 'com_ehealth_portal.vmmc'); - } + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); } return $item; @@ -146,7 +151,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin * * @since 1.6 */ - public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform')) + public function getForm($data = [], $loadData = true, $options = array('control' => 'jform')) { // set load data option $options['load_data'] = $loadData; @@ -166,14 +171,14 @@ class Ehealth_portalModelVmmc extends JModelAdmin } // Get the form. - $form = $this->loadForm('com_ehealth_portal.vmmc', 'vmmc', $options, $clear, $xpath); + $form = $this->loadForm('com_ehealthportal.vmmc', 'vmmc', $options, $clear, $xpath); if (empty($form)) { return false; } - $jinput = JFactory::getApplication()->input; + $jinput = Factory::getApplication()->input; // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. if ($jinput->get('a_id')) @@ -186,12 +191,12 @@ class Ehealth_portalModelVmmc extends JModelAdmin $id = $jinput->get('id', 0, 'INT'); } - $user = JFactory::getUser(); + $user = Factory::getUser(); // Check for existing item. // Modify the form based on Edit State access controls. - if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealth_portal.vmmc.' . (int) $id)) - || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealth_portal'))) + if ($id != 0 && (!$user->authorise('core.edit.state', 'com_ehealthportal.vmmc.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.edit.state', 'com_ehealthportal'))) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); @@ -207,7 +212,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin $form->setValue('created_by', null, $user->id); } // Modify the form based on Edit Creaded By access controls. - if (!$user->authorise('core.edit.created_by', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created_by', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created_by', 'disabled', 'true'); @@ -217,7 +222,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin $form->setFieldAttribute('created_by', 'filter', 'unset'); } // Modify the form based on Edit Creaded Date access controls. - if (!$user->authorise('core.edit.created', 'com_ehealth_portal')) + if (!$user->authorise('core.edit.created', 'com_ehealthportal')) { // Disable fields for display. $form->setFieldAttribute('created', 'disabled', 'true'); @@ -241,19 +246,26 @@ class Ehealth_portalModelVmmc extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) + { + $form->setValue('guid', null, EhealthportalHelper::GUID()); + } + return $form; } /** * Method to get the script that have to be included on the form * - * @return string script files + * @return string script files */ public function getScript() { - return 'media/com_ehealth_portal/js/vmmc.js'; + return 'media/com_ehealthportal/js/vmmc.js'; } - + /** * Method to test whether a record can be deleted. * @@ -272,9 +284,9 @@ class Ehealth_portalModelVmmc extends JModelAdmin return; } - $user = JFactory::getUser(); + $user = Factory::getUser(); // The record has been set. Check the record permissions. - return $user->authorise('core.delete', 'com_ehealth_portal.vmmc.' . (int) $record->id); + return $user->authorise('core.delete', 'com_ehealthportal.vmmc.' . (int) $record->id); } return false; } @@ -290,42 +302,42 @@ class Ehealth_portalModelVmmc extends JModelAdmin */ protected function canEditState($record) { - $user = JFactory::getUser(); - $recordId = (!empty($record->id)) ? $record->id : 0; + $user = Factory::getUser(); + $recordId = $record->id ?? 0; if ($recordId) { // The record has been set. Check the record permissions. - $permission = $user->authorise('core.edit.state', 'com_ehealth_portal.vmmc.' . (int) $recordId); + $permission = $user->authorise('core.edit.state', 'com_ehealthportal.vmmc.' . (int) $recordId); if (!$permission && !is_null($permission)) { return false; } } - // In the absense of better information, revert to the component permissions. + // In the absence of better information, revert to the component permissions. return parent::canEditState($record); } - + /** * Method override to check if you can edit an existing record. * - * @param array $data An array of input data. - * @param string $key The name of the key for the primary key. + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. * - * @return boolean - * @since 2.5 + * @return boolean + * @since 2.5 */ - protected function allowEdit($data = array(), $key = 'id') + protected function allowEdit($data = [], $key = 'id') { // Check specific edit permission then general edit permission. - return JFactory::getUser()->authorise('core.edit', 'com_ehealth_portal.vmmc.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + return Factory::getUser()->authorise('core.edit', 'com_ehealthportal.vmmc.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); } - + /** * Prepare and sanitise the table data prior to saving. * - * @param JTable $table A JTable object. + * @param Table $table A Table object. * * @return void * @@ -333,19 +345,19 @@ class Ehealth_portalModelVmmc extends JModelAdmin */ protected function prepareTable($table) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - + $date = Factory::getDate(); + $user = Factory::getUser(); + if (isset($table->name)) { $table->name = htmlspecialchars_decode($table->name, ENT_QUOTES); } - + if (isset($table->alias) && empty($table->alias)) { $table->generateAlias(); } - + if (empty($table->id)) { $table->created = $date->toSql(); @@ -357,10 +369,10 @@ class Ehealth_portalModelVmmc extends JModelAdmin // Set ordering to the last item if not set if (empty($table->ordering)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select('MAX(ordering)') - ->from($db->quoteName('#__ehealth_portal_vmmc')); + ->from($db->quoteName('#__ehealthportal_vmmc')); $db->setQuery($query); $max = $db->loadResult(); @@ -372,7 +384,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin $table->modified = $date->toSql(); $table->modified_by = $user->id; } - + if (!empty($table->id)) { // Increment the items version number. @@ -387,16 +399,16 @@ class Ehealth_portalModelVmmc extends JModelAdmin * * @since 1.6 */ - protected function loadFormData() + protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_ehealth_portal.edit.vmmc.data', array()); + $data = Factory::getApplication()->getUserState('com_ehealthportal.edit.vmmc.data', []); if (empty($data)) { $data = $this->getItem(); // run the perprocess of the data - $this->preprocessData('com_ehealth_portal.vmmc', $data); + $this->preprocessData('com_ehealthportal.vmmc', $data); } return $data; @@ -418,7 +430,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (isset($data['not_required']) && Ehealth_portalHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && UtilitiesStringHelper::check($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); @@ -426,7 +438,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin foreach ($requiredFields as $requiredField) { // make sure there is a string value - if (Ehealth_portalHelper::checkString($requiredField)) + if (UtilitiesStringHelper::check($requiredField)) { // change to false $form->setFieldAttribute($requiredField, 'required', 'false'); @@ -447,9 +459,9 @@ class Ehealth_portalModelVmmc extends JModelAdmin */ protected function getUniqueFields() { - return false; + return array('guid'); } - + /** * Method to delete one or more records. * @@ -465,7 +477,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin { return false; } - + return true; } @@ -485,10 +497,10 @@ class Ehealth_portalModelVmmc extends JModelAdmin { return false; } - + return true; - } - + } + /** * Method to perform batch operations on an item or a set of items. * @@ -514,30 +526,30 @@ class Ehealth_portalModelVmmc extends JModelAdmin if (empty($pks)) { - $this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED')); + $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED')); return false; } $done = false; // Set some needed variables. - $this->user = JFactory::getUser(); - $this->table = $this->getTable(); - $this->tableClassName = get_class($this->table); - $this->contentType = new JUcmType; - $this->type = $this->contentType->getTypeByTable($this->tableClassName); - $this->canDo = Ehealth_portalHelper::getActions('vmmc'); - $this->batchSet = true; + $this->user = Factory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new UCMType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = EhealthportalHelper::getActions('vmmc'); + $this->batchSet = true; if (!$this->canDo->get('core.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } - + if ($this->type == false) { - $type = new JUcmType; + $type = new UCMType; $this->type = $type->getTypeByAlias($this->typeAlias); } @@ -574,8 +586,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin if (!$done) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); - + $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION')); return false; } @@ -601,13 +612,13 @@ class Ehealth_portalModelVmmc extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('vmmc'); + $this->canDo = EhealthportalHelper::getActions('vmmc'); } - if (!$this->canDo->get('core.create') || !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.create') && !$this->canDo->get('vmmc.batch')) { return false; } @@ -627,7 +638,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin $values['published'] = 0; } - $newIds = array(); + $newIds = []; // Parent exists so let's proceed while (!empty($pks)) { @@ -640,7 +651,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin if (!$this->user->authorise('core.edit', $contexts[$pk])) { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } @@ -656,13 +667,19 @@ class Ehealth_portalModelVmmc extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } + // Only for strings + if (EhealthportalHelper::checkString($this->table->patient) && !is_numeric($this->table->patient)) + { + $this->table->patient = $this->generateUnique('patient',$this->table->patient); + } + // insert all set values - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -674,7 +691,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin } // update all unique fields - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (EhealthportalHelper::checkArray($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -738,15 +755,15 @@ class Ehealth_portalModelVmmc extends JModelAdmin if (empty($this->batchSet)) { // Set some needed variables. - $this->user = JFactory::getUser(); + $this->user = Factory::getUser(); $this->table = $this->getTable(); $this->tableClassName = get_class($this->table); - $this->canDo = Ehealth_portalHelper::getActions('vmmc'); + $this->canDo = EhealthportalHelper::getActions('vmmc'); } - if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.batch')) + if (!$this->canDo->get('core.edit') && !$this->canDo->get('vmmc.batch')) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -763,7 +780,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin { if (!$this->user->authorise('core.edit', $contexts[$pk])) { - $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); return false; } @@ -779,13 +796,13 @@ class Ehealth_portalModelVmmc extends JModelAdmin else { // Not fatal error - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); continue; } } // insert all set values. - if (Ehealth_portalHelper::checkArray($values)) + if (EhealthportalHelper::checkArray($values)) { foreach ($values as $key => $value) { @@ -829,7 +846,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin return true; } - + /** * Method to save the form data. * @@ -841,23 +858,39 @@ class Ehealth_portalModelVmmc extends JModelAdmin */ public function save($data) { - $input = JFactory::getApplication()->input; - $filter = JFilterInput::getInstance(); - + $input = Factory::getApplication()->input; + $filter = InputFilter::getInstance(); + // set the metadata to the Item Data if (isset($data['metadata']) && isset($data['metadata']['author'])) { $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM'); - - $metadata = new JRegistry; + + $metadata = new Registry; $metadata->loadArray($data['metadata']); $data['metadata'] = (string) $metadata; } - + + + // Set the GUID if empty or not valid + if (empty($data['guid']) && $data['id'] > 0) + { + // get the existing one + $data['guid'] = (string) EhealthportalHelper::getVar('vmmc', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!EhealthportalHelper::validGUID($data['guid'], "vmmc", $data['id'])) + { + // must always be set + $data['guid'] = (string) EhealthportalHelper::GUID(); + } + + $data['patient'] = EhealthportalHelper::setUserGUID($data['patient']); + // Set the Params Items to data if (isset($data['params']) && is_array($data['params'])) { - $params = new JRegistry; + $params = new Registry; $params->loadArray($data['params']); $data['params'] = (string) $params; } @@ -867,7 +900,7 @@ class Ehealth_portalModelVmmc extends JModelAdmin { // Automatic handling of other unique fields $uniqueFields = $this->getUniqueFields(); - if (Ehealth_portalHelper::checkArray($uniqueFields)) + if (UtilitiesArrayHelper::check($uniqueFields)) { foreach ($uniqueFields as $uniqueField) { @@ -875,14 +908,14 @@ class Ehealth_portalModelVmmc extends JModelAdmin } } } - + if (parent::save($data)) { return true; } return false; } - + /** * Method to generate a unique value. * @@ -895,7 +928,6 @@ class Ehealth_portalModelVmmc extends JModelAdmin */ protected function generateUnique($field,$value) { - // set field value unique $table = $this->getTable(); @@ -906,4 +938,26 @@ class Ehealth_portalModelVmmc extends JModelAdmin return $value; } + + /** + * Method to change the title + * + * @param string $title The title. + * + * @return array Contains the modified title and alias. + * + */ + protected function _generateNewTitle($title) + { + + // Alter the title + $table = $this->getTable(); + + while ($table->load(['title' => $title])) + { + $title = StringHelper::increment($title); + } + + return $title; + } } diff --git a/admin/models/vmmcs.php b/admin/models/vmmcs.php index 43e85a0..415371b 100644 --- a/admin/models/vmmcs.php +++ b/admin/models/vmmcs.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmcs.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,17 +26,26 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\MVC\Model\ListModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Helper\TagsHelper; +use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; +use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Utilities\StringHelper; /** - * Vmmcs Model + * Vmmcs List Model */ -class Ehealth_portalModelVmmcs extends JModelList +class EhealthportalModelVmmcs extends ListModel { - public function __construct($config = array()) + public function __construct($config = []) { if (empty($config['filter_fields'])) - { + { $config['filter_fields'] = array( 'a.id','id', 'a.published','published', @@ -65,7 +74,7 @@ class Ehealth_portalModelVmmcs extends JModelList */ protected function populateState($ordering = null, $direction = null) { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); // Adjust the context to support modal layouts. if ($layout = $app->input->get('layout')) @@ -115,7 +124,7 @@ class Ehealth_portalModelVmmcs extends JModelList // List state information. parent::populateState($ordering, $direction); } - + /** * Method to get an array of data items. * @@ -123,14 +132,28 @@ class Ehealth_portalModelVmmcs extends JModelList */ public function getItems() { - // check in items + // Check in items $this->checkInNow(); // load parent items $items = parent::getItems(); + // Set values to display correctly. + if (UtilitiesArrayHelper::check($items)) + { + // Get the user object if not set. + if (!isset($user) || !ObjectHelper::check($user)) + { + $user = Factory::getUser(); + } + foreach ($items as $nr => &$item) + { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); + } + } + // set selection value to a translatable value - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { @@ -145,7 +168,7 @@ class Ehealth_portalModelVmmcs extends JModelList } } - + // return items return $items; } @@ -161,11 +184,11 @@ class Ehealth_portalModelVmmcs extends JModelList if ($name === 'are_you_circumcised') { $are_you_circumcisedArray = array( - 0 => 'COM_EHEALTH_PORTAL_VMMC_YES', - 1 => 'COM_EHEALTH_PORTAL_VMMC_NO' + 0 => 'COM_EHEALTHPORTAL_VMMC_YES', + 1 => 'COM_EHEALTHPORTAL_VMMC_NO' ); // Now check if value is found in this array - if (isset($are_you_circumcisedArray[$value]) && Ehealth_portalHelper::checkString($are_you_circumcisedArray[$value])) + if (isset($are_you_circumcisedArray[$value]) && StringHelper::check($are_you_circumcisedArray[$value])) { return $are_you_circumcisedArray[$value]; } @@ -174,11 +197,11 @@ class Ehealth_portalModelVmmcs extends JModelList if ($name === 'info_ben_vmcc') { $info_ben_vmccArray = array( - 0 => 'COM_EHEALTH_PORTAL_VMMC_YES', - 1 => 'COM_EHEALTH_PORTAL_VMMC_NO' + 0 => 'COM_EHEALTHPORTAL_VMMC_YES', + 1 => 'COM_EHEALTHPORTAL_VMMC_NO' ); // Now check if value is found in this array - if (isset($info_ben_vmccArray[$value]) && Ehealth_portalHelper::checkString($info_ben_vmccArray[$value])) + if (isset($info_ben_vmccArray[$value]) && StringHelper::check($info_ben_vmccArray[$value])) { return $info_ben_vmccArray[$value]; } @@ -187,11 +210,11 @@ class Ehealth_portalModelVmmcs extends JModelList if ($name === 'interested_in_vmmc') { $interested_in_vmmcArray = array( - 0 => 'COM_EHEALTH_PORTAL_VMMC_YES', - 1 => 'COM_EHEALTH_PORTAL_VMMC_NO' + 0 => 'COM_EHEALTHPORTAL_VMMC_YES', + 1 => 'COM_EHEALTHPORTAL_VMMC_NO' ); // Now check if value is found in this array - if (isset($interested_in_vmmcArray[$value]) && Ehealth_portalHelper::checkString($interested_in_vmmcArray[$value])) + if (isset($interested_in_vmmcArray[$value]) && StringHelper::check($interested_in_vmmcArray[$value])) { return $interested_in_vmmcArray[$value]; } @@ -200,40 +223,40 @@ class Ehealth_portalModelVmmcs extends JModelList if ($name === 'vmmc_gender') { $vmmc_genderArray = array( - 0 => 'COM_EHEALTH_PORTAL_VMMC_MALE', - 1 => 'COM_EHEALTH_PORTAL_VMMC_FEMALE' + 0 => 'COM_EHEALTHPORTAL_VMMC_MALE', + 1 => 'COM_EHEALTHPORTAL_VMMC_FEMALE' ); // Now check if value is found in this array - if (isset($vmmc_genderArray[$value]) && Ehealth_portalHelper::checkString($vmmc_genderArray[$value])) + if (isset($vmmc_genderArray[$value]) && StringHelper::check($vmmc_genderArray[$value])) { return $vmmc_genderArray[$value]; } } return $value; } - + /** * Method to build an SQL query to load the list data. * - * @return string An SQL query + * @return string An SQL query */ protected function getListQuery() { // Get the user object. - $user = JFactory::getUser(); + $user = Factory::getUser(); // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_item table - $query->from($db->quoteName('#__ehealth_portal_vmmc', 'a')); + // From the ehealthportal_item table + $query->from($db->quoteName('#__ehealthportal_vmmc', 'a')); - // From the ehealth_portal_referral table. + // From the ehealthportal_referral table. $query->select($db->quoteName('g.name','referral_name')); - $query->join('LEFT', $db->quoteName('#__ehealth_portal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); // Filter by published state $published = $this->getState('filter.published'); @@ -255,7 +278,7 @@ class Ehealth_portalModelVmmcs extends JModelList { $query->where('a.access = ' . (int) $_access); } - elseif (Ehealth_portalHelper::checkArray($_access)) + elseif (EhealthportalHelper::checkArray($_access)) { // Secure the array for the query $_access = ArrayHelper::toInteger($_access); @@ -263,7 +286,7 @@ class Ehealth_portalModelVmmcs extends JModelList $query->where('a.access IN (' . implode(',', $_access) . ')'); } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -296,7 +319,7 @@ class Ehealth_portalModelVmmcs extends JModelList $query->where('a.patient = ' . (int) $_patient); } } - elseif (Ehealth_portalHelper::checkString($_patient)) + elseif (EhealthportalHelper::checkString($_patient)) { $query->where('a.patient = ' . $db->quote($db->escape($_patient))); } @@ -313,11 +336,11 @@ class Ehealth_portalModelVmmcs extends JModelList $query->where('a.referral = ' . (int) $_referral); } } - elseif (Ehealth_portalHelper::checkString($_referral)) + elseif (EhealthportalHelper::checkString($_referral)) { $query->where('a.referral = ' . $db->quote($db->escape($_referral))); } - elseif (Ehealth_portalHelper::checkArray($_referral)) + elseif (EhealthportalHelper::checkArray($_referral)) { // Secure the array for the query $_referral = array_map( function ($val) use(&$db) { @@ -332,7 +355,7 @@ class Ehealth_portalModelVmmcs extends JModelList return (int) $val; } } - elseif (Ehealth_portalHelper::checkString($val)) + elseif (EhealthportalHelper::checkString($val)) { return $db->quote($db->escape($val)); } @@ -363,24 +386,24 @@ class Ehealth_portalModelVmmcs extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (($pks_size = Ehealth_portalHelper::checkArray($pks)) !== false || 'bulk' === $pks) + if (($pks_size = UtilitiesArrayHelper::check($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; // Get the user object if not set. - if (!isset($user) || !Ehealth_portalHelper::checkObject($user)) + if (!isset($user) || !ObjectHelper::check($user)) { - $user = JFactory::getUser(); + $user = Factory::getUser(); } // Create a new query object. - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); // Select some fields $query->select('a.*'); - // From the ehealth_portal_vmmc table - $query->from($db->quoteName('#__ehealth_portal_vmmc', 'a')); + // From the ehealthportal_vmmc table + $query->from($db->quoteName('#__ehealthportal_vmmc', 'a')); // The bulk export path if ('bulk' === $pks) { @@ -399,8 +422,18 @@ class Ehealth_portalModelVmmcs extends JModelList { $query->where('a.id IN (' . implode(',',$pks) . ')'); } + // Get global switch to activate text only export + $export_text_only = ComponentHelper::getParams('com_ehealthportal')->get('export_text_only', 0); + // Add these queries only if text only is required + if ($export_text_only) + { + + // From the ehealthportal_referral table. + $query->select($db->quoteName('g.name','referral')); + $query->join('LEFT', $db->quoteName('#__ehealthportal_referral', 'g') . ' ON (' . $db->quoteName('a.referral') . ' = ' . $db->quoteName('g.id') . ')'); + } // Implement View Level Access - if (!$user->authorise('core.options', 'com_ehealth_portal')) + if (!$user->authorise('core.options', 'com_ehealthportal')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); @@ -417,10 +450,11 @@ class Ehealth_portalModelVmmcs extends JModelList $items = $db->loadObjectList(); // Set values to display correctly. - if (Ehealth_portalHelper::checkArray($items)) + if (UtilitiesArrayHelper::check($items)) { foreach ($items as $nr => &$item) { + $item->patient = EhealthportalHelper::getGUIDID($item->patient, 'user_map'); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); @@ -429,10 +463,31 @@ class Ehealth_portalModelVmmcs extends JModelList } // Add headers to items array. $headers = $this->getExImPortHeaders(); - if (Ehealth_portalHelper::checkObject($headers)) + if (ObjectHelper::check($headers)) { array_unshift($items,$headers); } + // Add these translation only if text only is required + if ($export_text_only) + { + + // set selection value to a translatable value + if (UtilitiesArrayHelper::check($items)) + { + foreach ($items as $nr => &$item) + { + // convert are_you_circumcised + $item->are_you_circumcised = $this->selectionTranslation($item->are_you_circumcised, 'are_you_circumcised'); + // convert info_ben_vmcc + $item->info_ben_vmcc = $this->selectionTranslation($item->info_ben_vmcc, 'info_ben_vmcc'); + // convert interested_in_vmmc + $item->interested_in_vmmc = $this->selectionTranslation($item->interested_in_vmmc, 'interested_in_vmmc'); + // convert vmmc_gender + $item->vmmc_gender = $this->selectionTranslation($item->vmmc_gender, 'vmmc_gender'); + } + } + + } return $items; } } @@ -447,10 +502,10 @@ class Ehealth_portalModelVmmcs extends JModelList public function getExImPortHeaders() { // Get a db connection. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // get the columns - $columns = $db->getTableColumns("#__ehealth_portal_vmmc"); - if (Ehealth_portalHelper::checkArray($columns)) + $columns = $db->getTableColumns("#__ehealthportal_vmmc"); + if (UtilitiesArrayHelper::check($columns)) { // remove the headers you don't import/export. unset($columns['asset_id']); @@ -465,7 +520,7 @@ class Ehealth_portalModelVmmcs extends JModelList } return false; } - + /** * Method to get a store id based on model configuration state. * @@ -480,13 +535,13 @@ class Ehealth_portalModelVmmcs extends JModelList $id .= ':' . $this->getState('filter.published'); // Check if the value is an array $_access = $this->getState('filter.access'); - if (Ehealth_portalHelper::checkArray($_access)) + if (UtilitiesArrayHelper::check($_access)) { $id .= ':' . implode(':', $_access); } // Check if this is only an number or string elseif (is_numeric($_access) - || Ehealth_portalHelper::checkString($_access)) + || StringHelper::check($_access)) { $id .= ':' . $_access; } @@ -496,13 +551,13 @@ class Ehealth_portalModelVmmcs extends JModelList $id .= ':' . $this->getState('filter.patient'); // Check if the value is an array $_referral = $this->getState('filter.referral'); - if (Ehealth_portalHelper::checkArray($_referral)) + if (UtilitiesArrayHelper::check($_referral)) { $id .= ':' . implode(':', $_referral); } // Check if this is only an number or string elseif (is_numeric($_referral) - || Ehealth_portalHelper::checkString($_referral)) + || StringHelper::check($_referral)) { $id .= ':' . $_referral; } @@ -519,24 +574,26 @@ class Ehealth_portalModelVmmcs extends JModelList protected function checkInNow() { // Get set check in time - $time = JComponentHelper::getParams('com_ehealth_portal')->get('check_in'); + $time = ComponentHelper::getParams('com_ehealthportal')->get('check_in'); if ($time) { // Get a db connection. - $db = JFactory::getDbo(); - // reset query + $db = Factory::getDbo(); + // Reset query. $query = $db->getQuery(true); $query->select('*'); - $query->from($db->quoteName('#__ehealth_portal_vmmc')); - $db->setQuery($query); + $query->from($db->quoteName('#__ehealthportal_vmmc')); + // Only select items that are checked out. + $query->where($db->quoteName('checked_out') . '!=0'); + $db->setQuery($query, 0, 1); $db->execute(); if ($db->getNumRows()) { - // Get Yesterdays date - $date = JFactory::getDate()->modify($time)->toSql(); - // reset query + // Get Yesterdays date. + $date = Factory::getDate()->modify($time)->toSql(); + // Reset query. $query = $db->getQuery(true); // Fields to update. @@ -551,8 +608,8 @@ class Ehealth_portalModelVmmcs extends JModelList $db->quoteName('checked_out_time') . '<\''.$date.'\'' ); - // Check table - $query->update($db->quoteName('#__ehealth_portal_vmmc'))->set($fields)->where($conditions); + // Check table. + $query->update($db->quoteName('#__ehealthportal_vmmc'))->set($fields)->where($conditions); $db->setQuery($query); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 11b57f6..9c7fca0 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1,13 +1,14 @@ -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_payment` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `guid` VARCHAR(36) NOT NULL DEFAULT '', `nonpay_reason` INT(11) NOT NULL DEFAULT 0, - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `payment_amount` VARCHAR(100) NOT NULL DEFAULT '', `payment_category` VARCHAR(255) NOT NULL DEFAULT '', `payment_type` INT(11) NOT NULL DEFAULT 0, `receipt_no` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -20,6 +21,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -27,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_general_medical_check_up` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_general_medical_check_up` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `bmi` FLOAT(7) NULL DEFAULT 0, @@ -39,17 +42,18 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_general_medical_check_up` ( `complaint` MEDIUMTEXT NOT NULL, `diagnosis` INT(11) NOT NULL DEFAULT 0, `dispensing` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `height` FLOAT(7) NOT NULL DEFAULT 0, `investigations` MEDIUMTEXT NOT NULL, `notes` MEDIUMTEXT NOT NULL, - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `pulse` INT(7) NOT NULL DEFAULT 0, `reason` MEDIUMTEXT NOT NULL, `referral` INT(11) NOT NULL DEFAULT 0, `temp_one` FLOAT(7) NOT NULL DEFAULT 0, `temp_two` FLOAT(7) NOT NULL DEFAULT 0, `weight` FLOAT(7) NOT NULL DEFAULT 0, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -62,6 +66,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_general_medical_check_up` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -69,7 +75,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_general_medical_check_up` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_antenatal_care` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_antenatal_care` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `caesarean_sections` INT(7) NOT NULL DEFAULT 0, @@ -78,14 +84,15 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_antenatal_care` ( `foetal_lie` INT(11) NOT NULL DEFAULT 0, `foetal_movements` MEDIUMTEXT NOT NULL, `foetal_presentation` INT(11) NOT NULL DEFAULT 0, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `last_menstrual_period` DATE NOT NULL DEFAULT '0000-00-00', `live_births` INT(7) NOT NULL DEFAULT 0, `miscarriages` INT(7) NOT NULL DEFAULT 0, `normal_births` INT(7) NOT NULL DEFAULT 0, - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `pregnancies_excl` INT(7) NOT NULL DEFAULT 0, `still_births` INT(7) NOT NULL DEFAULT 0, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -98,6 +105,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_antenatal_care` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -105,17 +114,16 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_antenatal_care` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_immunisation` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `administration_part` INT(11) NOT NULL DEFAULT 0, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `immunisation` TEXT NOT NULL, `immunisation_up_to_date` VARCHAR(255) NOT NULL DEFAULT '', - `immunisation_vaccine_type` INT(11) NOT NULL DEFAULT 0, - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, `referral` INT(11) NOT NULL DEFAULT 0, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -128,6 +136,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -135,18 +145,19 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_vmmc` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_vmmc` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `are_you_circumcised` VARCHAR(255) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', `info_ben_vmcc` VARCHAR(255) NOT NULL DEFAULT '', `interested_in_vmmc` VARCHAR(255) NOT NULL DEFAULT '', `partner_circumcised` VARCHAR(255) NOT NULL DEFAULT '', - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, `referral` INT(11) NOT NULL DEFAULT 0, `vmmc_gender` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -159,6 +170,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_vmmc` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -166,10 +179,11 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_vmmc` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_prostate_and_testicular_cancer` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_prostate_and_testicular_cancer` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `patient` INT(11) NOT NULL DEFAULT 0, + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `patient` VARCHAR(36) NOT NULL DEFAULT '', `ptc_age` VARCHAR(255) NOT NULL DEFAULT '', `ptc_diet` VARCHAR(255) NOT NULL DEFAULT '', `ptc_fam_history` VARCHAR(255) NOT NULL DEFAULT '', @@ -186,7 +200,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_prostate_and_testicular_cancer` ( `txt_ptc_phy_activity` MEDIUMTEXT NOT NULL, `txt_ptc_urinate` MEDIUMTEXT NOT NULL, `txt_ptc_urine_freq` MEDIUMTEXT NOT NULL, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -199,6 +213,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_prostate_and_testicular_cancer` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -206,14 +222,15 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_prostate_and_testicular_cancer` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_tuberculosis` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_tuberculosis` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `blood_streaked_sputum` VARCHAR(255) NOT NULL DEFAULT '', `date_of_treatment` DATE NOT NULL DEFAULT '0000-00-00', `diagnosed_with_disease` VARCHAR(255) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', `pain_in_chest` VARCHAR(255) NOT NULL DEFAULT '', - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `persistent_cough` VARCHAR(255) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, `recurring_night_sweats` VARCHAR(255) NOT NULL DEFAULT '', @@ -231,7 +248,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_tuberculosis` ( `treating_dhc` VARCHAR(255) NOT NULL DEFAULT '', `unusual_tiredness` VARCHAR(255) NOT NULL DEFAULT '', `weight_loss_wdieting` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -244,6 +261,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_tuberculosis` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -251,21 +270,22 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_tuberculosis` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_hiv_counseling_and_testing` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_hiv_counseling_and_testing` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `counseling_type` VARCHAR(255) NOT NULL DEFAULT '', `eqa` VARCHAR(255) NOT NULL DEFAULT '', `final_test_result` VARCHAR(255) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', `last_test_date` VARCHAR(255) NOT NULL DEFAULT '', - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `prev_test_result` VARCHAR(255) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, `referral` INT(11) NOT NULL DEFAULT 0, `test_result_one` VARCHAR(255) NOT NULL DEFAULT '', `test_result_two` VARCHAR(255) NOT NULL DEFAULT '', `testing_reason` INT(11) NOT NULL DEFAULT 0, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -278,6 +298,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_hiv_counseling_and_testing` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -285,12 +307,13 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_hiv_counseling_and_testing` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_family_planning` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_family_planning` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `diagnosis` INT(11) NOT NULL DEFAULT 0, - `patient` INT(11) NOT NULL DEFAULT 0, - `params` text NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `patient` VARCHAR(36) NOT NULL DEFAULT '', + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -303,6 +326,9 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_family_planning` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_diagnosis` (`diagnosis`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -310,13 +336,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_family_planning` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_health_education` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_health_education` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `education_type` VARCHAR(100) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', `health_education_topic` INT(11) NOT NULL DEFAULT 0, - `patient` INT(11) NOT NULL DEFAULT 0, - `params` text NOT NULL, + `patient` VARCHAR(36) NOT NULL DEFAULT '', + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -329,6 +356,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_health_education` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -336,7 +365,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_health_education` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_cervical_cancer` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_cervical_cancer` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `cc_periods` VARCHAR(255) NOT NULL DEFAULT '', @@ -347,8 +376,9 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_cervical_cancer` ( `cc_smoking` VARCHAR(255) NOT NULL DEFAULT '', `cc_v_discharge` VARCHAR(255) NOT NULL DEFAULT '', `cc_viginal_bleeding` VARCHAR(255) NOT NULL DEFAULT '', + `guid` VARCHAR(36) NOT NULL DEFAULT '', `pap_smear_collection` VARCHAR(255) NOT NULL DEFAULT '', - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, `referral` INT(11) NOT NULL DEFAULT 0, `txt_cc_periods` MEDIUMTEXT NOT NULL, @@ -357,7 +387,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_cervical_cancer` ( `txt_cc_smoking` MEDIUMTEXT NOT NULL, `txt_cc_v_discharge` MEDIUMTEXT NOT NULL, `txt_cc_viginal_bleeding` MEDIUMTEXT NOT NULL, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -370,6 +400,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_cervical_cancer` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -377,7 +409,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_cervical_cancer` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_breast_cancer` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_breast_cancer` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `bc_abnormal_skin` VARCHAR(255) NOT NULL DEFAULT '', @@ -395,7 +427,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_breast_cancer` ( `bc_preg_freq` INT(7) NOT NULL DEFAULT 0, `bc_race` VARCHAR(255) NOT NULL DEFAULT '', `bc_reg_exercise` VARCHAR(255) NOT NULL DEFAULT '', - `patient` INT(11) NOT NULL DEFAULT 0, + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `patient` VARCHAR(36) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, `referral` INT(11) NOT NULL DEFAULT 0, `txt_bc_abnormal_skin` MEDIUMTEXT NOT NULL, @@ -404,7 +437,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_breast_cancer` ( `txt_bc_inward_nipple` MEDIUMTEXT NOT NULL, `txt_bc_lump_near_breast` MEDIUMTEXT NOT NULL, `txt_bc_nipple_discharge` MEDIUMTEXT NOT NULL, - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -417,6 +450,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_breast_cancer` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -424,18 +459,19 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_breast_cancer` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_test` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_test` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `cholesterol_reading` INT(7) NOT NULL DEFAULT 0, `glucose_first_reading` INT(7) NOT NULL DEFAULT 0, `glucose_second_reading` INT(7) NOT NULL DEFAULT 0, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `haemoglobin_reading` INT(7) NOT NULL DEFAULT 0, `hepatitis_first_reading` VARCHAR(255) NOT NULL DEFAULT '', `hepatitis_second_reading` VARCHAR(255) NOT NULL DEFAULT '', `malaria_first_reading` VARCHAR(255) NOT NULL DEFAULT '', `malaria_second_reading` VARCHAR(255) NOT NULL DEFAULT '', - `patient` INT(11) NOT NULL DEFAULT 0, + `patient` VARCHAR(36) NOT NULL DEFAULT '', `pregnancy_first_reading` VARCHAR(255) NOT NULL DEFAULT '', `pregnancy_second_reading` VARCHAR(255) NOT NULL DEFAULT '', `reason` MEDIUMTEXT NOT NULL, @@ -443,7 +479,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_test` ( `syphilis_first_reading` VARCHAR(255) NOT NULL DEFAULT '', `syphilis_second_reading` VARCHAR(255) NOT NULL DEFAULT '', `urine_test_result` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -456,6 +492,8 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_test` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_patient` (`patient`), + KEY `idx_guid` (`guid`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), @@ -463,14 +501,45 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_test` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation_vaccine_type` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_foetal_lie` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `alias` CHAR(64) NOT NULL DEFAULT '', + `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `params` text NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), + KEY `idx_alias` (`alias`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + +CREATE TABLE IF NOT EXISTS `#__ehealthportal_immunisation_vaccine_type` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `administration_part` INT(11) NOT NULL DEFAULT 0, `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -484,6 +553,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation_vaccine_type` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -492,13 +562,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation_vaccine_type` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_presentation` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_foetal_engagement` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -512,6 +583,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_presentation` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -520,13 +592,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_presentation` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_lie` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_foetal_presentation` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -540,6 +613,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_lie` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -548,13 +622,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_lie` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_counseling_type` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_testing_reason` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -568,6 +643,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_counseling_type` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -576,13 +652,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_counseling_type` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_engagement` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_counseling_type` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -596,6 +673,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_engagement` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -604,13 +682,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_foetal_engagement` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_health_education_topic` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_health_education_topic` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -624,6 +703,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_health_education_topic` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -632,13 +712,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_health_education_topic` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_testing_reason` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_immunisation_type` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -652,6 +733,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_testing_reason` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -660,42 +742,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_testing_reason` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_clinic` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `alias` CHAR(64) NOT NULL DEFAULT '', - `clinic_name` VARCHAR(255) NOT NULL DEFAULT '', - `clinic_type` VARCHAR(255) NOT NULL DEFAULT '', - `description` TEXT NOT NULL, - `params` text NOT NULL, - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `access` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_clinic_name` (`clinic_name`), - KEY `idx_alias` (`alias`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; - -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation_type` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_strength` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -709,6 +763,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation_type` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -717,13 +772,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_immunisation_type` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_unit` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_referral` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -737,6 +793,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_unit` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -745,13 +802,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_unit` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_referral` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_planning_type` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -765,6 +823,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_referral` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -773,13 +832,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_referral` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_planning_type` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_diagnosis_type` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -793,6 +853,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_planning_type` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -801,13 +862,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_planning_type` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_diagnosis_type` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_nonpay_reason` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -821,6 +883,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_diagnosis_type` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -829,13 +892,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_diagnosis_type` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_nonpay_reason` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_medication` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -849,6 +913,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_nonpay_reason` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -857,13 +922,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_nonpay_reason` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_medication` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_payment_type` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -877,6 +943,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_medication` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -885,13 +952,14 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_medication` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment_amount` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_administration_part` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -905,6 +973,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment_amount` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -913,98 +982,15 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment_amount` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_administration_part` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `alias` CHAR(64) NOT NULL DEFAULT '', - `description` TEXT NOT NULL, - `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `access` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_name` (`name`), - KEY `idx_alias` (`alias`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; - -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_payment_type` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `alias` CHAR(64) NOT NULL DEFAULT '', - `description` TEXT NOT NULL, - `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `access` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_name` (`name`), - KEY `idx_alias` (`alias`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; - -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_strength` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `alias` CHAR(64) NOT NULL DEFAULT '', - `description` TEXT NOT NULL, - `name` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `access` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_name` (`name`), - KEY `idx_alias` (`alias`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; - -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_site` ( +CREATE TABLE IF NOT EXISTS `#__ehealthportal_site` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `alias` CHAR(64) NOT NULL DEFAULT '', `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', `site_name` VARCHAR(255) NOT NULL DEFAULT '', `site_region` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, + `params` text NULL, `published` TINYINT(3) NOT NULL DEFAULT 1, `created_by` INT(10) unsigned NOT NULL DEFAULT 0, `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, @@ -1018,6 +1004,7 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_site` ( `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_site_name` (`site_name`), + KEY `idx_guid` (`guid`), KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), @@ -1026,4 +1013,71 @@ CREATE TABLE IF NOT EXISTS `#__ehealth_portal_site` ( KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +CREATE TABLE IF NOT EXISTS `#__ehealthportal_unit` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `alias` CHAR(64) NOT NULL DEFAULT '', + `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `params` text NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_guid` (`guid`), + KEY `idx_alias` (`alias`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + +CREATE TABLE IF NOT EXISTS `#__ehealthportal_clinic` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `alias` CHAR(64) NOT NULL DEFAULT '', + `clinic_name` VARCHAR(255) NOT NULL DEFAULT '', + `clinic_type` VARCHAR(255) NOT NULL DEFAULT '', + `description` TEXT NOT NULL, + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `params` text NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_clinic_name` (`clinic_name`), + KEY `idx_guid` (`guid`), + KEY `idx_alias` (`alias`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) +) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + +CREATE TABLE IF NOT EXISTS `#__ehealthportal_user_map` ( + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `user` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql index b62de6f..de55941 100644 --- a/admin/sql/uninstall.mysql.utf8.sql +++ b/admin/sql/uninstall.mysql.utf8.sql @@ -1,34 +1,33 @@ -DROP TABLE IF EXISTS `#__ehealth_portal_payment`; -DROP TABLE IF EXISTS `#__ehealth_portal_general_medical_check_up`; -DROP TABLE IF EXISTS `#__ehealth_portal_antenatal_care`; -DROP TABLE IF EXISTS `#__ehealth_portal_immunisation`; -DROP TABLE IF EXISTS `#__ehealth_portal_vmmc`; -DROP TABLE IF EXISTS `#__ehealth_portal_prostate_and_testicular_cancer`; -DROP TABLE IF EXISTS `#__ehealth_portal_tuberculosis`; -DROP TABLE IF EXISTS `#__ehealth_portal_hiv_counseling_and_testing`; -DROP TABLE IF EXISTS `#__ehealth_portal_family_planning`; -DROP TABLE IF EXISTS `#__ehealth_portal_health_education`; -DROP TABLE IF EXISTS `#__ehealth_portal_cervical_cancer`; -DROP TABLE IF EXISTS `#__ehealth_portal_breast_cancer`; -DROP TABLE IF EXISTS `#__ehealth_portal_test`; -DROP TABLE IF EXISTS `#__ehealth_portal_immunisation_vaccine_type`; -DROP TABLE IF EXISTS `#__ehealth_portal_foetal_presentation`; -DROP TABLE IF EXISTS `#__ehealth_portal_foetal_lie`; -DROP TABLE IF EXISTS `#__ehealth_portal_counseling_type`; -DROP TABLE IF EXISTS `#__ehealth_portal_foetal_engagement`; -DROP TABLE IF EXISTS `#__ehealth_portal_health_education_topic`; -DROP TABLE IF EXISTS `#__ehealth_portal_testing_reason`; -DROP TABLE IF EXISTS `#__ehealth_portal_clinic`; -DROP TABLE IF EXISTS `#__ehealth_portal_immunisation_type`; -DROP TABLE IF EXISTS `#__ehealth_portal_unit`; -DROP TABLE IF EXISTS `#__ehealth_portal_referral`; -DROP TABLE IF EXISTS `#__ehealth_portal_planning_type`; -DROP TABLE IF EXISTS `#__ehealth_portal_diagnosis_type`; -DROP TABLE IF EXISTS `#__ehealth_portal_nonpay_reason`; -DROP TABLE IF EXISTS `#__ehealth_portal_medication`; -DROP TABLE IF EXISTS `#__ehealth_portal_payment_amount`; -DROP TABLE IF EXISTS `#__ehealth_portal_administration_part`; -DROP TABLE IF EXISTS `#__ehealth_portal_payment_type`; -DROP TABLE IF EXISTS `#__ehealth_portal_strength`; -DROP TABLE IF EXISTS `#__ehealth_portal_site`; +DROP TABLE IF EXISTS `#__ehealthportal_payment`; +DROP TABLE IF EXISTS `#__ehealthportal_general_medical_check_up`; +DROP TABLE IF EXISTS `#__ehealthportal_antenatal_care`; +DROP TABLE IF EXISTS `#__ehealthportal_immunisation`; +DROP TABLE IF EXISTS `#__ehealthportal_vmmc`; +DROP TABLE IF EXISTS `#__ehealthportal_prostate_and_testicular_cancer`; +DROP TABLE IF EXISTS `#__ehealthportal_tuberculosis`; +DROP TABLE IF EXISTS `#__ehealthportal_hiv_counseling_and_testing`; +DROP TABLE IF EXISTS `#__ehealthportal_family_planning`; +DROP TABLE IF EXISTS `#__ehealthportal_health_education`; +DROP TABLE IF EXISTS `#__ehealthportal_cervical_cancer`; +DROP TABLE IF EXISTS `#__ehealthportal_breast_cancer`; +DROP TABLE IF EXISTS `#__ehealthportal_test`; +DROP TABLE IF EXISTS `#__ehealthportal_foetal_lie`; +DROP TABLE IF EXISTS `#__ehealthportal_immunisation_vaccine_type`; +DROP TABLE IF EXISTS `#__ehealthportal_foetal_engagement`; +DROP TABLE IF EXISTS `#__ehealthportal_foetal_presentation`; +DROP TABLE IF EXISTS `#__ehealthportal_testing_reason`; +DROP TABLE IF EXISTS `#__ehealthportal_counseling_type`; +DROP TABLE IF EXISTS `#__ehealthportal_health_education_topic`; +DROP TABLE IF EXISTS `#__ehealthportal_immunisation_type`; +DROP TABLE IF EXISTS `#__ehealthportal_strength`; +DROP TABLE IF EXISTS `#__ehealthportal_referral`; +DROP TABLE IF EXISTS `#__ehealthportal_planning_type`; +DROP TABLE IF EXISTS `#__ehealthportal_diagnosis_type`; +DROP TABLE IF EXISTS `#__ehealthportal_nonpay_reason`; +DROP TABLE IF EXISTS `#__ehealthportal_medication`; +DROP TABLE IF EXISTS `#__ehealthportal_payment_type`; +DROP TABLE IF EXISTS `#__ehealthportal_administration_part`; +DROP TABLE IF EXISTS `#__ehealthportal_site`; +DROP TABLE IF EXISTS `#__ehealthportal_unit`; +DROP TABLE IF EXISTS `#__ehealthportal_clinic`; diff --git a/admin/sql/updates/mysql/1.0.3.sql b/admin/sql/updates/mysql/1.0.3.sql index 13e0f51..fd65a9a 100644 --- a/admin/sql/updates/mysql/1.0.3.sql +++ b/admin/sql/updates/mysql/1.0.3.sql @@ -1,34 +1,34 @@ -CREATE TABLE IF NOT EXISTS `#__ehealth_portal_look` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', - `add` TINYINT(1) NOT NULL DEFAULT 0, - `alias` CHAR(64) NOT NULL DEFAULT '', - `dateofbirth` DATE NOT NULL DEFAULT '0000-00-00', - `description` TEXT NOT NULL, - `email` VARCHAR(255) NOT NULL DEFAULT '', - `image` VARCHAR(255) NOT NULL DEFAULT '', - `mobile_phone` VARCHAR(64) NOT NULL DEFAULT '', - `name` VARCHAR(255) NOT NULL DEFAULT '', - `website` VARCHAR(255) NOT NULL DEFAULT '', - `params` text NOT NULL, - `published` TINYINT(3) NOT NULL DEFAULT 1, - `created_by` INT(10) unsigned NOT NULL DEFAULT 0, - `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) unsigned NOT NULL DEFAULT 0, - `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - `version` INT(10) unsigned NOT NULL DEFAULT 1, - `hits` INT(10) unsigned NOT NULL DEFAULT 0, - `access` INT(10) unsigned NOT NULL DEFAULT 0, - `ordering` INT(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - KEY `idx_name` (`name`), - KEY `idx_add` (`add`), - KEY `idx_alias` (`alias`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`) +CREATE TABLE IF NOT EXISTS `#__ehealth_portal_look` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', + `add` TINYINT(1) NOT NULL DEFAULT 0, + `alias` CHAR(64) NOT NULL DEFAULT '', + `dateofbirth` DATE NOT NULL DEFAULT '0000-00-00', + `description` TEXT NOT NULL, + `email` VARCHAR(255) NOT NULL DEFAULT '', + `image` VARCHAR(255) NOT NULL DEFAULT '', + `mobile_phone` VARCHAR(64) NOT NULL DEFAULT '', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `website` VARCHAR(255) NOT NULL DEFAULT '', + `params` text NOT NULL, + `published` TINYINT(3) NOT NULL DEFAULT 1, + `created_by` INT(10) unsigned NOT NULL DEFAULT 0, + `modified_by` INT(10) unsigned NOT NULL DEFAULT 0, + `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `checked_out` int(11) unsigned NOT NULL DEFAULT 0, + `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `version` INT(10) unsigned NOT NULL DEFAULT 1, + `hits` INT(10) unsigned NOT NULL DEFAULT 0, + `access` INT(10) unsigned NOT NULL DEFAULT 0, + `ordering` INT(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_add` (`add`), + KEY `idx_alias` (`alias`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 DEFAULT COLLATE=utf8_general_ci; diff --git a/admin/sql/updates/mysql/1.0.4.sql b/admin/sql/updates/mysql/1.0.4.sql index a331775..8b7a245 100644 --- a/admin/sql/updates/mysql/1.0.4.sql +++ b/admin/sql/updates/mysql/1.0.4.sql @@ -1,3 +1,3 @@ -ALTER TABLE `#__ehealth_portal_immunisation` ADD `administration_part` INT(11) NOT NULL DEFAULT 0 AFTER `asset_id`; - +ALTER TABLE `#__ehealth_portal_immunisation` ADD `administration_part` INT(11) NOT NULL DEFAULT 0 AFTER `asset_id`; + ALTER TABLE `#__ehealth_portal_immunisation` ADD `immunisation_vaccine_type` INT(11) NOT NULL DEFAULT 0 AFTER `immunisation_up_to_date`; diff --git a/admin/sql/updates/mysql/1.0.5.sql b/admin/sql/updates/mysql/1.0.5.sql new file mode 100644 index 0000000..b2d4691 --- /dev/null +++ b/admin/sql/updates/mysql/1.0.5.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS `#__ehealth_portal_user_map` ( + `guid` VARCHAR(36) NOT NULL DEFAULT '', + `id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; diff --git a/admin/sql/updates/mysql/1.0.6.sql b/admin/sql/updates/mysql/1.0.6.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/admin/sql/updates/mysql/1.0.6.sql @@ -0,0 +1 @@ + diff --git a/admin/tables/administration_part.php b/admin/tables/administration_part.php index 4b93f67..08b9795 100644 --- a/admin/tables/administration_part.php +++ b/admin/tables/administration_part.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage administration_part.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Administration_parts Table class */ -class Ehealth_portalTableAdministration_part extends JTable +class EhealthportalTableAdministration_part extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableAdministration_part extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_administration_part', 'id', $db); + parent::__construct('#__ehealthportal_administration_part', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.administration_part')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.administration_part')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Administration_part table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableAdministration_part extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('administration_part', 'Ehealth_portalTable'); + $table = Table::getInstance('administration_part', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_ADMINISTRATION_PART_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_ADMINISTRATION_PART_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_ADMINISTRATION_PART_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableAdministration_part extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('administration_part', 'ehealth_portalTable'); + + $table = Table::getInstance('administration_part', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableAdministration_part extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableAdministration_part extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.administration_part.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.administration_part.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableAdministration_part extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableAdministration_part extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableAdministration_part extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableAdministration_part extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableAdministration_part extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableAdministration_part extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.administration_part.'.(int) $this->$k; + return 'com_ehealthportal.administration_part.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableAdministration_part extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableAdministration_part extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/antenatal_care.php b/admin/tables/antenatal_care.php index 2c706b9..dd6acd6 100644 --- a/admin/tables/antenatal_care.php +++ b/admin/tables/antenatal_care.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage antenatal_care.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Antenatal_cares Table class */ -class Ehealth_portalTableAntenatal_care extends JTable +class EhealthportalTableAntenatal_care extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableAntenatal_care extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_antenatal_care', 'id', $db); + parent::__construct('#__ehealthportal_antenatal_care', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.antenatal_care')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.antenatal_care')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Antenatal_care table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableAntenatal_care extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('antenatal_care', 'Ehealth_portalTable'); + $table = Table::getInstance('antenatal_care', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_ANTENATAL_CARE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_ANTENATAL_CARE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_ANTENATAL_CARE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableAntenatal_care extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('antenatal_care', 'ehealth_portalTable'); + + $table = Table::getInstance('antenatal_care', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableAntenatal_care extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableAntenatal_care extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.antenatal_care.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.antenatal_care.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableAntenatal_care extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableAntenatal_care extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableAntenatal_care extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableAntenatal_care extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableAntenatal_care extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableAntenatal_care extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.antenatal_care.'.(int) $this->$k; + return 'com_ehealthportal.antenatal_care.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableAntenatal_care extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/breast_cancer.php b/admin/tables/breast_cancer.php index d6c90b4..b66cd19 100644 --- a/admin/tables/breast_cancer.php +++ b/admin/tables/breast_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage breast_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Breast_cancers Table class */ -class Ehealth_portalTableBreast_cancer extends JTable +class EhealthportalTableBreast_cancer extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableBreast_cancer extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_breast_cancer', 'id', $db); + parent::__construct('#__ehealthportal_breast_cancer', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.breast_cancer')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.breast_cancer')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Breast_cancer table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableBreast_cancer extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('breast_cancer', 'Ehealth_portalTable'); + $table = Table::getInstance('breast_cancer', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_BREAST_CANCER_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_BREAST_CANCER_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_BREAST_CANCER_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableBreast_cancer extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('breast_cancer', 'ehealth_portalTable'); + + $table = Table::getInstance('breast_cancer', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableBreast_cancer extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableBreast_cancer extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.breast_cancer.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.breast_cancer.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableBreast_cancer extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableBreast_cancer extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableBreast_cancer extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableBreast_cancer extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableBreast_cancer extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableBreast_cancer extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.breast_cancer.'.(int) $this->$k; + return 'com_ehealthportal.breast_cancer.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableBreast_cancer extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/cervical_cancer.php b/admin/tables/cervical_cancer.php index 5b69046..f94439d 100644 --- a/admin/tables/cervical_cancer.php +++ b/admin/tables/cervical_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage cervical_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Cervical_cancers Table class */ -class Ehealth_portalTableCervical_cancer extends JTable +class EhealthportalTableCervical_cancer extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableCervical_cancer extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_cervical_cancer', 'id', $db); + parent::__construct('#__ehealthportal_cervical_cancer', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.cervical_cancer')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.cervical_cancer')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Cervical_cancer table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableCervical_cancer extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('cervical_cancer', 'Ehealth_portalTable'); + $table = Table::getInstance('cervical_cancer', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_CERVICAL_CANCER_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_CERVICAL_CANCER_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_CERVICAL_CANCER_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableCervical_cancer extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('cervical_cancer', 'ehealth_portalTable'); + + $table = Table::getInstance('cervical_cancer', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableCervical_cancer extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableCervical_cancer extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.cervical_cancer.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.cervical_cancer.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableCervical_cancer extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableCervical_cancer extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableCervical_cancer extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableCervical_cancer extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableCervical_cancer extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableCervical_cancer extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.cervical_cancer.'.(int) $this->$k; + return 'com_ehealthportal.cervical_cancer.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableCervical_cancer extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/clinic.php b/admin/tables/clinic.php index ad08ed6..421866c 100644 --- a/admin/tables/clinic.php +++ b/admin/tables/clinic.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage clinic.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Clinics Table class */ -class Ehealth_portalTableClinic extends JTable +class EhealthportalTableClinic extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableClinic extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_clinic', 'id', $db); + parent::__construct('#__ehealthportal_clinic', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.clinic')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.clinic')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Clinic table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableClinic extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('clinic', 'Ehealth_portalTable'); + $table = Table::getInstance('clinic', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_CLINIC_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_CLINIC_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_CLINIC_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableClinic extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('clinic', 'ehealth_portalTable'); + + $table = Table::getInstance('clinic', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableClinic extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableClinic extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.clinic.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.clinic.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableClinic extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableClinic extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableClinic extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableClinic extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableClinic extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableClinic extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.clinic.'.(int) $this->$k; + return 'com_ehealthportal.clinic.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableClinic extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableClinic extends JTable $this->alias = $this->clinic_name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/counseling_type.php b/admin/tables/counseling_type.php index 8e489c2..8dd57ef 100644 --- a/admin/tables/counseling_type.php +++ b/admin/tables/counseling_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage counseling_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Counseling_types Table class */ -class Ehealth_portalTableCounseling_type extends JTable +class EhealthportalTableCounseling_type extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableCounseling_type extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_counseling_type', 'id', $db); + parent::__construct('#__ehealthportal_counseling_type', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.counseling_type')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.counseling_type')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Counseling_type table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableCounseling_type extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('counseling_type', 'Ehealth_portalTable'); + $table = Table::getInstance('counseling_type', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_COUNSELING_TYPE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_COUNSELING_TYPE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_COUNSELING_TYPE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableCounseling_type extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('counseling_type', 'ehealth_portalTable'); + + $table = Table::getInstance('counseling_type', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableCounseling_type extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableCounseling_type extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.counseling_type.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.counseling_type.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableCounseling_type extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableCounseling_type extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableCounseling_type extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableCounseling_type extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableCounseling_type extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableCounseling_type extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.counseling_type.'.(int) $this->$k; + return 'com_ehealthportal.counseling_type.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableCounseling_type extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableCounseling_type extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/diagnosis_type.php b/admin/tables/diagnosis_type.php index de63c67..44693b5 100644 --- a/admin/tables/diagnosis_type.php +++ b/admin/tables/diagnosis_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage diagnosis_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Diagnosis_types Table class */ -class Ehealth_portalTableDiagnosis_type extends JTable +class EhealthportalTableDiagnosis_type extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableDiagnosis_type extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_diagnosis_type', 'id', $db); + parent::__construct('#__ehealthportal_diagnosis_type', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.diagnosis_type')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.diagnosis_type')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Diagnosis_type table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableDiagnosis_type extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('diagnosis_type', 'Ehealth_portalTable'); + $table = Table::getInstance('diagnosis_type', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_DIAGNOSIS_TYPE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_DIAGNOSIS_TYPE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableDiagnosis_type extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('diagnosis_type', 'ehealth_portalTable'); + + $table = Table::getInstance('diagnosis_type', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableDiagnosis_type extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableDiagnosis_type extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.diagnosis_type.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.diagnosis_type.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableDiagnosis_type extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableDiagnosis_type extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableDiagnosis_type extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableDiagnosis_type extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableDiagnosis_type extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableDiagnosis_type extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.diagnosis_type.'.(int) $this->$k; + return 'com_ehealthportal.diagnosis_type.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableDiagnosis_type extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableDiagnosis_type extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/family_planning.php b/admin/tables/family_planning.php index 1e43602..12685e7 100644 --- a/admin/tables/family_planning.php +++ b/admin/tables/family_planning.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage family_planning.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Family_plannings Table class */ -class Ehealth_portalTableFamily_planning extends JTable +class EhealthportalTableFamily_planning extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableFamily_planning extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_family_planning', 'id', $db); + parent::__construct('#__ehealthportal_family_planning', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.family_planning')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.family_planning')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Family_planning table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableFamily_planning extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('family_planning', 'Ehealth_portalTable'); + $table = Table::getInstance('family_planning', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_FAMILY_PLANNING_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_FAMILY_PLANNING_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_FAMILY_PLANNING_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableFamily_planning extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('family_planning', 'ehealth_portalTable'); + + $table = Table::getInstance('family_planning', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableFamily_planning extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableFamily_planning extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.family_planning.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.family_planning.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableFamily_planning extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableFamily_planning extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableFamily_planning extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableFamily_planning extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableFamily_planning extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableFamily_planning extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.family_planning.'.(int) $this->$k; + return 'com_ehealthportal.family_planning.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableFamily_planning extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/foetal_engagement.php b/admin/tables/foetal_engagement.php index 52f31aa..8053be6 100644 --- a/admin/tables/foetal_engagement.php +++ b/admin/tables/foetal_engagement.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_engagement.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Foetal_engagements Table class */ -class Ehealth_portalTableFoetal_engagement extends JTable +class EhealthportalTableFoetal_engagement extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableFoetal_engagement extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_foetal_engagement', 'id', $db); + parent::__construct('#__ehealthportal_foetal_engagement', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.foetal_engagement')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.foetal_engagement')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Foetal_engagement table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableFoetal_engagement extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('foetal_engagement', 'Ehealth_portalTable'); + $table = Table::getInstance('foetal_engagement', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_FOETAL_ENGAGEMENT_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_FOETAL_ENGAGEMENT_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableFoetal_engagement extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('foetal_engagement', 'ehealth_portalTable'); + + $table = Table::getInstance('foetal_engagement', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableFoetal_engagement extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableFoetal_engagement extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.foetal_engagement.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.foetal_engagement.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableFoetal_engagement extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableFoetal_engagement extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableFoetal_engagement extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableFoetal_engagement extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableFoetal_engagement extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableFoetal_engagement extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.foetal_engagement.'.(int) $this->$k; + return 'com_ehealthportal.foetal_engagement.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableFoetal_engagement extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableFoetal_engagement extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/foetal_lie.php b/admin/tables/foetal_lie.php index 7c84bf9..2933189 100644 --- a/admin/tables/foetal_lie.php +++ b/admin/tables/foetal_lie.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_lie.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Foetal_lies Table class */ -class Ehealth_portalTableFoetal_lie extends JTable +class EhealthportalTableFoetal_lie extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableFoetal_lie extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_foetal_lie', 'id', $db); + parent::__construct('#__ehealthportal_foetal_lie', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.foetal_lie')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.foetal_lie')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Foetal_lie table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableFoetal_lie extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('foetal_lie', 'Ehealth_portalTable'); + $table = Table::getInstance('foetal_lie', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_FOETAL_LIE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_FOETAL_LIE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_FOETAL_LIE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableFoetal_lie extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('foetal_lie', 'ehealth_portalTable'); + + $table = Table::getInstance('foetal_lie', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableFoetal_lie extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableFoetal_lie extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.foetal_lie.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.foetal_lie.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableFoetal_lie extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableFoetal_lie extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableFoetal_lie extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableFoetal_lie extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableFoetal_lie extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableFoetal_lie extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.foetal_lie.'.(int) $this->$k; + return 'com_ehealthportal.foetal_lie.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableFoetal_lie extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableFoetal_lie extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/foetal_presentation.php b/admin/tables/foetal_presentation.php index c691af9..1e57e9c 100644 --- a/admin/tables/foetal_presentation.php +++ b/admin/tables/foetal_presentation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage foetal_presentation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Foetal_presentations Table class */ -class Ehealth_portalTableFoetal_presentation extends JTable +class EhealthportalTableFoetal_presentation extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableFoetal_presentation extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_foetal_presentation', 'id', $db); + parent::__construct('#__ehealthportal_foetal_presentation', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.foetal_presentation')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.foetal_presentation')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Foetal_presentation table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableFoetal_presentation extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('foetal_presentation', 'Ehealth_portalTable'); + $table = Table::getInstance('foetal_presentation', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_FOETAL_PRESENTATION_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_FOETAL_PRESENTATION_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableFoetal_presentation extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('foetal_presentation', 'ehealth_portalTable'); + + $table = Table::getInstance('foetal_presentation', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableFoetal_presentation extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableFoetal_presentation extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.foetal_presentation.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.foetal_presentation.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableFoetal_presentation extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableFoetal_presentation extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableFoetal_presentation extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableFoetal_presentation extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableFoetal_presentation extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableFoetal_presentation extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.foetal_presentation.'.(int) $this->$k; + return 'com_ehealthportal.foetal_presentation.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableFoetal_presentation extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableFoetal_presentation extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/general_medical_check_up.php b/admin/tables/general_medical_check_up.php index 885cd0c..5ee0cb6 100644 --- a/admin/tables/general_medical_check_up.php +++ b/admin/tables/general_medical_check_up.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage general_medical_check_up.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * General_medical_check_ups Table class */ -class Ehealth_portalTableGeneral_medical_check_up extends JTable +class EhealthportalTableGeneral_medical_check_up extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_general_medical_check_up', 'id', $db); + parent::__construct('#__ehealthportal_general_medical_check_up', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.general_medical_check_up')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.general_medical_check_up')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the General_medical_check_up table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('general_medical_check_up', 'Ehealth_portalTable'); + $table = Table::getInstance('general_medical_check_up', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_GENERAL_MEDICAL_CHECK_UP_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_GENERAL_MEDICAL_CHECK_UP_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('general_medical_check_up', 'ehealth_portalTable'); + + $table = Table::getInstance('general_medical_check_up', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.general_medical_check_up.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.general_medical_check_up.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.general_medical_check_up.'.(int) $this->$k; + return 'com_ehealthportal.general_medical_check_up.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableGeneral_medical_check_up extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/health_education.php b/admin/tables/health_education.php index c01faab..0083053 100644 --- a/admin/tables/health_education.php +++ b/admin/tables/health_education.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Health_educations Table class */ -class Ehealth_portalTableHealth_education extends JTable +class EhealthportalTableHealth_education extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableHealth_education extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_health_education', 'id', $db); + parent::__construct('#__ehealthportal_health_education', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.health_education')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.health_education')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Health_education table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableHealth_education extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('health_education', 'Ehealth_portalTable'); + $table = Table::getInstance('health_education', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_HEALTH_EDUCATION_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_HEALTH_EDUCATION_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_HEALTH_EDUCATION_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableHealth_education extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('health_education', 'ehealth_portalTable'); + + $table = Table::getInstance('health_education', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableHealth_education extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableHealth_education extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.health_education.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.health_education.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableHealth_education extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableHealth_education extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableHealth_education extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableHealth_education extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableHealth_education extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableHealth_education extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.health_education.'.(int) $this->$k; + return 'com_ehealthportal.health_education.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableHealth_education extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/health_education_topic.php b/admin/tables/health_education_topic.php index 69f517f..0951f70 100644 --- a/admin/tables/health_education_topic.php +++ b/admin/tables/health_education_topic.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage health_education_topic.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Health_education_topics Table class */ -class Ehealth_portalTableHealth_education_topic extends JTable +class EhealthportalTableHealth_education_topic extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableHealth_education_topic extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_health_education_topic', 'id', $db); + parent::__construct('#__ehealthportal_health_education_topic', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.health_education_topic')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.health_education_topic')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Health_education_topic table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableHealth_education_topic extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('health_education_topic', 'Ehealth_portalTable'); + $table = Table::getInstance('health_education_topic', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_HEALTH_EDUCATION_TOPIC_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_HEALTH_EDUCATION_TOPIC_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableHealth_education_topic extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('health_education_topic', 'ehealth_portalTable'); + + $table = Table::getInstance('health_education_topic', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableHealth_education_topic extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableHealth_education_topic extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.health_education_topic.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.health_education_topic.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableHealth_education_topic extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableHealth_education_topic extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableHealth_education_topic extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableHealth_education_topic extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableHealth_education_topic extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableHealth_education_topic extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.health_education_topic.'.(int) $this->$k; + return 'com_ehealthportal.health_education_topic.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableHealth_education_topic extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableHealth_education_topic extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/hiv_counseling_and_testing.php b/admin/tables/hiv_counseling_and_testing.php index 83c2365..d2f354d 100644 --- a/admin/tables/hiv_counseling_and_testing.php +++ b/admin/tables/hiv_counseling_and_testing.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage hiv_counseling_and_testing.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Hiv_counselings_and_testings Table class */ -class Ehealth_portalTableHiv_counseling_and_testing extends JTable +class EhealthportalTableHiv_counseling_and_testing extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_hiv_counseling_and_testing', 'id', $db); + parent::__construct('#__ehealthportal_hiv_counseling_and_testing', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.hiv_counseling_and_testing')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.hiv_counseling_and_testing')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Hiv_counseling_and_testing table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('hiv_counseling_and_testing', 'Ehealth_portalTable'); + $table = Table::getInstance('hiv_counseling_and_testing', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_HIV_COUNSELING_AND_TESTING_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_HIV_COUNSELING_AND_TESTING_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('hiv_counseling_and_testing', 'ehealth_portalTable'); + + $table = Table::getInstance('hiv_counseling_and_testing', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.hiv_counseling_and_testing.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.hiv_counseling_and_testing.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.hiv_counseling_and_testing.'.(int) $this->$k; + return 'com_ehealthportal.hiv_counseling_and_testing.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableHiv_counseling_and_testing extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/immunisation.php b/admin/tables/immunisation.php index 75be5e5..a4b47f5 100644 --- a/admin/tables/immunisation.php +++ b/admin/tables/immunisation.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Immunisations Table class */ -class Ehealth_portalTableImmunisation extends JTable +class EhealthportalTableImmunisation extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableImmunisation extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_immunisation', 'id', $db); + parent::__construct('#__ehealthportal_immunisation', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.immunisation')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.immunisation')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Immunisation table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableImmunisation extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('immunisation', 'Ehealth_portalTable'); + $table = Table::getInstance('immunisation', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_IMMUNISATION_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_IMMUNISATION_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_IMMUNISATION_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableImmunisation extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('immunisation', 'ehealth_portalTable'); + + $table = Table::getInstance('immunisation', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableImmunisation extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableImmunisation extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.immunisation.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.immunisation.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableImmunisation extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableImmunisation extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableImmunisation extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableImmunisation extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableImmunisation extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableImmunisation extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.immunisation.'.(int) $this->$k; + return 'com_ehealthportal.immunisation.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableImmunisation extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/immunisation_type.php b/admin/tables/immunisation_type.php index fc3e8d2..fb2668f 100644 --- a/admin/tables/immunisation_type.php +++ b/admin/tables/immunisation_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Immunisation_types Table class */ -class Ehealth_portalTableImmunisation_type extends JTable +class EhealthportalTableImmunisation_type extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableImmunisation_type extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_immunisation_type', 'id', $db); + parent::__construct('#__ehealthportal_immunisation_type', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.immunisation_type')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.immunisation_type')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Immunisation_type table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableImmunisation_type extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('immunisation_type', 'Ehealth_portalTable'); + $table = Table::getInstance('immunisation_type', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_IMMUNISATION_TYPE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_IMMUNISATION_TYPE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableImmunisation_type extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('immunisation_type', 'ehealth_portalTable'); + + $table = Table::getInstance('immunisation_type', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableImmunisation_type extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableImmunisation_type extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.immunisation_type.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.immunisation_type.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableImmunisation_type extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableImmunisation_type extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableImmunisation_type extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableImmunisation_type extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableImmunisation_type extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableImmunisation_type extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.immunisation_type.'.(int) $this->$k; + return 'com_ehealthportal.immunisation_type.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableImmunisation_type extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableImmunisation_type extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/immunisation_vaccine_type.php b/admin/tables/immunisation_vaccine_type.php index a01d995..f867e3a 100644 --- a/admin/tables/immunisation_vaccine_type.php +++ b/admin/tables/immunisation_vaccine_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage immunisation_vaccine_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Immunisation_vaccine_types Table class */ -class Ehealth_portalTableImmunisation_vaccine_type extends JTable +class EhealthportalTableImmunisation_vaccine_type extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_immunisation_vaccine_type', 'id', $db); + parent::__construct('#__ehealthportal_immunisation_vaccine_type', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.immunisation_vaccine_type')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.immunisation_vaccine_type')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Immunisation_vaccine_type table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('immunisation_vaccine_type', 'Ehealth_portalTable'); + $table = Table::getInstance('immunisation_vaccine_type', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_IMMUNISATION_VACCINE_TYPE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_IMMUNISATION_VACCINE_TYPE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('immunisation_vaccine_type', 'ehealth_portalTable'); + + $table = Table::getInstance('immunisation_vaccine_type', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.immunisation_vaccine_type.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.immunisation_vaccine_type.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.immunisation_vaccine_type.'.(int) $this->$k; + return 'com_ehealthportal.immunisation_vaccine_type.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableImmunisation_vaccine_type extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/medication.php b/admin/tables/medication.php index faba0d2..8d600ea 100644 --- a/admin/tables/medication.php +++ b/admin/tables/medication.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage medication.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Medications Table class */ -class Ehealth_portalTableMedication extends JTable +class EhealthportalTableMedication extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableMedication extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_medication', 'id', $db); + parent::__construct('#__ehealthportal_medication', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.medication')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.medication')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Medication table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableMedication extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('medication', 'Ehealth_portalTable'); + $table = Table::getInstance('medication', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_MEDICATION_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_MEDICATION_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_MEDICATION_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableMedication extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('medication', 'ehealth_portalTable'); + + $table = Table::getInstance('medication', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableMedication extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableMedication extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.medication.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.medication.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableMedication extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableMedication extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableMedication extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableMedication extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableMedication extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableMedication extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.medication.'.(int) $this->$k; + return 'com_ehealthportal.medication.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableMedication extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableMedication extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/nonpay_reason.php b/admin/tables/nonpay_reason.php index a8af17b..04f0b2f 100644 --- a/admin/tables/nonpay_reason.php +++ b/admin/tables/nonpay_reason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage nonpay_reason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Nonpay_reasons Table class */ -class Ehealth_portalTableNonpay_reason extends JTable +class EhealthportalTableNonpay_reason extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableNonpay_reason extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_nonpay_reason', 'id', $db); + parent::__construct('#__ehealthportal_nonpay_reason', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.nonpay_reason')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.nonpay_reason')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Nonpay_reason table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableNonpay_reason extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('nonpay_reason', 'Ehealth_portalTable'); + $table = Table::getInstance('nonpay_reason', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_NONPAY_REASON_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_NONPAY_REASON_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_NONPAY_REASON_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableNonpay_reason extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('nonpay_reason', 'ehealth_portalTable'); + + $table = Table::getInstance('nonpay_reason', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableNonpay_reason extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableNonpay_reason extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.nonpay_reason.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.nonpay_reason.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableNonpay_reason extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableNonpay_reason extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableNonpay_reason extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableNonpay_reason extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableNonpay_reason extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableNonpay_reason extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.nonpay_reason.'.(int) $this->$k; + return 'com_ehealthportal.nonpay_reason.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableNonpay_reason extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableNonpay_reason extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/payment.php b/admin/tables/payment.php index fe7d5c5..98d9b9d 100644 --- a/admin/tables/payment.php +++ b/admin/tables/payment.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Payments Table class */ -class Ehealth_portalTablePayment extends JTable +class EhealthportalTablePayment extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTablePayment extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_payment', 'id', $db); + parent::__construct('#__ehealthportal_payment', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.payment')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.payment')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Payment table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTablePayment extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('payment', 'Ehealth_portalTable'); + $table = Table::getInstance('payment', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_PAYMENT_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_PAYMENT_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_PAYMENT_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTablePayment extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('payment', 'ehealth_portalTable'); + + $table = Table::getInstance('payment', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTablePayment extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTablePayment extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.payment.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.payment.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTablePayment extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTablePayment extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTablePayment extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTablePayment extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTablePayment extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTablePayment extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.payment.'.(int) $this->$k; + return 'com_ehealthportal.payment.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTablePayment extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/payment_amount.php b/admin/tables/payment_amount.php deleted file mode 100644 index 40a0d76..0000000 --- a/admin/tables/payment_amount.php +++ /dev/null @@ -1,350 +0,0 @@ - - @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Portal for mobile health clinics - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -use Joomla\Registry\Registry; -use Joomla\String\StringHelper; -use Joomla\Utilities\ArrayHelper; - -/** - * Payment_amounts Table class - */ -class Ehealth_portalTablePayment_amount extends JTable -{ - /** - * Ensure the params and metadata in json encoded in the bind method - * - * @var array - * @since 3.3 - */ - protected $_jsonEncode = array('params', 'metadata'); - - /** - * Constructor - * - * @param object Database connector object - */ - function __construct(&$db) - { - parent::__construct('#__ehealth_portal_payment_amount', 'id', $db); - - // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.payment_amount')); - } - - public function bind($array, $ignore = '') - { - - if (isset($array['params']) && is_array($array['params'])) - { - $registry = new JRegistry; - $registry->loadArray($array['params']); - $array['params'] = (string) $registry; - } - - if (isset($array['metadata']) && is_array($array['metadata'])) - { - $registry = new JRegistry; - $registry->loadArray($array['metadata']); - $array['metadata'] = (string) $registry; - } - - // Bind the rules. - if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); - } - return parent::bind($array, $ignore); - } - - /** - * Overload the store method for the Payment_amount table. - * - * @param boolean Toggle whether null values should be updated. - * @return boolean True on success, false on failure. - * @since 1.6 - */ - public function store($updateNulls = false) - { - $date = JFactory::getDate(); - $user = JFactory::getUser(); - - if ($this->id) - { - // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); - } - else - { - // New payment_amount. A payment_amount created and created_by field can be set by the user, - // so we don't touch either of these if they are set. - if (!(int) $this->created) - { - $this->created = $date->toSql(); - } - if (empty($this->created_by)) - { - $this->created_by = $user->get('id'); - } - } - - if (isset($this->alias)) - { - // Verify that the alias is unique - $table = JTable::getInstance('payment_amount', 'Ehealth_portalTable'); - - if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) - { - $this->setError(JText::_('COM_EHEALTH_PORTAL_PAYMENT_AMOUNT_ERROR_UNIQUE_ALIAS')); - return false; - } - } - - if (isset($this->url)) - { - // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); - } - if (isset($this->website)) - { - // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); - } - - return parent::store($updateNulls); - } - - /** - * Overloaded check method to ensure data integrity. - * - * @return boolean True on success. - */ - public function check() - { - if (isset($this->alias)) - { - // Generate a valid alias - $this->generateAlias(); - - $table = JTable::getInstance('payment_amount', 'ehealth_portalTable'); - - while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) - { - $this->alias = StringHelper::increment($this->alias, 'dash'); - } - } - - /* - * Clean up keywords -- eliminate extra spaces between phrases - * and cr (\r) and lf (\n) characters from string. - * Only process if not empty. - */ - if (!empty($this->metakey)) - { - // Array of characters to remove. - $bad_characters = array("\n", "\r", "\"", "<", ">"); - - // Remove bad characters. - $after_clean = StringHelper::str_ireplace($bad_characters, "", $this->metakey); - - // Create array using commas as delimiter. - $keys = explode(',', $after_clean); - $clean_keys = array(); - - foreach ($keys as $key) - { - // Ignore blank keywords. - if (trim($key)) - { - $clean_keys[] = trim($key); - } - } - - // Put array back together delimited by ", " - $this->metakey = implode(", ", $clean_keys); - } - - // Clean up description -- eliminate quotes and <> brackets - if (!empty($this->metadesc)) - { - // Only process if not empty - $bad_characters = array("\"", "<", ">"); - $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); - } - - // If we don't have any access rules set at this point just use an empty JAccessRules class - if (!$this->getRules()) - { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.payment_amount.'.$this->id); - $this->setRules($rules); - } - - // Set ordering - if ($this->published < 0) - { - // Set ordering to 0 if state is archived or trashed - $this->ordering = 0; - } - - return true; - } - - /** - * Gets the default asset values for a component. - * - * @param $string $component The component asset name to search for - * - * @return JAccessRules The JAccessRules object for the asset - */ - protected function getDefaultAssetValues($component, $try = true) - { - // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); - $query = $db->getQuery(true) - ->select($db->quoteName('id')) - ->from($db->quoteName('#__assets')) - ->where($db->quoteName('name') . ' = ' . $db->quote($component)); - $db->setQuery($query); - $db->execute(); - if ($db->loadRowList()) - { - // asset already set so use saved rules - $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. - } - // try again - elseif ($try) - { - $try = explode('.',$component); - $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) - { - if (isset($try[1])) - { - $_result = (string) $result; - $_result = json_decode($_result); - foreach ($_result as $name => &$rule) - { - $v = explode('.', $name); - if ($try[1] !== $v[0]) - { - // remove since it is not part of this view - unset($_result->$name); - } - else - { - // clear the value since we inherit - $rule = array(); - } - } - // check if there are any view values remaining - if (count( (array) $_result)) - { - $_result = json_encode($_result); - $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; - $rules->mergeCollection($_result); - - return $rules; - } - } - return $result; - } - } - return JAccess::getAssetRules(0); - } - - /** - * Method to compute the default name of the asset. - * The default name is in the form 'table_name.id' - * where id is the value of the primary key of the table. - * - * @return string - * @since 2.5 - */ - protected function _getAssetName() - { - $k = $this->_tbl_key; - return 'com_ehealth_portal.payment_amount.'.(int) $this->$k; - } - - /** - * Method to return the title to use for the asset table. - * - * @return string - * @since 2.5 - */ - protected function _getAssetTitle() - { - if (isset($this->title)) - { - return $this->title; - } - return ''; - } - - /** - * Get the parent asset id for the record - * - * @return int - * @since 2.5 - */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) - { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); - - return $asset->id; - } - - /** - * Generate a valid alias from title / date. - * Remains public to be able to check for duplicated alias before saving - * - * @return string - */ - public function generateAlias() - { - if (empty($this->alias)) - { - $this->alias = $this->name; - } - - $this->alias = JApplication::stringURLSafe($this->alias); - - if (trim(str_replace('-', '', $this->alias)) == '') - { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); - } - - return $this->alias; - } - -} diff --git a/admin/tables/payment_type.php b/admin/tables/payment_type.php index b83d07f..5dfb463 100644 --- a/admin/tables/payment_type.php +++ b/admin/tables/payment_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage payment_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Payment_types Table class */ -class Ehealth_portalTablePayment_type extends JTable +class EhealthportalTablePayment_type extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTablePayment_type extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_payment_type', 'id', $db); + parent::__construct('#__ehealthportal_payment_type', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.payment_type')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.payment_type')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Payment_type table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTablePayment_type extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('payment_type', 'Ehealth_portalTable'); + $table = Table::getInstance('payment_type', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_PAYMENT_TYPE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_PAYMENT_TYPE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_PAYMENT_TYPE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTablePayment_type extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('payment_type', 'ehealth_portalTable'); + + $table = Table::getInstance('payment_type', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTablePayment_type extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTablePayment_type extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.payment_type.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.payment_type.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTablePayment_type extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTablePayment_type extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTablePayment_type extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTablePayment_type extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTablePayment_type extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTablePayment_type extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.payment_type.'.(int) $this->$k; + return 'com_ehealthportal.payment_type.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTablePayment_type extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTablePayment_type extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/planning_type.php b/admin/tables/planning_type.php index 93337f1..7f258ae 100644 --- a/admin/tables/planning_type.php +++ b/admin/tables/planning_type.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage planning_type.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Planning_types Table class */ -class Ehealth_portalTablePlanning_type extends JTable +class EhealthportalTablePlanning_type extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTablePlanning_type extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_planning_type', 'id', $db); + parent::__construct('#__ehealthportal_planning_type', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.planning_type')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.planning_type')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Planning_type table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTablePlanning_type extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('planning_type', 'Ehealth_portalTable'); + $table = Table::getInstance('planning_type', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_PLANNING_TYPE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_PLANNING_TYPE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_PLANNING_TYPE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTablePlanning_type extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('planning_type', 'ehealth_portalTable'); + + $table = Table::getInstance('planning_type', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTablePlanning_type extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTablePlanning_type extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.planning_type.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.planning_type.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTablePlanning_type extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTablePlanning_type extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTablePlanning_type extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTablePlanning_type extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTablePlanning_type extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTablePlanning_type extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.planning_type.'.(int) $this->$k; + return 'com_ehealthportal.planning_type.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTablePlanning_type extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTablePlanning_type extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/prostate_and_testicular_cancer.php b/admin/tables/prostate_and_testicular_cancer.php index 8857701..d9f84df 100644 --- a/admin/tables/prostate_and_testicular_cancer.php +++ b/admin/tables/prostate_and_testicular_cancer.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage prostate_and_testicular_cancer.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Prostate_and_testicular_cancers Table class */ -class Ehealth_portalTableProstate_and_testicular_cancer extends JTable +class EhealthportalTableProstate_and_testicular_cancer extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_prostate_and_testicular_cancer', 'id', $db); + parent::__construct('#__ehealthportal_prostate_and_testicular_cancer', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.prostate_and_testicular_cancer')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.prostate_and_testicular_cancer')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Prostate_and_testicular_cancer table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('prostate_and_testicular_cancer', 'Ehealth_portalTable'); + $table = Table::getInstance('prostate_and_testicular_cancer', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_PROSTATE_AND_TESTICULAR_CANCER_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_PROSTATE_AND_TESTICULAR_CANCER_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('prostate_and_testicular_cancer', 'ehealth_portalTable'); + + $table = Table::getInstance('prostate_and_testicular_cancer', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.prostate_and_testicular_cancer.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.prostate_and_testicular_cancer.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.prostate_and_testicular_cancer.'.(int) $this->$k; + return 'com_ehealthportal.prostate_and_testicular_cancer.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableProstate_and_testicular_cancer extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/referral.php b/admin/tables/referral.php index b4a3412..2c9e195 100644 --- a/admin/tables/referral.php +++ b/admin/tables/referral.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage referral.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Referrals Table class */ -class Ehealth_portalTableReferral extends JTable +class EhealthportalTableReferral extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableReferral extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_referral', 'id', $db); + parent::__construct('#__ehealthportal_referral', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.referral')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.referral')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Referral table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableReferral extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('referral', 'Ehealth_portalTable'); + $table = Table::getInstance('referral', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_REFERRAL_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_REFERRAL_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_REFERRAL_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableReferral extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('referral', 'ehealth_portalTable'); + + $table = Table::getInstance('referral', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableReferral extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableReferral extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.referral.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.referral.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableReferral extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableReferral extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableReferral extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableReferral extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableReferral extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableReferral extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.referral.'.(int) $this->$k; + return 'com_ehealthportal.referral.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableReferral extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableReferral extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/site.php b/admin/tables/site.php index 9e7819c..645d530 100644 --- a/admin/tables/site.php +++ b/admin/tables/site.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage site.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Sites Table class */ -class Ehealth_portalTableSite extends JTable +class EhealthportalTableSite extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableSite extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_site', 'id', $db); + parent::__construct('#__ehealthportal_site', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.site')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.site')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Site table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableSite extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('site', 'Ehealth_portalTable'); + $table = Table::getInstance('site', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_SITE_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_SITE_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_SITE_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableSite extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('site', 'ehealth_portalTable'); + + $table = Table::getInstance('site', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableSite extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableSite extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.site.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.site.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableSite extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableSite extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableSite extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableSite extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableSite extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableSite extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.site.'.(int) $this->$k; + return 'com_ehealthportal.site.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableSite extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableSite extends JTable $this->alias = $this->site_name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/strength.php b/admin/tables/strength.php index 0024606..2140fc9 100644 --- a/admin/tables/strength.php +++ b/admin/tables/strength.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage strength.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Strengths Table class */ -class Ehealth_portalTableStrength extends JTable +class EhealthportalTableStrength extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableStrength extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_strength', 'id', $db); + parent::__construct('#__ehealthportal_strength', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.strength')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.strength')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Strength table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableStrength extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('strength', 'Ehealth_portalTable'); + $table = Table::getInstance('strength', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_STRENGTH_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_STRENGTH_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_STRENGTH_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableStrength extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('strength', 'ehealth_portalTable'); + + $table = Table::getInstance('strength', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableStrength extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableStrength extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.strength.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.strength.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableStrength extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableStrength extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableStrength extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableStrength extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableStrength extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableStrength extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.strength.'.(int) $this->$k; + return 'com_ehealthportal.strength.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableStrength extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableStrength extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/test.php b/admin/tables/test.php index 5e7546a..333bbae 100644 --- a/admin/tables/test.php +++ b/admin/tables/test.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage test.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Tests Table class */ -class Ehealth_portalTableTest extends JTable +class EhealthportalTableTest extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableTest extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_test', 'id', $db); + parent::__construct('#__ehealthportal_test', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.test')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.test')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Test table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableTest extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('test', 'Ehealth_portalTable'); + $table = Table::getInstance('test', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_TEST_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_TEST_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_TEST_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableTest extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('test', 'ehealth_portalTable'); + + $table = Table::getInstance('test', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableTest extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableTest extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.test.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.test.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableTest extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableTest extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableTest extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableTest extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableTest extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableTest extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.test.'.(int) $this->$k; + return 'com_ehealthportal.test.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableTest extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/testing_reason.php b/admin/tables/testing_reason.php index 74bc40a..e4f6c40 100644 --- a/admin/tables/testing_reason.php +++ b/admin/tables/testing_reason.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage testing_reason.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Testing_reasons Table class */ -class Ehealth_portalTableTesting_reason extends JTable +class EhealthportalTableTesting_reason extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableTesting_reason extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_testing_reason', 'id', $db); + parent::__construct('#__ehealthportal_testing_reason', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.testing_reason')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.testing_reason')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Testing_reason table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableTesting_reason extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('testing_reason', 'Ehealth_portalTable'); + $table = Table::getInstance('testing_reason', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_TESTING_REASON_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_TESTING_REASON_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_TESTING_REASON_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableTesting_reason extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('testing_reason', 'ehealth_portalTable'); + + $table = Table::getInstance('testing_reason', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableTesting_reason extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableTesting_reason extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.testing_reason.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.testing_reason.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableTesting_reason extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableTesting_reason extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableTesting_reason extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableTesting_reason extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableTesting_reason extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableTesting_reason extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.testing_reason.'.(int) $this->$k; + return 'com_ehealthportal.testing_reason.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableTesting_reason extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableTesting_reason extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/tuberculosis.php b/admin/tables/tuberculosis.php index 7bfda00..89d6852 100644 --- a/admin/tables/tuberculosis.php +++ b/admin/tables/tuberculosis.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage tuberculosis.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Tuberculoses Table class */ -class Ehealth_portalTableTuberculosis extends JTable +class EhealthportalTableTuberculosis extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableTuberculosis extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_tuberculosis', 'id', $db); + parent::__construct('#__ehealthportal_tuberculosis', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.tuberculosis')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.tuberculosis')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Tuberculosis table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableTuberculosis extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('tuberculosis', 'Ehealth_portalTable'); + $table = Table::getInstance('tuberculosis', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_TUBERCULOSIS_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_TUBERCULOSIS_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_TUBERCULOSIS_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableTuberculosis extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('tuberculosis', 'ehealth_portalTable'); + + $table = Table::getInstance('tuberculosis', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableTuberculosis extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableTuberculosis extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.tuberculosis.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.tuberculosis.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableTuberculosis extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableTuberculosis extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableTuberculosis extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableTuberculosis extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableTuberculosis extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableTuberculosis extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.tuberculosis.'.(int) $this->$k; + return 'com_ehealthportal.tuberculosis.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableTuberculosis extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/tables/unit.php b/admin/tables/unit.php index 29a8c7d..3253cc5 100644 --- a/admin/tables/unit.php +++ b/admin/tables/unit.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage unit.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Units Table class */ -class Ehealth_portalTableUnit extends JTable +class EhealthportalTableUnit extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableUnit extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_unit', 'id', $db); + parent::__construct('#__ehealthportal_unit', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.unit')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.unit')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Unit table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableUnit extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('unit', 'Ehealth_portalTable'); + $table = Table::getInstance('unit', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_UNIT_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_UNIT_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_UNIT_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableUnit extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('unit', 'ehealth_portalTable'); + + $table = Table::getInstance('unit', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableUnit extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableUnit extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.unit.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.unit.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableUnit extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableUnit extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableUnit extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableUnit extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableUnit extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableUnit extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.unit.'.(int) $this->$k; + return 'com_ehealthportal.unit.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableUnit extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } @@ -337,11 +350,11 @@ class Ehealth_portalTableUnit extends JTable $this->alias = $this->name; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); + $this->alias = Factory::getDate()->format('Y-m-d-H-i-s'); } return $this->alias; diff --git a/admin/tables/vmmc.php b/admin/tables/vmmc.php index 5128371..a7a4b07 100644 --- a/admin/tables/vmmc.php +++ b/admin/tables/vmmc.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage vmmc.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,14 +26,22 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Factory; +use Joomla\CMS\Table\Table; +use Joomla\CMS\Access\Access as AccessRules; +use Joomla\CMS\Access\Rules; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Table\Observer\Tags as TableObserverTags; +use Joomla\CMS\Table\Observer\ContentHistory as TableObserverContenthistory; +use Joomla\CMS\Application\ApplicationHelper; /** * Vmmcs Table class */ -class Ehealth_portalTableVmmc extends JTable +class EhealthportalTableVmmc extends Table { /** * Ensure the params and metadata in json encoded in the bind method @@ -42,63 +50,63 @@ class Ehealth_portalTableVmmc extends JTable * @since 3.3 */ protected $_jsonEncode = array('params', 'metadata'); - + /** * Constructor * * @param object Database connector object */ - function __construct(&$db) + function __construct(&$db) { - parent::__construct('#__ehealth_portal_vmmc', 'id', $db); + parent::__construct('#__ehealthportal_vmmc', 'id', $db); // Adding History Options - JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealth_portal.vmmc')); - } - + TableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_ehealthportal.vmmc')); + } + public function bind($array, $ignore = '') { - + if (isset($array['params']) && is_array($array['params'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry; + $registry = new Registry; $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } - - // Bind the rules. + + // Bind the rules. if (isset($array['rules']) && is_array($array['rules'])) - { - $rules = new JAccessRules($array['rules']); - $this->setRules($rules); + { + $rules = new AccessRules($array['rules']); + $this->setRules($rules); } return parent::bind($array, $ignore); } - + /** * Overload the store method for the Vmmc table. * - * @param boolean Toggle whether null values should be updated. + * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { - $date = JFactory::getDate(); - $user = JFactory::getUser(); + $date = Factory::getDate(); + $user = Factory::getUser(); if ($this->id) { // Existing item - $this->modified = $date->toSql(); - $this->modified_by = $user->get('id'); + $this->modified = $date->toSql(); + $this->modified_by = $user->get('id'); } else { @@ -113,33 +121,38 @@ class Ehealth_portalTableVmmc extends JTable $this->created_by = $user->get('id'); } } - + if (isset($this->alias)) { // Verify that the alias is unique - $table = JTable::getInstance('vmmc', 'Ehealth_portalTable'); + $table = Table::getInstance('vmmc', 'EhealthportalTable'); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { - $this->setError(JText::_('COM_EHEALTH_PORTAL_VMMC_ERROR_UNIQUE_ALIAS')); + $this->setError(Text::_('COM_EHEALTHPORTAL_VMMC_ERROR_UNIQUE_ALIAS')); + + if ($table->published === -2) + { + $this->setError(Text::_('COM_EHEALTHPORTAL_VMMC_ERROR_UNIQUE_ALIAS_TRASHED')); + } return false; } } - + if (isset($this->url)) { // Convert IDN urls to punycode - $this->url = JStringPunycode::urlToPunycode($this->url); + $this->url = PunycodeHelper::urlToPunycode($this->url); } if (isset($this->website)) { // Convert IDN urls to punycode - $this->website = JStringPunycode::urlToPunycode($this->website); + $this->website = PunycodeHelper::urlToPunycode($this->website); } return parent::store($updateNulls); } - + /** * Overloaded check method to ensure data integrity. * @@ -151,20 +164,20 @@ class Ehealth_portalTableVmmc extends JTable { // Generate a valid alias $this->generateAlias(); - - $table = JTable::getInstance('vmmc', 'ehealth_portalTable'); + + $table = Table::getInstance('vmmc', 'ehealthportalTable'); while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { $this->alias = StringHelper::increment($this->alias, 'dash'); } } - + /* * Clean up keywords -- eliminate extra spaces between phrases * and cr (\r) and lf (\n) characters from string. * Only process if not empty. - */ + */ if (!empty($this->metakey)) { // Array of characters to remove. @@ -175,7 +188,7 @@ class Ehealth_portalTableVmmc extends JTable // Create array using commas as delimiter. $keys = explode(',', $after_clean); - $clean_keys = array(); + $clean_keys = []; foreach ($keys as $key) { @@ -198,13 +211,13 @@ class Ehealth_portalTableVmmc extends JTable $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc); } - // If we don't have any access rules set at this point just use an empty JAccessRules class + // If we don't have any access rules set at this point just use an empty AccessRules class if (!$this->getRules()) { - $rules = $this->getDefaultAssetValues('com_ehealth_portal.vmmc.'.$this->id); + $rules = $this->getDefaultAssetValues('com_ehealthportal.vmmc.'.$this->id); $this->setRules($rules); } - + // Set ordering if ($this->published < 0) { @@ -220,12 +233,12 @@ class Ehealth_portalTableVmmc extends JTable * * @param $string $component The component asset name to search for * - * @return JAccessRules The JAccessRules object for the asset + * @return AccessRules The AccessRules object for the asset */ protected function getDefaultAssetValues($component, $try = true) { // Need to find the asset id by the name of the component. - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__assets')) @@ -236,14 +249,14 @@ class Ehealth_portalTableVmmc extends JTable { // asset already set so use saved rules $assetId = (int) $db->loadResult(); - return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. + return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed. } // try again elseif ($try) { $try = explode('.',$component); $result = $this->getDefaultAssetValues($try[0], false); - if ($result instanceof JAccessRules) + if ($result instanceof AccessRules) { if (isset($try[1])) { @@ -260,7 +273,7 @@ class Ehealth_portalTableVmmc extends JTable else { // clear the value since we inherit - $rule = array(); + $rule = []; } } // check if there are any view values remaining @@ -268,8 +281,8 @@ class Ehealth_portalTableVmmc extends JTable { $_result = json_encode($_result); $_result = array($_result); - // Instantiate and return the JAccessRules object for the asset rules. - $rules = new JAccessRules; + // Instantiate and return the AccessRules object for the asset rules. + $rules = new AccessRules; $rules->mergeCollection($_result); return $rules; @@ -278,7 +291,7 @@ class Ehealth_portalTableVmmc extends JTable return $result; } } - return JAccess::getAssetRules(0); + return AccessRules::getAssetRules(0); } /** @@ -286,20 +299,20 @@ class Ehealth_portalTableVmmc extends JTable * The default name is in the form 'table_name.id' * where id is the value of the primary key of the table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetName() { $k = $this->_tbl_key; - return 'com_ehealth_portal.vmmc.'.(int) $this->$k; + return 'com_ehealthportal.vmmc.'.(int) $this->$k; } /** * Method to return the title to use for the asset table. * - * @return string - * @since 2.5 + * @return string + * @since 2.5 */ protected function _getAssetTitle() { @@ -313,13 +326,13 @@ class Ehealth_portalTableVmmc extends JTable /** * Get the parent asset id for the record * - * @return int - * @since 2.5 + * @return int + * @since 2.5 */ - protected function _getAssetParentId(JTable $table = NULL, $id = NULL) + protected function _getAssetParentId(?Table $table = null, $id = null) { - $asset = JTable::getInstance('Asset'); - $asset->loadByName('com_ehealth_portal'); + $asset = Table::getInstance('Asset'); + $asset->loadByName('com_ehealthportal'); return $asset->id; } diff --git a/admin/views/administration_part/submitbutton.js b/admin/views/administration_part/submitbutton.js index 67207b7..b5a2c28 100644 --- a/admin/views/administration_part/submitbutton.js +++ b/admin/views/administration_part/submitbutton.js @@ -9,12 +9,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage submitbutton.js - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,7 +26,7 @@ Joomla.submitbutton = function(task) { if (task == ''){ return false; - } else { + } else { var action = task.split('.'); if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){ Joomla.submitform(task, document.getElementById("adminForm")); diff --git a/admin/views/administration_part/tmpl/edit.php b/admin/views/administration_part/tmpl/edit.php index 8de85ea..ce60ad3 100644 --- a/admin/views/administration_part/tmpl/edit.php +++ b/admin/views/administration_part/tmpl/edit.php @@ -10,12 +10,12 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 1.0.5 - @build 24th April, 2021 - @created 13th August, 2020 + @version 3.0.0 + @build 19th January, 2024 + @created 19th January, 2024 @package eHealth Portal @subpackage edit.php - @author Oh Martin + @author Llewellyn van der Merwe @copyright Copyright (C) 2020 Vast Development Method. All rights reserved. @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -26,84 +26,82 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -JHtml::_('formbehavior.chosen', 'select'); -JHtml::_('behavior.keepalive'); +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper as Html; +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\CMS\Router\Route; +Html::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +Html::_('behavior.formvalidator'); +Html::_('formbehavior.chosen', 'select'); +Html::_('behavior.keepalive'); + $componentParams = $this->params; // will be removed just use $this->params instead ?> -