|
@@ -0,0 +1,143 @@
|
|
|
+@extends ('layouts.patient')
|
|
|
+@section('inner-content')
|
|
|
+ <div class="">
|
|
|
+ <div class="d-flex align-items-end pb-3">
|
|
|
+ <h4 class="font-weight-bold m-0">
|
|
|
+ <i class="fa fa-link"></i>
|
|
|
+ Linked Companies
|
|
|
+ </h4>
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ <div moe relative class="">
|
|
|
+ <a href="#" start show class="col-2-button">
|
|
|
+ + Add
|
|
|
+ </a>
|
|
|
+ <form url="/api/companyClient/create" class="mcp-theme-1">
|
|
|
+ <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary text-sm">Company</label>
|
|
|
+ <select name="companyUid" class="form-control form-control-sm" required>
|
|
|
+ <option value="">--select--</option>
|
|
|
+ @foreach($companies as $company)
|
|
|
+ <option value="{{$company->uid}}">{{$company->name}}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
|
|
|
+ <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <table class="table table-sm table-striped table-bordered mb-0">
|
|
|
+ @if($patient->linkedCompanies && count($patient->linkedCompanies))
|
|
|
+ <thead>
|
|
|
+ <tr class="bg-light">
|
|
|
+ <th class="text-secondary border-0">Created At</th>
|
|
|
+ <th class="text-secondary border-0">Name</th>
|
|
|
+ <th class="text-secondary border-0">Is Active?</th>
|
|
|
+ <th class="text-secondary border-0">Status</th>
|
|
|
+ <th class="text-secondary border-0">Documents</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($patient->linkedCompanies as $linkedCompany)
|
|
|
+ <tr>
|
|
|
+ <td>{{ friendlier_date_time($linkedCompany->created_at) }}</td>
|
|
|
+ <td>{{$linkedCompany->company->name}}</td>
|
|
|
+ <td>{{ $linkedCompany->is_active? 'Yes': 'No' }}</td>
|
|
|
+ <td>
|
|
|
+ {{ $linkedCompany->status }}
|
|
|
+ <span moe class="ml-1" relative>
|
|
|
+ <a class="" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
+ <form url="/api/companyClient/update-status" right>
|
|
|
+ <input type="hidden" name="uid" value="{{$linkedCompany->uid}}">
|
|
|
+ <select name="status" required>
|
|
|
+ <option {{$linkedCompany->status == 'New' ? 'selected': ''}}>New<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Eligibility Verified' ? 'selected': ''}}>Eligibility Verified<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Eligibility Pending' ? 'selected': ''}}>Eligibility Pending<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Eligibility Denied/Not Eligibility' ? 'selected': ''}}>Eligibility Denied/Not Eligibility<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Initial Consult' ? 'selected': ''}}>Initial Consult<option/>
|
|
|
+ <option {{$linkedCompany->status == 'HST Delivered' ? 'selected': ''}}>HST Delivered<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Study Pending' ? 'selected': ''}}>Study Pending<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Study Completed' ? 'selected': ''}}>Study Completed<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Study Interpreted' ? 'selected': ''}}>Study Interpreted<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Post HST Visit' ? 'selected': ''}}>Post HST Visit<option/>
|
|
|
+ <option {{$linkedCompany->status == 'CPAP Rx' ? 'selected': ''}}>CPAP Rx<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Oral Appliance Rx' ? 'selected': ''}}>Oral Appliance Rx<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Not Interested' ? 'selected': ''}}>Not Interested<option/>
|
|
|
+ <option {{$linkedCompany->status == 'In Lab Study' ? 'selected': ''}}>In Lab Study<option/>
|
|
|
+ <option {{$linkedCompany->status == 'Unresponsive' ? 'selected': ''}}>Unresponsive<option/>
|
|
|
+ </select>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <h6>Documents</h6>
|
|
|
+ <span moe class="ml-1" relative>
|
|
|
+ <a class="" href="" show start>Upload</a>
|
|
|
+ <form url="/api/companyClientDocument/create" right>
|
|
|
+ <input type="hidden" name="companyClientUid" value="{{$linkedCompany->uid}}">
|
|
|
+ <div class="m-2">
|
|
|
+ <label for="" class="control-label">File name</label>
|
|
|
+ <input type="text" class="form-control" name="name" required>
|
|
|
+ </div>
|
|
|
+ <div class="m-2">
|
|
|
+ <input type="file" class="form-control" name="file">
|
|
|
+ </div>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ @if(count($linkedCompany->documents))
|
|
|
+ <table class="table">
|
|
|
+ @foreach($linkedCompany->documents as $document)
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <a native target="_blank" href="/api/companyClientDocument/download/{{$document->uid}}">
|
|
|
+ {{$document->name}}
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <span moe class="ml-1" relative>
|
|
|
+ <a class="" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
+ <form url="/api/companyClientDocument/updateName" right>
|
|
|
+ <input type="hidden" name="uid" value="{{$document->uid}}">
|
|
|
+ <div class="m-2">
|
|
|
+ <label for="" class="control-label">File name</label>
|
|
|
+ <input type="text" class="form-control" name="name" value="{{$document->name}}" required>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </table>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ @else
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary p-3">No linked accounts</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ @endif
|
|
|
+ </table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+@endsection
|