@extends('layouts.main') @push('scripts') @endpush @push('styles') @endpush @section('content')

Add consultation

@php $patient_id = session('patient_id'); $episode_id = session('episode_id'); $episode_created_at = Carbon\Carbon::parse($episode->created_at); @endphp
@include('patients::allergies.header')

TRIAGE GRADE : @if($triage) @switch($triage->severe_grade) @case (1)
GREEN
@break @case (2)
YELLOW
@break @case (3)
RED
@break @default Triage grade not determined @endswitch @endif
Symptoms : @if($triage) @php $symptoms_array = explode(",", $triage->symptoms); @endphp @php $symptoms_duration_array = explode(",", $triage->symptom_duration); @endphp
@php $counter = 0; @endphp @for($i = 0; $i < count($symptoms_array); $i++) @endfor
Symptom Duration
{{ isset($symptoms[$symptoms_array[$i]]) ? $symptoms[$symptoms_array[$i]] : "" }} {{ isset($symptoms_duration_array[$i]) ? $symptoms_duration_array[$i] : "" }}
@else No symptoms recorded @endif
@if($triage) @php $observations_array = explode(',', $triage->observations); //i.e[temp=44,height=2] @endphp
@php $counter = 0; @endphp @foreach($observations_array as $observation) @php $item_array = explode('=', $observation); //i.e[temp,44] $counter++; @endphp @if($counter < 9) @endif @endforeach
Observation Value
{{ $item_array[0] }} {{ $item_array[1] }}
@php $counter=0; @endphp @foreach($observations_array as $observation) @php $item_array = explode('=', $observation); //i.e[temp,44] $counter++; @endphp @if($counter >= 9) @endif @endforeach
Observation Value
{{ isset($item_array[0]) ? $item_array[0] : "" }} {{ isset($item_array[1]) ? $item_array[1] : "" }}
@else No observations recorded @endif
Triage done by {!! isset($triage) ? ''.\Streamline\Models\User::withTrashed()->find($triage->created_by)->first_name. " ".\Streamline\Models\User::withTrashed()->find($triage->created_by)->last_name.' on '.streamline_date_time($triage->created_at).'' : "" !!}
@if(count($documents) > 0) @foreach($documents as $document)
  • {{ is_null($document->title) ? substr($document->description, 0, 5) : $document->title }}
  • @endforeach @else No patient documents available @endif
    {{ Form::open(['route' => 'consultation.store','data-toggle'=>'validator']) }}
    PRIMARY DIAGNOSIS PROMPT REFERENCES
    {{ Form::select('primary_diagnosis', $diagnoses, '', ['id'=>'primary_diagnosis','class' => 'form-control col-sm-12 compulsory', 'required']) }}
     
     
    # OTHER DIAGNOSIS PROMPT REFERENCES
    {{ Form::select('other_diagnosis[]', $diagnoses, '', ['id'=>'other_diagnosis_id_1','class' => 'form-control col-sm-12 sec_d']) }}
     
     
    Add row Delete row
    RDT RBS
    {{ Form::checkbox('rdt', 1, false, ['id'=>'rdt_pos']) }} {{ Form::checkbox('rdt', 0, false, ['id'=>'rdt_neg']) }} {{ Form::text('rbs','',['class'=>'form-control']) }}

    Ordered Investigations

    @if(count($investigation_results) > 0) @foreach($investigation_results as $result) @php $investigation_ids_array = explode(',', $result->investigation_id); // authentication of investigations $per_investigation_array = explode(',', $result->per_investigation); $comments = explode(",", $result->comment); $results_values = explode(",", $result->value); @endphp @for($i = 0 ; $i < count($investigation_ids_array) ; $i++) @php $investigation = \Streamline\Models\Investigation::find($investigation_ids_array[$i]); @endphp @endfor @endforeach @elseif(count($ordered_investigations) > 0) @foreach($ordered_investigations as $investigation) @php $investigation_ids_array = explode(',', $investigation->investigation_id); @endphp @for($i = 0 ; $i < count($investigation_ids_array) ; $i++) @php $investigation = \Streamline\Models\Investigation::find($investigation_ids_array[$i]); @endphp @endfor @endforeach @else @endif
    Investigation Reference range Value Comment
    @if($investigation->insurance_coverage == 1 && patient_insurance_status($patient_id) == 1) {{ $investigation->name }} @else {{ $investigation->name }} @endif {{ $investigation->normal_ranges }} {!! $per_investigation_array[$i] == 0 ? 'Pending' : $results_values[$i] !!} {!! $per_investigation_array[$i] == 0 ? 'Pending' : $comments[$i] !!}
    Authenticated by{{ get_name($result->authenticated_by, 'id', 'first_name', 'users')}} {{ get_name($result->authenticated_by, 'id', 'last_name', 'users')}}
    @if($investigation->insurance_coverage == 1 && patient_insurance_status($patient_id) == 1) {{ $investigation->name }} @else {{ $investigation->name }} @endif {{ $investigation->normal_ranges }} Pending {{ $investigation->comments }}
    Investigations not ordered

    Ordered Sundries

    @if(count($ordered_sundries) > 0) @php $count = 1; @endphp @foreach($ordered_sundries as $ordered_sundry) @php $count++; @endphp @endforeach @else @endif
    # SUNDRY QUANTITY
    {{ $count }} {{ \Streamline\Models\Sundry::find($ordered_sundry->sundries_id)->name }} {!! $ordered_sundry->quantity !!}
    No sundry has been ordered.

    Treatment Given

    @if(!is_null($treatment)) @if($treatment->altered == 0) @php $drugs_array = explode(",", $treatment->drugs); $dosage_array = explode(",", $treatment->doses); $dosage2_array = explode(",", $treatment->dose2); $frequencies_array = explode(",", $treatment->frequencies); $duration_array = explode(",", $treatment->durations); $quantity_dispensed_array = explode(",", $treatment->quantities_dispensed); $instructions_array = explode(",", $treatment->instruction); for ($x = 0; $x < count($drugs_array); $x++) { $frequency_name = get_name($frequencies_array[$x], 'id', 'name', 'dosage_frequencies'); $unit = get_name($drugs_array[$x], 'id', 'name', 'drug_units'); $unit = $unit=="N/A"?"":$unit; $drug_unit = "" . $unit . ""; $dose2 = (empty($dosage2_array[$x])) ? "" : " | " . $dosage2_array[$x] . $drug_unit; $row_num = $x+1; echo "" ."" . "" . "" . "" . ""; if ($treatment->dispensed == 1): echo ""; else: echo ""; endif; if(isset($instructions_array[$x])){ echo ""; } else { echo ""; } echo ""; } @endphp @endif @else @endif
    # DRUG NAME DOSAGE DURATION QUANTITY STATUS INSTRUCTION
    " .$row_num."."."" . get_name($drugs_array[$x], 'id', "name", 'drugs') . "" . $dosage_array[$x] . $drug_unit . $dose2 . "  " . $frequency_name . "" . $duration_array[$x] . "" . $quantity_dispensed_array[$x] . "DispensedPending" . trim($instructions_array[$x]). "
    No prescription made yet

    Ordered Procedures

    @if(count($ordered_procedures) > 0) @php $count = 1; @endphp @foreach($ordered_procedures as $ordered_procedure) @php $count++; @endphp @endforeach @else @endif
    # PROCEDURE STATUS PERFORMED
    {{ $count }} {{ \Streamline\Models\Procedure::find($ordered_procedure->procedure_id)->name }} {!! $ordered_procedure->performed == 1 ? 'Performed' : 'Pending' !!}
    No procedure has been ordered.
    {{ Form::button('Investigation',['type'=>'submit','class'=>'btn btn-info btn-block','name'=>'submit-btn','value'=>'investigation']) }}
    {{ Form::button('Treatment',['type'=>'submit','class'=>'btn btn-default btn-block','name'=>'submit-btn','value'=>'treatment']) }}

    {{ Form::button('Procedures',['type'=>'submit','class'=>'btn btn-inverse btn-block','name'=>'submit-btn','value'=>'procedures']) }}
    {{ Form::button('Sundries',['type'=>'submit','class'=>'btn btn-primary btn-block','name'=>'submit-btn','value'=>'sundries']) }}

    Comments

    Outcome

    {{ Form::select('outcome', $outcomes, '7', ['id' => 'outcome', 'class' => 'form-control compulsory']) }}
    {{ Form::button('Complete consultation',['type'=>'submit','class'=>'btn btn-success btn-block','name'=>'submit-btn','value'=>'complete', 'onclick'=>'return confirm_outcome()']) }}
    {{ Form::close() }} @include('consultations.document.add') @endsection @push('scripts') @endpush