first commit
This commit is contained in:
15
webservice/evapor/.editorconfig
Normal file
15
webservice/evapor/.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
19
webservice/evapor/.env.example
Normal file
19
webservice/evapor/.env.example
Normal file
@@ -0,0 +1,19 @@
|
||||
APP_NAME=Lumen
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_TIMEZONE=UTC
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_SLACK_WEBHOOK_URL=
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=homestead
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
6
webservice/evapor/.gitignore
vendored
Normal file
6
webservice/evapor/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/vendor
|
||||
/.idea
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
.env
|
||||
.phpunit.result.cache
|
||||
6
webservice/evapor/.styleci.yml
Normal file
6
webservice/evapor/.styleci.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
php:
|
||||
preset: laravel
|
||||
disabled:
|
||||
- unused_use
|
||||
js: true
|
||||
css: true
|
||||
24
webservice/evapor/README.md
Normal file
24
webservice/evapor/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Lumen PHP Framework
|
||||
|
||||
[](https://travis-ci.org/laravel/lumen-framework)
|
||||
[](https://packagist.org/packages/laravel/lumen-framework)
|
||||
[](https://packagist.org/packages/laravel/lumen-framework)
|
||||
[](https://packagist.org/packages/laravel/lumen-framework)
|
||||
|
||||
Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.
|
||||
|
||||
## Official Documentation
|
||||
|
||||
Documentation for the framework can be found on the [Lumen website](https://lumen.laravel.com/docs).
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to Lumen! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Lumen framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
0
webservice/evapor/app/Console/Commands/.gitkeep
Normal file
0
webservice/evapor/app/Console/Commands/.gitkeep
Normal file
29
webservice/evapor/app/Console/Kernel.php
Normal file
29
webservice/evapor/app/Console/Kernel.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
10
webservice/evapor/app/Events/Event.php
Normal file
10
webservice/evapor/app/Events/Event.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
abstract class Event
|
||||
{
|
||||
use SerializesModels;
|
||||
}
|
||||
16
webservice/evapor/app/Events/ExampleEvent.php
Normal file
16
webservice/evapor/app/Events/ExampleEvent.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
class ExampleEvent extends Event
|
||||
{
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
54
webservice/evapor/app/Exceptions/Handler.php
Normal file
54
webservice/evapor/app/Exceptions/Handler.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of the exception types that should not be reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
AuthorizationException::class,
|
||||
HttpException::class,
|
||||
ModelNotFoundException::class,
|
||||
ValidationException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Throwable $exception
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
parent::report($exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Throwable $exception
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
10
webservice/evapor/app/Http/Controllers/Controller.php
Normal file
10
webservice/evapor/app/Http/Controllers/Controller.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Laravel\Lumen\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
//
|
||||
}
|
||||
18
webservice/evapor/app/Http/Controllers/ExampleController.php
Normal file
18
webservice/evapor/app/Http/Controllers/ExampleController.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
class ExampleController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
479
webservice/evapor/app/Http/Controllers/IcdController.php
Normal file
479
webservice/evapor/app/Http/Controllers/IcdController.php
Normal file
@@ -0,0 +1,479 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Auth;
|
||||
|
||||
class IcdController extends Controller
|
||||
{
|
||||
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
// $this->middleware('auth:api');
|
||||
if(null == $request->header('x-token'))
|
||||
{
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
$user = DB::table('webservice')->where('token',$request->header('x-token'))->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function rajalDiagFiltered($tgl_awal,$tgl_akhir,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
// $tgl_awal = urldecode($tgl_awal);
|
||||
// $tgl_akhir = urldecode($tgl_akhir);
|
||||
$incovit = DB::table('m_ruang')->select('no')->where([
|
||||
['kelompok','=','IGD'],
|
||||
['st_aktif','=',1]
|
||||
])->get();
|
||||
$arr_incovit = [];
|
||||
foreach ($incovit as $row) {
|
||||
$arr_incovit[] = $row->no;
|
||||
}
|
||||
if(null == $tgl_awal || null == $tgl_akhir)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
->join('t_pendaftaran','t_icd.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->select(DB::raw('t_icd.tanggal,m_ruang.nama as namaruang,icd.icd_code, icd.jenis_penyakit,m_dokter.namadokter,count(*) as jml'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
])
|
||||
->whereNotIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->whereBetween('t_icd.tanggal',[$tgl_awal,$tgl_akhir])
|
||||
->groupBy('t_icd.tanggal','icd.icd_code','m_dokter.namadokter','m_ruang.nama')
|
||||
->get();
|
||||
// return $result;
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
$row_detil = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
->join('t_pendaftaran','t_icd.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->join('m_pasien','m_pasien.nomr','=','t_pendaftaran.nomr')
|
||||
->leftJoin('m_statuskeluar','t_pendaftaran.status','=','m_statuskeluar.status')
|
||||
->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluar.keterangan as status_keluar'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
['m_ruang.nama','=',$detil->namaruang],
|
||||
['icd.icd_code','=',$detil->icd_code],
|
||||
['m_dokter.namadokter','=',$detil->namadokter],
|
||||
['t_icd.tanggal','=',$detil->tanggal],
|
||||
])
|
||||
->whereNotIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
$set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
|
||||
public function igdDiagFiltered($tgl_awal,$tgl_akhir,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
// $tgl_awal = urldecode($tgl_awal);
|
||||
// $tgl_akhir = urldecode($tgl_akhir);
|
||||
$incovit = DB::table('m_ruang')->select('no')->where([
|
||||
['kelompok','=','IGD'],
|
||||
['st_aktif','=',1]
|
||||
])->get();
|
||||
$arr_incovit = [];
|
||||
foreach ($incovit as $row) {
|
||||
$arr_incovit[] = $row->no;
|
||||
}
|
||||
|
||||
if(null == $tgl_awal || null == $tgl_akhir)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
->join('t_pendaftaran','t_icd.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->select(DB::raw('t_icd.tanggal,icd.icd_code, m_ruang.nama as namaruang,icd.jenis_penyakit,m_dokter.namadokter,count(*) as jml'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
])
|
||||
->whereIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->whereBetween('t_icd.tanggal',[$tgl_awal,$tgl_akhir])
|
||||
->groupBy('t_icd.tanggal','icd.icd_code','m_ruang.nama','m_dokter.namadokter')
|
||||
->get();
|
||||
// return $result;
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
$row_detil = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
->join('t_pendaftaran','t_icd.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->join('m_pasien','m_pasien.nomr','=','t_pendaftaran.nomr')
|
||||
->leftJoin('m_statuskeluar','t_pendaftaran.status','=','m_statuskeluar.status')
|
||||
->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluar.keterangan as status_keluar'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
['m_ruang.nama','=',$detil->namaruang],
|
||||
['icd.icd_code','=',$detil->icd_code],
|
||||
['m_dokter.namadokter','=',$detil->namadokter],
|
||||
['t_icd.tanggal','=',$detil->tanggal],
|
||||
])
|
||||
->whereIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
$set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
|
||||
public function ranapDiagFiltered($tgl_awal,$tgl_akhir,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
// $tgl_awal = urldecode($tgl_awal);
|
||||
// $tgl_akhir = urldecode($tgl_akhir);
|
||||
|
||||
if(null == $tgl_awal || null == $tgl_akhir)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
->join('t_admission','t_icd.idxdaftar','=','t_admission.id_admission')
|
||||
->join('m_ruang','m_ruang.no','=','t_admission.noruang')
|
||||
->select(DB::raw('t_icd.tanggal,m_ruang.kelompok,m_ruang.nama as namaruang,icd.icd_code, icd.jenis_penyakit,m_dokter.namadokter,count(*) as jml'))
|
||||
->where([
|
||||
['status_rajal','=',0],
|
||||
])
|
||||
->whereBetween('t_icd.tanggal',[$tgl_awal,$tgl_akhir])
|
||||
->groupBy('t_icd.tanggal','icd.icd_code','m_dokter.namadokter','m_ruang.kelompok','m_ruang.nama')
|
||||
->get();
|
||||
// return $result;
|
||||
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
$row_detil = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
->join('t_admission','t_icd.idxdaftar','=','t_admission.id_admission')
|
||||
->join('m_ruang','m_ruang.no','=','t_admission.noruang')
|
||||
->join('m_pasien','m_pasien.nomr','=','t_admission.nomr')
|
||||
->leftJoin('t_resumepulang','t_resumepulang.idadmission','=','t_admission.id_admission')
|
||||
->leftJoin('m_statuskeluarranap','m_statuskeluarranap.kode','=','t_resumepulang.statuspulang')
|
||||
->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluarranap.nama as status_keluar'))
|
||||
->where([
|
||||
['status_rajal','=',0],
|
||||
['m_ruang.nama','=',$detil->namaruang],
|
||||
['icd.icd_code','=',$detil->icd_code],
|
||||
['m_dokter.namadokter','=',$detil->namadokter],
|
||||
['t_icd.tanggal','=',$detil->tanggal],
|
||||
])
|
||||
->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
$set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
|
||||
public function rajalTindakanFiltered($tgl_awal,$tgl_akhir,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
// $tgl_awal = urldecode($tgl_awal);
|
||||
// $tgl_akhir = urldecode($tgl_akhir);
|
||||
$incovit = DB::table('m_ruang')->select('no')->where([
|
||||
['kelompok','=','IGD'],
|
||||
['st_aktif','=',1]
|
||||
])->get();
|
||||
$arr_incovit = [];
|
||||
foreach ($incovit as $row) {
|
||||
$arr_incovit[] = $row->no;
|
||||
}
|
||||
|
||||
if(null == $tgl_awal || null == $tgl_akhir)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_icd_cm')
|
||||
->join('icd_cm','t_icd_cm.icd','=','icd_cm.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_pendaftaran','t_icd_cm.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->select(DB::raw('t_icd_cm.tanggal,m_ruang.nama as namaruang,icd_cm.kode, icd_cm.keterangan,m_dokter.namadokter,count(*) as jml'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
])
|
||||
->whereNotIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->whereBetween('t_icd_cm.tanggal',[$tgl_awal,$tgl_akhir])
|
||||
->groupBy('t_icd_cm.tanggal','icd_cm.kode','m_dokter.namadokter','m_ruang.nama')
|
||||
->get();
|
||||
// return $result;
|
||||
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
$row_detil = DB::table('t_icd_cm')
|
||||
->join('icd_cm','t_icd_cm.icd','=','icd_cm.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_pendaftaran','t_icd_cm.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->join('m_pasien','m_pasien.nomr','=','t_pendaftaran.nomr')
|
||||
->leftJoin('m_statuskeluar','t_pendaftaran.status','=','m_statuskeluar.status')
|
||||
->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluar.keterangan as status_keluar'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
['m_ruang.nama','=',$detil->namaruang],
|
||||
['icd_cm.kode','=',$detil->kode],
|
||||
['m_dokter.namadokter','=',$detil->namadokter],
|
||||
['t_icd_cm.tanggal','=',$detil->tanggal],
|
||||
])
|
||||
->whereNotIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
$set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
|
||||
public function igdTindakanFiltered($tgl_awal,$tgl_akhir,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
// $tgl_awal = urldecode($tgl_awal);
|
||||
// $tgl_akhir = urldecode($tgl_akhir);
|
||||
$incovit = DB::table('m_ruang')->select('no')->where([
|
||||
['kelompok','=','IGD'],
|
||||
['st_aktif','=',1]
|
||||
])->get();
|
||||
$arr_incovit = [];
|
||||
foreach ($incovit as $row) {
|
||||
$arr_incovit[] = $row->no;
|
||||
}
|
||||
|
||||
if(null == $tgl_awal || null == $tgl_akhir)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_icd_cm')
|
||||
->join('icd_cm','t_icd_cm.icd','=','icd_cm.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_pendaftaran','t_icd_cm.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->select(DB::raw('t_icd_cm.tanggal,icd_cm.kode, m_ruang.nama as namaruang,icd_cm.keterangan,m_dokter.namadokter,count(*) as jml'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
])
|
||||
->whereIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->whereBetween('t_icd_cm.tanggal',[$tgl_awal,$tgl_akhir])
|
||||
->groupBy('t_icd_cm.tanggal','icd_cm.kode','m_ruang.nama','m_dokter.namadokter')
|
||||
->get();
|
||||
// return $result;
|
||||
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
$row_detil = DB::table('t_icd_cm')
|
||||
->join('icd_cm','t_icd_cm.icd','=','icd_cm.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_pendaftaran','t_icd_cm.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->join('m_pasien','m_pasien.nomr','=','t_pendaftaran.nomr')
|
||||
->leftJoin('m_statuskeluar','t_pendaftaran.status','=','m_statuskeluar.status')
|
||||
->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluar.keterangan as status_keluar'))
|
||||
->where([
|
||||
['status_rajal','=',1],
|
||||
['m_ruang.nama','=',$detil->namaruang],
|
||||
['icd_cm.kode','=',$detil->kode],
|
||||
['m_dokter.namadokter','=',$detil->namadokter],
|
||||
['t_icd_cm.tanggal','=',$detil->tanggal],
|
||||
])
|
||||
->whereIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
$set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
|
||||
public function ranapTindakanFiltered($tgl_awal,$tgl_akhir,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
// $tgl_awal = urldecode($tgl_awal);
|
||||
// $tgl_akhir = urldecode($tgl_akhir);
|
||||
if(null == $tgl_awal || null == $tgl_akhir)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_icd_cm')
|
||||
->leftJoin('icd_cm as cm1','t_icd_cm.icd','=','cm1.kode')
|
||||
->leftJoin('icd_cm as cm2','t_icd_cm.icd_verified','=','cm2.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_admission','t_icd_cm.idxdaftar','=','t_admission.id_admission')
|
||||
->join('m_ruang','m_ruang.no','=','t_admission.noruang')
|
||||
->select(DB::raw('t_icd_cm.tanggal,m_ruang.kelompok,m_ruang.nama as namaruang,case when cm1.kode is null then cm2.kode end as kode, case when cm1.keterangan is null then cm2.keterangan end as keterangan,m_dokter.namadokter,count(*) as jml'))
|
||||
->where([
|
||||
['status_rajal','=',0],
|
||||
])
|
||||
->whereBetween('t_icd_cm.tanggal',[$tgl_awal,$tgl_akhir])
|
||||
->groupBy('t_icd_cm.tanggal','cm1.kode','cm2.kode','m_dokter.namadokter','m_ruang.kelompok','m_ruang.nama')
|
||||
->get();
|
||||
// return $result;
|
||||
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
$row_detil = DB::table('t_icd_cm')
|
||||
->leftJoin('icd_cm as cm1','t_icd_cm.icd','=','cm1.kode')
|
||||
->leftJoin('icd_cm as cm2','t_icd_cm.icd_verified','=','cm2.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_admission','t_icd_cm.idxdaftar','=','t_admission.id_admission')
|
||||
->join('m_ruang','m_ruang.no','=','t_admission.noruang')
|
||||
->join('m_pasien','m_pasien.nomr','=','t_admission.nomr')
|
||||
->leftJoin('t_resumepulang','t_resumepulang.idadmission','=','t_admission.id_admission')
|
||||
->leftJoin('m_statuskeluarranap','m_statuskeluarranap.kode','=','t_resumepulang.statuspulang')
|
||||
->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluarranap.nama as status_keluar'))
|
||||
->where([
|
||||
['status_rajal','=',0],
|
||||
['m_ruang.nama','=',$detil->namaruang],
|
||||
['m_dokter.namadokter','=',$detil->namadokter],
|
||||
['t_icd_cm.tanggal','=',$detil->tanggal],
|
||||
])
|
||||
->where(function($query) use ($detil) {
|
||||
$query->where('cm1.kode','=',$detil->kode)
|
||||
->orWhere('cm2.kode','=',$detil->kode);
|
||||
})
|
||||
// ->whereNotIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
$set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
}
|
||||
390
webservice/evapor/app/Http/Controllers/PasienController.php
Normal file
390
webservice/evapor/app/Http/Controllers/PasienController.php
Normal file
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Auth;
|
||||
|
||||
class PasienController extends Controller
|
||||
{
|
||||
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
// $this->middleware('auth:api');
|
||||
if(null == $request->header('x-token'))
|
||||
{
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
$user = DB::table('webservice')->where('token',$request->header('x-token'))->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function pasienFilter($nomr,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
if(null == $nomr)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) < 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter less than 8 digit!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) > 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter more than 8 digit!'],400);
|
||||
}
|
||||
$result = DB::table('m_pasien')
|
||||
->leftJoin('m_agama_pasien','m_agama_pasien.id_agama','=','m_pasien.agama')
|
||||
->leftJoin('m_status_pasien','m_status_pasien.id_status','=','m_pasien.status')
|
||||
->leftJoin('m_pendidikan_pasien','m_pendidikan_pasien.id_pendidikan','=','m_pasien.pendidikan')
|
||||
->select('nomr','nama','tgllahir','alamat','noktp','jeniskelamin','notelp','tgldaftar','no_kartu','txt_kelurahan','txt_kecamatan','txt_kota','txt_provinsi',DB::raw('case when m_status_pasien.nama_status is null then txt_status else m_status_pasien.nama_status end as txt_status,case when m_agama_pasien.nama_agama is null then txt_agama else m_agama_pasien.nama_agama end as txt_agama,case when m_pendidikan_pasien.nama_pendidikan is null then txt_pendidikan else m_pendidikan_pasien.nama_pendidikan end as txt_pendidikan'))
|
||||
->where('nomr',$nomr)
|
||||
->get();
|
||||
// return $result;
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
|
||||
// $row_detil = DB::table('t_icd')
|
||||
// ->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
// ->join('m_dokter','m_dokter.kddokter','=','t_icd.kddokter')
|
||||
// ->join('t_pendaftaran','t_icd.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
// ->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
// ->join('m_pasien','m_pasien.nomr','=','t_pendaftaran.nomr')
|
||||
// ->leftJoin('m_statuskeluar','t_pendaftaran.status','=','m_statuskeluar.status')
|
||||
// ->select(DB::raw('m_pasien.jeniskelamin,age(m_pasien.tgllahir) as usia,m_statuskeluar.keterangan as status_keluar'))
|
||||
// ->where([
|
||||
// ['status_rajal','=',1],
|
||||
// ['m_ruang.nama','=',$detil->namaruang],
|
||||
// ['icd.icd_code','=',$detil->icd_code],
|
||||
// ['m_dokter.namadokter','=',$detil->namadokter],
|
||||
// ['t_icd.tanggal','=',$detil->tanggal],
|
||||
// ])
|
||||
// ->whereNotIn('t_pendaftaran.kdpoly',$arr_incovit)
|
||||
// ->get();
|
||||
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
// $set_result->pull('jml');
|
||||
|
||||
// $set_result['pasien'] = $row_detil->all();
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
return response()->json($arr_result);
|
||||
}
|
||||
|
||||
public function labsentralFilter($nomr,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
if(null == $nomr)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) < 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter less than 8 digit!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) > 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter more than 8 digit!'],400);
|
||||
}
|
||||
|
||||
$response = Http::get('http://192.168.2.9/viewer/api.php?get=1&nomr='.$nomr);
|
||||
|
||||
$jsonData = $response->json();
|
||||
|
||||
return $jsonData;
|
||||
}
|
||||
|
||||
public function labmikroFilter($nomr,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
if(null == $nomr)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) < 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter less than 8 digit!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) > 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter more than 8 digit!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_orderlabmikro_main')
|
||||
->join('t_orderlabmikro','t_orderlabmikro.nolab','=','t_orderlabmikro_main.nolab')
|
||||
->select('no_lokal','tgl_hasil','jenis_hasil','idxordermikro')
|
||||
->where('t_orderlabmikro_main.nomr',$nomr)
|
||||
->where('t_orderlabmikro.status_final',1)
|
||||
->get();
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
$set_result['nama'] = $detil->jenis_hasil.' - '.$detil->tgl_hasil.' - '.$detil->no_lokal;
|
||||
$set_result['url'] = env('SIMRS_APP_URL').'lab/detil_hasil_labmikro.php?preview=1&no='.$detil->idxordermikro;
|
||||
|
||||
$set_result->pull('idxordermikro');
|
||||
$set_result->pull('jenis_hasil');
|
||||
$set_result->pull('tgl_hasil');
|
||||
$set_result->pull('no_lokal');
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$message = ($i > 0) ? 'Ditemukan beberapa hasil lab mikrobiologi.' : 'Tidak ditemukan hasil lab mikrobiologi.';
|
||||
|
||||
return response()->json(['message'=>$message,'data'=>$arr_result]);
|
||||
}
|
||||
|
||||
public function labpatologiFilter($nomr,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
if(null == $nomr)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) < 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter less than 8 digit!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) > 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter more than 8 digit!'],400);
|
||||
}
|
||||
|
||||
$result = DB::table('t_orderlabpa_main')
|
||||
->select('no_reg_pa','tgljawab_lab as tgl_hasil','lokalisasi','noreglab','idxdaftar')
|
||||
->where('nomr',$nomr)
|
||||
->whereNotNull('tgljawab_lab')
|
||||
->get();
|
||||
$arr_result = [];
|
||||
|
||||
$i = 0;
|
||||
foreach($result->all() as $key => $detil)
|
||||
{
|
||||
$set_result = collect($result[$key]);
|
||||
|
||||
$set_result['nama'] = $detil->lokalisasi.' - '.$detil->tgl_hasil.' - '.$detil->no_reg_pa;
|
||||
$set_result['url'] = env('SIMRS_APP_URL').'lab/detil_hasil_labpa.php?preview=1&idx='.$detil->idxdaftar.'&nomr='.$nomr.'&nolab='.$detil->noreglab;
|
||||
|
||||
$set_result->pull('no_reg_pa');
|
||||
$set_result->pull('tgl_hasil');
|
||||
$set_result->pull('lokalisasi');
|
||||
$set_result->pull('noreglab');
|
||||
$set_result->pull('idxdaftar');
|
||||
|
||||
$arr_result[] = $set_result->all();
|
||||
|
||||
$result->forget($key);
|
||||
|
||||
$i++;
|
||||
}
|
||||
$message = ($i > 0) ? 'Ditemukan beberapa hasil lab patologi anatomi.' : 'Tidak ditemukan hasil lab patologi anatomi.';
|
||||
|
||||
return response()->json(['message'=>$message,'data'=>$arr_result]);
|
||||
}
|
||||
|
||||
public function resumeFilter($nomr,Request $request)
|
||||
{
|
||||
$token = $request->header('x-token');
|
||||
$user = DB::table('webservice')->where('token',$token)->first();
|
||||
|
||||
if(!$user || empty($user)){
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
}
|
||||
|
||||
if(null == $nomr)
|
||||
{
|
||||
return response()->json(['error' => 'Invalid Parameter!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) < 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter less than 8 digit!'],400);
|
||||
}
|
||||
elseif(strlen($nomr) > 8)
|
||||
{
|
||||
return response()->json(['error' => 'Parameter more than 8 digit!'],400);
|
||||
}
|
||||
|
||||
// SELECT * from t_resumemedis a join m_dokter d on a.dpjp = d.kddokter
|
||||
// get resume
|
||||
$resume = DB::table('t_resumemedis')
|
||||
->join('m_dokter','t_resumemedis.dpjp','=','m_dokter.kddokter')
|
||||
->where([
|
||||
['nomr','=',$nomr]
|
||||
])
|
||||
->orderBy('idx','desc')
|
||||
->get();
|
||||
|
||||
$arr_result['resume'] = [];
|
||||
$i = 0;
|
||||
foreach($resume->all() as $key => $detil_resume)
|
||||
{
|
||||
$idx = ($detil_resume->idxrajal != 0) ? $detil_resume->idxrajal : $detil_resume->idxranap;
|
||||
$status_rajal = ($detil_resume->idxrajal != 0) ? 1 : 0;
|
||||
|
||||
$arr_result['resume'][$idx] = [
|
||||
'tanggal_mrs' => $detil_resume->tanggalmasuk,
|
||||
'diagnosa_utama' => $detil_resume->diagnosa_utama,
|
||||
'diagnosa_klinis' => $detil_resume->keluhan_utama,
|
||||
'icd_diagnosa' => [],
|
||||
'icd_tindakan' => [],
|
||||
'nama_ruang' => '',
|
||||
'url_resume' => env('SIMRS_APP_URL').'include/master.php?load_resume_pdf=1&idx='.$idx.'&rajal_status='.$status_rajal.'&jenis_resume=dpjp&attach=1'
|
||||
];
|
||||
|
||||
if($status_rajal == 1) {
|
||||
$icd_diagnosa_rajal = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('t_pendaftaran','t_icd.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->select('m_ruang.nama as namaruang','icd.icd_code as icd', 'icd.jenis_penyakit as keterangan')
|
||||
->where([
|
||||
['t_icd.idxdaftar','=',$idx],
|
||||
['t_icd.status_rajal','=',1]
|
||||
])
|
||||
->whereNull('t_icd.icd_verified')
|
||||
->get();
|
||||
|
||||
foreach($icd_diagnosa_rajal->all() as $key => $detil)
|
||||
{
|
||||
$set_result = collect($icd_diagnosa_rajal[$key]);
|
||||
|
||||
if(array_key_exists($idx,$arr_result['resume'])){
|
||||
$arr_result['resume'][$idx]['icd_diagnosa'][] = $set_result->all();
|
||||
}
|
||||
|
||||
$icd_diagnosa_rajal->forget($key);
|
||||
|
||||
}
|
||||
|
||||
$icd_tindakan_rajal = DB::table('t_icd_cm')
|
||||
->join('icd_cm','t_icd_cm.icd','=','icd_cm.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_pendaftaran','t_icd_cm.idxdaftar','=','t_pendaftaran.idxdaftar')
|
||||
->join('m_ruang','m_ruang.no','=','t_pendaftaran.kdpoly')
|
||||
->select('m_ruang.nama as namaruang','icd_cm.kode as icd', 'icd_cm.keterangan')
|
||||
->where([
|
||||
['t_icd_cm.idxdaftar','=',$idx],
|
||||
['t_icd_cm.status_rajal','=',1]
|
||||
])
|
||||
->whereNull('t_icd_cm.icd_verified')
|
||||
->get();
|
||||
|
||||
foreach($icd_tindakan_rajal->all() as $key => $detil)
|
||||
{
|
||||
$set_result = collect($icd_tindakan_rajal[$key]);
|
||||
|
||||
if(array_key_exists($idx,$arr_result['resume'])){
|
||||
$arr_result['resume'][$idx]['icd_tindakan'][] = $set_result->all();
|
||||
}
|
||||
|
||||
$icd_tindakan_rajal->forget($key);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$icd_diagnosa_ranap = DB::table('t_icd')
|
||||
->join('icd','t_icd.icd','=','icd.icd_code')
|
||||
->join('t_admission','t_icd.idxdaftar','=','t_admission.id_admission')
|
||||
->join('m_ruang','m_ruang.no','=','t_admission.noruang')
|
||||
->select('m_ruang.nama as namaruang','icd.icd_code as icd', 'icd.jenis_penyakit as keterangan')
|
||||
->where([
|
||||
['t_icd.idxdaftar','=',$idx],
|
||||
['t_icd.status_rajal','=',0]
|
||||
])
|
||||
->whereNull('t_icd.icd_verified')
|
||||
->get();
|
||||
|
||||
foreach($icd_diagnosa_ranap->all() as $key => $detil)
|
||||
{
|
||||
$set_result = collect($icd_diagnosa_ranap[$key]);
|
||||
|
||||
if(array_key_exists($idx,$arr_result['resume'])){
|
||||
$arr_result['resume'][$idx]['icd_diagnosa'][] = $set_result->all();
|
||||
}
|
||||
|
||||
$icd_diagnosa_ranap->forget($key);
|
||||
}
|
||||
|
||||
$icd_tindakan_ranap = DB::table('t_icd_cm')
|
||||
->join('icd_cm','t_icd_cm.icd','=','icd_cm.kode')
|
||||
->join('m_dokter','m_dokter.kddokter','=','t_icd_cm.kddokter')
|
||||
->join('t_admission','t_icd_cm.idxdaftar','=','t_admission.id_admission')
|
||||
->join('m_ruang','m_ruang.no','=','t_admission.noruang')
|
||||
->select('m_ruang.nama as namaruang','icd_cm.kode as icd', 'icd_cm.keterangan')
|
||||
->where([
|
||||
['t_icd_cm.idxdaftar','=',$idx],
|
||||
['t_icd_cm.status_rajal','=',0]
|
||||
])
|
||||
->whereNull('t_icd_cm.icd_verified')
|
||||
->get();
|
||||
|
||||
$arr_result['icd_tindakan'] = [];
|
||||
|
||||
foreach($icd_tindakan_ranap->all() as $key => $detil)
|
||||
{
|
||||
$set_result = collect($icd_tindakan_ranap[$key]);
|
||||
|
||||
if(array_key_exists($idx,$arr_result['resume'])){
|
||||
$arr_result['resume'][$idx]['icd_tindakan'][] = $set_result->all();
|
||||
}
|
||||
|
||||
$icd_tindakan_ranap->forget($key);
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$message = ($i > 0) ? 'Ditemukan beberapa hasil resume.' : 'Tidak ditemukan hasil resume.';
|
||||
|
||||
return response()->json(['message'=>$message,'data'=>$arr_result]);
|
||||
}
|
||||
}
|
||||
44
webservice/evapor/app/Http/Controllers/UserController.php
Normal file
44
webservice/evapor/app/Http/Controllers/UserController.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\User;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('auth:api');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
||||
public function authenticate(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'email' => 'required',
|
||||
'password' => 'required'
|
||||
]);
|
||||
|
||||
$user = User::where('email', $request->input('email'))->first();
|
||||
|
||||
if($user != NULL && Hash::check($request->input('password'), $user->password)){
|
||||
$apikey = base64_encode(Str::random(40));
|
||||
$time = date('Y-m-d H:i:s');
|
||||
User::where('email', $request->input('email'))->update(['token' => "$apikey"]);;
|
||||
return response()->json(['status' => 'success','token' => $apikey,'updated_at' => $time]);
|
||||
}else{
|
||||
return response()->json(['status' => 'fail'],401);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
44
webservice/evapor/app/Http/Middleware/Authenticate.php
Normal file
44
webservice/evapor/app/Http/Middleware/Authenticate.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Factory as Auth;
|
||||
|
||||
class Authenticate
|
||||
{
|
||||
/**
|
||||
* The authentication guard factory instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Auth\Factory
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new middleware instance.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Factory $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Auth $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null $guard
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if ($this->auth->guard($guard)->guest()) {
|
||||
return response('Unauthorized.', 401);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
20
webservice/evapor/app/Http/Middleware/ExampleMiddleware.php
Normal file
20
webservice/evapor/app/Http/Middleware/ExampleMiddleware.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class ExampleMiddleware
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
26
webservice/evapor/app/Jobs/ExampleJob.php
Normal file
26
webservice/evapor/app/Jobs/ExampleJob.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
class ExampleJob extends Job
|
||||
{
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
24
webservice/evapor/app/Jobs/Job.php
Normal file
24
webservice/evapor/app/Jobs/Job.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
abstract class Job implements ShouldQueue
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queueable Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This job base class provides a central location to place any logic that
|
||||
| is shared across all of your jobs. The trait included with the class
|
||||
| provides access to the "queueOn" and "delay" queue helper methods.
|
||||
|
|
||||
*/
|
||||
|
||||
use InteractsWithQueue, Queueable, SerializesModels;
|
||||
}
|
||||
31
webservice/evapor/app/Listeners/ExampleListener.php
Normal file
31
webservice/evapor/app/Listeners/ExampleListener.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use App\Events\ExampleEvent;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
|
||||
class ExampleListener
|
||||
{
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param \App\Events\ExampleEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(ExampleEvent $event)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
33
webservice/evapor/app/Models/User.php
Normal file
33
webservice/evapor/app/Models/User.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Laravel\Lumen\Auth\Authorizable;
|
||||
|
||||
class User extends Model implements AuthenticatableContract, AuthorizableContract
|
||||
{
|
||||
use Authenticatable, Authorizable, HasFactory;
|
||||
protected $table = 'webservice';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email','token','updated_at'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
];
|
||||
}
|
||||
18
webservice/evapor/app/Providers/AppServiceProvider.php
Normal file
18
webservice/evapor/app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
39
webservice/evapor/app/Providers/AuthServiceProvider.php
Normal file
39
webservice/evapor/app/Providers/AuthServiceProvider.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Boot the authentication services for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Here you may define how you wish users to be authenticated for your Lumen
|
||||
// application. The callback which receives the incoming request instance
|
||||
// should return either a User instance or null. You're free to obtain
|
||||
// the User instance via an API token or any other method necessary.
|
||||
|
||||
$this->app['auth']->viaRequest('api', function ($request) {
|
||||
if ($request->input('x-token')) {
|
||||
return User::where('token', $request->input('x-token'))->first();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
19
webservice/evapor/app/Providers/EventServiceProvider.php
Normal file
19
webservice/evapor/app/Providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Laravel\Lumen\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
\App\Events\ExampleEvent::class => [
|
||||
\App\Listeners\ExampleListener::class,
|
||||
],
|
||||
];
|
||||
}
|
||||
35
webservice/evapor/artisan
Normal file
35
webservice/evapor/artisan
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| First we need to get an application instance. This creates an instance
|
||||
| of the application / container and bootstraps the application so it
|
||||
| is ready to receive HTTP / Console requests from the environment.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(
|
||||
'Illuminate\Contracts\Console\Kernel'
|
||||
);
|
||||
|
||||
exit($kernel->handle(new ArgvInput, new ConsoleOutput));
|
||||
115
webservice/evapor/bootstrap/app.php
Normal file
115
webservice/evapor/bootstrap/app.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
(new Laravel\Lumen\Bootstrap\LoadEnvironmentVariables(
|
||||
dirname(__DIR__)
|
||||
))->bootstrap();
|
||||
|
||||
date_default_timezone_set(env('APP_TIMEZONE', 'UTC'));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we will load the environment and create the application instance
|
||||
| that serves as the central piece of this framework. We'll use this
|
||||
| application as an "IoC" container and router for this framework.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Laravel\Lumen\Application(
|
||||
dirname(__DIR__)
|
||||
);
|
||||
|
||||
$app->withFacades();
|
||||
|
||||
$app->withEloquent();
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Container Bindings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Now we will register a few bindings in the service container. We will
|
||||
| register the exception handler and the console kernel. You may add
|
||||
| your own bindings here if you like or you can make another file.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Config Files
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Now we will register the "app" configuration file. If the file exists in
|
||||
| your configuration directory it will be loaded; otherwise, we'll load
|
||||
| the default version. You may register other files below as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->configure('app');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we will register the middleware with the application. These can
|
||||
| be global middleware that run before and after each request into a
|
||||
| route or middleware that'll be assigned to some specific routes.
|
||||
|
|
||||
*/
|
||||
|
||||
// $app->middleware([
|
||||
// App\Http\Middleware\ExampleMiddleware::class
|
||||
// ]);
|
||||
|
||||
$app->routeMiddleware([
|
||||
'auth' => App\Http\Middleware\Authenticate::class,
|
||||
]);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we will register all of the application's service providers which
|
||||
| are used to bind services into the container. Service providers are
|
||||
| totally optional, so you are not required to uncomment this line.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->register(App\Providers\AppServiceProvider::class);
|
||||
$app->register(App\Providers\AuthServiceProvider::class);
|
||||
// $app->register(App\Providers\EventServiceProvider::class);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Load The Application Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next we will include the routes file so that they can all be added to
|
||||
| the application. This will provide all of the URLs the application
|
||||
| can respond to, as well as the controllers that may handle them.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->router->group([
|
||||
'namespace' => 'App\Http\Controllers',
|
||||
], function ($router) {
|
||||
require __DIR__.'/../routes/web.php';
|
||||
});
|
||||
|
||||
return $app;
|
||||
41
webservice/evapor/composer.json
Normal file
41
webservice/evapor/composer.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "laravel/lumen",
|
||||
"description": "The Laravel Lumen Framework.",
|
||||
"keywords": ["framework", "laravel", "lumen"],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"laravel/lumen-framework": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"phpunit/phpunit": "^9.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
"tests/"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"scripts": {
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
]
|
||||
}
|
||||
}
|
||||
7534
webservice/evapor/composer.lock
generated
Normal file
7534
webservice/evapor/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
webservice/evapor/database/factories/UserFactory.php
Normal file
29
webservice/evapor/database/factories/UserFactory.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = User::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'email' => $this->faker->unique()->safeEmail,
|
||||
];
|
||||
}
|
||||
}
|
||||
0
webservice/evapor/database/migrations/.gitkeep
Normal file
0
webservice/evapor/database/migrations/.gitkeep
Normal file
18
webservice/evapor/database/seeders/DatabaseSeeder.php
Normal file
18
webservice/evapor/database/seeders/DatabaseSeeder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->call('UsersTableSeeder');
|
||||
}
|
||||
}
|
||||
17
webservice/evapor/phpunit.xml
Normal file
17
webservice/evapor/phpunit.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
21
webservice/evapor/public/.htaccess
Normal file
21
webservice/evapor/public/.htaccess
Normal file
@@ -0,0 +1,21 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
28
webservice/evapor/public/index.php
Normal file
28
webservice/evapor/public/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| First we need to get an application instance. This creates an instance
|
||||
| of the application / container and bootstraps the application so it
|
||||
| is ready to receive HTTP / Console requests from the environment.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once we have the application, we can handle the incoming request
|
||||
| through the kernel, and send the associated response back to
|
||||
| the client's browser allowing them to enjoy the creative
|
||||
| and wonderful application we have prepared for them.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->run();
|
||||
0
webservice/evapor/resources/views/.gitkeep
Normal file
0
webservice/evapor/resources/views/.gitkeep
Normal file
45
webservice/evapor/routes/web.php
Normal file
45
webservice/evapor/routes/web.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
use Illuminate\Support\Facades\DB;
|
||||
/** @var \Laravel\Lumen\Routing\Router $router */
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register all of the routes for an application.
|
||||
| It is a breeze. Simply tell Lumen the URIs it should respond to
|
||||
| and give it the Closure to call when that URI is requested.
|
||||
|
|
||||
*/
|
||||
|
||||
$router->get('/', function () use ($router) {
|
||||
return redirect('api/login/');
|
||||
});
|
||||
$router->get('/key', function() { return \Illuminate\Support\Str::random(32); });
|
||||
$router->get('/db',function() {
|
||||
// Test database connection
|
||||
try {
|
||||
DB::connection()->getPdo();
|
||||
echo "Connection success";
|
||||
} catch (\Exception $e) {
|
||||
die("Could not connect to the database. Please check your configuration. error:" . $e );
|
||||
}
|
||||
});
|
||||
$router->group(['prefix' => 'api'], function () use ($router) {
|
||||
$router->get('login/','UserController@authenticate');
|
||||
|
||||
$router->get('rajal/diag/{tgl_awal}/{tgl_akhir}','IcdController@rajalDiagFiltered');
|
||||
$router->get('rajal/tind/{tgl_awal}/{tgl_akhir}','IcdController@rajalTindakanFiltered');
|
||||
$router->get('igd/diag/{tgl_awal}/{tgl_akhir}','IcdController@igdDiagFiltered');
|
||||
$router->get('igd/tind/{tgl_awal}/{tgl_akhir}','IcdController@igdTindakanFiltered');
|
||||
$router->get('ranap/diag/{tgl_awal}/{tgl_akhir}','IcdController@ranapDiagFiltered');
|
||||
$router->get('ranap/tind/{tgl_awal}/{tgl_akhir}','IcdController@ranapTindakanFiltered');
|
||||
|
||||
$router->get('pasien','PasienController@pasienFilter');
|
||||
$router->get('pasien/{nomr}','PasienController@pasienFilter');
|
||||
$router->get('pasien/{nomr}/labsentral','PasienController@labsentralFilter');
|
||||
$router->get('pasien/{nomr}/labmikro','PasienController@labmikroFilter');
|
||||
$router->get('pasien/{nomr}/labpatologi','PasienController@labpatologiFilter');
|
||||
$router->get('pasien/{nomr}/resume','PasienController@resumeFilter');
|
||||
});
|
||||
2
webservice/evapor/storage/app/.gitignore
vendored
Normal file
2
webservice/evapor/storage/app/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
3
webservice/evapor/storage/framework/cache/.gitignore
vendored
Normal file
3
webservice/evapor/storage/framework/cache/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!data/
|
||||
!.gitignore
|
||||
2
webservice/evapor/storage/framework/cache/data/.gitignore
vendored
Normal file
2
webservice/evapor/storage/framework/cache/data/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
webservice/evapor/storage/framework/views/.gitignore
vendored
Normal file
2
webservice/evapor/storage/framework/views/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
21
webservice/evapor/tests/ExampleTest.php
Normal file
21
webservice/evapor/tests/ExampleTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Laravel\Lumen\Testing\DatabaseMigrations;
|
||||
use Laravel\Lumen\Testing\DatabaseTransactions;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testExample()
|
||||
{
|
||||
$this->get('/');
|
||||
|
||||
$this->assertEquals(
|
||||
$this->app->version(), $this->response->getContent()
|
||||
);
|
||||
}
|
||||
}
|
||||
16
webservice/evapor/tests/TestCase.php
Normal file
16
webservice/evapor/tests/TestCase.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Laravel\Lumen\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
/**
|
||||
* Creates the application.
|
||||
*
|
||||
* @return \Laravel\Lumen\Application
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
return require __DIR__.'/../bootstrap/app.php';
|
||||
}
|
||||
}
|
||||
15
webservice/farmasi/.editorconfig
Normal file
15
webservice/farmasi/.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
19
webservice/farmasi/.env.example
Normal file
19
webservice/farmasi/.env.example
Normal file
@@ -0,0 +1,19 @@
|
||||
APP_NAME=Farmasi
|
||||
APP_ENV=local
|
||||
APP_KEY=2lNnWbu88vpvZb5jZtdIWzaHFZz6zssK
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://10.10.123.20:8000
|
||||
APP_TIMEZONE=ASIA/JAKARTA
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_SLACK_WEBHOOK_URL=
|
||||
|
||||
DB_CONNECTION=sqlsrv
|
||||
DB_HOST=10.10.90.68
|
||||
DB_PORT=1433
|
||||
DB_DATABASE=DBINV
|
||||
DB_USERNAME=sa
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
5
webservice/farmasi/.gitignore
vendored
Normal file
5
webservice/farmasi/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/vendor
|
||||
/.idea
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
.env
|
||||
29
webservice/farmasi/app/Barang.php
Normal file
29
webservice/farmasi/app/Barang.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Barang extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'kode', 'nama', 'kodesatuan', 'kodepabrik', 'kodekelompok', 'stGenerik', 'stNarkotik', 'stPsikotropik', 'stAntibiotik','stSitostatika', 'stFornas'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMLogBarang';
|
||||
protected $primaryKey = 'Kode';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
}
|
||||
29
webservice/farmasi/app/BarangStock.php
Normal file
29
webservice/farmasi/app/BarangStock.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class BarangStock extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'KodeBarang', 'StStock', 'HPP', 'HJual', 'HPPOld', 'HJOLD', 'Kategori'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMLogBarangStock';
|
||||
protected $primaryKey = 'Kode';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
}
|
||||
0
webservice/farmasi/app/Console/Commands/.gitkeep
Normal file
0
webservice/farmasi/app/Console/Commands/.gitkeep
Normal file
29
webservice/farmasi/app/Console/Kernel.php
Normal file
29
webservice/farmasi/app/Console/Kernel.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
32
webservice/farmasi/app/Depo.php
Normal file
32
webservice/farmasi/app/Depo.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Depo extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'Nama', 'StPesan', 'StMinta', 'StJual', 'Inisial', 'statusPasien'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMOrgDepo';
|
||||
protected $primaryKey = 'Kode';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
|
||||
// protected $table = 'm_barang';
|
||||
// protected $primaryKey = 'kode_barang';
|
||||
}
|
||||
10
webservice/farmasi/app/Events/Event.php
Normal file
10
webservice/farmasi/app/Events/Event.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
abstract class Event
|
||||
{
|
||||
use SerializesModels;
|
||||
}
|
||||
16
webservice/farmasi/app/Events/ExampleEvent.php
Normal file
16
webservice/farmasi/app/Events/ExampleEvent.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
class ExampleEvent extends Event
|
||||
{
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
50
webservice/farmasi/app/Exceptions/Handler.php
Normal file
50
webservice/farmasi/app/Exceptions/Handler.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of the exception types that should not be reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
AuthorizationException::class,
|
||||
HttpException::class,
|
||||
ModelNotFoundException::class,
|
||||
ValidationException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
{
|
||||
parent::report($exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $exception
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
{
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
324
webservice/farmasi/app/Http/Controllers/BarangController.php
Normal file
324
webservice/farmasi/app/Http/Controllers/BarangController.php
Normal file
@@ -0,0 +1,324 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\Barang;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class BarangController extends Controller
|
||||
{
|
||||
|
||||
public function showAllBarangs()
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarang')->get());
|
||||
}
|
||||
|
||||
public function showOneBarang($id)
|
||||
{
|
||||
return response()->json(Barang::find($id));
|
||||
}
|
||||
|
||||
public function showStockAll()
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('m.StStock,TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,TMLogBarang.StFornas,TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['TMLogBarang.Aktif','=',1]
|
||||
])
|
||||
->groupBy('s.Kode','TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','m.StStock','TMLogBarang.StFornas','TMLogBarang.StRes')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showStockByDepo($depo, $stStok)
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock,TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['m.KodeDepo','=',$depo],
|
||||
['bs.StStock','=',$stStok],
|
||||
['TMLogBarang.Aktif','=',1]
|
||||
])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock','TMLogBarang.StRes')
|
||||
->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showAllStockByDepo($depo)
|
||||
{
|
||||
$tmp_all_stok = DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock,TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['m.KodeDepo','=',$depo],
|
||||
['TMLogBarang.Aktif','=',1]
|
||||
])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock','TMLogBarang.StRes')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get();
|
||||
$arr_all_stok = [];
|
||||
foreach($tmp_all_stok as $row) {
|
||||
$arr_all_stok[$row->Kode.';'.$row->StStock] = [
|
||||
'Kode'=>$row->Kode,
|
||||
'Nama'=>$row->Nama,
|
||||
'satuan'=>$row->satuan,
|
||||
'jenis'=>$row->jenis,
|
||||
'jmlStok'=>$row->jmlStok,
|
||||
'HJual'=>$row->HJual,
|
||||
'HPP'=>$row->HPP,
|
||||
'StStock'=>$row->StStock
|
||||
];
|
||||
}
|
||||
return response()->json($arr_all_stok);
|
||||
}
|
||||
|
||||
public function showAllStockByDepoByName($depo,$nama)
|
||||
{
|
||||
$nama = urldecode($nama);
|
||||
$query = DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock as kodeStok,TMLogBarang.KodeJenis,TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['m.KodeDepo','=',$depo],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
['TMLogBarang.Nama','like','%'.$nama.'%']
|
||||
])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock','TMLogBarang.KodeJenis','TMLogBarang.StRes')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get();
|
||||
|
||||
return response()->json($query);
|
||||
}
|
||||
|
||||
public function showAllStockAskesByName($nama)
|
||||
{
|
||||
$nama = urldecode($nama);
|
||||
$query = DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->join('TMOrgDepo as d','m.KodeDepo','=','d.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock as kodeStok,TMLogBarang.KodeJenis,TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['d.statusPasien','=','ASKES'],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
['TMLogBarang.Nama','like','%'.$nama.'%']
|
||||
])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock','TMLogBarang.KodeJenis','TMLogBarang.StRes')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get();
|
||||
|
||||
return response()->json($query);
|
||||
}
|
||||
|
||||
public function showAllStockHibah()
|
||||
{
|
||||
$query = DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->join('TMOrgDepo as d','m.KodeDepo','=','d.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock as kodeStok,TMLogBarang.KodeJenis,TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['s.Kode','=','6'],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock','TMLogBarang.KodeJenis','TMLogBarang.StRes')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get();
|
||||
|
||||
return response()->json($query);
|
||||
}
|
||||
|
||||
public function showAlkesAll()
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock,'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['TMLogBarang.Aktif','=',1]
|
||||
])
|
||||
->whereIn('TMLogBarang.KodeKelompok',['ALK','ALKES','ALKDOK','ALKHUS'])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showAlkes($id)
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('s.Kode as kodeStok,TMLogBarang.Kode,TMLogBarang.Nama,TMLogBarang.StFornas, r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
['TMLogBarang.Nama','like','%'.$id.'%']
|
||||
])
|
||||
->whereIn('TMLogBarang.KodeKelompok',['ALK','ALKES','ALKDOK','ALKHUS'])
|
||||
->groupBy('s.Kode','TMLogBarang.Kode','TMLogBarang.Nama','TMLogBarang.StFornas','r1.Nama','s.Nama','bs.HPP','bs.HJual','m.StStock')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showAlkesDepo($depo)
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['m.KodeDepo','=',$depo],
|
||||
['TMLogBarang.Aktif','=',1]
|
||||
])
|
||||
->whereIn('TMLogBarang.KodeKelompok',['ALK','ALKES','ALKDOK','ALKHUS'])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showAlkesJknByName($nama)
|
||||
{
|
||||
$nama = urldecode($nama);
|
||||
return response()->json(DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->join('TMOrgDepo as d','m.KodeDepo','=','d.Kode')
|
||||
->select(DB::raw('TMLogBarang.Kode,TMLogBarang.Nama,r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,bs.StStock'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['d.statusPasien','=','ASKES'],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
['TMLogBarang.Nama','like','%'.$nama.'%']
|
||||
])
|
||||
->whereIn('TMLogBarang.KodeKelompok',['ALK','ALKES','ALKDOK','ALKHUS'])
|
||||
->groupBy('TMLogBarang.Kode','TMLogBarang.Nama','r1.Nama','s.Nama','bs.HPP','bs.HJual','bs.StStock')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
// ->having(DB::raw('sum(m.StockAkhir)'),'>',0)
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showStock($id)
|
||||
{
|
||||
$query = DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('s.Kode as kodeStok,TMLogBarang.Kode,TMLogBarang.Nama,TMLogBarang.StFornas, r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,TMLogBarang.KodeJenis, TMLogBarang.StRes'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
['TMLogBarang.Nama','like','%'.$id.'%']
|
||||
])
|
||||
->groupBy('s.Kode','TMLogBarang.Kode','TMLogBarang.Nama','TMLogBarang.StFornas','r1.Nama','s.Nama','bs.HPP','bs.HJual','m.StStock','TMLogBarang.KodeJenis','TMLogBarang.StRes')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
->get();
|
||||
$result = response()->json($query);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function showStockAdv($depo, $kode, $ststock)
|
||||
{
|
||||
$query = DB::table('TMLogBarang')
|
||||
->leftJoin('TMLogReference as r1','TMLogBarang.KodeSatuan','=','r1.Kode')
|
||||
->join('TTLogMutasiBarang as m','TMLogBarang.Kode','=','m.KodeBarang')
|
||||
->join('TMLogBarangStock as bs','TMLogBarang.Kode','=','bs.KodeBarang')
|
||||
->join('TMStock as s','m.StStock','=','s.Kode')
|
||||
->select(DB::raw('s.Kode as kodeStok,TMLogBarang.Kode,TMLogBarang.Nama,TMLogBarang.StFornas, r1.Nama as satuan,s.Nama as jenis,sum(m.StockAkhir) as jmlStok,bs.HJual,bs.HPP,TMLogBarang.KodeJenis'))
|
||||
->where([
|
||||
['m.KodePeriode','=',date('Ym')],
|
||||
['bs.StStock','=',DB::raw('cast(m.StStock as int)')],
|
||||
['TMLogBarang.Aktif','=',1],
|
||||
['m.KodeDepo','=',$depo],
|
||||
['bs.StStock','=',$ststock],
|
||||
['TMLogBarang.Kode','=',$kode]
|
||||
])
|
||||
->groupBy('s.Kode','TMLogBarang.Kode','TMLogBarang.Nama','TMLogBarang.StFornas','r1.Nama','s.Nama','bs.HPP','bs.HJual','m.StStock','TMLogBarang.KodeJenis')
|
||||
->orderBy(DB::raw('sum(m.StockAkhir)'),'desc')
|
||||
->get();
|
||||
$result = response()->json($query);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function showStatusStok()
|
||||
{
|
||||
return response()->json(DB::table('TMStock')->where('aktif',1)->get());
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = Barang::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = Barang::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
Barang::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\BarangStock;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class BarangStockController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(DB::table('TMLogBarangStock')->get());
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = BarangStock::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = BarangStock::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
BarangStock::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
10
webservice/farmasi/app/Http/Controllers/Controller.php
Normal file
10
webservice/farmasi/app/Http/Controllers/Controller.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Laravel\Lumen\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
//
|
||||
}
|
||||
46
webservice/farmasi/app/Http/Controllers/DepoController.php
Normal file
46
webservice/farmasi/app/Http/Controllers/DepoController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Depo;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DepoController extends Controller
|
||||
{
|
||||
|
||||
public function showAllDepos()
|
||||
{
|
||||
return response()->json(Depo::all());
|
||||
}
|
||||
|
||||
public function showOneDepo($id)
|
||||
{
|
||||
return response()->json(Depo::find($id));
|
||||
}
|
||||
|
||||
public function showSubDepo()
|
||||
{
|
||||
return response()->json(Depo::where('StJual',1)->get());
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = Depo::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = Depo::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
Depo::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
class ExampleController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Barang;
|
||||
use App\Mail\DrugRestriction;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class IjinObatController extends Controller
|
||||
{
|
||||
/**
|
||||
* Send email the given item.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string $kodeobat
|
||||
* @return Response
|
||||
*/
|
||||
public function sendNotif($kodeobat, Request $request)
|
||||
{
|
||||
$barang = Barang::find($kodeobat);
|
||||
// dd($barang);
|
||||
|
||||
// return (new DrugRestriction($barang,$request))->render();
|
||||
// Send notification
|
||||
// return response()->json($request->all());
|
||||
if(preg_match("/,/", $request->input('emailto')))
|
||||
{
|
||||
$arr_recipient = explode(",",$request->input('emailto'));
|
||||
array_walk($arr_recipient,'trim');
|
||||
foreach($arr_recipient as $recipient) {
|
||||
Mail::to($recipient)->send(new DrugRestriction($barang,$request));
|
||||
}
|
||||
}
|
||||
else {
|
||||
Mail::to($request->input('emailto'))->send(new DrugRestriction($barang,$request));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\MutasiBarang;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class MutasiBarangController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(DB::table('TTLogMutasiBarang')->whereRaw("LEFT(KodePeriode,4) in ('".date('Y')."')")->paginate(10000));
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = MutasiBarang::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$mutasi = MutasiBarang::findOrFail($id);
|
||||
$mutasi->update($request->input);
|
||||
|
||||
return response()->json($mutasi, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
MutasiBarang::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Mail\Otorisasi;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class OtorisasiController extends Controller
|
||||
{
|
||||
/**
|
||||
* Send email the given item.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
public function sendOtorisasi(Request $request)
|
||||
{
|
||||
// Send notification
|
||||
// return response()->json($request->all());
|
||||
if(preg_match("/,/", $request->input('emailto')))
|
||||
{
|
||||
$arr_recipient = explode(",",$request->input('emailto'));
|
||||
array_walk($arr_recipient,'trim');
|
||||
foreach($arr_recipient as $recipient) {
|
||||
Mail::to($recipient)->send(new Otorisasi($request));
|
||||
}
|
||||
}
|
||||
else {
|
||||
Mail::to($request->input('emailto'))->send(new Otorisasi($request));
|
||||
}
|
||||
}
|
||||
}
|
||||
239
webservice/farmasi/app/Http/Controllers/PenjualanController.php
Normal file
239
webservice/farmasi/app/Http/Controllers/PenjualanController.php
Normal file
@@ -0,0 +1,239 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\Depo;
|
||||
use App\LogJual;
|
||||
use App\LogJualDetil;
|
||||
use App\LogMutasiBarang;
|
||||
use App\TMPasien;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class PenjualanController extends Controller
|
||||
{
|
||||
|
||||
public function showJual()
|
||||
{
|
||||
return response()->json(LogJual::select('NoJual','TglJual','TMOrgDepo.Nama as nama_upf','NamaPx','AlamatPx')
|
||||
->join('TMOrgDepo','TMOrgDepo.Kode','TTLogJual.KodeDepo')
|
||||
->whereRaw('CONVERT(VARCHAR(10), TglJual, 103) = \''.date('d/m/Y').'\'')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showJualDetil($nojual)
|
||||
{
|
||||
if(preg_match("/-/", $nojual))
|
||||
{
|
||||
$nojual = preg_replace("/-/", ' ', $nojual);
|
||||
}
|
||||
$obj_query = LogJual::select('NoJual','TMOrgDepo.Nama as nama_upf','NoRMPx','NoBilling','NamaPx','AlamatPx','TMLogBarang.Nama as namaBarang','TTLogJualD.Jumlah','TTLogJualD.Harga','TMPetugas.Nama as nama_petugas','jaminan.Nama as nama_penjamin','TotJual')
|
||||
->selectRaw('CONCAT(CONVERT(VARCHAR(10), TglJual, 103),\' \',CONVERT(VARCHAR(10), TglJual, 108)) as TglJual')
|
||||
->selectRaw('(SELECT SUM(Harga*Jumlah) from TTLogJualD as d2 where d2.KodeJual = TTLogJual.Kode GROUP BY d2.KodeJual) as TotDetil')
|
||||
->selectRaw('(TotJual-(SELECT SUM(Harga*Jumlah) from TTLogJualD as d2 where d2.KodeJual = TTLogJual.Kode GROUP BY d2.KodeJual)) as Pembulatan')
|
||||
->join('TMOrgDepo','TMOrgDepo.Kode','TTLogJual.KodeDepo')
|
||||
->join('TTLogJualD','TTLogJual.Kode','TTLogJualD.KodeJual')
|
||||
->join('TMLogBarang','TTLogJualD.KodeBarang','TMLogBarang.Kode')
|
||||
->join('TMPetugas','TTLogJual.IdPetugas','TMPetugas.Kode')
|
||||
->leftJoin('TMLogReference as jaminan','TTLogJual.KodeJamin','jaminan.Kode')
|
||||
->where('NoJual','=',$nojual)
|
||||
->get();
|
||||
|
||||
return response()->json($obj_query);
|
||||
}
|
||||
|
||||
public function showJualFiltered($search)
|
||||
{
|
||||
return response()->json(LogJual::select('NoJual','TglJual','TMOrgDepo.Nama as nama_upf','NamaPx','AlamatPx')
|
||||
->join('TMOrgDepo','TMOrgDepo.Kode','TTLogJual.KodeDepo')
|
||||
->whereRaw('CONVERT(VARCHAR(10), TglJual, 103) = \''.date('d/m/Y').'\' AND (TMOrgDepo.Nama like \'%'.$search.'%\' OR NamaPx like \'%'.$search.'%\' OR AlamatPx like \'%'.$search.'%\')')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showJualFilteredDate($tgl)
|
||||
{
|
||||
$tgl = preg_replace("/-/","/",$tgl);
|
||||
return response()->json(LogJual::select('NoJual','TglJual','TMOrgDepo.Nama as nama_upf','NamaPx','AlamatPx')
|
||||
->join('TMOrgDepo','TMOrgDepo.Kode','TTLogJual.KodeDepo')
|
||||
->whereRaw('CONVERT(VARCHAR(10), TglJual, 103) = \''.$tgl.'\'')
|
||||
->get());
|
||||
}
|
||||
|
||||
|
||||
public function showTotalJual()
|
||||
{
|
||||
return response()->json(LogJual::selectRaw('count(NoJual) as jumlah')
|
||||
->join('TMOrgDepo','TMOrgDepo.Kode','TTLogJual.KodeDepo')
|
||||
->whereRaw('CONVERT(VARCHAR(10), TglJual, 103) = \''.date('d/m/Y').'\'')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showDetil($id)
|
||||
{
|
||||
return response()->json(LogJualDetil::where('KodeJual',$id)->get());
|
||||
}
|
||||
|
||||
private function insert_loop(Request $request)
|
||||
{
|
||||
$arr_input = (array) $request->input('arr_input');
|
||||
$totalJual = 0;
|
||||
foreach($arr_input as $detil){
|
||||
if($detil['Jumlah'] == '' ) { continue; }
|
||||
$totalJual += ($detil['Harga']*$detil['Jumlah']);
|
||||
}
|
||||
|
||||
if($totalJual == 0)
|
||||
{
|
||||
return response()->json(['status'=>'error','message'=>'Data barang kosong.'],200);
|
||||
}
|
||||
|
||||
$input = (array) $request->input('input');
|
||||
// get kode jual
|
||||
$tmp_jual = LogJual::where('Kode','like',$input['KodeDepo'].date('Ym').'%')->orderBy('Kode','desc')->first();
|
||||
if(!empty($tmp_jual)){
|
||||
$kd_jual = str_replace($input['KodeDepo'], "", $tmp_jual->Kode);
|
||||
$kd_jual = substr($kd_jual,6);
|
||||
$kd_jual += 1;
|
||||
$kd_jual = date('Ym').str_pad($kd_jual, 6, "0", STR_PAD_LEFT);
|
||||
}
|
||||
else {
|
||||
$kd_jual = date('Ym').'000001';
|
||||
}
|
||||
|
||||
// get no jual depo
|
||||
$findDepo = Depo::find($input['KodeDepo']);
|
||||
$tmp_jual2 = LogJual::where('NoJual','like',$findDepo->Inisial.date('Ym').'%')->orderBy('NoJual','desc')->first();
|
||||
if(!empty($tmp_jual2)){
|
||||
$no_jual = str_replace($findDepo->Inisial, "", $tmp_jual2->NoJual);
|
||||
$no_jual = substr($no_jual,6);
|
||||
$no_jual += 1;
|
||||
$no_jual = date('Ym').str_pad($no_jual, 6, "0", STR_PAD_LEFT);
|
||||
}
|
||||
else {
|
||||
$no_jual = date('Ym').'000001';
|
||||
}
|
||||
|
||||
$input['Kode'] = $input['KodeDepo'].$kd_jual;
|
||||
$input['NoJual'] = $findDepo->Inisial.$no_jual;
|
||||
$input['TglJual'] = date('Y-m-d H:i:s');
|
||||
$input['NoMinta'] = $input['KodeDepo'].$kd_jual;
|
||||
$input['Aktif'] = 1;
|
||||
$input['StCetak'] = 1;
|
||||
$input['StJual'] = 1;
|
||||
$input['TotJual'] = $totalJual;
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$inputvar = (array) $request->input('input');
|
||||
$arr_input = (array) $request->input('arr_input');
|
||||
// generate data to insert with 3 times trying
|
||||
|
||||
// DB::enableQueryLog();
|
||||
$is_success = 0;
|
||||
for( $i = 0; $i < 3; $i++) {
|
||||
if($is_success == 0) {
|
||||
$input = $this->insert_loop($request);
|
||||
|
||||
$LogJual = LogJual::firstOrNew($input);
|
||||
|
||||
if(!$LogJual->save()) {
|
||||
$is_success = 0;
|
||||
}
|
||||
else {
|
||||
$is_success = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// return response()->json(DB::getQueryLog());exit;
|
||||
|
||||
$LogJualD = $LogMutasi = [];
|
||||
if($is_success)
|
||||
{
|
||||
$i = 1;
|
||||
foreach($arr_input as $detil)
|
||||
{
|
||||
if($detil['Jumlah'] == '') continue;
|
||||
$detil['Kode'] = $input['Kode'].date('Ym').str_pad($i, 4, '0', STR_PAD_LEFT);
|
||||
$detil['KodeJual'] = $input['Kode'];
|
||||
$detil['StStock'] = $detil['StStock']*1;
|
||||
$detil['StRacik'] = $detil['StRacik']*1;
|
||||
$detil['Frek'] = $detil['Frek']*1;
|
||||
$detil['JFrek'] = $detil['JFrek']*1;
|
||||
$detil['Jumlah'] = $detil['Jumlah']*1;
|
||||
$detil['Harga'] = $detil['Harga']*1;
|
||||
$detil['HargaRetur'] = $detil['Harga'];
|
||||
$detil['HPP'] = $detil['HPP']*1;
|
||||
$detil['SP'] = $detil['SP']*1;
|
||||
$detil['SS'] = $detil['SS']*1;
|
||||
$detil['SSR'] = $detil['SSR']*1;
|
||||
$detil['SM'] = $detil['SM']*1;
|
||||
$detil['PenG'] = $detil['PenG']*1;
|
||||
$detil['PenF'] = $detil['PenF']*1;
|
||||
unset($detil['subtotal']);
|
||||
|
||||
$LogJualDetil = LogJualDetil::create($detil);
|
||||
|
||||
$LogMutasiBarang = LogMutasiBarang::where([
|
||||
['KodePeriode',date('Ym')],
|
||||
['KodeDepo',$input['KodeDepo']],
|
||||
['KodeBarang',$detil['KodeBarang']],
|
||||
['StStock',$detil['StStock']]
|
||||
])
|
||||
->update([
|
||||
'Keluar' => DB::raw('(Keluar+'.$detil['Jumlah'].')'),
|
||||
'StockAkhir' => DB::raw('(StockAkhir-'.$detil['Jumlah'].')')
|
||||
]);
|
||||
|
||||
$LogJualD[] = $LogJualDetil;
|
||||
$LogMutasi[] = $LogMutasiBarang;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
// return response()->json(DB::getQueryLog());exit;
|
||||
|
||||
if($is_success) {
|
||||
// create pasien
|
||||
$arr_pasien['NoRM'] = $inputvar['NoRMPx'];
|
||||
$arr_pasien['Nama'] = $inputvar['NamaPx'];
|
||||
$arr_pasien['JKL'] = NULL;
|
||||
$arr_pasien['Alamat'] = '';
|
||||
$arr_pasien['TglLahir'] = $inputvar['TglLahir'];
|
||||
|
||||
$savePasien = TMPasien::updateOrCreate($arr_pasien);
|
||||
|
||||
return response()->json([
|
||||
'status'=>'sukses',
|
||||
'message'=>'Data penjualan obat telah disimpan.',
|
||||
'main'=>$LogJual,
|
||||
'detil'=>$LogJualD,
|
||||
'mutasi'=>$LogMutasi
|
||||
], 201);
|
||||
}
|
||||
else {
|
||||
return response()->json([
|
||||
'status'=>'error',
|
||||
'message'=>'Data penjualan obat gagal disimpan.'
|
||||
], 400);
|
||||
}
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = Barang::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
Barang::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class PetugasController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(DB::table('TMPetugas')->get());
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = Reference::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = Reference::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
Reference::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\MasterProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class ProviderController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(MasterProvider::all());
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = MasterProvider::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = MasterProvider::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
MasterProvider::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\Reference;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class ReferenceController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(DB::table('TMLogReference')->get());
|
||||
}
|
||||
|
||||
public function showJenis()
|
||||
{
|
||||
return response()->json(DB::table('TMLogReference')
|
||||
->select('Kode','Nama')
|
||||
->where([['Tipe','=',1],['aktif','=',1]])
|
||||
->get()
|
||||
);
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = Reference::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = Reference::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
Reference::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
38
webservice/farmasi/app/Http/Controllers/StokController.php
Normal file
38
webservice/farmasi/app/Http/Controllers/StokController.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use App\MasterStok;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class StokController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(DB::table('TMStock')->get());
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = MasterStok::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = MasterStok::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
MasterStok::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
51
webservice/farmasi/app/Http/Controllers/TempatController.php
Normal file
51
webservice/farmasi/app/Http/Controllers/TempatController.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use DB;
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
|
||||
class TempatController extends Controller
|
||||
{
|
||||
|
||||
public function showAll()
|
||||
{
|
||||
return response()->json(DB::table('TMLogReference')->get());
|
||||
}
|
||||
|
||||
public function showBy($jenis)
|
||||
{
|
||||
if($jenis == 1)
|
||||
{
|
||||
return response()->json(DB::table('TMOrgTL')->join('TMOrgJL as j','TMOrgTL.KodeJL','=','j.Kode')->where('TMOrgTL.Aktif',1)->select(DB::raw('TMOrgTL.Kode,TMOrgTL.KodeJL,j.Nama as NamaJL,TMOrgTL.Nama,TMOrgTL.StInap'))->get());
|
||||
}
|
||||
elseif($jenis == 2){
|
||||
return response()->json(DB::table('TMOrgJL')->where('Aktif',1)->get());
|
||||
}
|
||||
else {
|
||||
return response(500);
|
||||
}
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
{
|
||||
$author = Reference::create($request->all());
|
||||
|
||||
return response()->json($author, 201);
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$author = Reference::findOrFail($id);
|
||||
$author->update($request->all());
|
||||
|
||||
return response()->json($author, 200);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
Reference::findOrFail($id)->delete();
|
||||
return response('Deleted Successfully', 200);
|
||||
}
|
||||
}
|
||||
44
webservice/farmasi/app/Http/Controllers/UserController.php
Normal file
44
webservice/farmasi/app/Http/Controllers/UserController.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use App\User;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('auth:api');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
||||
public function authenticate(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'email' => 'required',
|
||||
'password' => 'required'
|
||||
]);
|
||||
|
||||
$user = User::where('email', $request->input('email'))->first();
|
||||
$decrypt = base64_decode($request->input('password'));
|
||||
$hash = substr(substr($decrypt, 2),0,-2);
|
||||
if($user != NULL && Hash::check($hash, $user->password)){
|
||||
$apikey = base64_encode(str_random(40));
|
||||
$time = date('Y-m-d H:i:s');
|
||||
User::where('email', $request->input('email'))->update(['api_key' => "$apikey"]);;
|
||||
return response()->json(['status' => 'success','api_key' => $apikey,'api_timestamp' => $time]);
|
||||
}else{
|
||||
return response()->json(['status' => 'fail'],401);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
44
webservice/farmasi/app/Http/Middleware/Authenticate.php
Normal file
44
webservice/farmasi/app/Http/Middleware/Authenticate.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Factory as Auth;
|
||||
|
||||
class Authenticate
|
||||
{
|
||||
/**
|
||||
* The authentication guard factory instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Auth\Factory
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new middleware instance.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Factory $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Auth $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null $guard
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if ($this->auth->guard($guard)->guest()) {
|
||||
return response('Unauthorized.', 401);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
20
webservice/farmasi/app/Http/Middleware/ExampleMiddleware.php
Normal file
20
webservice/farmasi/app/Http/Middleware/ExampleMiddleware.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class ExampleMiddleware
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
26
webservice/farmasi/app/Jobs/ExampleJob.php
Normal file
26
webservice/farmasi/app/Jobs/ExampleJob.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
class ExampleJob extends Job
|
||||
{
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
24
webservice/farmasi/app/Jobs/Job.php
Normal file
24
webservice/farmasi/app/Jobs/Job.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
abstract class Job implements ShouldQueue
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queueable Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This job base class provides a central location to place any logic that
|
||||
| is shared across all of your jobs. The trait included with the class
|
||||
| provides access to the "queueOn" and "delay" queue helper methods.
|
||||
|
|
||||
*/
|
||||
|
||||
use InteractsWithQueue, Queueable, SerializesModels;
|
||||
}
|
||||
31
webservice/farmasi/app/Listeners/ExampleListener.php
Normal file
31
webservice/farmasi/app/Listeners/ExampleListener.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use App\Events\ExampleEvent;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class ExampleListener
|
||||
{
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param ExampleEvent $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(ExampleEvent $event)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
30
webservice/farmasi/app/LogJual.php
Normal file
30
webservice/farmasi/app/LogJual.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LogJual extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'NoJual', 'TglJual', 'KodeDepo', 'KodeJamin', 'KodeDokter', 'StJual', 'KodeTL', 'NoRMPx','NamaPx', 'UmurPx','KetUmur','AlamatPx','Aktif','IdPetugas','TglRetur','AktifRetur','IdPetugasRetur','NoMinta','StMinta','AktifMinta','IdPetugasMinta','Klaim','TglKlaim','StCetak','StCetakR','Dx','NoTT','TotJual','TotRetur','StResep','idResep','NoBilling','TglLahir','idbl_transaksi','StBilling','StLunasBilling','idbl_transaksi_ret','KodeJurnal','KodeJurnalR'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TTLogJual';
|
||||
protected $primaryKey = 'Kode';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
}
|
||||
30
webservice/farmasi/app/LogJualDetil.php
Normal file
30
webservice/farmasi/app/LogJualDetil.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LogJualDetil extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'KodeJual', 'KodeBarang', 'Satuan', 'HPP', 'Jumlah', 'Harga', 'Jasa', 'DiscPros','Discount', 'KodeInduk','HargaRetur','JumlahRetur','JasaRetur','StStock','StRacik','Signa','Keterangan','PenG','PenF','ResepAsli','IdDetailResep','Frek','JFrek','Hari','SP','SS','SM','SSR','NamaRacikan','WK'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TTLogJualD';
|
||||
protected $primaryKey = 'Kode';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
}
|
||||
28
webservice/farmasi/app/LogMutasiBarang.php
Normal file
28
webservice/farmasi/app/LogMutasiBarang.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LogMutasiBarang extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'KodePeriode', 'KodeDepo', 'KodeBarang', 'StockAwal', 'Masuk', 'Keluar', 'StockAkhir', 'Opname', 'HPPAwal','HPPAkhir', 'StStock','HAvgBeli','HLastBeliAw','HLastBeliAk','HTAwal','HTAkhir','Gabung','HargaGabung'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TTLogMutasiBarang';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
}
|
||||
54
webservice/farmasi/app/Mail/DrugRestriction.php
Normal file
54
webservice/farmasi/app/Mail/DrugRestriction.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Barang;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DrugRestriction extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $barang;
|
||||
protected $request;
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Barang $barang,Request $request)
|
||||
{
|
||||
$this->barang = $barang;
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$config = config('beautymail.view');
|
||||
if(array_key_exists('logo',$config)){
|
||||
$config['logo']['path'] = preg_replace("/\%PUBLIC\%/",env('APP_URL'),$config['logo']['path']);
|
||||
}
|
||||
// dd($this->barang);
|
||||
return $this->view('emails.drugnotif')
|
||||
->with(array_merge($config,[
|
||||
'namapasien' => $this->request->input('nama_pasien'),
|
||||
'usia' => $this->request->input('usia'),
|
||||
'diagnosa' => $this->request->input('diagnosa'),
|
||||
'namaObat' => $this->barang->Nama,
|
||||
'signa' => $this->request->input('signa'),
|
||||
'jumlah_obat' => $this->request->input('jumlah_obat'),
|
||||
'kode_kirim' => $this->request->input('kode'),
|
||||
'senderName' => env('MAIL_FROM_NAME','SIMRS')
|
||||
]))
|
||||
->subject('Ijin Penggunaan Obat '.$this->barang->Nama.' '.$this->request->input('nomr'));
|
||||
}
|
||||
}
|
||||
52
webservice/farmasi/app/Mail/Otorisasi.php
Normal file
52
webservice/farmasi/app/Mail/Otorisasi.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Otorisasi extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $request;
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$config = config('beautymail.view');
|
||||
if(array_key_exists('logo',$config)){
|
||||
$config['logo']['path'] = preg_replace("/\%PUBLIC\%/",env('APP_URL'),$config['logo']['path']);
|
||||
}
|
||||
|
||||
$no_telepon = sprintf("%s%s%s",
|
||||
substr($this->request->input('no_telepon'), 0, 4),
|
||||
str_repeat('*',4),
|
||||
substr($this->request->input('no_telepon'), (strlen($this->request->input('no_telepon'))-4) ) );
|
||||
|
||||
return $this->view('emails.otorisasi')
|
||||
->with(array_merge($config,[
|
||||
'nama' => $this->request->input('nama'),
|
||||
'no_telepon' => $no_telepon,
|
||||
'pin_author' => $this->request->input('pin'),
|
||||
'senderName' => env('MAIL_FROM_NAME','SIMRS')
|
||||
]))
|
||||
->subject('Kode Pin Otorisasi SIMRS');
|
||||
}
|
||||
}
|
||||
32
webservice/farmasi/app/MasterProvider.php
Normal file
32
webservice/farmasi/app/MasterProvider.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class MasterProvider extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'Nama', 'Status', 'KodeSMF', 'KodeMaping', 'aktif'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMOrgProvider';
|
||||
protected $primaryKey = ['Kode'];
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
|
||||
}
|
||||
32
webservice/farmasi/app/MasterStok.php
Normal file
32
webservice/farmasi/app/MasterStok.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class MasterStok extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'Nama', 'aktif', 'Pros'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMStock';
|
||||
protected $primaryKey = ['Kode'];
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
|
||||
}
|
||||
43
webservice/farmasi/app/MutasiBarang.php
Normal file
43
webservice/farmasi/app/MutasiBarang.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class MutasiBarang extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'KodePeriode', 'KodeDepo', 'KodeBarang', 'StockAwal', 'Masuk','Keluar','StockAkhir','Opname','HPPAwal',
|
||||
'HPPAkhir', 'StStock', 'HAvgBeli', 'HLastBeliAw', 'HLastBeliAk', 'HTAwal', 'HTAkhir', 'Gabung', 'HargaGabung'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
protected $hidden = [];
|
||||
protected $table = 'TTLogMutasiBarang';
|
||||
protected $primaryKey = ['KodePeriode','KodeDepo','KodeBarang','StStock'];
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
|
||||
|
||||
protected function setKeysForSaveQuery(Builder $query)
|
||||
{
|
||||
$query
|
||||
->where('KodePeriode', '=', $this->getAttribute('KodePeriode'))
|
||||
->where('KodeDepo', '=', $this->getAttribute('KodeDepo'));
|
||||
->where('KodeBarang', '=', $this->getAttribute('KodeBarang'));
|
||||
->where('StStock', '=', $this->getAttribute('StStock'));
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
29
webservice/farmasi/app/Providers/AppServiceProvider.php
Normal file
29
webservice/farmasi/app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
$this->app->singleton(
|
||||
'mailer',
|
||||
function ($app) {
|
||||
return $app->loadComponent('mail', 'Illuminate\Mail\MailServiceProvider', 'mailer');
|
||||
}
|
||||
);
|
||||
// Aliases
|
||||
$this->app->alias('mailer', \Illuminate\Contracts\Mail\Mailer::class);
|
||||
// Make Queue
|
||||
$this->app->make('queue');
|
||||
|
||||
}
|
||||
}
|
||||
39
webservice/farmasi/app/Providers/AuthServiceProvider.php
Normal file
39
webservice/farmasi/app/Providers/AuthServiceProvider.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Boot the authentication services for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Here you may define how you wish users to be authenticated for your Lumen
|
||||
// application. The callback which receives the incoming request instance
|
||||
// should return either a User instance or null. You're free to obtain
|
||||
// the User instance via an API token or any other method necessary.
|
||||
|
||||
$this->app['auth']->viaRequest('api', function ($request) {
|
||||
if ($request->header('x-token')) {
|
||||
return User::where('api_key', $request->header('x-token'))->first();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
19
webservice/farmasi/app/Providers/EventServiceProvider.php
Normal file
19
webservice/farmasi/app/Providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Laravel\Lumen\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
'App\Events\ExampleEvent' => [
|
||||
'App\Listeners\ExampleListener',
|
||||
],
|
||||
];
|
||||
}
|
||||
29
webservice/farmasi/app/Reference.php
Normal file
29
webservice/farmasi/app/Reference.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Reference extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'Kode', 'Nama', 'Pros', 'Tipe', 'KodeMaping', 'aktif', 'kdRekBlj', 'NM', 'NIP','NMRekening'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMLogReference';
|
||||
protected $primaryKey = 'Kode';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
}
|
||||
33
webservice/farmasi/app/TMPasien.php
Normal file
33
webservice/farmasi/app/TMPasien.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class TMPasien extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'NoRM', 'Nama', 'JKL', 'Alamat', 'TglLahir'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
protected $hidden = [];
|
||||
protected $table = 'TMPasien';
|
||||
protected $primaryKey = ['NoRM'];
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
}
|
||||
32
webservice/farmasi/app/User.php
Normal file
32
webservice/farmasi/app/User.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Laravel\Lumen\Auth\Authorizable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
|
||||
class User extends Model implements AuthenticatableContract, AuthorizableContract
|
||||
{
|
||||
use Authenticatable, Authorizable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
];
|
||||
}
|
||||
35
webservice/farmasi/artisan
Normal file
35
webservice/farmasi/artisan
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| First we need to get an application instance. This creates an instance
|
||||
| of the application / container and bootstraps the application so it
|
||||
| is ready to receive HTTP / Console requests from the environment.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(
|
||||
'Illuminate\Contracts\Console\Kernel'
|
||||
);
|
||||
|
||||
exit($kernel->handle(new ArgvInput, new ConsoleOutput));
|
||||
133
webservice/farmasi/bootstrap/app.php
Normal file
133
webservice/farmasi/bootstrap/app.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
try {
|
||||
// (new Dotenv\Dotenv(dirname(__DIR__)))->load();
|
||||
(new Laravel\Lumen\Bootstrap\LoadEnvironmentVariables(
|
||||
dirname(__DIR__)
|
||||
))->bootstrap();
|
||||
} catch (Dotenv\Exception\InvalidPathException $e) {
|
||||
//
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we will load the environment and create the application instance
|
||||
| that serves as the central piece of this framework. We'll use this
|
||||
| application as an "IoC" container and router for this framework.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Laravel\Lumen\Application(
|
||||
dirname(__DIR__)
|
||||
);
|
||||
|
||||
$app->withFacades();
|
||||
|
||||
$app->withEloquent();
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Container Bindings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Now we will register a few bindings in the service container. We will
|
||||
| register the exception handler and the console kernel. You may add
|
||||
| your own bindings here if you like or you can make another file.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we will register the middleware with the application. These can
|
||||
| be global middleware that run before and after each request into a
|
||||
| route or middleware that'll be assigned to some specific routes.
|
||||
|
|
||||
*/
|
||||
|
||||
// $app->middleware([
|
||||
// App\Http\Middleware\ExampleMiddleware::class
|
||||
// ]);
|
||||
|
||||
$app->routeMiddleware([
|
||||
'auth' => App\Http\Middleware\Authenticate::class,
|
||||
]);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Beautymail Classes and Configuration paramters
|
||||
|--------------------------------------------------------------------------
|
||||
| In order to get Beautymail working on Lumen you need to add the following
|
||||
| to your bootstrap/app.php in order to resolve missing config files,
|
||||
| parameters and classes (before you register BeautymailServiceProvider)
|
||||
|
|
||||
*/
|
||||
|
||||
// Provide required path variables
|
||||
$app->instance('path.config', env("STORAGE_DIR", app()->basePath()) . DIRECTORY_SEPARATOR . 'config');
|
||||
$app->instance('path.public', env("STORAGE_DIR", app()->basePath()) . DIRECTORY_SEPARATOR . 'public');
|
||||
|
||||
// Enable config for beautymail
|
||||
$app->configure('beautymail');
|
||||
|
||||
// Provide class alliases to resolve Request and Config
|
||||
class_alias(\Illuminate\Support\Facades\Request::class, "\Request");
|
||||
class_alias(\Illuminate\Support\Facades\Config::class, "\Config");
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here we will register all of the application's service providers which
|
||||
| are used to bind services into the container. Service providers are
|
||||
| totally optional, so you are not required to uncomment this line.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->register(App\Providers\AppServiceProvider::class);
|
||||
$app->register(App\Providers\AuthServiceProvider::class);
|
||||
// $app->register(App\Providers\EventServiceProvider::class);
|
||||
$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class);
|
||||
$app->register(Illuminate\Mail\MailServiceProvider::class);
|
||||
// $app->register(Snowfire\Beautymail\BeautymailServiceProvider::class);
|
||||
$app->configure('mail');
|
||||
$app->configure('services');
|
||||
$app->alias('mailer', Illuminate\Mail\Mailer::class);
|
||||
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
|
||||
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Load The Application Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next we will include the routes file so that they can all be added to
|
||||
| the application. This will provide all of the URLs the application
|
||||
| can respond to, as well as the controllers that may handle them.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->router->group([
|
||||
'namespace' => 'App\Http\Controllers',
|
||||
], function ($router) {
|
||||
require __DIR__.'/../routes/web.php';
|
||||
});
|
||||
|
||||
return $app;
|
||||
48
webservice/farmasi/composer.json
Normal file
48
webservice/farmasi/composer.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "laravel/lumen",
|
||||
"description": "The Laravel Lumen Framework.",
|
||||
"keywords": ["framework", "laravel", "lumen"],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
"flipbox/lumen-generator": "^5.6",
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"illuminate/mail": "5.8.*",
|
||||
"irazasyed/larasupport": "^1.7",
|
||||
"laravel/lumen-framework": "5.8.*",
|
||||
"snowfire/beautymail": "^1.1",
|
||||
"vlucas/phpdotenv": "~3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"phpunit/phpunit": "~7.0",
|
||||
"mockery/mockery": "~1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"database/seeds",
|
||||
"database/factories"
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
"tests/"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
7460
webservice/farmasi/composer.lock
generated
Normal file
7460
webservice/farmasi/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
37
webservice/farmasi/config/beautymail.php
Normal file
37
webservice/farmasi/config/beautymail.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
// These CSS rules will be applied after the regular template CSS
|
||||
|
||||
/*
|
||||
'css' => [
|
||||
'.button-content .button { background: red }',
|
||||
],
|
||||
*/
|
||||
|
||||
'colors' => [
|
||||
|
||||
'highlight' => '#004ca3',
|
||||
'button' => '#004cad',
|
||||
|
||||
],
|
||||
|
||||
'view' => [
|
||||
'senderName' => null,
|
||||
'reminder' => null,
|
||||
'unsubscribe' => null,
|
||||
'address' => null,
|
||||
|
||||
'logo' => [
|
||||
'path' => 'https://rsusaifulanwar.jatimprov.go.id/wp-content/uploads/2019/08/slide2Fix-1024x498.jpg',
|
||||
'width' => '500',
|
||||
'height' => '',
|
||||
],
|
||||
|
||||
'twitter' => null,
|
||||
'facebook' => null,
|
||||
'flickr' => null,
|
||||
],
|
||||
|
||||
];
|
||||
21
webservice/farmasi/config/mail.php
Normal file
21
webservice/farmasi/config/mail.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
return [
|
||||
'driver' => env('MAIL_DRIVER','smtp'),
|
||||
'host' => env('MAIL_HOST','smtp.mailgun.org'),
|
||||
'port' => env('MAIL_PORT',587),
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS','hello@rssamalang.com'),
|
||||
'name' => env('MAIL_FROM_NAME','RSUD Dr. SAIFUL ANWAR MALANG'),
|
||||
],
|
||||
'encryption' => env('MAIL_ENCRYPTION','tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
'paths' => [
|
||||
resource_path('views/vendor/mail'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
19
webservice/farmasi/database/factories/ModelFactory.php
Normal file
19
webservice/farmasi/database/factories/ModelFactory.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of your model factories. Model factories give
|
||||
| you a convenient way to create models for testing and seeding your
|
||||
| database. Just tell the factory how a default model should look.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
];
|
||||
});
|
||||
0
webservice/farmasi/database/migrations/.gitkeep
Normal file
0
webservice/farmasi/database/migrations/.gitkeep
Normal file
16
webservice/farmasi/database/seeds/DatabaseSeeder.php
Normal file
16
webservice/farmasi/database/seeds/DatabaseSeeder.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->call('UsersTableSeeder');
|
||||
}
|
||||
}
|
||||
416
webservice/farmasi/index.html
Normal file
416
webservice/farmasi/index.html
Normal file
@@ -0,0 +1,416 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<style>
|
||||
html {font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
|
||||
body {margin:0}
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section,
|
||||
summary {display:block}
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {display:inline-block;vertical-align:baseline}
|
||||
audio:not([controls]) {display:none;height:0}
|
||||
[hidden],
|
||||
template {display:none}
|
||||
a {background:transparent}
|
||||
a:active,
|
||||
a:hover {outline:0}
|
||||
abbr[title] {border-bottom:1px dotted}
|
||||
b,
|
||||
strong {font-weight:bold}
|
||||
dfn {font-style:italic}
|
||||
h1 {font-size:2em;margin:0.67em 0}
|
||||
mark {background:#ff0;color:#000}
|
||||
small {font-size:80%}
|
||||
sub,
|
||||
sup {font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
||||
sup {top:-0.5em}
|
||||
sub {bottom:-0.25em}
|
||||
img {border:0}
|
||||
svg:not(:root) {overflow:hidden}
|
||||
figure {margin:1em 40px}
|
||||
hr {-moz-box-sizing:content-box;box-sizing:content-box;height:0}
|
||||
pre {overflow:auto}
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {font-family:monospace,monospace;font-size:1em}
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {color:inherit;font:inherit;margin:0}
|
||||
button {overflow:visible}
|
||||
button,
|
||||
select {text-transform:none}
|
||||
button,
|
||||
html input[type="button"],
|
||||
input[type="reset"],
|
||||
input[type="submit"] {-webkit-appearance:button;cursor:pointer}
|
||||
button[disabled],
|
||||
html input[disabled] {cursor:default}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {border:0;padding:0}
|
||||
input {line-height:normal}
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {box-sizing:border-box;padding:0}
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {height:auto}
|
||||
input[type="search"] {-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {-webkit-appearance:none}
|
||||
fieldset {border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}
|
||||
legend {border:0;padding:0}
|
||||
textarea {overflow:auto}
|
||||
optgroup {font-weight:bold}
|
||||
table {border-collapse:collapse;border-spacing:0;table-layout:auto;word-wrap:break-word;word-break:break-all}
|
||||
td,
|
||||
th {padding:0}
|
||||
*,
|
||||
*:before,
|
||||
*:after {-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
|
||||
html {font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}
|
||||
body {font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;line-height:1.42857143;color:#333;background-color:#f9f9f9}
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea {font-family:inherit;font-size:inherit;line-height:inherit}
|
||||
button,
|
||||
input,
|
||||
select[multiple],
|
||||
textarea {background-image:none}
|
||||
a {color:#0181b9;text-decoration:none}
|
||||
a:hover,
|
||||
a:focus {color:#001721;text-decoration:underline}
|
||||
a:focus {outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}
|
||||
img {vertical-align:middle}
|
||||
.img-responsive {display:block;max-width:100%;height:auto}
|
||||
.img-rounded {-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}
|
||||
.img-circle {border-radius:50%}
|
||||
hr {margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}
|
||||
.sr-only {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
|
||||
@media print {* {text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important }a,a:visited {text-decoration:underline }a[href]:after {content:" (" attr(href) ")" }abbr[title]:after {content:" (" attr(title) ")" }a[href^="javascript:"]:after,a[href^="#"]:after {content:"" }pre,blockquote {border:1px solid #999;page-break-inside:avoid }thead {display:table-header-group }tr,img {page-break-inside:avoid }img {max-width:100% !important }p,h2,h3 {orphans:3;widows:3 }h2,h3 {page-break-after:avoid }select {background:#fff !important }.navbar {display:none }.table td,.table th {background-color:#fff !important }.btn >.caret,.dropup >.btn >.caret {border-top-color:#000 !important }.label {border:1px solid #000 }.table {border-collapse:collapse !important }.table-bordered th,.table-bordered td {border:1px solid #ddd !important }}
|
||||
.container {margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}
|
||||
@media (min-width:768px) {.container {width:750px }}
|
||||
@media (min-width:992px) {.container {width:970px }}
|
||||
@media (min-width:1200px) {.container {width:1170px }}
|
||||
.container-fluid {margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}
|
||||
.row {margin-left:-15px;margin-right:-15px}
|
||||
.row-flush {margin-left:0;margin-right:0}
|
||||
.row-flush [class*="col-"] {padding-left:0 !important;padding-right:0 !important}
|
||||
.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12 {position:relative;min-height:1px;padding-left:15px;padding-right:15px}
|
||||
.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12 {float:left}
|
||||
.col-xs-12 {width:100%}
|
||||
.col-xs-11 {width:91.66666667%}
|
||||
.col-xs-10 {width:83.33333333%}
|
||||
.col-xs-9 {width:75%}
|
||||
.col-xs-8 {width:66.66666667%}
|
||||
.col-xs-7 {width:58.33333333%}
|
||||
.col-xs-6 {width:50%}
|
||||
.col-xs-5 {width:41.66666667%}
|
||||
.col-xs-4 {width:33.33333333%}
|
||||
.col-xs-3 {width:25%}
|
||||
.col-xs-2 {width:16.66666667%}
|
||||
.col-xs-1 {width:8.33333333%}
|
||||
.col-xs-pull-12 {right:100%}
|
||||
.col-xs-pull-11 {right:91.66666667%}
|
||||
.col-xs-pull-10 {right:83.33333333%}
|
||||
.col-xs-pull-9 {right:75%}
|
||||
.col-xs-pull-8 {right:66.66666667%}
|
||||
.col-xs-pull-7 {right:58.33333333%}
|
||||
.col-xs-pull-6 {right:50%}
|
||||
.col-xs-pull-5 {right:41.66666667%}
|
||||
.col-xs-pull-4 {right:33.33333333%}
|
||||
.col-xs-pull-3 {right:25%}
|
||||
.col-xs-pull-2 {right:16.66666667%}
|
||||
.col-xs-pull-1 {right:8.33333333%}
|
||||
.col-xs-pull-0 {right:0%}
|
||||
.col-xs-push-12 {left:100%}
|
||||
.col-xs-push-11 {left:91.66666667%}
|
||||
.col-xs-push-10 {left:83.33333333%}
|
||||
.col-xs-push-9 {left:75%}
|
||||
.col-xs-push-8 {left:66.66666667%}
|
||||
.col-xs-push-7 {left:58.33333333%}
|
||||
.col-xs-push-6 {left:50%}
|
||||
.col-xs-push-5 {left:41.66666667%}
|
||||
.col-xs-push-4 {left:33.33333333%}
|
||||
.col-xs-push-3 {left:25%}
|
||||
.col-xs-push-2 {left:16.66666667%}
|
||||
.col-xs-push-1 {left:8.33333333%}
|
||||
.col-xs-push-0 {left:0%}
|
||||
.col-xs-offset-12 {margin-left:100%}
|
||||
.col-xs-offset-11 {margin-left:91.66666667%}
|
||||
.col-xs-offset-10 {margin-left:83.33333333%}
|
||||
.col-xs-offset-9 {margin-left:75%}
|
||||
.col-xs-offset-8 {margin-left:66.66666667%}
|
||||
.col-xs-offset-7 {margin-left:58.33333333%}
|
||||
.col-xs-offset-6 {margin-left:50%}
|
||||
.col-xs-offset-5 {margin-left:41.66666667%}
|
||||
.col-xs-offset-4 {margin-left:33.33333333%}
|
||||
.col-xs-offset-3 {margin-left:25%}
|
||||
.col-xs-offset-2 {margin-left:16.66666667%}
|
||||
.col-xs-offset-1 {margin-left:8.33333333%}
|
||||
.col-xs-offset-0 {margin-left:0%}
|
||||
@media (min-width:768px) {.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12 {float:left }.col-sm-12 {width:100% }.col-sm-11 {width:91.66666667% }.col-sm-10 {width:83.33333333% }.col-sm-9 {width:75% }.col-sm-8 {width:66.66666667% }.col-sm-7 {width:58.33333333% }.col-sm-6 {width:50% }.col-sm-5 {width:41.66666667% }.col-sm-4 {width:33.33333333% }.col-sm-3 {width:25% }.col-sm-2 {width:16.66666667% }.col-sm-1 {width:8.33333333% }.col-sm-pull-12 {right:100% }.col-sm-pull-11 {right:91.66666667% }.col-sm-pull-10 {right:83.33333333% }.col-sm-pull-9 {right:75% }.col-sm-pull-8 {right:66.66666667% }.col-sm-pull-7 {right:58.33333333% }.col-sm-pull-6 {right:50% }.col-sm-pull-5 {right:41.66666667% }.col-sm-pull-4 {right:33.33333333% }.col-sm-pull-3 {right:25% }.col-sm-pull-2 {right:16.66666667% }.col-sm-pull-1 {right:8.33333333% }.col-sm-pull-0 {right:0% }.col-sm-push-12 {left:100% }.col-sm-push-11 {left:91.66666667% }.col-sm-push-10 {left:83.33333333% }.col-sm-push-9 {left:75% }.col-sm-push-8 {left:66.66666667% }.col-sm-push-7 {left:58.33333333% }.col-sm-push-6 {left:50% }.col-sm-push-5 {left:41.66666667% }.col-sm-push-4 {left:33.33333333% }.col-sm-push-3 {left:25% }.col-sm-push-2 {left:16.66666667% }.col-sm-push-1 {left:8.33333333% }.col-sm-push-0 {left:0% }.col-sm-offset-12 {margin-left:100% }.col-sm-offset-11 {margin-left:91.66666667% }.col-sm-offset-10 {margin-left:83.33333333% }.col-sm-offset-9 {margin-left:75% }.col-sm-offset-8 {margin-left:66.66666667% }.col-sm-offset-7 {margin-left:58.33333333% }.col-sm-offset-6 {margin-left:50% }.col-sm-offset-5 {margin-left:41.66666667% }.col-sm-offset-4 {margin-left:33.33333333% }.col-sm-offset-3 {margin-left:25% }.col-sm-offset-2 {margin-left:16.66666667% }.col-sm-offset-1 {margin-left:8.33333333% }.col-sm-offset-0 {margin-left:0% }}
|
||||
@media (min-width:992px) {.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12 {float:left }.col-md-12 {width:100% }.col-md-11 {width:91.66666667% }.col-md-10 {width:83.33333333% }.col-md-9 {width:75% }.col-md-8 {width:66.66666667% }.col-md-7 {width:58.33333333% }.col-md-6 {width:50% }.col-md-5 {width:41.66666667% }.col-md-4 {width:33.33333333% }.col-md-3 {width:25% }.col-md-2 {width:16.66666667% }.col-md-1 {width:8.33333333% }.col-md-pull-12 {right:100% }.col-md-pull-11 {right:91.66666667% }.col-md-pull-10 {right:83.33333333% }.col-md-pull-9 {right:75% }.col-md-pull-8 {right:66.66666667% }.col-md-pull-7 {right:58.33333333% }.col-md-pull-6 {right:50% }.col-md-pull-5 {right:41.66666667% }.col-md-pull-4 {right:33.33333333% }.col-md-pull-3 {right:25% }.col-md-pull-2 {right:16.66666667% }.col-md-pull-1 {right:8.33333333% }.col-md-pull-0 {right:0% }.col-md-push-12 {left:100% }.col-md-push-11 {left:91.66666667% }.col-md-push-10 {left:83.33333333% }.col-md-push-9 {left:75% }.col-md-push-8 {left:66.66666667% }.col-md-push-7 {left:58.33333333% }.col-md-push-6 {left:50% }.col-md-push-5 {left:41.66666667% }.col-md-push-4 {left:33.33333333% }.col-md-push-3 {left:25% }.col-md-push-2 {left:16.66666667% }.col-md-push-1 {left:8.33333333% }.col-md-push-0 {left:0% }.col-md-offset-12 {margin-left:100% }.col-md-offset-11 {margin-left:91.66666667% }.col-md-offset-10 {margin-left:83.33333333% }.col-md-offset-9 {margin-left:75% }.col-md-offset-8 {margin-left:66.66666667% }.col-md-offset-7 {margin-left:58.33333333% }.col-md-offset-6 {margin-left:50% }.col-md-offset-5 {margin-left:41.66666667% }.col-md-offset-4 {margin-left:33.33333333% }.col-md-offset-3 {margin-left:25% }.col-md-offset-2 {margin-left:16.66666667% }.col-md-offset-1 {margin-left:8.33333333% }.col-md-offset-0 {margin-left:0% }}
|
||||
@media (min-width:1200px) {.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12 {float:left }.col-lg-12 {width:100% }.col-lg-11 {width:91.66666667% }.col-lg-10 {width:83.33333333% }.col-lg-9 {width:75% }.col-lg-8 {width:66.66666667% }.col-lg-7 {width:58.33333333% }.col-lg-6 {width:50% }.col-lg-5 {width:41.66666667% }.col-lg-4 {width:33.33333333% }.col-lg-3 {width:25% }.col-lg-2 {width:16.66666667% }.col-lg-1 {width:8.33333333% }.col-lg-pull-12 {right:100% }.col-lg-pull-11 {right:91.66666667% }.col-lg-pull-10 {right:83.33333333% }.col-lg-pull-9 {right:75% }.col-lg-pull-8 {right:66.66666667% }.col-lg-pull-7 {right:58.33333333% }.col-lg-pull-6 {right:50% }.col-lg-pull-5 {right:41.66666667% }.col-lg-pull-4 {right:33.33333333% }.col-lg-pull-3 {right:25% }.col-lg-pull-2 {right:16.66666667% }.col-lg-pull-1 {right:8.33333333% }.col-lg-pull-0 {right:0% }.col-lg-push-12 {left:100% }.col-lg-push-11 {left:91.66666667% }.col-lg-push-10 {left:83.33333333% }.col-lg-push-9 {left:75% }.col-lg-push-8 {left:66.66666667% }.col-lg-push-7 {left:58.33333333% }.col-lg-push-6 {left:50% }.col-lg-push-5 {left:41.66666667% }.col-lg-push-4 {left:33.33333333% }.col-lg-push-3 {left:25% }.col-lg-push-2 {left:16.66666667% }.col-lg-push-1 {left:8.33333333% }.col-lg-push-0 {left:0% }.col-lg-offset-12 {margin-left:100% }.col-lg-offset-11 {margin-left:91.66666667% }.col-lg-offset-10 {margin-left:83.33333333% }.col-lg-offset-9 {margin-left:75% }.col-lg-offset-8 {margin-left:66.66666667% }.col-lg-offset-7 {margin-left:58.33333333% }.col-lg-offset-6 {margin-left:50% }.col-lg-offset-5 {margin-left:41.66666667% }.col-lg-offset-4 {margin-left:33.33333333% }.col-lg-offset-3 {margin-left:25% }.col-lg-offset-2 {margin-left:16.66666667% }.col-lg-offset-1 {margin-left:8.33333333% }.col-lg-offset-0 {margin-left:0% }}
|
||||
.clearfix:before,
|
||||
.clearfix:after,
|
||||
.container:before,
|
||||
.container:after,
|
||||
.container-fluid:before,
|
||||
.container-fluid:after,
|
||||
.row:before,
|
||||
.row:after {content:" ";display:table}
|
||||
.clearfix:after,
|
||||
.container:after,
|
||||
.container-fluid:after,
|
||||
.row:after {clear:both}
|
||||
.center-block {display:block;margin-left:auto;margin-right:auto}
|
||||
.pull-right {float:right !important}
|
||||
.pull-left {float:left !important}
|
||||
.hide {display:none !important}
|
||||
.show {display:block !important}
|
||||
.invisible {visibility:hidden}
|
||||
.text-hide {font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}
|
||||
.hidden {display:none !important;visibility:hidden !important}
|
||||
.affix {position:fixed}
|
||||
@-ms-viewport {width:device-width}
|
||||
.visible-xs,
|
||||
.visible-sm,
|
||||
.visible-md,
|
||||
.visible-lg {display:none !important}
|
||||
@media (max-width:767px) {.visible-xs {display:block !important }table.visible-xs {display:table }tr.visible-xs {display:table-row !important }th.visible-xs,td.visible-xs {display:table-cell !important }}
|
||||
@media (min-width:768px) and (max-width:991px) {.visible-sm {display:block !important }table.visible-sm {display:table }tr.visible-sm {display:table-row !important }th.visible-sm,td.visible-sm {display:table-cell !important }}
|
||||
@media (min-width:992px) and (max-width:1199px) {.visible-md {display:block !important }table.visible-md {display:table }tr.visible-md {display:table-row !important }th.visible-md,td.visible-md {display:table-cell !important }}
|
||||
@media (min-width:1200px) {.visible-lg {display:block !important }table.visible-lg {display:table }tr.visible-lg {display:table-row !important }th.visible-lg,td.visible-lg {display:table-cell !important }}
|
||||
@media (max-width:767px) {.hidden-xs {display:none !important }}
|
||||
@media (min-width:768px) and (max-width:991px) {.hidden-sm {display:none !important }}
|
||||
@media (min-width:992px) and (max-width:1199px) {.hidden-md {display:none !important }}
|
||||
@media (min-width:1200px) {.hidden-lg {display:none !important }}
|
||||
.visible-print {display:none !important}
|
||||
@media print {.visible-print {display:block !important }table.visible-print {display:table }tr.visible-print {display:table-row !important }th.visible-print,td.visible-print {display:table-cell !important }}
|
||||
@media print {.hidden-print {display:none !important }}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {font-family:inherit;font-weight:400;line-height:1.1;color:inherit}
|
||||
h1 small,
|
||||
h2 small,
|
||||
h3 small,
|
||||
h4 small,
|
||||
h5 small,
|
||||
h6 small,
|
||||
.h1 small,
|
||||
.h2 small,
|
||||
.h3 small,
|
||||
.h4 small,
|
||||
.h5 small,
|
||||
.h6 small,
|
||||
h1 .small,
|
||||
h2 .small,
|
||||
h3 .small,
|
||||
h4 .small,
|
||||
h5 .small,
|
||||
h6 .small,
|
||||
.h1 .small,
|
||||
.h2 .small,
|
||||
.h3 .small,
|
||||
.h4 .small,
|
||||
.h5 .small,
|
||||
.h6 .small {font-weight:normal;line-height:1;color:#999}
|
||||
h1,
|
||||
.h1,
|
||||
h2,
|
||||
.h2,
|
||||
h3,
|
||||
.h3 {margin-top:20px;margin-bottom:10px}
|
||||
h1 small,
|
||||
.h1 small,
|
||||
h2 small,
|
||||
.h2 small,
|
||||
h3 small,
|
||||
.h3 small,
|
||||
h1 .small,
|
||||
.h1 .small,
|
||||
h2 .small,
|
||||
.h2 .small,
|
||||
h3 .small,
|
||||
.h3 .small {font-size:65%}
|
||||
h4,
|
||||
.h4,
|
||||
h5,
|
||||
.h5,
|
||||
h6,
|
||||
.h6 {margin-top:10px;margin-bottom:10px}
|
||||
h4 small,
|
||||
.h4 small,
|
||||
h5 small,
|
||||
.h5 small,
|
||||
h6 small,
|
||||
.h6 small,
|
||||
h4 .small,
|
||||
.h4 .small,
|
||||
h5 .small,
|
||||
.h5 .small,
|
||||
h6 .small,
|
||||
.h6 .small {font-size:75%}
|
||||
h1,
|
||||
.h1 {font-size:36px}
|
||||
h2,
|
||||
.h2 {font-size:30px}
|
||||
h3,
|
||||
.h3 {font-size:24px}
|
||||
h4,
|
||||
.h4 {font-size:18px}
|
||||
h5,
|
||||
.h5 {font-size:14px}
|
||||
h6,
|
||||
.h6 {font-size:12px}
|
||||
p {margin:0 0 10px}
|
||||
.lead {margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}
|
||||
@media (min-width:768px) {.lead {font-size:21px }}
|
||||
small,
|
||||
.small {font-size:85%}
|
||||
cite {font-style:normal}
|
||||
.text-left {text-align:left}
|
||||
.text-right {text-align:right}
|
||||
.text-center {text-align:center}
|
||||
.text-justify {text-align:justify}
|
||||
.text-muted {color:#999}
|
||||
.text-primary {color:#34495e}
|
||||
a.text-primary:hover {color:#222f3d}
|
||||
.text-success {color:#3c763d}
|
||||
a.text-success:hover {color:#2b542c}
|
||||
.text-info {color:#31708f}
|
||||
a.text-info:hover {color:#245269}
|
||||
.text-warning {color:#8a6d3b}
|
||||
a.text-warning:hover {color:#66512c}
|
||||
.text-danger {color:#a94442}
|
||||
a.text-danger:hover {color:#843534}
|
||||
.bg-primary {color:#fff;background-color:#34495e}
|
||||
a.bg-primary:hover {background-color:#222f3d}
|
||||
.bg-success {background-color:#dff0d8}
|
||||
a.bg-success:hover {background-color:#c1e2b3}
|
||||
.bg-info {background-color:#d9edf7}
|
||||
a.bg-info:hover {background-color:#afd9ee}
|
||||
.bg-warning {background-color:#fcf8e3}
|
||||
a.bg-warning:hover {background-color:#f7ecb5}
|
||||
.bg-danger {background-color:#f2dede}
|
||||
a.bg-danger:hover {background-color:#e4b9b9}
|
||||
.page-header {padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}
|
||||
ul,
|
||||
ol {margin-top:0;margin-bottom:10px}
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol,
|
||||
ol ol {margin-bottom:0}
|
||||
.list-unstyled {padding-left:0;list-style:none}
|
||||
.list-inline {padding-left:0;list-style:none;margin-left:-5px}
|
||||
.list-inline >li {display:inline-block;padding-left:5px;padding-right:5px}
|
||||
dl {margin-top:0;margin-bottom:20px}
|
||||
dt,
|
||||
dd {line-height:1.42857143}
|
||||
dt {font-weight:bold}
|
||||
dd {margin-left:0}
|
||||
@media (min-width:768px) {.dl-horizontal dt {float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap }.dl-horizontal dd {margin-left:180px }}
|
||||
abbr[title],
|
||||
abbr[data-original-title] {cursor:help;border-bottom:1px dotted #999}
|
||||
.initialism {font-size:90%;text-transform:uppercase}
|
||||
blockquote {padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}
|
||||
blockquote p:last-child,
|
||||
blockquote ul:last-child,
|
||||
blockquote ol:last-child {margin-bottom:0}
|
||||
blockquote footer,
|
||||
blockquote small,
|
||||
blockquote .small {display:block;font-size:80%;line-height:1.42857143;color:#999}
|
||||
blockquote footer:before,
|
||||
blockquote small:before,
|
||||
blockquote .small:before {content:'\2014 \00A0'}
|
||||
.blockquote-reverse,
|
||||
blockquote.pull-right {padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}
|
||||
.blockquote-reverse footer:before,
|
||||
blockquote.pull-right footer:before,
|
||||
.blockquote-reverse small:before,
|
||||
blockquote.pull-right small:before,
|
||||
.blockquote-reverse .small:before,
|
||||
blockquote.pull-right .small:before {content:''}
|
||||
.blockquote-reverse footer:after,
|
||||
blockquote.pull-right footer:after,
|
||||
.blockquote-reverse small:after,
|
||||
blockquote.pull-right small:after,
|
||||
.blockquote-reverse .small:after,
|
||||
blockquote.pull-right .small:after {content:'\00A0 \2014'}
|
||||
blockquote:before,
|
||||
blockquote:after {content:""}
|
||||
address {margin-bottom:20px;font-style:normal;line-height:1.42857143}
|
||||
|
||||
.oc-icon-chain:before,
|
||||
.icon-chain:before,
|
||||
|
||||
.oc-icon-chain-broken:before,
|
||||
.icon-chain-broken:before {content:"\f127"}
|
||||
|
||||
.close {float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;font-family:sans-serif;opacity:0.2;filter:alpha(opacity=20)}
|
||||
.close:hover,
|
||||
.close:focus {color:#000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}
|
||||
button.close {padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}
|
||||
@font-face {font-family:'FontAwesome';src:url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.eot?v=1.0.1');src:url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=1.0.1') format('embedded-opentype'),url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.woff?v=1.0.1') format('woff'),url('../ui/font/fontawesome-webfont.ttf?v=1.0.1') format('truetype'),url('../library/font-awesome-4.7.0/fonts/fontawesome-webfont.svg#fontawesomeregular?v=1.0.1') format('svg');font-weight:normal;font-style:normal}
|
||||
[class^="icon-"],
|
||||
[class*=" icon-"] {font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0}
|
||||
[class^="icon-"]:before,
|
||||
[class*=" icon-"]:before {text-decoration:inherit;display:inline-block;speak:none}
|
||||
[class^="icon-"].pull-left,
|
||||
[class*=" icon-"].pull-left {margin-right:.3em}
|
||||
[class^="icon-"].pull-right,
|
||||
[class*=" icon-"].pull-right {margin-left:.3em}
|
||||
[class^="oc-icon-"]:before,
|
||||
[class*=" oc-icon-"]:before {display:inline-block;margin-right:8px;font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;vertical-align:baseline}
|
||||
[class^="oc-icon-"].empty:before,
|
||||
[class*=" oc-icon-"].empty:before {margin-right:0}
|
||||
.icon-lg {font-size:1.33333333em;line-height:0.75em;vertical-align:-15%}
|
||||
.icon-2x {font-size:2em}
|
||||
.icon-3x {font-size:3em}
|
||||
.icon-4x {font-size:4em}
|
||||
.icon-5x {font-size:5em}
|
||||
body {padding-top:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";background:#f3f3f3;color:#405261}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5 {font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-transform:uppercase}
|
||||
h1 {font-weight:300;font-size:50px;margin-bottom:15px}
|
||||
h1 i[class^="icon-"]:before {font-size:46px}
|
||||
i[class^="icon-"].warning {color:#c84530}
|
||||
h3 {font-size:24px;font-weight:300}
|
||||
p.lead {font-size:16px;font-weight:300}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1><i class="icon-chain-broken warning"></i> Page not found</h1>
|
||||
<p class="lead">The requested page cannot be found.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
26
webservice/farmasi/phpunit.xml
Normal file
26
webservice/farmasi/phpunit.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="bootstrap/app.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./app</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
21
webservice/farmasi/public/.htaccess
Normal file
21
webservice/farmasi/public/.htaccess
Normal file
@@ -0,0 +1,21 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
BIN
webservice/farmasi/public/assets/images/rssa_logo.png
Normal file
BIN
webservice/farmasi/public/assets/images/rssa_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user