浏览代码

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

= 3 年之前
父节点
当前提交
879a0eec71
共有 47 个文件被更改,包括 957 次插入742 次删除
  1. 14 0
      app/Helpers/helpers.php
  2. 3 0
      app/Http/Controllers/HomeController.php
  3. 3 1
      config/app.php
  4. 65 1
      config/stag.php
  5. 54 50
      js-dev/mc.js
  6. 2 1
      js-dev/pro-suggest.js
  7. 2 0
      js-dev/stag-popup.js
  8. 4 0
      public/css/style.css
  9. 14 18
      resources/views/app/admin/patients_filters.blade.php
  10. 11 0
      resources/views/app/patient/allergies-center.blade.php
  11. 48 47
      resources/views/app/patient/care-month/put-rm-reasons.blade.php
  12. 13 13
      resources/views/app/patient/care-month/rm-reasons.blade.php
  13. 2 2
      resources/views/app/patient/intake-data/patient-intake-data-form.blade.php
  14. 13 0
      resources/views/app/patient/medications-center.blade.php
  15. 1 3
      resources/views/app/patient/medications-reconcile.blade.php
  16. 1 1
      resources/views/app/patient/modules/lifestyle_general/edit.blade.php
  17. 1 1
      resources/views/app/patient/modules/lifestyle_nutrition/edit.blade.php
  18. 1 1
      resources/views/app/patient/modules/lifestyle_physical_activity/edit.blade.php
  19. 1 1
      resources/views/app/patient/modules/lifestyle_sleep/edit.blade.php
  20. 1 1
      resources/views/app/patient/modules/lifestyle_social/edit.blade.php
  21. 1 1
      resources/views/app/patient/modules/lifestyle_stress/edit.blade.php
  22. 1 1
      resources/views/app/patient/modules/lifestyle_substances/edit.blade.php
  23. 2 1
      resources/views/app/patient/modules/weight_loss_intake/edit.blade.php
  24. 1 1
      resources/views/app/patient/note/_OLD_segment.blade.php
  25. 28 28
      resources/views/app/patient/note/dashboard.blade.php
  26. 348 313
      resources/views/app/patient/note/rm-setup.blade.php
  27. 1 1
      resources/views/app/patient/note/section.blade.php
  28. 2 2
      resources/views/app/patient/note/segment-slim.blade.php
  29. 1 1
      resources/views/app/patient/note/segment.blade.php
  30. 53 5
      resources/views/app/patient/notes.blade.php
  31. 47 47
      resources/views/app/patient/partials/put-rm-reasons.blade.php
  32. 44 0
      resources/views/app/patient/partials/rm-reasons-display.blade.php
  33. 4 47
      resources/views/app/patient/partials/rm-setup.blade.php
  34. 0 4
      resources/views/app/patient/prescriptions/list.blade.php
  35. 12 0
      resources/views/app/patient/problems-center.blade.php
  36. 1 1
      resources/views/app/patient/problems-quick-add.blade.php
  37. 6 6
      resources/views/app/patient/segment-templates/_common_actions/toggle-relevance.blade.php
  38. 1 1
      resources/views/app/patient/segment-templates/mc_weight_loss_intake_subjective/edit.blade.php
  39. 32 0
      resources/views/app/patient/wizard-partials/add-multiple-pre-existing.blade.php
  40. 6 56
      resources/views/app/patient/wizard-partials/common-script.blade.php
  41. 1 1
      resources/views/app/practice-management/process-notes.blade.php
  42. 1 1
      resources/views/layouts/confirm-hours-of-availability-notification.blade.php
  43. 1 1
      resources/views/layouts/no-mc-template.blade.php
  44. 86 72
      resources/views/layouts/patient-header.blade.php
  45. 17 8
      resources/views/layouts/patient.blade.php
  46. 1 1
      resources/views/layouts/template-no-mc.blade.php
  47. 5 1
      resources/views/layouts/template.blade.php

+ 14 - 0
app/Helpers/helpers.php

@@ -362,6 +362,20 @@ if(!function_exists('friendly_date')) {
     }
 }
 
+if(!function_exists('friendly_date_short')) {
+    function friendly_date_short($value) {
+        if(!$value || empty($value)) return '';
+        try {
+            $result = strtotime($value);
+            $result = date("m/d/y", $result);
+            return $result;
+        }
+        catch (Exception $e) {
+            return $value;
+        }
+    }
+}
+
 if(!function_exists('friendly_date_month_year')) {
     function friendly_date_month_year($value) {
         if(!$value || empty($value)) return '';

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

@@ -1882,6 +1882,9 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
                 case 'hcp':
                     $pros->where('is_hcp', true);
                     break;
+                case 'non-hcp':
+                    $pros->where('is_hcp', false);
+                    break;
                 case 'default-na': // TODO: fix condition for NA
                     $pros->where('is_hcp', false)->where('pro_type', '!=', 'ADMIN');
                     break;

+ 3 - 1
config/app.php

@@ -65,7 +65,7 @@ return [
 
     'hrm2_url' => env('HRM2_URL'),
 
-    'asset_version' => 72,
+    'asset_version' => 75,
 
     'temp_dir' => env('TEMP_DIR'),
 
@@ -146,6 +146,8 @@ return [
     'googleSpreadsheetId' => env('GOOGLE_SPREADSHEET_ID'),
     'googleSpreadsheetProductsSheetName' => env('GOOGLE_SPREADSHEET_PRODUCTS_SHEET_NAME'),
 
+    'adminNoteHcpProUid' => env('ADMIN_NOTE_HCP_PRO_UID'),
+
     /*
     |--------------------------------------------------------------------------
     | Autoloaded Service Providers

+ 65 - 1
config/stag.php

@@ -3,5 +3,69 @@
 return [
     'authUrl' => env('AUTH_URL'),
     'adminPortalUrl' => env('ADMIN_PORTAL_URL', 'https://fe.scholar.securecpu.com'),
-    'backendUrl' => env('BACKEND_URL','https://scholar.securecpu.com')
+    'backendUrl' => env('BACKEND_URL','https://scholar.securecpu.com'),
+
+    'segmentRefreshConfig' => [
+        'typeToSegments' => [
+            'allergy' => [
+                'intake_allergies',
+                'plan_allergies',
+                'allergies',
+                'omega_allergies',
+                'omega_subjective_system',
+                'omega_plan_system',
+            ],
+            'medication' => [
+                'intake_medications',
+                'plan_medications',
+                'omega_medications',
+                'medications',
+                'omega_subjective_system',
+                'omega_plan_system',
+            ],
+            'problem' => [
+                'intake_problems',
+                'plan_problems',
+                'omega_problems',
+                'problems',
+                'omega_subjective_system',
+                'omega_plan_system',
+            ],
+            'goal' => [
+                'intake_goals',
+                'plan_goals',
+                'omega_goals',
+                'goals',
+                'omega_subjective_system',
+                'omega_plan_system',
+            ],
+            'care-team-member' => [
+                'intake_care_team',
+                'plan_care_team',
+                'omega_care_team',
+                'care_team',
+                'omega_subjective_system',
+                'omega_plan_system',
+            ],
+        ],
+
+        'wizardToTypes' => [
+            'allergies-center' => ['allergy'],
+            'medications-center' => ['medication'],
+            'problems-center' => ['problem'],
+            'goals-center' => ['goal'],
+            'careteam-center' => ['care-team-member']
+        ],
+
+        'wizardToSegments' => [
+            'past_medical_history/edit' => ['omega_history_past_medical'],
+            'history_family/edit' => ['omega_history_family'],
+            'history_social/edit' => ['omega_history_social'],
+            'history_surgical/edit' => ['omega_history_surgical'],
+            'weight_loss_intake/edit' => ['omega_subjective_system', 'omega_plan_system'],
+            'nutrition-center' => ['omega_subjective_system', 'omega_plan_system'],
+            'exercise-center' => ['omega_subjective_system', 'omega_plan_system'],
+            'behavior-center' => ['omega_subjective_system', 'omega_plan_system'],
+        ],
+    ]
 ];

+ 54 - 50
js-dev/mc.js

@@ -557,7 +557,50 @@ window.fillJsonDataField = function(form, field = "data") {
     }
     return parsed;
 }
+window.refreshSegment = function(_segment) {
+    $('.visit-segment[data-segment-template-name="' + _segment + '"]').find('.refresh-segment').trigger('click');
+};
+window.refreshAffectedSegmentsByType = function(_type) {
+    if(!_type) {
+        console.error('refreshAffectedSegmentsByType: _type cannot be empty!');
+        return;
+    }
+    let segments = window.segmentRefreshConfig.typeToSegments[_type];
+    if(segments && segments.length) {
+        for (let i = 0; i < segments.length; i++) {
+            refreshSegment(segments[i]);
+        }
+    }
+    else {
+        if(!_type) {
+            console.error('refreshAffectedSegmentsByType: no segments to refresh for type:', _type);
+        }
+    }
+};
+window.refreshAffectedSegmentsByPopupKey = function(_key) {
+    let types = [];
+    for(let x in window.segmentRefreshConfig.wizardToTypes) {
+        if(window.segmentRefreshConfig.wizardToTypes.hasOwnProperty(x) && _key.indexOf(x) !== -1) {
+            types.push(window.segmentRefreshConfig.wizardToTypes[x]);
+            break;
+        }
+    }
+    for (let i = 0; i < types.length; i++) {
+        refreshAffectedSegmentsByType(types[i]);
+    }
+    let segments = [];
+    for(let x in window.segmentRefreshConfig.wizardToSegments) {
+        if(window.segmentRefreshConfig.wizardToSegments.hasOwnProperty(x) && _key.indexOf(x) !== -1) {
+            segments = window.segmentRefreshConfig.wizardToSegments[x];
+            break;
+        }
+    }
+    for (let i = 0; i < segments.length; i++) {
+        refreshSegment(segments[i]);
+    }
+};
 window.saveVisitForm = function(_trigger, _silent = false, _close = false, _doneCallback = null) {
+    console.info("saveVisitForm");
     let form = $(_trigger).closest('form');
 
     if (!_silent && !form[0].checkValidity()) {
@@ -599,56 +642,17 @@ window.saveVisitForm = function(_trigger, _silent = false, _close = false, _done
         if(!hasResponseError(_data)) {
             if(typeof window.updateAllSegmentsInResponse !== 'undefined') {
                 window.updateAllSegmentsInResponse(_data, true, _silent);
-
-                // if /api/visitPoint/upsertChildReview - refresh subjective_general_v2
-                // if /api/visitPoint/upsertChildPlan - refresh plan_free_text_v2
-
-                let parentPopup = form.closest('.stag-popup');
-
-                let eps = [
-                    '/api/visitPoint/upsertChildReview',
-                    '/api/visitPoint/upsertChildPlan',
-                    '/api/visitPoint/destroyCurrentChildReview',
-                    '/api/visitPoint/destroyCurrentChildPlan',
-                    '/api/visitPoint/addTopLevelBulkPreExisting'
-                ];
-
-                if(parentPopup.length && eps.indexOf(form.attr('url')) !== -1) {
-                    if(parentPopup.attr('stag-popup-key').indexOf('past_medical_history/edit') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_history_past_medical"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('history_family/edit') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_history_family"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('history_social/edit') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_history_social"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('history_surgical/edit') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_history_surgical"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('allergies-center') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_allergies"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('medications-center') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_medications"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('problems-center') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_problems"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('goals-center') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_goals"]').find('.refresh-segment').trigger('click');
-                    }
-                    else if(parentPopup.attr('stag-popup-key').indexOf('careteam-center') !== -1) {
-                        $('.visit-segment[data-segment-template-name="omega_care_team"]').find('.refresh-segment').trigger('click');
-                    }
-                }
-
-                // refresh omega_xxx_system on ALL changes
-                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                // $('.visit-segment[data-segment-template-name="omega_objective_system"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_assessment_system"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
-
+            }
+            let parentPopup = form.closest('.stag-popup');
+            let eps = [
+                '/api/visitPoint/upsertChildReview',
+                '/api/visitPoint/upsertChildPlan',
+                '/api/visitPoint/destroyCurrentChildReview',
+                '/api/visitPoint/destroyCurrentChildPlan',
+                '/api/visitPoint/addTopLevelBulkPreExisting'
+            ];
+            if(parentPopup.length && eps.indexOf(form.attr('url')) !== -1) {
+                refreshAffectedSegmentsByPopupKey(parentPopup.attr('stag-popup-key'));
             }
             if(typeof window.refreshRHSSidebar !== 'undefined') {
                 window.refreshRHSSidebar();

+ 2 - 1
js-dev/pro-suggest.js

@@ -104,7 +104,8 @@
             let elem = $(this);
             elem.next('.pro-suggest-input').remove();
             elem.next('.pro-suggestions-container').remove();
-            let input = $('<input type="text" placeholder="Pro">').addClass('pro-suggest-input form-control form-control-sm').insertAfter(elem);
+            let input = $('<input type="text" placeholder="Pro">').addClass('pro-suggest-input form-control').insertAfter(elem);
+            if($(this).is('.form-control-sm')) input.addClass('form-control-sm');
             input.attr('provider-type', elem.attr('provider-type'));
             $('<div class="pro-suggestions-container position-relative">' +
                 '<div class="suggestions-outer pro-suggestions position-absolute d-none"></div>' +

+ 2 - 0
js-dev/stag-popup.js

@@ -93,6 +93,8 @@ function openDynamicStagPopup(_url, initer, title, updateParent, style = '', rep
     if(url.indexOf('popupmode') === -1) {
         url += (url.indexOf('?') !== -1 ? '&' : '?') + 'popupmode=1';
     }
+    // close out any open inline visit-segment
+    $('.note-section.visit-segment.edit').removeClass('edit');
     showMask();
     window.noMc = true;
     $.get(url, (_data) => {

+ 4 - 0
public/css/style.css

@@ -3418,3 +3418,7 @@ body.forced-masking #mask {
 .mcp-theme-1 .point-table [if-read-mode] .inline-html-container {
     cursor: pointer;
 }
+table.v-top td, 
+table.v-top th {
+    vertical-align:top;
+}

+ 14 - 18
resources/views/app/admin/patients_filters.blade.php

@@ -30,30 +30,14 @@
 	</div>
 
 	<div class="sm-section">
-		<div class="">
+		<div class="mcp-filter-container">
 			<label>MCP:</label>
-			<select name="mcp" class="form-control min-width-unset" v-model="filters.mcp">
-				<option value="">--select--</option>
-				<option value="NO_MCP">No MCP</option>
-				<?php $mcpPros = \App\Models\Pro::where('is_active', true)->where('is_enrolled_as_mcp', true)->orderBy('name_display')->get(); ?>
-				@foreach($mcpPros as $mcpPro)
-					<option value="{{$mcpPro->uid}}">{{$mcpPro->displayName()}}</option>
-				@endforeach
-			</select>
 		</div>
 	</div>
 
 	<div class="sm-section">
-		<div class="">
+		<div class="na-filter-container">
 			<label>NA:</label>
-			<select name="na" class="form-control min-width-unset" v-model="filters.na">
-				<option value="">--select--</option>
-				<option value="NO_NA">No NA</option>
-				<?php $naPros = \App\Models\Pro::where('is_active', true)->where('is_considered_for_dna', true)->orWhere('pro_type', '=', 'ADMIN')->orderBy('name_display')->get(); ?>
-				@foreach($naPros as $naPro)
-					<option value="{{$naPro->uid}}">{{$naPro->name_display}}</option>
-				@endforeach
-			</select>
 		</div>
 	</div>
 
@@ -416,6 +400,18 @@ for ($i=0; $i < count($allFilterKeys); $i++) {
 				mounted: function() {
 					console.log(this.filters);
 					this.init();
+
+					let mcpSelect = $('<select name="mcp" class="form-control min-width-unset input-sm" provider-search data-pro-uid="{{request()->input('mcp')}}" provider-type="hcp"><option value="">--select--</option></select>').appendTo('.mcp-filter-container');
+					let naSelect = $('<select name="na" class="form-control min-width-unset input-sm" provider-search data-pro-uid="{{request()->input('na')}}" provider-type="non-hcp"><option value="">--select--</option></select>').appendTo('.na-filter-container');
+					initProSuggest();
+
+					/*let self = this;
+					mcpSelect.off('change').on('change', function() {
+						self.doSubmit();
+					});
+					naSelect.off('change').on('change', function() {
+						self.doSubmit();
+					});*/
 				},
 			});
 

+ 11 - 0
resources/views/app/patient/allergies-center.blade.php

@@ -389,6 +389,17 @@ if(!@$summaryView) {
                     return false;
                 });
 
