|
@@ -73,8 +73,8 @@ foreach ($previousVitals as $p) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$newFormat['date'] = $p->note->effective_dateest; // unfriendly_date($p->created_at);
|
|
$newFormat['date'] = $p->note->effective_dateest; // unfriendly_date($p->created_at);
|
|
|
|
+ $previousData[] = $newFormat;
|
|
if(!isset($previousDataAssoc[$newFormat['date']])){
|
|
if(!isset($previousDataAssoc[$newFormat['date']])){
|
|
- $previousData[] = $newFormat;
|
|
|
|
$previousDataAssoc[$newFormat['date']] = $newFormat; // for easy iter to cols
|
|
$previousDataAssoc[$newFormat['date']] = $newFormat; // for easy iter to cols
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -197,13 +197,13 @@ if(!@$segment) {
|
|
<td class="bg-light {{!isset($copyTriggerAdded[$k]) ? 'px-2' : 'px-2'}} py-1 text-secondary position-relative">
|
|
<td class="bg-light {{!isset($copyTriggerAdded[$k]) ? 'px-2' : 'px-2'}} py-1 text-secondary position-relative">
|
|
<span data-type="{{$k}}">
|
|
<span data-type="{{$k}}">
|
|
@if($k === 'systolicBP')
|
|
@if($k === 'systolicBP')
|
|
- {{ @$previousDataAssoc[$pDay['date']]['systolicBP'] ?: '-' }}/{{ @$previousDataAssoc[$pDay['date']]['diastolicBP'] ?: '-' }}
|
|
|
|
|
|
+ {{ @$pDay['systolicBP'] ?: '-' }}/{{ @$pDay['diastolicBP'] ?: '-' }}
|
|
@elseif($k === 'heightInInches')
|
|
@elseif($k === 'heightInInches')
|
|
- {{$previousDataAssoc[$pDay['date']][$k] ? toFeetAndInches($previousDataAssoc[$pDay['date']][$k]) : '-' }}
|
|
|
|
|
|
+ {{$pDay[$k] ? toFeetAndInches($pDay[$k]) : '-' }}
|
|
@elseif($k === 'bmi')
|
|
@elseif($k === 'bmi')
|
|
- {{$previousDataAssoc[$pDay['date']][$k] ?: '-' }}
|
|
|
|
|
|
+ {{$pDay[$k] ?: '-' }}
|
|
<?php
|
|
<?php
|
|
- $prevBMI = $previousDataAssoc[$pDay['date']][$k] ? +($previousDataAssoc[$pDay['date']][$k]) : false;
|
|
|
|
|
|
+ $prevBMI = $pDay[$k] ? +($pDay[$k]) : false;
|
|
?>
|
|
?>
|
|
@if($prevBMI < 18.5)
|
|
@if($prevBMI < 18.5)
|
|
<span class="text-sm text-warning-mellow ml-1">Underweight</span>
|
|
<span class="text-sm text-warning-mellow ml-1">Underweight</span>
|
|
@@ -218,7 +218,7 @@ if(!@$segment) {
|
|
<span class="text-sm text-warning-mellow ml-1">Obese</span>
|
|
<span class="text-sm text-warning-mellow ml-1">Obese</span>
|
|
@endif
|
|
@endif
|
|
@else
|
|
@else
|
|
- {{$previousDataAssoc[$pDay['date']][$k] ?: '-' }}
|
|
|
|
|
|
+ {{$pDay[$k] ?: '-' }}
|
|
@endif
|
|
@endif
|
|
</span>
|
|
</span>
|
|
@if(!isset($copyTriggerAdded[$k]) && $k !== "bmi")
|
|
@if(!isset($copyTriggerAdded[$k]) && $k !== "bmi")
|