Browse Source

Re-styled on-intake segments

Samson Mutunga 3 years ago
parent
commit
4b0d53a823

+ 41 - 45
resources/views/app/patient/segment-templates/intake_allergies/summary.blade.php

@@ -22,55 +22,51 @@ $plural = 'Allergies';
     <div class="text-secondary">-</div>
 <?php else: ?>
 <table class="table table-bordered table-xs table-cage mb-0">
-    <?php foreach ($points as $point): ?>
+    <?php $j = 0; foreach ($points as $point): $j++; ?>
 	<?php $rel = $point->relevanceToNote($note); ?>
         <tr>
-		<td class="fit px-2">
-			<div class="font-weight-bold <?= $point->is_removed ? 'strike-through' : '' ?>">
-                	    <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
-                	</div>
-		</td>
-		<td class="fit px-2">
-        <div class="">
-            <?php $review = $point->childReviewAddedInNote($note); ?>
-            <?php if(!!$review): ?>
-                    <span>{!! $review->data->value !!}</span>
-            <?php elseif($rel): ?>
-                <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
-            <?php endif; ?>
-        </div>		
-		</td>
-		<td class="fit px-2">
-			<?php if ($point->is_removed): ?>
-                    @if($point->removal_reason_category === 'DURING_VISIT')
-                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
-                    @elseif($point->removal_reason_category === 'ON_INTAKE')
-                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
-                    @endif
-                <?php elseif ($point->added_in_note_id === $note->id): ?>
-                    <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
-                        <span class="ml-2 text-sm text-success">* Diagnosed during visit</span>
-                    <?php else: ?>
-                        <span class="ml-2 text-sm text-info">* Added on intake</span>
-                    <?php endif;?>
-                <?php endif; ?>
-		</td>
-		<td class="px-2">
-			@if($rel)
-                            <span class="text-info mr-1">
-                                <i class="fa fa-star"></i>
-                            </span>
-                            <?php $numRelevant++; ?>
-                        @endif
-		</td>
+            <td class="fit px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+                @if($rel)
+                    <?php $numRelevant++; ?>
+                    {{ $j }}.*
+                @else
+                    {{ $j }}.
+                @endif
+            </td>
+            <td class="px-2" style="max-width: 300px;">
+                <div class="font-weight-bold <?= $point->is_removed ? 'strike-through' : '' ?>">
+                    <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+                    
+                </div>
+		    </td>
+            <td class="px-2" style="max-width: 300px;">
+                <div class="">
+                    <?php $review = $point->childReviewAddedInNote($note); ?>
+                    <?php if(!!$review): ?>
+                            <span>{!! $review->data->value !!}</span>
+                    <?php elseif($rel): ?>
+                        <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
+                    <?php endif; ?>
+                </div>	
+                <div>
+                    <?php if ($point->is_removed): ?>
+                            @if($point->removal_reason_category === 'DURING_VISIT')
+                                <span class="text-sm text-secondary">Removed during visit</span>
+                            @elseif($point->removal_reason_category === 'ON_INTAKE')
+                                <span class="text-sm text-secondary">Removed on intake</span>
+                            @endif
+                        <?php elseif ($point->added_in_note_id === $note->id): ?>
+                            <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                                <span class="text-sm text-success">* Diagnosed during visit</span>
+                            <?php else: ?>
+                                <span class="text-sm text-info">* Added on intake</span>
+                            <?php endif;?>
+                        <?php endif; ?>
+                </div>	
+
+            </td>
         </tr>
     <?php endforeach; ?>
 </table>
-    @if($numRelevant)
-        <div class="d-flex align-items-baseline text-info mr-1 mt-3">
-            <span class="text-sm mr-1"><i class="fa fa-star text-sm"></i></span>
-            <span class="text-sm">{{$plural}} relevant to this note</span>
-        </div>
-    @endif
 <?php endif; ?>
 <?php endif; ?>

+ 46 - 43
resources/views/app/patient/segment-templates/intake_care_team/summary.blade.php

