Update Urutan BIOCHEMISTRY_23 diatas ENDOCHRONOLOGY_63
This commit is contained in:
parent
9f348e05b8
commit
43a860d108
@ -1191,6 +1191,30 @@ class PrintResult extends BaseController {
|
|||||||
$note = $notes["RESULT"] ?? "-"; // Ambil nilai RESULT, atau null jika tidak ada
|
$note = $notes["RESULT"] ?? "-"; // Ambil nilai RESULT, atau null jika tidak ada
|
||||||
|
|
||||||
$fullPage = "";
|
$fullPage = "";
|
||||||
|
|
||||||
|
|
||||||
|
// KHUSUS ATUR UNTUK URUTAN CHAPTER(BIOCHEMISTRY diatas ENDOCHRONOLOGY_63)
|
||||||
|
// Salin data ENDOCHRONOLOGY_63 ke variabel baru
|
||||||
|
$ENDOCHRONOLOGY_63 = array_filter($data_others, function($row) {
|
||||||
|
return $row['CHAPID'] == 63;
|
||||||
|
});
|
||||||
|
// Hapus Data CHAPID ENDOCHRONOLOGY_63 dari array utama
|
||||||
|
$data_others = array_filter($data_others, function($row) {
|
||||||
|
return $row['CHAPID'] != 63;
|
||||||
|
});
|
||||||
|
$data_others = array_values($data_others);
|
||||||
|
// Cari CHAPID ke 23 yaitu BIOCHEMISTRY
|
||||||
|
$index_last_23 = null;
|
||||||
|
foreach ($data_others as $index => $row) {
|
||||||
|
if ($row['CHAPID'] == 23) {
|
||||||
|
$index_last_23 = $index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Letakkan ENDOCHRONOLOGY_63 dibawah urutan BIOCHEMISTRY
|
||||||
|
if ($index_last_23 !== null) {
|
||||||
|
array_splice($data_others, $index_last_23 + 1, 0, $ENDOCHRONOLOGY_63);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($data_others != null) {
|
if ($data_others != null) {
|
||||||
$fullPage .= $this->pdfViewerNew($data_others, $data, $note);
|
$fullPage .= $this->pdfViewerNew($data_others, $data, $note);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user