|
@@ -52,7 +52,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
|
<input type="hidden" name="data" value="{{json_encode($contentData)}}">
|
|
|
|
|
|
<div id="edit-sleep_health_intake-container" class="customized-form">
|
|
|
-
|
|
|
+ @include('app.patient.modules.sleep_health_intake.partials.cc')
|
|
|
@include('app.patient.modules.sleep_health_intake.partials.epworth_sleepiness_study')
|
|
|
|
|
|
@include('app.patient.modules.sleep_health_intake.partials.obstructive_sleep_apnea')
|
|
@@ -183,6 +183,29 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
|
self.calculateScore();
|
|
|
});
|
|
|
},
|
|
|
+ initOmegaCC: function(){
|
|
|
+ var self = this;
|
|
|
+ const options = { theme: "snow" };
|
|
|
+ var quill = new Quill('#omegaCCEditor', options);
|
|
|
+ quill.on('text-change', function(delta, oldDelta, source) {
|
|
|
+ var html = quill.root.innerHTML;
|
|
|
+ // auto-save omega_cc
|
|
|
+ var quillTarget = $('#omegaCCEditor');
|
|
|
+ var segmentUid = quillTarget.data('segment-uid');
|
|
|
+ var segmentCategory = quillTarget.data('segment-category');
|
|
|
+ var noteUid = quillTarget.data('note-uid');
|
|
|
+ var uid = quillTarget.data('uid');
|
|
|
+ var data = {free_text:html};
|
|
|
+ var formData = {
|
|
|
+ // uid: uid,
|
|
|
+ segmentUid: segmentUid,
|
|
|
+ category: segmentCategory,
|
|
|
+ data: JSON.stringify(data)
|
|
|
+ };
|
|
|
+ var url = '/api/visitPoint/upsertNoteSingleton';
|
|
|
+ $.post(url, formData, function(response) {}, 'json');
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted: function() {
|
|
|
if (!this.data.dropdownOptions) {
|
|
@@ -191,6 +214,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
|
}
|
|
|
this.initSelect2();
|
|
|
this.initOnSelectChange();
|
|
|
+ this.initOmegaCC();
|
|
|
}
|
|
|
});
|
|
|
|