Samson Mutunga 3 gadi atpakaļ
vecāks
revīzija
6c7a3450e2

+ 14 - 0
app/Helpers/helpers.php

@@ -362,6 +362,20 @@ if(!function_exists('friendly_date')) {
     }
 }
 
+if(!function_exists('friendly_date_short')) {
+    function friendly_date_short($value) {
+        if(!$value || empty($value)) return '';
+        try {
+            $result = strtotime($value);
+            $result = date("m/d/y", $result);
+            return $result;
+        }
+        catch (Exception $e) {
+            return $value;
+        }
+    }
+}
+
 if(!function_exists('friendly_date_month_year')) {
     function friendly_date_month_year($value) {
         if(!$value || empty($value)) return '';

+ 12 - 12
resources/views/layouts/patient-header.blade.php

@@ -77,13 +77,13 @@ $addressParts .= implode(", ", $addressPart2);
       <div class="d-flex border-left pl-2 ml-2">
         <div class="mr-1">Cell. BP: <b>{{$patient->hasBPDevice()?'Yes':'No'}}</b>
           @if($patient->most_recent_cellular_bp_sbp_mm_hg && $patient->most_recent_cellular_bp_dbp_mm_hg)
-          (<b>{{$patient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}/{{$patient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}</b>@if($patient->most_recent_cellular_bp_measurement_at), {{friendly_date($patient->most_recent_cellular_bp_measurement_at)}} @endif)
+          (<b>{{$patient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}/{{$patient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}</b>@if($patient->most_recent_cellular_bp_measurement_at),{{friendly_date_short($patient->most_recent_cellular_bp_measurement_at)}} @endif)
           @endif
         </div>
-        <div class="mr-2">Wt. Scale: <b>{{$patient->hasWeightScaleDevice()?'Yes':'No'}}</b>
+        <div class="mr-2">Wt.: <b>{{$patient->hasWeightScaleDevice()?'Yes':'No'}}</b>
           @if($patient->most_recent_cellular_weight_value)
           (
-            <b>{{round($patient->most_recent_cellular_weight_value, 1)}}</b>@if($patient->most_recent_cellular_weight_measurement_at), {{friendly_date($patient->most_recent_cellular_weight_measurement_at)}}
+            <b>{{round($patient->most_recent_cellular_weight_value, 1)}}</b>@if($patient->most_recent_cellular_weight_measurement_at),{{friendly_date_short($patient->most_recent_cellular_weight_measurement_at)}}
             @endif
           )
           @endif
@@ -207,7 +207,7 @@ $addressParts .= implode(", ", $addressPart2);
             @endif
           </div>
 
-          <div class="mt-1">
+          <div class="">
             @if($patient->has_mcp_done_onboarding_visit !== 'YES')
             <span class="text-dark d-inline-flex align-items-center">
               <span class="mr-2">
@@ -262,7 +262,7 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </div>
         @if($patient->mcp && $patient->mcp->id === $pro->id || $pro->pro_type == 'ADMIN')
-        <div class="my-1">
+        <div class="">
           <label>Follow-up Freq (days):</label>
           <span>{!! is_null($patient->mcp_usual_follow_up_frequency_in_days) ? '<span class="text-danger">Not Set</span>' : $patient->mcp_usual_follow_up_frequency_in_days !!}</span>
           <div moe relative class="ml-2">
@@ -352,7 +352,7 @@ $addressParts .= implode(", ", $addressPart2);
         @endif
         @endif
         @if($patient->mcp && $pro->pro_type === 'ADMIN' && $pro->uid !== $patient->mcp->uid)
-        <form action="{{route('process-log-in-as')}}?redir={{request()->url()}}" onsubmit="window.top.localStorage.currentProUid = '{{$patient->mcp->uid}}';" method="POST" target="_top" class="d-inline-block mb-1">
+        <form action="{{route('process-log-in-as')}}?redir={{request()->url()}}" onsubmit="window.top.localStorage.currentProUid = '{{$patient->mcp->uid}}';" method="POST" target="_top" class="d-inline-block">
           @csrf
           <input type="hidden" name="proUid" value="{{$patient->mcp->uid}}">
           <button class="bg-transparent text-primary border-0 text-sm"><i class="fa fa-user on-hover-opaque"></i></button>
@@ -492,7 +492,7 @@ $addressParts .= implode(", ", $addressPart2);
     <div class="bg-light p-2 border" style="max-width: 215px;">
       <div>
         <div class="d-flex">
-          <label class="mb-1">Sticky Note:</label>
+          <label class="">Sticky Note:</label>
           <div moe relative wide class="ml-2 hide-inside-popup">
             <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
             <form url="/api/client/updateStickyNote" class="mcp-theme-1" right>
@@ -512,7 +512,7 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </div>
         @if($patient->sticky_note)
-        <div class="mb-2">
+        <div class="">
           <span class="d-block text-secondary">{{$patient->sticky_note ?? '-' }}</span>
         </div>
         @endif
@@ -526,7 +526,7 @@ $addressParts .= implode(", ", $addressPart2);
     </div>
     <div class="bg-light p-2 border">
       <ul class="vbox align-self-start patient-header-address mb-0">
-        <li class="mb-1 d-flex align-items-start">
+        <li class="d-flex align-items-start">
           <span class="aligned-icon">
             <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
           </span>
@@ -555,7 +555,7 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </li>
         @if($patient->cell_number)
-        <li class="mb-1">
+        <li class="">
           <span class="aligned-icon">
             <i class="fa fa-phone-alt" aria-hidden="true"></i>
           </span>
@@ -566,12 +566,12 @@ $addressParts .= implode(", ", $addressPart2);
         </li>
         @endif
         @if($patient->phone_home)
-        <li class="mb-1">
+        <li class="">
           <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
           {{$patient->phone_home}}
         </li>
         @endif
-        <li class="mb-1 d-flex align-items-start">
+        <li class="d-flex align-items-start">
           <div class="d-flex align-items-center flex-wrap">
             <span class="ml-1 mr-2"><i class="fa fa-envelope"></i>
               @if($hasConfirmedEmail)