Vijayakrishnan 3 лет назад
Родитель
Сommit
a7dc34bab3

+ 21 - 15
resources/views/app/patient/allergies-center.blade.php

@@ -109,7 +109,26 @@ if(!@$summaryView) {
 
                                             <input type="hidden" name="data" value='{{json_encode($allergy->data)}}'>
 
-                                            @if($allergy->added_in_note_id === $note->id)
+                                            @if($allergy->added_in_note_id !== $note->id)
+
+                                                <div class="mb-2 bg-light p-2 border">
+                                                    <p class="mb-1 font-weight-bold">
+                                                        {{ @$allergy->data->name }}
+                                                    </p>
+                                                    @if($patient->core_note_id !== $note->id)
+                                                        <div class="text-secondary">This allergy was added outside of this visit.
+                                                            <a href="#" class="update-core-data ml-2">
+                                                                <i class="fa fa-edit on-hover-opaque"></i>
+                                                                Update
+                                                            </a>
+                                                        </div>
+                                                    @endif
+                                                </div>
+
+                                            @endif
+
+
+                                            <div class="mb-2 {{$allergy->added_in_note_id === $note->id ? '' : 'd-none'}}" if-core-data-edit-confirmed>
 
                                                 <input type="hidden" data-name="damConceptId" value="{{@$allergy->data->damConceptId}}">
                                                 <input type="hidden" data-name="damConceptIdType" value="{{@$allergy->data->damConceptIdType}}">
@@ -122,20 +141,7 @@ if(!@$summaryView) {
                                                            stag-suggest-ep="/fdb-allergy-suggest/json">
                                                 </div>
 
-                                            @else
-
-                                                <div class="mb-2 bg-light p-2 border">
-                                                    <p class="mb-1 font-weight-bold">
-                                                        {{ @$allergy->data->name }}
-                                                    </p>
-                                                    @if($patient->core_note_id !== $note->id)
-                                                        <div class="text-secondary text-sm">Clinical details cannot be modified since the allergy was added prior to this visit.</div>
-                                                    @else
-                                                        <div class="text-secondary text-sm">Clinical details cannot be modified since the allergy was added on a previous visit.</div>
-                                                    @endif
-                                                </div>
-
-                                            @endif
+                                            </div>
 
                                             @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'allergy', 'point' => $allergy, 'addVerbPT' => 'Added', 'apTerm' => 'assessment/plan'])
 

+ 22 - 17
resources/views/app/patient/careteam-center.blade.php

@@ -70,7 +70,27 @@ if(!@$careTeamMembers || !@$counts) {
 
                                             <input type="hidden" name="data" value='{{json_encode($careTeamMember->data)}}'>
 
-                                            @if($careTeamMember->added_in_note_id === $note->id)
+                                            @if($careTeamMember->added_in_note_id !== $note->id)
+
+                                                <div class="mb-2 bg-light p-2 border">
+                                                    <p class="mb-1 font-weight-bold">
+                                                        {{ @$careTeamMember->data->name }}
+                                                        {{ @$careTeamMember->data->specialty }}
+                                                        {{ @$careTeamMember->data->organization }}
+                                                    </p>
+                                                    @if($patient->core_note_id !== $note->id)
+                                                        <div class="text-secondary">This care team member was added outside of this visit.
+                                                            <a href="#" class="update-core-data ml-2">
+                                                                <i class="fa fa-edit on-hover-opaque"></i>
+                                                                Update
+                                                            </a>
+                                                        </div>
+                                                    @endif
+                                                </div>
+
+                                            @endif
+
+                                            <div class="mb-2 {{$careTeamMember->added_in_note_id === $note->id ? '' : 'd-none'}}" if-core-data-edit-confirmed>
 
                                                 <div class="row mb-2">
                                                     <div class="col-6 pr-0">
@@ -131,22 +151,7 @@ if(!@$careTeamMembers || !@$counts) {
                                                     </div>
                                                 </div>
 
-                                            @else
-
-                                                <div class="mb-2 bg-light p-2 border">
-                                                    <p class="mb-1 font-weight-bold">
-                                                        {{ @$careTeamMember->data->name }}
-                                                        {{ @$careTeamMember->data->specialty }}
-                                                        {{ @$careTeamMember->data->organization }}
-                                                    </p>
-                                                    @if($patient->core_note_id !== $note->id)
-                                                        <div class="text-secondary text-sm">Clinical details cannot be modified since the care team member was added prior to this visit.</div>
-                                                    @else
-                                                        <div class="text-secondary text-sm">Clinical details cannot be modified since the care team member was added on a previous visit.</div>
-                                                    @endif
-                                                </div>
-
-                                            @endif
+                                            </div>
 
                                             @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'care-team-member', 'point' => $careTeamMember])
 

