gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] which plugins to load in the GUI


From: Busser, Jim
Subject: Re: [Gnumed-devel] which plugins to load in the GUI
Date: Fri, 2 Dec 2011 17:52:50 +0000

On 2011-12-02, at 8:09 AM, Jim Busser wrote:
>> 
>> By what method can the left-to-right sequence (i.e. the load 'order') be 
>> altered?
> 
> I have updated the wiki instructions to better reflect the above.

My client lists 5 workplaces but if I run the following query I am returned 9 
rows … the extra four being accounted-for by 3 instances (not one) of 
identical-seeming Clinician and the same for 'GNUmed default'

    select c_i.workplace, c_s.value from cfg.cfg_str_array
    c_s inner join cfg.cfg_item
    c_i on c_s.fk_item = c_i.pk
    inner join cfg.cfg_template c_t
    on c_i.fk_template = c_t.pk ;


ah… ok… each user can have their own copy (variant?)

    select c_i.owner, c_i.workplace, c_s.value
    from cfg.cfg_str_array c_s
    inner join cfg.cfg_item c_i 
    on c_s.fk_item = c_i.pk
    inner join cfg.cfg_template c_t
    on c_i.fk_template = c_t.pk
    order by c_i.owner, c_i.workplace;

Where a conf file designates a workplace and a user logs in, does GNUmed check 
the existence of a workplace under this 'owner' and, if no related record 
already exists in the table cfg.cfg_item does a row get cloned from owner 
xxxDEFAULTxxx ?

(I hope the answer is no, if what I think I figured out below is correct)

Suppose it is desired that a 'workplace' maintains consistent plugins no matter 
which user would be logging into that workplace… would it require that every 
user's copy of the workplace be modified or is there someway for them all to 
reference (load) a single definition of the workplace?

In the table definition for cfg.cfg_item is says the 'owner' name is

        not null default "current_user"()

but it also says

        the database level user this option belongs to; this is the
        "role" of the user from the perspective of the database;
        can be "default" at the application level to indicate that
        it does not care

and I see from

        select pk, owner, workplace, cookie from cfg.cfg_item where fk_template 
= 1;

     pk  |     owner     |   workplace    | cookie 
    -----+---------------+----------------+--------
      23 | xxxDEFAULTxxx | GNUmed Default | 
      26 | xxxDEFAULTxxx | Front Desk     | 
      27 | xxxDEFAULTxxx | Clinician      | 
      33 | any-doc       | Local Default  | 
      43 | any-doc       | Clinician      | 
      65 | any-doc       | GNUmed Default | 
      85 | kahi          | GNUmed Default | 
     108 | jabu          | GNUmed Default | 
     130 | jabu          | Clinician      | 

where in my client I can see listed 'Front Desk' despite that I do not own a 
copy.

Therefore… one needs only to delete the (individually owned) workplaces, 
because it is these which over-ride xxxDEFAULTxxx and, by deleting individual 
workplaces, the configurationally-requested workplace will be loading from the 
(solitary) definition owned by xxxDEFAULTxxx 

??

-- Jim




reply via email to

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