PageRenderTime 56ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/registration_admission/gui_bridge/default/gui_patient_encounter_showdata_options.php

https://github.com/timschofield/2.8
PHP | 240 lines | 195 code | 22 blank | 23 comment | 22 complexity | 4b58f4d8dc6491a1530ab0b843f3e620 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-2.0
  1. <script language="javascript" >
  2. <!--
  3. function openDRGComposite(){
  4. <?php if($cfg['dhtml'])
  5. echo '
  6. w=window.parent.screen.width;
  7. h=window.parent.screen.height;';
  8. else
  9. echo '
  10. w=800;
  11. h=650;';
  12. ?>
  13. drgcomp_<?php echo $_SESSION['sess_full_en']."_".$op_nr."_".$dept_nr."_".$saal ?>=window.open("<?php echo $root_path ?>modules/drg/drg-composite-start.php<?php echo URL_REDIRECT_APPEND."&display=composite&pn=".$_SESSION['sess_full_en']."&edit=$edit&is_discharged=$is_discharged&ln=$name_last&fn=$name_first&bd=$date_birth&dept_nr=$dept_nr&oprm=$saal"; ?>","drgcomp_<?php echo $encounter_nr."_".$op_nr."_".$dept_nr."_".$saal ?>","menubar=no,resizable=yes,scrollbars=yes, width=" + (w-15) + ", height=" + (h-60));
  14. window.drgcomp_<?php echo $_SESSION['sess_full_en']."_".$op_nr."_".$dept_nr."_".$saal ?>.moveTo(0,0);
  15. }
  16. function getinfo(pn){
  17. <?php /* if($edit)*/
  18. { echo '
  19. urlholder="'.$root_path.'modules/nursing/nursing-ward-patientdata.php'.URL_REDIRECT_APPEND;
  20. echo '&pn=" + pn + "';
  21. echo "&pday=$pday&pmonth=$pmonth&pyear=$pyear&edit=$edit&station=$station";
  22. echo '";';
  23. echo '
  24. patientwin=window.open(urlholder,pn,"width=700,height=600,menubar=no,resizable=yes,scrollbars=yes");
  25. ';
  26. }
  27. /*else echo '
  28. window.location.href=\'nursing-ward-pass.php'.URL_APPEND.'&rt=pflege&edit=1&station='.$station.'\'';*/
  29. ?>
  30. }
  31. function cancelEnc(){
  32. if(confirm("<?php echo $LDSureToCancel ?>")){
  33. usr=prompt("<?php echo $LDPlsEnterFullName ?>","");
  34. if(usr&&usr!=""){
  35. pw=prompt("Please enter your password.","");
  36. if(pw&&pw!=""){
  37. window.location.href="admission_cancel.php<?php echo URL_REDIRECT_APPEND ?>&mode=cancel&encounter_nr=<?php echo $_SESSION['sess_en'] ?>&cby="+usr+"&pw="+pw;
  38. }
  39. }
  40. }
  41. }
  42. //-->
  43. </script>
  44. <?php
  45. # Let us detect if data entry is allowed
  46. //echo $enc_status['is_disharged'].'<p>'. $enc_status['encounter_status'].'<p>d= '. $enc_status['in_dept'].'<p>w= '. $enc_status['in_ward'];
  47. /* if($enc_status['is_disharged']){
  48. if(stristr('cancelled',$enc_status['encounter_status'])){
  49. $data_entry=false;
  50. }
  51. }elseif(!$enc_status['encounter_status']||stristr('cancelled',$enc_status['encounter_status'])){
  52. if(!$enc_status['in_ward']&&!$enc_status['in_dept']) $data_entry=false;
  53. }
  54. */
  55. if(!$is_discharged&&!$enc_status['in_ward']&&!$enc_status['in_dept']&&(!$enc_status['encounter_status']||stristr('cancelled',$enc_status['encounter_status']))){
  56. //if(!$enc_status['is_discharged']&&!$enc_status['in_ward']&&!$enc_status['in_dept']&&(!$enc_status['encounter_status']||stristr('cancelled',$enc_status['encounter_status']))){
  57. $data_entry=false;
  58. }else{
  59. $data_entry=true;
  60. }
  61. # Assign the icons
  62. if($cfg['icons'] != 'no_icon'){
  63. $TP_iconPost = '<img '.createComIcon($root_path,'post_discussion.gif','0').'>';
  64. $TP_iconFolder = '<img '.createComIcon($root_path,'open.gif','0').'>';
  65. $TP_iconBubble = '<img '.createComIcon($root_path,'bubble.gif','0').'>';
  66. $TP_iconTalk = '<img '.createComIcon($root_path,'discussions.gif','0').'>';
  67. $TP_iconEye = '<img '.createComIcon($root_path,'eye_s.gif','0').'>';
  68. $TP_iconOGuy = '<img '.createComIcon($root_path,'prescription.gif','0').'>';
  69. $TP_iconHeads = '<img '.createComIcon($root_path,'new_group.gif','').'>';
  70. $TP_iconWGuy = '<img '.createComIcon($root_path,'people_search_online.gif','0').'>';
  71. $TP_iconWTorso = '<img '.createComIcon($root_path,'man-whi.gif','0').'>';
  72. $TP_iconIDCard = '<img '.createComIcon($root_path,'new_address.gif','0').'>';
  73. $TP_iconGTeen = '<img '.createComIcon($root_path,'bn.gif','0').'>';
  74. $TP_iconCrossTeen = '<img '.createComIcon($root_path,'bnplus.gif','0').'>';
  75. $TP_iconPDF = '<img '.createComIcon($root_path,'icon_acro.gif','0').'>';
  76. $TP_iconXPaper = '<img '.createComIcon($root_path,'nopmuser.gif','0').'>';
  77. }else{
  78. $TP_iconPost = '';
  79. $TP_iconFolder = '';
  80. $TP_iconBubble = '';
  81. $TP_iconTalk = '';
  82. $TP_iconEye = '';
  83. $TP_iconOGuy = '';
  84. $TP_iconHeads = '';
  85. $TP_iconWGuy ='';
  86. $TP_iconWTorso = '';
  87. $TP_iconIDCard = '';
  88. $TP_iconGTeen = '';
  89. $TP_iconCrossTeen = '';
  90. $TP_iconPDF = '';
  91. $TP_iconXPaper = '';
  92. }
  93. $TP_href_1="show_sick_confirm.php".URL_APPEND ."&pid=$pid&target=$target";
  94. if($data_entry){
  95. $TP_SICKCONFIRM="<a href=\"show_sick_confirm.php".URL_APPEND ."&pid=$pid&target=$target\">$LDSickReport</a>";
  96. }else{
  97. $TP_SICKCONFIRM="<font color='#333333'>$LDSickReport</font>";
  98. }
  99. if($data_entry){
  100. $TP_DIAGXRESULTS="<a href=\"show_diagnostics_result.php".URL_APPEND."&pid=$pid&target=$target\">$LDDiagXResults</a>";
  101. }else{
  102. $TP_DIAGXRESULTS="<font color='#333333'>$LDDiagXResults</font>";
  103. }
  104. if($data_entry){
  105. $TP_DIAGNOSES="<a href=\"show_diagnosis.php".URL_APPEND."&pid=$pid&target=$target\">$LDDiagnoses</a>";
  106. }else{
  107. $TP_DIAGNOSES="<font color='#333333'>$LDDiagnoses</font>";
  108. }
  109. if($data_entry){
  110. $TP_PROCEDURES="<a href=\"show_procedure.php".URL_APPEND."&pid=$pid&target=$target\">$LDProcedures</a>";
  111. }else{
  112. $TP_PROCEDURES="<font color='#333333'>$LDProcedures</font>";
  113. }
  114. if($data_entry){
  115. $TP_DRG="<a href=\"javascript:openDRGComposite()\">$LDDRG</a>";
  116. }else{
  117. $TP_DRG="<font color='#333333'>$LDDRG</font>";
  118. }
  119. if($data_entry){
  120. $TP_PRESCRIPTIONS="<a href=\"show_prescription.php".URL_APPEND."&pid=$pid&target=$target\">$LDPrescriptions</a>";
  121. }else{
  122. $TP_PRESCRIPTIONS="<font color='#333333'>$LDPrescriptions</font>";
  123. }
  124. if($data_entry){
  125. $TP_NOTESREPORTS="<a href=\"show_notes.php".URL_APPEND."&pid=$pid&target=$target\">$LDNotes $LDAndSym $LDReports</a>";
  126. }else{
  127. $TP_NOTESREPORTS="<font color='#333333'>$LDNotes $LDAndSym $LDReports</font>";
  128. }
  129. $TP_href_11="show_immunization.php".URL_APPEND."&pid=$pid&target=$target";
  130. if($data_entry){
  131. $TP_IMMUNIZATION="<a href=\"show_immunization.php".URL_APPEND."&pid=$pid&target=$target\">$LDImmunization</a>";
  132. }else{
  133. $TP_IMMUNIZATION="<font color='#333333'>$LDImmunization</font>";
  134. }
  135. if($data_entry){
  136. $TP_MSRMNTS="<a href=\"show_weight_height.php".URL_APPEND."&pid=$pid&target=$target\">$LDMeasurements</a>";
  137. }else{
  138. $TP_MSRMNTS="<font color='#333333'>$LDMeasurements</font>";
  139. }
  140. # If the sex is female, show the pregnancies option link
  141. if($data_entry&&$sex=='f') {
  142. $TP_preg_BLK="<a href=\"show_pregnancy.php".URL_APPEND."&pid=$pid&target=$target\">$LDPregnancies</a>";
  143. }else{
  144. $TP_preg_BLK="<font color='#333333'>$LDPregnancies</font>";
  145. }
  146. if($data_entry){
  147. $TP_BIRTHDX="<a href=\"show_birthdetail.php".URL_APPEND."&pid=$pid&target=$target\">$LDBirthDetails</a>";
  148. }else{
  149. $TP_BIRTHDX="<font color='#333333'>$LDBirthDetails</font>";
  150. }
  151. $TP_HISTORY="<a href=\"javascript:popRecordHistory('care_encounter',".$_SESSION['sess_en'].")\">$LDRecordsHistory</a>";
  152. # Links to chart folder
  153. $TP_href_17='javascript:getinfo(\''.$_SESSION['sess_en'].'\')';
  154. if($data_entry){
  155. $TP_CHARTSFOLDER="<a href=\"javascript:getinfo('".$_SESSION['sess_en']."')\">$LDChartsRecords</a>";
  156. }else{
  157. $TP_CHARTSFOLDER="<font color='#333333'>$LDChartsRecords</font>";
  158. }
  159. # Links to patient registration data display
  160. $TP_PATREGSHOW="<a href=\"patient_register_show.php".URL_APPEND."&pid=".$_SESSION['sess_pid']."&from=$from&newdata=1&target=$target\">$LDShow $LDPatientRegister</a>";
  161. $TP_PATREGUPDATE="<a href=\"patient_register.php".URL_APPEND."&pid=$pid&update=1\">$LDUpdate $LDPatientRegister</a>";
  162. # Links to medocs module
  163. if($data_entry){
  164. $TP_MEDOCS="<a href=\"".$root_path."modules/medocs/show_medocs.php".URL_APPEND."&encounter_nr=".$_SESSION['sess_en']."&edit=$edit&from=$from&is_discharged=$is_discharged&target=$target\">$LDMedocs</a>";
  165. }else{
  166. $TP_MEDOCS="<font color='#333333'>$LDMedocs</font>";
  167. }
  168. # Links to pdf doc generator
  169. if($data_entry){
  170. $TP_PRINT_PDFDOC="<a href=\"".$root_path."modules/registration_admission/print/admitdata.php".URL_APPEND."&enc=".$_SESSION['sess_en']."\" target=_blank>$LDPrintPDFDoc</a>";
  171. }else{
  172. $TP_PRINT_PDFDOC="<font color='#333333'>$LDPrintPDFDoc</font>";
  173. }
  174. # If encounter_status empty or 'allow_cancel', show the cancel option link
  175. //if(!$enc_status['is_discharged']&&!$enc_status['in_ward']&&!$enc_status['in_dept']&&(empty($enc_status['encounter_status'])||$enc_status['encounter_status']=='allow_cancel')){
  176. if(!$data_entry&&($enc_status['encounter_status']!='cancelled')&&!$enc_status['is_discharged']){
  177. $TP_xenc_BLK="<a href=\"javascript:cancelEnc('".$_SESSION['sess_en']."')\">$LDCancelThisAdmission</a>";
  178. }else{
  179. $TP_xenc_BLK="<font color='#333333'>$LDCancelThisAdmission</font>";
  180. }
  181. # Load the template
  182. $smarty->assign('TP_root_path',$TP_root_path);
  183. $smarty->assign('LDOptsForPatient',$LDOptsForPatient);
  184. $smarty->assign('TP_root_path',$TP_root_path);
  185. $smarty->assign('TP_iconPost',$TP_iconPost);
  186. $smarty->assign('TP_SICKCONFIRM',$TP_SICKCONFIRM);
  187. $smarty->assign('TP_iconFolder',$TP_iconFolder);
  188. $smarty->assign('TP_CHARTSFOLDER',$TP_CHARTSFOLDER);
  189. $smarty->assign('TP_iconBubble',$TP_iconBubble);
  190. $smarty->assign('TP_DIAGXRESULTS',$TP_DIAGXRESULTS);
  191. $smarty->assign('TP_iconTalk',$TP_iconTalk);
  192. $smarty->assign('TP_MEDOCS',$TP_MEDOCS);
  193. $smarty->assign('TP_iconEye',$TP_iconEye);
  194. $smarty->assign('TP_DRG',$TP_DRG);
  195. $smarty->assign('TP_iconOGuy',$TP_iconOGuy);
  196. $smarty->assign('TP_PRESCRIPTIONS',$TP_PRESCRIPTIONS);
  197. $smarty->assign('TP_iconHeads',$TP_iconHeads);
  198. $smarty->assign('TP_NOTESREPORTS',$TP_NOTESREPORTS);
  199. $smarty->assign('TP_iconWGuy',$TP_iconWGuy);
  200. $smarty->assign('TP_IMMUNIZATION',$TP_IMMUNIZATION);
  201. $smarty->assign('TP_iconWGuy',$TP_iconWGuy);
  202. $smarty->assign('TP_MSRMNTS',$TP_MSRMNTS);
  203. $smarty->assign('TP_iconWTorso',$TP_iconWTorso);
  204. $smarty->assign('TP_preg_BLK',$TP_preg_BLK);
  205. $smarty->assign('TP_iconIDCard',$TP_iconIDCard);
  206. $smarty->assign('TP_BIRTHDX',$TP_BIRTHDX);
  207. $smarty->assign('TP_iconGTeen',$TP_iconGTeen);
  208. $smarty->assign('TP_PATREGSHOW',$TP_PATREGSHOW);
  209. $smarty->assign('TP_iconCrossTeen',$TP_iconCrossTeen);
  210. $smarty->assign('TP_PATREGUPDATE',$TP_PATREGUPDATE);
  211. $smarty->assign('TP_iconIDCard',$TP_iconIDCard);
  212. $smarty->assign('TP_HISTORY',$TP_HISTORY);
  213. $smarty->assign('TP_iconPDF',$TP_iconPDF);
  214. $smarty->assign('TP_PRINT_PDFDOC',$TP_PRINT_PDFDOC);
  215. $smarty->assign('TP_iconXPaper',$TP_iconXPaper);
  216. $smarty->assign('TP_xenc_BLK',$TP_xenc_BLK);
  217. $smarty->display('/../../view/tp_pat_admit_options.tpl');
  218. ?>