mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 19:51:30 +00:00
updated streamline-setup v2
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'Theatre'
|
||||
];
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Theatre\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
+880
@@ -0,0 +1,880 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Theatre\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Streamline\Models\Alert;
|
||||
use Streamline\Models\Allergy;
|
||||
use Streamline\Models\Diagnosis;
|
||||
use Streamline\Models\Patient;
|
||||
use Streamline\Models\Surgery;
|
||||
use Streamline\Models\User;
|
||||
use Streamline\Models\AnaesthesiaAirway;
|
||||
use Streamline\Models\Analgesic;
|
||||
use Streamline\Models\Anaesthesia;
|
||||
use Streamline\Models\InpatientInfo;
|
||||
use Streamline\Models\OrderedProcedure;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Barryvdh\Snappy\Facades\SnappyPdf;
|
||||
use Streamline\Models\ChartOfAccount;
|
||||
use Streamline\Models\OrderedSundry;
|
||||
use Streamline\Models\Treatment;
|
||||
use Streamline\Models\VolatileLiquidAnaesthetics;
|
||||
use Streamline\Models\WardExtra;
|
||||
use Streamline\Models\WardSundryDispensation;
|
||||
use Streamline\Models\WardTreatmentDispensation;
|
||||
use Streamline\Services\WardManagement\WardTreatmentDispensationService;
|
||||
|
||||
class TheatreAnaestheticsController extends Controller {
|
||||
|
||||
public function __construct(protected WardTreatmentDispensationService $dispensationService)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index() {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create() {
|
||||
|
||||
$patient_id = session()->get('patient_id');
|
||||
$episode_id = session()->get('episode_id');
|
||||
$patient = Patient::find($patient_id);
|
||||
//check if surgery data is available for this current episode
|
||||
$surgery_done = Surgery::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->orderBy('id', 'desc')->first();
|
||||
$documents = DB::table('patient_documents')->whereNull('deleted_at')->where('patient_id', $patient_id)->orderBy('date_taken', 'desc')->take(2)->get();
|
||||
$categories = DB::table('patient_categories')->where('available', 1)->whereNull('deleted_at')->pluck("name", "id");
|
||||
$drug_categories = DB::table('drug_categories')->whereNull('deleted_at')->orderBy('name', 'asc')->get();
|
||||
//allergies and alerts
|
||||
$known_patient_allergies = Allergy::where('patient_id', $patient_id)->orderBy('created_at', 'desc')->take(2)->get();
|
||||
$known_patient_alerts = Alert::where('patient_id', $patient_id)->orderBy('created_at', 'desc')->take(2)->get();
|
||||
$drug_categories_array = DB::table('drug_categories')->whereNull('deleted_at')->pluck('name', 'id');
|
||||
//dropdown options used by the form
|
||||
$iv_fluids = DB::table('iv_fluids')->whereNull('deleted_at')->orderBy("name", "asc")->pluck("name", "id")->prepend('- select -', '')->toArray();
|
||||
$iv_fluids[0] = 'Nil';
|
||||
$procedures = DB::table('procedures')->where('available', 1)->whereNull('deleted_at')->orderBy("name", "asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
|
||||
$users = DB::table('users')->whereNull('deleted_at')->orderBy("first_name", "asc")->select("id")->get()->toArray();
|
||||
$doctors = [];
|
||||
foreach ($users as $value) {
|
||||
$user = User::find($value->id);
|
||||
if (!is_null($user)) {
|
||||
if ($user->hasRole('Doctors') || $user->hasRole('Doctor')) {
|
||||
$doctors[$value->id] = get_full_name($value->id, 'id', 'first_name', 'last_name', 'users');
|
||||
}
|
||||
}
|
||||
}
|
||||
// add --select--
|
||||
$doctors = ['' => '- select -'] + $doctors;
|
||||
$nurses = [];
|
||||
foreach ($users as $value) {
|
||||
$user = User::find($value->id);
|
||||
if (!is_null($user)) {
|
||||
if ($user->hasRole('Enrolled Nurse') || $user->hasRole('Nursing') || $user->hasRole('Nursing - Senior Ward Staff') || $user->hasRole('Specialist Nurses')) {
|
||||
$nurses[$value->id] = get_full_name($value->id, 'id', 'first_name', 'last_name', 'users');
|
||||
}
|
||||
}
|
||||
}
|
||||
// add --select--
|
||||
$nurses = ['' => '- select -'] + $nurses;
|
||||
|
||||
$anaesthesia_types = DB::table('procedures')->whereNull('deleted_at')->where('category_id', 3)->orderBy("name", "asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$anaesthesia_inductions = DB::table('anaesthesia_inductions')->whereNull('deleted_at')->orderBy("name", "asc")->pluck("name", "id");
|
||||
$anti_biotics = DB::table('drugs')->whereNull('deleted_at')->whereIn('category_id', [6, 9, 10, 11, 15, 29, 41, 94])->orderBy("name", "asc")->pluck("name", "id")->prepend('- select -', '')->toArray();
|
||||
$anti_biotics[0] = 'Nil';
|
||||
$airways = DB::table('anaesthesia_airways')->whereNull('deleted_at')->orderBy("name", "asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$anaesthesia_etts = DB::table('anaesthesia_etts')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$muscle_relaxants = DB::table('muscle_relaxants')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '')->toArray();
|
||||
$muscle_relaxants[0] = 'Nil';
|
||||
$analgesics = DB::table('analgesics')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '')->toArray();
|
||||
$analgesics[0] = 'Nil';
|
||||
$anaesthetic_agents = DB::table('anaesthetic_agents')->whereNull('deleted_at')->pluck("name", "id");
|
||||
$anaesthetic_techniques = DB::table('anaesthetic_techniques')->whereNull('deleted_at')->pluck("name", "id");
|
||||
$needle_types = DB::table('needle_types')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$drugs = DB::table('drugs')->where('available', 1)->whereNull('deleted_at')->orderBy('name')->pluck('name', 'id')->prepend('- select -', '');
|
||||
$units = DB::table('drug_units')->whereNull('deleted_at')->orderBy('name')->pluck('name', 'id')->prepend('- select -', '');
|
||||
//inpatient_row = {} no idea where it is gotten from the old streamline
|
||||
//$iv_fluid_ids = unserialize($inpatient_row["iv_fluids"]);
|
||||
$iv_fluid_ids = []; //use the unserialized value after figuring where the old streamline gets them
|
||||
//check if there exists an anaesthesia record of this episode already
|
||||
$anaesthesia_records = Anaesthesia::where(['episode_id' => $episode_id])->get();
|
||||
$sundries_array = DB::table('sundries')->whereNull('deleted_at')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$diagnoses = Diagnosis::where('available', 1)->orderby('name', 'asc')->pluck("name", "id")->prepend('- select -', '');
|
||||
$diagnoses_all = Diagnosis::select('id', 'prompts', 'reference_areas', 'reference_names')->get();
|
||||
|
||||
$hmis_categories = DB::table('hmis_categories')->whereNull('deleted_at')->orderBy('title', 'asc')->pluck('title', 'id')->toArray();
|
||||
$hmis_categories = ['' => '- select -'] + $hmis_categories;
|
||||
|
||||
$volatile_liquid_anaethetics = VolatileLiquidAnaesthetics::orderBy('name', 'asc')->pluck("name", "id");
|
||||
|
||||
return view('theatre::anaesthetics.create', compact('episode_id', 'patient_id', 'patient', 'documents', 'users', 'drugs', 'units', 'drug_categories', 'known_patient_alerts', 'known_patient_allergies', 'drug_categories_array', 'categories', 'procedures', 'anaesthesia_types', 'hmis_categories', 'anaesthesia_inductions', 'anti_biotics', 'airways', 'anaesthesia_etts', 'muscle_relaxants', 'analgesics', 'anaesthetic_agents', 'anaesthetic_techniques', 'needle_types', 'iv_fluids', 'iv_fluid_ids', 'surgery_done', 'anaesthesia_records', 'nurses', 'doctors', 'sundries_array', 'diagnoses', 'diagnoses_all', 'volatile_liquid_anaethetics'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
*/
|
||||
public function store(Request $request) : RedirectResponse
|
||||
{
|
||||
$patient_id = session()->get('patient_id');
|
||||
$episode_id = session()->get('episode_id');
|
||||
$theatre_ward_id = get_name("theatre", "slug", "id", "wards");
|
||||
|
||||
if (!is_integer($theatre_ward_id)) {
|
||||
flash('Theatre ward not registered')->error();
|
||||
return redirect()->back()->withInput();
|
||||
}
|
||||
|
||||
$procedure = $request->procedure_id;
|
||||
$anaesthetist = $request->anaesthetist;
|
||||
$time_commenced = $request->anaesthetic_commence_time;
|
||||
$checklist_confirmed_by = $request->checklist_confirmed_by;
|
||||
$anaesthesia_type = $request->anaesthesia_type;
|
||||
$induction = $request->induction ? implode(",", $request->induction) : null;
|
||||
$anaesthesia_checklist = array(
|
||||
"oxygen" => isset($request->oxygen) ? 1 : 0,
|
||||
"diazepam" => isset($request->diazepam) ? 1 : 0,
|
||||
"atropine" => isset($request->atropine) ? 1 : 0,
|
||||
"ergometrine" => isset($request->ergometrine) ? 1 : 0,
|
||||
"oxytocin" => isset($request->oxytocin) ? 1 : 0,
|
||||
"misoprostol" => isset($request->misoprostol) ? 1 : 0,
|
||||
"paracetamol" => isset($request->paracetamol) ? 1 : 0,
|
||||
"hydralazine" => isset($request->hydralazine) ? 1 : 0,
|
||||
"ephedrine" => isset($request->ephedrine) ? 1 : 0,
|
||||
"adrenaline" => isset($request->adrenaline) ? 1 : 0,
|
||||
"tranexamic_acid" => isset($request->tranexamic_acid) ? 1 : 0
|
||||
);
|
||||
$anaesthesia_checklist = serialize($anaesthesia_checklist);
|
||||
$antibiotics_array = $request->antibiotics;
|
||||
$antibiotics = implode(",", $antibiotics_array);
|
||||
$airway = $request->airway;
|
||||
$ett = $request->ett;
|
||||
$agent_used = $request->agent_used ? implode(",", $request->agent_used) : null;
|
||||
$technique = $request->technique ? implode(",", $request->technique) : null;
|
||||
|
||||
$monitoring_signs = array(
|
||||
"continuos_sao2" => isset($request->continuos_sao2) ? 1 : 0,
|
||||
"intermittent_sao2" => isset($request->intermittent_sao2) ? 1 : 0,
|
||||
"full_vital_monitor" => isset($request->full_vital_monitor) ? 1 : 0,
|
||||
"end_tidal_co2" => isset($request->end_tidal_co2) ? 1 : 0
|
||||
);
|
||||
$monitoring_signs = serialize($monitoring_signs);
|
||||
$needle_type = $request->needle_type;
|
||||
$volume_administered = $request->volume_administered;
|
||||
$muscle_relaxant = $request->muscle_relaxant;
|
||||
$analgesic = implode(",", $request->analgesic);
|
||||
$volatile_liquid_anaesthetic_used = $request->volatile_liquid_anaesthetic_used;
|
||||
|
||||
$iv_fluids = array(
|
||||
"iv_fluids" => isset($request->iv_fluid_id) ? array_filter($request->iv_fluid_id) : NULL,
|
||||
"units" => isset($request->iv_fluid_units) ? array_filter($request->iv_fluid_units) : NULL
|
||||
);
|
||||
$iv_fluids = serialize($iv_fluids);
|
||||
|
||||
$blood_given = $request->blood_given;
|
||||
$comments = $request->comments;
|
||||
$surgery_complete = $request->surgery_complete;
|
||||
$surgery_id = $request->surgery_id;
|
||||
|
||||
$inpatient_info = InpatientInfo::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->orderBy('created_at', 'desc')->first();
|
||||
|
||||
// Prepare the other drugs given and cost for storing
|
||||
$drug_ids = $request->drugs;
|
||||
|
||||
if (count($drug_ids) > 0 && $drug_ids[0] != null): // Make sure some drugs have been selected
|
||||
$doses = $request->dose;
|
||||
$units = $request->units;
|
||||
$drugs_given = [];
|
||||
$drugs_cost = [];
|
||||
$drug_quantity_used_array = $drug_frequency_array = $drug_purchased_elsewhere = $drug_eyey_array = $drug_order_comments_array = $drug_instructions_array = $drug_duration_array = [];
|
||||
|
||||
foreach ($drug_ids as $key => $value):
|
||||
$drugs_given[] = [
|
||||
'id' => $value,
|
||||
'dose' => $doses[$key],
|
||||
'unit' => $units[$key]
|
||||
];
|
||||
// Gettings the cost
|
||||
// @TODO - Check if a patient is insured or not
|
||||
$drug = DB::table('drugs')->whereNull('deleted_at')->select('non_insured_price', 'strength', 'pack')->find($value);
|
||||
|
||||
/*
|
||||
* Formula for cost
|
||||
* (Dose/DrugStrength)/DrugPack * UnitPrice
|
||||
*/
|
||||
if ($drug) {
|
||||
$drugs_cost[] = (($doses[$key] / $drug->strength) / $drug->pack) * $drug->non_insured_price;
|
||||
$drug_quantity_used = ($doses[$key] / $drug->strength) / $drug->pack;
|
||||
reduce_ward_stock_with_consumed_quantity($value, $drug_quantity_used, 1, $theatre_ward_id, $patient_id, $episode_id, null);
|
||||
|
||||
$drug_quantity_used_array[] = $drug_quantity_used;
|
||||
$drug_frequency_array[] = "";
|
||||
$drug_purchased_elsewhere[] = "";
|
||||
$drug_eyey_array[] = "";
|
||||
$drug_order_comments_array[] = "";
|
||||
$drug_instructions_array[] = "";
|
||||
$drug_duration_array[] = "";
|
||||
}
|
||||
endforeach;
|
||||
|
||||
$drugs_given_serial = serialize($drugs_given);
|
||||
$drugs_cost_serial = serialize($drugs_cost);
|
||||
|
||||
if ($inpatient_info){
|
||||
// make treatment record for billing
|
||||
for ($i=0; $i < count($drug_ids) ; $i++) {
|
||||
if (isset($drug_quantity_used_array[$i]) && isset( $drug_ids[$i])) {
|
||||
$ward_treatment_id = $this->dispensationService->saveDispensation((int)$patient_id, (int)$episode_id, $drug_ids[$i], (int)$drug_quantity_used_array[$i],
|
||||
0, $request->ward_id ?? 0);
|
||||
}
|
||||
}
|
||||
} else{
|
||||
// bill drugs as opd treatment
|
||||
$treatment = new Treatment;
|
||||
$treatment->patient_id = $patient_id;
|
||||
$treatment->episode_id = $episode_id;
|
||||
$treatment->drugs = implode(',', $drug_ids);
|
||||
$treatment->doses = implode(',', $doses);
|
||||
$treatment->frequencies = implode(',', $drug_frequency_array);
|
||||
$treatment->durations = implode(',', $drug_duration_array);
|
||||
$treatment->quantities_dispensed = implode(',', $drug_quantity_used_array);
|
||||
$treatment->instruction = implode(',', $drug_instructions_array);
|
||||
$treatment->purchased_elsewhere = implode(',', $drug_purchased_elsewhere);
|
||||
$treatment->dispense_status = 0;
|
||||
$treatment->eye = implode(",", $drug_eyey_array);
|
||||
$treatment->order_comments = "";
|
||||
$treatment->created_by = auth()->user()->id;
|
||||
$treatment->save();
|
||||
|
||||
//do this for sundries to be billed
|
||||
$sundry_used_array = $request->sundries_used;
|
||||
$sundry_quantity_array = $request->sundries_quantity_used;
|
||||
for ($i=0; $i < count($sundry_used_array); $i++) {
|
||||
if (!is_null($sundry_used_array[$i])) {
|
||||
$ordered_sundry_objects = OrderedSundry::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->where('sundries_id',$sundry_used_array[$i])->get();
|
||||
|
||||
if (count($ordered_sundry_objects) > 0) {
|
||||
foreach ($ordered_sundry_objects as $sundry_to_update) {
|
||||
$sundry_to_update->quantity = $sundry_quantity_array[$i];
|
||||
$sundry_to_update->payment_status = 0;
|
||||
$sundry_to_update->update();
|
||||
}
|
||||
} else {
|
||||
$ordered_sundry = new OrderedSundry;
|
||||
$ordered_sundry->patient_id = $patient_id;
|
||||
$ordered_sundry->episode_id = $episode_id;
|
||||
$ordered_sundry->sundries_id = $sundry_used_array[$i];
|
||||
$ordered_sundry->quantity = $sundry_quantity_array[$i];
|
||||
$ordered_sundry->payment_status = 0;
|
||||
$ordered_sundry->created_by = Auth::id();
|
||||
$ordered_sundry->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else:
|
||||
$drugs_given_serial = null;
|
||||
$drugs_cost_serial = null;
|
||||
endif;
|
||||
|
||||
if ($inpatient_info){
|
||||
//do this for sundries orders billing
|
||||
$ward_sundries_ids_array = $request->sundries_used;
|
||||
$ward_sundries_quantities_array = $request->sundries_quantity_used;
|
||||
|
||||
if (is_array($ward_sundries_ids_array)) {
|
||||
for ($j = 0; $j < count($ward_sundries_ids_array); $j++) {
|
||||
// only save if the dispensed drug quantity is not null
|
||||
if (!is_null($ward_sundries_quantities_array[$j])) {
|
||||
$ward_sundry_dispensations = new WardSundryDispensation;
|
||||
$ward_sundry_dispensations->patient_id = $patient_id;
|
||||
$ward_sundry_dispensations->episode_id = $episode_id;
|
||||
$ward_sundry_dispensations->sundry_id = $ward_sundries_ids_array[$j];
|
||||
$ward_sundry_dispensations->quantity_given = $ward_sundries_quantities_array[$j];
|
||||
$ward_sundry_dispensations->ward_id = $inpatient_info->ward_id;
|
||||
$ward_sundry_dispensations->created_by = Auth::id();
|
||||
$ward_sundry_dispensations->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$extra_items_array = $request->extras_used;
|
||||
$extra_costs_array = $request->extras_cost;
|
||||
|
||||
$ward_extras_income_account = ChartOfAccount::where('slug', 'ward_extras_income_account')->first();
|
||||
|
||||
if (is_array($extra_items_array)) {
|
||||
for ($k = 0; $k < count($extra_items_array); $k++) {
|
||||
// only save if the dispensed drug quantity is not null
|
||||
if (!is_null($extra_items_array[$k])) {
|
||||
$ward_extra = new WardExtra;
|
||||
$ward_extra->patient_id = $patient_id;
|
||||
$ward_extra->episode_id = $episode_id;
|
||||
$ward_extra->extra_item = $extra_items_array[$k];
|
||||
$ward_extra->extra_cost = $extra_costs_array[$k];
|
||||
$ward_extra->current_chart_of_account = !is_null($ward_extras_income_account) ? $ward_extras_income_account->id : 0;
|
||||
$ward_extra->ward_id = $inpatient_info->ward_id;
|
||||
$ward_extra->created_by = Auth::id();
|
||||
$ward_extra->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$anaesthesia_record = New Anaesthesia;
|
||||
|
||||
//record into anaesthesia table
|
||||
$anaesthesia_record->episode_id = $episode_id;
|
||||
$anaesthesia_record->patient_id = $patient_id;
|
||||
$anaesthesia_record->procedure_id = $procedure;
|
||||
$anaesthesia_record->surgery_id = ($surgery_complete) ? $surgery_id : NULL;
|
||||
$anaesthesia_record->anaesthetist = $anaesthetist;
|
||||
$anaesthesia_record->time_commenced = $time_commenced;
|
||||
$anaesthesia_record->primary_diagnosis = $request->primary_diagnosis;
|
||||
$anaesthesia_record->other_diagnoses = serialize($request->other_diagnosis);
|
||||
$anaesthesia_record->checklist_confirmed_by = $checklist_confirmed_by;
|
||||
$anaesthesia_record->anaesthesia_type = $anaesthesia_type;
|
||||
$anaesthesia_record->induction = $induction;
|
||||
$anaesthesia_record->anaesthesia_checklist = $anaesthesia_checklist;
|
||||
$anaesthesia_record->antibiotics = $antibiotics;
|
||||
$anaesthesia_record->airway = $airway;
|
||||
$anaesthesia_record->ETT = $ett;
|
||||
$anaesthesia_record->agent_used = $agent_used;
|
||||
$anaesthesia_record->technique = $technique;
|
||||
$anaesthesia_record->monitoring_signs = $monitoring_signs;
|
||||
$anaesthesia_record->needle_type = $needle_type;
|
||||
$anaesthesia_record->volume_administered = $volume_administered;
|
||||
$anaesthesia_record->muscle_relaxant = $muscle_relaxant;
|
||||
$anaesthesia_record->analgesic = $analgesic;
|
||||
$anaesthesia_record->volatile_liquid_anaethetics = $request->volatile_liquid_anaethetics;
|
||||
$anaesthesia_record->volatile_liquid_anaesthetic_used = $volatile_liquid_anaesthetic_used;
|
||||
$anaesthesia_record->iv_fluids = $iv_fluids;
|
||||
$anaesthesia_record->blood_given = $blood_given;
|
||||
$anaesthesia_record->comments = $comments;
|
||||
$anaesthesia_record->other_drugs_given = $drugs_given_serial;
|
||||
$anaesthesia_record->other_drugs_cost = $drugs_cost_serial;
|
||||
$anaesthesia_record->mallampati_score = $request->mallampati_score;
|
||||
$anaesthesia_record->asa_classification = $request->asa_classification;
|
||||
|
||||
$extras_array = $request->extras_used;
|
||||
$extras_cost_array = $request->extras_cost;
|
||||
$unserialized_extras_array = array(
|
||||
"extras" => $extras_array,
|
||||
"cost" => $extras_cost_array
|
||||
);
|
||||
$anaesthesia_record->extras_used = serialize($unserialized_extras_array);
|
||||
|
||||
$sundry_used_array = $request->sundries_used;
|
||||
$sundry_quantity_array = $request->sundries_quantity_used;
|
||||
$unserialized_sundries_array = array(
|
||||
"sundries" => $sundry_used_array,
|
||||
"quantity" => $sundry_quantity_array
|
||||
);
|
||||
|
||||
for ($i=0; $i < count($sundry_used_array) ; $i++) {
|
||||
reduce_ward_stock_with_consumed_quantity($sundry_used_array[$i], $sundry_quantity_array[$i], 2, $theatre_ward_id, $patient_id, $episode_id, null);
|
||||
}
|
||||
|
||||
$anaesthesia_record->sundries_used = serialize($unserialized_sundries_array);
|
||||
|
||||
$anaesthesia_record->created_by = Auth::id();
|
||||
$save_anaesthesia_record = $anaesthesia_record->save();
|
||||
|
||||
if ($save_anaesthesia_record) {
|
||||
// save the procedure info in inpatient or OPD if surgery is not complete
|
||||
/* i have commented out the if stmt coz i dt remember why we needed to check if surgery is done or not before saving the procedure in the rescpective table */
|
||||
//if (!$surgery_complete){
|
||||
$inpatient_info = InpatientInfo::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->orderBy('created_at', 'desc')->first();
|
||||
|
||||
if ($inpatient_info) {
|
||||
//check_if_there_are_exisiting_procedures and add the new ones instead of over riding them
|
||||
if (!is_null($inpatient_info->procedures) && $inpatient_info->procedures != '') {
|
||||
$unserialized_procedures_array = unserialize($inpatient_info->procedures);
|
||||
$unserialized_procedures_array[] = $anaesthesia_type;
|
||||
$inpatient_info->procedures = serialize($unserialized_procedures_array);
|
||||
} else {
|
||||
$inpatient_info->procedures = serialize([$anaesthesia_type]);
|
||||
}
|
||||
|
||||
// procedure_done_by
|
||||
if(!is_null($inpatient_info->procedures_done_by) && $inpatient_info->procedures_done_by != ''){
|
||||
$procedures_done_by_array = @unserialize($inpatient_info->procedures_done_by);
|
||||
$procedures_done_by_array[] = $request->anaesthetist;
|
||||
$inpatient_info->procedures_done_by = serialize($procedures_done_by_array);
|
||||
} else {
|
||||
$inpatient_info->procedures_done_by = serialize([$request->anaesthetist]);
|
||||
}
|
||||
|
||||
// procedure_hospital_fee
|
||||
if(!is_null($inpatient_info->procedure_hospital_fee) && $inpatient_info->procedure_hospital_fee != ''){
|
||||
$procedures_hospital_fee_array = @unserialize($inpatient_info->procedure_hospital_fee);
|
||||
$procedures_hospital_fee_array[] = get_name($anaesthesia_type, "id", "non_insured_price", "procedures");
|
||||
$inpatient_info->procedure_hospital_fee = serialize($procedures_hospital_fee_array);
|
||||
} else {
|
||||
$inpatient_info->procedure_hospital_fee = serialize([0]);
|
||||
}
|
||||
|
||||
// procedure_staff_fee
|
||||
if(!is_null($inpatient_info->procedure_staff_fee) && $inpatient_info->procedure_staff_fee != ''){
|
||||
$procedures_staff_fee_array = @unserialize($inpatient_info->procedure_staff_fee);
|
||||
$procedures_staff_fee_array[] = 0;
|
||||
$inpatient_info->procedure_staff_fee = serialize($procedures_staff_fee_array);
|
||||
} else {
|
||||
$inpatient_info->procedure_staff_fee = serialize([0]);
|
||||
}
|
||||
|
||||
$inpatient_info->updated_by = Auth::id();
|
||||
$inpatient_info->save();
|
||||
} else {
|
||||
$procedure_performed_id = record_staff_that_has_performed_the_service($patient_id, $episode_id, 1, $anaesthesia_type, 0, $request->anaesthetist);
|
||||
|
||||
$ordered_procedure = new OrderedProcedure;
|
||||
$ordered_procedure->patient_id = $patient_id;
|
||||
$ordered_procedure->episode_id = $episode_id;
|
||||
$ordered_procedure->procedure_id = $anaesthesia_type;
|
||||
$ordered_procedure->payment_status = 0;
|
||||
$ordered_procedure->performed = 1;
|
||||
$ordered_procedure->performed_id = $procedure_performed_id;
|
||||
$ordered_procedure->created_by = Auth::id();
|
||||
$ordered_procedure->save();
|
||||
}
|
||||
//}
|
||||
// if surgery was completed, update the anaesthesia_id
|
||||
if ($surgery_complete) {
|
||||
// update anaesthesia table with surgery_id
|
||||
$update = DB::table('surgeries')->where('id', $surgery_id)->update([
|
||||
"anaesthesia_id" => $anaesthesia_record->id
|
||||
]);
|
||||
}
|
||||
|
||||
flash('Anaesthesia has been saved')->success();
|
||||
return redirect('anaesthetics/history');
|
||||
} else {
|
||||
flash('There was an error')->error();
|
||||
return redirect()->back()->withInput();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id) {
|
||||
|
||||
$anaesthesia_record = Anaesthesia::find($id);
|
||||
|
||||
$patient_id = $anaesthesia_record->patient_id;
|
||||
$episode_id = $anaesthesia_record->episode_id;
|
||||
$patient = Patient::find($patient_id);
|
||||
$surgery_done = Surgery::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->orderBy('id', 'desc')->first();
|
||||
$documents = DB::table('patient_documents')->whereNull('deleted_at')->where('patient_id', $patient_id)->orderBy('date_taken', 'desc')->take(2)->get();
|
||||
$categories = DB::table('patient_categories')->where('available', 1)->whereNull('deleted_at')->pluck("name", "id");
|
||||
$drug_categories = DB::table('drug_categories')->whereNull('deleted_at')->orderBy('name', 'asc')->get();
|
||||
//allergies and alerts
|
||||
$known_patient_allergies = Allergy::where('patient_id', $patient_id)->orderBy('created_at', 'desc')->take(2)->get();
|
||||
$known_patient_alerts = Alert::where('patient_id', $patient_id)->orderBy('created_at', 'desc')->take(2)->get();
|
||||
$drug_categories_array = DB::table('drug_categories')->whereNull('deleted_at')->pluck('name', 'id');
|
||||
|
||||
//$inpatient_info or $ordered_procedure
|
||||
$ordered_procedure = OrderedProcedure::where(['episode_id' => $episode_id])->get();
|
||||
$inpatient_info = InpatientInfo::where(['episode_id' => $episode_id])->get();
|
||||
return view('theatre::anaesthetics.show', compact('episode_id', 'patient_id', 'patient', 'documents', 'drug_categories', 'known_patient_alerts', 'known_patient_allergies', 'drug_categories_array', 'categories', 'anaesthesia_record', 'ordered_procedure', 'inpatient_info'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id) {
|
||||
$anaesthesia_record = Anaesthesia::find($id);
|
||||
$patient_id = $anaesthesia_record->patient_id;
|
||||
$episode_id = $anaesthesia_record->episode_id;
|
||||
$patient = Patient::find($patient_id);
|
||||
//check if surgery data is available for this current episode
|
||||
$surgery_done = Surgery::where(['patient_id' => $patient_id, 'episode_id' => $episode_id])->orderBy('id', 'desc')->first();
|
||||
$documents = DB::table('patient_documents')->whereNull('deleted_at')->where('patient_id',$patient_id)->orderBy('date_taken','desc')->take(2)->get();
|
||||
$categories = DB::table('patient_categories')->where('available', 1)->whereNull('deleted_at')->pluck("name", "id");
|
||||
$drug_categories = DB::table('drug_categories')->whereNull('deleted_at')->orderBy('name','asc')->get();
|
||||
//allergies and alerts
|
||||
$known_patient_allergies = Allergy::where('patient_id' , $patient_id)->orderBy('created_at','desc')->take(2)->get();
|
||||
$known_patient_alerts = Alert::where('patient_id', $patient_id)->orderBy('created_at','desc')->take(2)->get();
|
||||
$drug_categories_array = DB::table('drug_categories')->whereNull('deleted_at')->pluck('name', 'id');
|
||||
//dropdown options used by the form
|
||||
$iv_fluids = DB::table('iv_fluids')->whereNull('deleted_at')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$procedures = DB::table('procedures')->whereNull('deleted_at')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
|
||||
$users = DB::table('users')->orderBy("first_name","asc")->whereNull('deleted_at')->select("id")->get()->toArray();
|
||||
$doctors = [];
|
||||
$all_staff = [];
|
||||
foreach ($users as $value){
|
||||
$user = User::find($value->id);
|
||||
if(!is_null($user)){
|
||||
if ($user->hasRole('doctors') || $user->hasRole('doctor')) {
|
||||
$doctors[$value->id] = get_full_name($value->id, 'id', 'first_name', 'last_name', 'users');
|
||||
}
|
||||
$all_staff[$value->id] = get_full_name($value->id, 'id', 'first_name', 'last_name', 'users');
|
||||
}
|
||||
}
|
||||
// add --select--
|
||||
$doctors = ['' => '- select -'] + $doctors;
|
||||
$all_staff = ['' => '- select -'] + $all_staff;
|
||||
$nurses = [];
|
||||
foreach ($users as $value){
|
||||
$user = User::find($value->id);
|
||||
if(!is_null($user)){
|
||||
if ($user->hasRole('Enrolled Nurse') || $user->hasRole('Nursing') || $user->hasRole('Nursing - Senior Ward Staff') || $user->hasRole('Specialist Nurses')) {
|
||||
$nurses[$value->id] = get_full_name($value->id, 'id', 'first_name', 'last_name', 'users');
|
||||
}
|
||||
}
|
||||
}
|
||||
// add --select--
|
||||
$nurses = ['' => '- select -'] + $nurses;
|
||||
|
||||
$anaesthesia_types = DB::table('procedures')->whereNull('deleted_at')->where('category_id',3)->whereNotNull('slug')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$anaesthesia_inductions = DB::table('anaesthesia_inductions')->whereNull('deleted_at')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$anti_biotics = DB::table('drugs')->whereNull('deleted_at')->whereIn('category_id', [6, 9, 10, 11, 15, 29, 41, 94])->orderBy("name", "asc")->pluck("name", "id")->prepend('- select -', '')->toArray();
|
||||
$anti_biotics[0] = 'Nil';
|
||||
$airways = DB::table('anaesthesia_airways')->whereNull('deleted_at')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$anaesthesia_etts = DB::table('anaesthesia_etts')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$muscle_relaxants = DB::table('muscle_relaxants')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$analgesics = DB::table('analgesics')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$anaesthetic_agents = DB::table('anaesthetic_agents')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$anaesthetic_techniques = DB::table('anaesthetic_techniques')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
$needle_types = DB::table('needle_types')->whereNull('deleted_at')->pluck("name", "id")->prepend('- select -', '');
|
||||
//inpatient_row = {} no idea where it is gotten from the old streamline
|
||||
//$iv_fluid_ids = unserialize($inpatient_row["iv_fluids"]);
|
||||
$iv_fluid_ids = [];
|
||||
$users = User::orderBy('first_name')->select("id", "first_name", "last_name")->get();
|
||||
$sundries_array = DB::table('sundries')->whereNull('deleted_at')->orderBy("name","asc")->pluck("name", "id")->prepend('- select -', '');
|
||||
$drugs = DB::table('drugs')->where('available', 1)->whereNull('deleted_at')->orderBy('name')->pluck('name', 'id')->prepend('- select -', '');
|
||||
$units = DB::table('drug_units')->whereNull('deleted_at')->orderBy('name')->pluck('name', 'id')->prepend('- select -', '');
|
||||
$diagnoses = Diagnosis::where('available', 1)->orderBy('name', 'asc')->pluck("name", "id")->prepend('- select -', '');
|
||||
$diagnoses_all = Diagnosis::select('id', 'prompts', 'reference_areas', 'reference_names')->get();
|
||||
$volatile_liquid_anaethetics = VolatileLiquidAnaesthetics::orderBy('name', 'asc')->pluck("name", "id");
|
||||
|
||||
return view('theatre::anaesthetics.edit',compact('anaesthesia_record','episode_id','patient_id','patient','documents','users','drug_categories','known_patient_alerts','known_patient_allergies','drug_categories_array','categories','procedures','anaesthesia_types','anaesthesia_inductions','anti_biotics','airways','anaesthesia_etts','muscle_relaxants','analgesics','anaesthetic_agents','anaesthetic_techniques','needle_types','iv_fluids','iv_fluid_ids','surgery_done', 'nurses','doctors','all_staff','sundries_array','drugs','units', 'diagnoses', 'diagnoses_all', 'volatile_liquid_anaethetics'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id) {
|
||||
$anaesthesia_record = Anaesthesia::find($id);
|
||||
|
||||
$procedure = $request->procedure_id;
|
||||
$anaesthetist = $request->anaesthetist;
|
||||
$time_commenced = $request->anaesthetic_commence_time; //date("H:i", strtotime($row['time_d'])); anaesthetic_commence_time
|
||||
$checklist_confirmed_by = $request->checklist_confirmed_by;
|
||||
$anaesthesia_type = $request->anaesthesia_type;
|
||||
$induction = $request->induction ? implode($request->induction) : null;
|
||||
$anaesthesia_checklist = array(
|
||||
"oxygen" => isset($request->oxygen) ? 1 : 0,
|
||||
"diazepam" => isset($request->diazepam) ? 1 : 0,
|
||||
"atropine" => isset($request->atropine) ? 1 : 0,
|
||||
"ergometrine" => isset($request->ergometrine) ? 1 : 0,
|
||||
"oxytocin" => isset($request->oxytocin) ? 1 : 0,
|
||||
"misoprostol" => isset($request->misoprostol) ? 1 : 0,
|
||||
"paracetamol" => isset($request->paracetamol) ? 1 : 0,
|
||||
"hydralazine" => isset($request->hydralazine) ? 1 : 0,
|
||||
"ephedrine" => isset($request->ephedrine) ? 1 : 0,
|
||||
"adrenaline" => isset($request->adrenaline) ? 1 : 0,
|
||||
"tranexamic_acid" => isset($request->tranexamic_acid) ? 1 : 0
|
||||
);
|
||||
$anaesthesia_checklist = serialize($anaesthesia_checklist);
|
||||
$antibiotics_array = $request->antibiotics;
|
||||
$antibiotics = implode(",", $antibiotics_array);
|
||||
$airway = $request->airway;
|
||||
$ett = $request->ett;
|
||||
$agent_used = is_array($request->agent_used) ? implode(",", $request->agent_used) : null;
|
||||
$technique = is_array($request->technique) ? implode(",", $request->technique) : null;
|
||||
|
||||
$monitoring_signs = array(
|
||||
"continuos_sao2" => isset($request->continuos_sao2) ? 1 : 0,
|
||||
"intermittent_sao2" => isset($request->intermittent_sao2) ? 1 : 0,
|
||||
"full_vital_monitor" => isset($request->full_vital_monitor) ? 1 : 0,
|
||||
"end_tidal_co2" => isset($request->end_tidal_co2) ? 1 : 0
|
||||
);
|
||||
$monitoring_signs = serialize($monitoring_signs);
|
||||
$needle_type = $request->needle_type;
|
||||
$volume_administered = $request->volume_administered;
|
||||
$muscle_relaxant = $request->muscle_relaxant;
|
||||
$analgesic = is_array($request->analgesic) ? implode(",", $request->analgesic) : null;
|
||||
$volatile_liquid_anaesthetic_used = $request->volatile_liquid_anaesthetic_used;
|
||||
|
||||
$iv_fluids = array(
|
||||
"iv_fluids" => isset($request->iv_fluid_id) ? array_filter($request->iv_fluid_id) : NULL,
|
||||
"units" => isset($request->iv_fluid_units) ? array_filter($request->iv_fluid_units) : NULL
|
||||
);
|
||||
$iv_fluids = serialize($iv_fluids);
|
||||
|
||||
$blood_given = $request->blood_given;
|
||||
$comments = $request->comments;
|
||||
$surgery_complete = $request->surgery_complete;
|
||||
|
||||
$surgery_id = $request->surgery_id;
|
||||
|
||||
// Prepare the other drugs given and cost for storing
|
||||
$drug_ids = $request->drugs;
|
||||
|
||||
if (count($drug_ids) > 0 && $drug_ids[0] != null): // Make sure some drugs have been selected
|
||||
$doses = $request->dose;
|
||||
$units = $request->units;
|
||||
$drugs_given = [];
|
||||
$drugs_cost = [];
|
||||
|
||||
foreach ($drug_ids as $key => $value):
|
||||
$drugs_given[] = [
|
||||
'id' => $value,
|
||||
'dose' => $doses[$key],
|
||||
'unit' => $units[$key]
|
||||
];
|
||||
// Gettings the cost
|
||||
// @TODO - Check if a patient is insured or not
|
||||
$drug = DB::table('drugs')->select('non_insured_price', 'strength', 'pack')->find($value);
|
||||
|
||||
/*
|
||||
* Formula for cost
|
||||
* (Dose/DrugStrength)/DrugPack * UnitPrice
|
||||
*/
|
||||
$drugs_cost[] = (($doses[$key] / $drug->strength) / $drug->pack) * $drug->non_insured_price;
|
||||
endforeach;
|
||||
|
||||
$drugs_given_serial = serialize($drugs_given);
|
||||
$drugs_cost_serial = serialize($drugs_cost);
|
||||
else:
|
||||
$drugs_given_serial = null;
|
||||
$drugs_cost_serial = null;
|
||||
endif;
|
||||
|
||||
//record into anaesthesia table
|
||||
$anaesthesia_record->procedure_id = $procedure;
|
||||
$anaesthesia_record->surgery_id = ($surgery_complete) ? $surgery_id : NULL;
|
||||
$anaesthesia_record->anaesthetist = $anaesthetist;
|
||||
$anaesthesia_record->time_commenced = $time_commenced;
|
||||
$anaesthesia_record->checklist_confirmed_by = $checklist_confirmed_by;
|
||||
$anaesthesia_record->anaesthesia_type = $anaesthesia_type;
|
||||
$anaesthesia_record->induction = $induction;
|
||||
$anaesthesia_record->anaesthesia_checklist = $anaesthesia_checklist;
|
||||
$anaesthesia_record->antibiotics = $antibiotics;
|
||||
$anaesthesia_record->airway = $airway;
|
||||
$anaesthesia_record->ETT = $ett;
|
||||
$anaesthesia_record->agent_used = $agent_used;
|
||||
$anaesthesia_record->technique = $technique;
|
||||
$anaesthesia_record->monitoring_signs = $monitoring_signs;
|
||||
$anaesthesia_record->needle_type = $needle_type;
|
||||
$anaesthesia_record->volume_administered = $volume_administered;
|
||||
$anaesthesia_record->muscle_relaxant = $muscle_relaxant;
|
||||
$anaesthesia_record->analgesic = $analgesic;
|
||||
$anaesthesia_record->volatile_liquid_anaethetics = $request->volatile_liquid_anaethetics;
|
||||
$anaesthesia_record->volatile_liquid_anaesthetic_used = $volatile_liquid_anaesthetic_used;
|
||||
$anaesthesia_record->iv_fluids = $iv_fluids;
|
||||
$anaesthesia_record->blood_given = $blood_given;
|
||||
$anaesthesia_record->comments = $comments;
|
||||
$anaesthesia_record->other_drugs_given = $drugs_given_serial;
|
||||
$anaesthesia_record->other_drugs_cost = $drugs_cost_serial;
|
||||
$anaesthesia_record->mallampati_score = $request->mallampati_score;
|
||||
$anaesthesia_record->asa_classification = $request->asa_classification;
|
||||
|
||||
$extras_array = $request->extras_used;
|
||||
$extras_cost_array = $request->extras_cost;
|
||||
$unserialized_extras_array = array(
|
||||
"extras" => $extras_array,
|
||||
"cost" => $extras_cost_array
|
||||
);
|
||||
$anaesthesia_record->extras_used = serialize($unserialized_extras_array);
|
||||
|
||||
$sundry_used_array = $request->sundries_used;
|
||||
$sundry_quantity_array = $request->sundries_quantity_used;
|
||||
$unserialized_sundries_array = array(
|
||||
"sundries" => $sundry_used_array,
|
||||
"quantity" => $sundry_quantity_array
|
||||
);
|
||||
$anaesthesia_record->sundries_used = serialize($unserialized_sundries_array);
|
||||
$anaesthesia_record->created_by = Auth::id();
|
||||
$save_anaesthesia_record = $anaesthesia_record->update();
|
||||
|
||||
if ($save_anaesthesia_record) {
|
||||
/* check if this episode exists in the inpatient_info then add/update anaesthesia_type into procedures column,else add anaesthesia_type into ordered_procedures */
|
||||
flash('Anaesthesia has been updated')->success();
|
||||
return redirect('anaesthetics/history');
|
||||
} else {
|
||||
flash('There was an error')->error();
|
||||
return redirect()->back()->withInput();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id) {
|
||||
//
|
||||
}
|
||||
|
||||
/* get procedure slug */
|
||||
|
||||
public function get_procedure_slug(Request $request) {
|
||||
$procedure_id = $request->procedure_id;
|
||||
$slug = get_name($procedure_id, 'id', 'slug', 'procedures');
|
||||
return $slug;
|
||||
}
|
||||
|
||||
/* add a new doctor to the users table */
|
||||
|
||||
public function add_new_doctor_or_nurse(Request $request) {
|
||||
$user = new User;
|
||||
$user->first_name = $request->fname;
|
||||
$user->last_name = $request->lname;
|
||||
$user->username = $request->fname . $request->lname;
|
||||
//$set_url = str_replace(url('/'), '', url()->current());
|
||||
//if($set_url == '/add_new_doctor') add user category of doctor
|
||||
//if($set_url == '/add_new_nurse') add user category of nurse
|
||||
if ($user->save()) {
|
||||
$last_inserted_id = $user->id;
|
||||
return $last_inserted_id;
|
||||
}
|
||||
return 'error occurred';
|
||||
}
|
||||
|
||||
/* add new airway */
|
||||
|
||||
public function add_new_airway(Request $request) {
|
||||
$airway = new AnaesthesiaAirway;
|
||||
$airway->name = $request->name;
|
||||
$airway->created_by = Auth::id();
|
||||
if ($airway->save()) {
|
||||
$last_inserted_id = $airway->id;
|
||||
return $last_inserted_id;
|
||||
}
|
||||
return 'error occurred';
|
||||
}
|
||||
|
||||
/* add new analgesic */
|
||||
|
||||
public function add_new_analgesic(Request $request) {
|
||||
$analgesic = new Analgesic;
|
||||
$analgesic->name = $request->name;
|
||||
$analgesic->created_by = Auth::id();
|
||||
if ($analgesic->save()) {
|
||||
$last_inserted_id = $analgesic->id;
|
||||
return $last_inserted_id;
|
||||
}
|
||||
return 'error occurred';
|
||||
}
|
||||
|
||||
public function history() {
|
||||
$patient_id = session()->get('patient_id');
|
||||
$episode_id = session()->get('episode_id');
|
||||
$patient = Patient::find($patient_id);
|
||||
|
||||
$documents = DB::table('patient_documents')->whereNull('deleted_at')->where('patient_id', $patient_id)->orderBy('date_taken', 'desc')->take(2)->get();
|
||||
$categories = DB::table('patient_categories')->where('available', 1)->whereNull('deleted_at')->pluck("name", "id");
|
||||
$drug_categories = DB::table('drug_categories')->whereNull('deleted_at')->orderBy('name', 'asc')->get();
|
||||
//allergies and alerts
|
||||
$known_patient_allergies = Allergy::where('patient_id', $patient_id)->orderBy('created_at', 'desc')->take(2)->get();
|
||||
$known_patient_alerts = Alert::where('patient_id', $patient_id)->orderBy('created_at', 'desc')->take(2)->get();
|
||||
$drug_categories_array = DB::table('drug_categories')->whereNull('deleted_at')->pluck('name', 'id');
|
||||
$users = DB::table('users')->whereNull('deleted_at')->orderBy("first_name", "asc")->pluck("first_name", "id")->prepend('- select -', '');
|
||||
|
||||
$anaesthesia_records = Anaesthesia::where(['episode_id' => $episode_id])->get();
|
||||
return view('theatre::anaesthetics.history', compact('episode_id', 'patient_id', 'patient', 'documents', 'users', 'drug_categories', 'known_patient_alerts', 'known_patient_allergies', 'drug_categories_array', 'categories', 'anaesthesia_records'));
|
||||
}
|
||||
|
||||
public function view_history($id) {
|
||||
|
||||
$anaesthesia = Anaesthesia::find($id);
|
||||
|
||||
$patient_id = $anaesthesia->patient_id;
|
||||
$episode_id = $anaesthesia->episode_id;
|
||||
|
||||
$patient = Patient::find($patient_id);
|
||||
$diagnoses = DB::table('diagnoses')->where('available', 1)->whereNull('deleted_at')->orderBy('name')->pluck("name", "id")->prepend('- select -', '');
|
||||
|
||||
return view('theatre::anaesthetics.view_history', compact('patient_id', 'episode_id', 'patient', 'anaesthesia', 'diagnoses', 'id'));
|
||||
}
|
||||
|
||||
public function anaesthesia_print($anaesthesia_id)
|
||||
{
|
||||
$anaesthesia = Anaesthesia::withTrashed()->find($anaesthesia_id);
|
||||
if (!$anaesthesia) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$patient_id = $anaesthesia->patient_id;
|
||||
$episode_id = $anaesthesia->episode_id;
|
||||
|
||||
$patient = Patient::find($patient_id);
|
||||
$hospitalInfo = DB::table('hospital_information')->find(1);
|
||||
$diagnoses = DB::table('diagnoses')->where('available', 1)->whereNull('deleted_at')->orderBy('name')->pluck("name", "id")->prepend('- select -', '');
|
||||
|
||||
$data = [
|
||||
'patient' => $patient,
|
||||
'patient_id' => $patient_id,
|
||||
'episode_id' => $episode_id,
|
||||
'hospitalInfo' => $hospitalInfo,
|
||||
'diagnoses' => $diagnoses,
|
||||
'anaesthesia' => $anaesthesia
|
||||
];
|
||||
|
||||
$pdf = SnappyPDF::loadView('theatre::anaesthetics/anaesthesia_print', $data)
|
||||
->setOrientation('portrait')
|
||||
->setOption('margin-bottom', 7)
|
||||
->setOption('margin-top', 5)
|
||||
->setOption('footer-html', '<i>Stre@mline</i>');
|
||||
|
||||
|
||||
return $pdf->inline('Anaesthesia Details' . date(" d-m-y h:ia") . '.pdf');
|
||||
}
|
||||
|
||||
public function remove_drug_from_inpatient_bill($record_id, $drug_id) {
|
||||
$anaesthesia = Anaesthesia::find($record_id);
|
||||
|
||||
$other_drugs_bill = explode(",", $anaesthesia->other_drugs_bill);
|
||||
$other_drugs_bill[] = $drug_id;
|
||||
|
||||
$anaesthesia->other_drugs_bill = implode(",", $other_drugs_bill);
|
||||
$anaesthesia->save();
|
||||
|
||||
return redirect('/anaesthetics/view_history/' . $record_id);
|
||||
}
|
||||
|
||||
public function add_drug_to_inpatient_bill($record_id, $drug_id) {
|
||||
$anaesthesia = Anaesthesia::find($record_id);
|
||||
|
||||
$other_drugs_bill = explode(",", $anaesthesia->other_drugs_bill);
|
||||
|
||||
$key = array_search($drug_id, $other_drugs_bill);
|
||||
|
||||
if ($key !== false) {
|
||||
unset($other_drugs_bill[$key]);
|
||||
}
|
||||
|
||||
$anaesthesia->other_drugs_bill = implode(",", $other_drugs_bill);
|
||||
$anaesthesia->save();
|
||||
|
||||
return redirect('/anaesthetics/view_history/' . $record_id);
|
||||
}
|
||||
|
||||
}
|
||||
+1232
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Theatre\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* This namespace is applied to your controller routes.
|
||||
*
|
||||
* In addition, it is set as the URL generator's root namespace.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'Modules\Theatre\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(module_path('Theatre', '/Routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(module_path('Theatre', '/Routes/api.php'));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Theatre\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Modules\Theatre\Providers\RouteServiceProvider;
|
||||
|
||||
class TheatreServiceProvider extends ServiceProvider {
|
||||
/**
|
||||
* @var string $moduleName
|
||||
*/
|
||||
protected $moduleName = 'Theatre';
|
||||
|
||||
/**
|
||||
* @var string $moduleNameLower
|
||||
*/
|
||||
protected $moduleNameLower = 'theatre';
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerTranslations();
|
||||
$this->registerConfig();
|
||||
$this->registerViews();
|
||||
$this->loadMigrationsFrom(module_path($this->moduleName, 'Database/Migrations'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->register(RouteServiceProvider::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
module_path($this->moduleName, 'Config/config.php') => config_path($this->moduleNameLower . '.php'),
|
||||
], 'config');
|
||||
$this->mergeConfigFrom(
|
||||
module_path($this->moduleName, 'Config/config.php'), $this->moduleNameLower
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register views.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerViews()
|
||||
{
|
||||
$viewPath = resource_path('views/modules/' . $this->moduleNameLower);
|
||||
|
||||
$sourcePath = module_path($this->moduleName, 'Resources/views');
|
||||
|
||||
$this->publishes([
|
||||
$sourcePath => $viewPath
|
||||
], ['views', $this->moduleNameLower . '-module-views']);
|
||||
|
||||
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerTranslations()
|
||||
{
|
||||
$langPath = resource_path('lang/modules/' . $this->moduleNameLower);
|
||||
|
||||
if (is_dir($langPath)) {
|
||||
$this->loadTranslationsFrom($langPath, $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom($langPath);
|
||||
} else {
|
||||
$this->loadTranslationsFrom(module_path($this->moduleName, 'Resources/lang'), $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom(module_path($this->moduleName, 'Resources/lang'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
private function getPublishableViewPaths(): array
|
||||
{
|
||||
$paths = [];
|
||||
foreach (\Config::get('view.paths') as $path) {
|
||||
if (is_dir($path . '/modules/' . $this->moduleNameLower)) {
|
||||
$paths[] = $path . '/modules/' . $this->moduleNameLower;
|
||||
}
|
||||
}
|
||||
return $paths;
|
||||
}
|
||||
}
|
||||
Executable
+275
@@ -0,0 +1,275 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Theatre Details - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style style="text-css">
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
<h5 class="heading" style="text-align: center;">
|
||||
{{ __('surgery.surgery_details') }} : <span style="color: #0000FF">{{ streamline_date($anaesthesia->created_at) }}</span>
|
||||
</h5>
|
||||
|
||||
<br>
|
||||
|
||||
@php
|
||||
$total_amount_to_pay = 0;
|
||||
@endphp
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('surgery.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>Anaethesia Type</th>
|
||||
<td>
|
||||
{{ get_name($anaesthesia->anaesthesia_type , 'id', 'name', 'procedures') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('surgery.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.age') }}</th>
|
||||
<td>
|
||||
{{ get_patients_age($patient->date_of_birth) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.residence') }}</th>
|
||||
<td>{{ patient_residence($patient->id) }}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.gender') }}</th>
|
||||
<td>
|
||||
{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.procedure') }}</th>
|
||||
<td>{{ get_name($anaesthesia->procedure_id, 'id', 'name', 'procedures') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.primary_diagnosis') }}</th>
|
||||
<td>{{ isset($diagnoses[$anaesthesia->primary_diagnosis]) ? $diagnoses[$anaesthesia->primary_diagnosis] : "" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.other_diagnoses') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$other_diagnoses_array = @unserialize($anaesthesia->other_diagnoses);
|
||||
@endphp
|
||||
|
||||
@if(!empty($other_diagnoses_array) && $other_diagnoses_array[0] != "")
|
||||
@foreach($other_diagnoses_array as $diagnosis)
|
||||
<ul>
|
||||
@if($diagnosis != "")
|
||||
<li>{{ $diagnoses[$diagnosis] }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.date') }}</th>
|
||||
<td>{{ streamline_date($anaesthesia->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.time_anaesthesia_commenced') }}</th><!-- time_anaesthesia_commenced -->
|
||||
<td>{{ date('h:i:s A', strtotime($anaesthesia->time_commenced)) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.anaesthetist') }}</th>
|
||||
<td>{{ get_full_name($anaesthesia->anaesthetist, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.anaesthetics') }}</th>
|
||||
<td>{{ get_name($anaesthesia->anaesthesia_type, 'id', 'name', 'procedures') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.blood_given') }}</th>
|
||||
<td>{{ $anaesthesia->blood_given }} units</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.anaesthesia_checklist') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$anaesthesia_checklist = '';
|
||||
$anaesthesia_checklist_array = unserialize($anaesthesia->anaesthesia_checklist);
|
||||
foreach ($anaesthesia_checklist_array as $key => $value) {
|
||||
if ($value == 1) {
|
||||
$anaesthesia_checklist .= $key . ', ';
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
{{ rtrim($anaesthesia_checklist, ', ') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.monitoring_signs') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$monitoring_signs = '';
|
||||
$monitoring_signs_array = unserialize($anaesthesia->monitoring_signs);
|
||||
foreach ($monitoring_signs_array as $k => $v) {
|
||||
if ($v == 1) {
|
||||
$monitoring_signs .= $k . ', ';
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
{{ rtrim($monitoring_signs, ', ') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.type_of_needle_used') }}</th>
|
||||
<td>{{ get_name($anaesthesia->needle_type, 'id', 'name', 'needle_types') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.volume_administered') }}</th>
|
||||
<td>{{ $anaesthesia->volume_administered }} mls</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.muscle_relaxants') }}</th>
|
||||
<td>{{ get_name($anaesthesia->muscle_relaxant, 'id', 'name', 'muscle_relaxants') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.checklist_confirmed_by') }}</th>
|
||||
<td>{{ get_full_name($anaesthesia->checklist_confirmed_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.induction') }}</th>
|
||||
<td>{{ get_name($anaesthesia->induction, 'id', 'name', 'anaesthesia_inductions') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.antibiotics') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$antibiotics_array = explode(",", $anaesthesia->antibiotics)
|
||||
@endphp
|
||||
@for($i = 0; $i < count($antibiotics_array); $i++)
|
||||
<b>{{ $i + 1 }}</b> - {{ get_name($antibiotics_array[$i], 'id', 'name', 'drugs') }} <br>
|
||||
@endfor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.airway') }}</th>
|
||||
<td>{{ get_name($anaesthesia->airway, 'id', 'name', 'anaesthesia_airways') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ETT</th>
|
||||
<td>{{ get_name($anaesthesia->ETT, 'id', 'name', 'anaesthesia_etts') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.agent_used') }}</th>
|
||||
<td>{{ get_name($anaesthesia->agent_used, 'id', 'name', 'anaesthetic_agents') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.technique') }}</th>
|
||||
<td>{{ get_name($anaesthesia->technique, 'id', 'name', 'anaesthetic_techniques') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.analgesics') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$analgesics_array = explode(",", $anaesthesia->analgesic);
|
||||
@endphp
|
||||
@if (count($analgesics_array) > 0)
|
||||
<ul>
|
||||
@for ($i = 0; $i < count($analgesics_array); $i++)
|
||||
<li>{{ get_name($analgesics_array[$i], 'id', 'name', 'analgesics') }}</li>
|
||||
@endfor
|
||||
</ul>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.volatile_liquid_anaethetics') }}</th>
|
||||
<td>{{ get_name($anaesthesia->volatile_liquid_anaethetics, "id", "name", "volatile_liquid_anaesthetics") }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.volatile_liquid_anaesthetic_used') }}</th>
|
||||
<td>{{ $anaesthesia->volatile_liquid_anaesthetic_used }} mls</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.iv_fluids_used') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$iv_fluids = '';
|
||||
$iv_fluid_array = unserialize($anaesthesia->iv_fluids);
|
||||
$iv_fluid_ids = $iv_fluid_array['iv_fluids'];
|
||||
$iv_fluid_units = $iv_fluid_array['units'];
|
||||
|
||||
if (!empty($iv_fluid_ids)) {
|
||||
foreach ($iv_fluid_ids as $x => $y) {
|
||||
$iv_fluids .= '* ' . (isset($iv_fluid_units[$x]) ? $iv_fluid_units[$x] : "") . ': ' . $iv_fluid_units[$x] . ' mls<br>';
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
{!! $iv_fluids !!}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
<b>{{ __('surgery.comments') }}</b>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{!! nl2br(e($anaesthesia->comments)) !!}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+1355
File diff suppressed because it is too large
Load Diff
+1266
File diff suppressed because it is too large
Load Diff
+66
@@ -0,0 +1,66 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4 class="page-title">View Anaesthetics History</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">View</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Procedure</th>
|
||||
<th>Surgery</th>
|
||||
<th>Anaesthetist</th>
|
||||
<th>Time Of Commencement</th>
|
||||
<th>Date</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($anaesthesia_records as $anaesthesia)
|
||||
<tr>
|
||||
<td>{{ get_name($anaesthesia->procedure_id,'id','name','procedures') }}</td>
|
||||
<td>{!! $anaesthesia->surgery_id != null ? get_name($anaesthesia->procedure_id, 'id','name','procedures') : '<font color="red">Not done</font>' !!}</td>
|
||||
<td>{{ get_full_name($anaesthesia->anaesthetist,'id','first_name','last_name','users') }}</td>
|
||||
<td>{{ $anaesthesia->time_commenced }}</td>
|
||||
<td>{{ streamline_date($anaesthesia->created_at) }}</td>
|
||||
<td><a class="btn btn-sm btn-info" href="/anaesthetics/view_history/{{ $anaesthesia->id }}">View Details</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//
|
||||
</script>
|
||||
@endpush
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('js/common/scripts.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Anaesthesia details</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li><a href="{{ route('patients.index') }}">Patients</a></li>
|
||||
<li class="active">anaesthesia details</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$patient_id = session('patient_id');
|
||||
$episode_id = session('episode_id');
|
||||
@endphp
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">ANAESTHESIA DETAILS FOR EPISODE STARTED ON <font color="blue">{{ streamline_date(get_name($episode_id, 'id', 'created_at', 'patient_episodes')) }}</font>
|
||||
<div class="panel-action"><a href="#" data-perform="panel-collapse"><i class="ti-minus"></i></a> <a href="#" data-perform="panel-dismiss"><i class="ti-close"></i></a></div>
|
||||
</div>
|
||||
<div class="panel-wrapper collapse in">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>Procedure</th>
|
||||
<th>Surgery</th>
|
||||
<th>Anaesthetist</th>
|
||||
<th>Time Of Commencement</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ get_name($anaesthesia_record->procedure_id, 'id', 'name', 'procedures') }}</td>
|
||||
<td>{!! $anaesthesia_record->surgery_id != null ? get_name($anaesthesia_record->surgery_id, 'id', 'name', 'surgeries'): '<font color="red">Not done</font>' !!}</td>
|
||||
<td>{{ get_name($anaesthesia_record->anaesthetist, 'id', 'first_name', 'users') }}</td>
|
||||
<td>{{ $anaesthesia_record->time_commenced }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
|
||||
@if(count($inpatient_info) > 0)
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">IN PATIENT DETAILS
|
||||
<div class="panel-action">
|
||||
<a href="#" data-perform="panel-collapse"><i class="ti-plus"></i></a>
|
||||
<a href="#" data-perform="panel-dismiss"><i class="ti-close"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-wrapper collapse in table-responsive" aria-expanded="false">
|
||||
<table class="table table-hover table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Admitted on</th>
|
||||
<th>Ward</th>
|
||||
<th>Procedures</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($inpatient_info as $info)
|
||||
<tr>
|
||||
<td>{{ $info->admitted_on }}</td>
|
||||
<td>{{ get_name($info->ward_id, 'id', 'name', 'wards') }}</td>
|
||||
<td>{{ get_name(unserialize($info->procedures), 'id', 'name','procedures') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">ORDERED PROCEDURE DETAILS
|
||||
<div class="panel-action">
|
||||
<a href="#" data-perform="panel-collapse"><i class="ti-minus"></i></a>
|
||||
<a href="#" data-perform="panel-dismiss"><i class="ti-close"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-wrapper collapse in table-responsive" >
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Procedure</th>
|
||||
<th>Performed</th>
|
||||
<th>Created by</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ get_name($ordered_procedure->procedure_id, 'id', 'name', 'procedures') }}</td>
|
||||
<td>{{ $ordered_procedure->perfomed == 1 ? 'Yes' : 'No' }}</td>
|
||||
<td>{{ get_name($ordered_procedure->created_by, 'id', 'first_name', 'users') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script src="{{ asset('js/consultation/create.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
//
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+329
@@ -0,0 +1,329 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4 class="page-title">{{ __('anaesthetics.view_anaesthetics_history') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('home.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('anaesthetics.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.items') }}</th>
|
||||
<th>{{ __('anaesthetics.details') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.procedure') }}</td>
|
||||
<td>{{ get_name($anaesthesia->procedure_id, 'id', 'name', 'procedures') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.date') }}</td>
|
||||
<td>{{ streamline_date($anaesthesia->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.time_anaesthesia_commenced') }}</td>
|
||||
<td>{{ date('h:i:s A', strtotime($anaesthesia->time_commenced)) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.primary_diagnosis') }}</td>
|
||||
<td>{{ isset($diagnoses[$anaesthesia->primary_diagnosis]) ? $diagnoses[$anaesthesia->primary_diagnosis] : "" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.other_diagnoses') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$other_diagnoses_array = @unserialize($anaesthesia->other_diagnoses);
|
||||
@endphp
|
||||
|
||||
@if(!empty($other_diagnoses_array) && $other_diagnoses_array[0] != "")
|
||||
@foreach($other_diagnoses_array as $diagnosis)
|
||||
<ul>
|
||||
@if($diagnosis != "")
|
||||
<li>{{ $diagnoses[$diagnosis] }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.anaesthetist') }}</td>
|
||||
<td>{{ get_full_name($anaesthesia->anaesthetist, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.anaesthetics') }}</td>
|
||||
<td>{{ get_name($anaesthesia->anaesthesia_type, 'id', 'name', 'procedures') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.blood_given') }}</td>
|
||||
<td>{{ $anaesthesia->blood_given }} units</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.anaesthesia_checklist') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$anaesthesia_checklist = '';
|
||||
$anaesthesia_checklist_array = unserialize($anaesthesia->anaesthesia_checklist);
|
||||
foreach ($anaesthesia_checklist_array as $key => $value) {
|
||||
if ($value == 1) {
|
||||
$anaesthesia_checklist .= $key . ', ';
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
{{ rtrim($anaesthesia_checklist, ', ') }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.items') }}</th>
|
||||
<th>{{ __('anaesthetics.details') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.checklist_confirmed_by') }}</td>
|
||||
<td>{{ get_full_name($anaesthesia->checklist_confirmed_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.induction') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$induction_array = $anaesthesia->induction ? explode(",", $anaesthesia->induction) : [];
|
||||
@endphp
|
||||
<ul>
|
||||
@for ($i = 0; $i < count($induction_array); $i++)
|
||||
<li>{{ get_name($induction_array[$i], 'id', 'name', 'anaesthesia_inductions') }}</li>
|
||||
@endfor
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.antibiotics') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$antibiotics_array = explode(",", $anaesthesia->antibiotics)
|
||||
@endphp
|
||||
@for($i = 0; $i < count($antibiotics_array); $i++)
|
||||
<b>{{ $i + 1 }}</b> - {{ get_name($antibiotics_array[$i], 'id', 'name', 'drugs') }} <br>
|
||||
@endfor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.airway') }}</td>
|
||||
<td>{{ get_name($anaesthesia->airway, 'id', 'name', 'anaesthesia_airways') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ETT</td>
|
||||
<td>{{ get_name($anaesthesia->ETT, 'id', 'name', 'anaesthesia_etts') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.agent_used') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$agent_used_array = $anaesthesia->agent_used ? explode(",", $anaesthesia->agent_used) : [];
|
||||
@endphp
|
||||
@for ($i = 0; $i < count($agent_used_array); $i++)
|
||||
<ul>
|
||||
{{ get_name($agent_used_array[$i], 'id', 'name', 'anaesthetic_agents') }}
|
||||
</ul>
|
||||
@endfor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.technique') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$technique_array = $anaesthesia->technique ? explode(",", $anaesthesia->technique) : [];
|
||||
@endphp
|
||||
@for ($i = 0; $i < count($technique_array); $i++)
|
||||
<ul>
|
||||
{{ get_name($technique_array[$i], 'id', 'name', 'anaesthetic_techniques') }}
|
||||
</ul>
|
||||
@endfor
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('anaesthetics.items') }}</th>
|
||||
<th>{{ __('anaesthetics.details') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.monitoring_signs') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$monitoring_signs = '';
|
||||
$monitoring_signs_array = unserialize($anaesthesia->monitoring_signs);
|
||||
foreach ($monitoring_signs_array as $k => $v) {
|
||||
if ($v == 1) {
|
||||
$monitoring_signs .= $k . ', ';
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
{{ rtrim($monitoring_signs, ', ') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.type_of_needle_used') }}</td>
|
||||
<td>{{ get_name($anaesthesia->needle_type, 'id', 'name', 'needle_types') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.volume_administered') }}</td>
|
||||
<td>{{ $anaesthesia->volume_administered }} mls</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.muscle_relaxants') }}</td>
|
||||
<td>{{ get_name($anaesthesia->muscle_relaxant, 'id', 'name', 'muscle_relaxants') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.analgesics') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$analgesics_array = explode(",", $anaesthesia->analgesic);
|
||||
@endphp
|
||||
@if (count($analgesics_array) > 0)
|
||||
<ul>
|
||||
@for ($i = 0; $i < count($analgesics_array); $i++)
|
||||
<li>{{ get_name($analgesics_array[$i], 'id', 'name', 'analgesics') }}</li>
|
||||
@endfor
|
||||
</ul>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.volatile_liquid_anaethetics') }}</td>
|
||||
<td>{{ get_name($anaesthesia->volatile_liquid_anaethetics, "id", "name", "volatile_liquid_anaesthetics") }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.volatile_liquid_anaesthetic_used') }}</td>
|
||||
<td>{{ $anaesthesia->volatile_liquid_anaesthetic_used }} mls</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.iv_fluids_used') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$iv_fluids = '';
|
||||
$iv_fluid_array = unserialize($anaesthesia->iv_fluids);
|
||||
$iv_fluid_ids = $iv_fluid_array['iv_fluids'];
|
||||
$iv_fluid_units = $iv_fluid_array['units'];
|
||||
|
||||
if (!empty($iv_fluid_ids)) {
|
||||
foreach ($iv_fluid_ids as $x => $y) {
|
||||
$iv_fluids .= '* ' . (isset($iv_fluid_units[$x]) ? $iv_fluid_units[$x] : "") . ': ' . $iv_fluid_units[$x] . ' mls<br>';
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
{!! $iv_fluids !!}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('anaesthetics.comments') }}</td>
|
||||
<td>{!! nl2br(e($anaesthesia->comments)) !!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-success btn-sm" href="{{ url('anaesthetics') }}/{{ $anaesthesia->id }}/edit" target="_blank" id="print_btn"><i class="fa fa-pencil"></i> Edit</a>
|
||||
<a class="btn btn-primary btn-sm" href="{{ url('anaesthesia_print') }}/{{ $anaesthesia->id }}" target="_blank" id="print_btn"><i class="fa fa-print"></i> Print</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@php
|
||||
$drugs_given_anae = unserialize($anaesthesia->other_drugs_given);
|
||||
$drugs_given_anae_cost = unserialize($anaesthesia->other_drugs_cost);
|
||||
$do_not_bill_other_drugs = explode(",", $anaesthesia->other_drugs_bill);
|
||||
@endphp
|
||||
|
||||
@if(count($drugs_given_anae) > 0)
|
||||
<div class="col-md-4">
|
||||
<h4>{{ __('anaesthetics.other_drugs_given') }}</h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('inpatient.drug_name') }}</th>
|
||||
<th>{{ __('inpatient.dose') }}</th>
|
||||
<th>{{ __('inpatient.cost') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for($i = 0; $i < count($drugs_given_anae); $i++)
|
||||
@php
|
||||
$cost = isset($drugs_given_anae_cost[$i]) ? trim($drugs_given_anae_cost[$i]) : 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ get_name($drugs_given_anae[$i]['id'], 'id', 'name', 'drugs') }}</td>
|
||||
<td>{{ $drugs_given_anae[$i]['dose'] ?? "" }} {{ get_name($drugs_given_anae[$i]['unit'], 'id', 'name', 'drug_units') }}</td>
|
||||
<td>{{ ugandan_shillings($cost) }}</td>
|
||||
<td>
|
||||
@if(in_array($drugs_given_anae[$i]['id'], $do_not_bill_other_drugs))
|
||||
<a class="btn btn-sm btn-rounded btn-success" href="/anaesthetics/add_drug_to_inpatient_bill/{{ $id }}/{{ $drugs_given_anae[$i]['id'] }}">Add to inpatient bill</a>
|
||||
@else
|
||||
<a class="btn btn-sm btn-rounded btn-danger" href="/anaesthetics/remove_drug_from_inpatient_bill/{{ $id }}/{{ $drugs_given_anae[$i]['id'] }}">Remove from inpatient bill</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//
|
||||
</script>
|
||||
@endpush
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('first_name',__('theatre_surgeries.first_name')) }}
|
||||
{{ Form::text('first_name','',['class' => 'form-control compulsory','id'=>'asg_first_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('last_name',__('theatre_surgeries.last_name')) }}
|
||||
{{ Form::text('last_name','',['class' => 'form-control compulsory','id'=>'asg_last_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('username',__('theatre_surgeries.username')) }}
|
||||
{{ Form::text('username','',['class' => 'form-control compulsory', 'id'=>'asg_user_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('phone',__('theatre_surgeries.phone_number')) }}
|
||||
{{ Form::text('phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id'=>'asg_phone_number']) }}
|
||||
<span class="font-13 text-muted">(07xx) 123-456</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('email',__('theatre_surgeries.email_address')) }}
|
||||
{{ Form::email('email','',['class' => 'form-control','id'=>'asg_email']) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group council_hide" style="display: block;">
|
||||
{{ Form::label('registration_number',__('theatre_surgeries.registration_number')) }}
|
||||
{{ Form::text('registration_number','',['class' => 'form-control','id'=>'asg_registration_number']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position_id',__('theatre_surgeries.position')) }}
|
||||
{{ Form::select('position_id',$positions,'',['class' => 'form-control compulsory', 'id'=>'asg_position_id']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pin',__('theatre_surgeries.secret_pin')) }}
|
||||
{{ Form::number('pin',null,['class' => 'form-control compulsory pin','placeholder'=>'eg 12345','maxlength'=>'5','minlength'=>'5', 'id'=>'asg_secret_pin']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_question_id',__('theatre_surgeries.security_question')) }}
|
||||
{{ Form::select('security_question_id',$security_questions,'',['class' => 'form-control', 'id'=>'asg_security_question']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_answer',__('theatre_surgeries.security_answer')) }}
|
||||
{{ Form::text('security_answer','',['class' => 'form-control','id'=>'asg_security_answer']) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('first_name',__('theatre_surgeries.first_name')) }}
|
||||
{{ Form::text('first_name','',['class' => 'form-control compulsory','id'=>'n_first_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('last_name',__('theatre_surgeries.last_name')) }}
|
||||
{{ Form::text('last_name','',['class' => 'form-control compulsory','id'=>'n_last_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('username',__('theatre_surgeries.username')) }}
|
||||
{{ Form::text('username','',['class' => 'form-control compulsory', 'id'=>'n_user_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('phone',__('theatre_surgeries.phone_number')) }}
|
||||
{{ Form::text('phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id'=>'n_phone_number']) }}
|
||||
<span class="font-13 text-muted">(07xx) 123-456</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('email',__('theatre_surgeries.email_address')) }}
|
||||
{{ Form::email('email','',['class' => 'form-control','id'=>'n_email']) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group council_hide" style="display: block;">
|
||||
{{ Form::label('registration_number',__('theatre_surgeries.registration_number')) }}
|
||||
{{ Form::text('registration_number','',['class' => 'form-control', 'id'=>'n_registration_number']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position_id',__('theatre_surgeries.position')) }}
|
||||
{{ Form::select('position_id',$positions,'',['class' => 'form-control compulsory', 'id'=>'n_position_id']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pin',__('theatre_surgeries.secret_pin')) }}
|
||||
{{ Form::number('pin',null,['class' => 'form-control compulsory pin','placeholder'=>'eg 12345','maxlength'=>'5','minlength'=>'5', 'id'=>'n_secret_pin']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_question_id',__('theatre_surgeries.security_question')) }}
|
||||
{{ Form::select('security_question_id',$security_questions,'',['class' => 'form-control', 'id'=>'n_security_question']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_answer',__('theatre_surgeries.security_answer')) }}
|
||||
{{ Form::text('security_answer','',['class' => 'form-control','id'=>'n_security_answer']) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
@php
|
||||
$procedure_categories = \Streamline\Models\ProcedureCategory::pluck('name', 'id')
|
||||
->toArray();
|
||||
|
||||
$procedure_categories = ['' => '- select -'] + $procedure_categories;
|
||||
|
||||
$chart_of_accounts = \Streamline\Models\ChartOfAccount::orderBy('name', 'asc')
|
||||
->pluck('name', 'id')
|
||||
->toArray();
|
||||
|
||||
$chart_of_accounts = ['' => '- select -'] + $chart_of_accounts;
|
||||
|
||||
$hmis_categories = \DB::table('hmis_categories')->orderBy('title', 'asc')->pluck('title', 'id')->toArray();
|
||||
|
||||
$hmis_categories = ['' => '- select -'] + $hmis_categories;
|
||||
@endphp
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('procedures.procedure_name')) }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'id' => 'new_procedure_name']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('non_insured_price', __('procedures.non_insured_price')) }}
|
||||
{{ Form::number('non_insured_price', '', ['class' => 'form-control compulsory', 'id' => 'new_procedure_non_insured_price']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('insured_price', __('procedures.insured_price')) }}
|
||||
{{ Form::number('insured_price', 0, ['class' => 'form-control', 'id' => 'new_procedure_insured_price']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('', __('procedures.insurance_coverage'), ["class"=>'col-md-12']) }}
|
||||
{{ __('procedures.yes') }} {{ Form::radio('insurance', 1, false, ['class' => 'check', 'data-radio'=>'iradio_flat-green', 'id' => 'new_procedure_insured_yes']) }}
|
||||
{{ __('procedures.no') }} {{ Form::radio('insurance', 0, false, ['class' => 'check', 'data-radio'=>'iradio_flat-green', 'id' => 'new_procedure_insured_no']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('category', __('procedures.category')) }}
|
||||
{{ Form::select('category', $procedure_categories, null, ['class' => 'form-control compulsory', 'id' => 'new_procedure_category']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('hmis_number', 'HMIS No.') }}
|
||||
{{ Form::number('hmis_number', '', ['class'=>'form-control', 'id' => 'new_procedure_hmis_number']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_id',__('procedures.chart_of_account_name')) }}
|
||||
{{ Form::select('account_id',$chart_of_accounts,'',['class' => 'form-control compulsory', 'id' => 'new_procedure_account_id']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="wrapper">
|
||||
<div class="row input_fields_wrap1 copy1">
|
||||
<div class="col-sm-5">
|
||||
{{ Form::label('hmis_no_outpatient', 'HMIS-out-patient No.') }}
|
||||
{{ Form::text('hmis_no_outpatient[]', '', ['class'=>'form-control', 'id' => 'new_procedure_hmis_no_outpatient']) }}
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{{ Form::label('hmis_category', 'HMIS category (Out Patient)') }}
|
||||
{{ Form::select('hmis_category[]', $hmis_categories, '', ['class' => 'form-control', 'id' => 'new_procedure_hmis_category']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <a class="add_field_hmis" style="color: blue;">{{ __('procedures.add_more') }}</a><br><br> -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row input_fields_wrap2 copy2">
|
||||
<div class="col-sm-5">
|
||||
{{ Form::label('hmis_no_inpatient', __('diagnoses.hmis_inpatient_category')) }}
|
||||
{{ Form::text('hmis_no_inpatient', '', ['class'=>'form-control', 'id' => 'new_procedure_hmis_no_inpatient']) }}
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{{ Form::label('hmis_category_inpatient', 'HMIS category (In Patient)') }}
|
||||
{{ Form::select('hmis_category_inpatient', $hmis_categories, '', ['class' => 'form-control', 'id' => 'new_procedure_hmis_category_inpatient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('first_name',__('theatre_surgeries.first_name')) }}
|
||||
{{ Form::text('first_name','',['class' => 'form-control compulsory','id'=>'sn_first_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('last_name',__('theatre_surgeries.last_name')) }}
|
||||
{{ Form::text('last_name','',['class' => 'form-control compulsory','id'=>'sn_last_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('username',__('theatre_surgeries.username')) }}
|
||||
{{ Form::text('username','',['class' => 'form-control compulsory', 'id'=>'sn_user_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('phone',__('theatre_surgeries.phone_number')) }}
|
||||
{{ Form::text('phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id'=>'sn_phone_number']) }}
|
||||
<span class="font-13 text-muted">(07xx) 123-456</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('email',__('theatre_surgeries.email_address')) }}
|
||||
{{ Form::email('email','',['class' => 'form-control','id'=>'sn_email']) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group council_hide" style="display: block;">
|
||||
{{ Form::label('registration_number',__('theatre_surgeries.registration_number')) }}
|
||||
{{ Form::text('registration_number','',['class' => 'form-control','id'=>'sn_registration_number']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position_id',__('theatre_surgeries.position')) }}
|
||||
{{ Form::select('position_id',$positions,'',['class' => 'form-control compulsory', 'id'=>'sn_position_id']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pin',__('theatre_surgeries.secret_pin')) }}
|
||||
{{ Form::number('pin',null,['class' => 'form-control compulsory pin','placeholder'=>'eg 12345','maxlength'=>'5','minlength'=>'5', 'id'=>'sn_secret_pin']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_question_id',__('theatre_surgeries.security_question')) }}
|
||||
{{ Form::select('security_question_id',$security_questions,'',['class' => 'form-control', 'id'=>'sn_security_question']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_answer',__('theatre_surgeries.security_answer')) }}
|
||||
{{ Form::text('security_answer','',['class' => 'form-control','id'=>'sn_security_answer']) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('first_name',__('theatre_surgeries.first_name')) }}
|
||||
{{ Form::text('first_name','',['class' => 'form-control compulsory','id'=>'ss_first_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('last_name',__('theatre_surgeries.last_name')) }}
|
||||
{{ Form::text('last_name','',['class' => 'form-control compulsory','id'=>'ss_last_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('username',__('theatre_surgeries.username')) }}
|
||||
{{ Form::text('username','',['class' => 'form-control compulsory', 'id'=>'ss_user_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('phone',__('theatre_surgeries.phone_number')) }}
|
||||
{{ Form::text('phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id'=>'ss_phone_number']) }}
|
||||
<span class="font-13 text-muted">(07xx) 123-456</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('email',__('theatre_surgeries.email_address')) }}
|
||||
{{ Form::email('email','',['class' => 'form-control','id'=>'ss_email']) }}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group council_hide" style="display: block;">
|
||||
{{ Form::label('registration_number',__('theatre_surgeries.registration_number')) }}
|
||||
{{ Form::text('registration_number','',['class' => 'form-control','id'=>'ss_registration_number']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position_id',__('theatre_surgeries.position')) }}
|
||||
{{ Form::select('position_id',$positions,'',['class' => 'form-control compulsory', 'id'=>'ss_position_id']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pin',__('theatre_surgeries.secret_pin')) }}
|
||||
{{ Form::number('pin',null,['class' => 'form-control compulsory pin','placeholder'=>'eg 12345','maxlength'=>'5','minlength'=>'5', 'id'=>'ss_secret_pin']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_question_id',__('theatre_surgeries.security_question')) }}
|
||||
{{ Form::select('security_question_id',$security_questions,'',['class' => 'form-control', 'id'=>'ss_security_question']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_answer',__('theatre_surgeries.security_answer')) }}
|
||||
{{ Form::text('security_answer','',['class' => 'form-control','id'=>'ss_security_answer']) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('first_name',__('theatre_surgeries.first_name')) }}
|
||||
{{ Form::text('first_name','',['class' => 'form-control compulsory','id'=>'sg_first_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('last_name',__('theatre_surgeries.last_name')) }}
|
||||
{{ Form::text('last_name','',['class' => 'form-control compulsory','id'=>'sg_last_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('username',__('theatre_surgeries.username')) }}
|
||||
{{ Form::text('username','',['class' => 'form-control compulsory', 'placeholder'=>'eg Admin', 'id'=>'sg_user_name']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('phone',__('theatre_surgeries.phone_number')) }}
|
||||
{{ Form::text('phone','',['class' => 'form-control','data-mask'=>"0799 999 999", 'id'=>'sg_phone_number']) }}
|
||||
<span class="font-13 text-muted">(07xx) 123-456</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('email',__('theatre_surgeries.email_address')) }}
|
||||
{{ Form::email('email','',['class' => 'form-control','id'=>'sg_email']) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group council_hide" style="display: block;">
|
||||
{{ Form::label('registration_number',__('theatre_surgeries.registration_number')) }}
|
||||
{{ Form::text('registration_number','',['class' => 'form-control','id'=>'sg_registration_number']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('position_id',__('theatre_surgeries.position')) }}
|
||||
{{ Form::select('position_id',$positions,'',['class' => 'form-control compulsory', 'id'=>'sg_position_id']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pin',__('theatre_surgeries.secret_pin')) }}
|
||||
{{ Form::number('pin',null,['class' => 'form-control compulsory pin','placeholder'=>'eg 12345','maxlength'=>'5','minlength'=>'5', 'id'=>'sg_secret_pin']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_question_id',__('theatre_surgeries.security_question')) }}
|
||||
{{ Form::select('security_question_id',$security_questions,'',['class' => 'form-control', 'id'=>'sg_security_question']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('security_answer',__('theatre_surgeries.security_answer')) }}
|
||||
{{ Form::text('security_answer','',['class' => 'form-control','id'=>'sg_security_answer']) }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
+1532
File diff suppressed because it is too large
Load Diff
+186
@@ -0,0 +1,186 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4 class="page-title">
|
||||
{{ __('surgery.details_of_surgery') }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('home.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('surgery.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('surgery.item') }}</th>
|
||||
<th>{{ __('surgery.details') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('surgery.surgery_performed') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$procedures_array = explode(",", $surgery->procedure_id);
|
||||
@endphp
|
||||
@for ($i = 0; $i < count($procedures_array); $i++)
|
||||
- {{ get_name($procedures_array[$i],'id','name','procedures') }}<br>
|
||||
@endfor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.date') }}</td>
|
||||
<td>{{ streamline_date($surgery->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.time_of_commencement') }}</td>
|
||||
<td>{{ get_name($surgery->anaesthesia_id,'id','time_commenced','anaesthesias') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.surgeon') }}</td>
|
||||
<td>{{ is_numeric($surgery->surgeon) ? get_full_name($surgery->surgeon, 'id', 'first_name', 'last_name', 'users') : $surgery->surgeon }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.theatre') }}</td>
|
||||
<td>{{ get_name($surgery->theatre_location, 'id', 'name', 'theatre_locations') }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.theatre_incharge') }}</td>
|
||||
<td>{{ is_numeric($surgery->theatre_in_charge) ? get_full_name($surgery->theatre_in_charge, 'id', 'first_name', 'last_name', 'users') : $surgery->theatre_in_charge }}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('surgery.item') }}</th>
|
||||
<th>{{ __('surgery.details') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('surgery.assistant_surgeon') }}</td>
|
||||
<td>{{ get_full_name($surgery->assistant_surgeon, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.scrub_nurse') }}</td>
|
||||
<td>{{ get_full_name($surgery->scrub_nurse, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.other_scrub_staff') }}</td>
|
||||
<td>{{ get_full_name($surgery->other_scrub_staff, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.primary_diagnosis') }}</td>
|
||||
<td>{{ isset($diagnoses[$surgery->primary_diagnosis]) ? $diagnoses[$surgery->primary_diagnosis] : "" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.other_diagnoses') }}</td>
|
||||
<td>
|
||||
@php
|
||||
$other_diagnoses_array = @unserialize($surgery->other_diagnoses);
|
||||
@endphp
|
||||
|
||||
@if(!empty($other_diagnoses_array) && $other_diagnoses_array[0] != "")
|
||||
@foreach($other_diagnoses_array as $diagnosis)
|
||||
<ul>
|
||||
@if($diagnosis != "")
|
||||
<li>{{ $diagnoses[$diagnosis] }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('surgery.item') }}</th>
|
||||
<th>{{ __('surgery.details') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('surgery.estimated_blood_loss') }}</td>
|
||||
<td>{{ $surgery->estimated_blood_loss }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.number_of_vicryl_sutures_used') }}</td>
|
||||
<td>{{ $surgery->vicryl_sutures_used }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.other_sutures_used') }}</td>
|
||||
<td>{{ $surgery->other_sutures_used }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.outcome') }}</td>
|
||||
<td>{{ (is_numeric($surgery->outcome)) ? get_name($surgery->outcome, 'id', 'name', 'outcomes') : "Not Available" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.time_surgery_completed') }}</td>
|
||||
<td>{{ streamline_time($surgery->time_surgery_completed)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('surgery.date_of_surgery') }}</td>
|
||||
<td>{{ streamline_date($surgery->date_surgery_completed) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('surgery.comments') }}</td>
|
||||
<td>{!! nl2br(e($surgery->comments)) !!}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-sm btn-info" href="/theatre_surgery/{{ $surgery->id }}/edit">Edit Details</a>
|
||||
<a class="btn btn-primary btn-sm" href="{{ url('surgery_print') }}/{{ $surgery->id }}" target="_blank" id="print_btn"><i class="fa fa-print"></i> Print</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+122
@@ -0,0 +1,122 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Theatre Drugs Stock Sheet</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">Theatre Drugs Stock Sheet</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form action="{{ route('theatre.update_drugs_stock_sheet') }}" method="POST" name="stock_form" id="stock_form" style="width: 100%">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<input type="hidden" name="theatre_ward_id" value="{{ $theatre_ward_id }}">
|
||||
|
||||
<p class="text-muted m-b-30">Export data to Copy, CSV, Excel, PDF & Print</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Drug Name</th>
|
||||
<th>Theatre Stock</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Drug Name</th>
|
||||
<th>Theatre Stock</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($ward_stock_records as $record)
|
||||
@php
|
||||
$drug = \Streamline\Models\Drug::withTrashed()->find($record->item_id);
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
@if($drug->insurance_coverage == 1)
|
||||
<span style="color: green;"> {{ $drug->name }} </span>
|
||||
@else
|
||||
<span style="color: orange;"> {{ $drug->name }} </span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="shown_input">
|
||||
{{ $record->ward_item_stock }}
|
||||
</div>
|
||||
<div class="hidden_input" style="display: none;">
|
||||
<input type="hidden" name="drug_id[]" value="{{ $drug->id }}">
|
||||
<input type="text" name="quantity[]" class="form-control" value="{{ $record->ward_item_stock }}">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="padding: 10px; float: right;">
|
||||
<button class="btn btn-rounded btn-default" id="cancel_edit" style="display: none;">Cancel</button>
|
||||
<button class="btn btn-rounded btn-success" id="edit_stock">Edit stock</button>
|
||||
<input type="submit" value="Save stock" class="btn btn-rounded btn-success" id="save_stock" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
$('#edit_stock').click(function(e){
|
||||
e.preventDefault();
|
||||
$('.hidden_input,#save_stock').show();
|
||||
$('.shown_input').hide();
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('.expiry_date_input').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+1219
File diff suppressed because it is too large
Load Diff
+67
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-md-7">
|
||||
<h4 class="page-title">{{ __('theatre_surgeries.view_surgery_history') }}</h4>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('home.dashboard') }}</a></li>
|
||||
<li class="active">{{ __('surgery.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@include('patients::allergies.header')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<th>{{ __('surgery.surgery_performed') }}</th>
|
||||
<th>{{ __('surgery.surgeon') }}</th>
|
||||
<th>{{ __('theatre_surgeries.anaesthetist') }}</th>
|
||||
<th>{{ __('surgery.time_surgery_completed') }}</th>
|
||||
<th>{{ __('surgery.date_of_surgery') }}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($surgeries as $item)
|
||||
<tr>
|
||||
<td>
|
||||
@php
|
||||
$procedures_array = explode(",", $item->procedure_id);
|
||||
@endphp
|
||||
@for ($i = 0; $i < count($procedures_array); $i++)
|
||||
- {{ get_name($procedures_array[$i],'id','name','procedures') }}<br>
|
||||
@endfor
|
||||
</td>
|
||||
<td>{{ get_full_name($item->surgeon, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ get_full_name(get_name($item->anaesthesia_id,'id','anaesthetist','anaesthesias'),'id','first_name','last_name','users') }}</td>
|
||||
<td>{{ streamline_date_time($item->time_surgery_completed) }}</td>
|
||||
<td>{{ streamline_date($item->created_at) }}</td>
|
||||
<td><a class="btn btn-sm btn-info" href="{{ route('theatre_surgery.details', $item->id) }}">{{ __('surgery.details') }}</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="row bg-title">
|
||||
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
|
||||
<h4 class="page-title">Theatre Sundries Stock Sheet</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">Dashboard</a></li>
|
||||
<li class="active">Theatre Sundries Stock Sheet</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form action="{{ route('theatre.update_sundries_stock_sheet') }}" method="POST" name="stock_form" id="stock_form" style="width: 100%">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<input type="hidden" name="theatre_ward_id" value="{{ $theatre_ward_id }}">
|
||||
|
||||
<p class="text-muted m-b-30">Export data to Copy, CSV, Excel, PDF & Print</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sundry Name</th>
|
||||
<th>Theatre Stock</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Sundry Name</th>
|
||||
<th>Theatre Stock</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($ward_stock_records as $record)
|
||||
@php
|
||||
$sundry = \Streamline\Models\Sundry::withTrashed()->find($record->item_id);
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
@if($sundry->insurance_coverage == 1)
|
||||
<span style="color: green;"> {{ $sundry->name }} </span>
|
||||
@else
|
||||
<span style="color: orange;"> {{ $sundry->name }} </span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="shown_input">
|
||||
{{ $record->ward_item_stock }}
|
||||
</div>
|
||||
<div class="hidden_input" style="display: none;">
|
||||
<input type="hidden" name="sundry_id[]" value="{{ $sundry->id }}">
|
||||
<input type="text" name="quantity[]" class="form-control" value="{{ $record->ward_item_stock }}">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="padding: 10px; float: right;">
|
||||
<button class="btn btn-rounded btn-default" id="cancel_edit" style="display: none;">Cancel</button>
|
||||
<button class="btn btn-rounded btn-success" id="edit_stock">Edit stock</button>
|
||||
<input type="submit" value="Save stock" class="btn btn-rounded btn-success" id="save_stock" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
|
||||
$('#edit_stock').click(function(e){
|
||||
e.preventDefault();
|
||||
$('.hidden_input,#save_stock').show();
|
||||
$('.shown_input').hide();
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('.expiry_date_input').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+200
@@ -0,0 +1,200 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/streamline/color/streamline_icon-02.png') }}">
|
||||
<title>{{ config('app.name', 'Theatre Details - Stre@mline') }}</title>
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="{{ asset('bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<style style="text-css">
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
tr {
|
||||
page-break-before: always;
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
@include('layouts.header_pdf_print')
|
||||
<h5 class="heading" style="text-align: center;">
|
||||
{{ __('surgery.surgery_details') }} : <span style="color: #0000FF">{{ streamline_date($surgery->created_at) }}</span>
|
||||
</h5>
|
||||
|
||||
<br>
|
||||
|
||||
@php
|
||||
$total_amount_to_pay = 0;
|
||||
@endphp
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-light table-sm table-borderless">
|
||||
<tr>
|
||||
<th scope="row">{{ __('surgery.patient_number') }}</th>
|
||||
<td>{{ $patient->number}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('surgery.theatre_location') }}</th>
|
||||
<td>
|
||||
{{ get_name($surgery->theatre_location , 'id', 'name', 'theatre_locations') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('surgery.patient_names') }}</th>
|
||||
<td>{{ $patient->first_name}} {{ $patient->last_name}}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.age') }}</th>
|
||||
<td>
|
||||
{{ get_patients_age($patient->date_of_birth) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ __('inpatient.residence') }}</th>
|
||||
<td>{{ patient_residence($patient->id) }}</td>
|
||||
<td width="60" style="border-top: 0px;"> </td>
|
||||
<th>{{ __('inpatient.gender') }}</th>
|
||||
<td>
|
||||
{{ $patient->gender == 1 ? __('inpatient.male') : __('inpatient.female') }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ __('surgery.surgery_performed') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$procedures_array = explode(",", $surgery->procedure_id);
|
||||
@endphp
|
||||
@for ($i = 0; $i < count($procedures_array); $i++)
|
||||
- {{ get_name($procedures_array[$i],'id','name','procedures') }}<br>
|
||||
@endfor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.primary_diagnosis') }}</th>
|
||||
<td>{{ isset($diagnoses[$surgery->primary_diagnosis]) ? $diagnoses[$surgery->primary_diagnosis] : "" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.other_diagnoses') }}</th>
|
||||
<td>
|
||||
@php
|
||||
$other_diagnoses_array = @unserialize($surgery->other_diagnoses);
|
||||
@endphp
|
||||
|
||||
@if(!empty($other_diagnoses_array) && $other_diagnoses_array[0] != "")
|
||||
@foreach($other_diagnoses_array as $diagnosis)
|
||||
<ul>
|
||||
@if($diagnosis != "")
|
||||
<li>{{ $diagnoses[$diagnosis] }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.date') }}</th>
|
||||
<td>{{ streamline_date($surgery->created_at) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.time_of_commencement') }}</th>
|
||||
<td>{{ get_name($surgery->anaesthesia_id,'id','time_commenced','anaesthesias') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.surgeon') }}</th>
|
||||
<td>{{ is_numeric($surgery->surgeon) ? get_full_name($surgery->surgeon, 'id', 'first_name', 'last_name', 'users') : $surgery->surgeon }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.theatre') }}</th>
|
||||
<td>{{ get_name($surgery->theatre_location, 'id', 'name', 'theatre_locations') }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.theatre_incharge') }}</th>
|
||||
<td>{{ is_numeric($surgery->theatre_in_charge) ? get_full_name($surgery->theatre_in_charge, 'id', 'first_name', 'last_name', 'users') : $surgery->theatre_in_charge }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.assistant_surgeon') }}</th>
|
||||
<td>{{ get_full_name($surgery->assistant_surgeon, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ __('surgery.scrub_nurse') }}</th>
|
||||
<td>{{ get_full_name($surgery->scrub_nurse, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.other_scrub_staff') }}</th>
|
||||
<td>{{ get_full_name($surgery->other_scrub_staff, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.estimated_blood_loss') }}</th>
|
||||
<td>{{ $surgery->estimated_blood_loss }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.anaesthesia_duration') }}</th>
|
||||
<td>{{ $surgery->anaesthesia_duration }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.anaesthesia') }}</th>
|
||||
<td>{{ is_null($surgery->anaesthesia_id) ? "None Given" : get_name(get_name($surgery->anaesthesia_id, "id", "anaesthesia_type", "anaesthesias"), "id", "name", "procedures") }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.outcome') }}</th>
|
||||
<td>{{ (is_numeric($surgery->outcome)) ? get_name($surgery->outcome, 'id', 'name', 'outcomes') : "Not Available" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.time_surgery_completed') }}</th>
|
||||
<td>{{ streamline_time($surgery->time_surgery_completed)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ __('surgery.date_of_surgery') }}</th>
|
||||
<td>{{ streamline_date($surgery->date_surgery_completed) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
<b>{{ __('surgery.comments') }}</b>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table color-bordered-table success-bordered-table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{!! nl2br(e($surgery->comments)) !!}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware('auth:api')->get('/theatre', function () {
|
||||
return "Theatre";
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group(['middleware' => ['auth', 'disablebackbutton', 'user-locale','subscription-tracking', 'password-expiry']], function () {
|
||||
/*theatre surgery module */
|
||||
Route::any('theatre_drugs_stock_sheet', 'TheatreSurgeryController@drugs_stock_sheet')->name('theatre.drugs_stock_sheet');
|
||||
Route::any('update_theatre_drugs_stock_sheet', 'TheatreSurgeryController@update_drugs_stock_sheet')->name('theatre.update_drugs_stock_sheet');
|
||||
Route::any('theatre_sundries_stock_sheet', 'TheatreSurgeryController@sundries_stock_sheet')->name('theatre.sundries_stock_sheet');
|
||||
Route::any('update_theatre_sundries_stock_sheet', 'TheatreSurgeryController@update_sundries_stock_sheet')->name('theatre.update_sundries_stock_sheet');
|
||||
Route::any('/theatre_surgery/details/{id}', 'TheatreSurgeryController@details')->name('theatre_surgery.details');
|
||||
Route::post('add_new_theatre_location', 'TheatreSurgeryController@add_new_theatre_location');
|
||||
Route::post('quick_add_user', 'TheatreSurgeryController@theatre_surgery_quick_store');
|
||||
Route::resource('theatre_surgery', 'TheatreSurgeryController');
|
||||
Route::get('get_cadre', 'TheatreSurgeryController@get_cadre');
|
||||
Route::any('quick_add_procedure', 'TheatreSurgeryController@quick_add_procedure')->name('theatre_surgery.quick_add_procedure');
|
||||
Route::any('surgery_print/{surgery_id}', 'TheatreSurgeryController@surgery_print')->name('theatre_surgery.details_print');
|
||||
|
||||
/* Theatre anaesthetics module */
|
||||
Route::any('/anaesthetics/view_history/{id}', 'TheatreAnaestheticsController@view_history')->name('theatre_anaesthetics.view_history');
|
||||
Route::any('/anaesthetics/remove_drug_from_inpatient_bill/{record_id}/{drug_id}', 'TheatreAnaestheticsController@remove_drug_from_inpatient_bill');
|
||||
Route::any('/anaesthetics/add_drug_to_inpatient_bill/{record_id}/{drug_id}', 'TheatreAnaestheticsController@add_drug_to_inpatient_bill');
|
||||
Route::any('/anaesthetics/history', 'TheatreAnaestheticsController@history')->name('theatre_anaesthetics.history');
|
||||
Route::resource('anaesthetics', 'TheatreAnaestheticsController');
|
||||
Route::post('get_procedure_slug', 'TheatreAnaestheticsController@get_procedure_slug');
|
||||
Route::post('add_new_doctor', 'TheatreAnaestheticsController@add_new_doctor_or_nurse');
|
||||
Route::post('add_new_nurse', 'TheatreAnaestheticsController@add_new_doctor_or_nurse');
|
||||
Route::post('add_new_airway', 'TheatreAnaestheticsController@add_new_airway');
|
||||
Route::post('add_new_analgesic', 'TheatreAnaestheticsController@add_new_analgesic');
|
||||
Route::any('anaesthesia_print/{surgery_id}', 'TheatreAnaestheticsController@anaesthesia_print')->name('theatre_anaesthetics.details_print');
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
image: alpine/git:latest
|
||||
|
||||
pipelines:
|
||||
branches:
|
||||
main:
|
||||
- step:
|
||||
name: Merge To Beta
|
||||
script:
|
||||
- git remote set-url origin https://Kabricks:${APP_SECRET}@bitbucket.org/dcsammi/${BITBUCKET_REPO_SLUG}
|
||||
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
|
||||
- git fetch
|
||||
- git checkout beta
|
||||
- git merge main
|
||||
- git commit --amend -m "[skip ci] Merge changes from main"
|
||||
- git push
|
||||
- step:
|
||||
name: Deploy To Test
|
||||
script:
|
||||
- echo "Ready to deploy to demo or production!"
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Theatre",
|
||||
"alias": "theatre",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"priority": 0,
|
||||
"providers": [
|
||||
"Modules\\Theatre\\Providers\\TheatreServiceProvider"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
Reference in New Issue
Block a user