Bläddra i källkod

Updated note ICDs

Samson Mutunga 3 år sedan
förälder
incheckning
9a057e4e3f

+ 46 - 10
resources/views/app/patient/note/dashboard-bu-b4-pure-soap.blade.php

@@ -1031,20 +1031,56 @@
                     <div class="">
                         <div class="d-flex align-items-center mb-2">
                             <p class="font-weight-bold text-secondary m-0 mr-2">ICDs</p>
-                            @include('app/patient/note/_create-note-reason')
+                            @include('app.patient.partials.put-rm-reasons', ['recordType' => 'NOTE', 'record' => $note])
                         </div>
+                        <?php
+                            $noteICDData = [
+                                'icd_1' => [
+                                    'title' => 'ICD 1',
+                                    'reason' => $note->note_reason_icd1,
+                                    'description' => $note->note_reason_icd1description
+                                ],
+                                'icd_2' => [
+                                    'title' => 'ICD 2',
+                                    'reason' => $note->note_reason_icd2,
+                                    'description' => $note->note_reason_icd2description
+                                ],
+                                'icd_3' => [
+                                    'title' => 'ICD 3',
+                                    'reason' => $note->note_reason_icd3,
+                                    'description' => $note->note_reason_icd3description
+                                ],
+                                'icd_4' => [
+                                    'title' => 'ICD 4',
+                                    'reason' => $note->note_reason_icd4,
+                                    'description' => $note->note_reason_icd4description
+                                ],
+                            ];
+                        ?>
                         <div class="d-flex align-items-start flex-wrap">
-                        @if(count($note->reasons))
-                             @foreach ($note->reasons as $reason)
-                                <span class="badge badge-info p-2 mb-2 mr-2">
-                                    {{ $reason->description}} ({{ $reason->code }})
-                                </span>
-                            @endforeach
-                        @else
-                            <div class="alert alert-info position-static">No note reasons</div>
-                        @endif
+                            <?php $emptyNoteICDs = true; ?>
+                                @foreach ($noteICDData as $noteICDKey => $noteICD)
+                                    <?php 
+                                        $emptyICD = true;
+                                        if(!empty($noteICD['reason']) || !empty($noteICD['description'])){
+                                            $emptyNoteICDs = false;
+                                            $emptyICD = false;
+                                        }
+                                    ?>
+                                    @if(!$emptyICD)
+                                        <span class="badge badge-info px-2 mb-1 mr-2">{{$noteICD['description']}} ({{ $noteICD['reason'] }})</span>
+                                    @endif
+                                @endforeach
+                            @if($emptyNoteICDs)
+                                <small class="text-warning">No note reasons</small>
+                            @endif
                         </div>
                     </div>
+                    @if(!empty($note->note_reason_memo))
+                        <div style="padding-left: 60px;">
+                            <small><b>Reason:</b> {{ $note->note_reason_memo }}</small>
+                        </div>
+                    @endif
                 </div>
 
                 @if($pro->pro_type === 'ADMIN')

+ 44 - 8
resources/views/app/patient/note/dashboard-univ.blade.php

@@ -864,20 +864,56 @@
                             <div class="">
                                 <div class="d-flex align-items-center mb-2">
                                     <p class="font-weight-bold text-secondary m-0 mr-2">ICDs</p>
-                                    @include('app/patient/note/_create-note-reason')
+                                    @include('app.patient.partials.put-rm-reasons', ['recordType' => 'NOTE', 'record' => $note])
                                 </div>
+                                <?php
+                                    $noteICDData = [
+                                        'icd_1' => [
+                                            'title' => 'ICD 1',
+                                            'reason' => $note->note_reason_icd1,
+                                            'description' => $note->note_reason_icd1description
+                                        ],
+                                        'icd_2' => [
+                                            'title' => 'ICD 2',
+                                            'reason' => $note->note_reason_icd2,
+                                            'description' => $note->note_reason_icd2description
+                                        ],
+                                        'icd_3' => [
+                                            'title' => 'ICD 3',
+                                            'reason' => $note->note_reason_icd3,
+                                            'description' => $note->note_reason_icd3description
+                                        ],
+                                        'icd_4' => [
+                                            'title' => 'ICD 4',
+                                            'reason' => $note->note_reason_icd4,
+                                            'description' => $note->note_reason_icd4description
+                                        ],
+                                    ];
+                                ?>
                                 <div class="d-flex align-items-start flex-wrap">
