Files
streamline-emr/docker/streamline-src/database/seeders/MissingMigrationsVineSeeder.php
T
alec.turner 4a89356390 Import latest app updates from streamline
An updated set of source files and initialization was provided by streamline to
address issues observed during initial testing. These files have been updated in
order to generate a new set of app images.
2024-04-11 11:16:51 -07:00

225 lines
16 KiB
PHP

<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class MissingMigrationsVineSeeder extends Seeder {
/**
* Insert duplicate migrations for the vine instance to avoid breaks.
*
* @return void
*/
public function run() {
$arr = [
'2019_10_24_073230_create_store_stock_reconciliations_table',
'2019_10_28_100042_add_mark_up_tag_column_to_drugs',
'2019_10_28_101652_create_markup_tags_table',
'2019_11_14_103627_create_ward_treatment_dispensations_table',
'2019_11_18_084221_create_general_settings_table',
'2019_11_22_125855_create_price_list_categories_table',
'2019_11_22_130216_add_price_list_categories_to_items_tables',
'2019_11_26_141010_add_columns_to_patient_table',
'2019_11_28_100853_create_patient_appointments_table',
'2019_11_29_100542_create_cost_of_goods_table',
'2019_12_03_154628_create_eye_clinic_additional_tests_table',
'2019_12_03_154832_create_eye_clinic_base_exam_refraction_table',
'2019_12_03_154952_create_eye_clinic_main_exam_table',
'2019_12_03_161921_create_strabismuses_table',
'2019_12_11_094130_add_invoice_columns_to_quotations_table',
'2019_12_13_092025_add_show_drug_brand_name_column_to_general_settings_table',
'2019_12_16_114715_add_tracking_columns_to_deposit_tables',
'2020_01_07_104353_create_eye_glasses_table',
'2020_01_07_104840_create_ordered_eye_glasses_table',
'2020_01_07_110308_create_eye_glasses_deposits_table',
'2020_01_07_121151_add_referred_from_patient_table',
'2020_01_23_153858_add_outcome_columns_to_surgeries_table',
'2020_01_28_091637_create_stock_watcher_table',
'2020_02_05_174701_add_paid_over_column_to_patient_episodes_table',
'2020_02_28_153427_add_history_columns_to_debtor_payments_table',
'2020_03_04_170000_add_received_column_to_payments_tables',
'2020_03_05_093059_add_date_string_to_cashier_income_table',
'2020_03_06_093736_create_family_accounts_table',
'2020_03_06_093755_create_family_account_deposits_table',
'2020_03_09_091555_create_family_account_consumptions_table',
'2020_03_23_150234_add_core_column_to_chart_of_accounts_table',
'2020_03_23_154724_add_family_accounts_feature_column_to_general_settings_table',
'2020_03_25_103904_add_vendor_to_payments_table',
'2020_03_26_154858_add_hmis_columns_to_procedures_table',
'2020_03_27_081416_add_inpatient_bill_generated_to_ordered_investigations_table',
'2020_03_30_130107_add_money_receiving_and_transfer_columns_to_family_account_deposits_table',
'2020_04_01_120806_add_expense_date_to_payments_table',
'2020_04_03_021439_add_slug_column_to_wards_table',
'2020_04_06_131810_add_money_receiving_and_transfer_columns_to_family_account_consumptions_table',
'2020_04_06_131810_add_money_receiving_and_transfer_columns_to_family_account_consumptions_table',
'2020_04_07_112825_add_parent_episode_id_column_to_patient_episodes_table',
'2020_04_10_152411_create_bills_tables',
'2020_04_10_152411_create_bills_tables',
'2020_04_10_200043_add_balance_to_hospital_bills_table',
'2020_04_10_200043_add_balance_to_hospital_bills_table',
'2020_04_14_005202_add_bill_id_to_payments_table',
'2020_04_17_121717_add_bill_type_column_to_hospital_bills_table',
'2020_04_23_165808_add_chart_of_account_to_deposit_tables',
'2020_04_24_122049_rename_buying_price_column_in_sundres_table',
'2020_04_28_235909_add_other_drugs_given_and_other_drugs_cost_to_anaesthesias',
'2020_04_29_021814_add_mallampatti_score_and_asa_classification_to_anaesthesias',
'2020_04_29_190100_add_cost_price_column_to_deposit_tables',
'2020_04_29_203845_add_missing_accounts_on_existing_inventory_tables',
'2020_04_30_134429_add_add_markup_tag_id_column_to_sundries',
'2020_05_01_001512_add_expense_account_to_payments_tables',
'2020_05_01_161925_create_sundry_store_stock_reconciliations_table',
'2020_05_05_182145_add_accounts_receivable_columns_to_tables',
'2020_05_14_104618_add_directly_received_or_not_column_to_quotations_table',
'2020_05_14_115017_add_accounts_to_debts_tables',
'2020_05_16_090024_add_clearance_columns_to_invoice_and_debt_tables',
'2020_05_30_142449_add_currency_code_column_to_general_settings',
'2020_06_07_234753_create_bankings_table',
'2020_06_08_121226_create_equities_table',
'2020_06_12_110550_add_batch_quantity_current_balance_column_to_quotations_table',
'2020_06_18_090132_add_depreciation_column_to_fixed_assets_table',
'2020_06_19_150149_add_received_history_columns_to_payments_tables',
'2020_06_20_104734_add_detail_columns_to_stock_watcher_table',
'2020_06_20_231358_add_deposited_to_column_in_equities_table',
'2020_06_23_145342_add_password_days_column_to_general_settings_table',
'2020_06_24_131240_add_package_unit_related_columns_to_quotations_table',
'2020_06_25_094943_create_package_units_table',
'2020_06_25_155014_create_inpatient_ward_discounts_table',
'2020_06_26_090022_add_payment_complete_column_to_deposit_tables',
'2020_07_01_225459_add_bill_per_package_unit_column_to_quotations_table',
'2020_07_04_102819_add_item_batch_tracking_column_to_general_settings_table',
'2020_07_13_100540_add_cost_value_column_to_requisitions_table',
'2020_07_23_122037_add_co_payment_column_to_patient_discounts_table',
'2020_07_24_043604_create_staff_payment_configurations_table',
'2020_07_27_145936_create_staff_performed_services_table',
'2020_07_27_151201_add_enable_sms_column_to_general_settings_table',
'2020_07_28_085000_add_is_confirmed_column_to_patient_appointments_table',
'2020_07_29_144842_add_is_staff_paid_column_to_staff_performed_services_table',
'2020_08_10_145700_add_enable_prescription_confirmations_column_to_general_settings',
'2020_08_11_224819_add_reconciled_column_to_banking_table',
'2020_08_25_121452_add_episode_type_column_to_patient_episodes_table',
'2020_08_26_110233_create_bank_reconciliation_reports_table',
'2020_08_27_095923_create_ordered_services_table',
'2020_09_02_153545_add_enable_dispensing_unpaid_prescriptions_column_to_general_settings_table',
'2020_09_03_103231_add_memo_column_to_bank_reconciliation_report',
'2020_09_03_112048_create_price_list_markup_tags_changes_table',
'2020_09_07_171604_add_extras_used_column_to_surgeries_table',
'2020_09_09_120717_add_sundries_and_extras_used_column_to_anaesthesia_table',
'2020_09_10_094005_create_ward_stocks_table',
'2020_09_24_120443_update_chart_of_accounts',
'2020_09_28_152310_add_opening_stock_column_to_drugs_table',
'2020_09_29_104014_add_affected_account_id_column_to_store_stock_reconciliations_table',
'2020_09_29_121518_add_affected_account_id_column_to_sundry_store_stock_reconciliations_table',
'2020_09_29_121742_add_opening_stock_to_sundries_table',
'2020_09_30_054011_create_pharmacy_stock_reconciliations_table',
'2020_10_01_101117_add_extra_columns_to_staff_performed_services_table',
'2020_10_02_095937_add_reconciliation_date_column_to_store_stock_reconciliation_table',
'2020_10_02_101913_add_reconciliation_date_column_to_sundry_store_stock_reconciliations_table',
'2020_10_02_192356_add_banked_column_to_invoice_payments',
'2020_10_06_093829_add_payable_account_column_to_payment_items_table',
'2020_10_07_165049_add_price_list_category_column_to_staff_payment_configurations_table',
'2020_10_10_112342_create_ward_consultations_and_services_table',
'2020_10_10_140939_create_ward_sundry_dispensations_table',
'2020_10_10_150221_create_ward_extras_table',
'2020_10_10_171152_create_ward_procedures_table',
'2020_10_12_103612_add_staff_fee_column_to_ward_procedures_table',
'2020_10_13_104334_create_patient_payment_methods_table',
'2020_10_13_104951_add_item_amount_paid_to_hospital_bills_table',
'2020_10_14_082552_create_payment_methods_transactions_table',
'2020_10_19_120846_add_item_amounts_column_to_deposit_tables',
'2020_10_21_164344_create_journals_table',
'2020_10_22_110749_add_account_type_column_to_hospital_bills_table',
'2020_10_22_144647_add_destination_column_to_quotations_table',
'2020_10_26_100617_create_ward_bed_stays_table',
'2020_10_27_091046_create_ward_investigation_pricings_table',
'2020_10_30_093958_add_current_chart_of_account_column_to_ward_procedures_table',
'2020_10_30_094124_add_current_chart_of_account_column_to_ward_bed_stays_table',
'2020_10_30_094232_add_current_chart_of_account_column_to_ward_consultations_and_services_table',
'2020_10_30_094402_add_current_chart_of_account_column_to_ward_investigation_pricings_table',
'2020_10_30_094932_add_current_chart_of_account_column_to_ward_sundry_dispensations_table',
'2020_10_30_095020_add_current_chart_of_account_column_to_ward_treatment_dispensations_table',
'2020_11_02_094457_add_diagnoses_columns_to_anaesthesias_table',
'2020_11_02_094531_add_diagnoses_columns_to_surgeries_table',
'2020_11_03_091038_add_dispensation_date_column_to_ward_consultations_and_services_table',
'2020_11_03_091129_add_dispensation_date_column_to_ward_extras_table',
'2020_11_03_091156_add_dispensation_date_column_to_ward_procedures_table',
'2020_11_03_091239_add_dispensation_date_column_to_ward_sundry_dispensations_table',
'2020_11_03_092110_add_current_chart_of_account_column_to_ward_extras_table',
'2020_11_09_173154_add_accounting_columns_to_wards_tables',
'2020_11_10_180237_add_pricing_column_to_ward_sundry_dispensations_table',
'2020_11_10_181422_add_pricing_column_to_ward_treatment_dispensations_table',
'2020_11_13_153722_add_drugs_to_surgery_table',
'2020_12_04_183316_add_slug_to_payment_items_table',
'2020_12_07_160841_add_opening_cost_price_to_drugs_and_sundries',
'2020_12_11_113229_add_cost_of_goods_to_ward_inventory_sales_table',
'2020_12_15_161957_add_expense_tracking_column_to_patient_discounts_table',
'2020_12_17_182744_add_enable_patient_debt_reminder_column_to_general_settings_table',
'2020_12_28_144238_create_collective_bills_deposits_table',
'2021_01_12_145653_create_patient_one_off_discounts_table',
'2021_01_13_150914_add_expense_chart_of_account_column_to_ward_procedures_table',
'2021_01_20_115623_add_payment_type_column_to_fixed_assets_table',
'2021_02_25_142439_add_performed_column_to_ordered_services_table',
'2021_03_25_163512_add_setting_for_financial_year_start_date_to_hospital_information_table',
'2021_04_13_114453_create_other_incomes_table',
'2021_04_14_115454_add_affected_table_columns_to_journals_table',
'2021_04_16_121635_add_payment_method_to_other_incomes_table',
'2021_04_20_092808_add_enable_performing_unpaid_consultations_to_general_settings_table',
'2021_04_20_145335_rename_columns_in_other_incomes_table',
'2021_04_28_100125_add_drug_related_settings_to_general_settings_table',
'2021_04_28_171808_add_received_column_to_other_incomes_table',
'2021_04_29_180058_add_bill_id_to_quotations_table',
'2021_05_03_190526_create_general_items_table',
'2021_05_04_085411_add_opening_stocks_take_points_to_drugs_table',
'2021_05_04_101517_add_chi_to_general_settings_table',
'2021_05_04_152343_add_receivable_account_column_to_receivables_tables',
'2021_05_05_135657_add_patient_category_coverage_to_drugs_table',
'2021_05_06_195021_add_add_service_to_patient_total_bill_to_general_settings_table',
'2021_05_07_204111_add_is_progressive_treatment_column_to_treatments_table',
'2021_05_12_181235_add_enable_performing_unpaid_investigations_to_general_settings_table',
'2021_05_13_180430_create_general_items_stock_reconciliations',
'2021_05_19_095043_add_cashier_receipts_print_format_column_to_general_settings_table',
'2021_05_31_103241_add_receipt_number_to_family_accounts_consumption_table',
'2021_06_01_111329_add_extra_columns_to_family_accounts',
'2021_06_02_084030_add_transaction_date_to_patient_category_invoices_table',
'2021_06_25_135228_add_sale_date_and_sale_price_to_fixed_assets_table',
'2021_07_12_122723_add_patient_category_amount_column_to_central_billing_deposits_table',
'2021_07_13_165320_add_order_items_column_to_deposits_table',
'2021_08_17_164314_add_opening_stock_to_general_items_table',
'2021_08_31_170728_add_opening_cost_price_to_general_items_table',
'2021_09_24_094137_add_patient_finance_accounts_columns_to_patients_table',
'2022_03_23_165006_create_non_staff_guarantors_table',
'2022_03_24_113116_add_installation_payment_dates_and_guarantor_type_column_to_debt_plan_table',
'2022_04_25_173938_add_accounting_columns_to_dentals_table',
'2022_04_28_104314_add_accounting_columns_to_radiologies_table',
'2022_04_29_114617_rename_cancel_patient_transaction_table',
'2022_05_03_110415_create_diagnosis_categories_table',
'2022_05_03_121032_create_slit_lamp_test_areas_table',
'2022_05_03_121212_create_slit_lamp_test_area_values_table',
'2022_05_04_110448_add_columns_to_eye_glasses_table',
'2022_05_04_121143_add_eye_column_to_order_tables',
'2022_05_05_092128_add_previous_id_column_to_patients_table',
'2022_05_05_103645_add_columns_to_eye_deposits_table'
];
foreach ($arr as $record) {
DB::table('migrations')->insert(['migration' => $record, 'batch' => 35]);
}
// re-value 12 to 19 in the patient categories
DB::table('patient_category_invoices')->where('tag_id', 12)->update(['tag_id' => 19]);
DB::table('central_billing_deposits')->where('tag_id', 12)->update(['tag_id' => 19]);
DB::table('streamline_setup_steps')->where('tag_id', 12)->insert([
['step' => 'hospital registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'clinics registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'wards registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'services registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'investigations registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'drugs registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'procedures registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'sundries registration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
['step' => 'general settings configuration', 'completion_status' => 1, 'created_at' => now(), 'updated_at' => now()],
]);
}
}