gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] keep testing, or add to main source?


From: Hilmar Berger
Subject: Re: [Gnumed-devel] keep testing, or add to main source?
Date: Thu, 9 Oct 2003 12:49:01 +0200 (MEST)

> > Ian Haywood wrote:
> But we still need a way of match providers being aware of the
> values of the other phrasewheels as this determines their matching.
> 
> For example, if a patient has gout, and the user types "a", the 
> phrasewheel should return "allopurinol" as its first guess, but
> if the disease is depression, the guess should be, say,  "amitryptaline"
One way to do this could be to store score-tables for every unique
combination of the relevant entry fields. This would need some tree-like 
structure
which can easily be simulated by storing the single terms of the combination
together with the list item and the appropriate score:

create table score_gmpw_sql_prescriptions (
        id serial primary key,
        fk_gmpw_sql_test integer not null references gmpw_sql_test(id),
        "user" name not null default CURRENT_USER,
        score bigint not null default 0,
                fk_entry_fields_combination not null references
gmpw_combinations_prescriptions(id);
);

create table gmpw_combinations_prescriptions (
                id serial primary key,
                entry_field1_term text default null,
                entry_field2_term text default null,
                ...
                entry_fieldn_term text default null,
                unique(entry_field1_term, entry_field2_term, ...,
entry_fieldn_term)
);

e.g. "angina"-"no penicilline allergy" would be one branch of that tree.
"angina"-"penicilline allergy" another
"angina"-"" would be a larger set (=larger branch) (possibly combining the
both sets above)
""-"" would be the default branch 

gmpw_combinations_prescriptions will hold every relevant combination (if all
terms are "", this will be the default score). That way you can have
different scores for every possible combination of terms in the chosen input 
fields.

There are just two things that have to be considered: 
-we must choose the number of relevant entry fields carefully (note that the
number of possible combinations is (num_of_entry_fields)^(num_of_possible
terms)). 
- we might need an algorithm to restrict  entering new combinations in the
gmpw_combinations table in order to keep that tables in an acceptable size
(this will depend on performance).
In general IMHO we shouldn't make the phraseweels too smart because this
will always limit the number of matches found in a certain situation. Therefore
we will have to find a  balance between further decreasing result sets and
finding the wanted item in the result set at all.

Hilmar

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++





reply via email to

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