-                                    @if(count($note->reasons))
-                                        @foreach ($note->reasons as $reason)
-                                            <span class="badge badge-info p-2 mb-2 mr-2">
-                                    {{ $reason->description}} ({{ $reason->code }})
-                                </span>
+                                    <?php $emptyNoteICDs = true; ?>
+                                        @foreach ($noteICDData as $noteICDKey => $noteICD)
+                                            <?php 
+                                                $emptyICD = true;
+                                                if(!empty($noteICD['reason']) || !empty($noteICD['description'])){
+                                                    $emptyNoteICDs = false;
+                                                    $emptyICD = false;
+                                                }
+                                            ?>
+                                            @if(!$emptyICD)
+                                                <span class="badge badge-info px-2 mb-1 mr-2">{{$noteICD['description']}} ({{ $noteICD['reason'] }})</span>
+                                            @endif
                                         @endforeach
-                                    @else
-                                        <div class="alert alert-info">No note reasons</div>
+                                    @if($emptyNoteICDs)
+                                        <small class="text-warning">No note reasons</small>
                                     @endif
                                 </div>
                             </div>
+                            @if(!empty($note->note_reason_memo))
+                                <div style="padding-left: 60px;">
+                                    <small><b>Reason:</b> {{ $note->note_reason_memo }}</small>
+                                </div>
+                            @endif
                         </div>
                         @if($pro->pro_type === 'ADMIN')
                             <div class="p-3 border-bottom screen-only">

+ 49 - 13
resources/views/app/patient/note/dashboard.blade.php

@@ -1078,24 +1078,60 @@ use App\Models\Handout;
                     </script>
                 </div>
 
-                <div class="p-2 border-bottom" data-non-segment-section="ICDs">
+                <div class="px-2 pt-2 pb-1 border-bottom" data-non-segment-section="ICDs">
                     <div class="d-flex alignt-items-start">
-                        <div class="d-flex {{ count($note->reasons) > 2 ? '':'align-items-center' }} mr-2">
+                        <div class="d-flex mr-2">
                             <p class="font-weight-bold text-secondary m-0 mr-2">ICDs</p>
-                            @include('app/patient/note/_create-note-reason')
+                            @include('app.patient.partials.put-rm-reasons', ['recordType' => 'NOTE', 'record' => $note])
                         </div>
+                        <?php
+                            $noteICDData = [
+                                'icd_1' => [
+                                    'title' => 'ICD 1',
+                                    'reason' => $note->note_reason_icd1,
+                                    'description' => $note->note_reason_icd1description
+                                ],
+                                'icd_2' => [
+                                    'title' => 'ICD 2',
+                                    'reason' => $note->note_reason_icd2,
+                                    'description' => $note->note_reason_icd2description
+                                ],
+                                'icd_3' => [
+                                    'title' => 'ICD 3',
+                                    'reason' => $note->note_reason_icd3,
+                                    'description' => $note->note_reason_icd3description
+                                ],
+                                'icd_4' => [
+                                    'title' => 'ICD 4',
+                                    'reason' => $note->note_reason_icd4,
+                                    'description' => $note->note_reason_icd4description
+                                ],
+                            ];
+                        ?>
                         <div class="d-flex align-items-start flex-wrap">
-                        @if(count($note->reasons))
-                             @foreach ($note->reasons as $reason)
-                                <span class="badge badge-info p-2 mb-1 mr-2">
-                                    {{ $reason->description}} ({{ $reason->code }})
-                                </span>
-                            @endforeach
-                        @else
-                            <div class="alert alert-info position-static">No note reasons</div>
-                        @endif
-                        </div>
+                            <?php $emptyNoteICDs = true; ?>
+                                @foreach ($noteICDData as $noteICDKey => $noteICD)
+                                    <?php 
+                                        $emptyICD = true;
+                                        if(!empty($noteICD['reason']) || !empty($noteICD['description'])){
+                                            $emptyNoteICDs = false;
+                                            $emptyICD = false;
+                                        }
+                                    ?>
+                                    @if(!$emptyICD)
+                                        <span class="badge badge-info px-2 mb-1 mr-2">{{$noteICD['description']}} ({{ $noteICD['reason'] }})</span>
+                                    @endif
+                                @endforeach
+                            @if($emptyNoteICDs)
+                                <small class="text-warning">No note reasons</small>
+                            @endif
+                        </div>                        
                     </div>
