mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 03:01:32 +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
82 lines
3.9 KiB
PHP
Executable File
82 lines
3.9 KiB
PHP
Executable File
<?php
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Streamline\Models\ChartOfAccount;
|
|
|
|
class ChartOfAccountsTableSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeders.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run(){
|
|
$accounts = array(
|
|
array('name' => 'Insurance Expenditure', 'type' => '2'),
|
|
array('name' => 'Insurance Income', 'type' => '1'),
|
|
array('name' => 'Utilities', 'type' => '2'),
|
|
array('name' => 'Drugs', 'type' => '1'),
|
|
array('name' => 'Sundries Cost Of Goods', 'type' => '7'),
|
|
array('name' => 'Medical Equipment', 'type' => '3'),
|
|
array('name' => 'Consultation', 'type' => '1'),
|
|
array('name' => 'Procedures', 'type' => '1'),
|
|
array('name' => 'Medico-legal', 'type' => '1'),
|
|
array('name' => 'Undeposited funds', 'type' => '4'),
|
|
array('name' => 'Investigations', 'type' => '1'),
|
|
array('name' => 'Sundries', 'type' => '1'),
|
|
array('name' => 'Salaries', 'type' => '2'),
|
|
array('name' => 'Account Payable', 'type' => '9'),
|
|
array('name' => 'Family Account deposits', 'type' => '6'),
|
|
array('name' => 'Accounts Receivables', 'type' => '8'),
|
|
array('name' => 'Drugs Cost Of Goods', 'type' => '7'),
|
|
array('name' => 'Drugs Inventory Assets', 'type' => '10'),
|
|
array('name' => 'Other Services', 'type' => '1'),
|
|
array('name' => 'Fixed Asset Depreciation', 'type' => '2'),
|
|
array('name' => 'Labs Cost Of Goods', 'type' => '2'),
|
|
array('name' => 'Radiologies Cost Of Goods', 'type' => '2'),
|
|
array('name' => 'Dentals Cost Of Goods', 'type' => '2'),
|
|
array('name' => 'Sundries Inventory Assets', 'type' => '10'),
|
|
array('name' => 'Equity Account', 'type' => '5'),
|
|
array('name' => 'Retained Earnings', 'type' => '5'),
|
|
array('name' => 'Patient Account Balance', 'type' => '6'),
|
|
array('name' => 'Opening Balance for Banks', 'type' => '5'),
|
|
array('name' => 'Opening Inventory', 'type' => '5'),
|
|
array('name' => 'Inpatient Deposits', 'type' => '1'),
|
|
array('name' => 'Opening Fixed Assets', 'type' => '5'),
|
|
array('name' => 'Opening Balance for Family Accounts', 'type' => '5'),
|
|
array('name' => 'Daily Cash Collections', 'type' => '4'),
|
|
array('name' => 'One Off Discounts', 'type' => '2'),
|
|
array('name' => 'Ward Discounts', 'type' => '2'),
|
|
array('name' => 'Stock Adjustment', 'type' => '1'),
|
|
array('name' => 'Labs Expense Account', 'type' => '2'),
|
|
array('name' => 'Radiologies Expense Account', 'type' => '2'),
|
|
array('name' => 'General Items Expense Account', 'type' => '2'),
|
|
array('name' => 'Dentals Expense Account', 'type' => '2'),
|
|
array('name' => 'Patient Dependants Expense Account', 'type' => '2'),
|
|
array('name' => 'Ward Extras Income Account', 'type' => '1'),
|
|
);
|
|
|
|
foreach ($accounts as $account) {
|
|
try {
|
|
// Prevent re-seeding the same data
|
|
$slug = str_replace(" ", "_", strtolower($account['name']));
|
|
|
|
if (get_name($slug, 'slug', 'id', 'chart_of_accounts') == 'N/A') {
|
|
ChartOfAccount::firstOrCreate([
|
|
'name' => $account['name'],
|
|
'type' => $account['type'],
|
|
'slug' => $slug,
|
|
'description' => '',
|
|
'sub_account_of' => '0',
|
|
'balance' => 0,
|
|
'core' => 1,
|
|
'created_by' => 1,
|
|
'updated_by' => 1
|
|
]);
|
|
}
|
|
} catch (\Exception $exception) {}
|
|
}
|
|
}
|
|
}
|