Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Back End Development

Work on billing resource , billing item , billing item adjustment has been started.

Billing table has the following fields:

...

 public Billing saveBill(Billing bill) ;                                            for saving the bill.  
 
 public void deleteBill(Billing bill);                                              deleting a bill, might be required in case of an mistake.
 
 public Billing getBillByPatientUuid(String uuid)                          retrieving bill using the uuid of the patient.
 
 public List<Billing> getAllBills() ;                                             retrieving all the bills.
 
 public List<Billing> getAllBillsByStatus(String status);              retrieving bills by status of the bill(might want to get the bills which are unpaid or partially paid)      
 
 public Billing updateBill(Billing bill);                                          updating the bill (if some other tests or medicines/drug to be added to the bill)
 
 public List<Billing> getAllBillsByProvider(Integer providerId);       retrieving bills by provider of the bill

 

BillingItem table has following fields :

  • bill_item_id
  • bill_id  -->as foreign key
  • provider_id
  • concept_id
  • encounter_id
  • order_id
  • quantity
  • value
  • other standard openmrs fields 

 

BillingItemDAO has the following functions

BillingItem saveBillingItem(BillingItem item) throws DAOException;

void deleteBillingItem(BillingItem item) throws DAOException;

BillingItem getBillingItemByUuid(String uuid);

List<BillingItem> getAllBillingItems() throws DAOException;

List<BillingItem> getAllBillingItemsByBill(Integer billid);

BillingItem updateBillingItem(BillingItem item);

List<BillingItem> getAllBillingItemsByProvider(Integer providerId);

List<BillingItem> getAllBillingItemsByEncounter(Integer encounterId);

List<BillingItem> getAllBillingItemsByConcept(Integer conceptId);

List<BillingItem> getAllBillingItemsByOrder(Integer orderId);

 

 

BillingItemAdjustment fields :

  • adjustment_id
  • reason
  • value
  • bill_item_id
  • other standard fields

BillingItemAdjustmentDAO has the following functions

BillingItemAdjustment saveBillingItemAdjustment(BillingItemAdjustment adjustment) throws DAOException;

void deleteBillingItemAdjustment(BillingItemAdjustment adjustment) throws DAOException;

BillingItemAdjustment getBillingItemAdjustmentByUuid(String uuid);

List<BillingItemAdjustment> getAllBillingItemAdjustments() throws DAOException;

List<BillingItemAdjustment> getAllBillingItemAdjustmentsByReason(String reason);

BillingItemAdjustment updateBillingItemAdjustment(BillingItemAdjustment adjustment);

List<BillingItemAdjustment> getAllBillingItemAdjustmentsByBillingItem(Integer billingitemid);