Browse Source

removed added_in_segment_id in templates

= 3 years ago
parent
commit
676e7fed88
19 changed files with 20 additions and 22 deletions
  1. 0 2
      resources/views/app/patient/note/dashboard.blade.php
  2. 1 1
      resources/views/app/patient/problems-center.blade.php
  3. 1 1
      resources/views/app/patient/segment-templates/_simple_text_segment/edit.php
  4. 1 1
      resources/views/app/patient/segment-templates/_simple_text_segment/summary.php
  5. 1 1
      resources/views/app/patient/segment-templates/chief_complaint/edit.blade.php
  6. 1 1
      resources/views/app/patient/segment-templates/chief_complaint/summary.blade.php
  7. 1 1
      resources/views/app/patient/segment-templates/disclaimers/edit.blade.php
  8. 1 1
      resources/views/app/patient/segment-templates/disclaimers/summary.blade.php
  9. 1 1
      resources/views/app/patient/segment-templates/how_to_smbp/edit.blade.php
  10. 1 1
      resources/views/app/patient/segment-templates/how_to_smbp/summary.blade.php
  11. 1 1
      resources/views/app/patient/segment-templates/informed_consent/edit.blade.php
  12. 1 1
      resources/views/app/patient/segment-templates/informed_consent/summary.blade.php
  13. 1 1
      resources/views/app/patient/segment-templates/masks_and_respirators/edit.blade.php
  14. 1 1
      resources/views/app/patient/segment-templates/masks_and_respirators/summary.blade.php
  15. 2 2
      resources/views/app/patient/segment-templates/mc_vitals/edit.blade.php
  16. 1 1
      resources/views/app/patient/segment-templates/mc_vitals/summary.blade.php
  17. 2 2
      resources/views/app/patient/segment-templates/vitals/edit.blade.php
  18. 1 1
      resources/views/app/patient/segment-templates/vitals/summary.blade.php
  19. 1 1
      resources/views/app/practice-management/visit-templates/change-note-visit-template.blade.php

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

@@ -158,11 +158,9 @@
                         </div>
                     </form>
                 </div>
-                {{--
                 <div class="d-inline border-left pl-2">
                     @include('app.practice-management.visit-templates.change-note-visit-template')
                 </div>
-                --}}
                 @endif
             </div>
             <div class="px-2 border-left border-right">

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

