//--------------------------- // volunteer associations //--------------------------- if (count($patient->volClient) == 0) { echoT($clsRpt->writeCell('- none -', $lVolWidth, 'text-align: center;')); } else { $strVols = '<ul style="list-style-position: inside; list-style-type: square; display:inline; margin-left: 0pt; padding-left: 0pt;">'; foreach ($patient->volClient as $vc) { $strVols .= '<li>' . htmlspecialchars($vc->vol->strLName . ', ' . $vc->vol->strFName) . ' ' . strLinkAdd_HospicePVist($vc->lVolID, $vc->lPatientID, 'Add visit', false, ' id="apv_' . $vc->lVolID . '_' . $vc->lPatientID . ' " ') . '</li>'; } echoT($clsRpt->writeCell($strVols . '</ul>', $lVolWidth, '')); } //--------------------------- // patient contacts //--------------------------- $strLinkAddNewPC = strLinkAdd_PatientContact($lPatientID, 'Add patient contact', true, ' id="newPCon_' . $lPatientID . '" ') . ' ' . strLinkAdd_PatientContact($lPatientID, 'Add patient contact', false); if (count($patient->pContacts) == 0) { echoT($clsRpt->writeCell('<span style="text-align: center; margin-left: 40pt;">- none -</span><br>' . $strLinkAddNewPC, '200pt;', '')); } else { $strPC = ''; foreach ($patient->pContacts[0]->contacts as $pc) { $lPConID = $pc->lContactID; $strPC .= trim(htmlspecialchars($pc->strPConTitle . ' ' . $pc->strFName . ' ' . $pc->strLName . ' (' . $pc->strRelationship . ')')) . strLinkView_PContact($lPConID, 'View patient contact record', true, ' id="viewPCon_' . $lPConID . '" ') . '<br>'; } echoT($clsRpt->writeCell($strPC . '<br>' . $strLinkAddNewPC, '200', '')); } echoT($clsRpt->closeRow()); ++$lRowIDX; } echoT($clsRpt->closeReport());
function showPatientContacts($attributes, $clsRpt, $patient, $lPatientID, $lNumPCons, $pCons) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes->bCloseDiv = false; $attributes->divID = 'pCons'; $attributes->divImageID = 'pConsDivImg'; openBlock('Patient Contacts', strLinkAdd_PatientContact($lPatientID, 'Add contact', true) . ' ' . strLinkAdd_PatientContact($lPatientID, 'Add contact', false), $attributes); if ($lNumPCons == 0) { echoT('<i>There are no contacts for this patient.</i><br>'); } else { echoT(' <table class="enpRpt"> <tr> <td class="enpRptLabel"> contactID </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel"> Relationship </td> <td class="enpRptLabel"> Address </td> <td class="enpRptLabel"> Contact </td> </tr>'); foreach ($pCons as $pCon) { $lPCID = $pCon->lContactID; echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . str_pad($lPCID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_PContact($lPCID, 'View contact record', true) . ' </td> <td class="enpRpt">' . htmlspecialchars($pCon->strLName . ', ' . $pCon->strFName) . ' </td> <td class="enpRpt">' . htmlspecialchars($pCon->strRelationship) . ' </td> <td class="enpRpt">' . $pCon->strAddress . ' </td> <td class="enpRpt"> <table style="width: 100%;"> <tr><td style="width: 40pt; height: 7pt; padding-top: 0px;padding-bottom: 0px;"><b>phone: </b></td><td>' . htmlspecialchars($pCon->strPhone) . '</td></tr> <tr><td style="width: 40pt; height: 7pt; padding-top: 0px;padding-bottom: 0px;"><b>cell: </b></td><td>' . htmlspecialchars($pCon->strCell) . '</td></tr> <tr><td style="width: 40pt; height: 7pt; padding-top: 0px;padding-bottom: 0px;"><b>email: </b></td><td>' . htmlspecialchars($pCon->strEmail) . '</td></tr> </table> </td> </tr>'); } echoT('</table>'); } $attributes->bCloseDiv = true; closeBlock($attributes); }