Эх сурвалжийг харах

Merge branch 'dev' into dev-vj

Vijayakrishnan 4 жил өмнө
parent
commit
f9eb411d7f

+ 1 - 1
app/Http/Controllers/PatientController.php

@@ -20,7 +20,7 @@ class PatientController extends Controller
     {
         $mcpPros = Pro::where('is_enrolled_as_mcp', true)->get();
         $facilities = Facility::where('is_active', true)->get();
-        $devices = BDTDevice::where('is_active', true)->get();
+        $devices = BDTDevice::where('is_active', true)->orderBy('imei', 'asc')->get();
         $dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
             ->where('category', 'dx')
             ->where('is_removed', false)

+ 1 - 1
resources/views/app/patient/care-month/dashboard.blade.php

@@ -319,7 +319,7 @@
                                     <div class="pb-1 d-flex align-items-center">
                                         <span class="text-secondary mr-2">{{ $measurement->measurement->device_category }}:</span>
                                         @if($measurement->measurement->device_category === 'WEIGHT')
-                                            <b class="text-nowrap">{{ round($measurement->measurement->value_weight / 1000, 1) }} Kg</b>
+                                            <b class="text-nowrap">{{ round(($measurement->measurement->value_weight / 1000)*2.20462, 1) }} lb</b>
                                         @elseif($measurement->measurement->device_category === 'BP')
                                             <b class="text-nowrap">{{ $measurement->measurement->systolic_bp_in_mm_hg }}/{{ $measurement->measurement->diastolic_bp_in_mm_hg }} mmHg</b>
                                         @endif

+ 2 - 2
resources/views/app/patient/dashboard.blade.php

@@ -51,7 +51,7 @@
                                         @foreach($devices as $device)
                                             @if(!$patient->hasDevice($device))
                                             <option value="{{$device->uid}}">
-                                                {{$device->category}} (IMEI: {{$device->imei}})
+                                                {{$device->imei}} ({{$device->category}})
                                             </option>
                                             @endif
                                         @endforeach
@@ -157,7 +157,7 @@
                                     <div class="pb-1 d-flex align-items-center">
                                         <span class="text-secondary mr-2">{{ $measurement->measurement->device_category }}:</span>
                                         @if($measurement->measurement->device_category === 'WEIGHT')
-                                            <b>{{ round($measurement->measurement->value_weight / 1000, 1) }} Kg</b>
+                                            <b>{{ round(($measurement->measurement->value_weight / 1000)*2.20462, 1) }} lb</b>
                                         @elseif($measurement->measurement->device_category === 'BP')
                                             <b>{{ $measurement->measurement->systolic_bp_in_mm_hg }}/{{ $measurement->measurement->diastolic_bp_in_mm_hg }} mmHg</b>
                                         @endif

+ 1 - 1
resources/views/app/patient/devices.blade.php

@@ -14,7 +14,7 @@
                             <option value=""> --select-- </option>
                             @foreach($devices as $device)
                                 <option value="{{$device->uid}}">
-                                    {{$device->category}} (IMEI: {{$device->imei}})
+                                {$device->imei}} ({{$device->category}}) 
                                 </option>
                             @endforeach
                         </select>

+ 1 - 1
resources/views/app/patient/measurements.blade.php

@@ -120,7 +120,7 @@
                         <td class="px-2">{{ $measurement->measurement->device_category }}</td>
                         <td class="px-2">
                             @if($measurement->measurement->device_category === 'WEIGHT')
-                                <b>{{ round($measurement->measurement->value_weight / 1000, 1) }} Kg</b>
+                                <b>{{ round(($measurement->measurement->value_weight / 1000)*2.20462, 1) }} lb</b>
                             @elseif($measurement->measurement->device_category === 'BP')
                                 <b>{{ $measurement->measurement->systolic_bp_in_mm_hg }}/{{ $measurement->measurement->diastolic_bp_in_mm_hg }} mmHg</b>
                             @endif

+ 56 - 1
resources/views/app/patient/partials/appointments.blade.php

@@ -7,7 +7,62 @@
             @include('app/patient/partials/_appointment-form', ['appointment' => false])
         </div>--}}
         <span class="mx-2 text-secondary">|</span>
