<?php
$value = [];
$infoLines = json_decode($patient->info_lines);
$infoLines = !$infoLines ? [] : $infoLines;
global $defaultData;
foreach($infoLines as $category => $lines):
    if($category === "dx"):
        foreach ($lines as $line):
            $value[] = '<p><b>' . $line->contentText . '</b> ';
            $value[] = @$line->contentDetail->{"ICD"};
            $value[] = '</p>';
        endforeach;
    endif;
endforeach;
$value = implode("", $value);
$defaultData = [
    "summary" => $value,
    "value" => $value,
];