+ 18 - 13
resources/views/app/patient/goals-center.blade.php

@@ -64,30 +64,35 @@ if(!@$goals || !@$counts) {
 
                                     <input type="hidden" name="data" value='{{json_encode($goal->data)}}'>
 
-                                    @if($goal->added_in_note_id === $note->id)
-
-                                        <div class="mb-2">
-                                            <label class="text-sm mb-1 font-weight-bold">Goal</label>
-                                            <input type="text" class="form-control form-control-sm min-width-unset"
-                                                   data-name="goal"
-                                                   value="{{@$goal->data->goal}}">
-                                        </div>
-
-                                    @else
+                                    @if($goal->added_in_note_id !== $note->id)
 
                                         <div class="mb-2 bg-light p-2 border">
                                             <p class="mb-1 font-weight-bold">
                                                 {{ @$goal->data->goal }}
                                             </p>
                                             @if($patient->core_note_id !== $note->id)
-                                                <div class="text-secondary text-sm">Clinical details cannot be modified since the goal was added prior to this visit.</div>
-                                            @else
-                                                <div class="text-secondary text-sm">Clinical details cannot be modified since the goal was added on a previous visit.</div>
+                                                <div class="text-secondary">This goal was added outside of this visit.
+                                                    <a href="#" class="update-core-data ml-2">
+                                                        <i class="fa fa-edit on-hover-opaque"></i>
+                                                        Update
+                                                    </a>
+                                                </div>
                                             @endif
                                         </div>
 
                                     @endif
 
+                                    <div class="mb-2 {{$goal->added_in_note_id === $note->id ? '' : 'd-none'}}" if-core-data-edit-confirmed>
+
+                                        <div class="mb-2">
+                                            <label class="text-sm mb-1 font-weight-bold">Goal</label>
+                                            <input type="text" class="form-control form-control-sm min-width-unset"
+                                                   data-name="goal"
+                                                   value="{{@$goal->data->goal}}">
+                                        </div>
+
+                                    </div>
+
                                     @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'goal', 'point' => $goal])
 
                                     <div class="mt-3 pt-2 d-flex align-items-center border-top">

+ 19 - 16
resources/views/app/patient/medications-center.blade.php

