diff --git a/htdocs/app/Http/Controllers/DokterController.php b/htdocs/app/Http/Controllers/DokterController.php
index 76e48b04..613a9901 100644
--- a/htdocs/app/Http/Controllers/DokterController.php
+++ b/htdocs/app/Http/Controllers/DokterController.php
@@ -1065,21 +1065,21 @@ class DokterController extends Controller
$getnama = User::where('id', $analis)->first();
Periksa::where('nofoto', $nofoto)->update([
'analis' => $analis,
- 'nmanalis' => $getnama->nama
+ 'nmanalis' => $getnama->nama ?? ''
]);
} else if ($request->input('komponen') == 'ppds3'){
$ppds3 = $request->input('isi');
$getnama = User::where('id', $ppds3)->first();
Periksa::where('nofoto', $nofoto)->update([
- 'ppds3' => $ppds3,
- 'nmppdssenior' => $getnama->nama
+ 'ppdssenior' => $ppds3,
+ 'nmppdssenior' => $getnama->nama ?? ''
]);
} else {
$dokter_id = $request->input('isi');
$getnama = User::where('id', $dokter_id)->first();
Periksa::where('nofoto', $nofoto)->update([
'dokter_id' => $dokter_id,
- 'nmdokter' => $getnama->nama
+ 'nmdokter' => $getnama->nama ?? ''
]);
}
} else {
@@ -1091,7 +1091,7 @@ class DokterController extends Controller
]);
} else if ($request->input('komponen') == 'ppds3'){
Periksa::where('nofoto', $nofoto)->update([
- 'ppds3' => 0,
+ 'ppdssenior' => 0,
'nmppdssenior' => '',
'nmdrafter' => Session('nama'),
]);
@@ -1254,11 +1254,60 @@ class DokterController extends Controller
$ketemu = '';
$organism = '';
$nomor = 1;
+ $jsonantibiotik = array(
+ 'Oxacillin-OX',
+ 'Cefoxitin-FOX',
+ 'Benzylpenicillin-P',
+ 'Ampicillin-AM',
+ 'Azithromycin-AZM',
+ 'Erythromycin-ERY',
+ 'Cefazolin-CZO',
+ 'Cefepime-FEP',
+ 'Cefixime-CFM',
+ 'Cefotaxime-CTX',
+ 'Cefuroxime-CXM',
+ 'Ceftazidime-CAZ',
+ 'Ceftriaxone-CRO',
+ 'Ceftazidime/Avibactam-CZA',
+ 'Piperacilin/Tazobactam-TZP',
+ 'Ampicillin/Sulbactam-SAM',
+ 'Amoxicillin/Clavulanate-AMC',
+ 'Cefoperazon/Sulbactam-SCF',
+ 'Aztreonam-ATM',
+ 'Ceftaroline-CPT',
+ 'Ciprofloxacin-CIP',
+ 'Levofloxacin-LEV',
+ 'Moxifloxacin-MFX',
+ 'Clindamycin-CLI',
+ 'Colistin-CS',
+ 'Tetracyclin-TCY',
+ 'Tigecycline-TGC',
+ 'Gentamicin-GM',
+ 'Amikacin-AN',
+ 'Meropenem-MEM',
+ 'Imipenem-IPM',
+ 'Doripenem-DOR',
+ 'Ertapenem-ETP',
+ 'Minocycline-MNO',
+ 'Doxycycline-DOX',
+ 'Spectinomycin-SPT',
+ 'Tigecycline-TGC',
+ 'Trimethoprim/Sulfamethoxazole-SXT',
+ 'Fosfomycin-FOS',
+ 'Vancomycin-VAN',
+ 'Linezolid-LNZ',
+ 'Fluconazole',
+ 'Voriconazole',
+ 'Caspofungin',
+ 'Micafungin',
+ 'Amphotericin B',
+ 'Flucytosine'
+ );
+
try {
$cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get();
if (!empty($cekada)){
foreach($cekada as $rows){
- $jsondata = $rows->additional_result;
if ($rows->organism !== null){
$organism = $rows->organism;
$sudah = Organisms::where('name', $organism)->count();
@@ -1270,6 +1319,33 @@ class DokterController extends Controller
]);
}
}
+ if (!empty($rows->additional_result)) {
+ $firstDecode = json_decode($rows->additional_result, true);
+ if (is_string($firstDecode)) {
+ $data = json_decode($firstDecode, true);
+ } else {
+ $data = $firstDecode;
+ }
+ if (is_array($data)) {
+ foreach ($data as $item) {
+ $glassreportname = in_array($item['antibiotic_name'], $jsonantibiotik);
+ RekapAntibiotik::updateOrCreate(
+ [
+ 'orderid' => $orderid,
+ 'antibiotic' => $item['antibiotic_name'],
+ ],
+ [
+ 'resistance' => $item['resistance_note'] ?? null,
+ 'value' => $item['value'] ?? null,
+ 'interpretation' => $item['interpretation'] ?? null,
+ 'glassreportname' => $glassreportname,
+ 'created_at' => date('Y-m-d H:i:s'),
+ 'updated_at' => date('Y-m-d H:i:s'),
+ ]
+ );
+ }
+ }
+ }
}
}
$gentabel = RekapAntibiotik::where('orderid', $orderid)->get();
@@ -1307,6 +1383,8 @@ class DokterController extends Controller
]
);
}
+ } else {
+
}
if ($isidata == '' OR is_null($isidata)){
} else {
diff --git a/htdocs/app/Http/Controllers/JsonTransferController.php b/htdocs/app/Http/Controllers/JsonTransferController.php
index 38ee4936..c7a16f48 100644
--- a/htdocs/app/Http/Controllers/JsonTransferController.php
+++ b/htdocs/app/Http/Controllers/JsonTransferController.php
@@ -14,11 +14,11 @@ class JsonTransferController extends Controller
public function index()
{
//POSTGRESS
- //$tables = DB::select("SELECT tablename FROM pg_tables WHERE schemaname = 'public'");
- //$tableNames = array_map(fn($t) => $t->tablename, $tables);
+ $tables = DB::select("SELECT tablename FROM pg_tables WHERE schemaname = 'public'");
+ $tableNames = array_map(fn($t) => $t->tablename, $tables);
//MYSQL
- $tables = DB::select('SHOW TABLES');
- $tableNames = array_map('current', $tables);
+ //$tables = DB::select('SHOW TABLES');
+ //$tableNames = array_map('current', $tables);
$tableInfo = [];
foreach ($tableNames as $table) {
@@ -37,12 +37,12 @@ class JsonTransferController extends Controller
{
//POSTGRESS
- //$tables = DB::select("SELECT tablename FROM pg_tables WHERE schemaname = 'public'");
- //$tableNames = array_map(fn($t) => $t->tablename, $tables);
+ $tables = DB::select("SELECT tablename FROM pg_tables WHERE schemaname = 'public'");
+ $tableNames = array_map(fn($t) => $t->tablename, $tables);
//MYSQL
- $tables = DB::select('SHOW TABLES');
- $tableNames = array_map('current', $tables);
+ //$tables = DB::select('SHOW TABLES');
+ //$tableNames = array_map('current', $tables);
foreach ($tableNames as $table) {
try {
diff --git a/htdocs/app/Http/Controllers/ListController.php b/htdocs/app/Http/Controllers/ListController.php
index 3316755b..ed0154dd 100644
--- a/htdocs/app/Http/Controllers/ListController.php
+++ b/htdocs/app/Http/Controllers/ListController.php
@@ -16,7 +16,7 @@ use App\Jadwalperiksa;
use Carbon\Carbon;
use DateTime;
use Session;
-
+use Illuminate\Support\Facades\Log;
class ListController extends Controller
{
public function index() {
@@ -122,129 +122,212 @@ class ListController extends Controller
}
$arraylist = $arraylist->get();
} else if ($master == 'verificationppds') {
- $arraylist = Periksa::select('id', 'mulai', 'akhir', 'noloket', 'nofoto', 'noregister', 'asalpasien', 'nmrs', 'pasien_id', 'nmpasien', 'jkpasien', 'tgllahirpasien', 'tlppasien', 'alamatpasien', 'reques', 'usia', 'berat','ruangan', 'nmdokter', 'nmppdssenior', 'nmmiddleppds', 'nmppdsjunior', 'nmppdsmiddle2', 'nmppdsjunior2', 'nmanalis', 'nmexcutor', 'klinisi', 'klinis', 'asuransi', 'urgensi', 'diagnosa', 'diagnosa2', 'modality', 'dlp', 'daftar', 'foto', 'tgldraft', 'nmdrafter', 'baca', 'nmpembaca', 'verifikasi', 'export', 'tgladendum', 'nmadendum', 'filefoto', 'status',
- DB::raw('DATE(daftar) as daftartgl'),
- DB::raw('TIME(daftar) as daftarjam'),
- DB::raw('TIME(export) as cetakjam'),
- DB::raw('TIME(verifikasi) as verifikasijam'),
- DB::raw('TIME(baca) as bacajam'),
- DB::raw('TIME(foto) as fotojam'),
- DB::raw("GROUP_CONCAT(nofoto SEPARATOR '
') as nofoto_list"),
- DB::raw("GROUP_CONCAT(reques SEPARATOR '
') as reques_list"),
- DB::raw("CASE WHEN jkpasien = 'L' THEN '1' ELSE '' END AS l"),
- DB::raw("CASE WHEN jkpasien = 'P' THEN '1' ELSE '' END AS p"),
- DB::raw("CASE WHEN asuransi = 'JKN' THEN '1' WHEN asuransi = 'BPJS' THEN '1' ELSE '' END AS jkn"),
- DB::raw("CASE WHEN asuransi = 'Billing' THEN '1' ELSE '' END AS billing"),
- DB::raw("CASE WHEN asuransi = 'GCU' THEN '1' ELSE '' END AS gcu"),
- DB::raw("CASE WHEN asuransi = 'MANDIRI' THEN '1' WHEN asuransi = 'Umum' THEN '1' ELSE '' END AS umum"),
- DB::raw("CASE WHEN asuransi = 'SWASTA' THEN '1' ELSE '' END AS swasta"),
- DB::raw("CASE WHEN asuransi = 'TAG' THEN '1' ELSE '' END AS tag"),
- DB::raw("CASE WHEN urgensi != 'CITO' THEN '1' ELSE '' END AS elective"),
- DB::raw("CASE WHEN urgensi = 'CITO' THEN '1' ELSE '' END AS cito"),
- DB::raw("CASE
- WHEN nofoto LIKE '%IGD%' THEN 'IGD'
- WHEN nofoto LIKE '%PAV%' THEN 'PAVILIUN'
- ELSE 'SENTRAL'
- END AS inputor"),
- DB::raw("CASE
- WHEN status IS NULL THEN 'NEW'
- WHEN status LIKE '%Dibatalkan%' THEN 'Batal'
- WHEN status LIKE '%Telah%' THEN 'Telah di kirim ke worklist/modalitas'
- WHEN status LIKE '%Diperiksa%' THEN 'Diperiksa'
- WHEN status LIKE '%Draft%' THEN 'Draft'
- WHEN status LIKE '%Expertise%' THEN 'Expertise'
- WHEN status LIKE '%Decliend%' THEN 'Decliend'
- WHEN status LIKE '%Selesai%' THEN 'Selesai'
- WHEN status LIKE '%Arsip%' THEN 'Arsip'
- ELSE 'Unkown'
- END AS status_label"));
+ $arraylist = Periksa::select(
+ 'id', 'mulai', 'akhir', 'orderid', 'noloket', 'nofoto', 'noregister', 'asalpasien', 'nmrs', 'pasien_id', 'nmpasien',
+ 'jkpasien', 'tgllahirpasien', 'tlppasien', 'alamatpasien', 'reques', 'usia', 'berat', 'ktp', 'bpjs', 'ruangan_id',
+ 'ruangan', 'dokter_id', 'ppdssenior', 'middleppds', 'ppdsjunior', 'ppdsmiddle2', 'ppdsjunior2', 'analis', 'excutor',
+ 'nmdokter', 'nmppdssenior', 'nmmiddleppds', 'nmppdsjunior', 'nmppdsmiddle2', 'nmppdsjunior2', 'nmanalis', 'nmexcutor',
+ 'klinisi', 'klinis', 'keterangan', 'kesimpulan', 'poli_id', 'asuransi', 'urgensi', 'diagnosa', 'diagnosa2', 'modality',
+ 'kd_spesimen', 'nm_spesimen', 'dlp', 'daftar', 'foto', 'tgldraft', 'nmdrafter', 'baca', 'nmpembaca', 'verifikasi',
+ 'export', 'tgladendum', 'nmadendum', 'filefoto', 'pendaftar', 'status', 'created_at', 'updated_at',
+ 'bhp_media', 'bhp_potsputum', 'bhp_poturine', 'bhp_oshe', 'bhp_obyekglass', 'bhp_botolbd', 'bhp_parafilm',
+ 'bhp_tips', 'bhp_cottonswab', 'bhp_antibiotiktambahan', 'id_esbl', 'id_mrsa', 'rating', 'nmpendaftar',
+
+ DB::raw("DATE(daftar) as daftartgl"),
+ DB::raw("TO_CHAR(daftar, 'HH24:MI:SS') as daftarjam"),
+ DB::raw("TO_CHAR(export, 'HH24:MI:SS') as cetakjam"),
+ DB::raw("TO_CHAR(verifikasi, 'HH24:MI:SS') as verifikasijam"),
+ DB::raw("TO_CHAR(baca, 'HH24:MI:SS') as bacajam"),
+ DB::raw("TO_CHAR(foto, 'HH24:MI:SS') as fotojam"),
+
+ DB::raw("CASE WHEN jkpasien = 'L' THEN '1' ELSE '' END AS l"),
+ DB::raw("CASE WHEN jkpasien = 'P' THEN '1' ELSE '' END AS p"),
+ DB::raw("CONCAT('https://10.10.123.218/hasil/', nofoto::text) as urlhasil"),
+
+ DB::raw("CASE WHEN asuransi IN ('JKN', 'BPJS') THEN '1' ELSE '' END AS jkn"),
+ DB::raw("CASE WHEN asuransi = 'Billing' THEN '1' ELSE '' END AS billing"),
+ DB::raw("CASE WHEN asuransi = 'GCU' THEN '1' ELSE '' END AS gcu"),
+ DB::raw("CASE WHEN asuransi IN ('MANDIRI', 'Umum') THEN '1' ELSE '' END AS umum"),
+ DB::raw("CASE WHEN asuransi = 'SWASTA' THEN '1' ELSE '' END AS swasta"),
+ DB::raw("CASE WHEN asuransi = 'TAG' THEN '1' ELSE '' END AS tag"),
+
+ DB::raw("CASE WHEN urgensi != 'CITO' THEN '1' ELSE '' END AS elective"),
+ DB::raw("CASE WHEN urgensi = 'CITO' THEN '1' ELSE '' END AS cito"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN 'NEW'
+ WHEN status LIKE '%Dibatalkan%' THEN 'Batal'
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN 'Pemeriksaan Sampel'
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN 'Diperiksa'
+ WHEN status LIKE '%Draft%' THEN 'Draft'
+ WHEN status LIKE '%Expertise%' THEN 'Expertise'
+ WHEN status LIKE '%Decliend%' THEN 'Decliend'
+ WHEN status LIKE '%Selesai%' THEN 'Selesai'
+ WHEN status LIKE '%Arsip%' THEN 'Arsip'
+ ELSE 'Unkown'
+ END AS tlsstatus"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', nofoto::text, '')
+ ELSE CONCAT('', nofoto::text, '')
+ END AS tlsnofoto"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', noregister::text, '')
+ ELSE CONCAT('', noregister::text, '')
+ END AS tlsnoregister"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', nmpasien::text, '')
+ ELSE CONCAT('', nmpasien::text, '')
+ END AS tlsnama"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', reques::text, '')
+ ELSE CONCAT('', reques::text, '')
+ END AS tlsreques")
+ );
+
- if ($valcari == 'allspv'){
+ if ($lokasi == 'allspv'){
$arraylist = $arraylist->where('status', 'LIKE', 'Expertise Saved (Un Verified)')->whereNull('periksa.verifikasi');
} else {
$arraylist = $arraylist->where('status', 'LIKE', 'Expertise Saved (Un Verified)')->whereNull('periksa.verifikasi')->where('periksa.dokter_id', Session('id'));
}
$arraylist = $arraylist->get();
} else {
- $arraylist = Periksa::select('id', 'mulai', 'akhir', 'noloket', 'nofoto', 'noregister', 'asalpasien', 'nmrs', 'pasien_id', 'nmpasien', 'jkpasien', 'tgllahirpasien', 'tlppasien', 'alamatpasien', 'reques', 'usia', 'berat', 'ruangan_id', 'ruangan', 'dokter_id', 'ppdssenior', 'middleppds', 'ppdsjunior', 'ppdsmiddle2', 'ppdsjunior2', 'analis', 'excutor', 'nmdokter', 'nmppdssenior', 'nmmiddleppds', 'nmppdsjunior', 'nmppdsmiddle2', 'nmppdsjunior2', 'nmanalis', 'nmexcutor', 'klinisi', 'klinis', 'keterangan', 'kesimpulan', 'poli_id', 'asuransi', 'urgensi', 'diagnosa', 'diagnosa2', 'modality', 'dlp', 'daftar', 'foto', 'tgldraft', 'nmdrafter', 'baca', 'nmpembaca', 'verifikasi', 'export', 'tgladendum', 'nmadendum', 'filefoto', 'status', 'created_at', 'updated_at',
- DB::raw('DATE(daftar) as daftartgl'),
- DB::raw('TIME(daftar) as daftarjam'),
- DB::raw('TIME(export) as cetakjam'),
- DB::raw('TIME(verifikasi) as verifikasijam'),
- DB::raw('TIME(baca) as bacajam'),
- DB::raw('TIME(foto) as fotojam'),
- DB::raw("CASE WHEN jkpasien = 'L' THEN '1' ELSE '' END AS l"),
- DB::raw("CASE WHEN jkpasien = 'P' THEN '1' ELSE '' END AS p"),
- DB::raw("CONCAT('https://10.10.123.218/hasil/', nofoto) as urlhasil"),
- DB::raw("CASE WHEN asuransi = 'JKN' THEN '1' WHEN asuransi = 'BPJS' THEN '1' ELSE '' END AS jkn"),
- DB::raw("CASE WHEN asuransi = 'Billing' THEN '1' ELSE '' END AS billing"),
- DB::raw("CASE WHEN asuransi = 'GCU' THEN '1' ELSE '' END AS gcu"),
- DB::raw("CASE WHEN asuransi = 'MANDIRI' THEN '1' WHEN asuransi = 'Umum' THEN '1' ELSE '' END AS umum"),
- DB::raw("CASE WHEN asuransi = 'SWASTA' THEN '1' ELSE '' END AS swasta"),
- DB::raw("CASE WHEN asuransi = 'TAG' THEN '1' ELSE '' END AS tag"),
- DB::raw("CASE WHEN urgensi != 'CITO' THEN '1' ELSE '' END AS elective"),
- DB::raw("CASE WHEN urgensi = 'CITO' THEN '1' ELSE '' END AS cito"),
- DB::raw("CASE
- WHEN status IS NULL THEN 'NEW'
- WHEN status LIKE '%Dibatalkan%' THEN 'Batal'
- WHEN status LIKE '%Telah%' THEN 'Telah di kirim ke worklist/modalitas'
- WHEN status LIKE '%Diperiksa%' THEN 'Diperiksa'
- WHEN status LIKE '%Draft%' THEN 'Draft'
- WHEN status LIKE '%Expertise%' THEN 'Expertise'
- WHEN status LIKE '%Decliend%' THEN 'Decliend'
- WHEN status LIKE '%Selesai%' THEN 'Selesai'
- WHEN status LIKE '%Arsip%' THEN 'Arsip'
- ELSE 'Unkown'
- END AS status_label"),
- DB::raw("CASE
- WHEN status IS NULL THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Telah%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Diperiksa%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Draft%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Expertise%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Decliend%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Selesai%' THEN CONCAT('', nofoto, '')
- WHEN status LIKE '%Arsip%' THEN CONCAT('', nofoto, '')
- ELSE CONCAT('', nofoto, '')
- END AS tlsnofoto"),
- DB::raw("CASE
- WHEN status IS NULL THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Telah%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Diperiksa%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Draft%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Expertise%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Decliend%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Selesai%' THEN CONCAT('', noregister, '')
- WHEN status LIKE '%Arsip%' THEN CONCAT('', noregister, '')
- ELSE CONCAT('', noregister, '')
- END AS tlsnoregister"),
- DB::raw("CASE
- WHEN status IS NULL THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Telah%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Diperiksa%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Draft%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Expertise%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Decliend%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Selesai%' THEN CONCAT('', nmpasien, '')
- WHEN status LIKE '%Arsip%' THEN CONCAT('', nmpasien, '')
- ELSE CONCAT('', nmpasien, '')
- END AS tlsnama"),
- DB::raw("CASE
- WHEN status IS NULL THEN CONCAT('', reques, '')
- WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Telah%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Diperiksa%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Draft%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Expertise%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Decliend%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Selesai%' THEN CONCAT('', reques, '')
- WHEN status LIKE '%Arsip%' THEN CONCAT('', reques, '')
- ELSE CONCAT('', reques, '')
- END AS tlsreques")
- );
+ $arraylist = Periksa::select(
+ 'id', 'mulai', 'akhir', 'orderid', 'noloket', 'nofoto', 'noregister', 'asalpasien', 'nmrs', 'pasien_id', 'nmpasien',
+ 'jkpasien', 'tgllahirpasien', 'tlppasien', 'alamatpasien', 'reques', 'usia', 'berat', 'ktp', 'bpjs', 'ruangan_id',
+ 'ruangan', 'dokter_id', 'ppdssenior', 'middleppds', 'ppdsjunior', 'ppdsmiddle2', 'ppdsjunior2', 'analis', 'excutor',
+ 'nmdokter', 'nmppdssenior', 'nmmiddleppds', 'nmppdsjunior', 'nmppdsmiddle2', 'nmppdsjunior2', 'nmanalis', 'nmexcutor',
+ 'klinisi', 'klinis', 'keterangan', 'kesimpulan', 'poli_id', 'asuransi', 'urgensi', 'diagnosa', 'diagnosa2', 'modality',
+ 'kd_spesimen', 'nm_spesimen', 'dlp', 'daftar', 'foto', 'tgldraft', 'nmdrafter', 'baca', 'nmpembaca', 'verifikasi',
+ 'export', 'tgladendum', 'nmadendum', 'filefoto', 'pendaftar', 'status', 'created_at', 'updated_at',
+ 'bhp_media', 'bhp_potsputum', 'bhp_poturine', 'bhp_oshe', 'bhp_obyekglass', 'bhp_botolbd', 'bhp_parafilm',
+ 'bhp_tips', 'bhp_cottonswab', 'bhp_antibiotiktambahan', 'id_esbl', 'id_mrsa', 'rating', 'nmpendaftar',
+
+ DB::raw("DATE(daftar) as daftartgl"),
+ DB::raw("TO_CHAR(daftar, 'HH24:MI:SS') as daftarjam"),
+ DB::raw("TO_CHAR(export, 'HH24:MI:SS') as cetakjam"),
+ DB::raw("TO_CHAR(verifikasi, 'HH24:MI:SS') as verifikasijam"),
+ DB::raw("TO_CHAR(baca, 'HH24:MI:SS') as bacajam"),
+ DB::raw("TO_CHAR(foto, 'HH24:MI:SS') as fotojam"),
+
+ DB::raw("CASE WHEN jkpasien = 'L' THEN '1' ELSE '' END AS l"),
+ DB::raw("CASE WHEN jkpasien = 'P' THEN '1' ELSE '' END AS p"),
+ DB::raw("CONCAT('https://10.10.123.218/hasil/', nofoto::text) as urlhasil"),
+
+ DB::raw("CASE WHEN asuransi IN ('JKN', 'BPJS') THEN '1' ELSE '' END AS jkn"),
+ DB::raw("CASE WHEN asuransi = 'Billing' THEN '1' ELSE '' END AS billing"),
+ DB::raw("CASE WHEN asuransi = 'GCU' THEN '1' ELSE '' END AS gcu"),
+ DB::raw("CASE WHEN asuransi IN ('MANDIRI', 'Umum') THEN '1' ELSE '' END AS umum"),
+ DB::raw("CASE WHEN asuransi = 'SWASTA' THEN '1' ELSE '' END AS swasta"),
+ DB::raw("CASE WHEN asuransi = 'TAG' THEN '1' ELSE '' END AS tag"),
+
+ DB::raw("CASE WHEN urgensi != 'CITO' THEN '1' ELSE '' END AS elective"),
+ DB::raw("CASE WHEN urgensi = 'CITO' THEN '1' ELSE '' END AS cito"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN 'NEW'
+ WHEN status LIKE '%Dibatalkan%' THEN 'Batal'
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN 'Pemeriksaan Sampel'
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN 'Diperiksa'
+ WHEN status LIKE '%Draft%' THEN 'Draft'
+ WHEN status LIKE '%Expertise%' THEN 'Expertise'
+ WHEN status LIKE '%Decliend%' THEN 'Decliend'
+ WHEN status LIKE '%Selesai%' THEN 'Selesai'
+ WHEN status LIKE '%Arsip%' THEN 'Arsip'
+ WHEN status LIKE '%Data Vitek di Terima%' THEN 'Data Vitek di Terima'
+ WHEN status LIKE '%Data BD di Terima%' THEN 'Data BD di Terima'
+ ELSE CONCAT('', status::text, '')
+ END AS tlsstatus"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', nofoto::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', nofoto::text, '')
+ ELSE CONCAT('', nofoto::text, '')
+ END AS tlsnofoto"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', noregister::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', noregister::text, '')
+ ELSE CONCAT('', noregister::text, '')
+ END AS tlsnoregister"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', nmpasien::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', nmpasien::text, '')
+ ELSE CONCAT('', nmpasien::text, '')
+ END AS tlsnama"),
+
+ DB::raw("CASE
+ WHEN status IS NULL THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Dibatalkan%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Pemeriksaan Sampel%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Proses Analisis Sampel%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Draft%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Expertise%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Decliend%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Selesai%' THEN CONCAT('', reques::text, '')
+ WHEN status LIKE '%Arsip%' THEN CONCAT('', reques::text, '')
+ ELSE CONCAT('', reques::text, '')
+ END AS tlsreques")
+ );
+
if ($jenis == 'ThisDay') {
@@ -274,21 +357,18 @@ class ListController extends Controller
$akhir = date('Y-m-d', strtotime($akhir . ' +1 day'));
}
$arraylist = $arraylist->whereBetween('daftar', [$mulai, $akhir])->whereNotIn('pendaftar', ['supervisor', 'admin', 'analis', 'ppds', 'developer']);
+ } else if ($jenis === 'norm'){
+ $arraylist = $arraylist->where('noregister', 'LIKE', '%'.$valcari.'%');
+ } else if ($jenis === 'nofoto'){
+ $arraylist = $arraylist->where('nofoto', 'LIKE', '%'.$valcari.'%');
+ } else if ($jenis === 'rekues'){
+ $arraylist = $arraylist->where('reques', 'LIKE', '%'.$valcari.'%');
+ } else if ($jenis === 'keterangan'){
+ $arraylist = $arraylist->where('keterangan', 'LIKE', '%'.$valcari.'%');
+ } else if ($jenis === 'kesimpulan'){
+ $arraylist = $arraylist->where('kesimpulan', 'LIKE', '%'.$valcari.'%');
} else {
- switch ($jenis) {
- case 'norm':
- $arraylist = $arraylist->where('noregister', 'LIKE', '%'.$valcari.'%');
- case 'nofoto':
- $arraylist = $arraylist->where('nofoto', 'LIKE', '%'.$valcari.'%');
- case 'rekues':
- $arraylist = $arraylist->where('reques', 'LIKE', '%'.$valcari.'%');
- case 'keterangan':
- $arraylist = $arraylist->where('keterangan', 'LIKE', '%'.$valcari.'%');
- case 'kesimpulan':
- $arraylist = $arraylist->where('keterangan', 'LIKE', '%'.$valcari.'%');
- default:
- $arraylist = $arraylist->where('nmpasien', 'LIKE', '%'.$valcari.'%');
- }
+ $arraylist = $arraylist->where('nmpasien', 'LIKE', '%'.$valcari.'%');
}
$arraylist = $arraylist->orderBy('id', 'DESC')->get();
}
diff --git a/htdocs/app/Services/AstmMessageService.php b/htdocs/app/Services/AstmMessageService.php
index 2faa4926..82920cd8 100644
--- a/htdocs/app/Services/AstmMessageService.php
+++ b/htdocs/app/Services/AstmMessageService.php
@@ -410,18 +410,21 @@ class AstmMessageService
}
$resultSample->save();
if ($accession_number){
- $getorderid = Periksa::where('nofoto', $accession_number)->first();
- $orderid = $getorderid->id ?? null;
+ $accession_number = substr($accession_number, 0, 9);
+ $getorderid = Periksa::where('nofoto', $accession_number)->first();
+ $orderid = $getorderid->id ?? null;
if ($orderid){
-
if(is_array($parsedData['antibiotics']) && count($parsedData['antibiotics']) > 0){
Log::info("Processing", $parsedData['antibiotics']);
- RekapAntibiotik::where('orderid', $orderid)->delete();
foreach ($parsedData['antibiotics'] as $item){
$glassreportname = in_array($item['antibiotic_name'], $jsonantibiotik);
- RekapAntibiotik::create([
+
+ RekapAntibiotik::updateOrCreate(
+ [
'orderid' => $orderid,
- 'antibiotic' => $item['antibiotic_name'] ?? null,
+ 'antibiotic' => $item['antibiotic_name'],
+ ],
+ [
'resistance' => $item['resistance_note'] ?? null,
'value' => $item['value'] ?? null,
'interpretation' => $item['interpretation'] ?? null,
@@ -432,13 +435,13 @@ class AstmMessageService
);
}
}
+ Periksa::where('nofoto', $accession_number)->update([
+ 'status' => 'Data Vitek di Terima',
+ ]);
+ } else {
+ Log::warning("Accession Number Not Found", $accession_number.' Result Date '.$tanggalkeluar);
}
- Periksa::where('nofoto', $accession_number)->update([
- 'status' => 'Data Vitek di Terima',
- ]);
}
-
-
Log::info("Data MTRL Berhasil di Parse dan di simpan ", $resultSample->toArray());
return response()->json(['message' => 'Data berhasil diproses dan disimpan.']);
} else {
diff --git a/htdocs/database/migrations/2025_01_05_140423_create_rekapantibiotik_table.php b/htdocs/database/migrations/2025_01_05_140423_create_rekapantibiotik_table.php
index 10bb3cde..2ab94920 100644
--- a/htdocs/database/migrations/2025_01_05_140423_create_rekapantibiotik_table.php
+++ b/htdocs/database/migrations/2025_01_05_140423_create_rekapantibiotik_table.php
@@ -19,6 +19,8 @@ return new class extends Migration
$table->string('interpretation', 150)->nullable();
$table->string('glassreportname', 150)->nullable();
$table->integer('orderid')->nullable();
+ $table->boolean('printrow')->nullable();
+ $table->boolean('printcol')->nullable();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrent();
});
diff --git a/htdocs/resources/views/cetak/ekspertisecci.blade.php b/htdocs/resources/views/cetak/ekspertisecci.blade.php
index 62c5e01c..ae0f2db4 100644
--- a/htdocs/resources/views/cetak/ekspertisecci.blade.php
+++ b/htdocs/resources/views/cetak/ekspertisecci.blade.php
@@ -132,7 +132,7 @@
@if ($keterangan != '')
-
{!! $keterangan !!}
+ Komentar:
{!! $keterangan !!}
@endif
diff --git a/htdocs/resources/views/cetak/ekspertisedefault.blade.php b/htdocs/resources/views/cetak/ekspertisedefault.blade.php
index 9def078c..f7f0425c 100644
--- a/htdocs/resources/views/cetak/ekspertisedefault.blade.php
+++ b/htdocs/resources/views/cetak/ekspertisedefault.blade.php
@@ -87,7 +87,7 @@
| 1. Pewarnaan Gram : | |||||||||||||||||||||
| Sel epithel | +: | +{!! $data['id_selepitel'] !!} | +|||||||||||||||||||
| Sel radang | +: | +{!! $data['id_selradang'] !!} | +|||||||||||||||||||
| Mikroorganisme | +: | +
+ @if (isset($data['id_mikroorganisme']))
+ {!! $data['id_mikroorganisme'] !!}
+ @endif
+ @if (isset($data['id_mikroorganismeoptional']))
+ {!! $data['id_mikroorganismeoptional'] !!} + @endif + |
+ |||||||||||||||||||
| + |
+
|
+ ||||||||||||||||||||
| Sel epithel | -: | -@if (isset($data['id_selepitel'])) {!! $data['id_selepitel'] !!} @endif | -|||||||||||||||||||
| Sel radang | +{{$nomor}}. Pewarnaan Ziehl Neelsen | : | -@if (isset($data['id_selradang'])) {!! $data['id_selradang'] !!} @endif | -||||||||||||||||||
| Mikroorganisme | -: | -
- @if (isset($data['id_mikroorganisme']))
- {!! $data['id_mikroorganisme'] !!}
- @endif
- @if (isset($data['id_mikroorganismeoptional']))
- {!! $data['id_mikroorganismeoptional'] !!} - @endif - |
- |||||||||||||||||||
| - |
- @if (isset($data['id_jumlahlactobacillus']) OR isset($data['id_jumlahgardnerella']) OR isset($data['id_jumlahmobiluncus']))
-
|
+ {!! $data['id_pewarnaanziehlnielsen'] !!} | |||||||||||||||||||
| 2. Pewarnaan Ziehl Nielsen | +{{$nomor}}. Pewarnaan KOH | : | -@if (isset($data['id_pewarnaanziehlnielsen'])) {!! $data['id_pewarnaanziehlnielsen'] !!} @endif | +{!! $data['id_pewarnaankoh'] !!} | |||||||||||||||||
| 3. Pewarnaan KOH | +{{$nomor}}. Pewarnaan Neelsen | : | -@if (isset($data['id_pewarnaankoh'])) {!! $data['id_pewarnaankoh'] !!} @endif | +{!! $data['id_pewarnaanneisser'] !!} | |||||||||||||||||
| 4. Pewarnaan Neisser | +{{$nomor}}. Pewarnaan Negatif | : | -@if (isset($data['id_pewarnaanneisser'])) {!! $data['id_pewarnaanneisser'] !!} @endif | +{!! $data['id_pewarnaannegatif'] !!} | |||||||||||||||||
| 5. Pewarnaan Negatif | +{{$nomor}}. Pewarnaan Spora | : | -@if (isset($data['id_pewarnaannegatif'])) {!! $data['id_pewarnaannegatif'] !!} @endif | +{!! $data['id_pewarnaanspora'] !!} | |||||||||||||||||
| 6. Pewarnaan Spora | -: | -@if (isset($data['id_pewarnaanspora'])) {!! $data['id_pewarnaanspora'] !!} @endif | -|||||||||||||||||||
| 7. Pewarnaan Giemsa | +{{$nomor}}. Pewarnaan Giemsa | : | @if (isset($data['id_pewarnaangiesma'])) @@ -252,13 +290,14 @@ @endif | ||||||||||||||||||
| {{$urutan}}. Biakan Kultur (Aerob / Anaerob) | +{{$nomor}}. Biakan Kultur (Aerob / Anaerob) | : |
@if (isset($data['id_biakankultur']))
@@ -392,7 +431,7 @@
$keterangan = $keterangan.' Cefoperazone - Sulbactam : '.$id_kbscf.' ('.$id_sirkbscf.')'; } } - echo $keterangan; + echo 'Komentar: '.$keterangan; @endphp @endif |
diff --git a/htdocs/resources/views/cetak/ekspertisepl.blade.php b/htdocs/resources/views/cetak/ekspertisepl.blade.php
index c17a8654..59505505 100644
--- a/htdocs/resources/views/cetak/ekspertisepl.blade.php
+++ b/htdocs/resources/views/cetak/ekspertisepl.blade.php
@@ -140,56 +140,72 @@
@endif
||||||||||||||||||
| Pewarnaan Ziehl Nielsen | +Pewarnaan Ziehl Neelsen | : | {!! $lsg_pewarnaanziehlnielsen !!} | ||||||||||||||||||
| Pewarnaan KOH | : | {!! $lsg_pewarnaankoh !!} | |||||||||||||||||||
| Pewarnaan Neisser | : | {!! $lsg_pewarnaanneisser !!} | |||||||||||||||||||
| Pewarnaan Negatif | : | {!! $lsg_pewarnaannegatif !!} | |||||||||||||||||||
| Pewarnaan Giemsa | : | {!! $lsg_pewarnaangiesma !!} | |||||||||||||||||||
| Pewarnaan Spora | : | {!! $lsg_pewarnaanspora !!} | |||||||||||||||||||
| Pewarnaan Lain-lain | : | {!! $lsg_pewarnaanlain !!} | |||||||||||||||||||
| Ditemukan morfologi | : | {!! $lsg_ditemukanmorfologi !!} | |||||||||||||||||||