--- James Gray <[EMAIL PROTECTED]> wrote:

> 
> ----- Original Message ----- 
> From: "Greg Woodhouse" <[EMAIL PROTECTED]>
> >
> > Any logic tucked away in a special lookup routine will not be
> honored
> > by the silent calls. That's expected because the lookup routines
> are
> > used to provide a user interface (comparable to ^DIC). Using
> special
> > lookup routines to enforce integrity constraints is a bad idea for
> just
> > this reason.
> 
> Standard VistA uses a lookup routine on file 2.  What do you
> recommend as an 
> alternative to the lookup routines used by VistA, RPMS, and VOE to
> create 
> the functionality those lookup routines provide?
> Jim
> >

It's difficult to give a single answer because it depends on the nature
of the constraint. If you want to write code that interacts with the
user in a particular way and then uses an unusual type of algorithm
when *selecting* a patient, that's fine. If you want to ensure that
certain conditions hold or that a particular action is taken when a
record is *added*, then the use of a special lookup is inappropriate.
What you should do instead depends on the nature of the constraint(s).
Alternatives (beyond the obvious choice of using MUMPS
cross-references) include keys and new style cross-references. I can't
be more specific without further details about the nature of the
constraint(s). But the point is that a special lookup routine is a UI
component, and using it in the way you describe is analogous to using a
modal dialog in a GUI to impose a restriction on the database. That
might "work", but it certainly doesn't make it a good design choice.

===
Gregory Woodhouse  <[EMAIL PROTECTED]>
"If you give someone Fortran, he has Fortran.
If you give someone Lisp, he has any language he pleases."
--Guy L. Steele, Jr. 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to