gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] terminology question


From: Rogerio Luz
Subject: Re: [Gnumed-devel] terminology question
Date: Sun, 5 Apr 2009 12:00:47 -0300

Ok ... so when can we try this? It´s fantastic!!!

Rogerio

2009/4/5 Karsten Hilbert <address@hidden>
On Sat, Apr 04, 2009 at 02:49:42PM -0300, Rogerio Luz wrote:

> I think grouping manually would be best

I have implemented this logic:

               # issues: alpha by grouping, no grouping at the bottom
               if isinstance(item1, gmEMRStructItems.cHealthIssue):

                       # no grouping below grouping
                       if item1['grouping'] is None:
                               if item2['grouping'] is not None:
                                       return 1

                       # grouping above no grouping
                       if item1['grouping'] is not None:
                               if item2['grouping'] is None:
                                       return -1

                       # both no grouping: alpha on description
                       if (item1['grouping'] is None) and (item2['grouping'] is None):
                               if item1['description'].lower() < item2['description'].lower():
                                       return -1
                               if item1['description'].lower() > item2['description'].lower():
                                       return 1
                               return 0

                       # both with grouping: alpha on grouping, then alpha on description
                       if item1['grouping'] < item2['grouping']:
                               return -1

                       if item1['grouping'] > item2['grouping']:
                               return 1

                       if item1['description'].lower() < item2['description'].lower():
                               return -1

                       if item1['description'].lower() > item2['description'].lower():
                               return 1

                       return 0


This allows for nearly arbitrary grouping and sorting. It is
to be applied manually via the issue details dialog. Issues
without a grouping are sorted alphabetically at the bottom.
Issues with the exact same grouping are sorted alpha by
description, again.

For maximum benefit the following scheme can be useful to
adhere to (but not mandatory):

sort position <SPACE> group name <SPACE> position in group

This allows fine-grained control over the placement based on
alphanumeric sorting.

> > ANSIETY
> > DEPRESSION
>
> > ARTEROSCLEROSIS
> > CARDIAC FAILURE
> > CARIDAC SURGERY
> > BACK PAIN (CRONIC)
> > SHOULDER PAIN (FRACTURE)

To force this order one might use the tags:

1 psy 1
1 psy 2

2 vessels 1

3 heart 1
3 heart 2

4 ortho 1
4 ortho 2

This would serve to document related issues as well -- the
needed justification for putting this seemingly client
presentation attribute right into the clinical table ;-)

Note, however, that this particular tagging is just ONE way
of achieving the above order. Another one would be to simply
number the issues.

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


_______________________________________________
Gnumed-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnumed-devel


reply via email to

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