+            parentSegment.find('.multi-favorite-item')
+                .off('click.add-from-multi-favorite')
+                .on('click.add-from-multi-favorite', function () {
+                    let row = $(this).closest('tr');
+                    row.find('input[key="name"]').val($(this).attr('data-name')).focus();
+                    row.find('input[data-name="damConceptId"]').val($(this).attr('data-damConceptId'));
+                    row.find('input[data-name="damConceptIdType"]').val($(this).attr('data-damConceptIdType'));
+                    $(this).closest('.on-click-menu').find('[menu]').hide();
+                    return false;
+                });
+
             let mode = 'read';
 
             // custom buttons on title bar

+ 48 - 47
resources/views/app/patient/care-month/put-rm-reasons.blade.php

@@ -1,54 +1,55 @@
-<div moe>
+<div moe relative>
 	<a start show><i class="fas fa-edit"></i></a>
-	<form url="/api/careMonth/putRmReasons" class="mcp-theme-1">
+	<form url="/api/careMonth/putRmReasons" class="mcp-theme-1" right>
 		<input type="hidden" name="uid" value="{{$careMonth->uid}}">
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 1</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code data-target="input[name=rmReasonIcd1Description]" name="rmReasonIcd1" value="{{ $careMonth->rm_reason_icd1 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 1 Description</label>
-				<input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd1Description" value="{{ $careMonth->rm_reason_icd1description }}">
-			</div>
-		</div>
-
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 2</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd2" data-target="input[name=rmReasonIcd2Description]" value="{{ $careMonth->rm_reason_icd2 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 2 Description</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd2Description" value="{{ $careMonth->rm_reason_icd2description }}">
-			</div>
+		<div>
+			<table class="table table-sm table-bordered">
+				<thead class="bg-light">
+					<tr>
+						<th class="border-bottom-0">ICD</th>
+						<th class="border-bottom-0">Description</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code data-target="input[name=rmReasonIcd1Description]" name="rmReasonIcd1" value="{{ $careMonth->rm_reason_icd1 }}" placeholder="ICD 1" />
+						</td>
+						<td>
+							<input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd1Description" value="{{ $careMonth->rm_reason_icd1description }}">
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd2" data-target="input[name=rmReasonIcd2Description]" value="{{ $careMonth->rm_reason_icd2 }}" placeholder="ICD 2" />
+						</td>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd2Description" value="{{ $careMonth->rm_reason_icd2description }}">
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd3" data-target="input[name=rmReasonIcd3Description]" value="{{ $careMonth->rm_reason_icd3 }}" placeholder="ICD 3" />
+						</td>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd3Description" value="{{ $careMonth->rm_reason_icd3description }}">
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd4" data-target="input[name=rmReasonIcd4Description]" value="{{ $careMonth->rm_reason_icd4 }}" />
+						</td>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd4Description" value="{{ $careMonth->rm_reason_icd4description }}">
+						</td>
+					</tr>
+				</tbody>
+			</table>
 		</div>
 
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 3</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd3" data-target="input[name=rmReasonIcd3Description]" value="{{ $careMonth->rm_reason_icd3 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 3 Description</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd3Description" value="{{ $careMonth->rm_reason_icd3description }}">
-			</div>
-		</div>
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 4</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd4" data-target="input[name=rmReasonIcd4Description]" value="{{ $careMonth->rm_reason_icd4 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 4 Description</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd4Description" value="{{ $careMonth->rm_reason_icd4description }}">
-			</div>
-		</div>
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Memo</label>
-				<input type="text" class="form-control form-control-sm" name="rmReasonMemo" value="{{ $careMonth->rm_reason_memo }}">
-			</div>
+		<div class="mb-3">
+			<label class="font-weight-bold">RM Reason Memo</label>
+			<input type="text" class="form-control form-control-sm" name="rmReasonMemo" value="{{ $careMonth->rm_reason_memo }}">
 		</div>
 		<div>
 			<button submit class="btn btn-sm btn-primary mr-1">Submit</button>

+ 13 - 13
resources/views/app/patient/care-month/rm-reasons.blade.php

@@ -8,42 +8,42 @@
             <tr>
                 <td class="text-nowrap">RM Reason Icd 1</td>
                 <td>
-                    <div class="d-flex flex-column">
-                        <span class="font-weight-bold">{{ $careMonth->rm_reason_icd1 }}</span>
-                        <small class="text-muted">{{ $careMonth->rm_reason_icd1description }}</small>
+                    <div class="d-flex">
+                        <span class="font-weight-bold text-sm mr-2" style="min-width:60px;">{{ $careMonth->rm_reason_icd1 ? $careMonth->rm_reason_icd1 . ':' : '' }}</span>
+                        <small class="text-muted text-sm">{{ $careMonth->rm_reason_icd1description }}</small>
                     </div>
                 </td>
             </tr>
             <tr>
                 <td class="text-nowrap">RM Reason Icd 2</td>
                 <td>
-                    <div class="d-flex flex-column">
-                        <span class="font-weight-bold">{{ $careMonth->rm_reason_icd2 }}</span>
-                        <small class="text-muted">{{ $careMonth->rm_reason_icd2description }}</small>
+                    <div class="d-flex">
+                        <span class="font-weight-bold text-sm mr-2" style="min-width:60px;">{{ $careMonth->rm_reason_icd2 ? $careMonth->rm_reason_icd2 . ':' :'' }}</span>
+                        <small class="text-muted text-sm">{{ $careMonth->rm_reason_icd2description }}</small>
                     </div>
                 </td>
             </tr>
             <tr>
                 <td class="text-nowrap">RM Reason Icd 3</td>
                 <td>
-                    <div class="d-flex flex-column">
-                        <span class="font-weight-bold">{{ $careMonth->rm_reason_icd3 }}</span>
-                        <small class="text-muted">{{ $careMonth->rm_reason_icd3description }}</small>
+                    <div class="d-flex">
+                        <span class="font-weight-bold text-sm mr-2" style="min-width:60px;">{{ $careMonth->rm_reason_icd3 ? $careMonth->rm_reason_icd3 . ':' : '' }}</span>
+                        <small class="text-muted text-sm">{{ $careMonth->rm_reason_icd3description }}</small>
                     </div>
                 </td>
             </tr>
             <tr>
                 <td class="text-nowrap">RM Reason Icd 4</td>
                 <td>
-                    <div class="d-flex flex-column">
-                        <span class="font-weight-bold">{{ $careMonth->rm_reason_icd4 }}</span>
-                        <small class="text-muted">{{ $careMonth->rm_reason_icd4description }}</small>
+                    <div class="d-flex">
+                        <span class="font-weight-bold text-sm mr-2" style="min-width:60px;">{{ $careMonth->rm_reason_icd4 ? $careMonth->rm_reason_icd4 . ':' : '' }}</span>
+                        <small class="text-muted text-sm">{{ $careMonth->rm_reason_icd4description }}</small>
                     </div>
                 </td>
             </tr>
             <tr>
                 <td class="text-nowrap">RM Reason Memo</td>
-                <td>{{ $careMonth->rm_reason_memo }}</td>
+                <td class="text-muted text-sm">{{ $careMonth->rm_reason_memo }}</td>
             </tr>
         </tbody>
     </table>

+ 2 - 2
resources/views/app/patient/intake-data/patient-intake-data-form.blade.php

@@ -10,9 +10,9 @@
 <div id="patient-intake-data-form" visit-moe moe relative wide class="ml-2 hide-inside-popup">
 	<a start show>
 		@if($patientIntakeData)
-			<i class="fas fa-eye"></i>
+			<i class="fas fa-eye on-hover-opaque"></i>
 		@else
-			<i class="fa fa-edit"></i>
+			<i class="fa fa-edit on-hover-opaque"></i>
 		@endif
 		</a>
 	<form id="patientIntakeDataForm" url="/api/client/updateCanvasData" class="mcp-theme-1" right>

+ 13 - 0
resources/views/app/patient/medications-center.blade.php

@@ -452,6 +452,19 @@ if(!@$summaryView) {
                 return false;
             });
 
+        parentSegment.find('.multi-favorite-item')
+            .off('click.add-from-multi-favorite')
+            .on('click.add-from-multi-favorite', function () {
+                let row = $(this).closest('tr');
+                row.find('input[key="name"]').val($(this).attr('data-name')).focus();
+                row.find('input[key="medId"]').val($(this).attr('data-medId'));
+                row.find('input[key="routedMedId"]').val($(this).attr('data-routedMedId'));
+                row.find('input[key="routedDosageFormMedId"]').val($(this).attr('data-routedDosageFormMedId'));
+                row.find('input[key="gcnSeqno"]').val($(this).attr('data-gcnSeqno'));
+                $(this).closest('.on-click-menu').find('[menu]').hide();
+                return false;
+            });
+
         let mode = 'read';
 
         button

+ 1 - 3
resources/views/app/patient/medications-reconcile.blade.php

@@ -207,9 +207,7 @@ $medications = $points;
                         success: function(_data) {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="intake_medications"]').find('.refresh-segment').trigger('click');
-                                $('.visit-segment[data-segment-template-name="plan_medications"]').find('.refresh-segment').trigger('click');
-                                $('.visit-segment[data-segment-template-name="omega_medications"]').find('.refresh-segment').trigger('click');
+                                refreshAffectedSegmentsByType('medication');
                             }
                         }
                     }).then(() => {

+ 1 - 1
resources/views/app/patient/modules/lifestyle_general/edit.blade.php

@@ -442,7 +442,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/modules/lifestyle_nutrition/edit.blade.php

@@ -1298,7 +1298,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/modules/lifestyle_physical_activity/edit.blade.php

@@ -410,7 +410,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/modules/lifestyle_sleep/edit.blade.php

@@ -806,7 +806,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/modules/lifestyle_social/edit.blade.php

@@ -290,7 +290,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/modules/lifestyle_stress/edit.blade.php

@@ -695,7 +695,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/modules/lifestyle_substances/edit.blade.php

@@ -964,7 +964,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
                             }
                         });
                         return false;

