|
@@ -97,13 +97,15 @@
|
|
$vitalsSegment = null;
|
|
$vitalsSegment = null;
|
|
$medicationsSegment = null;
|
|
$medicationsSegment = null;
|
|
$ccSegment = null;
|
|
$ccSegment = null;
|
|
- $problemsSegment = null;
|
|
|
|
|
|
+ $problemsIntakeSegment = null;
|
|
|
|
+ $problemsPlanSegment = null;
|
|
$rosSegment = null;
|
|
$rosSegment = null;
|
|
$objectiveFreeTextSegment = null;
|
|
$objectiveFreeTextSegment = null;
|
|
$objectiveImagingSegment = null;
|
|
$objectiveImagingSegment = null;
|
|
$objectiveLabsSegment = null;
|
|
$objectiveLabsSegment = null;
|
|
$objectiveMeasurementsSegment = null;
|
|
$objectiveMeasurementsSegment = null;
|
|
$objectiveOtherInvestigationsSegment = null;
|
|
$objectiveOtherInvestigationsSegment = null;
|
|
|
|
+ $planFreeTextSegment = null;
|
|
|
|
|
|
// find and store handle to specific segments
|
|
// find and store handle to specific segments
|
|
foreach($note->segments as $segment) {
|
|
foreach($note->segments as $segment) {
|
|
@@ -120,8 +122,11 @@
|
|
case 'chief_complaint':
|
|
case 'chief_complaint':
|
|
$ccSegment = $segment;
|
|
$ccSegment = $segment;
|
|
break;
|
|
break;
|
|
|
|
+ case 'intake_problems':
|
|
|
|
+ $problemsIntakeSegment = $segment;
|
|
|
|
+ break;
|
|
case 'plan_problems':
|
|
case 'plan_problems':
|
|
- $problemsSegment = $segment;
|
|
|
|
|
|
+ $problemsPlanSegment = $segment;
|
|
break;
|
|
break;
|
|
case 'ros':
|
|
case 'ros':
|
|
$rosSegment = $segment;
|
|
$rosSegment = $segment;
|
|
@@ -141,6 +146,9 @@
|
|
case 'objective_other_investigations':
|
|
case 'objective_other_investigations':
|
|
$objectiveOtherInvestigationsSegment = $segment;
|
|
$objectiveOtherInvestigationsSegment = $segment;
|
|
break;
|
|
break;
|
|
|
|
+ case 'plan_free_text':
|
|
|
|
+ $planFreeTextSegment = $segment;
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
@@ -206,6 +214,82 @@
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- hpi -->
|
|
|
|
+ <div style="padding: 1rem; padding-bottom: 0;">
|
|
|
|
+ <p><b style="font-size: 18px">History of Present Illness</b></p>
|
|
|
|
+ @if(!$problemsIntakeSegment || empty(trim($problemsIntakeSegment->summary_html)))
|
|
|
|
+ Unavailable
|
|
|
|
+ @else
|
|
|
|
+ <?php $problems = \App\Models\Point::getIntakePointsOfCategory($patient, 'PROBLEM', $note); ?>
|
|
|
|
+ @if(!$problems || !count($problems)))
|
|
|
|
+ Unavailable
|
|
|
|
+ @endif
|
|
|
|
+ @foreach($problems as $problem)
|
|
|
|
+ <?php $childReviews = $problem->childReviews; ?>
|
|
|
|
+ @foreach($childReviews as $childReview)
|
|
|
|
+ @if($childReview->added_in_note_id === $note->id)
|
|
|
|
+ <div style="font-weight:bold;">{{$problem->data->name}}</div>
|
|
|
|
+ <div style="padding-left: 1rem;">
|
|
|
|
+ <?php
|
|
|
|
+ $review = json_decode($childReview->data);
|
|
|
|
+ ?>
|
|
|
|
+ <table style="border: 0; width: 100%; border: 0" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">Explain the problem.</td>
|
|
|
|
+ <td class="ml-2" data-name="problem_explanation"><?= $review && @$review->problem_explanation ? @$review->problem_explanation : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">What happened between today and our last visit?</td>
|
|
|
|
+ <td class="ml-2" data-name="events_between_last_visit_and_this"><?= $review && @$review->events_between_last_visit_and_this ? @$review->events_between_last_visit_and_this : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">How did it go with the plan I gave you?</td>
|
|
|
|
+ <td class="ml-2" data-name="current_plan_status"><?= $review && @$review->current_plan_status ? @$review->current_plan_status : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">What barriers have you felt following the plan?</td>
|
|
|
|
+ <td class="ml-2" data-name="barriers_following_current_plan"><?= $review && @$review->barriers_following_current_plan ? @$review->barriers_following_current_plan : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">How long have you had this?</td>
|
|
|
|
+ <td class="ml-2" data-name="how_long"><?= $review && @$review->how_long ? @$review->how_long : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">When does it get worse?</td>
|
|
|
|
+ <td class="ml-2" data-name="when_worse"><?= $review && @$review->when_worse ? @$review->when_worse : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">When does it get better?</td>
|
|
|
|
+ <td class="ml-2" data-name="when_better"><?= $review && @$review->when_better ? @$review->when_better : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">What have you done for treatment?</td>
|
|
|
|
+ <td class="ml-2" data-name="treatments_done"><?= $review && @$review->treatments_done ? @$review->treatments_done : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">How does it affect your ADLs?</td>
|
|
|
|
+ <td class="ml-2" data-name="how_it_affects_ADLs"><?= $review && @$review->how_it_affects_ADLs ? @$review->how_it_affects_ADLs : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">How do you cope?</td>
|
|
|
|
+ <td class="ml-2" data-name="how_cope"><?= $review && @$review->how_cope ? @$review->how_cope : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="mb-1">
|
|
|
|
+ <td style="width: 50%">How does this affect you emotionally?</td>
|
|
|
|
+ <td class="ml-2" data-name="how_affect_emotionally"><?= $review && @$review->how_affect_emotionally ? @$review->how_affect_emotionally : '-' ?></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <div class="">
|
|
|
|
+ <td style="width: 50%">Memo</td>
|
|
|
|
+ <td class="ml-2" data-name="memo"><?= $review && @$review->memo ? @$review->memo : '-' ?></td>
|
|
|
|
+ </div>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endforeach
|
|
|
|
+ @endforeach
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<!-- ros -->
|
|
<!-- ros -->
|
|
<div style="padding: 1rem; padding-bottom: 0;">
|
|
<div style="padding: 1rem; padding-bottom: 0;">
|
|
<p><b style="font-size: 18px">Review of Systems</b></p>
|
|
<p><b style="font-size: 18px">Review of Systems</b></p>
|
|
@@ -236,6 +320,51 @@
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- icds -->
|
|
|
|
+ <div style="padding: 1rem; padding-bottom: 0;">
|
|
|
|
+ <p><b style="font-size: 18px">ICDs</b></p>
|
|
|
|
+ @if(!count($note->reasons))
|
|
|
|
+ Unavailable
|
|
|
|
+ @else
|
|
|
|
+ @foreach ($note->reasons as $reason)
|
|
|
|
+ <div style="margin-bottom: 0.5rem;">
|
|
|
|
+ {{ $reason->description}} ({{ $reason->code }})
|
|
|
|
+ </div>
|
|
|
|
+ @endforeach
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- plan -->
|
|
|
|
+ <div style="padding: 1rem; padding-bottom: 0;">
|
|
|
|
+ <p><b style="font-size: 18px">Plan</b></p>
|
|
|
|
+ @if(!$problemsPlanSegment || empty(trim($problemsPlanSegment->summary_html)))
|
|
|
|
+
|
|
|
|
+ @else
|
|
|
|
+ <?php $problems = \App\Models\Point::getPlanPointsOfCategory($patient, 'PROBLEM', $note); ?>
|
|
|
|
+ @if(!$problems || !count($problems)))
|
|
|
|
+ Unavailable
|
|
|
|
+ @endif
|
|
|
|
+ @foreach($problems as $problem)
|
|
|
|
+ <?php $childPlans = $problem->childPlans; ?>
|
|
|
|
+ @foreach($childPlans as $childPlan)
|
|
|
|
+ @if($childPlan->added_in_note_id === $note->id)
|
|
|
|
+ <div style="font-weight:bold;">{{$problem->data->name}} {{$problem->data->icd ? ' / ' . $problem->data->icd : ''}}</div>
|
|
|
|
+ <div style="padding-left: 1rem;">
|
|
|
|
+ <?php
|
|
|
|
+ $review = json_decode($childPlan->data);
|
|
|
|
+ ?>
|
|
|
|
+ <p>{!! $review->value !!}</p>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @endforeach
|
|
|
|
+ @endforeach
|
|
|
|
+ @endif
|
|
|
|
+ @if($planFreeTextSegment && !empty(trim($planFreeTextSegment->summary_html)))
|
|
|
|
+ {!! $planFreeTextSegment->summary_html !!}
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|