@@ -108,8 +108,25 @@ if(!@$summaryView) {
 
                                             <input type="hidden" name="data" value='{{json_encode($medication->data)}}'>
 
-                                            @if($medication->added_in_note_id === $note->id)
+                                            @if($medication->added_in_note_id !== $note->id)
 
+                                                <div class="mb-2 bg-light p-2 border">
+                                                    <p class="mb-1 font-weight-bold">
+                                                        {{ @$medication->data->name }}
+                                                    </p>
+                                                    @if($patient->core_note_id !== $note->id)
+                                                        <div class="text-secondary">This medication was added outside of this visit.
+                                                            <a href="#" class="update-core-data ml-2">
+                                                                <i class="fa fa-edit on-hover-opaque"></i>
+                                                                Update
+                                                            </a>
+                                                        </div>
+                                                    @endif
+                                                </div>
+
+                                            @endif
+
+                                            <div class="mb-2 {{$medication->added_in_note_id === $note->id ? '' : 'd-none'}}" if-core-data-edit-confirmed>
                                                 <input type="hidden" data-name="medId" value="{{@$medication->data->medId}}">
                                                 <input type="hidden" data-name="routedMedId" value="{{@$medication->data->routedMedId}}">
                                                 <input type="hidden" data-name="routedDosageFormMedId" value="{{@$medication->data->routedDosageFormMedId}}">
@@ -123,21 +140,7 @@ if(!@$summaryView) {
                                                            stag-suggest
                                                            stag-suggest-ep="/fdb-med-suggest-v2/json">
                                                 </div>
-
-                                            @else
-
-                                                <div class="mb-2 bg-light p-2 border">
-                                                    <p class="mb-1 font-weight-bold">
-                                                        {{ @$medication->data->name }}
-                                                    </p>
-                                                    @if($patient->core_note_id !== $note->id)
-                                                        <div class="text-secondary text-sm">Clinical details cannot be modified since the medication was added prior to this visit.</div>
-                                                    @else
-                                                        <div class="text-secondary text-sm">Clinical details cannot be modified since the medication was added on a previous visit.</div>
-                                                    @endif
-                                                </div>
-
-                                            @endif
+                                            </div>
 
                                             @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'medication', 'point' => $medication, 'addVerbPT' => 'Prescribed'])
 

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

@@ -137,7 +137,25 @@ if(!@$summaryView) {
 
                                                 <input type="hidden" name="data" value='{{json_encode($problem->data)}}'>
 
-                                                @if($problem->added_in_note_id === $note->id)
+                                                @if($problem->added_in_note_id !== $note->id)
+
+                                                    <div class="mb-2 bg-light p-2 border">
+                                                        <p class="mb-1 font-weight-bold">
+                                                            {{ @$problem->data->name }}
+                                                        </p>
+                                                        @if($patient->core_note_id !== $note->id)
+                                                            <div class="text-secondary">This problem was added outside of this visit.
+                                                                <a href="#" class="update-core-data ml-2">
+                                                                    <i class="fa fa-edit on-hover-opaque"></i>
+                                                                    Update
+                                                                </a>
+                                                            </div>
+                                                        @endif
+                                                    </div>
+
+                                                @endif
+
+                                                <div class="mb-2 {{$problem->added_in_note_id === $note->id ? '' : 'd-none'}}" if-core-data-edit-confirmed>
 
                                                     <input type="hidden" data-name="dxid" value="{{@$problem->data->dxid}}">
                                                     <input type="hidden" data-name="icd-type" value="{{@$problem->data->{'icd-type'} }}">
@@ -162,20 +180,7 @@ if(!@$summaryView) {
                                                         </div>
                                                     </div>
 
-                                                @else
-
-                                                    <div class="mb-2 bg-light p-2 border">
-                                                        <p class="mb-1 font-weight-bold">
-                                                            {{ @$problem->data->name }}
-                                                        </p>
-                                                        @if($patient->core_note_id !== $note->id)
-                                                            <div class="text-secondary text-sm">Clinical details cannot be modified since the problem was added prior to this visit.</div>
-                                                        @else
-                                                            <div class="text-secondary text-sm">Clinical details cannot be modified since the problem was added on a previous visit.</div>
-                                                        @endif
-                                                    </div>
-
-                                                @endif
+                                                </div>
 
                                                 @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'problem', 'point' => $problem, 'addVerbPT' => 'Added', 'reviewLabel' => 'Subjective/HPI', 'apTerm' => 'assessment/plan'])
 

+ 7 - 0
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -970,4 +970,11 @@ parentSegment
             .find('a[start][show]')
             .trigger('click');
         return false;
+    });
+
+parentSegment
+    .off('click.update-core-data', '.update-core-data')
+    .on('click.update-core-data', '.update-core-data', function() {
+        $(this).closest('form').find('[if-core-data-edit-confirmed]').removeClass('d-none');
+        return false;
     });