+ 2 - 1
resources/views/app/patient/modules/weight_loss_intake/edit.blade.php

@@ -908,7 +908,8 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
                         }, _data => {
                             if(!hasResponseError(_data)) {
                                 closeStagPopup();
-                                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
+                                refreshSegment('omega_subjective_system');
+								refreshSegment('omega_plan_system');
                             }
                         });
                         return false;

+ 1 - 1
resources/views/app/patient/note/_OLD_segment.blade.php

@@ -68,7 +68,7 @@
             <a class="ml-3 font-weight-normal refresh-segment c-pointer {{$iName === 'medrisk_vigilence' ? 'on-hover-only' : ''}}"
                data-segment-uid="{{$segment->uid}}"
                title="Update with latest patient data">
-                <i class="fa fa-sync"></i>
+                <i class="fa fa-sync on-hover-opaque"></i>
             </a>
 
             <!-- if intake - link to plan segment-->

+ 28 - 28
resources/views/app/patient/note/dashboard.blade.php

@@ -149,20 +149,20 @@ use App\Models\Handout;
             <div class="pr-2">
                 {{$note->title}}
                 @if(!$note->is_signed_by_hcp || $pro->pro_type === 'ADMIN')
-                <div moe class="ml-1">
-                    <a href="" show start><i class="fa fa-edit"></i></a>
-                    <form url="/api/note/putTitle">
-                        <input type="hidden" name="uid" value="{{$note->uid}}">
-                        <div class="mb-2">
-                            <input type="text" name="title" value="{{$note->title}}" class="form-control form-control-sm"
-                                   placeholder="Title">
-                        </div>
-                        <div class="form-group 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 moe class="ml-1">
+                        <a href="" show start><i class="fa fa-edit"></i></a>
+                        <form url="/api/note/putTitle">
+                            <input type="hidden" name="uid" value="{{$note->uid}}">
+                            <div class="mb-2">
+                                <input type="text" name="title" value="{{$note->title}}" class="form-control form-control-sm"
+                                       placeholder="Title">
+                            </div>
+                            <div class="form-group 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>
                     @if($note->visitTemplate && $note->visitTemplate->internal_name == 'omega_soap_visit' &&  $note->new_or_fu_or_na !== 'NEW')
                         <div moe relative class="d-inline border-left pl-2 ml-2">
                             <a start show>Clone</a>
@@ -809,6 +809,14 @@ use App\Models\Handout;
                     @include('app.patient.handouts-list', compact('patient', 'clientHandouts', 'handouts', 'note'))
                 </div>
 
+                @if($pro->pro_type === 'ADMIN' && $note->hcpPro)
+                <div class="p-3 border-bottom mt-2 screen-only">
+                    <div class="">
+                        @include('app/patient/partials/company-pro-documents')
+                    </div>
+                </div>
+                @endif
+
                 <div class="p-3 border-bottom screen-only" data-non-segment-section="Prescriptions">
                     @include('app.patient.prescriptions.list', compact('patient', 'note'))
                 </div>
@@ -1070,16 +1078,16 @@ use App\Models\Handout;
                     </script>
                 </div>
 
-                <div class="p-3 border-bottom" data-non-segment-section="ICDs">
-                    <div class="">
-                        <div class="d-flex align-items-center mb-2">
+                <div class="p-2 border-bottom" data-non-segment-section="ICDs">
+                    <div class="d-flex alignt-items-start">
+                        <div class="d-flex {{ count($note->reasons) > 2 ? '':'align-items-center' }} mr-2">
                             <p class="font-weight-bold text-secondary m-0 mr-2">ICDs</p>
                             @include('app/patient/note/_create-note-reason')
                         </div>
                         <div class="d-flex align-items-start flex-wrap">
                         @if(count($note->reasons))
                              @foreach ($note->reasons as $reason)
-                                <span class="badge badge-info p-2 mb-2 mr-2">
+                                <span class="badge badge-info p-2 mb-1 mr-2">
                                     {{ $reason->description}} ({{ $reason->code }})
                                 </span>
                             @endforeach
@@ -2454,14 +2462,6 @@ use App\Models\Handout;
                     @include('app/patient/note/_cancel-signed-note')
                 </div>
 
-                @if($pro->pro_type === 'ADMIN' && $note->hcpPro)
-                <div class="screen-only">
-                    <div class="border-top p3">
-                        @include('app/patient/partials/company-pro-documents')
-                    </div>
-                </div>
-                @endif
-
                 </div>
 
                 @if($isVisitTemplateBased && !$note->is_signed_by_hcp)
@@ -2679,7 +2679,7 @@ use App\Models\Handout;
                 // update disclaimers on fastReload()
                 // NOTE: this is NOT the ideal place to put this
                 @if(!$note->is_signed_by_hcp)
