Update Database Stuktur
This commit is contained in:
@@ -1709,7 +1709,38 @@ class DokterController extends Controller
|
|||||||
$idpasien = $request->input('val01');
|
$idpasien = $request->input('val01');
|
||||||
$arrayfiles = [];
|
$arrayfiles = [];
|
||||||
if ($idpasien == 'sirab'){
|
if ($idpasien == 'sirab'){
|
||||||
$getsirab = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->get();
|
$jumlah = 0;
|
||||||
|
$getklonin = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->whereNull('cek')->get();
|
||||||
|
foreach($getklonin as $row){
|
||||||
|
$family = $row->family;
|
||||||
|
$spesies = $row->spesies;
|
||||||
|
$getallantibiotik = SiraB::where('family', $family)->get();
|
||||||
|
foreach($getallantibiotik as $rowa){
|
||||||
|
SiraB::updateOrCreate(
|
||||||
|
[
|
||||||
|
'family' => $family,
|
||||||
|
'spesies' => $spesies,
|
||||||
|
'antibiotik' => $rowa->antibiotik,
|
||||||
|
'subantibiotik' => $rowa->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,
|
||||||
|
'cek' => '1',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$jumlah++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo $jumlah;
|
||||||
|
/*
|
||||||
|
$getsirab = SiraB::orderBy('family', 'ASC')->orderBy('spesies', 'ASC')->get();
|
||||||
foreach($getsirab as $row){
|
foreach($getsirab as $row){
|
||||||
if ($row->subantibiotik !== null && $row->subantibiotik != ''){
|
if ($row->subantibiotik !== null && $row->subantibiotik != ''){
|
||||||
$antibiotikall = $row->subantibiotik;
|
$antibiotikall = $row->subantibiotik;
|
||||||
@@ -1734,6 +1765,7 @@ class DokterController extends Controller
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
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();
|
||||||
echo json_encode($getsirab);
|
echo json_encode($getsirab);
|
||||||
|
|||||||
@@ -806,7 +806,7 @@ class FrontpageController extends Controller
|
|||||||
'tgllahir' => $tgllahir,
|
'tgllahir' => $tgllahir,
|
||||||
'jk' => $jk,
|
'jk' => $jk,
|
||||||
];
|
];
|
||||||
$this->sendRegistrationToLis($dataForLis);
|
//$this->sendRegistrationToLis($dataForLis);
|
||||||
}
|
}
|
||||||
if ($pesan != ''){
|
if ($pesan != ''){
|
||||||
return response()->json(['status' => 'Sukses', 'message' => $pesan], 201);
|
return response()->json(['status' => 'Sukses', 'message' => $pesan], 201);
|
||||||
@@ -1394,6 +1394,7 @@ class FrontpageController extends Controller
|
|||||||
$usia = $getdata->usia;
|
$usia = $getdata->usia;
|
||||||
$periksaid = Periksa::where('id', $jeniskerja)->update([
|
$periksaid = Periksa::where('id', $jeniskerja)->update([
|
||||||
'nmpasien' => $nama,
|
'nmpasien' => $nama,
|
||||||
|
'noregister' => $noregister,
|
||||||
'jkpasien' => $jk,
|
'jkpasien' => $jk,
|
||||||
'ktp' => $nik,
|
'ktp' => $nik,
|
||||||
'bpjs' => $bpjs,
|
'bpjs' => $bpjs,
|
||||||
@@ -1447,7 +1448,7 @@ class FrontpageController extends Controller
|
|||||||
'tgllahir' => $tgllahir,
|
'tgllahir' => $tgllahir,
|
||||||
'jk' => $jk,
|
'jk' => $jk,
|
||||||
];
|
];
|
||||||
$this->sendRegistrationToLis($dataForLis);
|
//$this->sendRegistrationToLis($dataForLis);
|
||||||
}
|
}
|
||||||
if ($pesan != ''){
|
if ($pesan != ''){
|
||||||
if ($file != '' AND $jenisgambar != ''){
|
if ($file != '' AND $jenisgambar != ''){
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ return new class extends Migration
|
|||||||
$table->string('jk', 1)->nullable();
|
$table->string('jk', 1)->nullable();
|
||||||
$table->date('tgl_lahir')->nullable();
|
$table->date('tgl_lahir')->nullable();
|
||||||
$table->string('kota', 50)->nullable();
|
$table->string('kota', 50)->nullable();
|
||||||
$table->string('alamat', 100)->nullable();
|
$table->text('alamat')->nullable();
|
||||||
$table->string('telpon', 50)->nullable();
|
$table->string('telpon', 50)->nullable();
|
||||||
$table->string('nik', 50)->nullable();
|
$table->string('nik', 50)->nullable();
|
||||||
$table->string('bpjs', 50)->nullable();
|
$table->string('bpjs', 50)->nullable();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ return new class extends Migration
|
|||||||
$table->id();
|
$table->id();
|
||||||
$table->timestamp('mulai')->nullable();
|
$table->timestamp('mulai')->nullable();
|
||||||
$table->timestamp('akhir')->nullable();
|
$table->timestamp('akhir')->nullable();
|
||||||
|
$table->string('orderid', 255)->nullable();
|
||||||
$table->string('nofoto', 50)->nullable();
|
$table->string('nofoto', 50)->nullable();
|
||||||
$table->integer('noloket')->nullable();
|
$table->integer('noloket')->nullable();
|
||||||
$table->string('noregister', 150)->nullable();
|
$table->string('noregister', 150)->nullable();
|
||||||
@@ -25,7 +26,7 @@ return new class extends Migration
|
|||||||
$table->string('jkpasien', 5)->nullable();
|
$table->string('jkpasien', 5)->nullable();
|
||||||
$table->date('tgllahirpasien')->nullable();
|
$table->date('tgllahirpasien')->nullable();
|
||||||
$table->string('tlppasien', 50)->nullable();
|
$table->string('tlppasien', 50)->nullable();
|
||||||
$table->string('alamatpasien', 50)->nullable();
|
$table->text('alamatpasien')->nullable();
|
||||||
$table->string('reques', 150)->nullable();
|
$table->string('reques', 150)->nullable();
|
||||||
$table->string('usia', 25)->nullable();
|
$table->string('usia', 25)->nullable();
|
||||||
$table->string('ktp', 25)->nullable();
|
$table->string('ktp', 25)->nullable();
|
||||||
@@ -50,7 +51,7 @@ return new class extends Migration
|
|||||||
$table->string('nmanalis', 250)->nullable();
|
$table->string('nmanalis', 250)->nullable();
|
||||||
$table->string('nmexcutor', 250)->nullable();
|
$table->string('nmexcutor', 250)->nullable();
|
||||||
$table->string('klinisi', 250)->nullable();
|
$table->string('klinisi', 250)->nullable();
|
||||||
$table->string('klinis', 250)->nullable();
|
$table->text('klinis')->nullable();
|
||||||
$table->integer('poli_id')->nullable();
|
$table->integer('poli_id')->nullable();
|
||||||
$table->text('keterangan')->nullable();
|
$table->text('keterangan')->nullable();
|
||||||
$table->text('kesimpulan')->nullable();
|
$table->text('kesimpulan')->nullable();
|
||||||
|
|||||||
Reference in New Issue
Block a user