mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
58 lines
1.4 KiB
PHP
Executable File
58 lines
1.4 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Streamline\Providers;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use App;
|
|
use Streamline\Models\HospitalInformation;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Streamline\Models\Triage;
|
|
use Streamline\Observers\TriageObserver;
|
|
|
|
class AppServiceProvider extends ServiceProvider {
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot() {
|
|
Schema::defaultStringLength(191);
|
|
|
|
App::singleton('hospital_information', function() {
|
|
$hospital_information = HospitalInformation::first();
|
|
return $hospital_information;
|
|
});
|
|
|
|
App::singleton('message_board', function() {
|
|
$messages = DB::table('message_board')
|
|
->orderBy('id', 'desc')
|
|
->limit(15)
|
|
->paginate(3);
|
|
return $messages;
|
|
});
|
|
|
|
Paginator::useBootstrapThree();
|
|
|
|
// for old DBs with Streamline\User
|
|
Relation::morphMap([
|
|
'Streamline\User' => 'Streamline\Models\User',
|
|
]);
|
|
|
|
Triage::observe(TriageObserver::class);
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register() {
|
|
//
|
|
}
|
|
|
|
}
|