-        <a href="/patients/view/{{$patient->uid}}/manage-appointment">Add</a>
+        <a href="/patients/view/{{$patient->uid}}/manage-appointment">Add</a> <span class="mx-2 text-secondary">|</span>
+        <div class="py-2">
+            @if($pro->isWorkingOnClient($patient))
+                {{-- stop work on client --}}
+                <div moe>
+                    <form url="/api/proClientWork/KillRunningWorkForSelf" class="mcp-theme-1" show>
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <div>
+                            <button submit class="btn btn-sm btn-warning text-white font-weight-bold small"><i class="fa fa-stop"></i> Work: Stop</button>
+                        </div>
+                    </form>
+                </div>
+            @else
+                {{-- start work on client --}}
+                <div moe>
+                    <form url="/api/proClientWork/create" class="mcp-theme-1" show>
+                        <input type="hidden" name="clientUid" value="{{$patient->uid}}">
+                        <div>
+                            <button submit class="btn btn-sm btn-primary text-white font-weight-bold small"><i class="fa fa-play"></i> Work: Start</button>
+                        </div>
+                    </form>
+                </div>
+            @endif
+        </div>
+        <div class="px-2 mr-auto">
+            @if($pro->isWorkingOnClient($patient))
+                <div class="d-flex align-items-center">
+                    @if($patient->active_mcp_request_id)
+                        {{-- kill mcp request for client --}}
+                        <div moe relative class="ml-3">
+                            <a href="" start show class="btn btn-sm btn-danger text-white font-weight-bold small">Kill MCP Request</a>
+                            <form url="/api/mcpRequest/kill" class="mcp-theme-1" right>
+                                <input type="hidden" name="clientUid" value="{{$patient->uid}}">
+                                <p>Kill the MCP Request for this patient?</p>
+                                <div>
+                                    <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
+                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                    @else
+                        {{-- create mcp request for client --}}
+                        <div moe relative class="ml-3">
+                            <a href="" start show class="btn btn-sm btn-primary text-white font-weight-bold small">Create MCP Request</a>
+                            <form url="/api/mcpRequest/createAsPro" class="mcp-theme-1" right>
+                                <p>Create an MCP Request for this patient?</p>
+                                <div>
+                                    <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
+                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                    @endif
+                </div>
+            @endif
+        </div>
     </div>
     <table class="table table-sm border-0 m-0">
         <tbody>

+ 16 - 9
resources/views/app/patient/partials/dx-table-row.blade.php

@@ -3,10 +3,10 @@
         <td class="px-2">{{$line->content_text}}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"ICD"} }}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"Chronic or Acute"} }}</td>
