diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 8cfeace..f52d7be 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -81,4 +81,5 @@ $routes->group('fo', ['filter' => 'role:fo'], static function ($routes) {
// Printers
$routes->get('/prints/single_sample/(:any)/(:any)', 'PrinterController::printSingleSampleBarcode/$1/$2');
-$routes->get('/prints/all_sample', 'PrinterController::printAllSampleBarcode');
\ No newline at end of file
+$routes->get('/prints/all_sample', 'PrinterController::printAllSampleBarcode');
+$routes->get('/prints/result_test/(:any)', 'PrinterController::printResultTest/$1');
\ No newline at end of file
diff --git a/app/Controllers/PrinterController.php b/app/Controllers/PrinterController.php
index f8ade3b..df0183a 100644
--- a/app/Controllers/PrinterController.php
+++ b/app/Controllers/PrinterController.php
@@ -239,5 +239,1270 @@ P1
);
}
+
+ public function testsUrineOrFeces($request){
+ $fullPage="";
+ $headPage = "
+
+
+

+
+
+
+
+
+
+
+
+ | Parameter |
+ Result |
+ Unit |
+ Normal Range |
+ Notes |
+
+
+ ";
+
+ $resultTest ="";
+ $footerPage = "
+
+ ";
+ $lastDiv="";
+
+ $i=0;
+ foreach ($request as $chapter) {
+
+ $i++;
+ // Untuk Chapter
+ $resultTest .= "
+
+
+ ".$chapter['chapter_eng']."
+ ".$chapter['chapter_ind']."
+ |
+
+ ";
+
+ // Melebihi batas Kertas
+ if($i % 25 == 0) {
+ $resultTest .= "
";
+ $fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
+ $i=0;
+ $resultTest = "";
+ }
+
+ foreach($chapter["tests"] as $test) {
+ $i++;
+ $resultTest .= "
+
+
+ ".$test["test_eng"]."
+ ".$test["test_ind"]."
+ |
+ " . $test["result"] . " |
+ " . $test["unit"] . " |
+ " . $test["range"] . " |
+ " . $test["notes"] . " |
+
+ ";
+
+ // Melebihi batas Kertas
+ if($i % 25 == 0) {
+ $resultTest .= "
";
+ $fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
+ $i=0;
+ $resultTest = "";
+ }
+ }
+
+ }
+ $resultTest .= "
+
+ ";
+
+ $fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
+
+ return $fullPage;
+ }
+
+ public function otherTests($request){
+ $fullPage="";
+ $headPage = "
+
+
+

+
+
+
+
+
+
+
+ | Parameter |
+ Result |
+ Unit |
+ Normal Range |
+ Notes |
+
+
+ ";
+
+ $resultTest ="";
+ $resultNoteandSpecimen = "
+
+
+
+
+ | Notes |
+
+
+ |
+ Hasil pemeriksaan sedikit di luar rentang normal. Disarankan untuk memantau kondisi ini dan melakukan pemeriksaan ulang jika diperlukan.
+ |
+
+
+
+
+
+
+
+ Collection datetime : EDTA,SERUM 13-11-2024 10.00 |
+
+
+ Reception datetime : EDTA,SERUM 13-11-2024 12.00 |
+
+
+ ";
+ $footerPage = "
+
+ ";
+ $lastDiv="";
+
+ $i=0;
+ foreach ($request as $chapter) {
+
+ $i++;
+ // Untuk Chapter
+ $resultTest .= "
+
+
+ ".$chapter['chapter_eng']."
+ ".$chapter['chapter_ind']."
+ |
+
+ ";
+
+ // Melebihi batas Kertas
+ if($i % 22 == 0) {
+ $resultTest .= "
";
+ $fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
+ $i=0;
+ $resultTest = "";
+ }
+
+ foreach($chapter["tests"] as $test) {
+ $i++;
+ $resultTest .= "
+
+
+
+ ".$test["test_eng"]."
+ ".$test["test_ind"]."
+ |
+ " . $test["result"] . " |
+ " . $test["unit"] . " |
+ " . $test["range"] . " |
+ " . $test["notes"] . " |
+
+ ";
+
+ // Melebihi batas Kertas
+ if($i % 22 == 0) {
+ $resultTest .= "
";
+ $fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
+ $i=0;
+ $resultTest = "";
+ }
+ }
+
+ }
+ $resultTest .= "
+
+ ".$resultNoteandSpecimen."
+ ";
+
+ $fullPage .= $headPage.$resultTest.$footerPage.$lastDiv;
+
+ return $fullPage;
+ }
+
+ public function printResultTest($access) {
+
+ $data_mentah = [
+ [
+ "chapter_eng" => "IMUNOLOGY 4 PANEL",
+ "chapter_ind" => "IMUNOLOGI 4 PANEL",
+ "tests" => [
+ [
+ "test_eng" => "HBsAg",
+ "test_ind" => "HBsAg",
+ "result" => "Non-Reactive",
+ "unit" => "mL/g",
+ "range" => "Non-Reactive",
+ "notes" => "Baik dan Tidak Berbahaya"
+ ],
+ [
+ "test_eng" => "Anti-TP Test",
+ "test_ind" => "Tes Anti-TP",
+ "result" => "Non-Reactive",
+ "unit" => "",
+ "range" => "",
+ "notes" => "Baik dan Tidak Berbahaya"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "CARDIOLOGY 2 PANEL",
+ "chapter_ind" => "KARDIOLOGI 2 PANEL",
+ "tests" => [
+ [
+ "test_eng" => "Troponin I",
+ "test_ind" => "Troponin I",
+ "result" => "0.03",
+ "unit" => "ng/mL",
+ "range" => "< 0.04",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "CK-MB",
+ "test_ind" => "CK-MB",
+ "result" => "5.0",
+ "unit" => "ng/mL",
+ "range" => "0 - 5",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "DIABETES 3 PANEL",
+ "chapter_ind" => "DIABETES 3 PANEL",
+ "tests" => [
+ [
+ "test_eng" => "Fasting Blood Glucose",
+ "test_ind" => "Gula Darah Puasa",
+ "result" => "95",
+ "unit" => "mg/dL",
+ "range" => "70 - 99",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "HbA1c",
+ "test_ind" => "HbA1c",
+ "result" => "5.6%",
+ "unit" => "%",
+ "range" => "< 5.7%",
+ "notes" => "Tidak ada indikasi diabetes"
+ ],
+ [
+ "test_eng" => "Random Blood Glucose",
+ "test_ind" => "Gula Darah Sewaktu",
+ "result" => "130",
+ "unit" => "mg/dL",
+ "range" => "70 - 140",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "LIVER FUNCTION PANEL",
+ "chapter_ind" => "PANEL FUNGSI HATI",
+ "tests" => [
+ [
+ "test_eng" => "ALT (SGPT)",
+ "test_ind" => "ALT (SGPT)",
+ "result" => "25",
+ "unit" => "U/L",
+ "range" => "0 - 35",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "AST (SGOT)",
+ "test_ind" => "AST (SGOT)",
+ "result" => "20",
+ "unit" => "U/L",
+ "range" => "0 - 35",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "RENAL FUNCTION PANEL",
+ "chapter_ind" => "PANEL FUNGSI GINJAL",
+ "tests" => [
+ [
+ "test_eng" => "Creatinine",
+ "test_ind" => "Kreatinin",
+ "result" => "1.0",
+ "unit" => "mg/dL",
+ "range" => "0.7 - 1.3",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "Urea",
+ "test_ind" => "Ureum",
+ "result" => "35",
+ "unit" => "mg/dL",
+ "range" => "15 - 40",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "FECES",
+ "chapter_ind" => "PANEL FESES",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Consistency",
+ "test_ind" => "Konsistensi",
+ "result" => "Soft",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Konsistensi lunak, tidak cair atau keras"
+ ],
+ [
+ "test_eng" => "Occult Blood",
+ "test_ind" => "Darah Tersembunyi",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ditemukan darah tersembunyi"
+ ],
+ [
+ "test_eng" => "Parasites",
+ "test_ind" => "Parasit",
+ "result" => "None",
+ "unit" => "",
+ "range" => "None",
+ "notes" => "Tidak ditemukan parasit"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "URINE",
+ "chapter_ind" => "PANEL URIN",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Yellow",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna kuning normal"
+ ],
+ [
+ "test_eng" => "Clarity",
+ "test_ind" => "Kejernihan",
+ "result" => "Clear",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Jernih tanpa sedimen"
+ ],
+ [
+ "test_eng" => "pH",
+ "test_ind" => "pH",
+ "result" => "6.0",
+ "unit" => "",
+ "range" => "4.5 - 8.0",
+ "notes" => "pH dalam rentang normal"
+ ],
+ [
+ "test_eng" => "Protein",
+ "test_ind" => "Protein",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada protein dalam urin"
+ ],
+ [
+ "test_eng" => "Glucose",
+ "test_ind" => "Glukosa",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada glukosa dalam urin"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "IMUNOLOGY 4 PANEL",
+ "chapter_ind" => "IMUNOLOGI 4 PANEL",
+ "tests" => [
+ [
+ "test_eng" => "HBsAg",
+ "test_ind" => "HBsAg",
+ "result" => "Non-Reactive",
+ "unit" => "mL/g",
+ "range" => "Non-Reactive",
+ "notes" => "Baik dan Tidak Berbahaya"
+ ],
+ [
+ "test_eng" => "Anti-TP Test",
+ "test_ind" => "Tes Anti-TP",
+ "result" => "Non-Reactive",
+ "unit" => "",
+ "range" => "",
+ "notes" => "Baik dan Tidak Berbahaya"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "CARDIOLOGY 2 PANEL",
+ "chapter_ind" => "KARDIOLOGI 2 PANEL",
+ "tests" => [
+ [
+ "test_eng" => "Troponin I",
+ "test_ind" => "Troponin I",
+ "result" => "0.03",
+ "unit" => "ng/mL",
+ "range" => "< 0.04",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "CK-MB",
+ "test_ind" => "CK-MB",
+ "result" => "5.0",
+ "unit" => "ng/mL",
+ "range" => "0 - 5",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "DIABETES 3 PANEL",
+ "chapter_ind" => "DIABETES 3 PANEL",
+ "tests" => [
+ [
+ "test_eng" => "Fasting Blood Glucose",
+ "test_ind" => "Gula Darah Puasa",
+ "result" => "95",
+ "unit" => "mg/dL",
+ "range" => "70 - 99",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "HbA1c",
+ "test_ind" => "HbA1c",
+ "result" => "5.6%",
+ "unit" => "%",
+ "range" => "< 5.7%",
+ "notes" => "Tidak ada indikasi diabetes"
+ ],
+ [
+ "test_eng" => "Random Blood Glucose",
+ "test_ind" => "Gula Darah Sewaktu",
+ "result" => "130",
+ "unit" => "mg/dL",
+ "range" => "70 - 140",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "LIVER FUNCTION PANEL",
+ "chapter_ind" => "PANEL FUNGSI HATI",
+ "tests" => [
+ [
+ "test_eng" => "ALT (SGPT)",
+ "test_ind" => "ALT (SGPT)",
+ "result" => "25",
+ "unit" => "U/L",
+ "range" => "0 - 35",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "AST (SGOT)",
+ "test_ind" => "AST (SGOT)",
+ "result" => "20",
+ "unit" => "U/L",
+ "range" => "0 - 35",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "RENAL FUNCTION PANEL",
+ "chapter_ind" => "PANEL FUNGSI GINJAL",
+ "tests" => [
+ [
+ "test_eng" => "Creatinine",
+ "test_ind" => "Kreatinin",
+ "result" => "1.0",
+ "unit" => "mg/dL",
+ "range" => "0.7 - 1.3",
+ "notes" => "Normal"
+ ],
+ [
+ "test_eng" => "Urea",
+ "test_ind" => "Ureum",
+ "result" => "35",
+ "unit" => "mg/dL",
+ "range" => "15 - 40",
+ "notes" => "Normal"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "FECES",
+ "chapter_ind" => "PANEL FESES",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Consistency",
+ "test_ind" => "Konsistensi",
+ "result" => "Soft",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Konsistensi lunak, tidak cair atau keras"
+ ],
+ [
+ "test_eng" => "Occult Blood",
+ "test_ind" => "Darah Tersembunyi",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ditemukan darah tersembunyi"
+ ],
+ [
+ "test_eng" => "Parasites",
+ "test_ind" => "Parasit",
+ "result" => "None",
+ "unit" => "",
+ "range" => "None",
+ "notes" => "Tidak ditemukan parasit"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "URINE",
+ "chapter_ind" => "PANEL URIN",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Yellow",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna kuning normal"
+ ],
+ [
+ "test_eng" => "Clarity",
+ "test_ind" => "Kejernihan",
+ "result" => "Clear",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Jernih tanpa sedimen"
+ ],
+ [
+ "test_eng" => "pH",
+ "test_ind" => "pH",
+ "result" => "6.0",
+ "unit" => "",
+ "range" => "4.5 - 8.0",
+ "notes" => "pH dalam rentang normal"
+ ],
+ [
+ "test_eng" => "Protein",
+ "test_ind" => "Protein",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada protein dalam urin"
+ ],
+ [
+ "test_eng" => "Glucose",
+ "test_ind" => "Glukosa",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada glukosa dalam urin"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "FECES",
+ "chapter_ind" => "PANEL FESES",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Consistency",
+ "test_ind" => "Konsistensi",
+ "result" => "Soft",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Konsistensi lunak, tidak cair atau keras"
+ ],
+ [
+ "test_eng" => "Occult Blood",
+ "test_ind" => "Darah Tersembunyi",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ditemukan darah tersembunyi"
+ ],
+ [
+ "test_eng" => "Parasites",
+ "test_ind" => "Parasit",
+ "result" => "None",
+ "unit" => "",
+ "range" => "None",
+ "notes" => "Tidak ditemukan parasit"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "URINE",
+ "chapter_ind" => "PANEL URIN",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Yellow",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna kuning normal"
+ ],
+ [
+ "test_eng" => "Clarity",
+ "test_ind" => "Kejernihan",
+ "result" => "Clear",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Jernih tanpa sedimen"
+ ],
+ [
+ "test_eng" => "pH",
+ "test_ind" => "pH",
+ "result" => "6.0",
+ "unit" => "",
+ "range" => "4.5 - 8.0",
+ "notes" => "pH dalam rentang normal"
+ ],
+ [
+ "test_eng" => "Protein",
+ "test_ind" => "Protein",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada protein dalam urin"
+ ],
+ [
+ "test_eng" => "Glucose",
+ "test_ind" => "Glukosa",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada glukosa dalam urin"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "FECES",
+ "chapter_ind" => "PANEL FESES",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Consistency",
+ "test_ind" => "Konsistensi",
+ "result" => "Soft",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Konsistensi lunak, tidak cair atau keras"
+ ],
+ [
+ "test_eng" => "Occult Blood",
+ "test_ind" => "Darah Tersembunyi",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ditemukan darah tersembunyi"
+ ],
+ [
+ "test_eng" => "Parasites",
+ "test_ind" => "Parasit",
+ "result" => "None",
+ "unit" => "",
+ "range" => "None",
+ "notes" => "Tidak ditemukan parasit"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "URINE",
+ "chapter_ind" => "PANEL URIN",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Yellow",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna kuning normal"
+ ],
+ [
+ "test_eng" => "Clarity",
+ "test_ind" => "Kejernihan",
+ "result" => "Clear",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Jernih tanpa sedimen"
+ ],
+ [
+ "test_eng" => "pH",
+ "test_ind" => "pH",
+ "result" => "6.0",
+ "unit" => "",
+ "range" => "4.5 - 8.0",
+ "notes" => "pH dalam rentang normal"
+ ],
+ [
+ "test_eng" => "Protein",
+ "test_ind" => "Protein",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada protein dalam urin"
+ ],
+ [
+ "test_eng" => "Glucose",
+ "test_ind" => "Glukosa",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada glukosa dalam urin"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "FECES",
+ "chapter_ind" => "PANEL FESES",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Brown",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna normal tanpa indikasi penyakit"
+ ],
+ [
+ "test_eng" => "Consistency",
+ "test_ind" => "Konsistensi",
+ "result" => "Soft",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Konsistensi lunak, tidak cair atau keras"
+ ],
+ [
+ "test_eng" => "Occult Blood",
+ "test_ind" => "Darah Tersembunyi",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ditemukan darah tersembunyi"
+ ],
+ [
+ "test_eng" => "Parasites",
+ "test_ind" => "Parasit",
+ "result" => "None",
+ "unit" => "",
+ "range" => "None",
+ "notes" => "Tidak ditemukan parasit"
+ ]
+ ]
+ ],
+ [
+ "chapter_eng" => "URINE",
+ "chapter_ind" => "PANEL URIN",
+ "tests" => [
+ [
+ "test_eng" => "Color",
+ "test_ind" => "Warna",
+ "result" => "Yellow",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Warna kuning normal"
+ ],
+ [
+ "test_eng" => "Clarity",
+ "test_ind" => "Kejernihan",
+ "result" => "Clear",
+ "unit" => "",
+ "range" => "Normal",
+ "notes" => "Jernih tanpa sedimen"
+ ],
+ [
+ "test_eng" => "pH",
+ "test_ind" => "pH",
+ "result" => "6.0",
+ "unit" => "",
+ "range" => "4.5 - 8.0",
+ "notes" => "pH dalam rentang normal"
+ ],
+ [
+ "test_eng" => "Protein",
+ "test_ind" => "Protein",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada protein dalam urin"
+ ],
+ [
+ "test_eng" => "Glucose",
+ "test_ind" => "Glukosa",
+ "result" => "Negative",
+ "unit" => "",
+ "range" => "Negative",
+ "notes" => "Tidak ada glukosa dalam urin"
+ ]
+ ]
+ ],
+ ];
+
+ // Seleksi data yang mengandung "URINE"
+ $data_urine = array_filter($data_mentah, function($item) {
+ $chapter = strtolower($item["chapter_eng"]);
+ return stripos($chapter, "urine") !== false;
+ });
+
+ // Seleksi data yang mengandung "FESES"
+ $data_feces = array_filter($data_mentah, function($item) {
+ $chapter = strtolower($item["chapter_eng"]);
+ return stripos($chapter, "feces") !== false;
+ });
+
+ // Seleksi data yang tidak mengandung kata "urine" atau "feces"
+ $data_others = array_filter($data_mentah, function($item) {
+ $chapter = strtolower($item["chapter_eng"]);
+ return stripos($chapter, "urine") === false && strpos($chapter, "feces") === false;
+ });
+
+ $fullPage = "";
+
+ if ($data_urine !== null) {
+ $fullPage .= $this->testsUrineOrFeces($data_urine);
+ }
+ if ($data_feces !== null) {
+ $fullPage .= $this->testsUrineOrFeces($data_feces);
+ }
+ if ($data_others !== null) {
+ $fullPage .= $this->otherTests($data_others);
+ }
+
+ return view('result_report', ['data' => $fullPage]);
+ }
+
}
\ No newline at end of file
diff --git a/app/Views/admin/dashboard.php b/app/Views/admin/dashboard.php
index 311e394..46974a8 100644
--- a/app/Views/admin/dashboard.php
+++ b/app/Views/admin/dashboard.php
@@ -17,6 +17,7 @@