source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMFFH.m@ 619

Last change on this file since 619 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1PXRMFFH ; SLC/PKR - Routines for function finding help. ;12/23/2004
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 ;
4 ;======================================================
5FSXHELP ;Function finding function string executable help.
6 N DONE,IND,TEXT
7 S DONE=0
8 F IND=1:1 Q:DONE D
9 . S TEXT=$P($T(TEXT+IND),";",3)
10 . I TEXT="**End Text**" S DONE=1 Q
11 . W !,TEXT
12LOOP ;
13 K TEXT
14 S FUN=$$SELECT("^PXRMD(802.4)")
15 I FUN=0 Q
16 D GFTEXT(1,FUN,.TEXT)
17 D EN^DDIOL(.TEXT) G LOOP
18 Q
19 ;
20 ;======================================================
21GFTEXT(START,FUN,TEXT) ;Load descriptions of available function finding
22 ;functions into the TEXT array starting at line START.
23 N IEN,IND,NDL,NL,PNAME
24 S NL=START
25 S IEN=$O(^PXRMD(802.4,"B",FUN,""))
26 S PNAME=$P(^PXRMD(802.4,IEN,0),U,4)
27 S NL=NL+1,TEXT(NL)=" "
28 S NL=NL+1,TEXT(NL)="Function: "_FUN
29 S NL=NL+1,TEXT(NL)="Print Name: "_PNAME
30 ;Load the description
31 S NL=NL+1,TEXT(NL)="Description:"
32 S NDL=+$P($G(^PXRMD(802.4,IEN,1,0)),U,4)
33 F IND=1:1:NDL D
34 . S NL=NL+1,TEXT(NL)=^PXRMD(802.4,IEN,1,IND,0)
35 Q
36 ;
37 ;======================================================
38SELECT(GBL) ;
39 N CNT,DIR,DIROUT,DIRUT,DTOUT,DUOUT,FUN,X,Y
40 S DIR("A")="For help on the functions select from the available function types"
41 S DIR(0)="SO^"
42 S CNT=1
43 S FUN="" F S FUN=$O(@GBL@("B",FUN)) Q:FUN="" D
44 . I CNT=1 S DIR(0)=DIR(0)_CNT_":"_FUN
45 . I CNT>1 S DIR(0)=DIR(0)_";"_CNT_":"_FUN
46 . S CNT=CNT+1
47 D ^DIR
48 I Y=""!(Y["^") Q +Y
49 Q Y(0)
50 ;
51 ;======================================================
52TEXT ;Function finding help text.
53 ;;The general form for a function finding is:
54 ;; FUN1(arg1,arg2,...argN) oper1 FUN2(arg1,arg2,...,argN) ...
55 ;; where FUN1 stands for function 1, FUN2 function 2, and so on.
56 ;; arg1,arg2,...,argN are the regular findings whose data are arguments
57 ;; to the function and oper1 stands for a Mumps operator.
58 ;; The operators can be any of the following Mumps operators:
59 ;; +,-,>,<,=,&,!, and '.
60 ;;
61 ;;When a function finding is evaluated the result will be treated as a logical
62 ;;true or false, where 0 is false and non-zero is true.
63 ;;
64 ;;An example of a function finding is: MRD(1,2)>MRD(5,6,7)
65 ;;This function finding will be true if the most recent date
66 ;;of regular findings 1 and 2 is greater than the most recent
67 ;;date of regular findings 5, 6, and 7.
68 ;;
69 ;;**End Text**
70 Q
71 ;
Note: See TracBrowser for help on using the repository browser.