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']= ' 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 @@
- : X-Ray
+ : X-Ray
: Biochemical Investigation
: ECG
: Specimen Examination
diff --git a/app/views/Searching.php b/app/views/Searching.php index 6d963ae..c264b40 100644 --- a/app/views/Searching.php +++ b/app/views/Searching.php @@ -1,7 +1,9 @@ - + + + + - +
+ -
+
@@ -55,12 +61,12 @@ $medical -> makeTable("patients",array('RegNo', 'FullName', 'Age', 'Gender', 'FullAddress', 'DateOfBirth', 'Diagnosis') , array("VARCHAR(20) NOT NULL PRIMARY KEY", "VARCHAR(70) NOT NULL","INT NOT NULL", "VARCHAR(10) NOT NULL", "VARCHAR(50) NOT NULL", "DATE NOT NULL", "VARCHAR(30) NOT NULL")); - +/* if (isset($_POST['regNo'])){ $_SESSION["regNo"] = $_POST['regNo']; - header("Location:../controllers/PatientForms/ExistingPatient.php"); + // header("Location:../controllers/PatientForms/ExistingPatient.php"); - } + }*/ ?> diff --git a/app/views/Searching/Searching.php b/app/views/Searching/Searching.php deleted file mode 100644 index 9aab2eb..0000000 --- a/app/views/Searching/Searching.php +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - -
-
-
-

Search for patient

-
- - -
-
- -
-
-
- - - -
- - - - - - diff --git a/app/views/TestResults/BiochemicalInvestigations.php b/app/views/TestResults/BiochemicalInvestigations.php index f1cad66..dedbf69 100644 --- a/app/views/TestResults/BiochemicalInvestigations.php +++ b/app/views/TestResults/BiochemicalInvestigations.php @@ -1,6 +1,7 @@ - - + + + diff --git a/app/views/TestResults/ECG.php b/app/views/TestResults/ECG.php index b74f578..88b7a47 100644 --- a/app/views/TestResults/ECG.php +++ b/app/views/TestResults/ECG.php @@ -1,6 +1,7 @@ - - + + + diff --git a/app/views/TestResults/SpecimenExamination.php b/app/views/TestResults/SpecimenExamination.php index 09046a1..8b6977d 100644 --- a/app/views/TestResults/SpecimenExamination.php +++ b/app/views/TestResults/SpecimenExamination.php @@ -1,6 +1,7 @@ - - + + + diff --git a/app/views/TestResults/XRay.php b/app/views/TestResults/XRay.php index 0f1ffe0..a84c810 100644 --- a/app/views/TestResults/XRay.php +++ b/app/views/TestResults/XRay.php @@ -1,6 +1,6 @@ - - + + + diff --git a/app/views/TestResults/microbio.php b/app/views/TestResults/microbio.php index d72ba64..bce37f7 100644 --- a/app/views/TestResults/microbio.php +++ b/app/views/TestResults/microbio.php @@ -1,6 +1,7 @@ - - + + + diff --git a/app/views/home/TestRequestViewer.viewer.php b/app/views/home/TestRequestViewer.viewer.php new file mode 100644 index 0000000..4553a01 --- /dev/null +++ b/app/views/home/TestRequestViewer.viewer.php @@ -0,0 +1,34 @@ + + + + + + + + + + +
+
+
+
+
+ + post; + + include "./pms/TestRequestLoader.controller.php"; + /* + $lab_assistant=new LabAssistant(); + + $lab_assistant->setLAType("microbio_lab"); + + */ + + + ?> + + + \ No newline at end of file diff --git a/app/views/home/contents.php b/app/views/home/contents.php index b370ec1..9f382e1 100644 --- a/app/views/home/contents.php +++ b/app/views/home/contents.php @@ -2,8 +2,8 @@ include './app/models/DatabaseConnection/Database.php'; include 'SetUp.php'; -// -include_once './app/views/HeaderAndFooter/header.php'; +//include './app/views/HeaderAndFooter/header.php'; + if (!(isset($_SESSION))){ session_start(); } @@ -15,8 +15,8 @@ - - + + diff --git a/app/views/home/index.php b/app/views/home/index.php index 8ff9470..2a3d376 100644 --- a/app/views/home/index.php +++ b/app/views/home/index.php @@ -2,6 +2,8 @@ start('body'); ?> + +
diff --git a/app/views/layouts/default.php b/app/views/layouts/default.php index fcb440c..b76bcf5 100644 --- a/app/views/layouts/default.php +++ b/app/views/layouts/default.php @@ -8,23 +8,21 @@ <?= $this->siteTitle(); ?> - - - - + + content('head'); ?> - +
diff --git a/app/views/layouts/docmenu.php b/app/views/layouts/docmenu.php new file mode 100644 index 0000000..d321608 --- /dev/null +++ b/app/views/layouts/docmenu.php @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/views/layouts/labmenu.php b/app/views/layouts/labmenu.php new file mode 100644 index 0000000..f01f1dc --- /dev/null +++ b/app/views/layouts/labmenu.php @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/views/layouts/main_menu.php b/app/views/layouts/main_menu.php index 77770ca..61718aa 100644 --- a/app/views/layouts/main_menu.php +++ b/app/views/layouts/main_menu.php @@ -1,14 +1,23 @@ -