Here's something I wrote a few weeks back (not on hardhats) that might be helpful:
As you probably know, the parameter tool is designed to manage a set of key/value pairs very much like the Windows registry. The key point is that the same key may be defined at various levels of granularity: "USR" (user), "CLS" (class), "LOC" (location), "SRV" (service), "DIV" (division), “SYS” (system), “PKG” (package), and more. The key point (no pun intended...well, maybe a little) is that a given key can be associated with different types of granularity (called “entities” in the parameter tool documentation), and when retrieving a parameter value, you needn’t specify the particuar entity in which you are interested. In fact, a common use case is searching through a list (e.g., “USR^CLS^PKG”) or through all of them, looking for the first “hit”. Now, why might this be useful? Imagine a parameter that contains the location of a laboratory. Most physicians may wish to use th nearest laboratory (a hit under “LOC”), but maybe there is no laboratory associated with their location and they need a default. It’s also possible that a physician may practice a specialty where not just any laboratory will do, but instead they may need to use a laboratory that has more specialized equipment, even if it isn’t the closest. Now, one thing that can be confusing about the parameter tool is that some entity types need to be qualified and some do not. For example, I have used “USR” level parameterts to allow users to specify where they want certain host files saved (or retrieved). Different users have different default directories under VMS, and so they want to get different answers when asking for a directory to use. Accordingly, in the generic query (CSLQQ) you find the following S UDIR=$$GET^XPAR("USR","CSL QUERY DEFINITION DIR") But how does the parameter tool know which user is invoking this code? The obvious answer is that it looks at DUZ. But what if I wanted a value associatd with a location? That’s harder because there is no convenient variable to check. The answer is that “LOC” needs to be qualified in the call using “LOC.somewhere” instead of just “LOC”. The following code, kindly supplied by Kevin Meldrum, shows how a value might be qualified at runtime by setting LOC to the SERVICE/SECTION pulled from file 200 and appending the internal value to “SRV”. (The entity “LOC” is used to refer to entires in the HOSPITAL LOCATION file (#44). I realize I’m kind of confusing things by switching from “LOC” to “SRV”. Sorry about that.) S LOC=+$G(LOC)_";SC(" I 'LOC S LOC="" S ANENT="ALL^"_LOC_$S($G(^VA(200,DUZ,5)):"^SRV.`"_+$G(^(5)),1:"") S MNU=$$GET^XPAR(ANENT,"ORWDX WRITE ORDERS LIST",1,"I") Q:'MNU I believe it is possible to use a .01 value here, but a pointer may be used as “`253” or (in variable pointer syntax) “253;SC(“. Generally “PKG” is the “value of last resort”, that is, the least specific value you may wish to associate with a key. System, or “SYS” is one step down from that, giving a value that applies to anyone using the parameter at a given facility (unless something more specific matches, instead). Clear as mud? --- ELSIE CASUGAY <[EMAIL PROTECTED]> wrote: > The parameter shown below allows you to add/remove from the orders > tab. > > You can also define by > 1 User USR [choose from NEW PERSON] > 2 Location LOC [choose from HOSPITAL LOCATION] > 2.3 Service SRV [choose from SERVICE/SECTION] > 2.7 Division DIV [choose from INSTITUTION] > 3 System SYS [IMGDEM01.MED.VA.GOV] > 4 Package PKG [ORDER ENTRY/RESULTS REPORTING] > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Monday, March 07, 2005 3:32 PM > To: hardhats-members@lists.sourceforge.net > Subject: [Hardhats-members] Orders List > > I do not understand the purpose and functions of the General > Parameters > Tools Options. What are we really editing when we edit a parameter > as in > the case below? Is it just to edit the sequence numbers for > individual > orders that are under an order like ORWOR WRITE ORDERS LIST? > > Jim Gray > > > RE: [Hardhats-members] Orders list > > ELSIE CASUGAY > Mon, 28 Feb 2005 14:12:18 -0800 > > To add from the list use this option. See examples below. The files > are > coming from the ORDER DIALOG FILE. You might have to create the > list. > Usually you can copy an existing one and modify it to your taste. To > do > that you have to use this menu (MN Enter/edit order menus [ORCM > MENU]). > There are existing one you can use to copy and make it your own. > They are > called OR ADD MENU CLINICIAN...NURSE..WARD CLERK. You can copy these > and to > make it your own call them ORZ ADD MENU CLINICIAN or NURSE or WARD > CLERK. > Good luck and have fun using the menu. If you have anymore questions > just > post your questions. > > D ^XUP > OPTION NAME: XPAR MENU > > LV List Values for a Selected Parameter > LE List Values for a Selected Entity > LP List Values for a Selected Package > LT List Values for a Selected Template > EP Edit Parameter Values > ET Edit Parameter Values with Template > EK Edit Parameter Definition Keyword > > > You have PENDING ALERTS > Enter "VA to jump to VIEW ALERTS option > > > You've got PRIORITY mail! > > > Select General Parameter Tools Option: EP Edit Parameter Values > --- Edit Parameter Values --- > > Select PARAMETER DEFINITION NAME: WRITE > 1 WRITE ORDERS (INPATIENT) ORW ADDORD INPT Write Orders > (Inpatient) > 2 WRITE ORDERS (INPATIENT) ORWOR WRITE ORDERS LIST Write > Orders > (Inpat > ient) > CHOOSE 1-2: 2 ORWOR WRITE ORDERS LIST Write Orders (Inpatient) > > ORWOR WRITE ORDERS LIST may be set for the following: > > 1 User USR [choose from NEW PERSON] > 2 Location LOC [choose from HOSPITAL LOCATION] > 2.3 Service SRV [choose from SERVICE/SECTION] > 2.7 Division DIV [choose from INSTITUTION] > 3 System SYS [IMGDEM01.MED.VA.GOV] > 4 Package PKG [ORDER ENTRY/RESULTS REPORTING] > > Enter selection: 4 Package ORDER ENTRY/RESULTS REPORTING > > Parameters set for 'Package' may be replaced if ORDER ENTRY/RESULTS > REPORTING > is installed in this account. > > Setting ORWOR WRITE ORDERS LIST for Package: ORDER ENTRY/RESULTS > REPORTING > Select Sequence: ? > > > Sequence Value > -------- ----- > 20 GMRAOR ALLERGY ENTER/EDIT > 30 FHW1 > 52 PSJ OR PAT OE > 53 PSH OERR > 55 PSO OERR > 58 PSJI OR PAT FLUID OE > 60 LR OTHER LAB TESTS > 70 RA OERR EXAM > 80 GMRCOR CONSULT > 85 GMRCOR REQUEST > 90 GMRVOR > 99 OR GXTEXT WORD PROCESSING ORDER > 110 ORZ ADD MENU CLINICIAN > 115 ORZ ADD MENU (IMAGING CONSULT/PROCEDURE) > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Monday, February 28, 2005 4:50 PM > To: hardhats-members@lists.sourceforge.net > Subject: [Hardhats-members] Orders list > > I have a question about the control of orders from the Fileman side > of CPRS. > In CPRS there is an orders tab. If you click on that you get a list > of > things that can be ordered on the left side of the window. What file > is > that list coming from? Is it from either 100.98 or 101.41? Where > is the > parameter that controls what list to present in that box? Is there > are roll > and scroll menu to edit that list? I am open to reading the > manuals, but I > am finding it very hard to find answers in the manuals for CPRS. > > Jim Gray > > > ------------------------------------------------------- > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Hardhats-members mailing list > Hardhats-members@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hardhats-members > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Hardhats-members mailing list > Hardhats-members@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hardhats-members > ===== A practical man is a man who practices the errors of his forefathers. --Benjamin Disraeli ==== Greg Woodhouse [EMAIL PROTECTED] [EMAIL PROTECTED] ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members