@@ -36,7 +36,7 @@ if(!@$summaryView) {
 
         <?php
         $segment = $note->getSegmentByInternalName('chief_complaint');
-        $ccPoint = Point::where('added_in_segment_id', $segment->id)->where('category', 'CHIEF_COMPLAINT')->orderBy('id', 'DESC')->first();
+        $ccPoint = Point::where('added_in_note_id', $note->id)->where('category', 'CHIEF_COMPLAINT')->orderBy('id', 'DESC')->first();
         $parsed = null;
         if ($ccPoint && !!@$ccPoint->data) {
             $parsed = json_decode($ccPoint->data);

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

@@ -2,7 +2,7 @@
 
 use App\Models\Point;
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $parsed = null;
 if (!!@$point->data) {
     $parsed = json_decode($point->data);

+ 1 - 1
resources/views/app/patient/segment-templates/_simple_text_segment/summary.php

@@ -2,7 +2,7 @@
 
 use App\Models\Point;
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $parsed = null;
 if (!!@$point->data) {
     $parsed = json_decode($point->data);

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

@@ -4,7 +4,7 @@ $endPoint = 'upsertNoteSingleton';
 
 use App\Models\Point;
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $segment->note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $parsed = null;
 if ($point && !!@$point->data) {
     $parsed = json_decode($point->data);

+ 1 - 1
resources/views/app/patient/segment-templates/chief_complaint/summary.blade.php

@@ -3,7 +3,7 @@ $category = 'CHIEF_COMPLAINT';
 
 use App\Models\Point;
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $segment->note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $parsed = null;
 if ($point && !!@$point->data) {
     $parsed = json_decode($point->data);

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

@@ -5,7 +5,7 @@ use App\Models\Point;
 $category = 'DISCLAIMERS';
 $endPoint = 'upsertNoteSingleton';
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = [
     "consent_for_telehealth_visit" => false,
     "eduction_provided_for_covid" => false,

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

@@ -5,7 +5,7 @@ use App\Models\Point;
 $category = 'DISCLAIMERS';
 $endPoint = 'upsertNoteSingleton';
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = [
     "consent_for_telehealth_visit" => false,
     "eduction_provided_for_covid" => false,

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

@@ -6,7 +6,7 @@ $category = 'HOW_TO_SMBP';
 $endPoint = 'upsertNoteSingleton';
 
 //$point = Point::getGlobalSingletonOfCategory($patient, $category, true);
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 
 $bp_checkboxes = [
     [

+ 1 - 1
resources/views/app/patient/segment-templates/how_to_smbp/summary.blade.php

@@ -6,7 +6,7 @@ $category = 'HOW_TO_SMBP';
 $endPoint = 'upsertNoteSingleton';
 
 //$point = Point::getGlobalSingletonOfCategory($patient, $category, true);
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 
 
 $bp_checkboxes = [

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

@@ -5,7 +5,7 @@ use App\Models\Point;
 $category = 'INFORMED_CONSENT';
 $endPoint = 'upsertNoteSingleton';
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = [
     "informed_consent" => false
 ];

+ 1 - 1
resources/views/app/patient/segment-templates/informed_consent/summary.blade.php

@@ -5,7 +5,7 @@ use App\Models\Point;
 $category = 'INFORMED_CONSENT';
 $endPoint = 'upsertNoteSingleton';
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = [
     "informed_consent" => false
 ];

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

@@ -78,7 +78,7 @@ $segmentSections = [
 $category = 'MASKS_AND_RESPIRATORS';
 $endPoint = 'upsertNoteSingleton';
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 
 $contentData = [];
 

+ 1 - 1
resources/views/app/patient/segment-templates/masks_and_respirators/summary.blade.php

@@ -77,7 +77,7 @@ $segmentSections = [
 $category = 'MASKS_AND_RESPIRATORS';
 $endPoint = 'upsertNoteSingleton';
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 
 
 $contentData = [];

+ 2 - 2
resources/views/app/patient/segment-templates/mc_vitals/edit.blade.php

@@ -18,7 +18,7 @@ $vitalLabels = [
     "smokingStatus" => "Smoking Status",
 ];
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = null;
 if (!!@$point->data) {
     $contentData = json_decode($point->data, true);
@@ -48,7 +48,7 @@ if(!$contentData) {
 }
 
 $previousVitals = Point::where('client_id', $patient->id)
-    ->where('added_in_segment_id', '<>', $segment->id)
+    ->where('added_in_note_id', '<>', $note->id)
     ->where('category', $category)
     ->orderBy('id', 'DESC')
     ->limit(4)

+ 1 - 1
resources/views/app/patient/segment-templates/mc_vitals/summary.blade.php

@@ -18,7 +18,7 @@ $vitalLabels = [
     "smokingStatus" => "Smoking Status",
 ];
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = null;
 if (!!@$point->data) {
     $contentData = json_decode($point->data, true);

+ 2 - 2
resources/views/app/patient/segment-templates/vitals/edit.blade.php

@@ -18,7 +18,7 @@ $vitalLabels = [
     "smokingStatus" => "Smoking Status",
 ];
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = null;
 if (!!@$point->data) {
     $contentData = json_decode($point->data, true);
@@ -48,7 +48,7 @@ if(!$contentData) {
 }
 
 $previousVitals = Point::where('client_id', $patient->id)
-    ->where('added_in_segment_id', '<>', $segment->id)
+    ->where('added_in_note_id', '<>', $note->id)
     ->where('category', $category)
     ->orderBy('id', 'DESC')
     ->limit(4)

+ 1 - 1
resources/views/app/patient/segment-templates/vitals/summary.blade.php

@@ -18,7 +18,7 @@ $vitalLabels = [
     "smokingStatus" => "Smoking Status",
 ];
 
-$point = Point::where('added_in_segment_id', $segment->id)->where('category', $category)->orderBy('id', 'DESC')->first();
+$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
 $contentData = null;
 if (!!@$point->data) {
     $contentData = json_decode($point->data, true);

+ 1 - 1
resources/views/app/practice-management/visit-templates/change-note-visit-template.blade.php

@@ -11,7 +11,7 @@
 	<div moe>
 		<a class="" href="" show start>Change Visit Template</a>
 		<form url="/api/visit/swapTemplate">
-			<input type="hidden" name="uid" value="{{ $note->uid }}">
+			<input type="hidden" name="noteUid" value="{{ $note->uid }}">
 			<div id="changeNoteVisitTemplateSegmentTemplateComponent" v-cloak>
 				<div class="mb-2">
 					<label>Visit Template<sup class="text-danger">*</sup></label>