PXRMFFH ;SLC/PKR - Routines for function finding help. ;03/01/2013
;;2.0;CLINICAL REMINDERS;**12,18,26**;Feb 04, 2005;Build 404
;
;======================================================
FSXHELP ;Function finding function string executable help.
N DIR0,DONE,IND,TEXT
S DONE=0
;Load the general help text.
F IND=1:1 Q:DONE D
. S TEXT(IND)=$P($T(GHTEXT+IND),";",3)
. I TEXT(IND)="**End Text**" K TEXT(IND) S DONE=1 Q
;Load the help text for the functions.
D GFTEXT(IND-2,.TEXT)
D BROWSE^DDBR("TEXT","NR","Function Finding Help")
I $D(DDS) D REFRESH^DDSUTL S DY=IOSL-7,DX=0 X IOXY S $Y=DY,$X=DX
Q
;
;======================================================
GFTEXT(START,TEXT) ;Load descriptions of available function finding
;GFTEXT(START,FUN,TEXT) ;Load descriptions of available function finding
;functions into the TEXT array starting at line START.
N IEN,IND,FUNCTION,NDL,NL,PNAME
S NL=START
S FUNCTION=""
F S FUNCTION=$O(^PXRMD(802.4,"B",FUNCTION)) Q:FUNCTION="" D
. S NL=NL+1,TEXT(NL)=" "_FUNCTION
S NL=NL+1,TEXT(NL)=""
S NL=NL+1,TEXT(NL)="Details for each function follow."
;
S FUNCTION=""
F S FUNCTION=$O(^PXRMD(802.4,"B",FUNCTION)) Q:FUNCTION="" D
. S IEN=$O(^PXRMD(802.4,"B",FUNCTION,""))
. S PNAME=$P(^PXRMD(802.4,IEN,0),U,4)
. S NL=NL+1,TEXT(NL)=" "
. S NL=NL+1,TEXT(NL)="Function: "_FUNCTION
. S NL=NL+1,TEXT(NL)="Print Name: "_PNAME
.;Load the description
. S NL=NL+1,TEXT(NL)="Description:"
. S NDL=+$P($G(^PXRMD(802.4,IEN,1,0)),U,4)
. F IND=1:1:NDL S NL=NL+1,TEXT(NL)=^PXRMD(802.4,IEN,1,IND,0)
Q
;
;======================================================
GHTEXT ;Function finding general help text.
;;The general form for a function finding string is:
;; FUN1(arg1,arg2,...argN) oper1 FUN2(arg1,arg2,...,argN) ...
;; where FUN1 stands for function 1, FUN2 function 2, and so on.
;; arg1,arg2,...,argN are the regular findings whose data are arguments
;; to the function and oper1 stands for a MUMPS operator.
;; The operators can be any of the following MUMPS operators:
;; !&-+*/\#<>='][
;;
;;When a function finding is evaluated, the result will be treated as a logical
;;true or false, where 0 is false and non-zero is true.
;;
;;An example of a function finding string is:
;; MRD(1,2)>MRD(5,6,7)
;;
;;This function finding will be true if the most recent date
;;of regular findings 1 and 2 is greater than the most recent
;;date of regular findings 5, 6, and 7.
;;
;;Comparisons to fixed values can also be made. An example of this is:
;;
;; MRD(1,2)>0
;;
;;Some dates associated with findings include time. For those functions
;;that have dates as arguments, if a date includes time, the full date
;;and time will be used in the calculation.
;;
;;The function finding functions are:
;;**End Text**
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMFFH 2866 printed Dec 13, 2024@01:45:26 Page 2
PXRMFFH ;SLC/PKR - Routines for function finding help. ;03/01/2013
+1 ;;2.0;CLINICAL REMINDERS;**12,18,26**;Feb 04, 2005;Build 404
+2 ;
+3 ;======================================================
FSXHELP ;Function finding function string executable help.
+1 NEW DIR0,DONE,IND,TEXT
+2 SET DONE=0
+3 ;Load the general help text.
+4 FOR IND=1:1
if DONE
QUIT
Begin DoDot:1
+5 SET TEXT(IND)=$PIECE($TEXT(GHTEXT+IND),";",3)
+6 IF TEXT(IND)="**End Text**"
KILL TEXT(IND)
SET DONE=1
QUIT
End DoDot:1
+7 ;Load the help text for the functions.
+8 DO GFTEXT(IND-2,.TEXT)
+9 DO BROWSE^DDBR("TEXT","NR","Function Finding Help")
+10 IF $DATA(DDS)
DO REFRESH^DDSUTL
SET DY=IOSL-7
SET DX=0
XECUTE IOXY
SET $Y=DY
SET $X=DX
+11 QUIT
+12 ;
+13 ;======================================================
GFTEXT(START,TEXT) ;Load descriptions of available function finding
+1 ;GFTEXT(START,FUN,TEXT) ;Load descriptions of available function finding
+2 ;functions into the TEXT array starting at line START.
+3 NEW IEN,IND,FUNCTION,NDL,NL,PNAME
+4 SET NL=START
+5 SET FUNCTION=""
+6 FOR
SET FUNCTION=$ORDER(^PXRMD(802.4,"B",FUNCTION))
if FUNCTION=""
QUIT
Begin DoDot:1
+7 SET NL=NL+1
SET TEXT(NL)=" "_FUNCTION
End DoDot:1
+8 SET NL=NL+1
SET TEXT(NL)=""
+9 SET NL=NL+1
SET TEXT(NL)="Details for each function follow."
+10 ;
+11 SET FUNCTION=""
+12 FOR
SET FUNCTION=$ORDER(^PXRMD(802.4,"B",FUNCTION))
if FUNCTION=""
QUIT
Begin DoDot:1
+13 SET IEN=$ORDER(^PXRMD(802.4,"B",FUNCTION,""))
+14 SET PNAME=$PIECE(^PXRMD(802.4,IEN,0),U,4)
+15 SET NL=NL+1
SET TEXT(NL)=" "
+16 SET NL=NL+1
SET TEXT(NL)="Function: "_FUNCTION
+17 SET NL=NL+1
SET TEXT(NL)="Print Name: "_PNAME
+18 ;Load the description
+19 SET NL=NL+1
SET TEXT(NL)="Description:"
+20 SET NDL=+$PIECE($GET(^PXRMD(802.4,IEN,1,0)),U,4)
+21 FOR IND=1:1:NDL
SET NL=NL+1
SET TEXT(NL)=^PXRMD(802.4,IEN,1,IND,0)
End DoDot:1
+22 QUIT
+23 ;
+24 ;======================================================
GHTEXT ;Function finding general help text.
+1 ;;The general form for a function finding string is:
+2 ;; FUN1(arg1,arg2,...argN) oper1 FUN2(arg1,arg2,...,argN) ...
+3 ;; where FUN1 stands for function 1, FUN2 function 2, and so on.
+4 ;; arg1,arg2,...,argN are the regular findings whose data are arguments
+5 ;; to the function and oper1 stands for a MUMPS operator.
+6 ;; The operators can be any of the following MUMPS operators:
+7 ;; !&-+*/\#<>='][
+8 ;;
+9 ;;When a function finding is evaluated, the result will be treated as a logical
+10 ;;true or false, where 0 is false and non-zero is true.
+11 ;;
+12 ;;An example of a function finding string is:
+13 ;; MRD(1,2)>MRD(5,6,7)
+14 ;;
+15 ;;This function finding will be true if the most recent date
+16 ;;of regular findings 1 and 2 is greater than the most recent
+17 ;;date of regular findings 5, 6, and 7.
+18 ;;
+19 ;;Comparisons to fixed values can also be made. An example of this is:
+20 ;;
+21 ;; MRD(1,2)>0
+22 ;;
+23 ;;Some dates associated with findings include time. For those functions
+24 ;;that have dates as arguments, if a date includes time, the full date
+25 ;;and time will be used in the calculation.
+26 ;;
+27 ;;The function finding functions are:
+28 ;;**End Text**
+29 QUIT
+30 ;