Billing First Iteration

This page holds some draft notes for a first iteration being actively discussed on the devel list during May 2011.

Schema bill holds all tables related to billing. Its brevity over billing goes along with clin, dem, gm, audit, blobs, ...

Billed item table

Holds items that are to be put on a bill.

    create table bill.bill_item (
        pk serial primary key

        -- parties involved
        fk_identity foreign key (
        fk_provider foreign key (
        bill_to text

        -- service rendered
        fk_item foreign key (
        item_multiplier integer > 0
        fee_multiplier numeric
        service_rendered_when timestamp with time zone
        fk_encounter foreign key (
        comment text
        data text

        -- processing status
        invoice_id text
        status text

Billing plugin

Iteration 1:
  • doctor selects items to bill from a list
  • doctor adds required patient-specific information
  • doctor ACKs selected items for billing
  • doctor effects "process now"
  • GNUmed generates invoice ID
  • GNUmed sends items and invoice ID to LSMB
  • GNUmed marks items as sent if successfully sent

1) controls / functions

   Upload <-- selected item
   Upload all <-- upload all of the not-yet-uploaded items
            (for current person / patient)

2) display options (radio button)

   Show (   ) draft billables   (   ) all billables <-- includes already-uploaded

3) workflow

   on activating plugin, default display is "draft billables"

Display will be empty until user clicks "New" button

Report generator plugin (already exists)

Need a suitable query in the GNUmed "Reports" generator to identify patients having one or more existing billed items which were not yet finalized / uploaded.

Inbox plugin (already exists)

Display virtual system message about incomplete bill items.

LSMB side

Need, for each invoice:
  1. Patient's contact/billing info on a new patient
  2. Which patient is involved
  3. Identifier for the invoice......

Need, for each line item on the invoice
  1. An identifier for the part or service
  2. Any price adjustment factors (discounts, etc)
  3. Quantity
  4. Notes (technically optional but should be sent for reasons of being able to track down "I don't know what to put here" scenarios)

LSMB side:

  1. sanity check of data
  2. assembles items into invoice structure
  3. "accountant" effects generation of invoice
  4. "accountant" prints invoice

The list of what is billable

This could be read-only from the GNUmed EMR GUI side of things. At most, the initial iteration would comfort users with a button


tooltipping "Pull in (resync) list of billable from billingsolution" (LSMB, in our case). Such resyncing would otherwise happen scripted, periodically.

*********** *Future **********

Post-encounter-creation (or a post-encounter-modification) hook detects a suitable instance for auto-creating one or more billables.

create table bill.billable_encounter_types (
   pk serial primary key
   fk_encounter type integer
      foreign key references clin.encounter_type pk
         on update cascade
         on delete cascade,
   fk_billable_item_candidates integer *

* array of FKs into bill.billable_items to suggest what to bill

Deletion from within GNUmed (if billed item was already uploaded) re-communicates to LSMB.
Topic revision: 21 May 2011, KarstenHilbert
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark