Browse Source

Updated ICDs display

Samson Mutunga 3 years ago
parent
commit
37375880a2

+ 2 - 2
resources/views/app/patient/care-month/rm-reasons.blade.php

@@ -2,6 +2,6 @@
     <span class="mr-2">RM Reasons:</span>
     @include('app.patient.partials.put-rm-reasons', ['recordType' => 'CARE_MONTH', 'record' => $careMonth])
 </div>
-<div class="">
-@include('app.patient.partials.rm-reasons-display', ['recordType' => 'CARE_MONTH', 'record' => $careMonth])
+<div class="pl-3">
+    @include('app.patient.partials.rm-reasons-display', ['recordType' => 'CARE_MONTH', 'record' => $careMonth])
 </div>

+ 44 - 39
resources/views/app/patient/partials/rm-reasons-display.blade.php

@@ -1,43 +1,48 @@
 <?php
-	$displayData = [
-		'icd_1' => [
-			'title' => 'ICD 1',
-			'reason' => $record->rm_reason_icd1,
-			'description' => $record->rm_reason_icd1description
-		],
-		'icd_2' => [
-			'title' => 'ICD 2',
-			'reason' => $record->rm_reason_icd2,
-			'description' => $record->rm_reason_icd2description
-		],
-		'icd_3' => [
-			'title' => 'ICD 3',
-			'reason' => $record->rm_reason_icd3,
-			'description' => $record->rm_reason_icd3description
-		],
-		'icd_4' => [
-			'title' => 'ICD 4',
-			'reason' => $record->rm_reason_icd4,
-			'description' => $record->rm_reason_icd4description
-		],
-	];
+$displayData = [
+	'icd_1' => [
+		'title' => 'ICD 1',
+		'reason' => $record->rm_reason_icd1,
+		'description' => $record->rm_reason_icd1description
+	],
+	'icd_2' => [
+		'title' => 'ICD 2',
+		'reason' => $record->rm_reason_icd2,
+		'description' => $record->rm_reason_icd2description
+	],
+	'icd_3' => [
+		'title' => 'ICD 3',
+		'reason' => $record->rm_reason_icd3,
+		'description' => $record->rm_reason_icd3description
+	],
+	'icd_4' => [
+		'title' => 'ICD 4',
+		'reason' => $record->rm_reason_icd4,
+		'description' => $record->rm_reason_icd4description
+	],
+];
 ?>
-<table class="table table-sm table-striped table-bordered mb-0">
-	<tbody>
+<div>
+	<div class="d-flex flex-wrap">
+		<?php $emptyICDs = true; ?>
 		@foreach($displayData as $rmKey=>$rmData)
-		<tr>
-			<td class="text-nowrap">{{ $rmData['title'] }}</td>
-			<td>
-				<div class="d-flex">
-					<span class="font-weight-bold text-sm mr-2" style="min-width: 60px;">{{ $rmData['reason'] ? $rmData['reason']. ':':'' }}</span>
-					<small class="text-muted text-sm">{{ $rmData['description'] }}</small>
-				</div>
-			</td>
-		</tr>
+			<?php
+			$emptyICD = true;
+			if (!empty($rmData['reason']) || !empty($rmData['description'])) {
+				$emptyICDs = false;
+				$emptyICD = false;
+			}
+			?>
+			@if(!$emptyICD)
+				<span class="mb-1 mr-2"><i class="fas fa-star text-warning"></i> {{$rmData['reason']}} @if(!empty($rmData['description']))({{ $rmData['description'] }})@endif</span>
+			@endif
 		@endforeach
-		<tr>
-			<td class="text-nowrap">Memo</td>
-			<td class="text-muted text-sm">{{ $record->rm_reason_memo }}</td>
-		</tr>
-	</tbody>
-</table>
+		@if($emptyICDs)
+		<small class="text-dark">-</small>
+		@endif
+	</div>
+	<div class="d-flex">
+			<span class="mr-2"><b>Memo:</b></span>
+			<small class="text-muted">{{ $record->rm_reason_memo }}</small>
+	</div>
+</div>

+ 43 - 0
resources/views/app/patient/partials/rm-reasons-display_depricated.blade.php

@@ -0,0 +1,43 @@
+<?php
+	$displayData = [
+		'icd_1' => [
+			'title' => 'ICD 1',
+			'reason' => $record->rm_reason_icd1,
+			'description' => $record->rm_reason_icd1description
+		],
+		'icd_2' => [
+			'title' => 'ICD 2',
+			'reason' => $record->rm_reason_icd2,
+			'description' => $record->rm_reason_icd2description
+		],
+		'icd_3' => [
+			'title' => 'ICD 3',
+			'reason' => $record->rm_reason_icd3,
+			'description' => $record->rm_reason_icd3description
+		],
+		'icd_4' => [
+			'title' => 'ICD 4',
+			'reason' => $record->rm_reason_icd4,
+			'description' => $record->rm_reason_icd4description
+		],
+	];
+?>
+<table class="table table-sm table-striped table-bordered mb-0">
+	<tbody>
+		@foreach($displayData as $rmKey=>$rmData)
+		<tr>
+			<td class="text-nowrap">{{ $rmData['title'] }}</td>
+			<td>
+				<div class="d-flex">
+					<span class="font-weight-bold text-sm mr-2" style="min-width: 60px;">{{ $rmData['reason'] ? $rmData['reason']. ':':'' }}</span>
+					<small class="text-muted text-sm">{{ $rmData['description'] }}</small>
+				</div>
+			</td>
+		</tr>
+		@endforeach
+		<tr>
+			<td class="text-nowrap">Memo</td>
+			<td class="text-muted text-sm">{{ $record->rm_reason_memo }}</td>
+		</tr>
+	</tbody>
+</table>

+ 10 - 6
resources/views/app/patient/partials/rm-setup.blade.php

@@ -104,13 +104,17 @@
                 </div>
             </div>
         </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' => 'CLIENT', 'record' => $patient])
-        </div>
-        <div class="pl-3" style="max-width: 570px;">
-            @include('app.patient.partials.rm-reasons-display', ['recordType' => 'CLIENT', 'record' => $patient])
+
+        <div class="d-flex align-items-start flex-column mb-1">
+            <div class="mr-2 width-200px">
+                <span class="mr-2">RM Reasons:</span>
+                @include('app.patient.partials.put-rm-reasons', ['recordType' => 'CLIENT', 'record' => $patient])
+            </div>
+            <div class="pl-3">
+                @include('app.patient.partials.rm-reasons-display', ['recordType' => 'CLIENT', 'record' => $patient])
+            </div>
         </div>
+        
         {{--<div class="d-flex align-items-baseline mb-3">
             <span class="width-200px">RM Reasons:</span>
             <div class="ml-3">