Ver Fonte

Disclaimers updates

Vijayakrishnan há 3 anos atrás
pai
commit
c9f65ca21d

+ 27 - 0
resources/views/app/patient/segment-templates/disclaimers/edit.blade.php

@@ -24,6 +24,13 @@ if (!!@$point->data) {
         <input type="hidden" name="category" value="<?= $category ?>">
         <input type="hidden" name="data" value="{{json_encode($contentData)}}">
 
+        <label class="d-flex align-items-baseline mb-2">
+            <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
+                <input type="checkbox" class="chk-disclaimers-check-all" onchange="$(this).closest('form').find(':checkbox[data-name]').prop('checked', this.checked)">
+            </div>
+            <span class="font-weight-bold">Check ALL</span>
+        </label>
+
         <label class="d-flex align-items-baseline mb-2">
             <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
                 <input type="checkbox" data-name="consent_for_telehealth_visit" {{@($contentData["consent_for_telehealth_visit"] ? 'checked' : '')}}>
@@ -142,8 +149,10 @@ if (!!@$point->data) {
         @if($note->method == 'AUDIO' || $note->method == 'VIDEO')
             <p class="mb-2">The visit was conducted with the use of an interactive <b>{{$note->method}}</b> telecommunications system that permits real time communication
                 between the patient and the provider. Patient consent for telehealth visit was obtained.</p>
+            <?php /*
             <p class="mb-2">Originating Site: <b>{{$note->hcpCompanyPro && $note->hcpCompanyPro->company ? $note->hcpCompanyPro->company->name : '-'}}</b></p>
             <p class="mb-2">Distant Site: <b>Patient Home</b></p>
+            */ ?>
         @endif
 
         <div class="pt-2">
@@ -158,3 +167,21 @@ if (!!@$point->data) {
         </div>
     </form>
 </div>
+
+<script>
+    (function() {
+        window.segmentInitializers.<?= !!@$segment ? $segment->segmentTemplate->internal_name : $segmentInternalName ?> = function () {
+            let parentSegment = $('[data-segment-template-name="<?= $segment->segmentTemplate->internal_name ?>"] ');
+            function __checkAll() {
+                parentSegment.find('.chk-disclaimers-check-all').prop('checked',
+                    parentSegment.find(':checkbox[data-name]').length === parentSegment.find(':checkbox[data-name]:checked').length);
+            }
+            parentSegment.find(':checkbox[data-name]')
+                .off('change.check-all-toggle')
+                .on('change.check-all-toggle', function() {
+                    __checkAll();
+                });
+            __checkAll();
+        };
+    }).call(window);
+</script>

+ 2 - 0
resources/views/app/patient/segment-templates/disclaimers/summary.blade.php

@@ -161,7 +161,9 @@ $erxs = \App\Models\Erx::where('client_id', $note->client->id)
 @if($note->method == 'AUDIO' || $note->method == 'VIDEO')
     <p class="mb-2">The visit was conducted with the use of an interactive <b>{{$note->method}}</b> telecommunications system that permits real time communication
         between the patient and the provider. Patient consent for telehealth visit was obtained.</p>
+    <?php /*
     <p class="mb-2">Originating Site: <b>{{$note->hcpCompanyPro && $note->hcpCompanyPro->company ? $note->hcpCompanyPro->company->name : '-'}}</b></p>
     <p class="mb-2">Distant Site: <b>Patient Home</b></p>
+    */ ?>
 @endif