@@ -12,53 +12,56 @@ $plural = 'Care team members';
 <?php if (!count($points)): ?>
     <div class="text-secondary">-</div>
 <?php else: ?>
-    <?php foreach ($points as $point): ?>
+    <table class="table table-bordered table-xs table-cage mb-0">
+    <?php $j = 0; foreach ($points as $point): $j++; ?>
         <?php $rel = $point->relevanceToNote($note); ?>
-        <div class="mb-2">
-            <div class="d-flex align-items-baseline">
+        <tr>
+            <td class="fit px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
                 @if($rel)
-                    <span class="text-info mr-1">
-                        <i class="fa fa-star"></i>
-                    </span>
                     <?php $numRelevant++; ?>
+                    {{ $j }}.*
+                @else
+                    {{ $j }}.
                 @endif
-                    <div class="<?= $point->is_removed ? 'strike-through' : '' ?>">
-                        <b><?= !!@($point->data->name) ? @($point->data->name) : '-' ?></b>
-                        <?= !!@($point->data->specialty) ? '/&nbsp;' . @($point->data->specialty) . '' : '' ?>
-                        <?= !!@($point->data->organization) ? '/&nbsp;' . @($point->data->organization) . '' : '' ?><br>
-                        <?= !!@($point->data->phone) ? 'Ph: ' . @($point->data->phone) . '' : '' ?>
-                        <?= !!@($point->data->fax) ? '&nbsp;/&nbsp;Fax: ' . @($point->data->fax) . '<br>' : '' ?>
-                        <?= !!@($point->data->date) ? '&nbsp;/&nbsp;Date: ' . @($point->data->date) : '' ?>
-                    </div>
-                <?php if ($point->is_removed): ?>
-                    @if($point->removal_reason_category === 'DURING_VISIT')
-                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
-                    @elseif($point->removal_reason_category === 'ON_INTAKE')
-                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
-                    @endif
-                <?php elseif ($point->added_in_note_id === $note->id): ?>
-                    <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
-                        <span class="ml-2 text-sm text-success">* Added during visit</span>
-                    <?php else: ?>
-                        <span class="ml-2 text-sm text-info">* Added on intake</span>
-                    <?php endif;?>
-                <?php endif; ?>
-            </div>
-            <?php $review = $point->childReviewAddedInNote($note); ?>
-            <?php if(!!$review): ?>
-                <div class="pl-3 mt-1 d-flex align-items-baseline">
-                    <span class="text-secondary font-weight-bold mr-2">Subjective:</span>
-                    <span>{!! $review->data->value !!}</span>
+            </td>
+            <td class="px-2" style="max-width: 300px;">
+                <div class="<?= $point->is_removed ? 'strike-through' : '' ?>">
+                    <b><?= !!@($point->data->name) ? @($point->data->name) : '-' ?></b>
+                    <?= !!@($point->data->specialty) ? '/&nbsp;' . @($point->data->specialty) . '' : '' ?>
+                    <?= !!@($point->data->organization) ? '/&nbsp;' . @($point->data->organization) . '' : '' ?><br>
+                    <?= !!@($point->data->phone) ? 'Ph: ' . @($point->data->phone) . '' : '' ?>
+                    <?= !!@($point->data->fax) ? '&nbsp;/&nbsp;Fax: ' . @($point->data->fax) . '<br>' : '' ?>
+                    <?= !!@($point->data->date) ? '&nbsp;/&nbsp;Date: ' . @($point->data->date) : '' ?>
                 </div>
-            <?php elseif($rel): ?>
-                <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
-            <?php endif; ?>
-        </div>
+            </td>
+            <td class="px-2" style="max-width:300px;">
+                <div>
+                    <?php $review = $point->childReviewAddedInNote($note); ?>
+                    <?php if(!!$review): ?>
+                        <div class="pl-3 mt-1 d-flex align-items-baseline">
+                            <span>{!! $review->data->value !!}</span>
+                        </div>
+                    <?php elseif($rel): ?>
+                        <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
+                    <?php endif; ?>
+                </div>
+                <div class="d-flex align-items-baseline">
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
+                    <?php elseif ($point->added_in_note_id === $note->id): ?>
+                        <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                            <span class="ml-2 text-sm text-success">* Added during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+        </tr>
     <?php endforeach; ?>
