Compare commits
10
Commits
duidev
..
2ccdb4f969
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ccdb4f969 | ||
|
|
214b9c82f2 | ||
|
|
912c6c03e3 | ||
|
|
40b3d5d1b8 | ||
|
|
b6679233ea | ||
|
|
96f1d12450 | ||
|
|
27064a1f7e | ||
|
|
ffddee22df | ||
|
|
4bb265e4f1 | ||
|
|
1399f1a2f3 |
No files matched your search
@@ -0,0 +1,59 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=laravel
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_MAILER=smtp
|
||||||
|
MAIL_HOST=mailpit
|
||||||
|
MAIL_PORT=1025
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS="[email protected]"
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
|
PUSHER_APP_ID=
|
||||||
|
PUSHER_APP_KEY=
|
||||||
|
PUSHER_APP_SECRET=
|
||||||
|
PUSHER_HOST=
|
||||||
|
PUSHER_PORT=443
|
||||||
|
PUSHER_SCHEME=https
|
||||||
|
PUSHER_APP_CLUSTER=mt1
|
||||||
|
|
||||||
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
|
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||||
|
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||||
|
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||||
|
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
# Ignore environment files
|
|
||||||
|
|
||||||
mergekemain.sh
|
|
||||||
# Ignore Laravel cache, logs, and storage
|
|
||||||
/htdocs/storage/*
|
|
||||||
/database
|
|
||||||
!/htdocs/storage/.gitignore
|
|
||||||
/htdocs/.env
|
|
||||||
# Ignore bootstrap cache
|
|
||||||
/htdocs/bootstrap/cache/*
|
|
||||||
/htdocs/listenerlis/listener.log
|
|
||||||
/htdocs/listenerlis/tcp_raw_data.bin
|
|
||||||
.env
|
|
||||||
!/htdocs/bootstrap/cache/.gitignore
|
|
||||||
+1
-1
@@ -22,7 +22,7 @@ class ProcessAstmMessages extends Command
|
|||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
// Ambil data dari DataListener
|
// Ambil data dari DataListener
|
||||||
$dataListener = DataListiner::where('processed', '0')->orderBy('created_at', 'DESC')->get();
|
$dataListener = DataListiner::whereNull('processed')->get();
|
||||||
if ($dataListener) {
|
if ($dataListener) {
|
||||||
$jumlah = count($dataListener);
|
$jumlah = count($dataListener);
|
||||||
$pesan = $this->astmMessageService->processAstmMessages($dataListener);
|
$pesan = $this->astmMessageService->processAstmMessages($dataListener);
|
||||||
+94
-336
@@ -6,6 +6,7 @@ use Illuminate\Support\Facades\DB;
|
|||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use App\Http\Controllers\SendMail;
|
use App\Http\Controllers\SendMail;
|
||||||
use App\Services\AstmMessageService;
|
use App\Services\AstmMessageService;
|
||||||
|
|
||||||
use App\Poli;
|
use App\Poli;
|
||||||
use App\Periksa;
|
use App\Periksa;
|
||||||
use App\DataListiner;
|
use App\DataListiner;
|
||||||
@@ -51,11 +52,6 @@ define( 'API_ACCESS_KEY', 'AAAA6YBXh1k:APA91bFL0q7QAXQGohXMpTwHco79f13C8PFk1Oo8k
|
|||||||
|
|
||||||
class DokterController extends Controller
|
class DokterController extends Controller
|
||||||
{
|
{
|
||||||
protected $lisServiceUrl;
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->lisServiceUrl = env('LIS_SERVICE_URL', 'http://localhost:5000');
|
|
||||||
}
|
|
||||||
protected static function genSurat($id, $tabel){
|
protected static function genSurat($id, $tabel){
|
||||||
if ($tabel == 'dengan kop'){
|
if ($tabel == 'dengan kop'){
|
||||||
$kopsurat = url('/templateimage/kopsurat.png');
|
$kopsurat = url('/templateimage/kopsurat.png');
|
||||||
@@ -135,7 +131,6 @@ class DokterController extends Controller
|
|||||||
$data['periksa'] = $periksa;
|
$data['periksa'] = $periksa;
|
||||||
$data['keterangan'] = $keterangan;
|
$data['keterangan'] = $keterangan;
|
||||||
$data['tandatangananalis'] = $tandatangananalis;
|
$data['tandatangananalis'] = $tandatangananalis;
|
||||||
$data['ttdanalis'] = $tandatangananalis;
|
|
||||||
$data['tandatangan'] = $tandatangan;
|
$data['tandatangan'] = $tandatangan;
|
||||||
$data['ppds'] = $ppds;
|
$data['ppds'] = $ppds;
|
||||||
$data['kopsurat'] = $kopsurat;
|
$data['kopsurat'] = $kopsurat;
|
||||||
@@ -179,75 +174,63 @@ class DokterController extends Controller
|
|||||||
public function reportppds() {
|
public function reportppds() {
|
||||||
$previlage = Session('previlage');
|
$previlage = Session('previlage');
|
||||||
if ($previlage == 'developer' OR $previlage == 'supervisor') {
|
if ($previlage == 'developer' OR $previlage == 'supervisor') {
|
||||||
$data = [
|
$data = [];
|
||||||
'dokters' => User::where('previlage', 'supervisor')->get(),
|
$dokters = User::where('previlage', 'supervisor')->get();
|
||||||
'allppds' => User::where('previlage', 'ppds')->get(),
|
$allppds = User::where('previlage', 'ppds')->get();
|
||||||
'allanalis' => User::where('previlage', 'analis')->get(),
|
$allanalis = User::where('previlage', 'analis')->get();
|
||||||
'lokasi' => 'Lab Mikrobiologi',
|
$organismslis = Organisms::where('kelompok', 'biakankultur')->groupBy('category')->select('category')->get();
|
||||||
'master' => 'mikro',
|
$i = 0;
|
||||||
'antrkrmsitu' => 0,
|
foreach ($organismslis as $rorganisme) {
|
||||||
];
|
$j = 0;
|
||||||
$allOrganisms = Organisms::orderBy('name', 'ASC')->get();
|
$category = $rorganisme->category;
|
||||||
$groupOrganisms = function ($kelompok) use ($allOrganisms) {
|
$rooms = Organisms::where('kelompok', 'biakankultur')->where('category', $category)->orderBy('name', 'ASC')->get();
|
||||||
$organisms = $allOrganisms->where('kelompok', $kelompok);
|
foreach ($rooms as $room) {
|
||||||
if ($organisms->isEmpty()) {
|
$data['organismes'][$i][$j]['id'] = $room->id;
|
||||||
return [
|
$data['organismes'][$i][$j]['name'] = $room->name;
|
||||||
'organismes' => [[['id' => 0, 'name' => 'No Data']]],
|
$j++;
|
||||||
'categories' => ['No Data'],
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
$grouped = $organisms->groupBy('category');
|
$i++;
|
||||||
$organismes = [];
|
|
||||||
$categories = [];
|
|
||||||
$i = 0;
|
|
||||||
foreach ($grouped as $category => $items) {
|
|
||||||
$categories[] = $category;
|
|
||||||
$j = 0;
|
|
||||||
foreach ($items as $item) {
|
|
||||||
$organismes[$i][$j] = ['id' => $item->id, 'name' => $item->name];
|
|
||||||
$j++;
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
'organismes' => $organismes,
|
|
||||||
'categories' => $categories,
|
|
||||||
];
|
|
||||||
};
|
|
||||||
$biakankulturData = $groupOrganisms('biakankultur');
|
|
||||||
$mikroorganismeData = $groupOrganisms('mikroorganisme');
|
|
||||||
|
|
||||||
// Gabungkan data
|
|
||||||
$data = array_merge($data, [
|
|
||||||
'organismes' => $biakankulturData['organismes'],
|
|
||||||
'bacterycateggories' => $biakankulturData['categories'],
|
|
||||||
'mikroorganismes' => $mikroorganismeData['organismes'],
|
|
||||||
'mikroorganismestlist' => $mikroorganismeData['categories'],
|
|
||||||
]);
|
|
||||||
$kelompokMapping = [
|
|
||||||
'jsonsputum' => 'Sputum',
|
|
||||||
'jsonswabtenggorok' => 'Swab Tenggorok',
|
|
||||||
'jsonurine' => 'Urine',
|
|
||||||
'jsonswabperineum' => 'Swab perineum',
|
|
||||||
'jsonselepitel' => 'Sel Epitel',
|
|
||||||
'jsonselradang' => 'Sel Radang',
|
|
||||||
'jsonmikroorganisme' => 'Q Mikroorganisme',
|
|
||||||
'jsonjumlahlactobacillus' => 'Lactobacillus',
|
|
||||||
'jsonjumlahgardnerella' => 'Gardnerella',
|
|
||||||
'jsonjumlahmobiluncus' => 'Mobiluncus',
|
|
||||||
'jsonpewarnaanziehlnielsen' => 'Pewarnaan Ziehl Nielsen',
|
|
||||||
'jsonpewarnaanneisser' => 'Pewarnaan Neisser',
|
|
||||||
'jsonpewarnaannegatif' => 'Pewarnaan Negatif',
|
|
||||||
'jsonpewarnaanspora' => 'Pewarnaan Spora',
|
|
||||||
'jsonmediabap' => 'Media BAP',
|
|
||||||
'jsonmediacap' => 'Media CAP',
|
|
||||||
'jsonmediamcconkey' => 'Media Mc Conkey',
|
|
||||||
'jsonpemeriksaantl' => 'Pemeriksaan Tambahan Lainnya',
|
|
||||||
'jsonbiakankultur' => 'Biakan Kultur',
|
|
||||||
];
|
|
||||||
foreach ($kelompokMapping as $key => $kelompok) {
|
|
||||||
$data[$key] = $allOrganisms->where('kelompok', $kelompok)->values();
|
|
||||||
}
|
}
|
||||||
|
$x = 0;
|
||||||
|
foreach ($organismslis as $rows) {
|
||||||
|
$data['bacterycateggories'][$x] = $rows->category;
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
if ($x == 0){
|
||||||
|
$data['organismes'][0][0]['id'] = 0;
|
||||||
|
$data['organismes'][0][0]['name'] = 'No Data';
|
||||||
|
$data['bacterycateggories'][0] = 'No Data';
|
||||||
|
}
|
||||||
|
$mikroorganismelist = Organisms::where('kelompok', 'mikroorganisme')->groupBy('category')->select('category')->get();
|
||||||
|
$i = 0;
|
||||||
|
foreach ($mikroorganismelist as $rorganisme) {
|
||||||
|
$j = 0;
|
||||||
|
$category = $rorganisme->category;
|
||||||
|
$rooms = Organisms::where('kelompok', 'mikroorganisme')->where('category', $category)->orderBy('name', 'ASC')->get();
|
||||||
|
foreach ($rooms as $room) {
|
||||||
|
$data['mikroorganismes'][$i][$j]['id'] = $room->id;
|
||||||
|
$data['mikroorganismes'][$i][$j]['name'] = $room->name;
|
||||||
|
$j++;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$x = 0;
|
||||||
|
foreach ($mikroorganismelist as $rows) {
|
||||||
|
$data['mikroorganismestlist'][$x] = $rows->category;
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
if ($x == 0){
|
||||||
|
$data['mikroorganismes'][0][0]['id'] = 0;
|
||||||
|
$data['mikroorganismes'][0][0]['name'] = 'No Data';
|
||||||
|
$data['mikroorganismestlist'][0] = 'No Data';
|
||||||
|
}
|
||||||
|
$data['allppds'] = $allppds;
|
||||||
|
$data['dokters'] = $dokters;
|
||||||
|
$data['allanalis'] = $allanalis;
|
||||||
|
$data['antrkrmsitu']= PeriksaSYNC::where('created_by', Session('username'))->where('status', '')->count();
|
||||||
|
$data['lokasi'] = 'Lab Mikrobiologi';
|
||||||
|
$data['master'] = 'mikro';
|
||||||
|
$previlage = Session('previlage');
|
||||||
return view('dokter.pemeriksaan', $data);
|
return view('dokter.pemeriksaan', $data);
|
||||||
} else {
|
} else {
|
||||||
$data = [];
|
$data = [];
|
||||||
@@ -495,7 +478,7 @@ class DokterController extends Controller
|
|||||||
'nmppdssenior' => $cekppds3->nama ?? null,
|
'nmppdssenior' => $cekppds3->nama ?? null,
|
||||||
'nmexcutor' => Session('nama'),
|
'nmexcutor' => Session('nama'),
|
||||||
'excutor' => Session('id'),
|
'excutor' => Session('id'),
|
||||||
'status' => 'Proses Analisis Sampel'
|
'status' => 'Draft Saved'
|
||||||
]);
|
]);
|
||||||
return response()->json(['icon' => 'success', 'status' => 'Success', 'message' => 'Expertise Saved']);
|
return response()->json(['icon' => 'success', 'status' => 'Success', 'message' => 'Expertise Saved']);
|
||||||
}
|
}
|
||||||
@@ -586,8 +569,8 @@ class DokterController extends Controller
|
|||||||
'modality' => $modality,
|
'modality' => $modality,
|
||||||
'jumlah' => $jumlah,
|
'jumlah' => $jumlah,
|
||||||
'foto' => $tanggal,
|
'foto' => $tanggal,
|
||||||
'nmanalis' => Session('nama'),
|
'nmradiografer' => Session('nama'),
|
||||||
'analis' => Session('id'),
|
'radiografer' => Session('id'),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
Periksa::where('id', $idperiksa)->update([
|
Periksa::where('id', $idperiksa)->update([
|
||||||
@@ -600,8 +583,8 @@ class DokterController extends Controller
|
|||||||
'dlp' => $dlp,
|
'dlp' => $dlp,
|
||||||
'modality' => $modality,
|
'modality' => $modality,
|
||||||
'jumlah' => $jumlah,
|
'jumlah' => $jumlah,
|
||||||
'analis' => Session('id'),
|
'radiografer' => Session('id'),
|
||||||
'nmanalis' => Session('nama'),
|
'nmradiografer' => Session('nama'),
|
||||||
'foto' => $tanggal,
|
'foto' => $tanggal,
|
||||||
'status' => 'Telah di kirim ke worklist/modalitas',
|
'status' => 'Telah di kirim ke worklist/modalitas',
|
||||||
'excutor' => null,
|
'excutor' => null,
|
||||||
@@ -873,128 +856,6 @@ class DokterController extends Controller
|
|||||||
$pesan = $e->getMessage();
|
$pesan = $e->getMessage();
|
||||||
}
|
}
|
||||||
return $pesan;
|
return $pesan;
|
||||||
} else if ($worklist == 'isandasar'){
|
|
||||||
try {
|
|
||||||
$dokter_id = 0;
|
|
||||||
$analis = 0;
|
|
||||||
$ppds3 = 0;
|
|
||||||
$nmanalis = '';
|
|
||||||
$nmdokter = '';
|
|
||||||
$nmppdssenior = '';
|
|
||||||
if ($request->input('komponen') == 'analis' OR $request->input('komponen') == 'ppds3' OR $request->input('komponen') == 'dokter'){
|
|
||||||
if ($request->input('isi') != 0){
|
|
||||||
if ($request->input('komponen') == 'analis'){
|
|
||||||
$analis = $request->input('isi');
|
|
||||||
$getnama = User::where('id', $analis)->first();
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'analis' => $analis,
|
|
||||||
'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
|
|
||||||
]);
|
|
||||||
} 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
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($request->input('komponen') == 'analis'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'analis' => 0,
|
|
||||||
'nmanalis' => '',
|
|
||||||
'nmdrafter' => Session('nama'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'ppds3'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'ppds3' => 0,
|
|
||||||
'nmppdssenior' => '',
|
|
||||||
'nmdrafter' => Session('nama'),
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'dokter_id' => 0,
|
|
||||||
'nmdokter' => '',
|
|
||||||
'nmdrafter' => Session('nama'),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if ($request->input('komponen') == 'klinis'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'klinis' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_media'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_media' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_potsputum'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_potsputum' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_poturine'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_poturine' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_oshe'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_oshe' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_obyekglass'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_obyekglass' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_botolbd'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_botolbd' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_parafilm'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_parafilm' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_tips'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_tips' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'bhp_cottonswab'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_cottonswab' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'id_esbl'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'id_esbl' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else if ($request->input('komponen') == 'id_mrsa'){
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'id_mrsa' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
|
||||||
'bhp_antibiotiktambahan' => $request->input('isi'),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
KomponenJawaban::updateOrCreate(
|
|
||||||
[
|
|
||||||
'accnumber' => $nofoto,
|
|
||||||
'template' => $request->input('jenis'),
|
|
||||||
'komponen' => $request->input('komponen'),
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'isidata' => $request->input('isi'),
|
|
||||||
'created_by' => Session('nama')
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$pesan = $nofoto.' Saved '.$request->input('jenis');
|
|
||||||
} catch (Exception $e) {
|
|
||||||
$pesan = $e->getMessage();
|
|
||||||
}
|
|
||||||
return $pesan;
|
|
||||||
} else if ($worklist == 'mappingalat'){
|
} else if ($worklist == 'mappingalat'){
|
||||||
try {
|
try {
|
||||||
Periksa::where('nofoto', $nofoto)->update([
|
Periksa::where('nofoto', $nofoto)->update([
|
||||||
@@ -1080,7 +941,6 @@ class DokterController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$jsondata = json_decode($jsondata, true);
|
|
||||||
if(is_array($jsondata) && count($jsondata) > 0){
|
if(is_array($jsondata) && count($jsondata) > 0){
|
||||||
foreach ($jsondata as $item){
|
foreach ($jsondata as $item){
|
||||||
RekapAntibiotik::updateOrCreate(
|
RekapAntibiotik::updateOrCreate(
|
||||||
@@ -1092,8 +952,6 @@ class DokterController extends Controller
|
|||||||
'resistance' => $item['resistance'],
|
'resistance' => $item['resistance'],
|
||||||
'value' => $item['value'],
|
'value' => $item['value'],
|
||||||
'interpretation' => $item['interpretation'],
|
'interpretation' => $item['interpretation'],
|
||||||
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
|
|
||||||
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1103,9 +961,9 @@ class DokterController extends Controller
|
|||||||
$gentabel = RekapAntibiotik::where('orderid', $orderid)->get();
|
$gentabel = RekapAntibiotik::where('orderid', $orderid)->get();
|
||||||
if (!empty($gentabel)){
|
if (!empty($gentabel)){
|
||||||
$nomor = 1;
|
$nomor = 1;
|
||||||
$isidata = $isidata.'<br /><table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="65%"><strong>Antibiotik</strong></td><td width="15%"><strong>Value</strong></td><td width="15%"><strong>S/I/R</strong></td></tr>';
|
$isidata = '<table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="65%"><strong>Antibiotik</strong></td><td width="15%"><strong>Value</strong></td><td width="15%"><strong>S/I/R</strong></td></tr>';
|
||||||
foreach($gentabel as $rtabel){
|
foreach($gentabel as $rtabel){
|
||||||
$isidata = $isidata.'<tr><td>'.$nomor.'</td><td>'.$rtabel->resistance.'</td><td>'.$rtabel->value.'</td><td>'.$rtabel->interpretation.'</td></tr>';
|
$isidata = $isidata.'<tr><td>'.$nomor.'</td><td>'.$rtabel->antibiotic.'</td<td>'.$rtabel->value.'</td><td>'.$rtabel->interpretation.'</td></tr>';
|
||||||
$nomor++;
|
$nomor++;
|
||||||
}
|
}
|
||||||
$isidata = $isidata.'</table>';
|
$isidata = $isidata.'</table>';
|
||||||
@@ -1133,7 +991,7 @@ class DokterController extends Controller
|
|||||||
}
|
}
|
||||||
return response()->json(['pesan' => $pesan, 'organism' => $organism]);
|
return response()->json(['pesan' => $pesan, 'organism' => $organism]);
|
||||||
return back();
|
return back();
|
||||||
} else if ($worklist == 'getbbachtect' OR $worklist == 'getmgit' OR $worklist == 'getabbot'){
|
} else if ($worklist == 'getbbachtect' OR $worklist == 'getmgit' OR $worklist == 'getgenexpert' OR $worklist == 'getabbot'){
|
||||||
$isidata = $request->input('isi');
|
$isidata = $request->input('isi');
|
||||||
try {
|
try {
|
||||||
$ketemu = '';
|
$ketemu = '';
|
||||||
@@ -1172,67 +1030,6 @@ class DokterController extends Controller
|
|||||||
$pesan = $isidata.'<br />'.$e->getMessage();
|
$pesan = $isidata.'<br />'.$e->getMessage();
|
||||||
}
|
}
|
||||||
return $pesan;
|
return $pesan;
|
||||||
} else if ($worklist == 'getgenexpert'){
|
|
||||||
$isidata = $request->input('isi');
|
|
||||||
try {
|
|
||||||
$ketemu = '';
|
|
||||||
$cekada = ResultSample::where('accession_number', 'LIKE', $nofoto.'%')->get();
|
|
||||||
if ($cekada->isNotEmpty()){
|
|
||||||
foreach($cekada as $rows){
|
|
||||||
$ketemu .= ($ketemu ? '<br />' : '') . $rows->test_status;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$payload = [
|
|
||||||
'command' => 'request_result',
|
|
||||||
'data' => [
|
|
||||||
'sample_id' => $nofoto
|
|
||||||
],
|
|
||||||
];
|
|
||||||
$response = Http::timeout(30)->post($this->lisServiceUrl . '/command', $payload);
|
|
||||||
if ($response->successful()) {
|
|
||||||
Log::info('Permintaan hasil berhasil dikirim ke LIS service.', [
|
|
||||||
'sample_id' => $nofoto,
|
|
||||||
'response' => $response->json()
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
Log::error('Gagal terhubung ke LIS service saat meminta hasil.', [
|
|
||||||
'sample_id' => $nofoto,
|
|
||||||
'status' => $response->status(),
|
|
||||||
'body' => $response->body()
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($ketemu != ''){
|
|
||||||
if (is_null($isidata) || $isidata == ''){
|
|
||||||
$isidata = $ketemu;
|
|
||||||
} else {
|
|
||||||
$isidata = $isidata.'<br />'.$ketemu;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!is_null($isidata) && $isidata != ''){
|
|
||||||
KomponenJawaban::updateOrCreate(
|
|
||||||
[
|
|
||||||
'accnumber' => $nofoto,
|
|
||||||
'template' => $request->input('jenis'),
|
|
||||||
'komponen' => $request->input('komponen'),
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'isidata' => $isidata,
|
|
||||||
'created_by' => Session('nama')
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$pesan = $isidata;
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
|
||||||
$pesan = (is_null($isidata) ? '' : $isidata . '<br />') . 'Error: ' . $e->getMessage();
|
|
||||||
Log::error('Exception dalam fungsi requestResult.', [
|
|
||||||
'sample_id' => $nofoto,
|
|
||||||
'exception' => $e->getMessage()
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
return response($pesan, 200);
|
|
||||||
} else if ($worklist == 'addviralload'){
|
} else if ($worklist == 'addviralload'){
|
||||||
$tabelawal = $request->input('tabelawal');
|
$tabelawal = $request->input('tabelawal');
|
||||||
$idtabel = $request->input('idtabel');
|
$idtabel = $request->input('idtabel');
|
||||||
@@ -1269,22 +1066,15 @@ class DokterController extends Controller
|
|||||||
$tabel = $tabel.'</table>';
|
$tabel = $tabel.'</table>';
|
||||||
}
|
}
|
||||||
if ($orderid != 0){
|
if ($orderid != 0){
|
||||||
if ($getdata->subantibiotik !== null && $getdata->subantibiotik != ''){
|
|
||||||
$antibiotik = $getdata->subantibiotik;
|
|
||||||
} else {
|
|
||||||
$antibiotik = $getdata->antibiotik;
|
|
||||||
}
|
|
||||||
RekapAntibiotik::updateOrCreate(
|
RekapAntibiotik::updateOrCreate(
|
||||||
[
|
[
|
||||||
'orderid' => $orderid,
|
'orderid' => $orderid,
|
||||||
'antibiotic' => $antibiotik,
|
'antibiotic' => $getdata->antibiotik.' '.$getdata->subantibiotik,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'resistance' => $getdata->diskcontent,
|
'resistance' => $getdata->diskcontent,
|
||||||
'value' => $setval,
|
'value' => $setval,
|
||||||
'interpretation' => $setnilai,
|
'interpretation' => $setnilai,
|
||||||
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
|
|
||||||
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1329,30 +1119,23 @@ class DokterController extends Controller
|
|||||||
$setval = $batasbawah;
|
$setval = $batasbawah;
|
||||||
}
|
}
|
||||||
if ($nomor == 1){
|
if ($nomor == 1){
|
||||||
$tabel = '<table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="20%"><strong>Antibiotik</strong></td><td width="20%"><strong>Sub</strong></td><td width="10%"><strong>Disc Content</strong></td><td width="5%"><strong>S/I/R</strong></td></tr><tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.' '.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr></table>';
|
$tabel = '<table border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td width="5%"><strong>No</strong></td><td width="20%"><strong>Antibiotik</strong></td><td width="20%"><strong>Sub</strong></td><td width="10%"><strong>Disc Content</strong></td><td width="5%"><strong>S/I/R</strong></td></tr><tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.'</td><td>'.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr></table>';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$baris = '<tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.' '.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr>';
|
$baris = '<tr><td>'.$nomor.'</td><td>'.$getdata->antibiotik.'</td><td>'.$getdata->subantibiotik.'</td><td>'.$getdata->diskcontent.'</td><td>'.$setnilai.'</td></tr>';
|
||||||
$tabel = str_replace('</table>', $baris, $tabelawal);
|
$tabel = str_replace('</table>', $baris, $tabelawal);
|
||||||
$tabel = $tabel.'</table>';
|
$tabel = $tabel.'</table>';
|
||||||
}
|
}
|
||||||
if ($orderid != 0){
|
if ($orderid != 0){
|
||||||
if ($getdata->subantibiotik !== null && $getdata->subantibiotik != ''){
|
|
||||||
$antibiotik = $getdata->subantibiotik;
|
|
||||||
} else {
|
|
||||||
$antibiotik = $getdata->antibiotik;
|
|
||||||
}
|
|
||||||
RekapAntibiotik::updateOrCreate(
|
RekapAntibiotik::updateOrCreate(
|
||||||
[
|
[
|
||||||
'orderid' => $orderid,
|
'orderid' => $orderid,
|
||||||
'antibiotic' => $antibiotik,
|
'antibiotic' => $getdata->antibiotik.' '.$getdata->subantibiotik,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'resistance' => $getdata->diskcontent,
|
'resistance' => $getdata->diskcontent,
|
||||||
'value' => $setval,
|
'value' => $setval,
|
||||||
'interpretation' => $setnilai,
|
'interpretation' => $setnilai,
|
||||||
'created_at' => $getdataawal->daftar ?? date('Y-m-d H:i:s'),
|
|
||||||
'updated_at' => $getdataawal->akhir ?? date('Y-m-d H:i:s'),
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1395,8 +1178,8 @@ class DokterController extends Controller
|
|||||||
'modality' => $modality,
|
'modality' => $modality,
|
||||||
'jumlah' => $jumlah,
|
'jumlah' => $jumlah,
|
||||||
'foto' => $tanggal,
|
'foto' => $tanggal,
|
||||||
'excutor' => Session('id'),
|
'nmradiografer' => Session('nama'),
|
||||||
'nmexcutor' => Session('nama'),
|
'radiografer' => Session('id'),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
Periksa::where('id', $idperiksa)->update([
|
Periksa::where('id', $idperiksa)->update([
|
||||||
@@ -1409,8 +1192,8 @@ class DokterController extends Controller
|
|||||||
'dlp' => $dlp,
|
'dlp' => $dlp,
|
||||||
'modality' => $modality,
|
'modality' => $modality,
|
||||||
'jumlah' => $jumlah,
|
'jumlah' => $jumlah,
|
||||||
'excutor' => Session('id'),
|
'radiografer' => Session('id'),
|
||||||
'nmexcutor' => Session('nama'),
|
'nmradiografer' => Session('nama'),
|
||||||
'foto' => $tanggal,
|
'foto' => $tanggal,
|
||||||
'status' => 'Telah di kirim ke worklist/modalitas',
|
'status' => 'Telah di kirim ke worklist/modalitas',
|
||||||
'excutor' => null,
|
'excutor' => null,
|
||||||
@@ -1525,7 +1308,7 @@ class DokterController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$tlsstatus = 'Proses Analisis Sampel';
|
$tlsstatus = 'Draft Saved';
|
||||||
Riwayat::create([
|
Riwayat::create([
|
||||||
'nofoto' => $nofoto,
|
'nofoto' => $nofoto,
|
||||||
'jawaban' => $surat,
|
'jawaban' => $surat,
|
||||||
@@ -1731,35 +1514,6 @@ class DokterController extends Controller
|
|||||||
'antibiotikall' => $antibiotikall,
|
'antibiotikall' => $antibiotikall,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$getsirab = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->where('cek', '0')->get();
|
|
||||||
foreach($getsirab as $row){
|
|
||||||
$family = $row->family;
|
|
||||||
$spesies= $row->spesies;
|
|
||||||
$getallantibiotik = SiraB::where('family', $family)->get();
|
|
||||||
foreach ($getallantibiotik as $row2){
|
|
||||||
SiraB::updateOrCreate(
|
|
||||||
[
|
|
||||||
'family' => $row->family,
|
|
||||||
'spesies' => $row->spesies,
|
|
||||||
'antibiotik' => $row2->antibiotik,
|
|
||||||
'subantibiotik' => $row2->subantibiotik,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'diskcontent' => $row2->diskcontent,
|
|
||||||
'batasatas' => $row2->batasatas,
|
|
||||||
'midrange' => $row2->midrange,
|
|
||||||
'batasbawah' => $row2->batasbawah,
|
|
||||||
'sumber' => $row2->sumber,
|
|
||||||
'kodedok' => $row2->kodedok,
|
|
||||||
'atu' => $row2->atu,
|
|
||||||
'kelompok' => $row2->kelompok,
|
|
||||||
'glassreportname' => trim($row2->glassreportname),
|
|
||||||
'cek' => '1',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo json_encode($arrayfiles);
|
echo json_encode($arrayfiles);
|
||||||
} else if ($idpasien == 'Bakteri'){
|
} else if ($idpasien == 'Bakteri'){
|
||||||
$getsirab = Organisms::where('kelompok', 'biakankultur')->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();
|
$getsirab = Organisms::where('kelompok', 'biakankultur')->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();
|
||||||
@@ -1770,9 +1524,6 @@ class DokterController extends Controller
|
|||||||
} else if ($idpasien == 'listkodespesimen'){
|
} else if ($idpasien == 'listkodespesimen'){
|
||||||
$getsirab = Organisms::where('kelompok', 'listkodespesimen')->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();
|
$getsirab = Organisms::where('kelompok', 'listkodespesimen')->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();
|
||||||
echo json_encode($getsirab);
|
echo json_encode($getsirab);
|
||||||
} else if ($idpasien == 'allany'){
|
|
||||||
$getsirab = Organisms::whereNotIn('kelompok', ['biakankultur', 'mikroorganisme', 'listkodespesimen'])->orderBy('category', 'ASC')->orderBy('name', 'ASC')->get();
|
|
||||||
echo json_encode($getsirab);
|
|
||||||
} else {
|
} else {
|
||||||
$files = Periksa::where('pasien_id', $idpasien)->orderBy('created_at', 'DESC')->get();
|
$files = Periksa::where('pasien_id', $idpasien)->orderBy('created_at', 'DESC')->get();
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
@@ -1861,10 +1612,20 @@ class DokterController extends Controller
|
|||||||
$arrnofoto = explode('-', $nofoto);
|
$arrnofoto = explode('-', $nofoto);
|
||||||
$nofoto = $arrnofoto[0];
|
$nofoto = $arrnofoto[0];
|
||||||
if ($statuse != 'Selesai'){
|
if ($statuse != 'Selesai'){
|
||||||
Periksa::where('id', $id)->update([
|
Periksa::where('noregister', $noregister)
|
||||||
'status' => 'Pemeriksaan Sampel',
|
->where('daftar', $daftar)
|
||||||
'excutor' => $idpemeriksa,
|
->where('status', 'Telah di kirim ke worklist/modalitas')
|
||||||
]);
|
->update([
|
||||||
|
'status' => 'Diperiksa',
|
||||||
|
'excutor' => $idpemeriksa,
|
||||||
|
]);
|
||||||
|
Periksa::where('noregister', $noregister)
|
||||||
|
->where('daftar', $daftar)
|
||||||
|
->where('status', null)
|
||||||
|
->update([
|
||||||
|
'status' => 'Diperiksa',
|
||||||
|
'excutor' => $idpemeriksa,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function getFoto(Request $request) {
|
public function getFoto(Request $request) {
|
||||||
@@ -2295,14 +2056,14 @@ class DokterController extends Controller
|
|||||||
$reques = $periksa->reques;
|
$reques = $periksa->reques;
|
||||||
$asuransi = $periksa->asuransi;
|
$asuransi = $periksa->asuransi;
|
||||||
$foto = $periksa->foto;
|
$foto = $periksa->foto;
|
||||||
$analis= $periksa->analis;
|
$radiografer= $periksa->radiografer;
|
||||||
$nofoto = $periksa->nofoto;
|
$nofoto = $periksa->nofoto;
|
||||||
$namapoli = $periksa->getRuangan->poli ?? 'Deleted Data Ruang';
|
$namapoli = $periksa->getRuangan->poli ?? 'Deleted Data Ruang';
|
||||||
|
|
||||||
if (is_null($analis)){
|
if (is_null($radiografer)){
|
||||||
Periksa::where('id', $idperiksa)->update([
|
Periksa::where('id', $idperiksa)->update([
|
||||||
'analis' => Session('id'),
|
'radiografer' => Session('id'),
|
||||||
'nmanalis' => Session('nama'),
|
'nmradiografer' => Session('nama'),
|
||||||
'foto' => date("Y-m-d H:i:s")
|
'foto' => date("Y-m-d H:i:s")
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -2524,7 +2285,7 @@ class DokterController extends Controller
|
|||||||
'nmppdsjunior' => $periksa->nmppdsjunior,
|
'nmppdsjunior' => $periksa->nmppdsjunior,
|
||||||
'nmppdsmiddle2' => $periksa->nmppdsmiddle2,
|
'nmppdsmiddle2' => $periksa->nmppdsmiddle2,
|
||||||
'nmppdsjunior2' => $periksa->nmppdsjunior2,
|
'nmppdsjunior2' => $periksa->nmppdsjunior2,
|
||||||
'nmanalis' => $periksa->nmanalis,
|
'nmradiografer' => $periksa->nmradiografer,
|
||||||
'nmexcutor' => $periksa->nmexcutor,
|
'nmexcutor' => $periksa->nmexcutor,
|
||||||
'klinisi' => $periksa->klinisi,
|
'klinisi' => $periksa->klinisi,
|
||||||
'klinis' => $periksa->klinis,
|
'klinis' => $periksa->klinis,
|
||||||
@@ -2574,7 +2335,7 @@ class DokterController extends Controller
|
|||||||
'nmppdsjunior' => $periksa->nmppdsjunior,
|
'nmppdsjunior' => $periksa->nmppdsjunior,
|
||||||
'nmppdsmiddle2' => $periksa->nmppdsmiddle2,
|
'nmppdsmiddle2' => $periksa->nmppdsmiddle2,
|
||||||
'nmppdsjunior2' => $periksa->nmppdsjunior2,
|
'nmppdsjunior2' => $periksa->nmppdsjunior2,
|
||||||
'nmanalis' => $periksa->nmanalis,
|
'nmradiografer' => $periksa->nmradiografer,
|
||||||
'nmexcutor' => $periksa->nmexcutor,
|
'nmexcutor' => $periksa->nmexcutor,
|
||||||
'klinisi' => $periksa->klinisi,
|
'klinisi' => $periksa->klinisi,
|
||||||
'klinis' => $periksa->klinis,
|
'klinis' => $periksa->klinis,
|
||||||
@@ -2804,9 +2565,6 @@ class DokterController extends Controller
|
|||||||
foreach($idcetak as $rid){
|
foreach($idcetak as $rid){
|
||||||
$periksa = Periksa::where('id', $rid)->first();
|
$periksa = Periksa::where('id', $rid)->first();
|
||||||
if (isset($periksa->id)){
|
if (isset($periksa->id)){
|
||||||
Periksa::where('id', $periksa->id)->update([
|
|
||||||
'status' => 'Penerimaan Sampel',
|
|
||||||
]);
|
|
||||||
if ($kanan == ''){
|
if ($kanan == ''){
|
||||||
$kolomttd = '<td><font color="grey">'.$nomor.'</font></td><td> </td>';
|
$kolomttd = '<td><font color="grey">'.$nomor.'</font></td><td> </td>';
|
||||||
$kanan = '1';
|
$kanan = '1';
|
||||||
@@ -2814,7 +2572,7 @@ class DokterController extends Controller
|
|||||||
$kolomttd = '<td> </td><td><font color="grey">'.$nomor.'</font></td>';
|
$kolomttd = '<td> </td><td><font color="grey">'.$nomor.'</font></td>';
|
||||||
$kanan = '';
|
$kanan = '';
|
||||||
}
|
}
|
||||||
$cetak = $cetak.'<tr><td align="center">'.$nomor.'</td><td>'.$periksa->nofoto.'</td><td>'.$periksa->noregister.'</td><td>'.$periksa->nmpasien.'</td><td>'.$periksa->jkpasien.'</td><td>'.$periksa->mulai.'</td><td>'.$periksa->asalpasien.'</td><td>'.$periksa->kd_spesimen.'</td><td>'.$periksa->nm_spesimen.'</td>'.$kolomttd.'</tr>';
|
$cetak = $cetak.'<tr><td align="center">'.$nomor.'</td><td>'.$periksa->nofoto.'</td><td>'.$periksa->noregister.'</td><td>'.$periksa->nmpasien.'</td><td>'.$periksa->jkpasien.'</td><td>'.$periksa->mulai.'</td><td>'.$periksa->asalpasien.'</td><td>'.$periksa->kd_spesimen.'</td><td>'.$periksa->nm_spesimen.'</td>'.$kolomttd.'</tr>';
|
||||||
$nomor++;
|
$nomor++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+222
-434
File diff suppressed because one or more lines are too long
+31
-108
@@ -224,118 +224,41 @@ class ListController extends Controller
|
|||||||
$id = $request->input('val01');
|
$id = $request->input('val01');
|
||||||
$alasan = $request->input('val02');
|
$alasan = $request->input('val02');
|
||||||
$tabel = $request->input('val03');
|
$tabel = $request->input('val03');
|
||||||
if ($id == 'buatulang'){
|
if ($alasan == ''){
|
||||||
$getdata= Periksa::where('id', $request->input('val02'))->first();
|
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Gagal', 'message' => 'Mohon isi semua form']);
|
||||||
if (isset($getdata->nofoto)){
|
return back();
|
||||||
$ceksudah = Periksa::where('nofoto', 'LIKE', $getdata->nofoto.'_%')->count();
|
|
||||||
$nomorbaru = $ceksudah++;
|
|
||||||
$periksaid = Periksa::insertGetId([
|
|
||||||
'mulai' => $getdata->mulai,
|
|
||||||
'akhir' => $getdata->akhir,
|
|
||||||
'noloket' => $getdata->noloket,
|
|
||||||
'nofoto' => $getdata->nofoto.'_'.$nomorbaru,
|
|
||||||
'noregister' => $getdata->noregister,
|
|
||||||
'asalpasien' => $getdata->asalpasien,
|
|
||||||
'nmrs' => $getdata->nmrs,
|
|
||||||
'pasien_id' => $getdata->pasien_id,
|
|
||||||
'nmpasien' => $getdata->nmpasien,
|
|
||||||
'jkpasien' => $getdata->jkpasien,
|
|
||||||
'ktp' => $getdata->ktp,
|
|
||||||
'bpjs' => $getdata->bpjs,
|
|
||||||
'tgllahirpasien'=> $getdata->tgllahirpasien,
|
|
||||||
'tlppasien' => $getdata->tlppasien,
|
|
||||||
'alamatpasien' => $getdata->alamatpasien,
|
|
||||||
'reques' => $getdata->reques,
|
|
||||||
'usia' => $getdata->usia,
|
|
||||||
'berat' => $getdata->berat,
|
|
||||||
'ruangan_id' => $getdata->ruangan_id,
|
|
||||||
'ruangan' => $getdata->ruangan,
|
|
||||||
'klinisi' => $getdata->klinisi,
|
|
||||||
'klinis' => $getdata->klinis,
|
|
||||||
'poli_id' => $getdata->poli_id,
|
|
||||||
'kd_spesimen' => $getdata->kd_spesimen,
|
|
||||||
'nm_spesimen' => $getdata->nm_spesimen,
|
|
||||||
'keterangan' => '',
|
|
||||||
'kesimpulan' => '',
|
|
||||||
'asuransi' => $getdata->asuransi,
|
|
||||||
'urgensi' => $getdata->urgensi,
|
|
||||||
'daftar' => $getdata->daftar,
|
|
||||||
'pendaftar' => Session('id'),
|
|
||||||
'nmpendaftar' => Session('nama'),
|
|
||||||
'orderid' => $getdata->orderid,
|
|
||||||
]);
|
|
||||||
try {
|
|
||||||
if ($getdata->kd_spesimen != '' AND $getdata->nm_spesimen != ''){
|
|
||||||
PendaftaranOnListiner::updateOrCreate(
|
|
||||||
[
|
|
||||||
'rnoreg' => $getdata->nofoto,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'rtglast' => date('Y-m-d'),
|
|
||||||
'norm' => $getdata->noregister,
|
|
||||||
'nama' => $getdata->nmpasien,
|
|
||||||
'alamat' => $getdata->alamatpasien,
|
|
||||||
'telp' => $getdata->tlppasien,
|
|
||||||
'hp' => $getdata->tlppasien,
|
|
||||||
'tgllahir' => $getdata->tgllahirpasien,
|
|
||||||
'umur' => $getdata->usia,
|
|
||||||
'rjenis' => $getdata->jkpasien,
|
|
||||||
'kodedok' => Session('id'),
|
|
||||||
'namadok' => Session('nama'),
|
|
||||||
'ruangan' => $getdata->ruangan,
|
|
||||||
'tes' => '',
|
|
||||||
'alat' => 'All',
|
|
||||||
'kd_spesimen' => $getdata->kd_spesimen,
|
|
||||||
'nm_spesimen' => $getdata->nm_spesimen,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return response()->json(['status' => 'Sukses', 'message' => 'Data Order Berhasil di Gandakan'], 201);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
return response()->json(['status' => 'Sukses', 'message' => 'Data Order Berhasil di Gandakan'], 201);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Gagal', 'message' => 'Data Tidak Valid']);
|
|
||||||
return back();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ($alasan == ''){
|
if ($tabel == 'aktif'){
|
||||||
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Gagal', 'message' => 'Mohon isi semua form']);
|
$alasan = 'Dibatalkan dengan alasan '.$alasan;
|
||||||
return back();
|
$input = Periksa::where('id', $id)->update([
|
||||||
} else {
|
'noloket' => null,
|
||||||
if ($tabel == 'aktif'){
|
'status' => $alasan
|
||||||
$alasan = 'Dibatalkan dengan alasan '.$alasan;
|
]);
|
||||||
$input = Periksa::where('id', $id)->update([
|
$pesan = 'Order Expertise Canceled';
|
||||||
'noloket' => null,
|
} else if ($tabel == 'arsip'){
|
||||||
'status' => $alasan
|
$total = 0;
|
||||||
]);
|
$input = Periksa::whereIn('id', $id)->update([
|
||||||
$pesan = 'Order Expertise Canceled';
|
'status'=> 'Arsip'
|
||||||
} else if ($tabel == 'arsip'){
|
]);
|
||||||
$total = 0;
|
|
||||||
$input = Periksa::whereIn('id', $id)->update([
|
|
||||||
'status'=> 'Arsip'
|
|
||||||
]);
|
|
||||||
if ($input){
|
|
||||||
$total++;
|
|
||||||
}
|
|
||||||
$pesan = 'Expertise Archieved '.$total;
|
|
||||||
} else {
|
|
||||||
$alasan = 'Dibatalkan dengan alasan '.$alasan;
|
|
||||||
$input = Jadwalperiksa::where('id', $id)->update([
|
|
||||||
'noloket' => null,
|
|
||||||
'status' => $alasan
|
|
||||||
]);
|
|
||||||
$pesan = 'Schedulling Canceled';
|
|
||||||
}
|
|
||||||
if ($input){
|
if ($input){
|
||||||
return response()->json(['icon' => 'success', 'warna' => '#5ba035', 'status' => 'Sukses', 'message' => $pesan]);
|
$total++;
|
||||||
return back();
|
|
||||||
}else {
|
|
||||||
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Gagal', 'message' => 'System Down, please try again in a few years...']);
|
|
||||||
return back();
|
|
||||||
}
|
}
|
||||||
|
$pesan = 'Expertise Archieved '.$total;
|
||||||
|
} else {
|
||||||
|
$alasan = 'Dibatalkan dengan alasan '.$alasan;
|
||||||
|
$input = Jadwalperiksa::where('id', $id)->update([
|
||||||
|
'noloket' => null,
|
||||||
|
'status' => $alasan
|
||||||
|
]);
|
||||||
|
$pesan = 'Schedulling Canceled';
|
||||||
|
}
|
||||||
|
if ($input){
|
||||||
|
return response()->json(['icon' => 'success', 'warna' => '#5ba035', 'status' => 'Sukses', 'message' => $pesan]);
|
||||||
|
return back();
|
||||||
|
}else {
|
||||||
|
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Gagal', 'message' => 'System Down, please try again in a few years...']);
|
||||||
|
return back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+42
-33
@@ -105,39 +105,48 @@ class PasienController extends Controller
|
|||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
$res = $client->request('GET', env('GETPASIEN_API'), ['query' => ['limit' => 10, 'nomedis' => $norm]]);
|
$res = $client->request('GET', 'http://10.10.123.51:8000/mr/'.$norm);
|
||||||
$response_data = json_decode($res->getBody()->getContents());
|
$response_data = json_decode($res->getBody()->getContents());
|
||||||
if (isset($response_data->response[0])) {
|
if (isset($response_data[0])) {
|
||||||
$hasil = $response_data->response[0];
|
$hasil = $response_data[0];
|
||||||
$nama = $hasil->Nama;
|
$nama = $hasil->Nama;
|
||||||
$alamat = $hasil->Alamat;
|
$alamat = $hasil->Alamat;
|
||||||
$telpon = $hasil->Telp;
|
$telpon = $hasil->Telp;
|
||||||
$kota = $hasil->Kota;
|
$kota = $hasil->Kota;
|
||||||
$kelamin = $hasil->JenisKelamin;
|
$kelamin = $hasil->JenisKelamin;
|
||||||
$tgllahir = $hasil->tanggal_lahir;
|
$tgllahir = $hasil->tanggal_lahir;
|
||||||
return response()->json([
|
$nik = $hasil->nik;
|
||||||
'id' => 'new',
|
$bpjs = $hasil->bpjs;
|
||||||
'norm' => $norm,
|
if ($kelamin == 'WANITA'){
|
||||||
'telpon' => $telpon,
|
$kelamin = 'P';
|
||||||
'nama' => $nama,
|
} else { $kelamin = 'L'; }
|
||||||
'tgl_lahir' => date('d-m-Y', strtotime($tgllahir)),
|
return response()->json([
|
||||||
'jk' => $kelamin,
|
'id' => 'new',
|
||||||
'alamat' => $alamat,
|
'norm' => $norm,
|
||||||
'kota' => $kota,
|
'telpon' => $telpon,
|
||||||
]);
|
'nama' => $nama,
|
||||||
} else {
|
'tgl_lahir' => $tgllahir,
|
||||||
return response()->json([
|
'jk' => $kelamin,
|
||||||
'id' => '',
|
'alamat' => $alamat,
|
||||||
'telpon' => '000000000',
|
'kota' => $kota,
|
||||||
'norm' => $norm,
|
'nik' => $nik,
|
||||||
'nama' => '',
|
'bpjs' => $bpjs,
|
||||||
'tgl_lahir' => date("d-m-Y"),
|
]);
|
||||||
'jk' => 'L',
|
} else {
|
||||||
'alamat' => 'Malang',
|
return response()->json([
|
||||||
'kota' => 'Malang',
|
'id' => '',
|
||||||
]);
|
'telpon' => '000000000',
|
||||||
}
|
'norm' => $norm,
|
||||||
|
'nama' => '',
|
||||||
|
'tgl_lahir' => date("d-m-Y"),
|
||||||
|
'jk' => 'L',
|
||||||
|
'alamat' => 'Malang',
|
||||||
|
'kota' => 'Malang',
|
||||||
|
'nik' => '',
|
||||||
|
'bpjs' => '',
|
||||||
|
]);
|
||||||
|
}
|
||||||
}catch (Exception $e) {
|
}catch (Exception $e) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'id' => '',
|
'id' => '',
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use App\Poli;
|
||||||
|
use App\Ruangan;
|
||||||
|
use App\Organisms;
|
||||||
|
|
||||||
|
use Validator;
|
||||||
|
use Session;
|
||||||
|
|
||||||
|
class PoliController extends Controller
|
||||||
|
{
|
||||||
|
public function index() {
|
||||||
|
if (Session::get('previlage') == ''){
|
||||||
|
return redirect('/login');
|
||||||
|
} else {
|
||||||
|
$data = [];
|
||||||
|
$data['polis'] = Poli::all();
|
||||||
|
$data['ruangans'] = Ruangan::all();
|
||||||
|
return view('admin.poli', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function storePoli(Request $request) {
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'poli' => 'required',
|
||||||
|
'poli' => 'required',
|
||||||
|
'modaliti' => 'required'
|
||||||
|
]);
|
||||||
|
if($validator->fails()) {
|
||||||
|
return response()->json(['status' => 'error', 'message' => 'Please fill input field or fill with right input']);
|
||||||
|
} else {
|
||||||
|
$poli = $request->input('poli');
|
||||||
|
$subpoli = $request->input('subpoli');
|
||||||
|
$subsubpoli = $request->input('subsubpoli');
|
||||||
|
$modaliti = $request->input('modaliti');
|
||||||
|
Poli::create([
|
||||||
|
'poli' => $request->input('poli'),
|
||||||
|
'subpoli' => $request->input('subpoli'),
|
||||||
|
'subsubpoli'=> $request->input('subsubpoli'),
|
||||||
|
'modaliti' => $request->input('modaliti'),
|
||||||
|
'modaliti2' => $request->input('modaliti2')
|
||||||
|
]);
|
||||||
|
$tulis = 'Data '.$poli.' '.$subpoli.' '.$subsubpoli.' Saved..!!';
|
||||||
|
return response()->json(['status' => 'success', 'message' => $tulis]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function getListPoli() {
|
||||||
|
$results = Poli::orderBy('subpoli', 'ASC')->get();
|
||||||
|
echo json_encode($results);
|
||||||
|
}
|
||||||
|
public function updatePoli(Request $request) {
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'id' => 'required',
|
||||||
|
'poli' => 'required',
|
||||||
|
'subpoli' => 'required',
|
||||||
|
'modaliti' => 'required'
|
||||||
|
]);
|
||||||
|
if($validator->fails()) {
|
||||||
|
return response()->json(['status' => 'error', 'message' => 'Please fill input field or fill with right input']);
|
||||||
|
} else {
|
||||||
|
$id = $request->input('id');
|
||||||
|
$poli = $request->input('poli');
|
||||||
|
$subpoli = $request->input('subpoli');
|
||||||
|
$subsubpoli = $request->input('subsubpoli');
|
||||||
|
Poli::where('id', $id)->update([
|
||||||
|
'poli' => $poli,
|
||||||
|
'subpoli' => $subpoli,
|
||||||
|
'subsubpoli'=> $subsubpoli,
|
||||||
|
'modaliti' => $request->input('modaliti'),
|
||||||
|
'modaliti2' => $request->input('modaliti2')
|
||||||
|
]);
|
||||||
|
$tulis = 'Data '.$poli.' '.$subpoli.' '.$subsubpoli.' Updated..!!';
|
||||||
|
return response()->json(['status' => 'success', 'message' => $tulis]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function deletePoli(Request $request) {
|
||||||
|
$id = $request->id;
|
||||||
|
$poli = Poli::find($id);
|
||||||
|
$poli->delete();
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
public function storeRuangan(Request $request) {
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'poli' => 'required',
|
||||||
|
'ruangan' => 'required'
|
||||||
|
]);
|
||||||
|
if($validator->fails()) {
|
||||||
|
return response()->json(['status' => 'error', 'message' => 'Please fill input field or fill with right input']);
|
||||||
|
} else {
|
||||||
|
Ruangan::create([
|
||||||
|
'poli' => $request->input('poli'),
|
||||||
|
'ruangan' => $request->input('ruangan')
|
||||||
|
]);
|
||||||
|
Session::flash('message', 'Data berhasil disimpan');
|
||||||
|
Session::flash('alert-class', 'alert-success');
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function getListRuangan(Request $request) {
|
||||||
|
$results = Ruangan::all();
|
||||||
|
echo json_encode($results);
|
||||||
|
}
|
||||||
|
public function updateRuangan(Request $request) {
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'id' => 'required',
|
||||||
|
'poli' => 'required',
|
||||||
|
'ruangan' => 'required'
|
||||||
|
]);
|
||||||
|
if($validator->fails()) {
|
||||||
|
return response()->json(['status' => 'error', 'message' => 'Please fill input field or fill with right input']);
|
||||||
|
} else {
|
||||||
|
$id = $request->input('id');
|
||||||
|
Ruangan::where('id', $id)->update([
|
||||||
|
'poli' => $request->input('poli'),
|
||||||
|
'ruangan' => $request->input('ruangan')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function deleteRuangan(Request $request) {
|
||||||
|
$id = $request->id;
|
||||||
|
$ruangan = Ruangan::find($id);
|
||||||
|
$ruangan->delete();
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-147
@@ -12,7 +12,6 @@ use App\Dokter;
|
|||||||
use App\Pasien;
|
use App\Pasien;
|
||||||
use App\Jadwalperiksa;
|
use App\Jadwalperiksa;
|
||||||
use App\Riwayat;
|
use App\Riwayat;
|
||||||
use App\RekapAntibiotik;
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Session;
|
use Session;
|
||||||
@@ -30,7 +29,7 @@ class ReportController extends Controller
|
|||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
$bulan = $request->input('bulan');
|
$bulan = $request->input('bulan');
|
||||||
$tahun = $request->input('tahun');
|
$tahun = $request->input('tahun');
|
||||||
if ($bulan == 'ALL' OR $bulan == 'Pick Month') {
|
if ($bulan == 'ALL' || $bulan == 'Pick Month') {
|
||||||
$orderbydate = Periksa::selectRaw('SUM(id) as jumlah, DATE(daftar) as day')->whereYear('daftar', $tahun)->groupBy(DB::raw('daftar'))->orderBy('daftar', 'ASC')->get();
|
$orderbydate = Periksa::selectRaw('SUM(id) as jumlah, DATE(daftar) as day')->whereYear('daftar', $tahun)->groupBy(DB::raw('daftar'))->orderBy('daftar', 'ASC')->get();
|
||||||
$bulan = '';
|
$bulan = '';
|
||||||
} else {
|
} else {
|
||||||
@@ -307,149 +306,4 @@ class ReportController extends Controller
|
|||||||
echo json_encode($arraylist);
|
echo json_encode($arraylist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function genRekapAntibiotik(Request $request) {
|
|
||||||
$data = [];
|
|
||||||
$bulan = $request->input('bulan');
|
|
||||||
$tahun = $request->input('tahun');
|
|
||||||
if ($tahun == '' OR is_null($tahun)){
|
|
||||||
$getarray = explode('?', $bulan);
|
|
||||||
$bulan = $getarray[0] ?? date('m');
|
|
||||||
$tahun = $getarray[1] ?? date('Y');
|
|
||||||
$bulan = str_replace('bulan=', '', $bulan);
|
|
||||||
$tahun = str_replace('tahun=', '', $tahun);
|
|
||||||
}
|
|
||||||
if ($bulan == '' OR $bulan == 'ALL' OR $bulan == 'Pick Month') {
|
|
||||||
$orderbydate = Periksa::whereYear('daftar', $tahun)->orderBy('daftar', 'asc')->get();
|
|
||||||
} else {
|
|
||||||
$orderbydate = Periksa::whereMonth('daftar', $bulan)->whereYear('daftar', $tahun)->orderBy('daftar', 'asc')->get();
|
|
||||||
}
|
|
||||||
|
|
||||||
$orderIds = $orderbydate->pluck('id');
|
|
||||||
|
|
||||||
$allAntibiotics = RekapAntibiotik::whereIn('orderid', $orderIds)->get();
|
|
||||||
|
|
||||||
$masterAntibioticList = $allAntibiotics->pluck('resistance')->unique()->sort()->values();
|
|
||||||
|
|
||||||
$jsonantibiotik = $allAntibiotics->groupBy('orderid')->map(function ($items) {
|
|
||||||
return $items->pluck('interpretation', 'resistance');
|
|
||||||
});
|
|
||||||
|
|
||||||
return view('admin.rekapantibiotik', compact('orderbydate', 'jsonantibiotik', 'bulan', 'tahun', 'masterAntibioticList'));
|
|
||||||
}
|
|
||||||
public function genGlassReport(Request $request) {
|
|
||||||
$data = [];
|
|
||||||
$bulan = $request->input('bulan');
|
|
||||||
$tahun = $request->input('tahun');
|
|
||||||
if ($tahun == '' OR is_null($tahun)){
|
|
||||||
$getarray = explode('?', $bulan);
|
|
||||||
$bulan = $getarray[0] ?? date('m');
|
|
||||||
$tahun = $getarray[1] ?? date('Y');
|
|
||||||
$bulan = str_replace('bulan=', '', $bulan);
|
|
||||||
$tahun = str_replace('tahun=', '', $tahun);
|
|
||||||
}
|
|
||||||
if ($bulan == '' OR $bulan == 'ALL' OR $bulan == 'Pick Month') {
|
|
||||||
$orderbydate = Periksa::whereYear('daftar', $tahun)->get();
|
|
||||||
$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', //tidak ada
|
|
||||||
'Tetracyclin-TCY',
|
|
||||||
'Tigecycline-TGC', //double
|
|
||||||
'Gentamicin-GM',
|
|
||||||
'Amikacin-AN',
|
|
||||||
'Meropenem-MEM',
|
|
||||||
'Imipenem-IPM',
|
|
||||||
'Doripenem-DOR',
|
|
||||||
'Ertapenem-ETP',
|
|
||||||
'Minocycline-MNO',
|
|
||||||
'Doxycycline-DOX',
|
|
||||||
'Spectinomycin-SPT',
|
|
||||||
'Tigecycline-TGC', //sama-ini
|
|
||||||
'Trimethoprim/Sulfamethoxazole-SXT',
|
|
||||||
'Fosfomycin-FOS',
|
|
||||||
'Vancomycin-VAN',
|
|
||||||
'Linezolid-LNZ',
|
|
||||||
'Fluconazole', //tidak ada
|
|
||||||
'Voriconazole', //tidak ada
|
|
||||||
'Caspofungin', //tidak ada
|
|
||||||
'Micafungin', //tidak ada
|
|
||||||
'Amphotericin B', //tidak ada
|
|
||||||
'Flucytosine' //tidak ada
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$orderbydate = Periksa::whereMonth('daftar', $bulan)->whereYear('daftar', $tahun)->get();
|
|
||||||
$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'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return view('admin.glassreport', compact('orderbydate', 'jsonantibiotik', 'bulan', 'tahun'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+1
-65
@@ -20,9 +20,7 @@ class TemplateController extends Controller
|
|||||||
if (Session::get('previlage') == ''){
|
if (Session::get('previlage') == ''){
|
||||||
return redirect('/login');
|
return redirect('/login');
|
||||||
} else {
|
} else {
|
||||||
$data = [];
|
$data = [];
|
||||||
$getsirab = Organisms::whereNotIn('kelompok', ['biakankultur', 'mikroorganisme', 'listkodespesimen'])->select('kelompok')->groupBy('kelompok')->orderBy('kelompok', 'ASC')->get();
|
|
||||||
$data['parameters'] = $getsirab;
|
|
||||||
return view('admin.template', $data);
|
return view('admin.template', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -275,68 +273,6 @@ class TemplateController extends Controller
|
|||||||
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Failed', 'message' => 'Unkown Error']);
|
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Failed', 'message' => 'Unkown Error']);
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
} else if ($tabel == 'Speciment'){
|
|
||||||
if ($id == 'new'){
|
|
||||||
$ceksudah = Organisms::where('name', $request->name)->where('category', $request->category)->where('kelompok', $request->kelompok)->count();
|
|
||||||
if ($ceksudah == 0){
|
|
||||||
$data = new Organisms;
|
|
||||||
$inputData = $request->except(['id', 'tabel', '_token']);
|
|
||||||
$data->fill($inputData);
|
|
||||||
$data->save();
|
|
||||||
} else {
|
|
||||||
$pesan = $request->name.' ('.$request->category.') Sudah ada, Mohon ubah Data sebelum simpan kembali';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$ceksudah = Organisms::where('id', '!=', $id)->where('name', $request->name)->where('category', $request->category)->where('kelompok', $request->kelompok)->count();
|
|
||||||
if ($ceksudah == 0){
|
|
||||||
$data = Organisms::find($id);
|
|
||||||
$inputData = $request->except(['id', 'tabel', '_token']);
|
|
||||||
$data->update($inputData);
|
|
||||||
} else {
|
|
||||||
$pesan = $request->name.' ('.$request->category.') Sudah ada, Mohon ubah Data sebelum simpan kembali';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($data){
|
|
||||||
return response()->json(['icon' => 'success', 'warna' => '#5ba035', 'status' => 'Success', 'message' => 'Saved']);
|
|
||||||
return back();
|
|
||||||
} else {
|
|
||||||
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Failed', 'message' => 'Unkown Error']);
|
|
||||||
return back();
|
|
||||||
}
|
|
||||||
} else if ($tabel == 'Parameter'){
|
|
||||||
$getdatalama = Organisms::where('kelompok', $request->kelompok)->first();
|
|
||||||
$category = $getdatalama->category ?? $request->kelompok;
|
|
||||||
|
|
||||||
if ($id == 'new'){
|
|
||||||
$ceksudah = Organisms::where('name', $request->name)->where('category', $category)->where('kelompok', $request->kelompok)->count();
|
|
||||||
if ($ceksudah == 0){
|
|
||||||
$data = Organisms::create([
|
|
||||||
'name' => $request->name,
|
|
||||||
'category' => $category,
|
|
||||||
'kelompok' => $request->kelompok
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
$pesan = $request->name.' ('.$request->category.') Sudah ada, Mohon ubah Data sebelum simpan kembali';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$ceksudah = Organisms::where('id', '!=', $id)->where('name', $request->name)->where('category', $category)->where('kelompok', $request->kelompok)->count();
|
|
||||||
if ($ceksudah == 0){
|
|
||||||
$data = Organisms::where('id', $id)->update([
|
|
||||||
'name' => $request->name,
|
|
||||||
'category' => $category,
|
|
||||||
'kelompok' => $request->kelompok
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
$pesan = $request->name.' ('.$request->category.') Sudah ada, Mohon ubah Data sebelum simpan kembali';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($data){
|
|
||||||
return response()->json(['icon' => 'success', 'warna' => '#5ba035', 'status' => 'Success', 'message' => 'Saved']);
|
|
||||||
return back();
|
|
||||||
} else {
|
|
||||||
return response()->json(['icon' => 'error', 'warna' => '#bf441d', 'status' => 'Failed', 'message' => 'Unkown Error']);
|
|
||||||
return back();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ($id == 'new'){
|
if ($id == 'new'){
|
||||||
$data = new SiraB;
|
$data = new SiraB;
|
||||||
+1
-1
@@ -12,6 +12,6 @@ class VerifyCsrfToken extends Middleware
|
|||||||
* @var array<int, string>
|
* @var array<int, string>
|
||||||
*/
|
*/
|
||||||
protected $except = [
|
protected $except = [
|
||||||
'registerpasien', 'registerjson', 'ekstrakhasil', 'prosesbatal', 'cekaksess'
|
'registerpasien', 'registerjson', 'ekstrakhasil', 'prosesbatal'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -24,8 +24,6 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
//resolve(\Illuminate\Routing\UrlGenerator::class)->forceScheme('https');
|
|
||||||
//parent::boot();
|
|
||||||
RateLimiter::for('api', function (Request $request) {
|
RateLimiter::for('api', function (Request $request) {
|
||||||
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||||
});
|
});
|
||||||
@@ -231,80 +231,110 @@ class AstmMessageService
|
|||||||
return response()->json(['message' => 'Data berhasil diproses dan disimpan.']);
|
return response()->json(['message' => 'Data berhasil diproses dan disimpan.']);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!empty($mltrData)) {
|
if (!empty($mltrData)){
|
||||||
Log::info("Trying robust parser for MTRSL:", $mltrData);
|
Log::info("Trying parser MTRSL :", $mltrData);
|
||||||
|
$parsedData = [];
|
||||||
$resultSample = new ResultSample();
|
$parsedData['antibiotics'] = [];
|
||||||
$antibioticResults = [];
|
$antibiotic = '';
|
||||||
$currentAntibiotic = [];
|
$resistance = '';
|
||||||
|
$value = '';
|
||||||
foreach ($mltrData as $field) {
|
$interpretation = '';
|
||||||
if (strlen($field) < 2) continue; // Lewati field kosong
|
$mulaikirim = 0;
|
||||||
|
$resultSample = new ResultSample();
|
||||||
// 1. Identifikasi TAG dan VALUE dari setiap field
|
foreach ($mltrData as $index => $field) {
|
||||||
$tag = substr($field, 0, 2);
|
if ($field == 'ra'){
|
||||||
$value = substr($field, 2);
|
if ($antibiotic != ''){
|
||||||
|
$parsedData['antibiotics'][] = [
|
||||||
// 2. Gunakan SWITCH pada TAG, bukan pada INDEX
|
'antibiotic' => $antibiotic, // Antibiotik
|
||||||
switch ($tag) {
|
'resistance' => $resistance, // Hasil Resistansi
|
||||||
// == Data Pasien & Sampel ==
|
'value' => $value, // Nilai
|
||||||
case 'pi': $resultSample->patient_id = $value; break;
|
'interpretation'=> $interpretation // Interpretasi
|
||||||
case 'pn':
|
];
|
||||||
$patientNames = explode(',', $value ?? null);
|
$antibiotic = '';
|
||||||
$resultSample->patient_name_last = trim($patientNames[0] ?? '');
|
$resistance = '';
|
||||||
$resultSample->patient_name_first = trim($patientNames[1] ?? '');
|
$value = '';
|
||||||
$resultSample->patient_name_middle = trim($patientNames[2] ?? '');
|
$interpretation = '';
|
||||||
break;
|
} else {
|
||||||
case 'pl': $resultSample->address_street = $value; break;
|
$mulaikirim = 1;
|
||||||
case 'ci': $resultSample->accession_number = substr($value, 6); break;
|
}
|
||||||
case 'o2': $resultSample->organism = $value; break;
|
} else {
|
||||||
|
if ($mulaikirim == 1){
|
||||||
// Tanggal bisa memiliki tag s1, s3, dll. Sesuaikan jika perlu
|
$antibiotic = substr($field, 2);
|
||||||
case 's3':
|
$mulaikirim++;
|
||||||
try {
|
} else if ($mulaikirim == 2){
|
||||||
// Contoh parsing tanggal dari format Vitek: 08/25/2025
|
$resistance = substr($field, 2);
|
||||||
$resultSample->test_complete_datetime = Carbon::createFromFormat('m/d/Y', $value)->format('Y-m-d H:i:s');
|
$mulaikirim++;
|
||||||
} catch (Exception $e) {
|
} else if ($mulaikirim == 3){
|
||||||
$resultSample->test_complete_datetime = now();
|
$value = substr($field, 2);
|
||||||
|
$mulaikirim++;
|
||||||
|
} else if ($mulaikirim == 4){
|
||||||
|
$interpretation = substr($field, 2);
|
||||||
|
$mulaikirim++;
|
||||||
|
} else {
|
||||||
|
$field = substr($field, 2);
|
||||||
|
switch ($index) {
|
||||||
|
case 0:
|
||||||
|
$resultSample->sender_name = $alat;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$resultSample->version_number = $field; // iiV2
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$resultSample->isolate_number = $field; // is000015F278BD
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$resultSample->patient_id = $field; // pi12009427
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
$patientNames = explode(',', $field ?? null);
|
||||||
|
if (count($patientNames) > 0) {
|
||||||
|
$resultSample->patient_name_last = trim($patientNames[0]); // Last name
|
||||||
|
}
|
||||||
|
if (count($patientNames) > 1) {
|
||||||
|
$resultSample->patient_name_first = trim($patientNames[1]); // First name
|
||||||
|
}
|
||||||
|
if (count($patientNames) > 2) {
|
||||||
|
$resultSample->patient_name_middle = trim($patientNames[2]); // Middle name
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
$resultSample->address_street = $field; // plMANINJAU
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
try {
|
||||||
|
$resultSample->message_datetime = Carbon::parse($field)->format('Y-m-d') ?? null;
|
||||||
|
}catch (Exception $e) {
|
||||||
|
$resultSample->message_datetime = date('Y-m-d');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
try {
|
||||||
|
$resultSample->test_complete_datetime = Carbon::parse($field)->format('Y-m-d') ?? null;
|
||||||
|
}catch (Exception $e) {
|
||||||
|
$resultSample->test_complete_datetime = date('Y-m-d');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
$resultSample->accession_number = substr($field, 6); // ci30112024.26859
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
$resultSample->organism = $field; // o2Staphylococcus haemolyticus
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
|
|
||||||
// == Logika Cerdas untuk Blok Antibiotik ==
|
|
||||||
case 'ra':
|
|
||||||
// 'ra' adalah sinyal bahwa blok antibiotik SEBELUMNYA sudah selesai.
|
|
||||||
// Jika $currentAntibiotic tidak kosong, simpan ke hasil utama.
|
|
||||||
if (!empty($currentAntibiotic)) {
|
|
||||||
$antibioticResults[] = $currentAntibiotic;
|
|
||||||
}
|
|
||||||
// Reset untuk menampung data antibiotik yang baru.
|
|
||||||
$currentAntibiotic = [];
|
|
||||||
break;
|
|
||||||
case 'a1': $currentAntibiotic['antibiotic'] = $value; break; // Kode Antibiotik
|
|
||||||
case 'a2': $currentAntibiotic['resistance'] = $value; break; // Nama Antibiotik
|
|
||||||
case 'a3': $currentAntibiotic['value'] = $value; break; // Nilai MIC
|
|
||||||
case 'a4': $currentAntibiotic['interpretation'] = $value; break; // Interpretasi
|
|
||||||
case 'an':
|
|
||||||
// Jika 'an' ada, ini adalah interpretasi final, timpa yang sebelumnya.
|
|
||||||
$currentAntibiotic['interpretation'] = $value;
|
|
||||||
break;
|
|
||||||
|
|
||||||
// == Metadata Lainnya (opsional) ==
|
|
||||||
case 'ii': $resultSample->version_number = $value; break;
|
|
||||||
case 'is': $resultSample->isolate_number = $value; break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Penting: Simpan blok antibiotik TERAKHIR setelah loop selesai
|
//$resultSample->specimen_type = $parsedData['specimen_type'] ?? null; // Could be inferred
|
||||||
if (!empty($currentAntibiotic)) {
|
//$resultSample->test_id = $parsedData['test_id'] ?? null;
|
||||||
$antibioticResults[] = $currentAntibiotic;
|
|
||||||
}
|
|
||||||
|
|
||||||
$resultSample->sender_name = $alat ?? 'VITEK'; // Pastikan var $alat ada
|
// Result Record
|
||||||
$resultSample->additional_result = json_encode($antibioticResults);
|
|
||||||
|
$resultSample->additional_result = json_encode($parsedData['antibiotics']);
|
||||||
|
|
||||||
// Menyimpan data yang sudah diparse
|
// Menyimpan data yang sudah diparse
|
||||||
$resultSample->save();
|
$resultSample->save();
|
||||||
Log::info("Data MTRSL successfully parsed and saved.", $resultSample->toArray());
|
Log::info("Data MTRL Berhasil di Parse dan di simpan ", $resultSample->toArray());
|
||||||
return response()->json(['message' => 'Data berhasil diproses dan disimpan.']);
|
return response()->json(['message' => 'Data berhasil diproses dan disimpan.']);
|
||||||
} else {
|
} else {
|
||||||
$headerData = explode("|", $response);
|
$headerData = explode("|", $response);
|
||||||
Loaded 100 of 15172 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in New Issue
Block a user