gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Introducing myself and questions on billing/accountin


From: Jim Busser
Subject: Re: [Gnumed-devel] Introducing myself and questions on billing/accounting
Date: Fri, 20 May 2011 00:26:41 -0700

On 2011-05-19, at 11:18 PM, Sebastian Hilbert wrote:

> There could be 
> a) a plugin where one would manually enter billables (e.g. fetching billable 
> items from LSMB) sending it off to LSMB

Some SQL musings which Karsten had posted (appended below) it sounds like an 
"inventory" table

                bill.billable_item

might better live in LSMB to serve as the

                superset / inventory of "things-which-can-be-billed"

But if it does live in LSMB, what would be the access control for records in 
that table? IOW when user Doctor Leonard McCoy wishes to instantiate a draft 
billing item (later to be passed to LSMB) how will the doctor --- or would it 
be GNUmed on behalf of the doctor? ---  obtain permission from LSMB to read the 
reference table? Would some GNUmed EMR generic account perform the query on 
behalf of the doctor, and pass the results to the doctor? Or would LSMB make 
such reading of reference tables unrestricted?

From the doctor's perspective then, when initiating a billing from inside an 
encounter, the widget would reference a GNUmed table

        bill.billable_encounter_types

to then help to filter --- from LSMB --- a list or array of candidate 
"things-which-can-be-billed" thereby informing the creation of one or more 
GNUmed

        bill.billed_item

records, which can be later approved and passed to LSMB?

        
*************************************************************
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
);

        create table bill.billed_item (
                pk serial primary key
                fk_patient foreign key (dem.identity)
                fk_encounter foreign key (clin.encounter)
                fk_item foreign key (bill.billable_item)
                fk_provider foreign key (dem.staff)
                status
        );

*************************************************************


-- Jim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]