-                $('.visit-segment[data-segment-template-name="disclaimers"]').find('.refresh-segment').trigger('click');
+                refreshSegment('disclaimers');
                 @endif
             }
             function fixTreeTopAndHeight() {
@@ -2743,7 +2743,7 @@ use App\Models\Handout;
                     initStagScrollbar({{$note->is_signed_by_hcp ? 1 : 34}});
                     @endif
                     addMCHook('onNoteMethodUpdate', function() {
-                        $('.visit-segment[data-segment-template-name="disclaimers"]').find('.refresh-segment').trigger('click');
+                        refreshSegment('disclaimers');
                         fastReload();
                     });
                     $(document)

+ 348 - 313
resources/views/app/patient/note/rm-setup.blade.php

@@ -1,166 +1,188 @@
 <div class="row" id="rm-setup">
     <div class="col-6">
         @if($pro->pro_type === 'ADMIN')
-            <div class="d-flex align-items-baseline mb-3">
-                <span class="min-width-140px">Is Eligible for RM?</span>
-                <div class="">
-                    <div class="d-inline-flex align-items-start">
-                        <b>{{ ucwords($patient->is_eligible_for_rm ? $patient->is_eligible_for_rm : '-') }}</b>
-                        <div moe class="ml-2">
-                            <a start show><i class="fa fa-edit"></i></a>
-                            <form url="/api/client/updateRmEligibility" class="mcp-theme-1">
-                                <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                <div class="mb-2">
-                                    <label class="text-sm mb-1 text-secondary">Is Eligible?</label>
-                                    <select name="isEligibleForRm"
-                                            class="form-control form-control-sm"
-                                            onchange="toggleDisabledAsNeeded(this, 'NO', 'not-eligible-for-rm')">
-                                        <option value="">-- Select Status --</option>
-                                        <option value="YES" {{ $patient->is_eligible_for_rm === 'YES' ? 'selected' : '' }}>YES</option>
-                                        <option value="NO" {{ $patient->is_eligible_for_rm === 'NO' ? 'selected' : '' }}>NO</option>
-                                        <option value="UNKNOWN" {{ $patient->is_eligible_for_rm === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
-                                    </select>
-                                </div>
-                                <div class="mb-2">
-                                    <label class="text-sm mb-1 text-secondary">Why not eligible category</label>
-                                    <input type="text" class="not-eligible-for-rm form-control form-control-sm"
-                                           {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
-                                           name="whyNotEligibleForRmCategory" value="{{$patient->why_not_eligible_for_rm_category}}">
-                                </div>
-                                <div class="mb-2">
-                                    <label class="text-sm mb-1 text-secondary">Why not eligible memo</label>
-                                    <input type="text" class="not-eligible-for-rm form-control form-control-sm"
-                                           {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
-                                           name="whyNotEligibleForRmMemo" value="{{$patient->why_not_eligible_for_rm_memo}}">
-                                </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>
+                <table class="table table-sm table-striped table-bordered mb-1">
+                    <tr>
+                        <td>Is Eligible for RM?</td>
+                        <td>
+                            <div class="">
+                                <div class="d-inline-flex align-items-start">
+                                    <b>{{ ucwords($patient->is_eligible_for_rm ? $patient->is_eligible_for_rm : '-') }}</b>
+                                    <div moe class="ml-2">
+                                        <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
+                                        <form url="/api/client/updateRmEligibility" class="mcp-theme-1">
+                                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                            <div class="mb-2">
+                                                <label class="text-sm mb-1 text-secondary">Is Eligible?</label>
+                                                <select name="isEligibleForRm"
+                                                        class="form-control form-control-sm"
+                                                        onchange="toggleDisabledAsNeeded(this, 'NO', 'not-eligible-for-rm')">
+                                                    <option value="">-- Select Status --</option>
+                                                    <option value="YES" {{ $patient->is_eligible_for_rm === 'YES' ? 'selected' : '' }}>YES</option>
+                                                    <option value="NO" {{ $patient->is_eligible_for_rm === 'NO' ? 'selected' : '' }}>NO</option>
+                                                    <option value="UNKNOWN" {{ $patient->is_eligible_for_rm === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
+                                                </select>
+                                            </div>
+                                            <div class="mb-2">
+                                                <label class="text-sm mb-1 text-secondary">Why not eligible category</label>
+                                                <input type="text" class="not-eligible-for-rm form-control form-control-sm"
+                                                    {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
+                                                    name="whyNotEligibleForRmCategory" value="{{$patient->why_not_eligible_for_rm_category}}">
+                                            </div>
+                                            <div class="mb-2">
+                                                <label class="text-sm mb-1 text-secondary">Why not eligible memo</label>
+                                                <input type="text" class="not-eligible-for-rm form-control form-control-sm"
+                                                    {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
+                                                    name="whyNotEligibleForRmMemo" value="{{$patient->why_not_eligible_for_rm_memo}}">
+                                            </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>
+                                    </div>
                                 </div>
-                            </form>
-                        </div>
-                    </div>
-                    @if($patient->is_eligible_for_rm === 'NO')
-                        <div class="mt-1">
-                            <span>{{$patient->why_not_eligible_for_rm_category ?: '-'}}</span>
-                            /
-                            <span class="text-secondary">{{$patient->why_not_eligible_for_rm_memo ?: '-'}}</span>
-                        </div>
-                    @endif
-                </div>
-            </div>
-        @endif
-
-        <?php $currentCareMonth = $patient->currentCareMonth(); ?>
-        @if($currentCareMonth && $pro->id === $currentCareMonth->mcp_pro_id)
-            <div class="d-flex align-items-baseline mb-3">
-                <?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
-                <span class="min-width-140px">Comm. this month:</span>
-                <b class="{{$spoken ? 'text-success' : ''}}">
-                    {{$spoken ? 'Yes' : 'No'}}
-                    @if(!$spoken)
-                        <i class="fa fa-exclamation-triangle"></i>
-                    @else
-                        <i class="fa fa-check"></i>
+                                @if($patient->is_eligible_for_rm === 'NO')
+                                    <div class="mt-1">
+                                        <span>{{$patient->why_not_eligible_for_rm_category ?: '-'}}</span>
+                                        /
+                                        <span class="text-secondary">{{$patient->why_not_eligible_for_rm_memo ?: '-'}}</span>
+                                    </div>
+                                @endif
+                            </div>
+                        </td>
+                    </tr>
+                    <?php $currentCareMonth = $patient->currentCareMonth(); ?>
+                    @if($currentCareMonth && $pro->id === $currentCareMonth->mcp_pro_id)
+                    <?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
+                        <tr>
+                            <td>
+                            Comm. this month:
+                            </td>
+                            <td>
+                                <b class="{{$spoken ? 'text-success' : ''}}">
+                                    {{$spoken ? 'Yes' : 'No'}}
+                                    @if(!$spoken)
+                                        <i class="fa fa-exclamation-triangle"></i>
+                                    @else
+                                        <i class="fa fa-check"></i>
+                                    @endif
+                                </b>
+                                @if($currentCareMonth->mcp && $pro->id === $currentCareMonth->mcp->id)
+                                    <div moe relative class="ml-2">
+                                        <a href="#" start show class="">Toggle</a>
+                                        <form url="/api/careMonth/setHasAnyoneInteractedWithClientAboutRmOutsideNoteTo{{$spoken ? 'False' : 'True'}}" right>
+                                            <input type="hidden" name="uid" value="{{$currentCareMonth->uid}}">
+                                            <p>Set to {{$spoken ? 'No' : 'Yes'}}?</p>
+                                            <div class="d-flex align-items-center">
+                                                <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                                                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </div>
+                                @endif
+                            </td>
+                        </tr>
                     @endif
-                </b>
-                @if($currentCareMonth->mcp && $pro->id === $currentCareMonth->mcp->id)
-                    <div moe relative class="ml-2">
-                        <a href="#" start show class="">Toggle</a>
-                        <form url="/api/careMonth/setHasAnyoneInteractedWithClientAboutRmOutsideNoteTo{{$spoken ? 'False' : 'True'}}" right>
-                            <input type="hidden" name="uid" value="{{$currentCareMonth->uid}}">
-                            <p>Set to {{$spoken ? 'No' : 'Yes'}}?</p>
-                            <div class="d-flex align-items-center">
-                                <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
-                                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                    <tr>
+                        <td>Enrollment:</td>
+                        <td>
+                            <div class="">
+                                <div class="d-inline-flex align-items-start">
+                                    <b>{{ ucwords($patient->is_enrolled_in_rm ? $patient->is_enrolled_in_rm : '-') }}</b>
+                                    @if($patient->is_enrolled_in_rm === 'YES')
+                                        <div moe class="ml-2">
+                                            <a start show>Toggle</a>
+                                            <form url="/api/client/setIsEnrolledInRmToFalse" class="mcp-theme-1">
+                                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                                <p>Un-enroll from RPM?</p>
+                                                <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>
+                                        </div>
+                                    @else
+                                        <a native target="_blank"
+                                        class="screen-only ml-2"
+                                        open-in-stag-popup
+                                        popup-style="medium overflow-visible"
+                                        mc-initer="rpm-agreement-{{$note->id}}"
+                                        title="Leadership Health Remote Patient Monitoring Consent Form"
+                                        href="/note/rpm-agreement/{{$note->uid}}?popupmode=1">
+                                            Mark as enrolled
+                                        </a>
+                                    @endif
+                                </div>
                             </div>
-                        </form>
-                    </div>
-                @endif
-            </div>
+                        </td>
+                    </tr>
+                </table>
+            </div> 
         @endif
+        
 
         <div class="d-flex align-items-baseline mb-3">
-            <span class="min-width-140px">Enrollment:</span>
-            <div class="">
-                <div class="d-inline-flex align-items-start">
-                    <b>{{ ucwords($patient->is_enrolled_in_rm ? $patient->is_enrolled_in_rm : '-') }}</b>
-                    @if($patient->is_enrolled_in_rm === 'YES')
-                        <div moe class="ml-2">
-                            <a start show>Toggle</a>
-                            <form url="/api/client/setIsEnrolledInRmToFalse" class="mcp-theme-1">
-                                <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                <p>Un-enroll from RPM?</p>
-                                <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 class="flex-grow-1">
+                <div>
+                    <div class="d-flex align-items-center mb-1">
+                        <span class="mr-2">RM Reasons:</span>
+                        @include('app.patient.partials.put-rm-reasons')
+                    </div>
+                    <div class="">
+                        @include('app.patient.partials.rm-reasons-display')
+                    </div>
+                </div>
+                {{--<div>
+                    @if(!$patient->rmReasons || !count($patient->rmReasons))
+                        <span class="text-secondary">None</span>
+                    @else
+                        <div>
+                            @foreach($patient->rmReasons as $reason)
+                                <div class="border-bottom pb-1 mb-1 d-flex align-items-start">
+                                    <b class="min-width-70px">{{$reason->code}}</b>
+                                    <span class="max-width-200px mr-3">{{$reason->description}}</span>
+                                    <div moe relative class="ml-auto">
+                                        <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
+                                        <form url="/api/clientCmRmReason/updateBasic" class="mcp-theme-1" right target='[data-non-segment-section="RM Setup"]'>
+                                            <input type="hidden" name="uid" value="{{$reason->uid}}">
+                                            <div class="mb-2">
+                                                <label class="text-sm mb-1 text-secondary">Code *</label>
+                                                <input type="text" class="form-control form-control-sm"
+                                                    icd-autocomplete-code
+                                                    name="code" value="{{$reason->code}}" required>
+                                            </div>
+                                            <div class="mb-2">
+                                                <label class="text-sm mb-1 text-secondary">Description</label>
+                                                <input type="text" class="form-control form-control-sm"
+                                                    icd-autocomplete-description
+                                                    name="description" value="{{$reason->description}}">
+                                            </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>
+                                    </div>
+                                    <div moe relative class="ml-2">
+                                        <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
+                                        <form url="/api/clientCmRmReason/remove" class="mcp-theme-1" right target='[data-non-segment-section="RM Setup"]'>
+                                            <input type="hidden" name="uid" value="{{$reason->uid}}">
+                                            <p>Remove this RM reason?</p>
+                                            <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>
+                                    </div>
                                 </div>
-                            </form>
+                            @endforeach
                         </div>
-                    @else
-                        <a native target="_blank"
-                           class="screen-only ml-2"
-                           open-in-stag-popup
-                           popup-style="medium overflow-visible"
-                           mc-initer="rpm-agreement-{{$note->id}}"
-                           title="Leadership Health Remote Patient Monitoring Consent Form"
-                           href="/note/rpm-agreement/{{$note->uid}}?popupmode=1">
-                            Mark as enrolled
-                        </a>
                     @endif
-                </div>
-            </div>
-        </div>
+                </div>--}}
 
-        <div class="d-flex align-items-baseline mb-3">
-            <span class="min-width-140px">Reasons:</span>
-            <div class="flex-grow-1">
-                @if(!$patient->rmReasons || !count($patient->rmReasons))
-                    <span class="text-secondary">None</span>
-                @else
-                    <div>
-                        @foreach($patient->rmReasons as $reason)
-                            <div class="border-bottom pb-1 mb-1 d-flex align-items-start">
-                                <b class="min-width-70px">{{$reason->code}}</b>
-                                <span class="max-width-200px mr-3">{{$reason->description}}</span>
-                                <div moe relative class="ml-auto">
-                                    <a start show><i class="fa fa-edit"></i></a>
-                                    <form url="/api/clientCmRmReason/updateBasic" class="mcp-theme-1" right target='[data-non-segment-section="RM Setup"]'>
-                                        <input type="hidden" name="uid" value="{{$reason->uid}}">
-                                        <div class="mb-2">
-                                            <label class="text-sm mb-1 text-secondary">Code *</label>
-                                            <input type="text" class="form-control form-control-sm"
-                                                   icd-autocomplete-code
-                                                   name="code" value="{{$reason->code}}" required>
-                                        </div>
-                                        <div class="mb-2">
-                                            <label class="text-sm mb-1 text-secondary">Description</label>
-                                            <input type="text" class="form-control form-control-sm"
-                                                   icd-autocomplete-description
-                                                   name="description" value="{{$reason->description}}">
-                                        </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>
-                                </div>
-                                <div moe relative class="ml-2">
-                                    <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
-                                    <form url="/api/clientCmRmReason/remove" class="mcp-theme-1" right target='[data-non-segment-section="RM Setup"]'>
-                                        <input type="hidden" name="uid" value="{{$reason->uid}}">
-                                        <p>Remove this RM reason?</p>
-                                        <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>
-                                </div>
-                            </div>
-                        @endforeach
-                    </div>
-                @endif
-                <div class="d-flex align-items-baseline">
+                {{--<div class="d-flex align-items-baseline">
                     <div moe>
                         <a start show>+ Add From Dx</a>
                         <form url="/api/clientCmRmReason/create" class="mcp-theme-1" target='[data-non-segment-section="RM Setup"]'>
@@ -210,180 +232,193 @@
                             </div>
                         </form>
                     </div>
-                </div>
+                </div>--}}
             </div>
         </div>
-
-        <div class="mb-3 d-flex align-items-baseline">
-            <span class="min-width-140px">Care Plan:</span>
-            <div class="width-300px d-inline-flex align-items-center">
-                @if($patient->has_cm_setup_been_performed)
-                    <div class="text-nowrap text-success">
-                        @if($patient->cm_setup_note_id === $note->id)
-                            <i class="fa fa-check"></i>
-                            <b>Created on this note</b>
-                        @elseif($patient->cmSetupNote)
-                            <i class="fa fa-check"></i>
-                            <b>Created on</b>
-                            <div class="d-inline position-relative on-click-menu">
-                                <span class="text-primary c-pointer">{{friendly_date($patient->cmSetupNote->effective_dateest)}}</span>
-                                <div menu right class="bg-white border">
-                                    <a native target="_blank"
-                                       href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $patient->cmSetupNote]) ?>"
-                                       class="px-2 py-1 d-block text-nowrap text-sm">Go to note</a>
-                                </div>
-                            </div>
-                        @else
-                            <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
-                            <b class="text-warning-mellow">Performed, but CM setup note missing!</b> <!-- will never reach this point -->
-                        @endif
-                    </div>
-                    @if($patient->mcp_pro_id === $pro->id || $pro->pro_type === 'ADMIN')
-                        <div moe class="ml-3">
-                            <a href="" show start>Undo</a>
-                            <form url="/api/note/undoMarkCmSetupPerformed" >
-                                <input type="hidden" name="uid" value="{{$note->uid}}">
-                                <p>Mark Comprehensive Care Plan as not created?</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 class="mb-3">
+            <table class="table-sm table-striped table-bordered w-100 v-top">
+                <tr>
+                    <td>Care Plan:</td>
+                    <td>
+                        <div class="d-inline-flex align-items-center">
+                            @if($patient->has_cm_setup_been_performed)
+                                <div class="text-nowrap text-success">
+                                    @if($patient->cm_setup_note_id === $note->id)
+                                        <i class="fa fa-check"></i>
+                                        <b>Created on this note</b>
+                                    @elseif($patient->cmSetupNote)
+                                        <i class="fa fa-check"></i>
+                                        <b>Created on</b>
+                                        <div class="d-inline position-relative on-click-menu">
+                                            <span class="text-primary c-pointer">{{friendly_date($patient->cmSetupNote->effective_dateest)}}</span>
+                                            <div menu right class="bg-white border">
+                                                <a native target="_blank"
+                                                href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $patient->cmSetupNote]) ?>"
+                                                class="px-2 py-1 d-block text-nowrap text-sm">Go to note</a>
+                                            </div>
+                                        </div>
+                                    @else
+                                        <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
+                                        <b class="text-warning-mellow">Performed, but CM setup note missing!</b> <!-- will never reach this point -->
+                                    @endif
                                 </div>
-                            </form>
+                                @if($patient->mcp_pro_id === $pro->id || $pro->pro_type === 'ADMIN')
+                                    <div moe class="ml-3">
+                                        <a href="" show start>Undo</a>
+                                        <form url="/api/note/undoMarkCmSetupPerformed" >
+                                            <input type="hidden" name="uid" value="{{$note->uid}}">
+                                            <p>Mark Comprehensive Care Plan as not created?</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>
+                                @endif
+                            @else
+                                <span class="text-nowrap text-warning-mellow">
+                                    <i class="fa fa-times"></i>
+                                    <b>Not Created</b>
+                                </span>
+                                @if($patient->mcp_pro_id === $pro->id || $pro->pro_type === 'ADMIN')
+                                    <div moe class="ml-3">
+                                        <a href="#" show start>Mark as created</a>
+                                        <form url="/api/note/markCmSetupPerformed" >
+                                            <input type="hidden" name="uid" value="{{$note->uid}}">
+                                            <p>Mark Comprehensive Care Plan as created?</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>
+                                @endif
+                            @endif
                         </div>
-                    @endif
-                @else
-                    <span class="text-nowrap text-warning-mellow">
-                        <i class="fa fa-times"></i>
-                        <b>Not Created</b>
-                    </span>
-                    @if($patient->mcp_pro_id === $pro->id || $pro->pro_type === 'ADMIN')
-                        <div moe class="ml-3">
-                            <a href="#" show start>Mark as created</a>
-                            <form url="/api/note/markCmSetupPerformed" >
-                                <input type="hidden" name="uid" value="{{$note->uid}}">
-                                <p>Mark Comprehensive Care Plan as created?</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($pro->pro_type === 'ADMIN' && $note->was_cm_setup_performed)
+                            <div class="d-flex align-items-baseline">
+                                <div class="d-inline-flex align-items-center flex-grow-1">
+                                    <span class="pr-2">Manager Signature:</span>
+                                    @if($note->cm_setup_manager_signature_status !== 'SIGNED')
+                                        <div moe class="">
+                                            <a start show>Sign</a>
+                                            <form url="/api/note/updateCmSetupManagerSignatureStatus" class="mcp-theme-1">
+                                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                                <input type="hidden" name="managerSignatureStatus" value="SIGNED">
+                                                <p>Sign Off Care Plan Creation as Manager?</p>
+                                                <div>
+                                                    <button submit class="btn btn-sm btn-success mr-1">Sign</button>
+                                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                                </div>
+                                            </form>
+                                        </div>
+                                    @else
+                                        <b>SIGNED</b>
+                                        <div moe class="ml-3">
+                                            <a start show>Undo</a>
+                                            <form url="/api/note/updateCmSetupManagerSignatureStatus" class="mcp-theme-1">
+                                                <input type="hidden" name="uid" value="{{$note->uid}}">
+                                                <input type="hidden" name="managerSignatureStatus" value="">
+                                                <p>Undo sign as manager for Care Plan Creation?</p>
+                                                <div>
+                                                    <button submit class="btn btn-sm btn-primary mr-1">Undo</button>
+                                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                                </div>
+                                            </form>
+                                        </div>
+                                    @endif
                                 </div>
-                            </form>
-                        </div>
-                    @endif
-                @endif
-            </div>
+                            </div>
+                        @endif
+                    </td>
+                </tr>
+            </table>
         </div>
 
-        @if($pro->pro_type === 'ADMIN' && $note->was_cm_setup_performed)
-            <div class="d-flex align-items-baseline mb-3">
-                <span class="min-width-140px"></span>
-                <div class="d-inline-flex align-items-center flex-grow-1">
-                    <span class="pr-2">Manager Signature:</span>
-                    @if($note->cm_setup_manager_signature_status !== 'SIGNED')
-                        <div moe class="">
-                            <a start show>Sign</a>
-                            <form url="/api/note/updateCmSetupManagerSignatureStatus" class="mcp-theme-1">
-                                <input type="hidden" name="uid" value="{{$note->uid}}">
-                                <input type="hidden" name="managerSignatureStatus" value="SIGNED">
-                                <p>Sign Off Care Plan Creation as Manager?</p>
-                                <div>
-                                    <button submit class="btn btn-sm btn-success mr-1">Sign</button>
-                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                </div>
-                            </form>
-                        </div>
-                    @else
-                        <b>SIGNED</b>
-                        <div moe class="ml-3">
-                            <a start show>Undo</a>
-                            <form url="/api/note/updateCmSetupManagerSignatureStatus" class="mcp-theme-1">
-                                <input type="hidden" name="uid" value="{{$note->uid}}">
-                                <input type="hidden" name="managerSignatureStatus" value="">
-                                <p>Undo sign as manager for Care Plan Creation?</p>
-                                <div>
-                                    <button submit class="btn btn-sm btn-primary mr-1">Undo</button>
-                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                </div>
-                            </form>
-                        </div>
-                    @endif
-                </div>
-            </div>
-        @endif
+
 
         @if($pro->pro_type === 'ADMIN')
-            <div class="d-flex align-items-baseline mb-3">
-                <span class="min-width-140px">RME Pro:</span>
-                <div class="">
-                    <div class="d-inline-flex align-items-start">
-                        <b>{{ $patient->rme ? $patient->rme->displayName() : '-' }}</b>
-                        <div moe class="ml-2">
-                            <a start show><i class="fa fa-edit"></i></a>
-                            <form url="/api/client/putRmePro" class="mcp-theme-1">
-                                <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                <div class="mb-2">
-                                    <label class="text-secondary text-sm">RME Pro</label>
-                                    <select provider-search data-pro-uid="{{ @$patient->rme->uid }}" name="rmeProUid" class="form-control form-control-sm">
-                                        <option value=""> --select--</option>
-                                    </select>
-                                </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>
-                        </div>
-                        @if($patient->rme)
-                            <div moe class="ml-2">
-                                <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
-                                <form url="/api/client/removeRmePro" class="mcp-theme-1">
-                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                    <p>Remove RME Pro?</p>
-                                    <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>
+                <table class="table table-sm table-bordered table-striped">
+                    <tr>
+                        <td>RME Pro:</td>
+                        <td>
+                            <div class="">
+                                <div class="d-inline-flex align-items-start">
+                                    <b>{{ $patient->rme ? $patient->rme->displayName() : '-' }}</b>
+                                    <div moe class="ml-2">
+                                        <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
+                                        <form url="/api/client/putRmePro" class="mcp-theme-1">
+                                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                            <div class="mb-2">
+                                                <label class="text-secondary text-sm">RME Pro</label>
+                                                <select provider-search data-pro-uid="{{ @$patient->rme->uid }}" name="rmeProUid" class="form-control form-control-sm">
+                                                    <option value=""> --select--</option>
+                                                </select>
+                                            </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>
                                     </div>
-                                </form>
-                            </div>
-                        @endif
-                    </div>
-                </div>
-            </div>
-            <div class="d-flex align-items-baseline mb-3">
-                <span class="min-width-140px">RMM Pro:</span>
-                <div class="">
-                    <div class="d-inline-flex align-items-start">
-                        <b>{{ $patient->rmm ? $patient->rmm->displayName() : '-' }}</b>
-                        <div moe class="ml-2">
-                            <a start show><i class="fa fa-edit"></i></a>
-                            <form url="/api/client/putRmmPro" class="mcp-theme-1">
-                                <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                <div class="mb-2">
-                                    <label class="text-secondary text-sm">RMM Pro</label>
-                                    <select provider-search data-pro-uid="{{ @$patient->rmm->uid }}" name="rmmProUid" class="form-control form-control-sm">
-                                        <option value=""> --select--</option>
-                                    </select>
-                                </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>
+                                    @if($patient->rme)
+                                        <div moe class="ml-2">
+                                            <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
+                                            <form url="/api/client/removeRmePro" class="mcp-theme-1">
+                                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                                <p>Remove RME Pro?</p>
+                                                <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>
+                                        </div>
+                                    @endif
                                 </div>
-                            </form>
-                        </div>
-                        @if($patient->rmm)
-                            <div moe class="ml-2">
-                                <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
-                                <form url="/api/client/removeRmmPro" class="mcp-theme-1">
-                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
-                                    <p>Remove RMM Pro?</p>
-                                    <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>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>RMM Pro:</td>
+                        <td>
+                            <div class="">
+                                <div class="d-inline-flex align-items-start">
+                                    <b>{{ $patient->rmm ? $patient->rmm->displayName() : '-' }}</b>
+                                    <div moe class="ml-2">
+                                        <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
+                                        <form url="/api/client/putRmmPro" class="mcp-theme-1">
+                                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                            <div class="mb-2">
+                                                <label class="text-secondary text-sm">RMM Pro</label>
+                                                <select provider-search data-pro-uid="{{ @$patient->rmm->uid }}" name="rmmProUid" class="form-control form-control-sm">
+                                                    <option value=""> --select--</option>
+                                                </select>
+                                            </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>
                                     </div>
-                                </form>
+                                    @if($patient->rmm)
+                                        <div moe class="ml-2">
+                                            <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
+                                            <form url="/api/client/removeRmmPro" class="mcp-theme-1">
+                                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                                <p>Remove RMM Pro?</p>
+                                                <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>
+                                        </div>
+                                    @endif
+                                </div>
                             </div>
-                        @endif
-                    </div>
-                </div>
+                        </td>
+                    </tr>
+                </table>
             </div>
         @endif
     </div>
@@ -445,7 +480,7 @@
                 <div class="">
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">Arrived:</span>
-                        <span class="ml-3">Yes</span>*
+                        <span class="ml-3">Yes</span>
                     </div>
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">First Measurement:</span>
@@ -494,7 +529,7 @@
                 <div class="">
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">Arrived:</span>
-                        <span class="ml-3">Yes</span>*
+                        <span class="ml-3">Yes</span>
                     </div>
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">First Measurement:</span>

+ 1 - 1
resources/views/app/patient/note/section.blade.php

@@ -47,7 +47,7 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
         <?php if ($section->sectionTemplate->is_canvas): ?>
             <div moe class="d-none if-edit ml-2">
                 <a start show class="font-weight-normal" title="Update with latest patient data">
-                    <i class="fa fa-sync"></i>
+                    <i class="fa fa-sync on-hover-opaque"></i>
                 </a>
                 <form url="/api/section/updateFromCanvas">
                     <p>Update this section with latest patient data?</p>

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

@@ -54,7 +54,7 @@ $isOmegaHistorySegment = strpos($iName, 'omega_history_') === 0;
                 <a class="ml-3 font-weight-normal refresh-segment c-pointer {{$iName === 'medrisk_vigilence' ? 'on-hover-only' : ''}} screen-only"
                 data-segment-uid="{{$segment->uid}}"
                 title="Update with latest patient data">
-                    <i class="fa fa-sync"></i>
+                    <i class="fa fa-sync on-hover-opaque"></i>
                 </a>
 
             @endif
@@ -67,7 +67,7 @@ $isOmegaHistorySegment = strpos($iName, 'omega_history_') === 0;
                title="{{$segment->display_title}} - Change Log"
                popup-style="medium"
                href="/note-segment-view/{{$patient->uid}}/{{$note->uid}}/{{$segment->uid}}/<?= $segment->segmentTemplate->internal_name ?>/log">
-               <i class="fas fa-history"></i>
+               <i class="fas fa-history on-hover-opaque"></i>
             </a>
         @endif
 

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

@@ -60,7 +60,7 @@
             <a class="ml-3 font-weight-normal refresh-segment text-primary c-pointer {{$iName === 'medrisk_vigilence' ? 'on-hover-only' : ''}} screen-only"
                data-segment-uid="{{$segment->uid}}"
                title="Update with latest patient data">
-                <i class="fa fa-sync"></i>
+                <i class="fa fa-sync on-hover-opaque"></i>
             </a>
 
            

+ 53 - 5
resources/views/app/patient/notes.blade.php

@@ -142,11 +142,37 @@
                         <label for="" class="text-secondary text-sm mb-1">Effective Date *</label>
                         <input type="date" name="effectiveDate" class="form-control" value="{{get_current_date($pro->display_timezone)}}">
                     </div>
-                    <div class="form-group">
-                        <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
-                        <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
-                        </select>
-                    </div>
+
+                    @if($pro->pro_type === 'ADMIN')
+                        <div class="form-group mb-2 pt-2 d-flex">
+                            <label class="my-0 mr-3 d-flex align-items-center">
+                                <input type="radio" class="mr-1" name="noteType" value="regular" required>
+                                Regular Note
+                            </label>
+                            <label class="my-0 mr-3 d-flex align-items-center">
+                                <input type="radio" class="mr-1" name="noteType" value="admin" required>
+                                Admin Note
+                            </label>
+                        </div>
+
+                        <div if-admin-note class="d-none">
+                            <input type="hidden" x-name="hcpProUid" value="{{config('app.adminNoteHcpProUid')}}">
+                        </div>
+
+                        <div class="form-group d-none" if-regular-note>
+                            <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
+                            <select x-name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
+                            </select>
+                        </div>
+                    @else
+                        <div class="form-group mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
+                            <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
+                            </select>
+                        </div>
+                    @endif
+
+
                     <div class="form-group mb-2">
                         <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
                         <select name="visitTemplateUid" class="form-control form-control-sm"
@@ -406,6 +432,28 @@
                         form.find('.if-in-clinic').hide();
                     }
                 });
+
+                $('[name="noteType"]').change(function() {
+                    let form = $(this).closest('form');
+                    form.find('[if-regular-note]').addClass('d-none');
+                    form.find('[if-regular-note] [x-name]').removeAttr('name');
+                    form.find('[if-admin-note]').addClass('d-none');
+                    form.find('[if-admin-note] [x-name]').removeAttr('name');
+                    if(form.find('[name="noteType"]:checked').attr('value') === 'regular') {
+                        form.find('[if-regular-note]').removeClass('d-none');
+                        form.find('[if-regular-note] [x-name]').each(function() {
+                            $(this).attr('name', $(this).attr('x-name'));
+                        });
+                    }
+                    else if(form.find('[name="noteType"]:checked').attr('value') === 'admin') {
+                        form.find('[if-admin-note]').removeClass('d-none');
+                        form.find('[if-admin-note] [x-name]').each(function() {
+                            $(this).attr('name', $(this).attr('x-name'));
+                        });
+                    }
+                    return false;
+                });
+
             }
             addMCInitializer('notes-list', initNotesList, '#notes-list-{{$patient->id}}');
         })();

