3 * interface/patient_file/ccr_pending_approval.php Approval screen for uploaded CCR XML.
5 * Approval screen for uploaded CCR XML.
7 * Copyright (C) 2013 Z&H Consultancy Services Private Limited <sam@zhservices.com>
9 * LICENSE: This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 3
12 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
21 * @author Eldho Chacko <eldho@zhservices.com>
22 * @author Ajil P M <ajilpm@zhservices.com>
23 * @link http://www.open-emr.org
26 //SANITIZE ALL ESCAPES
27 $sanitize_all_escapes=true;
30 //STOP FAKE REGISTER GLOBALS
31 $fake_register_globals=false;
34 require_once(dirname(__FILE__
) . "/../globals.php");
35 require_once(dirname(__FILE__
) . "/../../library/options.inc.php");
36 require_once(dirname(__FILE__
) . "/../../library/patient.inc");
37 require_once(dirname(__FILE__
) . "/../../library/parse_patient_xml.php");
39 if($_REQUEST['approve'] == 1){
40 insert_patient($_REQUEST['am_id']);
44 <title
><?php
echo xlt('CCR Approve');?
></title
>
45 <link rel
="stylesheet" href
="<?php echo $css_header; ?>" type
="text/css" >
47 <body
class="body_top" >
48 <center
><?php
echo xlt('Approved Successfully'); ?
></center
>
58 <title
><?php
echo xlt('Pending Approval');?
></title
>
59 <link rel
="stylesheet" href
="<?php echo $css_header; ?>" type
="text/css">
64 font
: .8em
/1.6em
"Trebuchet MS",Verdana
,sans
-serif
;
65 border
-collapse
: collapse
;
67 border
: 1px solid
#CCC;
76 background
: rgb(255,255,255); /* Old browsers */
77 background
: -moz
-linear
-gradient(top
, rgba(255,255,255,1) 0%
, rgba(229,229,229,1) 100%
); /* FF3.6+ */
78 background
: -webkit
-gradient(linear
, left top
, left bottom
, color
-stop(0%
,rgba(255,255,255,1)), color
-stop(100%
,rgba(229,229,229,1))); /* Chrome,Safari4+ */
79 background
: -webkit
-linear
-gradient(top
, rgba(255,255,255,1) 0%
,rgba(229,229,229,1) 100%
); /* Chrome10+,Safari5.1+ */
80 background
: -o
-linear
-gradient(top
, rgba(255,255,255,1) 0%
,rgba(229,229,229,1) 100%
); /* Opera 11.10+ */
81 background
: -ms
-linear
-gradient(top
, rgba(255,255,255,1) 0%
,rgba(229,229,229,1) 100%
); /* IE10+ */
82 background
: linear
-gradient(to bottom
, rgba(255,255,255,1) 0%
,rgba(229,229,229,1) 100%
); /* W3C */
83 filter
: progid
:DXImageTransform
.Microsoft
.gradient( startColorstr
='#ffffff', endColorstr
='#e5e5e5',GradientType
=0 ); /* IE6-9 */
89 background
: #f5f6f6; /* Old browsers */
90 background
: -moz
-linear
-gradient(top
, #f5f6f6 0%, #dbdce2 21%, #b8bac6 49%, #dddfe3 80%, #f5f6f6 100%); /* FF3.6+ */
91 background
: -webkit
-gradient(linear
, left top
, left bottom
, color
-stop(0%
,#f5f6f6), color-stop(21%,#dbdce2), color-stop(49%,#b8bac6), color-stop(80%,#dddfe3), color-stop(100%,#f5f6f6)); /* Chrome,Safari4+ */
92 background
: -webkit
-linear
-gradient(top
, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* Chrome10+,Safari5.1+ */
93 background
: -o
-linear
-gradient(top
, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* Opera 11.10+ */
94 background
: -ms
-linear
-gradient(top
, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* IE10+ */
95 background
: linear
-gradient(to bottom
, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* W3C */
96 filter
: progid
:DXImageTransform
.Microsoft
.gradient( startColorstr
='#f5f6f6', endColorstr
='#f5f6f6',GradientType
=0 ); /* IE6-9 */
97 border
-bottom
: 1px solid
;
101 background
-color
: #F7F7F7;
108 color
: #000 !important;
109 -webkit
-border
-radius
: 4px
;
110 -moz
-border
-radius
: 4px
;
112 border
: solid
1px
#000000;
113 -webkit
-box
-shadow
: inset
0 1px
0 rgba(255, 255, 255, 0.4), 0 1px
1px
rgba(0, 0, 0, 0.2);
114 -moz
-box
-shadow
: inset
0 1px
0 rgba(255, 255, 255, 0.4), 0 1px
1px
rgba(0, 0, 0, 0.2);
115 box
-shadow
: inset
0 1px
0 rgba(255, 255, 255, 0.4), 0 1px
1px
rgba(0, 0, 0, 0.2);
116 -webkit
-transition
-duration
: 0.2s
;
117 -moz
-transition
-duration
: 0.2s
;
118 transition
-duration
: 0.2s
;
119 -webkit
-user
-select
:none
;
120 -moz
-user
-select
:none
;
121 -ms
-user
-select
:none
;
127 border
: solid
1px
#000000;
128 text
-decoration
: none
;
129 color
: #FFF !important;
133 <script type
="text/javascript" >
137 <body
class="body_top" >
139 <p
><b
><?php
echo xlt('Pending Approval');?
></b
></p
>
141 <form method
="post" name
="approve" "onsubmit='return top.restoreSession()'" >
143 <table style
="width:80%;" border
="0" >
146 <?php
echo xlt('Patient Name'); ?
>
149 <?php
echo xlt('Match Found'); ?
>
152 <?php
echo xlt('Action'); ?
>
156 $query = sqlStatement("SELECT *,am.id amid,CONCAT(ad.field_value,' ',ad1.field_value) as pat_name FROM audit_master am JOIN audit_details ad ON
157 ad.audit_master_id = am.id AND ad.table_name = 'patient_data' AND ad.field_name = 'lname' JOIN audit_details ad1 ON
158 ad1.audit_master_id = am.id AND ad1.table_name = 'patient_data' AND ad1.field_name = 'fname' WHERE type='11' AND approval_status='1'");
159 if(sqlNumRows($query) > 0){
160 while($res = sqlFetchArray($query)){
161 $dup_query = sqlStatement("SELECT * FROM audit_master am JOIN audit_details ad ON ad.audit_master_id = am.id AND ad.table_name = 'patient_data'
162 AND ad.field_name = 'lname' JOIN audit_details ad1 ON ad1.audit_master_id = am.id AND ad1.table_name = 'patient_data' AND
163 ad1.field_name = 'fname' JOIN audit_details ad2 ON ad2.audit_master_id = am.id AND ad2.table_name = 'patient_data' AND ad2.field_name = 'DOB'
164 JOIN patient_data pd ON pd.lname = ad.field_value AND pd.fname = ad1.field_value AND pd.DOB = DATE(ad2.field_value) WHERE am.id = ?",
165 array($res['amid']));
169 <?php
echo text($res['pat_name']); ?
>
172 if(sqlNumRows($dup_query)>0){
173 $dup_res = sqlFetchArray($dup_query);
175 <td align
="center" class="bold" >
176 <?php
echo xlt('Yes'); ?
>
179 <a href
="ccr_review_approve.php?revandapprove=1&amid=<?php echo attr($res['amid']); ?>&pid=<?php echo attr($dup_res['pid']); ?>" class="button-link" onclick
="top.restoreSession()" ><?php
echo xlt('Review & Approve'); ?
></a
>
184 <td align
="center" class="bold" >
185 <?php
echo xlt('No'); ?
>
188 <a href
="ccr_pending_approval.php?approve=1&am_id=<?php echo attr($res['amid']); ?>" class="button-link" onclick
="top.restoreSession()" ><?php
echo xlt('Approve'); ?
></a
>
200 <?php
echo xlt('Nothing Pending for Approval')."."; ?
>