2 // +-----------------------------------------------------------------------------+
3 // Copyright (C) 2011 ZMG LLC <sam@zhservices.com>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
18 // A copy of the GNU General Public License is included along with this program:
19 // openemr/interface/login/GnuGPL.html
20 // For more information write to the Free Software
21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 // Author: Eldho Chacko <eldho@zhservices.com>
24 // Vinish K <vinish@zhservices.com>
26 // +------------------------------------------------------------------------------+
27 //SANITIZE ALL ESCAPES
28 $sanitize_all_escapes=true;
31 //STOP FAKE REGISTER GLOBALS
32 $fake_register_globals=false;
34 require_once('../globals.php');
35 require_once('../eRx_xml.php');
36 require_once('../../library/xmltoarray_parser_htmlfix.php');
40 if($_REQUEST['patient'])
41 $patientid=$_REQUEST['patient'];
42 $cred=getErxCredentials();
43 $path = getErxSoapPath();
44 $path = explode(';',$path);
45 $client = new SoapClient($path[1]);
46 $xml1_0['credentials']['PartnerName']=$cred['0'];
47 $xml1_0['credentials']['Name']=$cred['1'];
48 $xml1_0['credentials']['Password']=$cred['2'];
50 $erxSiteID=sqlQuery("SELECT federal_ein FROM facility WHERE primary_business_entity='1'");
51 $account=sqlQuery("SELECT * FROM users AS u LEFT JOIN facility AS f ON f.id=u.facility_id WHERE u.username=?",array($_SESSION['authUser']));
52 $xml1_0['accountRequest']['AccountId']='1';
53 $xml1_0['accountRequest']['SiteId']=$erxSiteID['federal_ein'];
55 $location=sqlQuery("SELECT f.id AS id,u.id AS useID FROM users AS u LEFT JOIN facility AS f ON f.id=u.facility_id WHERE u.username=?",array($_SESSION['authUser']));
56 $xml1_0['locationId']=$patientid;
57 $xml1_0['userType']='P';
58 $user_details = sqlQuery("SELECT * FROM users WHERE id = ?",array($_SESSION['authUserID']));
59 $xml1_0['userId']=$user_details['npi'];
61 $xml = $client->GetAccountStatus($xml1_0);
65 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
67 <body
class='body_top'>
68 <table
class='text' align
=center width
='90%' height
='80%' style
='padding-top:6%'>
70 <th colspan
=2><?php
echo htmlspecialchars( xl('eRx Account Status'), ENT_NOQUOTES
); ?
></th
>
73 <td
><?php
echo htmlspecialchars( xl('Pending Rx Count'), ENT_NOQUOTES
); ?
></td
>
74 <td
><?php
echo $xml->GetAccountStatusResult
->accountStatusDetail
->PendingRxCount
;?
></td
>
77 <td
><?php
echo htmlspecialchars( xl('Alert Count'), ENT_NOQUOTES
); ?
></td
>
78 <td
><?php
echo $xml->GetAccountStatusResult
->accountStatusDetail
->AlertCount
;?
></td
>
81 <td
><?php
echo htmlspecialchars( xl('Fax Count'), ENT_NOQUOTES
); ?
></td
>
82 <td
><?php
echo $xml->GetAccountStatusResult
->accountStatusDetail
->FaxCount
;?
></td
>
85 <td
><?php
echo htmlspecialchars( xl('Pharm Com Count'), ENT_NOQUOTES
); ?
></td
>
86 <td
><?php
echo $xml->GetAccountStatusResult
->accountStatusDetail
->PharmComCount
;?
></td
>