-    @if($numRelevant)
-        <div class="d-flex align-items-baseline text-info mr-1 mt-3">
-            <span class="text-sm mr-1"><i class="fa fa-star text-sm"></i></span>
-            <span class="text-sm">{{$plural}} relevant to this note</span>
-        </div>
-    @endif
+    </table>
 <?php endif; ?>

+ 38 - 35
resources/views/app/patient/segment-templates/intake_goals/summary.blade.php

@@ -12,48 +12,51 @@ $plural = 'Goals';
 <?php if (!count($points)): ?>
     <div class="text-secondary">-</div>
 <?php else: ?>
-    <?php foreach ($points as $point): ?>
+    <table class="table table-bordered table-xs table-cage mb-0">
+    <?php $j = 0; foreach ($points as $point): $j++; ?>
         <?php $rel = $point->relevanceToNote($note); ?>
-        <div class="mb-2">
-            <div class="d-flex align-items-baseline">
+        <tr>
+            <td class="fit px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
                 @if($rel)
-                    <span class="text-info mr-1">
-                        <i class="fa fa-star"></i>
-                    </span>
                     <?php $numRelevant++; ?>
+                    {{ $j }}.*
+                @else
+                    {{ $j }}.
                 @endif
+            </td>
+            <td class="px-2" style="max-width: 300px;">
                 <div class="<?= $point->is_removed ? 'strike-through' : '' ?>">
                     <b><?= !!@($point->data->goal) ? @($point->data->goal) : '-' ?></b>
                 </div>
-                <?php if ($point->is_removed): ?>
-                    @if($point->removal_reason_category === 'DURING_VISIT')
-                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
-                    @elseif($point->removal_reason_category === 'ON_INTAKE')
-                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
-                    @endif
-                <?php elseif ($point->added_in_note_id === $note->id): ?>
-                    <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
-                        <span class="ml-2 text-sm text-success">* Prescribed during visit</span>
-                    <?php else: ?>
-                        <span class="ml-2 text-sm text-info">* Added on intake</span>
-                    <?php endif;?>
-                <?php endif; ?>
-            </div>
-            <?php $review = $point->childReviewAddedInNote($note); ?>
-            <?php if(!!$review): ?>
-                <div class="pl-3 mt-1 d-flex align-items-baseline">
-                    <span class="text-secondary font-weight-bold mr-2">Subjective:</span>
-                    <span>{!! $review->data->value !!}</span>
+            </td>
+            <td class="px-2" style="max-width:300px;">
+                <div>
+                    <?php $review = $point->childReviewAddedInNote($note); ?>
+                    <?php if(!!$review): ?>
+                        <div class="pl-3 mt-1 d-flex align-items-baseline">
+                            <span>{!! $review->data->value !!}</span>
+                        </div>
+                    <?php elseif($rel): ?>
+                        <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
+                    <?php endif; ?>
                 </div>
-            <?php elseif($rel): ?>
-                <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
-            <?php endif; ?>
-        </div>
+                <div class="d-flex align-items-baseline">                
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
+                    <?php elseif ($point->added_in_note_id === $note->id): ?>
+                        <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                            <span class="ml-2 text-sm text-success">* Prescribed during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+        </tr>
     <?php endforeach; ?>
-    @if($numRelevant)
-        <div class="d-flex align-items-baseline text-info mr-1 mt-3">
-            <span class="text-sm mr-1"><i class="fa fa-star text-sm"></i></span>
-            <span class="text-sm">{{$plural}} relevant to this note</span>
-        </div>
-    @endif
+    </table>
 <?php endif; ?>

+ 37 - 44
resources/views/app/patient/segment-templates/intake_medications/summary.blade.php

@@ -21,52 +21,45 @@ $plural = 'Medications';
     <?php $j = 0; foreach ($points as $point): $j++; ?>
         <?php $rel = $point->relevanceToNote($note); ?>
 	<tr>
