|
@@ -1,48 +1,37 @@
|
|
|
+<?php
|
|
|
+ $intakeDataFields = [
|
|
|
+ 'height' => 'Height',
|
|
|
+ 'weight' => 'Weight',
|
|
|
+ 'last_vitamin_d' => 'Last Vitamin D',
|
|
|
+ 'ethnicity' => 'Ethnicity',
|
|
|
+ 'previous_dx' => 'Previous Dx',
|
|
|
+ 'hypertension' => 'Hypertension',
|
|
|
+ 'diabetes' => 'Diabetes',
|
|
|
+ 'copd' => 'COPD',
|
|
|
+ 'arthritis' => 'Arthritis',
|
|
|
+ ];
|
|
|
+ $patientCanvasData = json_decode($patient->canvas_data ?? null);
|
|
|
+ $patientIntakeData = null;
|
|
|
+ if($patientCanvasData && @$patientCanvasData->INTAKE_DATA){
|
|
|
+ $patientIntakeData = @$patientCanvasData->INTAKE_DATA;
|
|
|
+ }
|
|
|
+?>
|
|
|
<div id="patient-intake-data-form" visit-moe moe relative wide class="ml-2 hide-inside-popup">
|
|
|
<a start show><i class="fa fa-edit"></i></a>
|
|
|
<form id="patientIntakeDataForm" url="/api/client/updateCanvasData" class="mcp-theme-1" right>
|
|
|
- @if($patient->canvas_data)
|
|
|
+ @if($patientIntakeData)
|
|
|
@include('app.patient.intake-data.patient-intake-data-display')
|
|
|
@endif
|
|
|
+ <div class="bg-light p-2 font-weight-bold mb-2">Update Patient Intake Data</div>
|
|
|
<input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
<input type="hidden" name="key" value="INTAKE_DATA">
|
|
|
<input type="hidden" name="data">
|
|
|
+ @foreach($intakeDataFields as $key=>$label)
|
|
|
<div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Height</label>
|
|
|
- <input name="height" class="form-control" />
|
|
|
+ <label class="text-secondary text-sm font-weight-bold">{{ $label }}</label>
|
|
|
+ <input name="{{$key}}" class="form-control" value="{{ $patientIntakeData ? @$patientIntakeData->{$key}:'' }}" />
|
|
|
</div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Weight</label>
|
|
|
- <input name="weight" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Last Vitamin D</label>
|
|
|
- <input name="last_vitamin_d" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Ethnicity</label>
|
|
|
- <input name="ethnicity" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Previous Dx:</label>
|
|
|
- <input name="previous_dx" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Hypertension</label>
|
|
|
- <input name="hypertension" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Diabetes</label>
|
|
|
- <input name="diabetes" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">COPD</label>
|
|
|
- <input name="copd" class="form-control" />
|
|
|
- </div>
|
|
|
- <div class="mb-2">
|
|
|
- <label class="text-secondary text-sm">Arthritis</label>
|
|
|
- <input name="arthritis" class="form-control" />
|
|
|
- </div>
|
|
|
+ @endforeach
|
|
|
|
|
|
<div>
|
|
|
<button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|