+                    @if(!empty($note->note_reason_memo))
+                        <div style="padding-left: 60px;">
+                            <small><b>Reason:</b> {{ $note->note_reason_memo }}</small>
+                        </div>
+                    @endif
                 </div>
 
                 @if($pro->pro_type === 'ADMIN')

+ 2 - 2
resources/views/app/patient/note/rm-setup.blade.php

@@ -127,10 +127,10 @@
                 <div>
                     <div class="d-flex align-items-center mb-1">
                         <span class="mr-2">RM Reasons:</span>
-                        @include('app.patient.partials.put-rm-reasons', ['recordType' => 'NOTE', 'record' => $note])
+                        @include('app.patient.partials.put-rm-reasons', ['recordType' => 'CLIENT', 'record' => $patient])
                     </div>
                     <div class="">
-                        @include('app.patient.partials.rm-reasons-display', ['recordType' => 'NOTE', 'record' => $note])
+                        @include('app.patient.partials.rm-reasons-display', ['recordType' => 'CLIENT', 'record' => $patient])
                     </div>
                 </div>
                 {{--<div>

+ 1 - 1
resources/views/app/patient/partials/put-rm-reasons.blade.php

@@ -86,7 +86,7 @@ if($recordType === 'NOTE'){
 			</table>
 		</div>
 		<div class="mb-2">
-			<label class="font-weight-bold mb-1">RM Reason Memo:</label>
+			<label class="font-weight-bold mb-1">{{ $recordType !== 'NOTE' ? 'RM' : '' }} Reason Memo:</label>
 			<input type="text" class="form-control form-control-sm" name="reasonMemo" value="{{ $recordType === 'NOTE' ? $record->note_reason_memo : $record->rm_reason_memo }}">
 		</div>
 		<div>

+ 1 - 15
resources/views/app/patient/partials/rm-reasons-display.blade.php

@@ -21,16 +21,6 @@
 			'description' => $record->rm_reason_icd4description
 		],
 	];
-	if($recordType === 'NOTE'){
-		$displayData['icd_1']['reason'] = $record->note_reason_icd1;
-		$displayData['icd_1']['description'] = $record->note_reason_icd1description;
-		$displayData['icd_2']['reason'] = $record->note_reason_icd2;
-		$displayData['icd_2']['description'] = $record->note_reason_icd2description;
-		$displayData['icd_3']['reason'] = $record->note_reason_icd3;
-		$displayData['icd_3']['description'] = $record->note_reason_icd3description;
-		$displayData['icd_4']['reason'] = $record->note_reason_icd4;
-		$displayData['icd_4']['description'] = $record->note_reason_icd4description;
-	}
 ?>
 <table class="table table-sm table-striped table-bordered mb-0">
 	<tbody>
@@ -47,11 +37,7 @@
 		@endforeach
 		<tr>
 			<td class="text-nowrap">Memo</td>
-			@if($recordType == 'NOTE')
-				<td class="text-muted text-sm">{{ $record->note_reason_memo }}</td>
-			@else
-				<td class="text-muted text-sm">{{ $record->rm_reason_memo }}</td>
-			@endif
+			<td class="text-muted text-sm">{{ $record->rm_reason_memo }}</td>
 		</tr>
 	</tbody>
 </table>

+ 14 - 0
resources/views/app/patient/partials/update-best-time-to-call.blade.php

@@ -0,0 +1,14 @@
+<div moe relative>
+	<a start show><i class="fas fa-edit on-hover-opaque"></i></a>
+	<form url="/api/client/updateBestTimeToCall" class="mcp-theme-1" right>
+		<input type="hidden" name="uid" value="{{$patient->uid}}">
+		<div class="mb-2">
+			<label>Best Time To Call</label>
+			<input type="text" class="form-control form-control-sm" name="bestTimeToCall" value="{{ $patient->best_time_to_call }}" />
+		</div>
+		<div>
+			<button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+			<button cancel class="btn btn-sm btn-default border">Cancel</button>
+		</div>
+	</form>
+</div>

+ 6 - 0
resources/views/layouts/patient-header.blade.php

@@ -593,6 +593,12 @@ $addressParts .= implode(", ", $addressPart2);
             </a>
           </div>
         </li>
+        <li class="mb-1 d-flex align-items-start">
+          <div class="d-inline-flex screen-only">
+            <span class="mr-2"><b>Best Time to Call: </b> <i class="fas fa-clock"></i> {{ $patient->best_time_to_call ?? '-' }}</span>
+            @include('app.patient.partials.update-best-time-to-call')
+          </div>
+        </li>
       </ul>
 
     </div>