Receipt for Payment

arnabnaha wrote on Wednesday, April 22, 2015:

Hello…
After doing an encounter with a patient, we enter the fee details to the fee sheet. Now The patient pays me the money by cash for the encounter. I click Payments in the left nav and enter the amount paid by the patient. (In India, we have self payment, no insurance issues)

After saving it, it produces a receipt to be printed.

Can we have total Amount paid and Due amount shown on the receipt just like the statement? It would be really useful.

Dr. Arnab Naha

fsgl wrote on Wednesday, April 22, 2015:

Menu>Popups>Payment.

It will generate one receipt for multiple dates of service.

The closest we have to a Patient Ledger is Past Documents & Encounters Billing View. Take screenshot of the DOS’ & print.

arnabnaha wrote on Wednesday, April 22, 2015:

Menu>popups>payments and Left menu>fees>Payments is all same fsgl. My question is regarding adding a line in the printed receipt about “TOTAL AMOUNT PAID” and " AMOUNT DUE"

fsgl wrote on Wednesday, April 22, 2015:

Payment will tally all payments giving a total, just not balance due.

Printing Payment will give total paid while printing Patient Statement will give balance due.

You can try your hand at changing statement.inc.php to add a tally of all payments.

banaitv wrote on Thursday, April 23, 2015:

Please correct. In India we have multiple modes of payment… Self paying, insurance, paid by government eg CGHS offices.

Vaibhav Banait

-----Original Message-----
From: “Arnab Naha” arnabnaha@users.sf.net
Sent: ‎23-‎04-‎2015 01:32
To: "[openemr:discussion] " 202504@discussion.openemr.p.re.sf.net
Subject: [openemr:discussion] Receipt for Payment

Hello…
After doing an encounter with a patient, we enter the fee details to the fee sheet. Now The patient pays me the money by cash for the encounter. I click Payments in the left nav and enter the amount paid by the patient. (In India, we have self payment, no insurance issues)
After saving it, it produces a receipt to be printed.
Can we have total Amount paid and Due amount shown on the receipt just like the statement? It would be really useful.
Dr. Arnab Naha

Receipt for Payment

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openemr/discussion/202504/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

arnabnaha wrote on Thursday, April 23, 2015:

Yes vaibhav…In India we have multiple modes of payment but insurance, ESI, CGHS and others are mainly limited to hospitals…very few independent private practitioners use them…me myself have self payment only…more than 90% of doctors in india have self payment as the sole option. Just needed addition of two lines at the end of the receipt…one called total amount paid and the other amount fue…if we add these two lines, the receipt will really look like a receipt…

banaitv wrote on Thursday, April 23, 2015:

Dear Arnab
Could you modify the report template and prescription template to include headers and footers as are conventional in most of our clinics. If so would you like to share those with us?

Vaibhav Banait

-----Original Message-----
From: “Arnab Naha” arnabnaha@users.sf.net
Sent: ‎23-‎04-‎2015 01:32
To: "[openemr:discussion] " 202504@discussion.openemr.p.re.sf.net
Subject: [openemr:discussion] Receipt for Payment

Hello…
After doing an encounter with a patient, we enter the fee details to the fee sheet. Now The patient pays me the money by cash for the encounter. I click Payments in the left nav and enter the amount paid by the patient. (In India, we have self payment, no insurance issues)
After saving it, it produces a receipt to be printed.
Can we have total Amount paid and Due amount shown on the receipt just like the statement? It would be really useful.
Dr. Arnab Naha

Receipt for Payment

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openemr/discussion/202504/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

arnabnaha wrote on Thursday, April 23, 2015:

Dear vaibhab…i am not a developer…i am a doctor…dont know php and coding much…only learnt 1% while testing openemr for the last 5 yrs. Neways…you dont need to print headers along with the prescriptions. What I do is, I have preprinted A4 sheets with headers and I adjusted the pdf from openemr globals to print on that preprinted sheets…that is quite convenient and good about openemr. None of the software prints headers and footers, its better to have them preprinted and rest of the matter should be printed by the software.

visolveemr wrote on Thursday, April 23, 2015:

Hello Arnab Naha,
To print total Amount paid and Due amount on the receipt for the particular encounter, we can apply the following code change,

After line 363, add the following lines

$tot = sqlQuery("select sum(pay_amount) as tot from ar_activity where encounter=?", array($payrow['encounter']));
$fe = sqlQuery("select fee as fees from billing where encounter=?", array($payrow['encounter']));
$due = $fe['fees'] - $tot['tot'];

and after line 455 add

<tr>
	<td><?php echo xlt('Total Amount Paid'); ?>:</td>
	<td><?php echo text($tot['tot']) ?></td>
</tr>
<tr>
	<td><?php echo xlt('Due Amount'); ?>:</td>
	<td><?php echo text($due) ?></td>
</tr>

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