-		<td class="fit px-2">
-			{{ $j }}.
+		<td class="fit px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
+			@if($rel)
+				<?php $numRelevant++; ?>
+				{{ $j }}.*
+			@else
+				{{ $j }}.
+			@endif
 		</td>
-		<td class="fit px-2">
-                	<div class="font-weight-bold <?= $point->is_removed ? 'strike-through' : '' ?>">
-                	    <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
-                	</div>
+		<td class="px-2" style="max-width: 300px;">
+			<div class="font-weight-bold <?= $point->is_removed ? 'strike-through' : '' ?>">
+				<?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
+			</div>
 		</td>
-		<td class="fit px-2">
-        <div class="">
-            <?php $review = $point->childReviewAddedInNote($note); ?>
-            <?php if(!!$review): ?>
-                <div class="d-flex align-items-baseline">
-                    <span>{!! $review->data->value !!}</span>
-                </div>
-            <?php elseif(false && $rel): ?>
-                <div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
-            <?php endif; ?>
-        </div>
-		</td>
-		<td class="fit px-2">
-            		<div class="d-flex align-items-baseline">
-                		<?php if ($point->is_removed): ?>
-                    		@if($point->removal_reason_category === 'DURING_VISIT')
-                    		    <span class="ml-2 text-sm text-secondary">Removed during visit</span>
-                    		@elseif($point->removal_reason_category === 'ON_INTAKE')
-                    		    <span class="ml-2 text-sm text-secondary">Removed on intake</span>
-                    		@endif
-                		<?php elseif ($point->added_in_note_id === $note->id): ?>
-                    		<?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
-                    		    <span class="ml-2 text-sm text-success">* Prescribed during visit</span>
-                    		<?php else: ?>
-                    		    <span class="ml-2 text-sm text-info">* Added on intake</span>
-                    		<?php endif;?>
-                		<?php endif; ?>
-            		</div>
-		</td>
-		<td class="fit px-2" style="border-right: 0px">
-                	@if($rel)
-                	    <span class="text-info mr-1">
-                	        <i class="fa fa-star"></i>
-                	    </span>
-                	    <?php $numRelevant++; ?>
-                	@endif
-		</td>
-		<td class="end" style="border: 0px">
+		<td class="px-2" style="max-width:300px;">
+			<div class="">
+				<?php $review = $point->childReviewAddedInNote($note); ?>
+				<?php if(!!$review): ?>
+					<div class="d-flex align-items-baseline">
+						<span>{!! $review->data->value !!}</span>
+					</div>
+				<?php elseif(false && $rel): ?>
+					<div class="relevant-without-review text-warning-mellow mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>Subjective missing</div>
+				<?php endif; ?>
+			</div>
+			<div class="d-flex align-items-baseline">
+				<?php if ($point->is_removed): ?>
+					@if($point->removal_reason_category === 'DURING_VISIT')
+						<span class="text-sm text-secondary">Removed during visit</span>
+					@elseif($point->removal_reason_category === 'ON_INTAKE')
+						<span class="text-sm text-secondary">Removed on intake</span>
+					@endif
+				<?php elseif ($point->added_in_note_id === $note->id): ?>
+					<?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+						<span class="text-sm text-success">* Prescribed during visit</span>
+					<?php else: ?>
+						<span class="text-sm text-info">* Added on intake</span>
+					<?php endif;?>
+				<?php endif; ?>
+			</div>
 		</td>
 	</tr>
     <?php endforeach; ?>

+ 40 - 37
resources/views/app/patient/segment-templates/intake_problems/summary.blade.php

@@ -12,49 +12,52 @@ $plural = 'Problems';
 <?php if (!count($points)): ?>
     <div class="text-secondary">-</div>
 <?php else: ?>
-    <?php foreach ($points as $point): ?>
+    <table class="table table-bordered table-xs table-cage mb-0">
+    <?php $j = 0; foreach ($points as $point): $j++; ?>
         <?php $rel = $point->relevanceToNote($note); ?>
