Files
streamline-emr/docker/_streamline-src/database/seeders/RadiologiesTableSeeder.php
T

52 lines
13 KiB
PHP
Executable File

<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Streamline\Models\Radiology;
class RadiologiesTableSeeder extends Seeder
{
/**
* Run the database seeders.
*
* @return void
*/
public function run()
{
$inventory_items = array(
array('Item_Id' => '725','Item_Name' => 'X-ray developers','Cost_Price' => '130000','Selling_Price' => '0','Quantity' => '0','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '726','Item_Name' => 'X-ray Fixer (Chemical set)','Cost_Price' => '120000','Selling_Price' => '0','Quantity' => '2','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '727','Item_Name' => 'IOPAMIDE 50ml/100mls','Cost_Price' => '80000','Selling_Price' => '0','Quantity' => '0','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '728','Item_Name' => 'Sony papers','Cost_Price' => '70000','Selling_Price' => '0','Quantity' => '0','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '729','Item_Name' => 'Swallow& Enema Barrium SO4','Cost_Price' => '0','Selling_Price' => '0','Quantity' => '0','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '730','Item_Name' => 'X-ray film 18x24cm','Cost_Price' => '120000','Selling_Price' => '0','Quantity' => '1','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '731','Item_Name' => 'X-ray film18x43cm','Cost_Price' => '250000','Selling_Price' => '0','Quantity' => '2','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '732','Item_Name' => 'X-ray film 24x30cm','Cost_Price' => '220000','Selling_Price' => '0','Quantity' => '1','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '733','Item_Name' => 'X-ray film 35x35cm','Cost_Price' => '325000','Selling_Price' => '0','Quantity' => '1','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '734','Item_Name' => 'X-ray film 35x43cm','Cost_Price' => '365000','Selling_Price' => '0','Quantity' => '1','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '735','Item_Name' => 'Andrews','Cost_Price' => '500','Selling_Price' => '0','Quantity' => '0','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL),
array('Item_Id' => '736','Item_Name' => 'Ultra-sound gel 5ltrs','Cost_Price' => '70000','Selling_Price' => '0','Quantity' => '20','Reoder_Level' => '0','Description' => '','Drug_Form' => '21','Drug_Unit' => '0','Updated_At' => '0000-00-00 00:00:00','Created_At' => '0000-00-00 00:00:00','Item_Category_Id' => '0','Supplier_Id' => '0','Prompt' => '','Patient_Info_Rukiga' => '','Patient_Info' => '','Reference_Areas' => NULL,'Reference_Name' => NULL,'Insurance_Coverage' => '0','Drug_Category' => '','Account_Id' => '0','Item_Type' => 'Radiology','Comment' => '','Restricted_Prescribing' => '','Long_Term' => '','Pharmacy_Stock' => '0','Expiry_Date' => '0000-00-00','Non_Insured_Amount' => '0','Pricing_Factor_Adult' => '0.00','Ip_Adult_Daily_Cost' => '0','Pricing_Factor_Children' => '0.00','IP_Paed_Daily_Cost' => '0','Pack' => '0.00','Strength' => '0.00','Active' => '1','Pricing_Factor_Infant' => '0.00','IP_Infant_Daily_Cost' => '0','Hssip' => '','Government_Essential' => NULL)
);
foreach ($inventory_items as $radiology):
Radiology::firstOrCreate([
"id" => $radiology['Item_Id'],
"name" => $radiology['Item_Name'],
"insurance_coverage" => $radiology['Insurance_Coverage'],
"account_id" => $radiology['Account_Id'],
"cost_price" => $radiology['Cost_Price'],
"non_insured_price" => $radiology['Selling_Price'],
"form_id" => $radiology['Drug_Form'],
"unit_id" => $radiology['Drug_Unit'],
"supplier_id" => $radiology['Supplier_Id'],
"insured_price" => 0,
"store_stock" => $radiology['Quantity'],
"pharmacy_stock" => $radiology['Pharmacy_Stock'],
"reorder_level" => $radiology['Reoder_Level'],
"description" => $radiology['Description'],
"expiry_date" => $radiology['Expiry_Date']
]);
endforeach;
}
}