Billing Module IIIT Project

People

Intro

This page is to outline the steps and progress for the billing module, which is being led by students at IIIT as a semester project.

 

Timeline

  • Week 1: August 26th - September 1st
    • Fri Aug 24: [Nathan] Complete short spec/designs on billing -- add to Wiki]
    • Sat Aug 25 - Sun 26: Review existing billing modules in OpenMRS and lots of other billing systems... consider lots of possible alternatives
    • Mon Aug 27 - Tues 28: improve architecture plans (database tables needed), review UI to see if we have screens yet to meet JSS's needs 
    • Wed Aug 29: Call with JSS - review our designs
    • ... Update timeline
  • Week 2: Sept 2nd - 8th
    • Completing the back end resources(Billing,BillingItem,BillingItemAdjustment).
    • Hoping to learn something about front end(reading some existing examples).
  • Weeks 3&4: Sept 9 -  September 23
    • Tasks to get started on front end:
      1. Clone Raxa-JSS at https://github.com/Raxa/raxa-jss, install some Apache server like xampp to run ExtJS (fairly similar to video tutorial here for netbeans: Getting Started Guide: Front-end Development)
      2. Make sure it runs on your computer (only Chrome/Safari)
        1. user: admin
        2. pass: Hello123
      3. Create blank extjs project inside src/billing (copy code out of src/pharmacy)
      4. Install Sencha Architect
      5. Create blank views with Architect according to designs
  • Weeks 5:- Sept 24 - Sept 31
     Learning to use and  integrate the views with Netbeans.
  • Week 6&7 - October 1- 10
          Midsem Break
  • Week 8&9 - October 11- 25
    • Creating the New improved designs of the Views and integrating them with controllers(just a start with controllers).

Work Status

  • Completed the project on 23/12/2012.

Quick Guide to Billing Module

A Quick Guide to Billing Module

 

 

 

The above screen is described in main.js .  It asks for patientId for which the previous bills need to be seen or new Bill needs to be created .

We are working with patienId as stored in Openmrs database.  OnClicking the Find button , ‘getbill’ function in  our controller ‘billings.js’ is called .  This function makes a GET call and the results of GET call get stored in billingstore.js  . Once this is done the screen gets changed and the results of GET call i.e. all the previous bills of the patient are shown .

The view which gets displayed is previousBills.js , screenshot of which is below.

 

 

 

We can see pending balance , Current Charges etc of all the previous  bills of the patient. We are carrying forward the balance each time , hence the balance of interest is the last bill balance , which is also seperately shown as ‘Previous Bills Amount Due’ .

On Clicking the edit sign of any bill , an event ‘showBill’ is fired and function ‘onShowBill’ is called in controller billings.js through this  we can see that bill , i.e.what were the medicines in that bill , their price, discounts and amount of that particular bill .The view of the bill whch opens up is shown below  and is defined in the file previousShow.js.

 

 

PreviousShow.js controls the above view , we can click back to go on previous view. From there clicking on create new Bill button creates a new Bill which is shown below.

 

 

The view which controls this is currentBill_main.js .

The best feature here is that it fetches all the encounters of that patient and converts them to Billing Items , which can be set a price by clicking edit button. The “ADULTINITIAL”, “OUTPATIENT” and “REGISTRATION” seen above are encounters and are now seen as billing Items which can be set a price.

We can also add items manually , by clicking Add Item Button which opens AddItem.js view as shown below.

 

On Clicking Add the total amount for that item is shown and then it is shown in the currentBill screen of the patient as below . The billing Item is stored in the itemStore.js which is store with localstorage.     Also a feature in the currentBill is that it is grouped be category i.e all Medicines  are grouped together  , all Lab items are grouped together and these groups can be collapsed or expanded to see items of that category . On clicking Cancel button the control is returned to currentBill screen and the item is not added to the bill.

 

 

Any item from the bill can be deleted by clicking the cross icon in front of the billItem to be deleted.

To edit an item, click on the pencil shaped yellow icon. This opens EditItem.js as shown below. It has all the information of that respective bill item which can be changed as per the needs. On Clicking Edit the total amount for that item is shown and then it is shown with the edited information in the currentBill.    On clicking Cancel, control just returns to currentBill without any editing.   

 

The values on the right hand side, Current amount, Total amount and balance get updated automatically on adding, deleting or editing any billing Item.

Now  the patient can pay either full pending amount and keep nothing as balance or may pay some amount rest of which is calculated as balance to be  carried forward next time . Once ‘AmountPaid’ is decided , ‘PayBill button’ needs to be clicked  which calculates the balance.Then Click on ‘Save and PrintBill ‘ saves bill in the database and also opens a html page defined in  ‘bill.html’ as shown below which can be given to patient as the bill.

 

 

 

 

Backend Tables- >

  • raxacore_billing: Stores basic details about all bills like their id , status , patienId , providerId , balance , amount of that bill etc.

 

  • raxacore_billing_item: Stores details about the items of a particular bill like their name , description , billId to which item belongs  , quantity , price etc.

 

  • raxacore_billing_item_adjustment: Stores adjustments  for a particular BillingItem like discounts , discountReason  , billItemId for which this adjustment exists. Since a single BillingItem might have multiple discounts thus  this is a separate table.