+ 47 - 47
resources/views/app/patient/partials/put-rm-reasons.blade.php

@@ -1,54 +1,54 @@
 <div moe>
-	<a start show><i class="fas fa-edit"></i></a>
+	<a start show><i class="fas fa-edit on-hover-opaque"></i></a>
 	<form url="/api/client/putRmReasons" class="mcp-theme-1">
 		<input type="hidden" name="uid" value="{{$patient->uid}}">
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 1</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code data-target="input[name=rmReasonIcd1Description]" name="rmReasonIcd1" value="{{ $patient->rm_reason_icd1 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 1 Description</label>
-				<input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd1Description" value="{{ $patient->rm_reason_icd1description }}">
-			</div>
-		</div>
-
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 2</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd2" data-target="input[name=rmReasonIcd2Description]" value="{{ $patient->rm_reason_icd2 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 2 Description</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd2Description" value="{{ $patient->rm_reason_icd2description }}">
-			</div>
-		</div>
-
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 3</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd3" data-target="input[name=rmReasonIcd3Description]" value="{{ $patient->rm_reason_icd3 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 3 Description</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd3Description" value="{{ $patient->rm_reason_icd3description }}">
-			</div>
-		</div>
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 4</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd4" data-target="input[name=rmReasonIcd4Description]" value="{{ $patient->rm_reason_icd4 }}" />
-			</div>
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Icd 4 Description</label>
-				<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd4Description" value="{{ $patient->rm_reason_icd4description }}">
-			</div>
+		<div>
+			<table class="table table-sm table-bordered">
+				<thead class="bg-light">
+					<tr>
+						<th class="border-bottom-0">ICD</th>
+						<th class="border-bottom-0">Description</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code data-target="input[name=rmReasonIcd1Description]" name="rmReasonIcd1" value="{{ $patient->rm_reason_icd1 }}" placeholder="ICD 1" />
+						</td>
+						<td>
+							<input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd1Description" value="{{ $patient->rm_reason_icd1description }}">
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd2" data-target="input[name=rmReasonIcd2Description]" value="{{ $patient->rm_reason_icd2 }}" placeholder="ICD 2" />
+						</td>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd2Description" value="{{ $patient->rm_reason_icd2description }}">
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd3" data-target="input[name=rmReasonIcd3Description]" value="{{ $patient->rm_reason_icd3 }}" placeholder="ICD 3" />
+						</td>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd3Description" value="{{ $patient->rm_reason_icd3description }}">
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-code name="rmReasonIcd4" data-target="input[name=rmReasonIcd4Description]" value="{{ $patient->rm_reason_icd4 }}" placeholder="ICD 4" />
+						</td>
+						<td>
+							<input type="text" class="form-control form-control-sm" icd-autocomplete-description name="rmReasonIcd4Description" value="{{ $patient->rm_reason_icd4description }}">
+						</td>
+					</tr>
+				</tbody>
+			</table>
 		</div>
-		<div class="bg-light p-3 mb-2">
-			<div class="mb-2">
-				<label class="text-sm mb-1 text-secondary">RM Reason Memo</label>
-				<input type="text" class="form-control form-control-sm" name="rmReasonMemo" value="{{ $patient->rm_reason_memo }}">
-			</div>
+		<div class="mb-2">
+			<label class="font-weight-bold mb-1">RM Reason Memo:</label>
+			<input type="text" class="form-control form-control-sm" name="rmReasonMemo" value="{{ $patient->rm_reason_memo }}">
 		</div>
 		<div>
 			<button submit class="btn btn-sm btn-primary mr-1">Submit</button>

+ 44 - 0
resources/views/app/patient/partials/rm-reasons-display.blade.php

@@ -0,0 +1,44 @@
+<table class="table table-sm table-striped table-bordered mb-0">
+	<tbody>
+		<tr>
+			<td class="text-nowrap">RM Reason Icd 1</td>
+			<td>
+				<div class="d-flex">
+					<span class="font-weight-bold text-sm mr-2" style="min-width: 60px;">{{ $patient->rm_reason_icd1 ? $patient->rm_reason_icd1. ':':'' }}</span>
+					<small class="text-muted text-sm">{{ $patient->rm_reason_icd1description }}</small>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td class="text-nowrap">RM Reason Icd 2</td>
+			<td>
+				<div class="d-flex">
+					<span class="font-weight-bold text-sm mr-2" style="min-width: 60px;">{{ $patient->rm_reason_icd2 ? $patient->rm_reason_icd2 . ':':'' }}</span>
+					<small class="text-muted text-sm">{{ $patient->rm_reason_icd2description }}</small>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td class="text-nowrap">RM Reason Icd 3</td>
+			<td>
+				<div class="d-flex">
+					<span class="font-weight-bold text-sm mr-2" style="min-width: 60px;">{{ $patient->rm_reason_icd3 ? $patient->rm_reason_icd3 . ':':'' }}</span>
+					<small class="text-muted text-sm">{{ $patient->rm_reason_icd3description }}</small>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td class="text-nowrap">RM Reason Icd 4</td>
+			<td>
+				<div class="d-flex">
+					<span class="font-weight-bold text-sm mr-2" style="min-width: 60px;">{{ $patient->rm_reason_icd4 ? $patient->rm_reason_icd4. ':' : '' }}</span>
+					<small class="text-muted text-sm">{{ $patient->rm_reason_icd4description }}</small>
+				</div>
+			</td>
+		</tr>
+		<tr>
+			<td class="text-nowrap">RM Reason Memo</td>
+			<td class="text-muted text-sm">{{ $patient->rm_reason_memo }}</td>
+		</tr>
+	</tbody>
+</table>

+ 4 - 47
resources/views/app/patient/partials/rm-setup.blade.php

@@ -108,51 +108,8 @@
             <span class="mr-2">RM Reasons:</span>
             @include('app.patient.partials.put-rm-reasons')
         </div>
-        <div class="pl-3" style="width: 400px;">
-            <table class="table table-sm table-striped table-bordered">
-                <tbody>
-                    <tr>
-                        <td class="text-nowrap">RM Reason Icd 1</td>
-                        <td>
-                            <div class="d-flex flex-column">
-                                <span class="font-weight-bold">{{ $patient->rm_reason_icd1 }}</span>
-                                <small class="text-muted">{{ $patient->rm_reason_icd1description }}</small>
-                            </div>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class="text-nowrap">RM Reason Icd 2</td>
-                        <td>
-                        <div class="d-flex flex-column">
-                                <span class="font-weight-bold">{{ $patient->rm_reason_icd2 }}</span>
-                                <small class="text-muted">{{ $patient->rm_reason_icd2description }}</small>
-                            </div>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class="text-nowrap">RM Reason Icd 3</td>
-                        <td>
-                        <div class="d-flex flex-column">
-                                <span class="font-weight-bold">{{ $patient->rm_reason_icd3 }}</span>
-                                <small class="text-muted">{{ $patient->rm_reason_icd3description }}</small>
-                            </div>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class="text-nowrap">RM Reason Icd 4</td>
-                        <td>
-                        <div class="d-flex flex-column">
-                                <span class="font-weight-bold">{{ $patient->rm_reason_icd4 }}</span>
-                                <small class="text-muted">{{ $patient->rm_reason_icd4description }}</small>
-                            </div>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class="text-nowrap">RM Reason Memo</td>
-                        <td>{{ $patient->rm_reason_memo }}</td>
-                    </tr>
-                </tbody>
-            </table>
+        <div class="pl-3" style="max-width: 570px;">
+            @include('app.patient.partials.rm-reasons-display')
         </div>
         {{--<div class="d-flex align-items-baseline mb-3">
             <span class="width-200px">RM Reasons:</span>
@@ -354,7 +311,7 @@
                 <div class="">
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">Arrived:</span>
-                        <span class="ml-3">Yes</span>*
+                        <span class="ml-3">Yes</span>
                     </div>
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">First Measurement:</span>
@@ -403,7 +360,7 @@
                 <div class="">
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">Arrived:</span>
-                        <span class="ml-3">Yes</span>*
+                        <span class="ml-3">Yes</span>
                     </div>
                     <div class="d-flex align-items-baseline mb-1">
                         <span class="width-200px pl-3">First Measurement:</span>

+ 0 - 4
resources/views/app/patient/prescriptions/list.blade.php

@@ -1565,10 +1565,6 @@ GROUP BY erx_category");
                                         $.post(form.attr('action'), form.serialize(), _data => {
                                             if (!hasResponseError(_data)) {
 
-                                                // refreshDynamicStagPopup();
-                                                // $('.visit-segment[data-segment-template-name="intake_medications"]').find('.refresh-segment').trigger('click');
-
-
                                                 if(!self.currentPrescription.clinical_detail_json) {
                                                     self.currentPrescription.clinical_detail_json = {};
                                                 }

+ 12 - 0
resources/views/app/patient/problems-center.blade.php

@@ -493,6 +493,18 @@ if(!@$summaryView) {
                     return false;
                 });
 
+            parentSegment.find('.multi-favorite-item')
+                .off('click.add-from-multi-favorite')
+                .on('click.add-from-multi-favorite', function () {
+                    let row = $(this).closest('tr');
+                    row.find('input[key="name"]').val($(this).attr('data-name')).focus();
+                    row.find('input[key="dxid"]').val($(this).attr('data-dxid'));
+                    row.find('input[key="icd"]').val($(this).attr('data-icd'));
+                    row.find('input[key="icd-type"]').val($(this).attr('data-icd-type'));
+                    $(this).closest('.on-click-menu').find('[menu]').hide();
+                    return false;
+                });
+
             let mode = 'read';
 
             $('.button-container').remove();

+ 1 - 1
resources/views/app/patient/problems-quick-add.blade.php

@@ -197,7 +197,7 @@ $formID = rand(100000, 999999);
                     $.post(form.attr('action'), form.serialize(), _data => {
                         if (!hasResponseError(_data)) {
                             hideMask();
-                            $('.visit-segment[data-segment-template-name="intake_problems"]').find('.refresh-segment').trigger('click');
+                            refreshAffectedSegmentsByType('problem');
                             closeStagPopup();
                         }
                     }, 'json');

+ 6 - 6
resources/views/app/patient/segment-templates/_common_actions/toggle-relevance.blade.php

@@ -16,10 +16,10 @@ if(parentPopup.length) {
             }, _data => {
                 if(!hasResponseError(_data)) {
                     refreshDynamicStagPopup();
-                    $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                    refreshSegment('omega_subjective_system');
+                    refreshSegment('omega_plan_system');
                     @if(@$segmentName)
-                    $('.visit-segment[data-segment-template-name="{{$segmentName}}"]').find('.refresh-segment').trigger('click');
+                    refreshSegment('{{$segmentName}}');
                     @endif
                 }
             }, 'json');
@@ -30,10 +30,10 @@ if(parentPopup.length) {
             }, _data => {
                 if(!hasResponseError(_data)) {
                     refreshDynamicStagPopup();
-                    $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                    refreshSegment('omega_subjective_system');
+                    refreshSegment('omega_plan_system');
                     @if(@$segmentName)
-                    $('.visit-segment[data-segment-template-name="{{$segmentName}}"]').find('.refresh-segment').trigger('click');
+                    refreshSegment('{{$segmentName}}');
                     @endif
                 }
             }, 'json');

+ 1 - 1
resources/views/app/patient/segment-templates/mc_weight_loss_intake_subjective/edit.blade.php

@@ -267,7 +267,7 @@ if ($point && $point->lastChildReview && $point->last_child_review_point_scoped_
                 additionReasonCategory: 'ON_INTAKE'
             }, _data => {
                 if(!hasResponseError(_data)) {
-                    $('.visit-segment[data-segment-template-name="mc_weight_loss_intake_subjective"]').find('.refresh-segment').trigger('click');
+                    refreshSegment('mc_weight_loss_intake_subjective')
                 }
             }, 'json');
 

+ 32 - 0
resources/views/app/patient/wizard-partials/add-multiple-pre-existing.blade.php

@@ -7,6 +7,9 @@
         <table class="table table-sm table-bordered stag-sheet allow-row-addition bg-white mb-2 point-table read" style="table-layout: fixed">
             <thead>
             <tr class="bg-light">
+                @if(in_array($label, ['allergy', 'medication', 'problem']) && @$favorites && count($favorites))
+                    <th class="border-bottom-0 text-secondary width-30px text-center"><i class="fa fa-bookmark text-info text-sm on-hover-opaque"></i></th>
+                @endif
                 <th class="border-bottom-0 text-secondary text-nowrap">{{ucwords($label)}}</th>
                 @if($label === 'problem')
                     <th class="border-bottom-0 text-secondary width-70px">ICD</th>
@@ -23,6 +26,35 @@
             </thead>
             <tbody>
             <tr>
+                @if(in_array($label, ['allergy', 'medication', 'problem']) && @$favorites && count($favorites))
+                    <td class="text-center align-middle">
+                        <div class="d-inline position-relative on-click-menu">
+                            <span class="text-primary c-pointer"><i class="fa fa-caret-down"></i></span>
+                            <div menu right class="bg-white border">
+                                @foreach($favorites as $favorite)
+                                    <a native target="_blank" href="#"
+                                       data-name="{{@($favorite->data->name)}}"
+                                       @if($label === 'allergy')
+                                       data-damConceptId="{{@($favorite->data->damConceptId)}}"
+                                       data-damConceptIdType="{{@($favorite->data->damConceptIdType)}}"
+                                       @elseif($label === 'medication')
+                                       data-medId="{{@($favorite->data->medId)}}"
+                                       data-routedMedId="{{@($favorite->data->routedMedId)}}"
+                                       data-routedDosageFormMedId="{{@($favorite->data->routedDosageFormMedId)}}"
+                                       data-gcnSeqno="{{@($favorite->data->gcnSeqno)}}"
+                                       @elseif($label === 'problem')
+                                       data-dxid="{{@($favorite->data->dxid)}}"
+                                       data-icd="{{@($favorite->data->icd)}}"
+                                       data-icd-type="{{@($favorite->data->{'icd-type'})}}"
+                                       @endif
+                                       class="px-2 py-1 d-block text-nowrap text-sm multi-favorite-item text-left">
+                                        {{$favorite->data->name}}
+                                    </a>
+                                @endforeach
+                            </div>
+                        </div>
+                    </td>
+                @endif
                 <td class="p-0">
                     <input type="text" key="{{$label === 'goal' ? 'goal' : 'name'}}" bucket="data" required
                            @if($label === 'medication')

+ 6 - 56
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -320,15 +320,7 @@ parentSegment.find('#frm-add-{{$label}}')
             if(!hasResponseError(_data)) {
                 hideMask();
                 refreshDynamicStagPopup();
-                $('.visit-segment[data-segment-template-name="intake_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                refreshAffectedSegmentsByType('{{$label}}');
                 if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
 
                 // only for canvas-migrate
@@ -451,15 +443,7 @@ parentSegment.find('.frm-edit-{{$label}}')
             if(!hasResponseError(_data)) {
                 hideMask();
                 refreshDynamicStagPopup();
-                $('.visit-segment[data-segment-template-name="intake_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                refreshAffectedSegmentsByType('{{$label}}');
                 if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
             }
         }, 'json');
@@ -474,15 +458,7 @@ parentSegment.find('.frm-upsert-review-plan-{{$label}}')
         showMask();
         $.post(form.attr('url'), form.serialize(), _data => {
             if(!hasResponseError(_data)) {
-                $('.visit-segment[data-segment-template-name="intake_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                refreshAffectedSegmentsByType('{{$label}}');
                 refreshDynamicStagPopup();
             }
         }).then(() => {
@@ -631,17 +607,7 @@ parentSegment.find('.toggle-relevance')
             }, _data => {
                 if (!hasResponseError(_data)) {
                     refreshDynamicStagPopup();
-                    $('.visit-segment[data-segment-template-name="intake_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                    // $('.visit-segment[data-segment-template-name="omega_objective_system"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_assessment_system"]').find('.refresh-segment').trigger('click');
-                    $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                    refreshAffectedSegmentsByType('{{$label}}');
                     if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
                 }
             }, 'json');
@@ -652,17 +618,7 @@ parentSegment.find('.toggle-relevance')
                 }, _data => {
                     if (!hasResponseError(_data)) {
                         refreshDynamicStagPopup();
-                        $('.visit-segment[data-segment-template-name="intake_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="omega_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="omega_plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="omega_subjective_system"]').find('.refresh-segment').trigger('click');
-                        // $('.visit-segment[data-segment-template-name="omega_objective_system"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="omega_assessment_system"]').find('.refresh-segment').trigger('click');
-                        $('.visit-segment[data-segment-template-name="omega_plan_system"]').find('.refresh-segment').trigger('click');
+                        refreshAffectedSegmentsByType('{{$label}}');
                         if(typeof refreshRHSSidebar !== 'undefined') refreshRHSSidebar();
                     }
                 }, 'json');
@@ -696,13 +652,7 @@ parentSegment.find('.tracker-input')
         }, _data => {
             if(!hasResponseError(_data)) {
                 refreshDynamicStagPopup();
-                $('.visit-segment[data-segment-template-name="intake_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="omega_plan_{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="{{$segment_part}}"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
-                $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
+                refreshAffectedSegmentsByType('{{$label}}');
             }
         }, 'json');
     });

+ 1 - 1
resources/views/app/practice-management/process-notes.blade.php

@@ -20,7 +20,7 @@
                 <b class="">{{$modeLabel}} ({{$counts["mode-" . $mode]}})</b>&nbsp;&nbsp;<i class="fa fa-arrow-right"></i>&nbsp;&nbsp;Pick Up Next Available Note
             </button>
                 <a href="/practice-management/process-notes?mode={{$mode}}" class="btn btn-warning px-4 ml-3" style="display: none; color: black;" id="btn-pick-refresh">
-			<b class="">CLICK TO REFRESH DATA! {{$modeLabel}} ({{$counts["mode-" . $mode]}})</b>&nbsp;&nbsp;<i class="fa fa-sync"></i>&nbsp;&nbsp;
+			<b class="">CLICK TO REFRESH DATA! {{$modeLabel}} ({{$counts["mode-" . $mode]}})</b>&nbsp;&nbsp;<i class="fa fa-sync on-hover-opaque"></i>&nbsp;&nbsp;
 		</a>
         </div>
 

+ 1 - 1
resources/views/layouts/confirm-hours-of-availability-notification.blade.php

@@ -38,7 +38,7 @@
 		</div>
 		@else
 		<div>
-			<span>Hours of Availability last confirmed on <b><i class="fas fa-history"></i> {{ friendly_date_time($pro->hours_of_availability_confirmed_at) }}</b></span>
+			<span>Hours of Availability last confirmed on <b><i class="fas fa-history on-hover-opaque"></i> {{ friendly_date_time($pro->hours_of_availability_confirmed_at) }}</b></span>
 		</div>
 
 		<div>

+ 1 - 1
resources/views/layouts/no-mc-template.blade.php

@@ -147,7 +147,7 @@
             <div class="current-work mr-2">
                 @include('app/current-work')
             </div>
-            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync"></i></a>
+            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync on-hover-opaque"></i></a>
             <div class="d-inline-flex pr-2 mcp-theme-1 position-relative">
                 <input id="patient-search" type="search" class="form-control form-control-sm outline-0" autocomplete="off" placeholder="Search Patients">
                 <div class="patient-search-results suggestions-outer position-absolute d-none">

+ 86 - 72
resources/views/layouts/patient-header.blade.php

@@ -32,9 +32,18 @@ $addressParts .= implode(", ", $addressPart2);
 <style media="screen">
 	.header-info h6 {
 		font-size: 1rem !important;
+    margin-bottom: 0;
 	}
+  .patient-header label {
+    margin-bottom: 0 !important;
+  }
+  @media screen and (max-width:1400px){
+    .header-coverage-status {
+      max-width:305px;
+    }
+  }
 </style>
-<div class="p-2 bg-dark-primary text-white mcp-theme-1">
+<div class="p-2 mcp-theme-1 patient-header">
   @if($patient->is_duplicate)
   <div class="alert alert-warning p-1 mb-2 border-dark mcp-theme-1 screen-only">
     <span class="text-dark">This chart is a duplicate of&nbsp;</span>
@@ -44,13 +53,13 @@ $addressParts .= implode(", ", $addressPart2);
   </div>
   @endif
   <div class="d-flex justify-content-between">
-    <div class="d-flex align-items-end header-info">
-      <h6>{{$patientName}},</h6>
+    <div class="d-flex align-items-center header-info mb-2">
+      <h6 class="font-weight-bold">{{$patientName}},</h6>
       <h6 class="ml-2">{{$patient->age_in_years}} Y, {{$patient->sex}}</h6>
       <h6 class="d-inline-flex align-items-baseline ml-2">
         <span><i class="chart mr-2">#{{$patient->chart_number}}</i></span>
         <span class="on-hover-show d-inline-block on-hover-opaque">
-          <i class="fa fa-info-circle ml-1 text-white"></i>
+          <i class="fa fa-info-circle ml-1"></i>
           <div class="on-hover-content py-2 pl-3 text-nowrap text-dark" style="left:0;right:auto;">
             Joined
             <?=$memberSince?>
@@ -65,11 +74,39 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </span>
       </h6>
+      <div class="d-flex border-left pl-2 ml-2">
+        <div class="mr-1">Cell. BP: <b>{{$patient->hasBPDevice()?'Yes':'No'}}</b>
+          @if($patient->most_recent_cellular_bp_sbp_mm_hg && $patient->most_recent_cellular_bp_dbp_mm_hg)
+          (<b>{{$patient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}/{{$patient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}</b>@if($patient->most_recent_cellular_bp_measurement_at), {{friendly_date_short($patient->most_recent_cellular_bp_measurement_at)}}@endif)@endif
+        </div>
+        <div class="mr-2">Wt.: <b>{{$patient->hasWeightScaleDevice()?'Yes':'No'}}</b>
+          @if($patient->most_recent_cellular_weight_value)
+          (<b>{{round($patient->most_recent_cellular_weight_value, 1)}}</b>@if($patient->most_recent_cellular_weight_measurement_at), {{friendly_date_short($patient->most_recent_cellular_weight_measurement_at)}}@endif)
+          @endif
+        </div>
+        
+
+        <?php $currentCareMonth = $patient->currentCareMonth(); ?>
+        @if($currentCareMonth && ($pro->pro_type === 'ADMIN' || $pro->id === $currentCareMonth->mcp_pro_id))
+        <div class="text-primary c-pointer" open-in-stag-popup mc-initer="care-month-dashboard-{{$patient->uid}}" title="Care Month: {{friendly_month($currentCareMonth->start_date)}}" popup-style="overflow-visible" href="/patients/view/{{ $patient->uid }}/care-months/view/{{$currentCareMonth->uid}}">
+          <?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
+          <span class="">RPM comm. this mt:</span>
+          <b class="{{$spoken ? 'text-success' : ''}}">
+            {{$spoken ? 'Yes' : 'No'}}
+            @if(!$spoken)
+            <i class="fa fa-exclamation-triangle"></i>
+            @else
+            <i class="fa fa-check"></i>
+            @endif
+          </b>
+        </div>
+        @endif
+      </div>
     </div>
     <div class="d-flex justify-content-around">
       <div>
         <div moe relative>
-          <a href="#" start show class="text-white ml-3 d-flex align-items-baseline"><i class="fa fa-comment mr-1"></i></a>
+          <a href="#" start show class="ml-3 d-flex align-items-baseline"><i class="fa fa-comment mr-1"></i></a>
           <form right url="/api/clientSms/createOutgoing" class="mcp-theme-1" noreload>
             <input type="hidden" name="uid" value="{{ $patient->uid }}">
             <div class="mb-2">
@@ -92,7 +129,7 @@ $addressParts .= implode(", ", $addressPart2);
       </div>
       <div>
         <span moe relative class="">
-          <a href="#" start show class="text-white ml-3 d-flex align-items-baseline" title="SMS check-in link to the patient"><i class="fa fa-paper-plane mr-1"></i></a>
+          <a href="#" start show class="ml-3 d-flex align-items-baseline" title="SMS check-in link to the patient"><i class="fa fa-paper-plane mr-1"></i></a>
           <form right url="/api/client/sendCheckInTokenViaSmsOrEmail" class="mcp-theme-1">
             <input type="hidden" name="uid" value="{{ $patient->uid }}">
             <p class="small min-width-200px mb-2">Send Check-In link to patient?</p>
@@ -113,17 +150,17 @@ $addressParts .= implode(", ", $addressPart2);
       </div>
       @if($performer->pro->pro_type == 'ADMIN')
       <div>
-        <a href="#" start class="text-white ml-3" show onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i class="fa fa-eye mr-1"></i></a>
+        <a href="#" start class="ml-3 d-block" show onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i class="fa fa-eye mr-1"></i></a>
       </div>
       @endif
       <div>
-        <a href="#" start class="text-white ml-3" show onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i class="fa fa-video mr-1"></i></a>
+        <a href="#" start class="ml-3 d-block" show onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i class="fa fa-video mr-1"></i></a>
       </div>
     </div>
   </div>
 
   <div class="flex-header text-dark">
-    <div class="d-flex bg-light p-2">
+    <div class="d-flex bg-light p-2 border">
       <!-- <div class="">
         <img src="{{asset('img/patient.png')}}" width="80" alt="">
       </div> -->
@@ -135,7 +172,7 @@ $addressParts .= implode(", ", $addressPart2);
 
             @if($pro->pro_type == 'ADMIN')
             <div moe class="ml-2 hide-inside-popup">
-              <a start show><i class="fa fa-edit"></i></a>
+              <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
               <form url="/api/client/updateClientEngagementAssessmentStatus" class="mcp-theme-1" target="#patient-header-content">
                 <input type="hidden" name="uid" value="{{$patient->uid}}">
                 <div class="mb-2">
@@ -165,7 +202,8 @@ $addressParts .= implode(", ", $addressPart2);
             </div>
             @endif
           </div>
-          <div class="mt-2">
+
+          <div class="">
             @if($patient->has_mcp_done_onboarding_visit !== 'YES')
             <span class="text-dark d-inline-flex align-items-center">
               <span class="mr-2">
@@ -174,7 +212,7 @@ $addressParts .= implode(", ", $addressPart2);
               </span>
             </span>
             <span moe class="hide-inside-popup">
-              <a start show><i class="fa fa-edit"></i></a>
+              <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
               <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1">
                 <input type="hidden" name="uid" value="{{$patient->uid}}">
                 <div class="mb-2">
@@ -220,11 +258,11 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </div>
         @if($patient->mcp && $patient->mcp->id === $pro->id || $pro->pro_type == 'ADMIN')
-        <div class="mt-2">
+        <div class="">
           <label>Follow-up Freq (days):</label>
           <span>{!! is_null($patient->mcp_usual_follow_up_frequency_in_days) ? '<span class="text-danger">Not Set</span>' : $patient->mcp_usual_follow_up_frequency_in_days !!}</span>
           <div moe relative class="ml-2">
-            <a href="#" start show class="text-sm"><i class="fa fa-edit"></i></a>
+            <a href="#" start show class="text-sm"><i class="fa fa-edit on-hover-opaque"></i></a>
             <form url="/api/client/putMcpUsualFollowUpFrequencyInDays">
               <input type="hidden" name="uid" value="{{$patient->uid}}">
               <div class="mb-2">
@@ -239,22 +277,35 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </div>
         @endif
-        <span>DOB: {{friendly_date($patient->dob, false,null, true)}} </span>
+        <div class="d-flex">
+          <div>DOB: {{friendly_date($patient->dob, false,null, true)}} </div>
+          @if($patient->getPrimaryCoverage() && $patient->getPrimaryCoverageStatus() === 'YES')
+          <div class="text-nowrap screen-only ml-2 pl-2 border-left">
+            {{$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>
       </div>
     </div>
 
 
     @if(!$patient->getPrimaryCoverage() || $patient->getPrimaryCoverageStatus() !== 'YES')
-    <div class="d-flex bg-light p-2">
+    <div class="d-flex bg-light p-2 border header-coverage-status">
       @include('app.patient.coverage-status')
     </div>
     @endif
-    <div class="bg-light p-2">
+    <div class="bg-light p-2 border">
       <div>
         <label>MCP:</label> {{$mcpName}}
         @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $pro->pro_type == 'ADMIN')
         <div moe class="ml-2 hide-inside-popup">
-          <a start show><i class="fa fa-edit"></i></a>
+          <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
           <form url="/api/client/putMcp" class="mcp-theme-1">
             <input type="hidden" name="uid" value="{{$patient->uid}}">
             <div class="mb-2">
@@ -278,7 +329,7 @@ $addressParts .= implode(", ", $addressPart2);
         </div>
         @if($patient->mcp)
         <div moe class="ml-2 hide-inside-popup">
-          <a start show><i class="fa fa-times"></i></a>
+          <a start show><i class="fa fa-times on-hover-opaque"></i></a>
           <form url="/api/client/removeMcp" class="mcp-theme-1">
             <input type="hidden" name="uid" value="{{$patient->uid}}">
             <div class="mb-2">
@@ -300,7 +351,7 @@ $addressParts .= implode(", ", $addressPart2);
         <form action="{{route('process-log-in-as')}}?redir={{request()->url()}}" onsubmit="window.top.localStorage.currentProUid = '{{$patient->mcp->uid}}';" method="POST" target="_top" class="d-inline-block">
           @csrf
           <input type="hidden" name="proUid" value="{{$patient->mcp->uid}}">
-          <button class="bg-transparent text-primary border-0 text-sm"><i class="fa fa-user"></i></button>
+          <button class="bg-transparent text-primary border-0 text-sm"><i class="fa fa-user on-hover-opaque"></i></button>
         </form>
         @endif
       </div>
@@ -310,7 +361,7 @@ $addressParts .= implode(", ", $addressPart2);
         <span>{!! $patient->mcpEngagementAssessmentStatus && $patient->mcpEngagementAssessmentStatus->status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->mcpEngagementAssessmentStatus->status_category))) : '<span class="text-danger">Not
             Set</span>' !!}</span>
         <div moe class="ml-2">
-          <a start show><i class="fa fa-edit text-sm"></i></a>
+          <a start show><i class="fa fa-edit on-hover-opaque text-sm"></i></a>
           <form url="/api/client/updateMcpEngagementAssessmentStatus" class="mcp-theme-1">
             <input type="hidden" name="uid" value="{{$patient->uid}}">
             <div class="mb-2">
@@ -347,7 +398,7 @@ $addressParts .= implode(", ", $addressPart2);
         <label>CC:</label> {{$patient->defaultNaPro ? $patient->defaultNaPro->displayName() : '-' }}
         @if($pro->pro_type == 'ADMIN')
         <div moe class="ml-2 hide-inside-popup">
-          <a start show><i class="fa fa-edit text-sm"></i></a>
+          <a start show><i class="fa fa-edit on-hover-opaque text-sm"></i></a>
           <form url="/api/client/putDefaultNaPro" class="mcp-theme-1">
             <input type="hidden" name="uid" value="{{$patient->uid}}">
             <div class="mb-2">
@@ -389,7 +440,7 @@ $addressParts .= implode(", ", $addressPart2);
         <form action="{{route('process-log-in-as')}}?redir={{request()->url()}}" onsubmit="window.top.localStorage.currentProUid = '{{$patient->defaultNaPro->uid}}';" method="POST" target="_top" class="d-inline-block">
           @csrf
           <input type="hidden" name="proUid" value="{{$patient->defaultNaPro->uid}}">
-          <button class="bg-transparent text-primary border-0 text-sm"><i class="fa fa-user"></i></button>
+          <button class="bg-transparent text-primary border-0 text-sm"><i class="fa fa-user on-hover-opaque"></i></button>
         </form>
         @endif
       </div>
@@ -399,7 +450,7 @@ $addressParts .= implode(", ", $addressPart2);
         <span>{!! $patient->defaultNaEngagementAssessmentStatus && $patient->defaultNaEngagementAssessmentStatus->status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->defaultNaEngagementAssessmentStatus->status_category))) : '<span
             class="text-danger">Not Set</span>' !!}</span>
         <div moe class="ml-2">
-          <a start show><i class="fa fa-edit text-sm"></i></a>
+          <a start show><i class="fa fa-edit on-hover-opaque text-sm"></i></a>
           <form url="/api/client/updateDefaultNaEngagementAssessmentStatus" class="mcp-theme-1">
             <input type="hidden" name="uid" value="{{$patient->uid}}">
             <div class="mb-2">
@@ -434,49 +485,12 @@ $addressParts .= implode(", ", $addressPart2);
       @endif
     </div>
 
-    <div class="bg-light p-2">
-      <div class="mb-1">Cell. BP: <b>{{$patient->hasBPDevice()?'Yes':'No'}}</b></div>
-      @if($patient->most_recent_cellular_bp_sbp_mm_hg && $patient->most_recent_cellular_bp_dbp_mm_hg)
-      <div class="mb-1">Last BP:
-        <b>{{$patient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}/{{$patient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}</b>
-        @if($patient->most_recent_cellular_bp_measurement_at)
-        <span class="text-sm text-secondary text-nowrap ml-1" title="{{friendly_date_time($patient->most_recent_cellular_bp_measurement_at)}}">({{friendly_date($patient->most_recent_cellular_bp_measurement_at)}})</span>
-        @endif
-      </div>
-      @endif
-      <div class="mb-1">Wt. Scale: <b>{{$patient->hasWeightScaleDevice()?'Yes':'No'}}</b></div>
-      @if($patient->most_recent_cellular_weight_value)
-      <div class="mb-1">Last Wt.:
-        <b>{{round($patient->most_recent_cellular_weight_value, 1)}}</b>
-        @if($patient->most_recent_cellular_weight_measurement_at)
-        <span class="text-sm text-secondary text-nowrap ml-1" title="{{friendly_date_time($patient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date($patient->most_recent_cellular_weight_measurement_at)}})</span>
-        @endif
-      </div>
-      @endif
-
-      <?php $currentCareMonth = $patient->currentCareMonth(); ?>
-      @if($currentCareMonth && ($pro->pro_type === 'ADMIN' || $pro->id === $currentCareMonth->mcp_pro_id))
-      <div class="text-primary c-pointer" open-in-stag-popup mc-initer="care-month-dashboard-{{$patient->uid}}" title="Care Month: {{friendly_month($currentCareMonth->start_date)}}" popup-style="overflow-visible" href="/patients/view/{{ $patient->uid }}/care-months/view/{{$currentCareMonth->uid}}">
-        <?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
-        <span class="">RPM comm. this month:</span>
-        <b class="{{$spoken ? 'text-success' : ''}}">
-          {{$spoken ? 'Yes' : 'No'}}
-          @if(!$spoken)
-          <i class="fa fa-exclamation-triangle"></i>
-          @else
-          <i class="fa fa-check"></i>
-          @endif
-        </b>
-      </div>
-      @endif
-    </div>
-
-    <div class="bg-light p-2 max-width-300px">
+    <div class="bg-light p-2 border" style="max-width: 215px;">
       <div>
-        <div class="max-width-300px d-flex">
-          <label class="mb-1">Sticky Note:</label>
+        <div class="d-flex">
+          <label class="">Sticky Note:</label>
           <div moe relative wide class="ml-2 hide-inside-popup">
-            <a start show><i class="fa fa-edit"></i></a>
+            <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
             <form url="/api/client/updateStickyNote" class="mcp-theme-1" right>
               <input type="hidden" name="uid" value="{{$patient->uid}}">
               <div class="mb-2">
@@ -494,7 +508,7 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </div>
         @if($patient->sticky_note)
-        <div class="mb-2">
+        <div class="">
           <span class="d-block text-secondary">{{$patient->sticky_note ?? '-' }}</span>
         </div>
         @endif
@@ -506,9 +520,9 @@ $addressParts .= implode(", ", $addressPart2);
       </div>
       @endif
     </div>
-    <div class="bg-light p-2">
-      <ul class="vbox align-self-start patient-header-address ">
-        <li class="mb-1 d-flex align-items-start">
+    <div class="bg-light p-2 border">
+      <ul class="vbox align-self-start patient-header-address mb-0">
+        <li class="d-flex align-items-start">
           <span class="aligned-icon">
             <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
           </span>
@@ -537,7 +551,7 @@ $addressParts .= implode(", ", $addressPart2);
           </div>
         </li>
         @if($patient->cell_number)
-        <li class="mb-1">
+        <li class="">
           <span class="aligned-icon">
             <i class="fa fa-phone-alt" aria-hidden="true"></i>
           </span>
@@ -548,12 +562,12 @@ $addressParts .= implode(", ", $addressPart2);
         </li>
         @endif
         @if($patient->phone_home)
-        <li class="mb-1">
+        <li class="">
           <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
           {{$patient->phone_home}}
         </li>
         @endif
-        <li class="mb-1 d-flex align-items-start">
+        <li class="d-flex align-items-start">
           <div class="d-flex align-items-center flex-wrap">
             <span class="ml-1 mr-2"><i class="fa fa-envelope"></i>
               @if($hasConfirmedEmail)

+ 17 - 8
resources/views/layouts/patient.blade.php

@@ -297,7 +297,7 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 			@endif
 			<div class="card {{$trimLayout || $isVisitNote ? 'card m-0 border-0 rounded-0' : 'my-3'}}" id="patient-header">
 				<div id="patient-header-content">
-					<div class="px-2 @if($patient->client_engagement_status_category == 'DUMMY') alert-warning @endif py-1 hide-inside-ticket-popup">
+					<div class="@if($patient->client_engagement_status_category == 'DUMMY') alert-warning @endif hide-inside-ticket-popup">
 						@include('layouts.patient-header')
 					</div>
 				</div>
@@ -389,13 +389,22 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 <script>
 	(function() {
 		function init() {
-			$('#sidebarMenu')
-				.off('scroll')
-				.on('scroll', function() {
-					localStorage.sidebarMenuScrollTop = $(this).scrollTop();
-				});
-			if (localStorage.sidebarMenuScrollTop) {
-				$('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
+			let sbMenu = $('#sidebarMenu');
+			sbMenu
+					.off('scroll')
+					.on('scroll', function() {
+						localStorage.sidebarMenuScrollTop = $(this).scrollTop();
+					});
+			if(localStorage.sidebarMenuScrollTop) {
+				sbMenu.scrollTop(+localStorage.sidebarMenuScrollTop);
+				let sbMenuPos = sbMenu.offset(),
+						activeItem = sbMenu.find('.nav-item>.nav-link.active').first(),
+						activeItemPos = activeItem.offset();
+				if(activeItem.length) {
+					if(activeItemPos.top < sbMenuPos.top || (activeItemPos.top + activeItem.outerHeight(true)) > (sbMenuPos.top + sbMenu.outerHeight(true))) {
+						activeItem[0].scrollIntoView({behavior : "auto", block: "nearest"});
+					}
+				}
 			}
 		}
 		addMCInitializer('sidebarMenu', init, '#sidebarMenu')

+ 1 - 1
resources/views/layouts/template-no-mc.blade.php

@@ -136,7 +136,7 @@
             <div class="current-work mr-2">
                 @include('app/current-work')
             </div>
-            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync"></i></a>
+            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync on-hover-opaque"></i></a>
             <div class="d-inline-flex pr-2 mcp-theme-1 position-relative">
                 <input id="patient-search" type="search" class="form-control form-control-sm outline-0" autocomplete="off" placeholder="Search Patients">
                 <div class="suggestions-outer position-absolute d-none">

+ 5 - 1
resources/views/layouts/template.blade.php

@@ -77,6 +77,10 @@
     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/TableDnD/1.0.5/jquery.tablednd.min.js"></script>
 
+    <script>
+        window.segmentRefreshConfig = {!! json_encode(config('stag.segmentRefreshConfig')) !!};
+    </script>
+
     @yield('head')
 </head>
 
@@ -228,7 +232,7 @@
             <div class="current-work mr-2">
                 @include('app/current-work')
             </div> --}}
-            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync"></i></a>
+            <a href="#" class="mr-2 text-white small" onclick="return fastReload()"><i class="fa fa-sync on-hover-opaque"></i></a>
             <div class="d-inline-flex pr-2 mcp-theme-1 position-relative">
                 <input id="patient-search" type="search" class="form-control form-control-sm outline-0" autocomplete="off" placeholder="Search Patients">
                 <div class="patient-search-results suggestions-outer position-absolute d-none">