diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..6f3a291
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "liveServer.settings.port": 5501
+}
\ No newline at end of file
diff --git a/app/acl.json b/app/acl.json
index 4063d29..81d8f1c 100644
--- a/app/acl.json
+++ b/app/acl.json
@@ -22,8 +22,9 @@
"denied" : {
"Register" : ["login", "register"]
},
+ "NewPatient":["*"],
"Register" : ["logout"],
- "Tools" : ["AddNewPatient","Update","existingPatient"]
+ "Tools" : ["AddNewPatient","Update","existingPatient","dischargedPatient"]
},
"Admin" :{
@@ -37,6 +38,33 @@
"denied" : {},
"Tools" : ["first", "inbox"]
+},
+"ecg_lab" :{
+ "denied" : {},
+ "Tools" : ["first", "inbox"]
+
+},
+"microbio_lab" :{
+ "denied" : {},
+ "Tools" : ["first", "inbox"]
+
+},
+"biochemical_lab" :{
+ "denied" : {},
+ "Tools" : ["first", "inbox"]
+
+},
+"specimen_exam_lab" :{
+ "denied" : {},
+ "Tools" : ["first", "inbox"]
+
+},
+"xray_lab" :{
+ "denied" : {},
+ "Tools" : ["first", "inbox"]
+
}
+
+
}
diff --git a/app/controllers/Filter Control/Filtering.php b/app/controllers/Filter Control/Filtering.php
index d37ff5c..6a5bcf3 100644
--- a/app/controllers/Filter Control/Filtering.php
+++ b/app/controllers/Filter Control/Filtering.php
@@ -1,9 +1,9 @@
-
-
+
+
+
+
diff --git a/app/controllers/Home.php b/app/controllers/Home.php
index efef724..71f9954 100644
--- a/app/controllers/Home.php
+++ b/app/controllers/Home.php
@@ -1,5 +1,6 @@
acl == 'Doctor'){
- if($_POST){
- dnd($_POST);
- }
+
$this->view->render('home/contents');
+ }else if(currentUser()->acl == 'ecg_lab'){
+
+ $this->view->post = currentUser()->acl;
+ $this->view->render('home/TestRequestViewer.viewer');
+
+ }else if(currentUser()->acl == 'xray_lab'){
+
+ $this->view->post = currentUser()->acl;
+ $this->view->render('home/TestRequestViewer.viewer');
+
+ }else if(currentUser()->acl == 'specimen_exam_lab'){
+
+ $this->view->post = currentUser()->acl;
+ $this->view->render('home/TestRequestViewer.viewer');
+
+ }else if(currentUser()->acl == 'biochemical_lab'){
+
+ $this->view->post = currentUser()->acl;
+ $this->view->render('home/TestRequestViewer.viewer');
+
+ }else if(currentUser()->acl == 'microbio_lab'){
+
+ $this->view->post = currentUser()->acl;
+ $this->view->render('home/TestRequestViewer.viewer');
+
}
else {
$this->view->render('home/index');
diff --git a/app/controllers/PatientForms/ExistingPatient.php b/app/controllers/PatientForms/ExistingPatient.php
index 9b7a479..61c4757 100644
--- a/app/controllers/PatientForms/ExistingPatient.php
+++ b/app/controllers/PatientForms/ExistingPatient.php
@@ -1,6 +1,8 @@
-
-
-
+
+
+
+
@@ -52,7 +54,14 @@
}
$columns = array('RegNo', 'FullName', 'Age', 'Gender', 'FullAddress', 'DateOfBirth', 'Diagnosis', 'BedNo','ContactNo');
- $results = $medical->retrieveData("patients", $columns, $_SESSION["regNo"]);
+ if(isset($_POST['regNo'])){
+ $regNo = $_POST["regNo"];
+ $_SESSION["regNo"] = $_POST['regNo'];
+ }
+ else if(isset($_SESSION['regNo'])){
+ $regNo = $_SESSION["regNo"];
+ }
+ $results = $medical->retrieveData("patients", $columns, $regNo);
if (mysqli_num_rows($results)!=0) {
while($row = mysqli_fetch_array($results)){
$regNo = $row['RegNo'];
@@ -70,13 +79,13 @@
else{
$admission = "Admitted";
}
-
$patient = new Patient($regNo, $name, $age, $address,$diagnosis,$dob,$gender,$admission, $bedNo, $contact,"Existing");
$_SESSION["Patient"] = $patient;
$patient->displayUI();
//include '../../views/ExistingPatient/ExistingPatientForm.php';
}
}
+
else{
echo "Registration number not found.";
}
diff --git a/app/controllers/PatientForms/ExistingTreatments.php b/app/controllers/PatientForms/ExistingTreatments.php
index 22b28ae..70eefc3 100644
--- a/app/controllers/PatientForms/ExistingTreatments.php
+++ b/app/controllers/PatientForms/ExistingTreatments.php
@@ -1,7 +1,8 @@
-
-
-
-
-
-
+
+
+
+
@@ -46,6 +41,7 @@
}
else{
if (isset($_POST["regNo"])){
+
$regNo = $_POST["regNo"];
}
}
diff --git a/app/controllers/PatientForms/ExistingTreatmentsFiltered.php b/app/controllers/PatientForms/ExistingTreatmentsFiltered.php
index 262feaf..a0ce601 100644
--- a/app/controllers/PatientForms/ExistingTreatmentsFiltered.php
+++ b/app/controllers/PatientForms/ExistingTreatmentsFiltered.php
@@ -1,7 +1,7 @@
-
+
+
+
diff --git a/app/controllers/PatientForms/NewPatient.php b/app/controllers/PatientForms/NewPatient.php
index d8e6aeb..c21fb4e 100644
--- a/app/controllers/PatientForms/NewPatient.php
+++ b/app/controllers/PatientForms/NewPatient.php
@@ -143,7 +143,7 @@
//$medical->enterData($test, array('patient_id','sdate'), array($regNo, date('Y-m-d')));
}
}
- header("Location: ../../contents.php");
+ header("Location: ../../../");
}
diff --git a/app/controllers/Redirect.php b/app/controllers/Redirect.php
index 343c3e1..5ef177e 100644
--- a/app/controllers/Redirect.php
+++ b/app/controllers/Redirect.php
@@ -26,7 +26,7 @@ public function confirmAction($username)
';
$posted_values['button'] = '
-
+
';
diff --git a/app/controllers/Register.php b/app/controllers/Register.php
index 18c3297..8236dc2 100644
--- a/app/controllers/Register.php
+++ b/app/controllers/Register.php
@@ -67,7 +67,7 @@ public function registerAction()
$validation = new Validate();
$posted_values = ['fname' =>'', 'lname'=>'', 'username'=>'', 'email'=>'', 'password'=>'', 'confirm'=>''];
if ($_POST) {
- dnd($_POST);
+
$posted_values = posted_values($_POST);
$validation->check($_POST, [
'fname' => [
diff --git a/app/controllers/Tools.php b/app/controllers/Tools.php
index f69ea84..c6ce811 100644
--- a/app/controllers/Tools.php
+++ b/app/controllers/Tools.php
@@ -18,7 +18,8 @@ public function indexAction(){
}
public function updateAction(){
- $this->view->render('tools/Update');
+ header("Location: /Tuto/app/views/Searching.php");
+ // $this->view->render('tools/Update');
}
public function inboxAction(){
@@ -29,12 +30,18 @@ public function thirdAction(){
$this->view->render('tools/third');
}
+ public function dischargedPatientAction(){
+ header("Location: /Tuto/app/views/DischargedPatient/Intermediate.php");
+ }
+
public function AddNewPatientAction(){
- $this->view->render('tools/AddNewPatient');
+ // $this->view->render('tools/AddNewPatient');
+ header("Location: /Tuto/app/views/NewPatient/NewPatientForm.php");
}
public function existingPatientAction(){
- $this->view->render('tools/existingPatient');
+ //$this->view->render('tools/existingPatient');
+ header("Location: /Tuto/app/views/Filtering/FilterBar.php");
}
public function deleteAction(){
@@ -52,7 +59,7 @@ public function deleteAction(){
$posted_values['acl'] = $user->acl;
$posted_values['username'] = $_POST['username'];
- $posted_values['smessage']= '
+ $posted_values['smessage']= '
User exists! check user details below before you delete
';
@@ -62,7 +69,7 @@ public function deleteAction(){
}
else{
$posted_values['message']=
- '
+ '
Invalid Username or Account type!
';
diff --git a/app/menu_acl.json b/app/menu_acl.json
index 2233968..d277c6c 100644
--- a/app/menu_acl.json
+++ b/app/menu_acl.json
@@ -2,21 +2,14 @@
"Home" : "home",
"Register" : "register/register",
- "Tools" : {
- "My Tools" : "tools",
- "Inbox" : "tools/inbox",
- "New Patient" : "tools/AddNewPatient",
+
+ "New Patient" : "tools/AddNewPatient",
"Update Patient" : "tools/Update",
- "Filter info":"tools/existingPatient",
+ "Filter Patients":"tools/existingPatient",
+ "View Discharged Patients":"tools/dischargedPatient",
"Delete" : "tools/delete",
- "separator" : "",
- "Tools 3" : "tools/third"
-
- },
-
- "Google" : "https://www.google.com",
- "PHP Docs" : "http://php.net/manual/en",
+
"Login" : "register/login",
"Logout" : "register/logout"
}
diff --git a/app/models/DatabaseConnection/Database.php b/app/models/DatabaseConnection/Database.php
index e7b9268..841aef0 100644
--- a/app/models/DatabaseConnection/Database.php
+++ b/app/models/DatabaseConnection/Database.php
@@ -4,7 +4,7 @@ class Database{
private $name = "medical"; //Database name
private $host = "localhost"; //Database server
private $user = "root"; //Database username
- private $password ="nuwansql" ; //Database password
+ private $password ="" ; //Database password
private static $instance;
private static $link;
diff --git a/app/views/DischargedPatient/AlreadyDischargedPatient.php b/app/views/DischargedPatient/AlreadyDischargedPatient.php
index ab07ad8..0c257a2 100644
--- a/app/views/DischargedPatient/AlreadyDischargedPatient.php
+++ b/app/views/DischargedPatient/AlreadyDischargedPatient.php
@@ -1,6 +1,6 @@
-
-
+
+
+
+
+
diff --git a/app/views/DischargedPatient/ConfirmDischarge.php b/app/views/DischargedPatient/ConfirmDischarge.php
index f61839a..f805c4e 100644
--- a/app/views/DischargedPatient/ConfirmDischarge.php
+++ b/app/views/DischargedPatient/ConfirmDischarge.php
@@ -1,4 +1,5 @@
+
+
diff --git a/app/views/DischargedPatient/FormDischargedPatient.php b/app/views/DischargedPatient/FormDischargedPatient.php
index a4dc983..e83f1ae 100644
--- a/app/views/DischargedPatient/FormDischargedPatient.php
+++ b/app/views/DischargedPatient/FormDischargedPatient.php
@@ -4,8 +4,10 @@
-
-
+
+
+
+
@@ -91,4 +93,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/views/DischargedPatient/Intermediate.php b/app/views/DischargedPatient/Intermediate.php
index 69dd01e..df6ecae 100644
--- a/app/views/DischargedPatient/Intermediate.php
+++ b/app/views/DischargedPatient/Intermediate.php
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/app/views/DischargedPatient/NewlyDischargedPatient.php b/app/views/DischargedPatient/NewlyDischargedPatient.php
index cdbfff0..b191c80 100644
--- a/app/views/DischargedPatient/NewlyDischargedPatient.php
+++ b/app/views/DischargedPatient/NewlyDischargedPatient.php
@@ -1,4 +1,5 @@
-
-
+
+
+
+
diff --git a/app/views/ExistingPatient/EditableForm.php b/app/views/ExistingPatient/EditableForm.php
index 3530012..de62e63 100644
--- a/app/views/ExistingPatient/EditableForm.php
+++ b/app/views/ExistingPatient/EditableForm.php
@@ -1,9 +1,9 @@
-
-
+
+
+
+
diff --git a/app/views/ExistingPatient/ExistingPatientForm.php b/app/views/ExistingPatient/ExistingPatientForm.php
index 61f4b6e..c95a6c9 100644
--- a/app/views/ExistingPatient/ExistingPatientForm.php
+++ b/app/views/ExistingPatient/ExistingPatientForm.php
@@ -8,16 +8,9 @@
-
-
-
-
-
-
+
+
+
@@ -136,8 +129,8 @@
-
diff --git a/app/views/ExistingPatient/NewTests.php b/app/views/ExistingPatient/NewTests.php
index 9011251..68315c3 100644
--- a/app/views/ExistingPatient/NewTests.php
+++ b/app/views/ExistingPatient/NewTests.php
@@ -1,7 +1,8 @@
-
+
+
+
diff --git a/app/views/ExistingPatient/TestResults.php b/app/views/ExistingPatient/TestResults.php
index 22e52c2..8069e7d 100644
--- a/app/views/ExistingPatient/TestResults.php
+++ b/app/views/ExistingPatient/TestResults.php
@@ -1,7 +1,7 @@
-
-
-
-
-
-
+
+
+
+
diff --git a/app/views/Filtering/FilterBar.php b/app/views/Filtering/FilterBar.php
index 5e6d748..8d3abbb 100644
--- a/app/views/Filtering/FilterBar.php
+++ b/app/views/Filtering/FilterBar.php
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/app/views/HeaderAndFooter/header.php b/app/views/HeaderAndFooter/header.php
index a3cc5c2..c73a28d 100644
--- a/app/views/HeaderAndFooter/header.php
+++ b/app/views/HeaderAndFooter/header.php
@@ -13,7 +13,9 @@
LADY RIDGEWAY HOSPITAL FOR CHILDREN, COLOMBO
OUT-PATIENT DEPARTMENT
+
-
+
+
\ No newline at end of file
diff --git a/app/views/Lab Forms/BiochemicalInvestigation.php b/app/views/Lab Forms/BiochemicalInvestigation.php
index fb71673..977fafd 100644
--- a/app/views/Lab Forms/BiochemicalInvestigation.php
+++ b/app/views/Lab Forms/BiochemicalInvestigation.php
@@ -1,7 +1,7 @@
@@ -14,8 +17,11 @@
-
+
+
+
+
@@ -141,7 +147,7 @@