Просмотр исходного кода

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2 into dev

= 3 лет назад
Родитель
Сommit
ef5c8876cf

+ 22 - 16
app/Helpers/helpers.php

@@ -128,14 +128,21 @@ if(!function_exists('friendly_date_time')) {
     function friendly_date_time($value, $includeTime = true, $default = '-', $long_year=false) {
         if(!$value || empty($value)) return $default;
         try {
-            $result = strtotime($value);
-            if($long_year){
-                $result = date("m/d/Y" . ($includeTime ? ", h:ia" : ""), $result);
-            }else{
-                $result = date("m/d/y" . ($includeTime ? ", h:ia" : ""), $result);
+            if($includeTime) {
+                $realTimezone = 'US/Eastern';
+                $date = new DateTime($value);
+                $date->setTimezone(new DateTimeZone($realTimezone));
+                return $date->format("m/d/y" . ($includeTime ? ", h:ia" : "")) . ($includeTime ? ' EST' : '');
+            }
+            else {
+                $result = strtotime($value);
+                if($long_year){
+                    $result = date("m/d/Y" . ($includeTime ? ", h:ia" : ""), $result);
+                }else{
+                    $result = date("m/d/y" . ($includeTime ? ", h:ia" : ""), $result);
+                }
+                return $result;
             }
-
-            return $result;
         }
         catch (Exception $e) {
             return $value;
@@ -145,15 +152,7 @@ if(!function_exists('friendly_date_time')) {
 
 if(!function_exists('friendlier_date_time')) {
     function friendlier_date_time($value, $includeTime = true, $default = '-') {
-        if(!$value || empty($value)) return $default;
-        try {
-            $result = strtotime($value);
-            $result = date("m/d/Y" . ($includeTime ? ", h:i a" : ""), $result);
-            return $result;
-        }
-        catch (Exception $e) {
-            return $value;
-        }
+        return friendly_date_time($value, $includeTime, $default);
     }
 }
 
@@ -724,4 +723,11 @@ if(!function_exists('friendly_timezone')) {
         ];
         return $map[$tz] ?? str_replace("_", " ", $tz);
     }
+}
+
+if(!function_exists('segment_template_summary_value')) {
+    function segment_template_summary_value_display($value, $default='________') {
+        if($value && strlen($value)) return '<span class="segment-template-summary-value">' . $value . '</span>';
+        return $default;
+    }
 }

+ 17 - 0
app/Http/Controllers/HomeController.php

@@ -1804,12 +1804,29 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
         $term = $request->input('term') ? trim($request->input('term')) : '';
         if (empty($term)) return '';
         $term = strtolower($term);
+
+        // if multiple words in query, check for all (max 2)
+        $term2 = '';
+        if(strpos($term, ' ') !== FALSE) {
+            $terms = explode(' ', $term);
+            $term = trim($terms[0]);
+            $term2 = trim($terms[1]);
+        }
+
         $pros = Pro::where(function ($q) use ($term) {
             $q->orWhereRaw('LOWER(name_first::text) LIKE ?', ['%' . $term . '%'])
                 ->orWhereRaw('LOWER(name_last::text) LIKE ?', ['%' . $term . '%'])
                 ->orWhereRaw('cell_number LIKE ?', ['%' . $term . '%']);
         });
 
+        if(!empty($term2)) {
+            $pros = $pros->where(function ($q) use ($term2) {
+                $q->orWhereRaw('LOWER(name_first::text) LIKE ?', ['%' . $term2 . '%'])
+                    ->orWhereRaw('LOWER(name_last::text) LIKE ?', ['%' . $term2 . '%'])
+                    ->orWhereRaw('cell_number LIKE ?', ['%' . $term2 . '%']);
+            });
+        }
+
         $type = $request->input('type') ? trim($request->input('type')) : '';
         if(!!$type) {
             switch(strtolower($type)) {

+ 2 - 2
app/Http/Controllers/PracticeManagementController.php

@@ -431,12 +431,12 @@ class PracticeManagementController extends Controller
     public function myFavorites(Request $request, $filter = 'all')
     {
         $performer = $this->performer();
-        $myFavorites = ProFavorite::where('pro_id', $performer->pro_id)
-            ->where('is_removed', false);
+        $myFavorites = ProFavorite::where('pro_id', $performer->pro_id)->where('is_removed', false);
         if ($filter !== 'all') {
             $myFavorites = $myFavorites->where('category', $filter);
         }
         $myFavorites = $myFavorites
+            ->whereIn('category', ['allergy', 'medication', 'problem'])
             ->orderBy('category', 'asc')
             ->orderBy('position_index', 'asc')
             ->get();

+ 5 - 0
app/Models/Client.php

@@ -85,6 +85,11 @@ class Client extends Model
         return $this->hasOne(Pro::class, 'id', 'default_na_pro_id');
     }
 
+    public function creator()
+    {
+        return $this->hasOne(Pro::class, 'id', 'created_by_pro_id');
+    }
+
     public function prosInMeetingWith()
     {
         return Pro::where('in_meeting_with_client_id', $this->id)->get();

+ 1 - 1
config/app.php

@@ -65,7 +65,7 @@ return [
 
     'hrm2_url' => env('HRM2_URL'),
 
-    'asset_version' => 39,
+    'asset_version' => 40,
 
     'temp_dir' => env('TEMP_DIR'),
 

+ 47 - 2
public/css/style.css

@@ -1690,8 +1690,9 @@ button.note-templates-trigger-assessment {
 }
 .on-hover-show .on-hover-content {
     position: absolute;
-    width: 300px;
+    max-width: 300px;
     right: 0;
+    top: 100%;
     background: #fff;
     opacity: 0;
     padding: 0 0.75rem;
@@ -1700,7 +1701,6 @@ button.note-templates-trigger-assessment {
     pointer-events: none;
     transition: opacity 0.3s ease;
     z-index: 2;
-    top: 0;
 }
 .on-hover-show.left .on-hover-content {
     right: auto;
@@ -2685,4 +2685,49 @@ body.stag-scrollbar-scrolling .stag-scrollbar[stag-h-scrollbar] .stag-scrollbar-
 }
 .conditions-tree .condition-children {
     overflow: hidden;
+}
+table.stag-compact-grid>tbody>tr>td {
+    white-space: nowrap;
+    max-height: 1rem !important;
+}
+table.stag-compact-grid>tbody>tr>td>ul>li {
+    display: none;
+}
+table.stag-compact-grid>tbody>tr>td ul>li:nth-child(1) {
+    display: block;
+    margin-left: 0 !important;
+}
+table.stag-compact-grid>tbody>tr>td .alert {
+    padding: 0;
+    margin: 0;
+}
+table.stag-compact-grid>tbody>tr>td table>thead,
+table.stag-compact-grid>tbody>tr>td table>tbody tr{
+    display: none;
+}
+table.stag-compact-grid>tbody>tr>td table>tbody tr:nth-child(1) {
+    display: table-row;
+}
+table.stag-compact-grid>tbody>tr>td {
+    border-left: 1px solid #ddd;
+}
+table.stag-compact-grid>tbody>tr>td:first-child {
+    border-left: 0;
+}
+table tr td [if-details-view] {
+    display: block;
+}
+table tr td [if-grid-view] {
+    display: none;
+}
+table.stag-compact-grid>tbody>tr>td [if-details-view] {
+    display: none;
+}
+table.stag-compact-grid>tbody>tr>td [if-grid-view] {
+    display: block;
+}
+.segment-template-summary-value {
+    font-weight: bold;
+    text-decoration: underline;
+    margin-left: 10px;
 }

+ 19 - 2
resources/views/app/admin/patients-table-extended.blade.php

@@ -1,3 +1,9 @@
+<div>
+    <div class="pl-3 mb-3 d-inline-flex align-items-baseline">
+        <a href="#" native class="mr-3 text-decoration-none" onclick="$('#admin-patients-list-extended>table').addClass('stag-compact-grid'); return false;"><i class="fa fa-list text-sm"></i> Grid</a>
+        <a href="#" native class="text-decoration-none" onclick="$('#admin-patients-list-extended>table').removeClass('stag-compact-grid'); return false;"><i class="fa fa-file text-sm"></i> Details</a>
+    </div>
+</div>
 <div class="table-responsive border-top" style="height: calc(100vh - 280px)" id="admin-patients-list-extended">
     <table class="table p-0 m-0 table-sm table-striped border-bottom text-nowrap">
         <thead class="bg-light">
@@ -44,6 +50,11 @@
 						<i class="fa fa-info-circle ml-1"></i>
 						<div class="on-hover-content py-2 pl-3">
 							Created: <b class="m-0">{{friendly_date_time($patient->created_at)}}</b>
+                            @if($pro->pro_type === 'ADMIN')
+                                <div class="mt-1">
+                                    Created by <b>{{$patient->creator ? $patient->creator->displayName() : '-'}}</b>
+                                </div>
+                            @endif
 						</div>
 					</span>
                 </td>
@@ -76,11 +87,13 @@
                     {{-- {{$patient->lastMcpAppointment ? friendly_date_time($patient->lastMcpAppointment->raw_date.' '.$patient->lastMcpAppointment->raw_start_time) : '-'}}--}}
                 </td>
                 <td>{{$patient->nextMcpAppointment ? friendly_date_time($patient->nextMcpAppointment->raw_date.' '.$patient->nextMcpAppointment->raw_start_time) : '-'}}
-                    <br>
-                    {{$patient->nextMcpAppointment ? $patient->nextMcpAppointment->status : '-'}}
+                    <div if-details-view>
+                        {{$patient->nextMcpAppointment ? $patient->nextMcpAppointment->status : '-'}}
+                    </div>
                 </td>
 
                 <td class="p-0 pb-1">
+                    <div if-details-view>
                     @if(count($patient->activeNotes))
                         <?php $noteIndex = 0; ?>
                         @foreach ($patient->activeNotes as $note)
@@ -259,6 +272,10 @@
                             </div>
                         @endforeach
                     @endif
+                    </div>
+                    <div if-grid-view class="p-1">
+                        {{count($patient->activeNotes)}}
+                    </div>
                 </td>
 
                 <td>

+ 1 - 1
resources/views/app/patient/appointments.blade.php

@@ -39,7 +39,7 @@
                     <tr>
                         <td>
                             <a href="/patients/view/{{$patient->uid}}/calendar/{{$appointment->uid}}" class="text-nowrap">
-                                {{friendlier_date_time($appointment->raw_date . ' ' . $appointment->raw_start_time)}}
+                                {{friendlier_date_time($appointment->raw_date . ' ' . $appointment->raw_start_time)}} <span class="text-sm">{{friendly_timezone($appointment->timezone)}}</span>
                             </a>
                         </td>
                         <td>{{ $appointment->pro->displayName() }}</pre></td>

+ 10 - 2
resources/views/app/patient/note/_create-bill.blade.php

@@ -51,7 +51,11 @@
                                     onchange="calculateBillAmount(this)">
                                 <option value=""> -- select -- </option>
                                 <?php for ($i = 5; $i <= $maxMinutes; $i+=5) { ?>
-                                <option value="{{ $i/60 }}" {{ $i === 30 ? 'selected' : '' }}>{{ $i }} minutes</option>
+                                    @if($i == 20) {
+                                        <option value="{{ 21/60 }}" selected>{{ 21 }} minutes</option>
+                                    @else 
+                                        <option value="{{ $i/60 }}">{{ $i }} minutes</option>         
+                                    @endif
                                 <?php } ?>
                             </select>
                         </div>
@@ -87,7 +91,11 @@
                         onchange="calculateBillAmount(this)">
                     <option value=""> -- select -- </option>
                     <?php for ($i = 5; $i <= $maxMinutes; $i+=5) { ?>
-                        <option value="{{ $i/60 }}" {{ $i === 30 ? 'selected' : '' }}>{{ $i }} minutes</option>
+                        @if($i == 20) {
+                            <option value="{{ 21/60 }}" selected>{{ 21 }} minutes</option>
+                        @else 
+                            <option value="{{ $i/60 }}">{{ $i }} minutes</option>         
+                        @endif
                     <?php } ?>
                 </select>
             </div>

+ 45 - 20
resources/views/app/patient/note/sign-confirmation.blade.php

@@ -93,27 +93,52 @@
     </div>
 
     @if($note->new_or_fu_or_na === "FU")
-        @if($patient->mcp_pro_id === $pro->id && !$patient->has_cm_setup_been_performed)
-        <hr class="m-neg-3">
-        <p class="mb-2 font-weight-bold font-size-13 text-secondary">CCM</p>
-        <div class="pl-3 border-left">
-            <div class="mb-2">
-                <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
-                WARNING: You are the MCP and patient is not currently enrolled in CCM.
-            </div>
-            <div class="mb-2">Would you like to mark them as enrolled?</div>
-            <div moe class="d-block">
-                <a href="" show start><b>Yes, mark as enrolled</b></a>
-                <form url="/api/note/markCmSetupPerformedAsMcp">
-                    <input type="hidden" name="uid" value="{{$note->uid}}">
-                    <p>Mark as enrolled in CCM?</p>
-                    <div class="mb-0">
-                        <button class="btn btn-primary btn-sm" submit>Submit</button>
-                        <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+        @if($patient->mcp_pro_id === $pro->id)
+            @if($patient->is_enrolled_in_cm !== 'YES')
+                <hr class="m-neg-3">
+                <div class="pl-3 border-left">
+                    <p class="mb-2 font-weight-bold font-size-13 text-secondary">CCM</p>
+                    <div class="mb-2">
+                        <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
+                        WARNING: You are the MCP and patient is not currently enrolled in CCM.
                     </div>
-                </form>
-            </div>
-        </div>
+                    <div class="mb-2">Would you like to mark them as enrolled?</div>
+                    <div moe class="d-block">
+                        <a href="" show start><b>Yes, mark as enrolled</b></a>
+                        <form url="/api/client/setIsEnrolledInCmToTrue">
+                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                            <p>Mark as enrolled in CCM?</p>
+                            <div class="mb-0">
+                                <button class="btn btn-primary btn-sm" submit>Submit</button>
+                                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                            </div>
+                        </form>
+                    </div>
+                </div>
+            @else
+                @if(!$patient->has_cm_setup_been_performed)
+                    <hr class="m-neg-3">
+                    <div class="pl-3 border-left">
+                        <p class="mb-2 font-weight-bold font-size-13 text-secondary">CCM</p>
+                        <div class="mb-2">
+                            <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
+                            WARNING: CM Setup has not been performed.
+                        </div>
+                        <div class="mb-2">Would you like to mark CM setup as performed?</div>
+                        <div moe class="d-block">
+                            <a href="" show start><b>Yes, mark as performed</b></a>
+                            <form url="/api/note/markCmSetupPerformedAsMcp">
+                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                <p>Mark CM Setup as performed?</p>
+                                <div class="mb-0">
+                                    <button class="btn btn-primary btn-sm" submit>Submit</button>
+                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                    </div>
+                @endif
+            @endif
         @endif
     @endif
 

+ 166 - 367
resources/views/app/patient/segment-templates/covid_intake/summary.blade.php

@@ -117,14 +117,15 @@ $contentData = [
 if (!!@$point->data) {
     $contentData = $point->data;
 }
+
 ?>
 <div class="events-none form-read-mode">
 
     <p class="mb-2">Hi {{strtolower($patient->sex) === 'M' ? 'Mr.' : 'Mrs.'}} {{$patient->displayName()}}, My name is {{$pro->displayName()}}. I'm a board-certified nurse practitioner.</p>
 
     <div class="mb-2">
-        <label class="mb-1">How are you?</label>
-        <textarea data-name="ans_how_are_you" class="form-control form-control-sm" rows="2">{{ @$contentData['ans_how_are_you'] }}</textarea>
+        <label>How are you?</label> 
+        <?= segment_template_summary_value_display(@$contentData['ans_how_are_you']) ?>
     </div>
 
     <hr class="my-3">
@@ -133,23 +134,15 @@ if (!!@$point->data) {
         <?php
         $mailingAddress = implode(' ', [$patient->mailing_address_line1, $patient->mailing_address_line2, $patient->mailing_address_city, $patient->mailing_address_state, $patient->mailing_address_zip]);
         ?>
-        <label class="mb-1">Let me confirm your mailing address for delivery of the self-monitoring kit: {{$mailingAddress}}</label>
-        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_is_address_correct" name="ans_is_address_correct" {{@$contentData['ans_is_address_correct'] && @$contentData['ans_is_address_correct'] === 'yes' ? 'checked' : ''}} value="yes">
-                <span class="ml-1">Yes</span>
-            </label>
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_is_address_correct" name="ans_is_address_correct" {{@$contentData['ans_is_address_correct'] && @$contentData['ans_is_address_correct'] === 'no' ? 'checked' : ''}} value="no">
-                <span class="ml-1">No</span>
-            </label>
-        </div>
+        <label>Let me confirm your mailing address for delivery of the self-monitoring kit: {{$mailingAddress}}</label>
+        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_is_address_correct'])) ?>
     </div>
-
+    @if(strlen(@$contentData['ans_corrected_address']))
     <div class="mb-2">
-        <label class="mb-1">If different from above:</label>
-        <textarea data-name="ans_corrected_address" class="form-control form-control-sm" rows="1">{{ @$contentData['ans_corrected_address'] }}</textarea>
+        <label>If different from above:</label>
+        <?= segment_template_summary_value_display(@$contentData['ans_corrected_address']) ?>
     </div>
+    @endif
 
     <hr class="my-3">
 
@@ -158,17 +151,8 @@ if (!!@$point->data) {
     </div>
 
     <div class="mb-2">
-        <label class="mb-1">Have you ever worked with a nurse practitioner before?</label>
-        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_has_worked_with_an_np_before" name="ans_has_worked_with_an_np_before" {{@$contentData['ans_has_worked_with_an_np_before'] && @$contentData['ans_has_worked_with_an_np_before'] === 'yes' ? 'checked' : ''}} value="yes">
-                <span class="ml-1">Yes</span>
-            </label>
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_has_worked_with_an_np_before" name="ans_has_worked_with_an_np_before" {{@$contentData['ans_has_worked_with_an_np_before'] && @$contentData['ans_has_worked_with_an_np_before'] === 'no' ? 'checked' : ''}} value="no">
-                <span class="ml-1">No</span>
-            </label>
-        </div>
+        <label>Have you ever worked with a nurse practitioner before?</label>
+        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_has_worked_with_an_np_before'])) ?>
     </div>
 
     <div class="mb-2 ml-3">
@@ -179,17 +163,8 @@ if (!!@$point->data) {
             <li>And because telemedicine is now covered by Medicare and we're allowed to waive co-pays, it's free of charge for patients.</li>
             <li>You'll never get a bill or anything.</li>
             <li>
-                <label class="mb-1"><b>Ok?</b></label>
-                <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                    <label class="my-0 mr-3 d-flex align-items-center">
-                        <input type="radio" data-name="ans_has_worked_with_an_np_before_expl_feedback" name="ans_has_worked_with_an_np_before_expl_feedback" {{@$contentData['ans_has_worked_with_an_np_before_expl_feedback'] && @$contentData['ans_has_worked_with_an_np_before_expl_feedback'] === 'yes' ? 'checked' : ''}} value="yes">
-                        <span class="ml-1">Yes</span>
-                    </label>
-                    <label class="my-0 mr-3 d-flex align-items-center">
-                        <input type="radio" data-name="ans_has_worked_with_an_np_before_expl_feedback" name="ans_has_worked_with_an_np_before_expl_feedback" {{@$contentData['ans_has_worked_with_an_np_before_expl_feedback'] && @$contentData['ans_has_worked_with_an_np_before_expl_feedback'] === 'no' ? 'checked' : ''}} value="no">
-                        <span class="ml-1">No</span>
-                    </label>
-                </div>
+                <label><b>Ok?</b></label>
+                <?= segment_template_summary_value_display(ucwords(@$contentData['ans_has_worked_with_an_np_before_expl_feedback'])) ?>
             </li>
         </ul>
     </div>
@@ -208,17 +183,8 @@ if (!!@$point->data) {
                     <li>So you do need a long-term strategy to protect yourself in addition to vaccines.</li>
                     <li>Small changes in your temperature or oxygen levels are extremely helpful in detecting COVID early, and early treatment is extremely effective at preventing hospitalization.</li>
                     <li>
-                        <label class="mb-1"><b>Does that make sense?</b></label>
-                        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                            <label class="my-0 mr-3 d-flex align-items-center">
-                                <input type="radio" data-name="ans_goal_expl_feedback" name="ans_goal_expl_feedback" {{@$contentData['ans_goal_expl_feedback'] && @$contentData['ans_goal_expl_feedback'] === 'yes' ? 'checked' : ''}} value="yes">
-                                <span class="ml-1">Yes</span>
-                            </label>
-                            <label class="my-0 mr-3 d-flex align-items-center">
-                                <input type="radio" data-name="ans_goal_expl_feedback" name="ans_goal_expl_feedback" {{@$contentData['ans_goal_expl_feedback'] && @$contentData['ans_goal_expl_feedback'] === 'no' ? 'checked' : ''}} value="no">
-                                <span class="ml-1">No</span>
-                            </label>
-                        </div>
+                        <label><b>Does that make sense?</b></label>
+                        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_goal_expl_feedback'])) ?>
                     </li>
                 </ul>
             </li>
@@ -226,17 +192,8 @@ if (!!@$point->data) {
     </div>
 
     <div class="mb-2">
-        <label class="mb-1">So today we’re going to conduct a quick intake, I’m going to give you some important information, and then we’ll get you all set up. <b>Ok?</b></label>
-        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_quick_intake_expl_feedback" name="ans_quick_intake_expl_feedback" {{@$contentData['ans_quick_intake_expl_feedback'] && @$contentData['ans_quick_intake_expl_feedback'] === 'yes' ? 'checked' : ''}} value="yes">
-                <span class="ml-1">Yes</span>
-            </label>
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_quick_intake_expl_feedback" name="ans_quick_intake_expl_feedback" {{@$contentData['ans_quick_intake_expl_feedback'] && @$contentData['ans_quick_intake_expl_feedback'] === 'no' ? 'checked' : ''}} value="no">
-                <span class="ml-1">No</span>
-            </label>
-        </div>
+        <label>So today we’re going to conduct a quick intake, I’m going to give you some important information, and then we’ll get you all set up. <b>Ok?</b></label>
+        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_quick_intake_expl_feedback'])) ?>
     </div>
 
     <hr class="my-3">
@@ -251,16 +208,7 @@ if (!!@$point->data) {
 
     <div class="mb-2">
         <label class="mb-1">For example, have you heard that normal body temperature is 98.6 F?.</label>
-        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_normal_temp_is_986" name="ans_normal_temp_is_986" {{@$contentData['ans_normal_temp_is_986'] && @$contentData['ans_normal_temp_is_986'] === 'yes' ? 'checked' : ''}} value="yes">
-                <span class="ml-1">Yes</span>
-            </label>
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_normal_temp_is_986" name="ans_normal_temp_is_986" {{@$contentData['ans_normal_temp_is_986'] && @$contentData['ans_normal_temp_is_986'] === 'no' ? 'checked' : ''}} value="no">
-                <span class="ml-1">No</span>
-            </label>
-        </div>
+        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_normal_temp_is_986'])) ?>
     </div>
 
     <div class="mb-2 ml-3">
@@ -273,33 +221,15 @@ if (!!@$point->data) {
             <li>So, what’s normal for one person could be signs of a fever in another person!</li>
             <li>So if someone with a baseline temperature of 97.7 measures in at 98.6, it could mean that <b>they’re not actually normal</b> - in fact they are starting to run a fever!</li>
             <li>
-                <label class="mb-1"><b>Does that make sense?</b></label>
-                <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                    <label class="my-0 mr-3 d-flex align-items-center">
-                        <input type="radio" data-name="ans_baseline_expl_feedback_1" name="ans_baseline_expl_feedback_1" {{@$contentData['ans_baseline_expl_feedback_1'] && @$contentData['ans_baseline_expl_feedback_1'] === 'yes' ? 'checked' : ''}} value="yes">
-                        <span class="ml-1">Yes</span>
-                    </label>
-                    <label class="my-0 mr-3 d-flex align-items-center">
-                        <input type="radio" data-name="ans_baseline_expl_feedback_1" name="ans_baseline_expl_feedback_1" {{@$contentData['ans_baseline_expl_feedback_1'] && @$contentData['ans_baseline_expl_feedback_1'] === 'no' ? 'checked' : ''}} value="no">
-                        <span class="ml-1">No</span>
-                    </label>
-                </div>
+                <label><b>Does that make sense?</b></label>
+                <?= segment_template_summary_value_display(ucwords(@$contentData['ans_baseline_expl_feedback_1'])) ?>
             </li>
         </ul>
     </div>
 
     <div class="mb-2">
-        <label class="mb-1"><b>So the numbers you read on self-monitoring equipment mean different things to different people.</b> So we’re going to go through your vital signs and each meter one by one, and I’m going to ask you some questions about each of them. <b>OK?</b></label>
-        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_baseline_expl_feedback_2" name="ans_baseline_expl_feedback_2" {{@$contentData['ans_baseline_expl_feedback_2'] && @$contentData['ans_baseline_expl_feedback_2'] === 'yes' ? 'checked' : ''}} value="yes">
-                <span class="ml-1">Yes</span>
-            </label>
-            <label class="my-0 mr-3 d-flex align-items-center">
-                <input type="radio" data-name="ans_baseline_expl_feedback_2" name="ans_baseline_expl_feedback_2" {{@$contentData['ans_baseline_expl_feedback_2'] && @$contentData['ans_baseline_expl_feedback_2'] === 'no' ? 'checked' : ''}} value="no">
-                <span class="ml-1">No</span>
-            </label>
-        </div>
+        <label><b>So the numbers you read on self-monitoring equipment mean different things to different people.</b> So we’re going to go through your vital signs and each meter one by one, and I’m going to ask you some questions about each of them. <b>OK?</b></label>
+        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_baseline_expl_feedback_2'])) ?>
     </div>
 
     <hr class="my-3">
@@ -309,8 +239,8 @@ if (!!@$point->data) {
     <div class="ml-3">
 
         <div class="mb-2">
-            <label class="mb-1">Do you know what your baseline temperature usually reads in at?</label>
-            <input type="text" data-name="ans_baseline_temperature" value="{{@$contentData['ans_baseline_temperature']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+            <label>Do you know what your baseline temperature usually reads in at?</label>
+            <?= segment_template_summary_value_display(@$contentData['ans_baseline_temperature']) ?>
         </div>
 
         <div class="mb-2 ml-3">
@@ -319,7 +249,7 @@ if (!!@$point->data) {
 
         <div class="mb-2">
             <label class="mb-1">Do you currently feel like you may be running high?</label>
-            <input type="text" data-name="ans_currently_running_high" value="{{@$contentData['ans_currently_running_high']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+            <?= segment_template_summary_value_display(@$contentData['ans_currently_running_high']) ?>
         </div>
 
     </div>
@@ -331,24 +261,15 @@ if (!!@$point->data) {
     <div class="ml-3">
 
         <div class="mb-2">
-            <label class="mb-1">And what about your baseline blood oxygen, do you know what that usually reads in at?</label>
-            <input type="text" data-name="ans_baseline_blood_ox" value="{{@$contentData['ans_baseline_blood_ox']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+            <label>And what about your baseline blood oxygen, do you know what that usually reads in at?</label>
+            <?= segment_template_summary_value_display(@$contentData['ans_baseline_blood_ox']) ?>
         </div>
 
         <div class="mb-2 ml-3">
             <ul>
                 <li>
-                    <label class="mb-1">Have you ever operated a fingertip pulse oxygen meter by yourself?</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_blood_ox_by_self" name="ans_blood_ox_by_self" {{@$contentData['ans_blood_ox_by_self'] && @$contentData['ans_blood_ox_by_self'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_blood_ox_by_self" name="ans_blood_ox_by_self" {{@$contentData['ans_blood_ox_by_self'] && @$contentData['ans_blood_ox_by_self'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Have you ever operated a fingertip pulse oxygen meter by yourself?</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_blood_ox_by_self'])) ?>
                 </li>
                 <li>
                     Blood oxygen is particularly important to know about these days.
@@ -358,125 +279,89 @@ if (!!@$point->data) {
                         <li>COVID, however, almost always causes a drop in your oxygen level!</li>
                         <li>So, if you ever have a fever, and notice a drop in your blood oxygen level as well, it’s more likely to be COVID and you can help you seek appropriate medical attention sooner.</li>
                         <li>
-                            <label class="mb-1">Does that make sense?</label>
-                            <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                                <label class="my-0 mr-3 d-flex align-items-center">
-                                    <input type="radio" data-name="ans_blood_ox_expl_feedback" name="ans_blood_ox_expl_feedback" {{@$contentData['ans_blood_ox_expl_feedback'] && @$contentData['ans_blood_ox_expl_feedback'] === 'yes' ? 'checked' : ''}} value="yes">
-                                    <span class="ml-1">Yes</span>
-                                </label>
-                                <label class="my-0 mr-3 d-flex align-items-center">
-                                    <input type="radio" data-name="ans_blood_ox_expl_feedback" name="ans_blood_ox_expl_feedback" {{@$contentData['ans_blood_ox_expl_feedback'] && @$contentData['ans_blood_ox_expl_feedback'] === 'no' ? 'checked' : ''}} value="no">
-                                    <span class="ml-1">No</span>
-                                </label>
-                            </div>
+                            <label>Does that make sense?</label>
+                            <?= segment_template_summary_value_display(ucwords(@$contentData['ans_blood_ox_expl_feedback'])) ?>
                         </li>
                         <li>
                             Have you ever been diagnosed with any condition that affects the lungs and may possibly affect your blood oxygen readings, such as COVID, asthma, or COPD?
                             <ul>
                                 <li>
                                     <div>
-                                        <label class="mb-1">COVID</label>
-                                        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                                            <label class="my-0 mr-3 d-flex align-items-center">
-                                                <input type="radio" data-name="ans_blood_ox_condition_covid" name="ans_blood_ox_condition_covid" {{@$contentData['ans_blood_ox_condition_covid'] && @$contentData['ans_blood_ox_condition_covid'] === 'yes' ? 'checked' : ''}} value="yes">
-                                                <span class="ml-1">Yes</span>
-                                            </label>
-                                            <label class="my-0 mr-3 d-flex align-items-center">
-                                                <input type="radio" data-name="ans_blood_ox_condition_covid" name="ans_blood_ox_condition_covid" {{@$contentData['ans_blood_ox_condition_covid'] && @$contentData['ans_blood_ox_condition_covid'] === 'no' ? 'checked' : ''}} value="no">
-                                                <span class="ml-1">No</span>
-                                            </label>
-                                        </div>
+                                        <label>COVID</label>
+                                        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_blood_ox_condition_covid'])) ?>
                                     </div>
                                     <ul>
                                         <li class="mb-2">
-                                            <label class="mb-1">How are you feeling now?</label>
-                                            <input type="text" data-name="ans_condition_covid_how_now" value="{{@$contentData['ans_condition_covid_how_now']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>How are you feeling now?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_covid_how_now']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Have you recovered completely?</label>
-                                            <input type="text" data-name="ans_condition_covid_recovered" value="{{@$contentData['ans_condition_covid_recovered']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Have you recovered completely?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_covid_recovered']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
-                                            <input type="text" data-name="ans_condition_covid_lingering_symptoms" value="{{@$contentData['ans_condition_covid_lingering_symptoms']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_covid_lingering_symptoms']) ?>
                                         </li>
                                     </ul>
                                 </li>
                                 <li>
                                     <div>
-                                        <label class="mb-1">Asthma</label>
-                                        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                                            <label class="my-0 mr-3 d-flex align-items-center">
-                                                <input type="radio" data-name="ans_blood_ox_condition_asthma" name="ans_blood_ox_condition_asthma" {{@$contentData['ans_blood_ox_condition_asthma'] && @$contentData['ans_blood_ox_condition_asthma'] === 'yes' ? 'checked' : ''}} value="yes">
-                                                <span class="ml-1">Yes</span>
-                                            </label>
-                                            <label class="my-0 mr-3 d-flex align-items-center">
-                                                <input type="radio" data-name="ans_blood_ox_condition_asthma" name="ans_blood_ox_condition_asthma" {{@$contentData['ans_blood_ox_condition_asthma'] && @$contentData['ans_blood_ox_condition_asthma'] === 'no' ? 'checked' : ''}} value="no">
-                                                <span class="ml-1">No</span>
-                                            </label>
-                                        </div>
+                                        <label>Asthma</label>
+                                        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_blood_ox_condition_asthma'] )) ?>
                                     </div>
                                     <ul>
                                         <li class="mb-2">
-                                            <label class="mb-1">How are you feeling now?</label>
-                                            <input type="text" data-name="ans_condition_asthma_how_now" value="{{@$contentData['ans_condition_asthma_how_now']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>How are you feeling now?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_asthma_how_now']) ?>
                                         </li>
                                         <li class="mb-2">
                                             <label class="mb-1">Have you recovered completely?</label>
-                                            <input type="text" data-name="ans_condition_asthma_recovered" value="{{@$contentData['ans_condition_asthma_recovered']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_asthma_recovered']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
-                                            <input type="text" data-name="ans_condition_asthma_lingering_symptoms" value="{{@$contentData['ans_condition_asthma_lingering_symptoms']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_asthma_lingering_symptoms']) ?>
                                         </li>
                                     </ul>
                                 </li>
                                 <li>
                                     <div>
-                                        <label class="mb-1">COPD</label>
-                                        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                                            <label class="my-0 mr-3 d-flex align-items-center">
-                                                <input type="radio" data-name="ans_blood_ox_condition_copd" name="ans_blood_ox_condition_copd" {{@$contentData['ans_blood_ox_condition_copd'] && @$contentData['ans_blood_ox_condition_copd'] === 'yes' ? 'checked' : ''}} value="yes">
-                                                <span class="ml-1">Yes</span>
-                                            </label>
-                                            <label class="my-0 mr-3 d-flex align-items-center">
-                                                <input type="radio" data-name="ans_blood_ox_condition_copd" name="ans_blood_ox_condition_copd" {{@$contentData['ans_blood_ox_condition_copd'] && @$contentData['ans_blood_ox_condition_copd'] === 'no' ? 'checked' : ''}} value="no">
-                                                <span class="ml-1">No</span>
-                                            </label>
-                                        </div>
+                                        <label>COPD</label>
+                                        <?= segment_template_summary_value_display(ucwords(@$contentData['ans_blood_ox_condition_copd'])) ?>
                                     </div>
                                     <ul>
                                         <li class="mb-2">
-                                            <label class="mb-1">How are you feeling now?</label>
-                                            <input type="text" data-name="ans_condition_copd_how_now" value="{{@$contentData['ans_condition_copd_how_now']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>How are you feeling now?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_copd_how_now']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Have you recovered completely?</label>
-                                            <input type="text" data-name="ans_condition_copd_recovered" value="{{@$contentData['ans_condition_copd_recovered']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Have you recovered completely?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_copd_recovered']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
-                                            <input type="text" data-name="ans_condition_copd_lingering_symptoms" value="{{@$contentData['ans_condition_copd_lingering_symptoms']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_copd_lingering_symptoms']) ?>
                                         </li>
                                     </ul>
                                 </li>
                                 <li>
                                     <div>
-                                        <label class="mb-1">Other</label>
-                                        <input type="text" data-name="ans_blood_ox_condition_other" value="{{@$contentData['ans_blood_ox_condition_other']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                        <label>Other</label>
+                                        <?= segment_template_summary_value_display(@$contentData['ans_blood_ox_condition_other']) ?>
                                     </div>
                                     <ul>
                                         <li class="mb-2">
-                                            <label class="mb-1">How are you feeling now?</label>
-                                            <input type="text" data-name="ans_condition_other_how_now" value="{{@$contentData['ans_condition_other_how_now']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>How are you feeling now?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_other_how_now']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Have you recovered completely?</label>
-                                            <input type="text" data-name="ans_condition_other_recovered" value="{{@$contentData['ans_condition_other_recovered']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Have you recovered completely?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_other_recovered']) ?>
                                         </li>
                                         <li class="mb-2">
-                                            <label class="mb-1">Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
-                                            <input type="text" data-name="ans_condition_other_lingering_symptoms" value="{{@$contentData['ans_condition_other_lingering_symptoms']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                            <label>Do you have any lingering symptoms like Shortness of breath, weakness, or brain fog?</label>
+                                            <?= segment_template_summary_value_display(@$contentData['ans_condition_other_lingering_symptoms']) ?>
                                         </li>
                                     </ul>
                                 </li>
@@ -497,116 +382,73 @@ if (!!@$point->data) {
     <div class="ml-3">
 
         <div class="mb-2">
-            <label class="mb-1">Do you know what your baseline heart rate and blood pressure usually read in at?</label>
-            <div>
-                <input type="text" data-name="ans_baseline_heart_rate" value="{{@$contentData['ans_baseline_heart_rate']}}" placeholder="Heart Rate" class="form-control form-control-sm d-inline-block w-auto ml-2">
-                <input type="text" data-name="ans_baseline_bp" value="{{@$contentData['ans_baseline_bp']}}" placeholder="BP" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
+            <label>Do you know what your baseline heart rate and blood pressure usually read in at?</label>
+            <div class="pl-3">
+                <div>Heart Rate: <?= segment_template_summary_value_display(@$contentData['ans_baseline_heart_rate']) ?></div>
+                <div>BP: <?= segment_template_summary_value_display(@$contentData['ans_baseline_bp']) ?></div>
             </div>
         </div>
 
         <div class="mb-2">
-            <label class="mb-1">Have you ever operated a digital blood pressure and pulse meter by yourself?</label>
-            <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_bp_by_self" name="ans_bp_by_self" {{@$contentData['ans_bp_by_self'] && @$contentData['ans_bp_by_self'] === 'yes' ? 'checked' : ''}} value="yes">
-                    <span class="ml-1">Yes</span>
-                </label>
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_bp_by_self" name="ans_bp_by_self" {{@$contentData['ans_bp_by_self'] && @$contentData['ans_bp_by_self'] === 'no' ? 'checked' : ''}} value="no">
-                    <span class="ml-1">No</span>
-                </label>
-            </div>
+            <label>Have you ever operated a digital blood pressure and pulse meter by yourself?</label>
+            <?= segment_template_summary_value_display(ucwords(@$contentData['ans_bp_by_self'])) ?>
         </div>
 
         <div class="mb-2">
-            <label class="mb-1">Have you ever been diagnosed with high blood pressure?</label>
-            <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_high_bp_ever" name="ans_high_bp_ever" {{@$contentData['ans_high_bp_ever'] && @$contentData['ans_high_bp_ever'] === 'yes' ? 'checked' : ''}} value="yes">
-                    <span class="ml-1">Yes</span>
-                </label>
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_high_bp_ever" name="ans_high_bp_ever" {{@$contentData['ans_high_bp_ever'] && @$contentData['ans_high_bp_ever'] === 'no' ? 'checked' : ''}} value="no">
-                    <span class="ml-1">No</span>
-                </label>
-            </div>
+            <label>Have you ever been diagnosed with high blood pressure?</label>
+            <?= segment_template_summary_value_display(ucwords(@$contentData['ans_high_bp_ever'])) ?>
         </div>
 
         <div class="mb-2">
-            <label class="mb-1">Do you take BP medicine?</label>
-            <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_bp_medicine" name="ans_bp_medicine" {{@$contentData['ans_bp_medicine'] && @$contentData['ans_bp_medicine'] === 'yes' ? 'checked' : ''}} value="yes">
-                    <span class="ml-1">Yes</span>
-                </label>
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_bp_medicine" name="ans_bp_medicine" {{@$contentData['ans_bp_medicine'] && @$contentData['ans_bp_medicine'] === 'no' ? 'checked' : ''}} value="no">
-                    <span class="ml-1">No</span>
-                </label>
-            </div>
+            <label>Do you take BP medicine?</label>
+            <?= segment_template_summary_value_display(ucwords(@$contentData['ans_bp_medicine'])) ?>
         </div>
 
         <div class="mb-3 ml-3">
             <label class="mb-2">If taking BP medication:</label>
-            <div class="mb-2">
-                <input type="text" data-name="ans_bp_medicine_1_type" value="{{@$contentData['ans_bp_medicine_1_type']}}" placeholder="Type" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
-                <input type="text" data-name="ans_bp_medicine_1_dose" value="{{@$contentData['ans_bp_medicine_1_dose']}}" placeholder="Dose" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
-            </div>
-            <div class="mb-2">
-                <input type="text" data-name="ans_bp_medicine_2_type" value="{{@$contentData['ans_bp_medicine_2_type']}}" placeholder="Type" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
-                <input type="text" data-name="ans_bp_medicine_2_dose" value="{{@$contentData['ans_bp_medicine_2_dose']}}" placeholder="Dose" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
-            </div>
-            <div class="mb-2">
-                <input type="text" data-name="ans_bp_medicine_3_type" value="{{@$contentData['ans_bp_medicine_3_type']}}" placeholder="Type" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
-                <input type="text" data-name="ans_bp_medicine_3_dose" value="{{@$contentData['ans_bp_medicine_3_dose']}}" placeholder="Dose" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
+            <div class="pl-3">
+                @if(@$contentData['ans_bp_medicine_1_type'])
+                <div class="mb-2">
+                    ▸ <?= segment_template_summary_value_display(@$contentData['ans_bp_medicine_1_type']) ?>: 
+                    <?= segment_template_summary_value_display(@$contentData['ans_bp_medicine_1_dose']) ?>                
+                </div>
+                @endif
+
+                @if(@$contentData['ans_bp_medicine_2_type'])
+                <div class="mb-2">
+                    ▸ <?= segment_template_summary_value_display(@$contentData['ans_bp_medicine_2_type']) ?>: 
+                    <?= segment_template_summary_value_display(@$contentData['ans_bp_medicine_2_dose']) ?>                
+                </div>
+                @endif
+
+                @if(@$contentData['ans_bp_medicine_3_type'])
+                <div class="mb-2">
+                    ▸ <?= segment_template_summary_value_display(@$contentData['ans_bp_medicine_3_type']) ?>: 
+                    <?= segment_template_summary_value_display(@$contentData['ans_bp_medicine_3_dose']) ?>                
+                </div>
+                @endif
             </div>
+            
         </div>
 
         <div class="mb-2">
             <label class="mb-1">Have you ever been diagnosed with any cardiac or heart condition that may affect your heart rate or blood pressure, such as....?</label>
             <ul>
                 <li>
-                    <label class="mb-1">CAD or other atherosclerosis</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_cardiac_heart_ever_cad" name="ans_cardiac_heart_ever_cad" {{@$contentData['ans_cardiac_heart_ever_cad'] && @$contentData['ans_cardiac_heart_ever_cad'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_cardiac_heart_ever_cad" name="ans_cardiac_heart_ever_cad" {{@$contentData['ans_cardiac_heart_ever_cad'] && @$contentData['ans_cardiac_heart_ever_cad'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>CAD or other atherosclerosis</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_cardiac_heart_ever_cad'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">Irregular heart rhythm</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_cardiac_heart_ever_irr" name="ans_cardiac_heart_ever_irr" {{@$contentData['ans_cardiac_heart_ever_irr'] && @$contentData['ans_cardiac_heart_ever_irr'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_cardiac_heart_ever_irr" name="ans_cardiac_heart_ever_irr" {{@$contentData['ans_cardiac_heart_ever_irr'] && @$contentData['ans_cardiac_heart_ever_irr'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Irregular heart rhythm</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_cardiac_heart_ever_irr'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">CHF</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_cardiac_heart_ever_chf" name="ans_cardiac_heart_ever_chf" {{@$contentData['ans_cardiac_heart_ever_chf'] && @$contentData['ans_cardiac_heart_ever_chf'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_cardiac_heart_ever_chf" name="ans_cardiac_heart_ever_chf" {{@$contentData['ans_cardiac_heart_ever_chf'] && @$contentData['ans_cardiac_heart_ever_chf'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>CHF</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_cardiac_heart_ever_chf'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">Other</label>
-                    <input type="text" data-name="ans_cardiac_heart_ever_other" value="{{@$contentData['ans_cardiac_heart_ever_other']}}" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
+                    <label>Other</label>
+                    <?= segment_template_summary_value_display(@$contentData['ans_cardiac_heart_ever_other']) ?>
                 </li>
             </ul>
         </div>
@@ -615,89 +457,35 @@ if (!!@$point->data) {
             <label class="mb-1">Do you have any:</label>
             <ul>
                 <li>
-                    <label class="mb-1">Chest pain</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_chest_pain" name="ans_chest_pain" {{@$contentData['ans_chest_pain'] && @$contentData['ans_chest_pain'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_chest_pain" name="ans_chest_pain" {{@$contentData['ans_chest_pain'] && @$contentData['ans_chest_pain'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Chest pain</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_chest_pain'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">Shortness of breath?</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_shortness_of_breath" name="ans_shortness_of_breath" {{@$contentData['ans_shortness_of_breath'] && @$contentData['ans_shortness_of_breath'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_shortness_of_breath" name="ans_shortness_of_breath" {{@$contentData['ans_shortness_of_breath'] && @$contentData['ans_shortness_of_breath'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Shortness of breath?</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_shortness_of_breath'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">Fatigue or light-headedness?</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_fatigue" name="ans_fatigue" {{@$contentData['ans_fatigue'] && @$contentData['ans_fatigue'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_fatigue" name="ans_fatigue" {{@$contentData['ans_fatigue'] && @$contentData['ans_fatigue'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Fatigue or light-headedness?</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_fatigue'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">Headache?</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_headache" name="ans_headache" {{@$contentData['ans_headache'] && @$contentData['ans_headache'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_headache" name="ans_headache" {{@$contentData['ans_headache'] && @$contentData['ans_headache'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Headache?</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_headache'])) ?>
                 </li>
             </ul>
         </div>
 
         <div class="mb-2">
-            <label class="mb-1">Do you ever notice an increase in your heart rate?</label>
-            <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_increase_in_heart_rate" name="ans_increase_in_heart_rate" {{@$contentData['ans_increase_in_heart_rate'] && @$contentData['ans_increase_in_heart_rate'] === 'yes' ? 'checked' : ''}} value="yes">
-                    <span class="ml-1">Yes</span>
-                </label>
-                <label class="my-0 mr-3 d-flex align-items-center">
-                    <input type="radio" data-name="ans_increase_in_heart_rate" name="ans_increase_in_heart_rate" {{@$contentData['ans_increase_in_heart_rate'] && @$contentData['ans_increase_in_heart_rate'] === 'no' ? 'checked' : ''}} value="no">
-                    <span class="ml-1">No</span>
-                </label>
-            </div>
+            <label>Do you ever notice an increase in your heart rate?</label>
+            <?= segment_template_summary_value_display(ucwords(@$contentData['ans_increase_in_heart_rate'])) ?>
             <ul>
                 <li>
-                    <label class="mb-1">How ofter?</label>
-                    <input type="text" data-name="ans_increase_in_heart_rate_frequency" value="{{@$contentData['ans_increase_in_heart_rate_frequency']}}" class="ml-3 form-control form-control-sm d-inline-block w-auto ml-2">
+                    <label>How ofter?</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_increase_in_heart_rate_frequency'])) ?>
                 </li>
                 <li>
-                    <label class="mb-1">Do you monitor your BP before / after workouts?</label>
-                    <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_monitor_bp_before_after_workouts" name="ans_monitor_bp_before_after_workouts" {{@$contentData['ans_monitor_bp_before_after_workouts'] && @$contentData['ans_monitor_bp_before_after_workouts'] === 'yes' ? 'checked' : ''}} value="yes">
-                            <span class="ml-1">Yes</span>
-                        </label>
-                        <label class="my-0 mr-3 d-flex align-items-center">
-                            <input type="radio" data-name="ans_monitor_bp_before_after_workouts" name="ans_monitor_bp_before_after_workouts" {{@$contentData['ans_monitor_bp_before_after_workouts'] && @$contentData['ans_monitor_bp_before_after_workouts'] === 'no' ? 'checked' : ''}} value="no">
-                            <span class="ml-1">No</span>
-                        </label>
-                    </div>
+                    <label>Do you monitor your BP before / after workouts?</label>
+                    <?= segment_template_summary_value_display(ucwords(@$contentData['ans_monitor_bp_before_after_workouts'])) ?>
                 </li>
             </ul>
         </div>
@@ -707,57 +495,68 @@ if (!!@$point->data) {
     <hr class="my-3">
 
     <p><b>Vaccine Status:</b></p>
-
-    <div class="ml-3 mb-3">
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_vaccine_status_not_enough_rapport" {{@$contentData['ans_vaccine_status_not_enough_rapport'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">Not enough rapport right now to ask</span>
-        </label>
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_vaccine_status_declined_to_answer" {{@$contentData['ans_vaccine_status_declined_to_answer'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">Declined to answer</span>
-        </label>
+    <div class="pl-3 mb-3">
         <div>
-            <input type="text" data-name="ans_vaccine_status" value="{{@$contentData['ans_vaccine_status']}}" class="form-control form-control-sm d-inline-block w-auto">
+        ▸ Not enough rapport right now to ask: <?= @$contentData['ans_monitor_bp_before_after_workouts'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+        </div>
+        <div>
+        ▸ Declined to answer: <?= @$contentData['ans_vaccine_status_declined_to_answer'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+            @if(@$contentData['ans_vaccine_status'])
+            <small class="ml-3"><i><?= segment_template_summary_value_display(@$contentData['ans_vaccine_status']) ?></i></small>
+            @endif
         </div>
     </div>
 
-    <p><b>Booster Status:</b></p>
 
-    <div class="ml-3 mb-3">
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_booster_status_not_enough_rapport" {{@$contentData['ans_booster_status_not_enough_rapport'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">Not enough rapport right now to ask</span>
-        </label>
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_booster_status_declined_to_answer" {{@$contentData['ans_booster_status_declined_to_answer'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">Declined to answer</span>
-        </label>
+    <p><b>Booster Status:</b></p>
+    <div class="pl-3 mb-3">
         <div>
-            <input type="text" data-name="ans_booster_status" value="{{@$contentData['ans_booster_status']}}" class="form-control form-control-sm d-inline-block w-auto">
+        ▸ Not enough rapport right now to ask: <?= @$contentData['ans_booster_status_not_enough_rapport'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+        </div>
+        <div>
+        ▸ Declined to answer: <?= @$contentData['ans_booster_status_declined_to_answer'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+            @if(@$contentData['ans_booster_status'])
+            <small class="ml-3"><i><?= segment_template_summary_value_display(@$contentData['ans_booster_status']) ?></i></small>
+            @endif
         </div>
     </div>
 
     <div class="mb-3">
-        <label class="mb-1">Current Behaviors to Stay Safe:</label>
-        <input type="text" data-name="ans_current_behaviors_to_stay_safe" value="{{@$contentData['ans_current_behaviors_to_stay_safe']}}" class="form-control form-control-sm">
+        <label>Current Behaviors to Stay Safe:</label>
+        <?= segment_template_summary_value_display(@$contentData['ans_current_behaviors_to_stay_safe']) ?>
     </div>
 
     <p><b>Education Provided:</b></p>
-
-    <div class="ml-3 mb-3">
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_edu_provided_use_of_smd" {{@$contentData['ans_edu_provided_use_of_smd'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">Appropriate use of self-monitoring devices</span>
-        </label>
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_edu_provided_asymptomatic_hypoxia" {{@$contentData['ans_edu_provided_asymptomatic_hypoxia'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">Asymptomatic hypoxia</span>
-        </label>
-        <label class="mb-2 d-flex align-items-center">
-            <input type="checkbox" data-name="ans_edu_provided_cdc_guidelines" {{@$contentData['ans_edu_provided_cdc_guidelines'] ? 'checked' : ''}} class="mr-2">
-            <span class="ml-2">CDC guidelines</span>
-        </label>
+    <div class="pl-3 mb-3">
+        <div>
+        ▸ Appropriate use of self-monitoring devices: <?= @$contentData['ans_edu_provided_use_of_smd'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+        </div>
+        <div>
+        ▸ Asymptomatic hypoxia: <?= @$contentData['ans_edu_provided_asymptomatic_hypoxia'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+        </div>
+        <div>
+        ▸ CDC guidelines: <?= @$contentData['ans_edu_provided_cdc_guidelines'] ? 
+            segment_template_summary_value_display('Yes')
+            :
+            segment_template_summary_value_display('No') ?>
+        </div>        
     </div>
-
 </div>

+ 180 - 57
resources/views/app/practice-management/my-favorites.blade.php

@@ -2,67 +2,190 @@
 
 @section('content')
 
-    <div class="p-3 mcp-theme-1">
-    <div class="card">
+    <div class="p-3 mcp-theme-1" id="my-favorites">
+        <div class="card">
 
-        <div class="card-header px-2 py-1 d-flex align-items-center">
-            <strong class="">
-                <i class="fas fa-user"></i>
-                Favorites
-            </strong>
-            <span class="ml-3 text-secondary">
-                You can add Allergy, Rx and Dx items to favorites from the respective sections
-            </span>
-            <select class="ml-auto max-width-300px form-control form-control-sm"
-                    onchange="fastLoad('/practice-management/my-favorites/' + this.value, true, false, false)">
-                <option value="allergies" {{ $filter === 'allergies' ? 'selected' : '' }}>Allergies</option>
-                <option value="rx" {{ $filter === 'rx' ? 'selected' : '' }}>Rx</option>
-                <option value="dx" {{ $filter === 'dx' ? 'selected' : '' }}>Dx</option>
-                <option value="all" {{ $filter === 'all' ? 'selected' : '' }}>All favorites</option>
-            </select>
-        </div>
-        <div class="card-body p-0">
-            <table class="table table-sm table-striped p-0 m-0">
-                <thead class="bg-light">
-                <tr>
-                    <th class="px-3 border-0 width-100px">Category</th>
-                    <th class="border-0">Content</th>
-                    <th class="border-0 w-25">&nbsp;</th>
-                </tr>
-                </thead>
-                <tbody>
-                @foreach($myFavorites as $favorite)
+            <div class="card-header px-2 py-1 d-flex align-items-center">
+                <strong class="">
+                    <i class="fas fa-user"></i>
+                    Favorites
+                </strong>
+                <span class="ml-4">Show:</span>
+                <select class="ml-2 width-150px form-control form-control-sm"
+                        onchange="fastLoad('/practice-management/my-favorites/' + this.value, true, false, false)">
+                    <option value="allergy" {{ $filter === 'allergy' ? 'selected' : '' }}>Allergy</option>
+                    <option value="medication" {{ $filter === 'medication' ? 'selected' : '' }}>Medication</option>
+                    <option value="problem" {{ $filter === 'problem' ? 'selected' : '' }}>Problem</option>
+                    <option value="all" {{ $filter === 'all' ? 'selected' : '' }}>All favorites</option>
+                </select>
+                <span class="ml-4 mr-2">+ New Favorite:</span>
+                <div moe relative>
+                    <a start show href="#">Allergy</a>
+                    <form url="/api/proFavorite/create">
+                        <input type="hidden" name="proUid" value="{{$pro->uid}}">
+                        <input type="hidden" name="category" value="allergy">
+                        <input type="hidden" name="data" value="">
+                        <div class="mb-2">
+                            <label class="text-sm mb-0 font-weight-bold">Allergy *</label>
+                            <input type="text" class="form-control form-control-sm"
+                                   stag-suggest allergy stag-suggest-ep="/fdb-allergy-suggest/json" required>
+                        </div>
+                        <div class="form-group m-0">
+                            <button submit class="btn btn-primary btn-sm mr-2" disabled>Save</button>
+                            <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
+                        </div>
+                    </form>
+                </div>
+                <span class="mx-2 text-secondary text-sm">|</span>
+                <div moe relative>
+                    <a start show href="#">Medication</a>
+                    <form url="/api/proFavorite/create">
+                        <input type="hidden" name="proUid" value="{{$pro->uid}}">
+                        <input type="hidden" name="category" value="medication">
+                        <input type="hidden" name="data" value="">
+                        <div class="mb-2">
+                            <label class="text-sm mb-0 font-weight-bold">Medication *</label>
+                            <input type="text" class="form-control form-control-sm"
+                                   stag-suggest medication stag-suggest-ep="/fdb-med-suggest-v2/json" required>
+                        </div>
+                        <div class="form-group m-0">
+                            <button submit class="btn btn-primary btn-sm mr-2" disabled>Save</button>
+                            <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
+                        </div>
+                    </form>
+                </div>
+                <span class="mx-2 text-secondary text-sm">|</span>
+                <div moe relative>
+                    <a start show href="#">Problem</a>
+                    <form url="/api/proFavorite/create">
+                        <input type="hidden" name="proUid" value="{{$pro->uid}}">
+                        <input type="hidden" name="category" value="problem">
+                        <input type="hidden" name="data" value="">
+                        <div class="mb-2">
+                            <label class="text-sm mb-0 font-weight-bold">Problem *</label>
+                            <input type="text" class="form-control form-control-sm"
+                                   stag-suggest problem stag-suggest-ep="/fdb-dx-suggest-v2/json" required>
+                        </div>
+                        <div class="form-group m-0">
+                            <button submit class="btn btn-primary btn-sm mr-2" disabled>Save</button>
+                            <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
+                        </div>
+                    </form>
+                </div>
+            </div>
+            <div class="card-body p-0">
+                <table class="table table-sm table-striped p-0 m-0">
+                    <thead class="bg-light">
                     <tr>
-                        <td class="px-3">{{ ucwords($favorite->category) }}</td>
-                        <td>
-                            <?php $parsed = json_decode($favorite->data); ?>
-                            {{ $parsed->title }}
-                        </td>
-                        <td>
-                            <div class="d-flex align-items-center">
-                                <div moe relative wide class="mr-2">
-                                    <a start show class="text-danger">
-                                        <i class="fa fa-trash-alt"></i>
-                                    </a>
-                                    <form url="/api/proFavorite/remove" right>
-                                        <input type="hidden" name="uid" value="{{$favorite->uid}}">
-                                        <p>
-                                            Are you sure you want to remove this from your favorites?
-                                        </p>
-                                        <div class="form-group m-0">
-                                            <button submit class="btn btn-danger btn-sm mr-2">Yes</button>
-                                            <button cancel class="btn btn-default border btn-sm mr-2">No</button>
-                                        </div>
-                                    </form>
-                                </div>
-                            </div>
-                        </td>
+                        <th class="px-3 border-0 width-100px">Category</th>
+                        <th class="border-0">Content</th>
+                        <th class="border-0 min-width-500px">&nbsp;</th>
                     </tr>
-                @endforeach
-                </tbody>
-            </table>
+                    </thead>
+                    <tbody>
+                    @foreach($myFavorites as $favorite)
+                        <?php $parsed = json_decode($favorite->data); ?>
+                        <tr>
+                            <td class="px-3">{{ ucwords($favorite->category) }}</td>
+                            <td class="text-nowrap">
+                                {{ @$parsed->name }}
+                            </td>
+                            <td>
+                                <div class="d-flex align-items-center">
+                                    <div moe relative class="mr-3">
+                                        <a start show class="text-primary">
+                                            <i class="fa fa-edit on-hover-opaque"></i>
+                                        </a>
+                                        <form url="/api/proFavorite/updateBasic">
+                                            <input type="hidden" name="uid" value="{{$favorite->uid}}">
+                                            <input type="hidden" name="category" value="{{$favorite->category}}">
+                                            <input type="hidden" name="data" value="{{$favorite->data}}">
+                                            <div class="mb-2">
+                                            @if($favorite->category === 'allergy')
+                                                <input type="text" class="form-control form-control-sm"
+                                                       value="{{ @$parsed->name }}"
+                                                       stag-suggest allergy stag-suggest-ep="/fdb-allergy-suggest/json" required>
+                                            @elseif($favorite->category === 'medication')
+                                                <input type="text" class="form-control form-control-sm"
+                                                       value="{{ @$parsed->name }}"
+                                                       stag-suggest medication stag-suggest-ep="/fdb-med-suggest-v2/json" required>
+                                            @elseif($favorite->category === 'problem')
+                                                <input type="text" class="form-control form-control-sm"
+                                                       value="{{ @$parsed->name }}"
+                                                       stag-suggest problem stag-suggest-ep="/fdb-dx-suggest-v2/json" required>
+                                            @endif
+                                            </div>
+                                            <div class="form-group m-0">
+                                                <button submit class="btn btn-primary btn-sm mr-2" disabled>Save</button>
+                                                <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
+                                            </div>
+                                        </form>
+                                    </div>
+                                    <div moe relative wide class="mr-2">
+                                        <a start show class="text-danger">
+                                            <i class="fa fa-trash-alt on-hover-opaque"></i>
+                                        </a>
+                                        <form url="/api/proFavorite/remove" right>
+                                            <input type="hidden" name="uid" value="{{$favorite->uid}}">
+                                            <p>
+                                                Are you sure you want to remove this from your favorites?
+                                            </p>
+                                            <div class="form-group m-0">
+                                                <button submit class="btn btn-danger btn-sm mr-2">Yes</button>
+                                                <button cancel class="btn btn-default border btn-sm mr-2">No</button>
+                                            </div>
+                                        </form>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                    </tbody>
+                </table>
+            </div>
         </div>
     </div>
-    </div>
+    <script>
+        (function () {
+            function init() {
+                let parentSegment = $('#my-favorites');
+                parentSegment.find('input[stag-suggest][allergy]')
+                    .off('stag-suggest-selected')
+                    .on('stag-suggest-selected', (_e, _input, _data) => {
+                        $(_input).closest('form').find('[name="data"]').val(JSON.stringify({
+                            name: _data.text,
+                            damConceptId: _data.dam_concept_id,
+                            damConceptIdType: _data.dam_concept_id_typ
+                        }));
+                        $(_input).closest('form').find('[submit]').prop('disabled', false);
+                    });
+                parentSegment.find('input[stag-suggest][medication]')
+                    .off('stag-suggest-selected')
+                    .on('stag-suggest-selected', (_e, _input, _data) => {
+                        $(_input).closest('form').find('[name="data"]').val(JSON.stringify({
+                            name: _data.text,
+                            medId: _data.medid,
+                            routedMedId: _data.routed_med_id,
+                            routedDosageFormMedId: _data.routed_dosage_form_med_id,
+                            gcnSeqno: _data.gcn_seqno,
+                        }));
+                        $(_input).closest('form').find('[submit]').prop('disabled', false);
+                    });
+                parentSegment.find('input[stag-suggest][problem]')
+                    .off('stag-suggest-selected')
+                    .on('stag-suggest-selected', (_e, _input, _data) => {
+                        $(_input).closest('form').find('[name="data"]').val(JSON.stringify({
+                            name: _data.text,
+                            dxid: _data.dxid,
+                            icd: _data.sub_text,
+                            "icd-type": ""
+                        }));
+                        $(_input).closest('form').find('[submit]').prop('disabled', false);
+                    });
+
+            }
+            addMCInitializer('my-favorites', init, '#my-favorites');
+        }).call(window);
+    </script>
 
 @endsection

+ 3 - 2
resources/views/app/practice-management/pro-financials.blade.php

@@ -19,6 +19,7 @@
                         <option value="" {{!@$targetPro ? 'selected' : ''}}>All Pros</option>
                     </select>
                 </div>
+                <a href="#" class="ml-auto" onclick="$('.debited-row').toggleClass('d-none');return false;">Toggle Debited</a>
                 @if(@$targetPro)
                     <a href="/practice-management/pro-financials" class="ml-2">Clear Filter</a>
                 @endif
@@ -107,9 +108,9 @@
                                             <th></th>
                                         </tr>
                                         @foreach($row->debitBills as $debitBill)
-                                        <tr>
+                                        <tr class="{{$debitBill->has_debit_pro_been_debited ? 'debited-row d-none' : ''}}">
                                             <td>{{$debitBill->debit_pro_expected_amount}}</td>
-                                            <td>{{$debitBill->has_debit_pro_been_debited}}</td>
+                                            <td>{{$debitBill->has_debit_pro_been_debited?'Yes':'No'}}</td>
                                             <td>{{$debitBill->debit_pro_expected_amount?'Yes':'No'}}</td>
                                             <td>{{$debitBill->is_verified?'Yes':'No'}}</td>
                                             <td>

+ 32 - 132
resources/views/layouts/patient.blade.php

@@ -376,17 +376,35 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 											style="background-image:<?=$thumbnail?>"><?=$initials?></div>
 											<div class="d-inline-flex align-items-baseline">
 												<i class="chart mr-2">#{{$patient->chart_number}}</i>
-												<i class="fas fa-info-circle text-primary" data-toggle="tooltip" data-placement="right" title="Joined <?=$memberSince?>"></i>
+												<span class="on-hover-show d-inline-block on-hover-opaque">
+													<i class="fa fa-info-circle ml-1 text-primary"></i>
+													<div class="on-hover-content py-2 pl-3 text-nowrap">
+														Joined <?=$memberSince?>
+														@if($pro->pro_type === 'ADMIN')
+															<div class="mt-1">
+																Created by <b>{{$patient->creator ? $patient->creator->displayName() : '-'}}</b>
+															</div>
+															<div class="mt-1">
+																Created on <b>{{friendly_date_time($patient->created_at)}}</b>
+															</div>
+														@endif
+													</div>
+												</span>
 											</div>
 										</div>
 										<div class=separators>
-											<div>{{friendly_date_time($patient->dob, false,null, true)}} ({{$patient->age_in_years}}
+											<div>{{friendly_date($patient->dob, false,null, true)}} ({{$patient->age_in_years}}
 												y.o {{$patient->sex}})
 											</div>
 											@if($patient->getPrimaryCoverage() &&  $patient->getPrimaryCoverageStatus() === 'YES')
 												<div class="text-nowrap screen-only">
-													<i class="fa fa-check-circle text-success" data-toggle="tooltip" data-placement="bottom" title="Covered"></i>
 													{{$patient->getPrimaryCoverage()->insuranceDisplayName()}}
+													<span class="on-hover-show d-inline-block on-hover-opaque">
+														<i class="fa fa-check-circle text-success"></i>
+														<div class="on-hover-content py-2 pl-3 text-nowrap">
+															Covered
+														</div>
+													</span>
 												</div>
 											@endif
 											<div class="screen-only">
@@ -564,119 +582,10 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 
                                         </div>
                                     </section>
-                                    {{--<section>
-                                        <div>
-                                            <label>Next Appt:</label>
-                                            <?php
-                                            $nextAppointment = $patient->nextMcpAppointment();
-                                            $startTime = false;
-                                            $endTime = false;
-                                            if($nextAppointment) {
-                                                $startTime = date('H:i', strtotime($nextAppointment->start_time));
-                                                $endTime = date('H:i', strtotime($nextAppointment->end_time));
-                                                $nextAppointment = date('Y-m-d', strtotime($nextAppointment->start_time));
-                                            }
-                                            ?>
-                                            {{$nextAppointment ? friendly_date_time($nextAppointment . ($startTime ? ' ' . $startTime : ''), true, '') : '-'}}
-                                            <span moe relative class="ml-1">
-                                                <a start show><i class="fa fa-edit"></i></a>
-                                                <form url="/api/appointment/create" class="mcp-theme-1" right>
-                                                    <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                                                    <input type="hidden" name="title" value="MCP Appointment">
-                                                    <div class="mb-2">
-                                                        <label class="text-secondary text-sm">Pro</label>
-                                                        <select name="proUid" class="form-control form-control-sm">
-                                                            <option value=""> --select-- </option>
-                                                            @foreach($pros as $iPro)
-                                                                <option value="{{$iPro->uid}}" {{ $iPro->uid === $pro->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
-                                                            @endforeach
-                                                        </select>
-                                                    </div>
-                                                    <div class="mb-2">
-                                                        <label class="text-secondary text-sm">Date</label>
-                                                        <input type="date" name="date" min="{{ date('Y-m-d') }}"
-                                                               value="{{ $nextAppointment ? $nextAppointment : date('Y-m-d') }}"
-                                                               class="form-control form-control-sm">
-                                                    </div>
-                                                    <div class="mb-2">
-                                                        <label class="text-secondary text-sm">Start Time</label>
-                                                        <input type="time" name="startTime" class="form-control form-control-sm"
-                                                               value="{{ $startTime ? $startTime : '' }}">
-                                                    </div>
-                                                    <div class="mb-2">
-                                                        <label class="text-secondary text-sm">End Time</label>
-                                                        <input type="time" name="endTime" class="form-control form-control-sm"
-                                                               value="{{ $endTime ? $endTime : '' }}">
-                                                    </div>
-                                                    <div>
-                                                        <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                                                        <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                                    </div>
-                                                </form>
-                                            </span>
-                                        </div>
-                                        <div>
-                                            <label>CM:</label> {{ $patient->is_enrolled_in_cm === 'YES' ? 'Yes' : 'No' }}
-                                            <label class="ml-2">RM:</label> {{ $patient->is_enrolled_in_rm === 'YES' ? 'Yes' : 'No' }}
-                                        </div>
-                                    </section>--}}
-                                    <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-4">
-										@if(false)
-                                        <div moe>
-                                            <button class="col-2-button" start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
-                                            </button>
-                                            <form url="/api/note/createUsingTemplate"
-                                                  redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
-                                                  class="mcp-theme-1">
-                                                <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                                                @if($pro->is_hcp)
-                                                <input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
-                                                @else
-                                                <input type="hidden" name="naProUid" value="{{$pro->uid}}">
-                                                @endif
-                                                <input type="hidden" name="effectiveDateEST" value="{{date("Y-m-d")}}">
-                                                <input type="hidden" name="effectiveTime" value="{{date("h:i")}}">
-                                                <input type="hidden" name="title" id="note-create-title" value="">
-                                                <div class="form-group mb-2">
-                                                    <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
-                                                    <select name="noteTemplateUid" class="form-control form-control-sm"
-                                                            onchange="$('#note-create-title').val($(this).find('option:selected').text())"
-                                                            required>
-                                                        <option value=""> --select--</option>
-                                                        @foreach($pro->noteTemplates as $noteTemplate)
-                                                            <?php $nT = $noteTemplate->template(); ?>
-                                                            <option value="{{$nT->uid}}">{{$nT->title}}</option>
-                                                        @endforeach
-                                                    </select>
-                                                </div>
-                                                <div class="mb-2">
-                                                    <label for="" class="text-secondary text-sm mb-1">Method *</label>
-                                                    <select name="method" class="form-control form-control-sm note-method-select" required>
-                                                        <option value="AUDIO">Audio</option>
-                                                        <option value="VIDEO">Video</option>
-                                                        <option value="IN_CLINIC">In-Clinic</option>
-                                                        <option value="HOUSE_CALL">House Call</option>
-                                                    </select>
-                                                </div>
-                                                <div class="form-group if-in-clinic">
-                                                    <label for="" class="text-secondary text-sm mb-1">Location</label>
-                                                    <select name="hcpCompanyLocationUid" class="form-control">
-                                                        <option value=""></option>
-                                                        @foreach($pro->companyLocations() as $location)
-                                                            <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
-                                                        @endforeach
-                                                    </select>
-                                                </div>
-                                                <div class="form-group m-0">
-                                                    <button submit class="btn btn-primary btn-sm">submit</button>
-                                                </div>
-                                            </form>
-                                        </div>
-										@endif
+                                    <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-3 pl-3 border-left mcp-theme-1">
                                         <div>
                                             <div moe relative>
-                                                <button class="col-2-button" start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;SMS
-                                                </button>
+                                                <a href="#" start show class="d-flex align-items-baseline"><i class="fa fa-plus text-sm mr-1"></i><span>SMS</span></a>
                                                 <form url="/api/clientSms/createOutgoing" right class="mcp-theme-1" noreload>
                                                     <input type="hidden" name="uid" value="{{ $patient->uid }}">
                                                     <div class="mb-2">
@@ -702,8 +611,7 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
                                         </div>
                                         <div>
                                         <span moe relative class="">
-                                            <button class="col-2-button" start show title="SMS check-in link to the patient"><i
-                                                    class="on-hover-opaque fa fa-paper-plane text-secondary"></i>&nbsp;Send</button>
+                                            <a href="#" start show class="d-flex align-items-baseline" title="SMS check-in link to the patient"><i class="fa fa-paper-plane text-sm mr-1"></i><span>Send</span></a>
                                             <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
                                                   class="mcp-theme-1">
                                                 <input type="hidden" name="uid" value="{{ $patient->uid }}">
@@ -728,16 +636,14 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
                                             </form>
                                         </span>
                                         </div>
-																				@if($performer->pro->pro_type == 'ADMIN')
-																				<div>
-																					<button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i
-																									class="on-hover-opaque fa fa-video text-secondary"></i>&nbsp;Check</button>
-																				</div>
-																				@endif
-																				<div>
-																					<button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i
-																									class="on-hover-opaque fa fa-video text-secondary"></i>&nbsp;Join</button>
-																				</div>
+										@if($performer->pro->pro_type == 'ADMIN')
+										<div>
+											<a href="#" start show class="d-flex align-items-baseline" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i class="fa fa-video text-sm mr-1"></i><span>Check</span></a>
+										</div>
+										@endif
+										<div>
+											<a href="#" start show class="d-flex align-items-baseline" onclick="return openInRHS('/pro/meed/{{ $patient->uid }}')"><i class="fa fa-video text-sm mr-1"></i><span>Join</span></a>
+										</div>
                                     </section>
 									@if(!$patient->getPrimaryCoverage() || $patient->getPrimaryCoverageStatus() !== 'YES')
 									<section class="hide-inside-popup screen-only vbox align-self-start mt-2 mx-2">
@@ -922,8 +828,6 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 						form.find('.if-in-clinic').hide();
 					}
 				});
-
-				// $('[data-toggle="tooltip"]').tooltip('hover');
 			}
 			addMCInitializer('patient-add-note-popup', init, '#patient-header')
 		}).call(window);
@@ -939,10 +843,6 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 				if(localStorage.sidebarMenuScrollTop) {
 					$('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
 				}
-
-				$(function () {
-					$('[data-toggle="tooltip"]').tooltip();
-				});
 			}
 			addMCInitializer('sidebarMenu', init, '#sidebarMenu')
 		}).call(window);

+ 154 - 40
sample.json

@@ -1,55 +1,169 @@
 {
-    "created_at": "2020-07-31T16:14:00Z",
-    "eligible_id": "9CV9QVPUUDCQ8E",
+    "created_at": "2022-01-18T12:51:22Z",
+    "eligible_id": "3GSG50JUTCF43",
     "known_issues": [],
     "date_of_death": null,
-    "last_name": "FRANKLIN",
-    "first_name": "BENJAMIN",
-    "middle_name": "J",
-    "member_id": "333333333A",
+    "last_name": "SHAH",
+    "first_name": "RASIKLAL",
+    "middle_name": "R",
+    "member_id": "3U26R07JQ63",
     "group_id": null,
     "group_name": null,
-    "dob": "1967-09-09",
+    "dob": "1931-10-14",
     "gender": "M",
     "address": {
-        "street_line_1": "1842 Union Street",
+        "street_line_1": "8572 263RD ST",
         "street_line_2": null,
-        "city": "San Francisco",
-        "state": "OH",
-        "zip": "94123"
+        "city": "FLORAL PARK",
+        "state": "NY",
+        "zip": "110011138"
     },
     "payer_name": "CMS",
-    "payer_id": "00431","p
-    lan_number":"","eligibilty_dates":{"start":"2019-02-27","end":null},"eligibility_dates":{"start":"2019-02-27","end":null},"inactivity_dates":{"start":null,"end":null},"plan_types":{"MA":"Medicare Part A (Hospital)","MB":"Medicare Part B (
-    Professional Services)","MC":"Medicare Part C (Advantage)","MD":"Medicare Part D (Prescription drugs)","PR":"Primary insurance (Medicare Secondary, This Insurance is Primary)"},"plan_details":{"MA":{"active":true,"start_date":"1994-01-01",
-    "end_date": null,
-    "deductible": 1288.0,
-    "deductible_remaining": 1288.0,
-    "insurance_type": "MA",
-    "insurance_type_label": "Medicare Part A",
-    "coinsurance_percent": null,
-    "copayment": null,
-    "info_valid_until": "2020-12-31",
-    "info_valid_till": "2020-12-31","
-    comments":[]},"MB":{"active":true,"start_date":"1994-01-01","end_date":null,"deductible":166.0,"deductible_remaining":23.93,"insurance_type":"MB","insurance_type_label":"Medicare Part B","coinsurance_percent":20,"copayment":null,"info_val
-    id_until":"2020-12-31","info_valid_till":"2020-12-31","comments":[]},"MC":{"active":false,"payer_name":null,"insurance_type":null,"insurance_type_label":null,"mco_bill_option_code":null,"mco_bill_option_label":null,"locked":null,"policy_n
-    umber":null,"effective_date":null,"termination_date":null,"contacts":null,"address":{"street_line_1":null,"street_line_2":null,"city":null,"state":null,"zip":null},"comments":[]},"MD":{"active":true,"payer_name":"FRANKLIN","policy_number": "123123123",
-    "effective_date": "2019-01-01",
-    "termination_date": null,
-    "contacts": [
+    "payer_id": "00431",
+    "plan_number": "",
+    "eligibilty_dates": {
+        "start": "2022-01-18",
+        "end": null
+    },
+    "eligibility_dates": {
+        "start": "2022-01-18",
+        "end": null
+    },
+    "inactivity_dates": {
+        "start": null,
+        "end": null
+    },
+    "plan_types": {
+        "MA": "Medicare Part A (Hospital)",
+        "MB": "Medicare Part B (Professional Services)",
+        "MC": "Medicare Part C (Advantage)",
+        "MD": "Medicare Part D (Prescription drugs)",
+        "PR": "Primary insurance (Medicare Secondary, This Insurance is Primary)"
+    },
+    "plan_details": {
+        "MA": {
+            "active": true,
+            "start_date": "2004-07-01",
+            "end_date": null,
+            "deductible": 0.0,
+            "deductible_remaining": null,
+            "insurance_type": "QM",
+            "insurance_type_label": "Qualified Medicare Beneficiary",
+            "coinsurance_percent": null,
+            "copayment": null,
+            "info_valid_until": "2022-12-31",
+            "info_valid_till": "2022-12-31",
+            "comments": [
+                "0-Beneficiary insured due to age OASI"
+            ]
+        },
+        "MB": {
+            "active": true,
+            "start_date": "1996-10-01",
+            "end_date": null,
+            "deductible": 0.0,
+            "deductible_remaining": null,
+            "insurance_type": "QM",
+            "insurance_type_label": "Qualified Medicare Beneficiary",
+            "coinsurance_percent": 0,
+            "copayment": null,
+            "info_valid_until": "2022-12-31",
+            "info_valid_till": "2022-12-31",
+            "comments": [
+                "0-Beneficiary insured due to age OASI"
+            ]
+        },
+        "MC": {
+            "active": false,
+            "payer_name": null,
+            "insurance_type": null,
+            "insurance_type_label": null,
+            "mco_bill_option_code": null,
+            "mco_bill_option_label": null,
+            "locked": null,
+            "policy_number": null,
+            "effective_date": null,
+            "termination_date": null,
+            "contacts": null,
+            "address": {
+                "street_line_1": null,
+                "street_line_2": null,
+                "city": null,
+                "state": null,
+                "zip": null
+            },
+            "comments": []
+        },
+        "MD": {
+            "active": true,
+            "payer_name": "CIGNA HEALTH AND LIFE INSURANCE COMPANY",
+            "policy_number": "S5617",
+            "effective_date": "2016-01-01",
+            "termination_date": null,
+            "contacts": [
+                {
+                    "contact_type": "telephone",
+                    "contact_value": "8002226700"
+                },
+                {
+                    "contact_type": "url",
+                    "contact_value": "www.cignamedicare.com"
+                }
+            ],
+            "address": {
+                "street_line_1": "900 Cottage Grove Rd",
+                "street_line_2": "B4SRS",
+                "city": "Hartford",
+                "state": "CT",
+                "zip": "06152"
+            },
+            "comments": []
+        },
+        "PR": []
+    },
+    "requested_service_types": [
         {
-            "contact_type": "telephone",
-            "contact_value": "8887116798"
+            "type": "30",
+            "type_label": "Health Benefit Plan Coverage",
+            "plan_type": "MA",
+            "active": true,
+            "start_date": "2004-07-01",
+            "end_date": null,
+            "deductible": 0.0,
+            "deductible_remaining": null,
+            "insurance_type": "QM",
+            "insurance_type_label": "Qualified Medicare Beneficiary",
+            "coinsurance_percent": null,
+            "copayment": null,
+            "info_valid_until": "2022-12-31",
+            "info_valid_till": "2022-12-31"
         },
         {
-            "contact_type": "url",
-            "contact_value": "www.FirstHealthPartD.com"
+            "type": "30",
+            "type_label": "Health Benefit Plan Coverage",
+            "plan_type": "MB",
+            "active": true,
+            "start_date": "1996-10-01",
+            "end_date": null,
+            "deductible": 0.0,
+            "deductible_remaining": null,
+            "insurance_type": "QM",
+            "insurance_type_label": "Qualified Medicare Beneficiary",
+            "coinsurance_percent": 0,
+            "copayment": null,
+            "info_valid_until": "2022-12-31",
+            "info_valid_till": "2022-12-31"
         }
     ],
-    "address": {
-        "street_line_1":"1842 U
-    nion Street","street_line_2":null,"city":"San Francisco","state":"IL","zip":"94123"},"comments":[]},"PR":[]},"requested_service_types":[{"type":"30","type_label":"Health Benefit Plan Coverage","plan_type":"MA","active":true,"start_date":"
-    1994-01-01","end_date":null,"deductible":1288.0,"deductible_remaining":1288.0,"insurance_type":"MA","insurance_type_label":"Medicare Part A","coinsurance_percent":null,"copayment":null,"info_valid_until":"2020-12-31","info_valid_till":"20
-    20-12-31"},{"type":"30","type_label":"Health Benefit Plan Coverage","plan_type":"MB","active":true,"start_date":"1994-01-01","end_date":null,"deductible":166.0,"deductible_remaining":23.93,"insurance_type":"MB","insurance_type_label":"Med
-    icare Part B","coinsurance_percent":20,"copayment":null,"info_valid_until":"2020-12-31","info_valid_till":"2020-12-31"}],"requested_procedure_codes":[],"history":{"plan_details":{"MA":[],"MB":[],"MC":[],"MD":[],"PR":[]},"requested_service
-    _types":[]}}
+    "requested_procedure_codes": [],
+    "history": {
+        "plan_details": {
+            "MA": [],
+            "MB": [],
+            "MC": [],
+            "MD": [],
+            "PR": []
+        },
+        "requested_service_types": []
+    }
+}