arnabnaha wrote on Thursday, April 23, 2015:

Thank you…Thank you so much visolve…awesome…it works great…

arnabnaha wrote on Thursday, April 23, 2015:

There is a small issue visolve.

Suppose a patient pays for current encounter and last day’s encounter (suppose rs. 800 for each visit) then it is showing

Amount for This Visit: 1,600.00
Amount for Past Balance: 0.00

The amount for past visit should be 800 and amount for this visit should be 800

Total Amount Paid: 800.00
Due Amount: 0

The total amount paid (this is the newly added part) is showing as 800 instead of 1600

visolveemr wrote on Thursday, April 23, 2015:

Hello Arnab Naha,
After line $var_index=0; add,

$tot_charges=0;

replace the line global $var_index; with

global $var_index,$tot_charges;
$tot_charges += $ptpaid;

After the line 1238 with calctotal(); add

$(document).ready(function() {
	$('#tot_char').val(<?php echo $tot_charges ?>);
});

After line 1223 with <input type='text' name='form_paytotal' value='' style='color:#00aa00;width:50px' readonly /> add

<input type="hidden" name="tot_char" id="tot_char" value=0 />

Change the already added lines

$tot = sqlQuery("select sum(pay_amount) as tot from ar_activity where pid=?", array($form_pid));
$fe = sqlQuery("select sum(fee) as fees from billing where pid=?", array($form_pid));
$due = $fe['fees'] - ($_POST['form_paytotal'] + $_POST['tot_char']);

and

<tr>
	<td><?php echo xlt('Total Amount Paid'); ?>:</td>
	<td><?php echo text($_POST['form_paytotal'] + $_POST['tot_char']) ?></td>
</tr>
<tr>
	<td><?php echo xlt('Due Amount'); ?>:</td>
	<td><?php echo ($due)  ?></td>
</tr>

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

arnabnaha wrote on Thursday, April 23, 2015:

Did the changes…works wonderfully…Thank you so so much visolve. All issues resolved

jjcahs wrote on Saturday, April 25, 2015:

Arnab,

I am wondering about the use of OpenEMR in India. If you can please reach out to me about this at your earliest convenience. Thanks,
Jit

jc@acehealthsolutions.com

bradymiller wrote on Sunday, April 26, 2015:

Hi,

Would this be change be useful for the main codebase?

-brady
OpenEMR

arnabnaha wrote on Monday, April 27, 2015:

Hi brady…

Here is the changes made to the git branch. All credit to visolve for this. I would request Vi solve to include another line of “TOTAL CHARGE” in the receipt showing the total amount that needs to be paid, above the line of " Amount Paid"

visolveemr wrote on Monday, April 27, 2015:

Hello Arnab Naha,
To include “TOTAL CHARGE” in the receipt, we can apply the following code changes in ‘interface/patient_file/front_payment.php’

After line 452 add,

<tr>
    <td><?php echo xlt('Total Charge'); ?>:</td>
    <td><?php echo text($fe['fees']) ?></td>
</tr>

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

arnabnaha wrote on Monday, April 27, 2015:

Thank you visolve…but I missed that there is already a line in the receipt where it shows the amount to be paid for a particular visit. Thank you for all the help with the coding.

Brady, if you wish you can push it to the codebase as it works well. I am not adding the last change (just above this post) by visolve to github as it is already present in the receipt.

arnabnaha wrote on Monday, April 27, 2015:

Last request…

Beside the “Amount for past balance line” can the encounter Number and date of the past encounter be added for which the past balance is being collected? If there is no past balance, then no date and encounter number will appear.

Sorry for coming out in phases

visolveemr wrote on Tuesday, April 28, 2015:

Hello Arnab Naha,

To include encounter number and its date for the past balance payments, apply the following code changes,

After line 370 ‘$due = $fe[‘fees’] - ($_POST[‘form_paytotal’] + $_POST[‘tot_char’]);’ add,

 $past_enc = sqlStatement("select encounter from payments where pid = ? and  dtime = ? and amount2 != '0.00'", array($form_pid,$timestamp));
 $past_enc_date = array();
 while($row = sqlFetchArray($past_enc))
 {
 array_push($past_enc_date, sqlQuery("select encounter,date from form_encounter where encounter=?",array($row['encounter'])));
 }

After line 461 add,

<tr>
<td><?php echo xlt('Past Encounter and Date'); ?>:</td>
<td><table border=1>
<tr>
<td><b><?php echo xlt('Past Encounter No.'); ?></b></td>
<td><b><?php echo xlt('Past Encounter Date'); ?></b></td>
<?php foreach($past_enc_date as $value) { ?>
<tr>
<td> <?php echo text($value['encounter']) ?> </td>
<td> <?php echo text($value['date']) ?> </td>
</tr>
<?php } ?>
</tr>
</table></td>
</tr>

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library