|
@@ -14,12 +14,159 @@
|
|
}else{
|
|
}else{
|
|
return '';
|
|
return '';
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $vitalMap = [
|
|
|
|
+ 'heightInches' => 'Ht. (in.)',
|
|
|
|
+ 'weightPounds' => 'Wt. (lbs.)',
|
|
|
|
+ 'temperatureF' => 'Temp. (F)',
|
|
|
|
+ 'pulseRatePerMinute' => 'Pulse',
|
|
|
|
+ 'respirationRatePerMinute' => 'Resp.',
|
|
|
|
+ 'pulseOx' => 'Pulse Ox.',
|
|
|
|
+ 'systolicBP' => 'SBP',
|
|
|
|
+ 'diastolicBP' => 'DBP',
|
|
|
|
+ 'smokingStatus' => 'Smoking Status'
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+ $vitalLabels = ['Ht. (in.)','Wt. (lbs.)','Temp. (F)','Pulse','Resp.','Pulse Ox.','SBP','DBP','Smoking Status'];
|
|
|
|
+
|
|
|
|
+ $vitalValues = [];
|
|
|
|
+
|
|
|
|
+ foreach($vitalLabels as $l){
|
|
|
|
+ $vitalValues[$l] = null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ foreach($patient->measurements as $measurement) {
|
|
|
|
+ if(!empty($measurement->label) && in_array($measurement->label, $vitalLabels)){
|
|
|
|
+ $vitalValues[$measurement->label] = [
|
|
|
|
+ 'value'=>$measurement->value,
|
|
|
|
+ 'effectiveDate' => $measurement->effective_date
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
?>
|
|
?>
|
|
|
|
|
|
<div class="row">
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<div class="col-6">
|
|
|
|
|
|
|
|
+ {{-- vitals --}}
|
|
|
|
+ <div class="mt-2 pb-1">
|
|
|
|
+ <div class="d-flex align-items-center mb-2 py-2 border-top border-bottom">
|
|
|
|
+ <h6 class="my-0 font-weight-bold text-secondary">Vitals</h6>
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <div moe>
|
|
|
|
+ <a start show class="py-0 font-weight-normal">Update</a>
|
|
|
|
+ <form url="/api/measurement/updateVitals">
|
|
|
|
+ <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Ht. (in.)<br>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="heightInches" value="{{$vitalValues['Ht. (in.)']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Wt. (lbs.)<br>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="weightPounds" value="{{$vitalValues['Wt. (lbs.)']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="control-label mb-0">Temp. (F)</label>
|
|
|
|
+ Temp. (F)<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="temperatureF" value="{{$vitalValues['Temp. (F)']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Pulse<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="pulseRatePerMinute" value="{{$vitalValues['Pulse']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Resp.<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="respirationRatePerMinute" value="{{$vitalValues['Resp.']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Pulse Ox.<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="pulseOx" value="{{$vitalValues['Pulse Ox.']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ SBP<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="systolicBP" value="{{$vitalValues['SBP']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ DBP<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="diastolicBP" value="{{$vitalValues['DBP']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Smoking Status<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="smokingStatus" value="{{$vitalValues['Smoking Status']['value']}}" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <a start show class="py-0 font-weight-normal"
|
|
|
|
+ href="/patients/view/{{ $patient->uid }}/measurements">
|
|
|
|
+ View All
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ <table class="table table-sm border-0 m-0">
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($vitalLabels as $label)
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-black p-0 border-0">
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <div moe relative class="mr-2">
|
|
|
|
+ <a class="on-hover-opaque" start show title="Delete">
|
|
|
|
+ <i class="font-size-11 fa fa-trash-alt text-danger"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/measurement/remove">
|
|
|
|
+ <input type="hidden" name="uid" value="{{ $measurement->uid }}">
|
|
|
|
+ <p class="small min-width-200px">Are you sure you want to delete this entry?</p>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <div moe class="mr-2">
|
|
|
|
+ <a class="on-hover-opaque" start show title="Update">
|
|
|
|
+ <i class="font-size-11 fa fa-edit text-primary"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/measurement/create">
|
|
|
|
+ <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="label" value="{{ $measurement->label }}" placeholder="Type">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input autofocus type="text" class="form-control form-control-sm" name="value" value="{{ $measurement->value }}" placeholder="Value">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <input type="date" class="form-control form-control-sm" name="effectiveDate" max="{{ date('Y-m-d') }}" value="{{ date('Y-m-d') }}">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <span>{{ $label }}:</span>
|
|
|
|
+ <span class="font-weight-bold ml-1">{{ $vitalValues[$label]['value'] }}</span>
|
|
|
|
+ <span class="font-weight-normal text-secondary ml-2 text-sm">(as on {{ friendly_date_time($vitalValues[$label]['effectiveDate'], false) }})</span>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ @if(!$patient->measurements || !count($patient->measurements) === 0)
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="text-secondary p-0 border-0">
|
|
|
|
+ No items to show
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endif
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
{{-- measurements --}}
|
|
{{-- measurements --}}
|
|
<div class="mt-2 pb-1">
|
|
<div class="mt-2 pb-1">
|
|
<div class="d-flex align-items-center mb-2 py-2 border-top border-bottom">
|
|
<div class="d-flex align-items-center mb-2 py-2 border-top border-bottom">
|
|
@@ -45,6 +192,55 @@
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<span class="mx-2 text-secondary">|</span>
|
|
<span class="mx-2 text-secondary">|</span>
|
|
|
|
+ <div moe>
|
|
|
|
+ <a start show class="py-0 font-weight-normal">Update Vitals</a>
|
|
|
|
+ <form url="/api/measurement/updateVitals">
|
|
|
|
+ <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Ht. (in.)<br>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="heightInches" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Wt. (lbs.)<br>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="weightPounds" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label for="" class="control-label mb-0">Temp. (F)</label>
|
|
|
|
+ Temp. (F)<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="temperatureF" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Pulse<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="pulseRatePerMinute" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Resp.<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="respirationRatePerMinute" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Pulse Ox.<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="pulseOx" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ SBP<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="systolicBP" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ DBP<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="diastolicBP" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ Smoking Status<br/>
|
|
|
|
+ <input type="text" class="form-control form-control-sm" name="smokingStatus" placeholder="">
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
<a start show class="py-0 font-weight-normal"
|
|
<a start show class="py-0 font-weight-normal"
|
|
href="/patients/view/{{ $patient->uid }}/measurements">
|
|
href="/patients/view/{{ $patient->uid }}/measurements">
|
|
View All
|
|
View All
|