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