-        <div class="mb-2">
-            <div class="d-flex align-items-baseline">
+       <tr>
+            <td class="fit px-2 {{ $rel ? 'font-weight-bold text-info':'' }}">
                 @if($rel)
-                    <span class="text-info mr-1">
-                        <i class="fa fa-star"></i>
-                    </span>
                     <?php $numRelevant++; ?>
+                    {{ $j }}.*
+                @else
+                    {{ $j }}.
                 @endif
-                <div class="<?= $point->is_removed ? 'strike-through' : '' ?>">
-                    <b><?= !!@($point->data->name) ? @($point->data->name) : '-' ?></b>
+            </td>
+            <td class="px-2" style="max-width: 300px;">
+                <div class="font-weight-bold <?= $point->is_removed ? 'strike-through' : '' ?>">
+                    <?= !!@($point->data->name) ? @($point->data->name) : '-' ?>
                 </div>
-                <?php if ($point->is_removed): ?>
-                    @if($point->removal_reason_category === 'DURING_VISIT')
-                        <span class="ml-2 text-sm text-secondary">Removed during visit</span>
-                    @elseif($point->removal_reason_category === 'ON_INTAKE')
-                        <span class="ml-2 text-sm text-secondary">Removed on intake</span>
-                    @endif
-                <?php elseif ($point->added_in_note_id === $note->id): ?>
-                    <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
-                        <span class="ml-2 text-sm text-success">* Diagnosed during visit</span>
-                    <?php else: ?>
-                        <span class="ml-2 text-sm text-info">* Added on intake</span>
-                    <?php endif;?>
-                <?php endif; ?>
-            </div>
-            <?php $review = $point->childReviewAddedInNote($note); ?>
-            <?php if(!!$review): ?>
-                <div class="pl-3 mt-1 d-flex align-items-baseline">
-                    <span class="text-secondary font-weight-bold mr-2">HPI:</span>
-                    <span>{!! $review->data->value !!}</span>
+            </td>
+            <td class="px-2" style="max-width:300px;">
+                <div>
+                    <?php $review = $point->childReviewAddedInNote($note); ?>
+                    <?php if(!!$review): ?>
+                        <div class="pl-3 mt-1 d-flex align-items-baseline">
+                            <span>{!! $review->data->value !!}</span>
+                        </div>
+                    <?php elseif($rel): ?>
+                        <div class="relevant-without-review-critical text-danger mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>HPI missing</div>
+                    <?php endif; ?>
                 </div>
-            <?php elseif($rel): ?>
-                <div class="relevant-without-review-critical text-danger mt-1 text-sm" data-target-segment="<?= $segment->segmentTemplate->internal_name ?>"><i class="fa fa-exclamation-triangle mr-1"></i>HPI missing</div>
-            <?php endif; ?>
-        </div>
+                <div class="d-flex align-items-baseline">
+                    <?php if ($point->is_removed): ?>
+                        @if($point->removal_reason_category === 'DURING_VISIT')
+                            <span class="ml-2 text-sm text-secondary">Removed during visit</span>
+                        @elseif($point->removal_reason_category === 'ON_INTAKE')
+                            <span class="ml-2 text-sm text-secondary">Removed on intake</span>
+                        @endif
+                    <?php elseif ($point->added_in_note_id === $note->id): ?>
+                        <?php if ($point->addition_reason_category === 'DURING_VISIT'): ?>
+                            <span class="ml-2 text-sm text-success">* Diagnosed during visit</span>
+                        <?php else: ?>
+                            <span class="ml-2 text-sm text-info">* Added on intake</span>
+                        <?php endif;?>
+                    <?php endif; ?>
+                </div>
+            </td>
+        </tr>
     <?php endforeach; ?>
-    @if($numRelevant)
-        <div class="d-flex align-items-baseline text-info mr-1 mt-3">
-            <span class="text-sm mr-1"><i class="fa fa-star text-sm"></i></span>
-            <span class="text-sm">{{$plural}} relevant to this note</span>
-        </div>
-    @endif
+    </table>
 <?php endif; ?>