Update
This commit is contained in:
@@ -175,7 +175,19 @@ class Controller extends BaseController
|
|||||||
protected function getDefaultData($jenis, $master, $mulai, $akhir, $valcari) {
|
protected function getDefaultData($jenis, $master, $mulai, $akhir, $valcari) {
|
||||||
$query = Periksa::whereNotNull('nofoto');
|
$query = Periksa::whereNotNull('nofoto');
|
||||||
if ($jenis == 'ThisDay') {
|
if ($jenis == 'ThisDay') {
|
||||||
return $query->whereDate('daftar', Carbon::today());
|
$url = url()->current();
|
||||||
|
$baseurl = url('/');
|
||||||
|
$ceklaman = str_replace($baseurl.'/', '', $url);
|
||||||
|
if ($ceklaman == 'pendaftaran'){
|
||||||
|
return $query->whereDate('daftar', Carbon::today());
|
||||||
|
} else {
|
||||||
|
return $query->where(function($q) {
|
||||||
|
$q->where('status', 'Selesai')
|
||||||
|
->orWhereNull('status')
|
||||||
|
->orWhere('status', 'not like', 'Dibatalkan%');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} else if ($jenis == 'mundur2') {
|
} else if ($jenis == 'mundur2') {
|
||||||
return $query->whereDate('daftar', '>=', Carbon::today()->subDays(2));
|
return $query->whereDate('daftar', '>=', Carbon::today()->subDays(2));
|
||||||
} else if ($jenis == 'mundur3') {
|
} else if ($jenis == 'mundur3') {
|
||||||
|
|||||||
@@ -1709,6 +1709,7 @@ class DokterController extends Controller
|
|||||||
$idpasien = $request->input('val01');
|
$idpasien = $request->input('val01');
|
||||||
$arrayfiles = [];
|
$arrayfiles = [];
|
||||||
if ($idpasien == 'sirab'){
|
if ($idpasien == 'sirab'){
|
||||||
|
/*
|
||||||
$jumlah = 0;
|
$jumlah = 0;
|
||||||
$getklonin = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->whereNull('cek')->get();
|
$getklonin = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->whereNull('cek')->get();
|
||||||
foreach($getklonin as $row){
|
foreach($getklonin as $row){
|
||||||
@@ -1739,33 +1740,34 @@ class DokterController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo $jumlah;
|
echo $jumlah;
|
||||||
/*
|
|
||||||
$getsirab = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->get();
|
|
||||||
foreach($getsirab as $row){
|
|
||||||
if ($row->subantibiotik !== null && $row->subantibiotik != ''){
|
|
||||||
$antibiotikall = $row->subantibiotik;
|
|
||||||
} else {
|
|
||||||
$antibiotikall = $row->antibiotik;
|
|
||||||
}
|
|
||||||
$arrayfiles[] = array(
|
|
||||||
'id' => $row->id,
|
|
||||||
'family' => $row->family,
|
|
||||||
'spesies' => $row->spesies,
|
|
||||||
'antibiotik' => $row->antibiotik,
|
|
||||||
'subantibiotik' => $row->subantibiotik,
|
|
||||||
'diskcontent' => $row->diskcontent,
|
|
||||||
'batasatas' => $row->batasatas,
|
|
||||||
'midrange' => $row->midrange,
|
|
||||||
'batasbawah' => $row->batasbawah,
|
|
||||||
'sumber' => $row->sumber,
|
|
||||||
'kodedok' => $row->kodedok,
|
|
||||||
'atu' => $row->atu,
|
|
||||||
'kelompok' => $row->kelompok,
|
|
||||||
'antibiotikall' => $antibiotikall,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
echo json_encode($arrayfiles);
|
|
||||||
*/
|
*/
|
||||||
|
$getsirab = SiraB::orderBy('family', 'ASC')
|
||||||
|
->orderBy('spesies', 'ASC')
|
||||||
|
->get()
|
||||||
|
->map(function($row) {
|
||||||
|
return [
|
||||||
|
'id' => $row->id,
|
||||||
|
'family' => $row->family,
|
||||||
|
'spesies' => $row->spesies,
|
||||||
|
'antibiotik' => $row->antibiotik,
|
||||||
|
'subantibiotik' => $row->subantibiotik,
|
||||||
|
'diskcontent' => $row->diskcontent,
|
||||||
|
'batasatas' => $row->batasatas,
|
||||||
|
'midrange' => $row->midrange,
|
||||||
|
'batasbawah' => $row->batasbawah,
|
||||||
|
'sumber' => $row->sumber,
|
||||||
|
'kodedok' => $row->kodedok,
|
||||||
|
'atu' => $row->atu,
|
||||||
|
'kelompok' => $row->kelompok,
|
||||||
|
'antibiotikall' => $row->subantibiotik !== null && $row->subantibiotik !== ''
|
||||||
|
? $row->subantibiotik
|
||||||
|
: $row->antibiotik,
|
||||||
|
];
|
||||||
|
})
|
||||||
|
->toArray();
|
||||||
|
|
||||||
|
echo json_encode($getsirab);
|
||||||
|
|
||||||
} 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();
|
||||||
echo json_encode($getsirab);
|
echo json_encode($getsirab);
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('db_komponenjawaban', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('accnumber', 100)->nullable();
|
||||||
|
$table->string('template', 100)->nullable();
|
||||||
|
$table->string('komponen', 100)->nullable();
|
||||||
|
$table->text('isidata')->nullable();
|
||||||
|
$table->string('created_by', 255)->nullable();
|
||||||
|
$table->timestamp('created_at')->useCurrent();
|
||||||
|
$table->timestamp('updated_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('db_komponenjawaban');
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user