Selaa lähdekoodia

Dx wizard - integrate CC

Vijayakrishnan 3 vuotta sitten
vanhempi
commit
03cf9bff4d
1 muutettua tiedostoa jossa 34 lisäystä ja 0 poistoa
  1. 34 0
      resources/views/app/patient/problems-center.blade.php

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

@@ -23,11 +23,22 @@ foreach ($points as $point) {
 }
 $problems = $points;
 
+$ccSegment = $note->getSegmentByInternalName('chief_complaint');
 ?>
 
 <div class="mt-3 p-3 border-top min-height-500px" id="problems-center-{{$note->id}}">
     <div>
 
+        <div class="d-flex align-items-baseline">
+            <div class="mb-2 font-weight-bold font-size-14 text-secondary">Chief Complaint</div>
+            <span class="mx-2 text-secondary">|</span>
+            <a href="#" class="regenerate-cc">Regenerate with relevant problems</a>
+        </div>
+        <textarea rows="3" readonly class="cc-readonly form-control form-control-sm mb-0 bg-light"><?= $ccSegment && @$ccSegment->summary_html ? trim(strip_tags($ccSegment->summary_html)) : '' ?></textarea>
+
+        <hr class="m-neg-3 my-3">
+
+        <div class="mb-2 font-weight-bold font-size-14 text-secondary">Problems</div>
         <table class="table table-sm table-bordered table-striped mb-0 bg-white mb-2">
             <thead>
             <tr class="">
@@ -644,6 +655,29 @@ $problems = $points;
                     return false;
                 });
 
+            parentSegment.find('.regenerate-cc')
+                .off('click.regenerate-cc')
+                .on('click.regenerate-cc', function () {
+
+                    showMask();
+
+                    // refresh the cc
+                    $.post('/api/visit/updateSegmentHtml', {
+                        segmentUid: '{{$ccSegment->uid}}'
+                    }, _data => {
+                        if(!hasResponseError(_data)) {
+                            parentSegment.find('.cc-readonly').val(
+                                $.trim($('<div/>').html(_data.data.summaryHtml).text())
+                            );
+                        }
+                    }, 'json')
+                    .then(function() {
+                        hideMask();
+                    });
+
+                    return false;
+                });
+
             initStagSuggest();
 
             $('.additionReasonCategory_ui').trigger('change');