-        <td class="px-2">{{ @$line->contentDetail()->{"Prognosis"} }}</td>
-        <td class="px-2">{{ @$line->contentDetail()->{"History"} }}</td>
-        <td class="px-2">{{ @$line->contentDetail()->{"Treatment Goal"} }}</td>
-        <td class="px-2">{{ @$line->contentDetail()->{"Treatment Plan"} }}</td>
+        <td class="px-2"><pre style="white-space:pre-wrap">{{ @$line->contentDetail()->{"Prognosis"} }}</pre></td>
+        <td class="px-2"><pre style="white-space:pre-wrap">{{ @$line->contentDetail()->{"History"} }}</pre></td>
+        <td class="px-2"><pre style="white-space:pre-wrap">{{ @$line->contentDetail()->{"Treatment Goal"} }}</pre></td>
+        <td class="px-2"><pre style="white-space:pre-wrap">{{ @$line->contentDetail()->{"Treatment Plan"} }}</pre></td>
         @if(@$showCreated)
         <td class="px-2">{{ $line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
         <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
@@ -22,14 +22,17 @@
                                 <input type="hidden" name="category" value="dx">
                                 <input type="hidden" name="IsCurrent" value="1">
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1 float-left">ICD</label>
                                     <input type="text" class="form-control form-control-sm" name="ICD"
-                                           value="{{ @$line->contentDetail()->{"ICD"} }}" placeholder="ICD">
+                                           value="{{ @$line->contentDetail()->{"ICD"} }}" placeholder="">
                                 </div>
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1">Title</label>
                                     <input type="text" class="form-control form-control-sm" name="contentText"
                                            value="{{$line->content_text}}" placeholder="Title">
                                 </div>
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1 float-left">Chronic or Acute (select one)</label>
                                     <select name="Chronic or Acute" class="form-control form-control-sm pl-1">
                                         <option value="">Chronic or Acute (select one)</option>
                                         <option
@@ -39,20 +42,24 @@
                                     </select>
                                 </div>
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1 float-left">Prognosis</label>
                                     <input type="text" class="form-control form-control-sm" name="Prognosis"
-                                           value="{{ @$line->contentDetail()->{"Prognosis"} }}" placeholder="Prognosis">
+                                           value="{{ @$line->contentDetail()->{"Prognosis"} }}" placeholder="">
                                 </div>
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1 float-left">History</label>
                                     <textarea type="text" class="form-control form-control-sm" name="History"
-                                              placeholder="History">{{ @$line->contentDetail()->{"History"} }}</textarea>
+                                              placeholder="">{{ @$line->contentDetail()->{"History"} }}</textarea>
                                 </div>
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1 float-left">Treatment Goal</label>
                                     <textarea type="text" class="form-control form-control-sm" name="Treatment Goal"
-                                              placeholder="Treatment Goal">{{ @$line->contentDetail()->{"Treatment Goal"} }}</textarea>
+                                              placeholder="">{{ @$line->contentDetail()->{"Treatment Goal"} }}</textarea>
                                 </div>
                                 <div class="mb-2">
+                                    <label for="" class="control-label text-sm mb-1 float-left">Treatment Plan</label>
                                     <textarea type="text" class="form-control form-control-sm" name="Treatment Plan"
-                                              placeholder="Treatment Plan">{{ @$line->contentDetail()->{"Treatment Plan"} }}</textarea>
+                                              placeholder="">{{ @$line->contentDetail()->{"Treatment Plan"} }}</textarea>
                                 </div>
                                 <div class="d-flex align-items-center">
                                     <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>

+ 46 - 15
resources/views/app/patient/partials/dx-table.blade.php

@@ -20,19 +20,37 @@ foreach($dxInfoLines as $line) {
                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
                 <input type="hidden" name="category" value="dx">
                 <input type="hidden" name="IsCurrent" value="1">
-                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="ICD" value="" placeholder="ICD"></div>
-                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Title"></div>
                 <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >ICD</label>
+                    <input type="text" class="form-control form-control-sm" name="ICD" value="">
+                </div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >Title</label>
+                    <input type="text" class="form-control form-control-sm" name="contentText" value="">
+                </div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >Chronic or Acute (select one)</label>
                     <select name="Chronic or Acute" class="form-control form-control-sm pl-1">
-                        <option value="">Chronic or Acute (select one)</option>
                         <option value="Chronic">Chronic</option>
                         <option value="Acute">Acute</option>
                     </select>
                 </div>
-                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Prognosis" value="" placeholder="Prognosis"></div>
-                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="History" value="" placeholder="History"></textarea></div>
-                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="Treatment Goal" value="" placeholder="Treatment Goal"></textarea></div>
-                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="Treatment Plan" value="" placeholder="Treatment Plan"></textarea></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >Prognosis</label>
+                    <input type="text" class="form-control form-control-sm" name="Prognosis" value="">
+                </div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >History</label>
+                    <textarea type="text" class="form-control form-control-sm" name="History" value="""></textarea>
+                </div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >Treatment Goal</label>
+                    <textarea type="text" class="form-control form-control-sm" name="Treatment Goal" value=""></textarea>
+                </div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm  mb-1" >Treatment Plan</label>
+                    <textarea type="text" class="form-control form-control-sm" name="Treatment Plan" value="" ></textarea>
+                </div>
                 <div class="d-flex align-items-center">
                     <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
                     <button class="btn btn-sm btn-default mr-2 border" type="button" cancel>Cancel</button>
@@ -56,12 +74,12 @@ foreach($dxInfoLines as $line) {
             </form>
         </div>
     </div>
-    <table class="table table-striped table-sm table-bordered mb-0">
+    <table class="table table-striped table-sm table-bordered mb-0" style="table-layout:fixed">
         <thead>
         <tr>
             <th class="px-2 text-secondary">Title</th>
             <th class="px-2 text-secondary">ICD</th>
-            <th class="px-2 text-secondary w-60px">Chr/Act</th>
+            <th class="px-2 text-secondary w-100px">Chr/Act</th>
             <th class="px-2 text-secondary">Prognosis</th>
             <th class="px-2 text-secondary">History</th>
             <th class="px-2 text-secondary">Goal</th>
@@ -84,19 +102,32 @@ foreach($dxInfoLines as $line) {
                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
                 <input type="hidden" name="category" value="dx">
                 <input type="hidden" name="IsCurrent" value="0">
-                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="ICD" value="" placeholder="ICD"></div>
-                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Title"></div>
                 <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1">ICD</label>
+                    <input type="text" class="form-control form-control-sm" name="ICD" value="" placeholder=""></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1">Title</label>
+                    <input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder=""></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1"></label>
                     <select name="Chronic or Acute" class="form-control form-control-sm pl-1">
                         <option value="">Chronic or Acute (select one)</option>
                         <option value="Chronic">Chronic</option>
                         <option value="Acute">Acute</option>
                     </select>
                 </div>
-                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Prognosis" value="" placeholder="Prognosis"></div>
-                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="History" value="" placeholder="History"></textarea></div>
-                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="Treatment Goal" value="" placeholder="Treatment Goal"></textarea></div>
-                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="Treatment Plan" value="" placeholder="Treatment Plan"></textarea></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1">Prognosis</label>
+                    <input type="text" class="form-control form-control-sm" name="Prognosis" value="" placeholder=""></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1">History</label>
+                    <textarea type="text" class="form-control form-control-sm" name="History" value="" placeholder=""></textarea></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1">Treatment Goal</label>
+                    <textarea type="text" class="form-control form-control-sm" name="Treatment Goal" value="" placeholder=""></textarea></div>
+                <div class="mb-2">
+                    <label for="" class="control-label text-sm mb-1">Treatment Plan</label>
+                    <textarea type="text" class="form-control form-control-sm" name="Treatment Plan" value="" placeholder=""></textarea></div>
                 <div class="d-flex align-items-center">
                     <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
                     <button class="btn btn-sm btn-default mr-2 border" type="button" cancel>Cancel</button>

+ 1 - 1
resources/views/app/patient/partials/rx.blade.php

@@ -121,7 +121,7 @@
                                         </div>
                                     </form>
                                 </div>
-                                <span class="content-html text-nowrap">
+                                <span class="content-html">
                                     <b>{{$line->contentText}}</b>
                                     @if(!empty(getVal($line->contentDetail, "strength")))
                                         <span class="text-secondary">/</span>

+ 1 - 60
resources/views/layouts/patient.blade.php

@@ -494,66 +494,7 @@
                     </div>
                     <div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
 
-                        <div class="mr-auto py-2">
-                            @if($pro->isWorkingOnClient($patient))
-                                {{-- stop work on client --}}
-                                <div moe>
-                                    <form url="/api/proClientWork/KillRunningWorkForSelf" class="mcp-theme-1" show>
-                                        <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                        <div>
-                                            <button submit class="btn btn-sm btn-danger text-white font-weight-bold small">Stop working on this client</button>
-                                        </div>
-                                    </form>
-                                </div>
-                            @else
-                                {{-- start work on client --}}
-                                <div moe>
-                                    <form url="/api/proClientWork/create" class="mcp-theme-1" show>
-                                        <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                                        <div>
-                                            <button submit class="btn btn-sm btn-primary text-white font-weight-bold small">Start working on this client</button>
-                                        </div>
-                                    </form>
-                                </div>
-                            @endif
-                        </div>
-
-                        @if($patient->active_mcp_request_id)
-                            <b>This patient has an active MCP request</b>
-                        @else
-                            <b>This patient does not have an active MCP request</b>
-                        @endif
-
-                        @if($pro->isWorkingOnClient($patient))
-                            <div class="d-flex align-items-center py-2">
-                                @if($patient->active_mcp_request_id)
-                                    {{-- kill mcp request for client --}}
-                                    <div moe relative class="ml-3">
-                                        <a href="" start show class="btn btn-sm btn-danger text-white font-weight-bold small">Kill MCP Request</a>
-                                        <form url="/api/mcpRequest/kill" class="mcp-theme-1" right>
-                                            <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                                            <p>Kill the MCP Request for this patient?</p>
-                                            <div>
-                                                <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
-                                                <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                            </div>
-                                        </form>
-                                    </div>
-                                @else
-                                    {{-- create mcp request for client --}}
-                                    <div moe relative class="ml-3">
-                                        <a href="" start show class="btn btn-sm btn-primary text-white font-weight-bold small">Create MCP Request</a>
-                                        <form url="/api/mcpRequest/createAsPro" class="mcp-theme-1" right>
-                                            <p>Create an MCP Request for this patient?</p>
-                                            <div>
-                                                <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
-                                                <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                            </div>
-                                        </form>
-                                    </div>
-                                @endif
-                            </div>
-                        @endif
+                       
                         @if($patient->mcp_pro_id !== $pro->id && $patient->active_mcp_request_id)
                             {{-- claim client --}}
                             <div moe relative class="ml-2">