gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] gnuMed - help with config Items


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] gnuMed - help with config Items
Date: Mon, 9 Aug 2004 20:24:46 +0200
User-agent: Mutt/1.3.22.1i

> Richard, 
> 

> Since you are not the first asking these questions I feel I
> should write some documentation for the wiki. I'm still busy
> finishing my thesis, so here is a short description of what you
> will need:
...

Jim, can you put this into the Wiki? This is a great summary!

Karsten

> - all parameters that are needed after startup of gnumed should be stored in 
> the backend (you can as well store them in a config file, but that way your 
> settings are only found on one machine)
> 
> - if you store them in the backend you can assign a user + workplace + cookie 
> to identify the settings in which the value you stored will apply. Usual 
> design is to hold data for one or more of 
>       - current_user + current_workplace
>       - default_user + current_workplace
>       - current_user + default_workplace
>       - default_user + default_workplace
> 
>   The cookie can be used to further refine the applicability of this value 
> and might hold data like patient-id, day of week, etc.
> 
> - There are two convenience methods:
>       1. gmCfg.getFirstMatchingDBSet, which will return the first appearance 
> of the parameter in question, descending the above shown list of 
> user/workplace pairs. 
> 
>       2. gmCfg.setDBParam, which will set the parameter for one 
> user/workplace/cookie set to the specified value. If it didn't exist before, 
> it will create this parameter for you in the backend. 
> 
> In order to do what you want, just call 
> getFirstMatchingDBSet(option="Demographics.window.column.size") and it will 
> return you the value you set for the current user (if nobody set default 
> values). 
> If you want to set the value after the user changed the column size, just 
> call 
> setDBParam(user=gmWhoAmI.get_db_account(),option="Demographics.window.column.size",
>  value=newValue) to set the value for the current user and default workplace. 
> A last word on how to name you config options: you can name your options any 
> way you like. However, it should be somewhat self explaining. Note, too, that 
> the Setup plugin will assume a hierarchy with branches denoted by dots (as in 
> python namespaces). So "Demographics.window.column.size" and 
> "Demographics.window.column.color" will show up in the same branch of the 
> navigation tree. This leads to a easier navigation and cleaner appearance.
> 
> Hope this helps. If not, please tell me how I can help you.
> 
> Hilmar
> 
> > Hi,
> > 
> > Karsten said  you were the main config person so if I've got that correct a 
> > couple of questions.
> > 
> > I've decided to learn a bit of python finally, rather than just doing the 
> > simple gui stuff, so as a starting project I thought I'd do something 
> > really 
> > simple related to the gui -
> > 
> 
> > 1)  read the column width of the patient list in gmDemographics and saving 
> > this bag to a config file/database on a per-user basis.
> > 
> > 2) read the user-adjusted size of the main gnuMed window, and save this 
> > back 
> > somewhere so the window can automatically be same size next boot up.
> > 
> > I don't want help with the python code per se at the moment as I'm going to 
> > try and learn that, but I'd like to know how/where to save the data back to.
> > 
> > So say I have all the column sizes for the patients list, where do I put 
> > them 
> > and in what form?
> > 
> > Thanks for some help
> > 
> > Richard
> 
> 
> _______________________________________________
> Gnumed-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnumed-devel

-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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