Browse Source

Merge branch 'master' into dev-vj

Vijayakrishnan 3 years ago
parent
commit
3e47a5e428

+ 19 - 0
app/Helpers/helpers.php

@@ -149,6 +149,25 @@ if(!function_exists('get_current_date')) {
 }
 
 
+if(!function_exists('friendly_date_est')) {
+    function friendly_date_est($value, $default = '-') {
+
+        if(!$value || empty($value)) return $default;
+        try {
+
+            $realTimezone = resolve_timezone('EASTERN');
+            $date = new DateTime($value);
+            $date->setTimezone(new DateTimeZone($realTimezone));
+
+            return $date->format("m/d/y");
+
+        }
+        catch (Exception $e) {
+            return $e->getMessage();
+        }
+    }
+}
+
 
 if(!function_exists('friendly_date_time')) {
     function friendly_date_time($value, $includeTime = true, $default = '-', $long_year=false) {

+ 2 - 2
resources/views/app/patient/note/segment/suggestions_and_updates.blade.php

@@ -56,7 +56,7 @@
         <div class="alert alert-info">Your suggestion has been rejected.</div>
         @endif
         <div class="d-flex">
-            @if(($note->hcp_pro_id == $performer->pro_id ) && $segment->proposedSegmentSummarySuggestion->status == 'PENDING')
+            @if(($note->hcp_pro_id == $performer->pro_id || $performer->pro->pro_type === 'ADMIN') && $segment->proposedSegmentSummarySuggestion->status == 'PENDING')
             <div class="d-block mt-1 mr-2" moe>
                 <form url="/api/segment/acceptProposedSegmentSummarySuggestion" show>
                     <input type="hidden" name="uid" value="{{$segment->uid}}">
@@ -123,4 +123,4 @@
             </form>
         </div>
     </div>
-@endif
+@endif

+ 2 - 2
resources/views/app/practice-management/remote-monitoring-row-markup-by-pro-type.blade.php

@@ -19,7 +19,7 @@
             <span class="sort-data">{{$iPatient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}</span>/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}
             @if($iPatient->most_recent_cellular_bp_measurement_at)
                 <span class="text-sm text-secondary text-nowrap ml-1"
-                      title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_bp_measurement_at)}})</span>
+                      title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">({{friendly_date_est($iPatient->most_recent_cellular_bp_measurement_at)}})</span>
             @endif
         </div>
     </td>
@@ -28,7 +28,7 @@
             <span class="sort-data">{{$iPatient->most_recent_cellular_weight_value ? round($iPatient->most_recent_cellular_weight_value, 1) : '-'}}</span>
             @if($iPatient->most_recent_cellular_weight_measurement_at)
                 <span class="text-sm text-secondary text-nowrap ml-1"
-                      title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_weight_measurement_at)}})</span>
+                      title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date_est($iPatient->most_recent_cellular_weight_measurement_at)}})</span>
             @endif
         </div>
     </td>