$xml_array['Patient']['allergylist']['status'] = 1;
     $xml_array['Patient']['allergylist']['reason'] = 'No Allergy data found';
 }
 $list_data_d = getListByType($p_id, 'dental');
 if ($list_data_d) {
     $xml_array['Patient']['dentallist']['status'] = 0;
     foreach ($list_data_d as $key => $list_data1_d) {
         $xml_array['Patient']['dentallist']['dental-' . $key] = $list_data1_d;
         $diagnosis_title = getDrugTitle($list_data1_d['diagnosis'], $db);
         $xml_array['Patient']['dentallist']['dental-' . $key]['diagnosis_title'] = $diagnosis_title;
     }
 } else {
     $xml_array['Patient']['dentallist']['status'] = 1;
     $xml_array['Patient']['dentallist']['reason'] = 'No Dental data found';
 }
 $list_data_s = getListByType($p_id, 'surgery');
 if ($list_data_s) {
     $xml_array['Patient']['surgerylist']['status'] = 0;
     foreach ($list_data_s as $key => $list_data1_s) {
         $xml_array['Patient']['surgerylist']['surgery-' . $key] = $list_data1_s;
         $diagnosis_title = getDrugTitle($list_data1_s['diagnosis'], $db);
         $xml_array['Patient']['surgerylist']['surgery-' . $key]['diagnosis_title'] = $diagnosis_title;
     }
 } else {
     $xml_array['Patient']['surgerylist']['status'] = 1;
     $xml_array['Patient']['surgerylist']['reason'] = 'No surgery data found';
 }
 $patient_data = getPatientNotes($p_id);
 if ($patient_data) {
     $xml_array['Patient']['notelist']['status'] = 0;
     foreach ($patient_data as $key => $patient_data_a) {
Example #2
0
    <tr>
      <td class="fibody3" id="bordR"><textarea name="pl_reactions" rows="6" wrap="VIRTUAL" class="fullin2" id="pl_reactions"><?php 
$allergies = '';
$checked = 'checked';
if ($result = getListByType($pid, "allergy", "id,title,comments,activity,date", 1, "all", 0)) {
    foreach ($result as $iter) {
        $al_tmp[] = $iter["title"] . ' (' . $iter["comments"] . ') ';
        $checked = '';
    }
    $allergies = join(',', $al_tmp);
}
echo $allergies;
?>
</textarea></td>
      <td class="fibody3"><textarea name="pl_medications" rows="6" wrap="VIRTUAL" class="fullin2" id="pl_medications"><?php 
if ($result = getListByType($pid, "medication", "id,title,comments,activity,date", 1, "all", 0)) {
    foreach ($result as $iter) {
        $tmp_med[] = $iter["title"] . ' (' . $iter["comments"] . ') ';
    }
    echo join(', ', $tmp_med);
}
?>
</textarea></td>
    </tr>
  </table>
</div>
<p>&nbsp;</p>
<div style="border: solid 2px black; background-color:#FFFFFF;">
  <table width="100%"  border="0" cellspacing="0" cellpadding="2">
    <tr>
      <td width="20" align="left" valign="bottom" class="ficaption2" id="bordR">No</td>
Example #3
0
                 $rowValue = xmlsafestring($fieldValue);
                 $xml_string .= "<{$fieldName}>{$rowValue}</{$fieldName}>\n";
             }
             $xml_string .= "</listitem>\n";
         }
     } else {
         $xml_string .= "<status>-1</status>\n";
         $xml_string .= "<reason>Cound not find results</reason>\n";
     }
 } else {
     // for all types
     $list_medical_problem = getListByType($pid, 'medical_problem', $cols = "*", $active = "all", $limit = "all", $offset = "0");
     $list_allergy = getListByType($pid, 'allergy', $cols = "*", $active = "all", $limit = "all", $offset = "0");
     $list_medication = getListByType($pid, 'medication', $cols = "*", $active = "all", $limit = "all", $offset = "0");
     $list_surgery = getListByType($pid, 'surgery', $cols = "*", $active = "all", $limit = "all", $offset = "0");
     $list_dental = getListByType($pid, 'dental', $cols = "*", $active = "all", $limit = "all", $offset = "0");
     $all_lists = array('medical_problem' => $list_medical_problem, 'allergy' => $list_allergy, 'medication' => $list_medication, 'surgery' => $list_surgery, 'dental' => $list_dental);
     if ($list_medical_problem || $list_allergy || $list_medication || $list_surgery || $list_dental) {
         $xml_string .= "<status>0</status>\n";
         $xml_string .= "<reason>The Patient Record has been fetched</reason>\n";
         foreach ($all_lists as $listtype => $list) {
             for ($i = 0; $i < count($list); $i++) {
                 if ($visit_id || $list[$i]['encounter'] != $visit_id) {
                     continue;
                 }
                 $xml_string .= "<listitem>\n";
                 foreach ($list[$i] as $fieldName => $fieldValue) {
                     $rowValue = xmlsafestring($fieldValue);
                     $xml_string .= "<{$fieldName}>{$rowValue}</{$fieldName}>\n";
                 }
                 $xml_string .= "</listitem>\n";