|
@@ -869,15 +869,15 @@
|
|
|
@endif
|
|
|
</div>
|
|
|
<div class="bg-light border p-2">
|
|
|
- @php
|
|
|
- function displayNode($_key, $_node) {
|
|
|
+ <?php
|
|
|
+ function displayNode($_key, $_node, $_pro, $_patient) {
|
|
|
$keyDisplay = ucwords(str_replace("_", " ", $_key));
|
|
|
$nodeOutput = '<div class="mb-1">' . $keyDisplay . ': ';
|
|
|
$nodeType = gettype($_node);
|
|
|
if(is_array($_node) && count($_node)) {
|
|
|
$nodeOutput .= '<div class="border-left pl-3 my-1">';
|
|
|
foreach ($_node as $k => $v) {
|
|
|
- $nodeOutput .= displayNode($k, $v);
|
|
|
+ $nodeOutput .= displayNode($k, $v, $_pro, $_patient);
|
|
|
}
|
|
|
$nodeOutput .= '</div>';
|
|
|
}
|
|
@@ -886,7 +886,10 @@
|
|
|
$nodeOutput .= '<b>' . (!empty($_node) ? $_node : '-') . '</b>';
|
|
|
}
|
|
|
else {
|
|
|
- $nodeOutput .= '<b class="c-pointer text-primary show-on-click" data-value="' . (!empty($_node) ? $_node : '-') . '">Click to view</b>';
|
|
|
+ $nodeOutput .= '<b class="c-pointer text-primary show-on-click" ' .
|
|
|
+ 'data-pro-uid="' . $_pro->uid . '" ' .
|
|
|
+ 'data-event="View MCN of patient ' . $_patient->displayName() . '"' .
|
|
|
+ 'data-value="' . (!empty($_node) ? $_node : '-') . '">Click to view</b>';
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
@@ -898,9 +901,9 @@
|
|
|
$mcnResponse = !empty($patient->mcn_response_detail) ? json_decode($patient->mcn_response_detail, true) : [];
|
|
|
$output = [];
|
|
|
foreach ($mcnResponse as $k => $v) {
|
|
|
- $output[] = displayNode($k, $v);
|
|
|
+ $output[] = displayNode($k, $v, $pro, $patient);
|
|
|
}
|
|
|
- @endphp
|
|
|
+ ?>
|
|
|
{!! implode("", $output) !!}
|
|
|
</div>
|
|
|
</div>
|