Difference between revisions of "Mumps Class 12"

From VistApedia
Jump to: navigation, search
 
(Added glossary link to Application~)
Line 812: Line 812:
 
}~75 = USER,PATCH
 
}~75 = USER,PATCH
 
}~76 = USER,TEST
 
}~76 = USER,TEST
}~77 = VPFS,APPLICATION PROXY
+
}~77 = VPFS,[[APPLICATION~|Application]] PROXY
 
}~78 = WVEHR,PATCH INSTALLER
 
}~78 = WVEHR,PATCH INSTALLER
}~79 = XOBVTESTER,APPLICATION PROXY
+
}~79 = XOBVTESTER,[[APPLICATION~|Application]] PROXY
 
}~80 = ZZ IT,MANAGER
 
}~80 = ZZ IT,MANAGER
  
Line 924: Line 924:
 
GARBAGE(75)="USER,PATCH"
 
GARBAGE(75)="USER,PATCH"
 
GARBAGE(76)="USER,TEST"
 
GARBAGE(76)="USER,TEST"
GARBAGE(77)="VPFS,APPLICATION PROXY"
+
GARBAGE(77)="VPFS,[[APPLICATION~|Application]] PROXY"
 
GARBAGE(78)="WVEHR,PATCH INSTALLER"
 
GARBAGE(78)="WVEHR,PATCH INSTALLER"
GARBAGE(79)="XOBVTESTER,APPLICATION PROXY"
+
GARBAGE(79)="XOBVTESTER,[[APPLICATION~|Application]] PROXY"
 
GARBAGE(80)="ZZ IT,MANAGER"
 
GARBAGE(80)="ZZ IT,MANAGER"
  
Line 1,016: Line 1,016:
 
BLAHBLAH(75)="USER,PATCH"
 
BLAHBLAH(75)="USER,PATCH"
 
BLAHBLAH(76)="USER,TEST"
 
BLAHBLAH(76)="USER,TEST"
BLAHBLAH(77)="VPFS,APPLICATION PROXY"
+
BLAHBLAH(77)="VPFS,[[APPLICATION~|Application]] PROXY"
 
BLAHBLAH(78)="WVEHR,PATCH INSTALLER"
 
BLAHBLAH(78)="WVEHR,PATCH INSTALLER"
BLAHBLAH(79)="XOBVTESTER,APPLICATION PROXY"
+
BLAHBLAH(79)="XOBVTESTER,[[APPLICATION~|Application]] PROXY"
 
BLAHBLAH(80)="ZZ IT,MANAGER"
 
BLAHBLAH(80)="ZZ IT,MANAGER"
  

Revision as of 01:09, 23 February 2012

Using username "worldvistaEHR".
Authenticating with public key "rsa-key-20101206"
Linux cassandra 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Feb 23 13:04:46 2011 from 192.168.56.2
worldvistaEHR@cassandra:~$ gtm

GTM>; Extrinsic Functions

GTM>; Instrinsic Functions (part of the Mumps language)

GTM>; Extrinsic Functions (user defined)

GTM>; Instrinsic -> case insensensive, $

GTM>; Extrinsic -> case sensitive, $$

GTM>ZED "KBANEXT"

GTM>zl
%GTM-E-LABELMISSING, Label referenced but not defined: PIECE
%GTM-I-SRCNAM, in source module /opt/worldvista/EHR/p/KBANEXT.m

GTM>zed

GTM>ZL

GTM>ZP ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:21pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Y SET X=$$PIECE2("CAT^DOG","^",2)  ; Extrinic Function
 QUIT
 ;
PIECE2(A,B,C) ; Function
 QUIT $PIECE(A,B,C)
GETFIVE() ; Function (Quit with Argument)
 QUIT 5

GTM>DO GETFIVE^KBANEXT()
%GTM-E-NOTEXTRINSIC, Quit does not return to an extrinsic function: argument not                     allowed
                At M source location GETFIVE+1^KBANEXT

GTM>WRITE $$GETFIVE^KBANEXT()
5
GTM>; Starts with $$

GTM>; Parameter list comes AFTER the routine name

GTM>WRITE $$GETFIVE()^KBANEXT
%GTM-E-SPOREOL, Either a space or an end-of-line was expected but not found
        WRITE $$GETFIVE()^KBANEXT
                         ^-----

GTM>; Other languages: KBANEXT::GETFIVE()

GTM>; Reversed in Mumps

GTM>; $$GETFIVE^KBANEXT(parameters)

GTM>zed

GTM>zl
%GTM-E-LOADRUNNING, Cannot ZLINK an active routine KBANEXT

GTM>zg

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:24pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5

GTM>; Examples of VISTA extrinsic functions

GTM>; Get Today's Date

GTM>WRITE $$NOW^XLFDT()
3110223.152539
GTM>WRITE $$FMTE^XLFDT(3110223.152539)
Feb 23, 2011@15:25:39
GTM>; Extrinsic functions can be expressions that return values

GTM>; like 2+2

GTM>; You can use Extrinsic functions whereever you use other expressions

GTM>; (like parameters)

GTM>WRITE $$FMTE^XLFDT($$NOW^XLFDT())
Feb 23, 2011@15:27:32
GTM>ZED "XLFDT"

GTM>zed

GTM>; How to pass parameters to Extrinsic Functions

GTM>; 3 ways

GTM>; Pass by Value

GTM>; Pass by Reference

GTM>; Pass by Name (same as pass by Value; but you get the data from indirecting
 name)

GTM>zed "KBANEXT"

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:33pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW A SET A=$$ADD1(2,3)
 WRITE A
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 QUIT Q+R
 ;


GTM>d ^KBANEXT
5
GTM>WRITE A
%GTM-E-UNDEF, Undefined local variable: A

GTM>ZED

GTM>zl

GTM>rec zp

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:35pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW A SET A=$$ADD1(2,3)
 WRITE "A is ",A,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT Q+R
 ;


GTM>rec d

GTM>d ^KBANEXT
Q is 2
R is 3
A is 5

GTM>zed

GTM>zl

GTM>rec zp

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:36pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Q SET Q=9
 NEW R SET R=8
 NEW A SET A=$$ADD1(2,3)
 WRITE "A is ",A,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT Q+R
 ;


GTM>rec d

GTM>d ^KBANEXT
Q is 2
R is 3
A is 5

GTM>

GTM>; When you pass by Value

GTM>; Mumps news the Variable name in the parameter list of the function

GTM>; Mumps sets the variable to the value you passed.

GTM>zed

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:38pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Q SET Q=9
 NEW R SET R=8
 NEW A SET A=$$ADD1(2,3)
 WRITE "A is ",A,!
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;


GTM>d ^KBANEXT
Q (inside function) is 2
R (inside function) is 3
A is 5
Q is 9
R is 8

GTM>; Pass by reference is different

GTM>zed

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:40pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Q SET Q=9
 NEW R SET R=8
 NEW A SET A=$$ADD1(Q,R)
 WRITE "A is ",A,!
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;


GTM>d ^KBANEXT
Q (inside function) is 9
R (inside function) is 8
A is 17
Q is 9
R is 8

GTM>zed

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:41pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Q SET Q=9
 NEW R SET R=8
 NEW A SET A=$$ADD1(.Q,.R)
 WRITE "A is ",A,!
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;


GTM>d ^KBANEXT
Q (inside function) is 9
R (inside function) is 8
A is 17
Q is 9
R is 8

GTM>zed

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:42pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Q SET Q=9
 NEW R SET R=8
 NEW A SET A=$$ADD1(.Q,.R)
 WRITE "A is ",A,!
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 SET Q=Q+1
 SET R=R+1
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;


GTM>d ^KBANEXT
Q (inside function) is 10
R (inside function) is 9
A is 19
Q is 10
R is 9

GTM>zed

GTM>zl

GTM>rec zp

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:42pm
 ;;
EN  ; Procedure
 NEW X SET X=$PIECE("CAT^DOG","^",2)  ; Instrinic Function
 NEW Z SET Z=$$GETFIVE()
 NEW Q SET Q=9
 NEW R SET R=8
 NEW A SET A=$$ADD1(Q,R)
 WRITE "A is ",A,!
 WRITE "Q is ",Q,!
 WRITE "R is ",R,!
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 SET Q=Q+1
 SET R=R+1
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;


GTM>rec d

GTM>d ^KBANEXT
Q (inside function) is 10
R (inside function) is 9
A is 19
Q is 9
R is 8

GTM>R is 9
%GTM-E-CMD, Command expected but not found
        R is 9
             ^-----

GTM>; When you pass data by reference?

GTM>; When you need to send a lot of data to or from a routine

GTM>; How?

GTM>zed

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:58pm
 ;;
EN  ; Procedure
 NEW I
 NEW TOADD
 FOR I=2,3,4,5,8 SET TOADD(I)=""
 WRITE "$$ADD2 is ",$$ADD2(.TOADD)
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 SET Q=Q+1
 SET R=R+1
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;
ADD2(VALUES)  ; Adds all first subscripts together
 N SUM S SUM=0
 N I S I=""
 FOR  SET I=$ORDER(VALUES(I)) QUIT:I=""  SET SUM=SUM+I
 QUIT SUM

GTM>zed

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 3:59pm
 ;;
EN  ; Procedure
 NEW I
 NEW TOADD
 FOR I=2,3,4,5,8 SET TOADD(I)=""
 BREAK
 WRITE "$$ADD2 is ",$$ADD2(.TOADD)
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 SET Q=Q+1
 SET R=R+1
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;
ADD2(VALUES)  ; Adds all first subscripts together
 N SUM S SUM=0
 N I S I=""
 BREAK
 FOR  SET I=$ORDER(VALUES(I)) QUIT:I=""  SET SUM=SUM+I
 BREAK
 QUIT SUM

GTM>D ^KBANEXT
%GTM-I-BREAK, Break instruction encountered
                At M source location EN+4^KBANEXT

GTM>

GTM>ZWRITE TOADD
TOADD(2)=""
TOADD(3)=""
TOADD(4)=""
TOADD(5)=""
TOADD(8)=""

GTM>ZCONTINUE
$$ADD2 is %GTM-I-BREAK, Break instruction encountered
                At M source location ADD2+3^KBANEXT

GTM>ZWRITE VALUES
VALUES(2)=""
VALUES(3)=""
VALUES(4)=""
VALUES(5)=""
VALUES(8)=""

GTM>WRITE SUM
0
GTM>GTM>ZWRITE VALUES
%GTM-E-INVCMD, Invalid command keyword encountered
        GTM>ZWRITE VALUES
        ^-----

GTM>GTM>ZWRITE VALUES
%GTM-E-INVCMD, Invalid command keyword encountered
        GTM>ZWRITE VALUES
        ^-----

GTM>ZCONTINUE
%GTM-I-BREAK, Break instruction encountered
                At M source location ADD2+5^KBANEXT

GTM>WRITE SUM
22
GTM>ZC
22
GTM>D P^DI


MSC FileMan 22.1039

Identity = INQ ??

Identity = 9  COORDINATOR,FIVE     FC     IRM     ANALYST
         ...OK? Yes//   (Yes)


Select OPTION: INQUIRE TO FILE ENTRIES



Output from what File: INSTALL// REMOTE PROCEDURE    (2465 entries)
Select REMOTE PROCEDURE NAME: ORWU NEWPERS
Another one:
Standard Captioned Output? Yes//   (Yes)
Include COMPUTED fields:  (N/Y/R/B): NO//  - No record number (IEN), no Computed
 Fields

NAME: ORWU NEWPERS                      TAG: NEWPERS
  ROUTINE: ORWU                         RETURN VALUE TYPE: ARRAY
 DESCRIPTION:
 Returns a set of New Person file entries for use in a long list box.



Select REMOTE PROCEDURE NAME:




Select OPTION:
GTM>N SAM

GTM>D NEWPER^ORWU(.SAM,"A",1)
%GTM-E-LABELMISSING, Label referenced but not defined: NEWPER

GTM>D NEWPERS^ORWU(.SAM,"A",1)

GTM>ZWRITE SAM
SAM(1)="14^Administrator,System"
SAM(2)="65^Analyst,One^- ANALYST"
SAM(3)="66^Analyst,Three^- ANALYST"
SAM(4)="69^Analyst,Two^- ANALYST"
SAM(5)="47^Clerk,Eight^- Medical Clerk"
SAM(6)="50^Clerk,Eleven^- Medical Clerk"
SAM(7)="54^Clerk,Fifteen^- Medical Clerk"
SAM(8)="44^Clerk,Five^- Medical Clerk"
SAM(9)="43^Clerk,Four^- Medical Clerk"
SAM(10)="53^Clerk,Fourteen^- Medical Clerk"
SAM(11)="48^Clerk,Nine^- Medical Clerk"
SAM(12)="46^Clerk,Seven^- Medical Clerk"
SAM(13)="45^Clerk,Six^- Medical Clerk"
SAM(14)="49^Clerk,Ten^- Medical Clerk"
SAM(15)="52^Clerk,Thirteen^- Medical Clerk"
SAM(16)="42^Clerk,Three^- Medical Clerk"
SAM(17)="51^Clerk,Twelve^- Medical Clerk"
SAM(18)="41^Clerk,Two^- Medical Clerk"
SAM(19)="58^Coordinator,Clinical^- CLINICAL COORDINATOR"
SAM(20)="9^Coordinator,Five^- ANALYST"
SAM(21)="3^Coordinator,Four"
SAM(22)="2^Coordinator,Nine"
SAM(23)="63^Coordinator,One^- ANALYST"
SAM(24)="64^Coordinator,Seven"
SAM(25)="60^Coordinator,Six^- CLINICAL COORDINATOR"
SAM(26)="67^Coordinator,Three^- ANALYST"
SAM(27)="68^Coordinator,Two^- ANALYST"
SAM(28)="21^Doctor,Eight^- Physician"
SAM(29)="24^Doctor,Eleven^- Physician"
SAM(30)="18^Doctor,Five^- Physician"
SAM(31)="17^Doctor,Four^- Physician"
SAM(32)="22^Doctor,Nine^- Physician"
SAM(33)="11^Doctor,One^- Physician"
SAM(34)="20^Doctor,Seven^- Physician"
SAM(35)="19^Doctor,Six^- Physician"
SAM(36)="23^Doctor,Ten^- Physician"
SAM(37)="16^Doctor,Three^- Physician"
SAM(38)="26^Doctor,Twelve^- Physician"
SAM(39)="15^Doctor,Two^- Physician"
SAM(40)="62^Lab,Superuser^- ANALYST"
SAM(41)="8^Manager,System^- System Manager"
SAM(42)="33^Nurse,Eight^- Nurse"
SAM(43)="36^Nurse,Eleven^- Nurse"
SAM(44)="40^Nurse,Fifteen^- Nurse"

GTM>ZED "ORWU"

GTM>zed

GTM>ZED "KBANEXT"

GTM>zl

GTM>zp ^KBANEXT
KBANEXT ; UJO/SMH - Extrinsic Functions ; 2/23/11 4:11pm
 ;;
EN  ; Procedure
 NEW I
 NEW TOADD
 FOR I=2,3,4,5,8 SET TOADD(I)=""
 BREAK
 WRITE "$$ADD2 is ",$$ADD2(.TOADD)
 QUIT
 ;
GETFIVE() ; Function (Quit with Argument)
 QUIT 5
 ;
ADD1(Q,R)
 SET Q=Q+1
 SET R=R+1
 WRITE "Q (inside function) is ",Q,!
 WRITE "R (inside function) is ",R,!
 QUIT Q+R
 ;
ADD2(VALUES)  ; Adds all first subscripts together
 N SUM S SUM=0
 N I S I=""
 BREAK
 FOR  SET I=$ORDER(VALUES(I)) QUIT:I=""  SET SUM=SUM+I
 BREAK
 QUIT SUM
GETF200(RETURN)
 NEW I SET I=""
 NEW COUNTER SET COUNTER=0
 FOR  SET I=$ORDER(^VA(200,"B",I)) QUIT:I=""  DO
 . SET RETURN(COUNTER)=I
 . SET COUNTER=COUNTER+1
 QUIT

GTM>D GETF200^KBANEXT(.GARBAGE)

GTM>ZWRITE GARBAGE
GARBAGE(0)="ADMINISTRATOR,SYSTEM"
GARBAGE(1)="ANALYST,ONE"
GARBAGE(2)="ANALYST,THREE"
GARBAGE(3)="ANALYST,TWO"
GARBAGE(4)="AUTHORIZER,IB MRA"
GARBAGE(5)="CENTRAL,PAID"
GARBAGE(6)="CLERK,EIGHT"
GARBAGE(7)="CLERK,ELEVEN"
GARBAGE(8)="CLERK,FIFTEEN"
GARBAGE(9)="CLERK,FIVE"
GARBAGE(10)="CLERK,FOUR"
GARBAGE(11)="CLERK,FOURTEEN"
GARBAGE(12)="CLERK,NINE"
GARBAGE(13)="CLERK,ONE"
GARBAGE(14)="CLERK,SEVEN"
GARBAGE(15)="CLERK,SIX"
GARBAGE(16)="CLERK,TEN"
GARBAGE(17)="CLERK,THIRTEEN"
GARBAGE(18)="CLERK,THREE"
GARBAGE(19)="CLERK,TWELVE"
GARBAGE(20)="CLERK,TWO"
GARBAGE(21)="COORDINATOR,CLINICAL"
GARBAGE(22)="COORDINATOR,EIGHT"
GARBAGE(23)="COORDINATOR,FIVE"
GARBAGE(24)="COORDINATOR,FOUR"
GARBAGE(25)="COORDINATOR,NINE"
GARBAGE(26)="COORDINATOR,ONE"
GARBAGE(27)="COORDINATOR,SEVEN"
GARBAGE(28)="COORDINATOR,SIX"
GARBAGE(29)="COORDINATOR,THREE"
GARBAGE(30)="COORDINATOR,TWO"
GARBAGE(31)="DOCTOR,EIGHT"
GARBAGE(32)="DOCTOR,ELEVEN"
GARBAGE(33)="DOCTOR,FIVE"
GARBAGE(34)="DOCTOR,FOUR"
GARBAGE(35)="DOCTOR,NINE"
GARBAGE(36)="DOCTOR,ONE"
GARBAGE(37)="DOCTOR,SEVEN"
GARBAGE(38)="DOCTOR,SIX"
GARBAGE(39)="DOCTOR,TEN"
GARBAGE(40)="DOCTOR,THREE"
GARBAGE(41)="DOCTOR,TWELVE"
GARBAGE(42)="DOCTOR,TWO"
GARBAGE(43)="EDILOCKBOX,AUTOMATIC"
GARBAGE(44)="HABIEL,SAM"
GARBAGE(45)="INTERFACE,IB IIV"
GARBAGE(46)="LAB,SUPERUSER"
GARBAGE(47)="LRLAB,HL"
GARBAGE(48)="LRLAB,POC"
GARBAGE(49)="MANAGER,SYSTEM"
GARBAGE(50)="NURSE,EIGHT"
GARBAGE(51)="NURSE,ELEVEN"
GARBAGE(52)="NURSE,FIFTEEN"
GARBAGE(53)="NURSE,FIVE"
GARBAGE(54)="NURSE,FOUR"
GARBAGE(55)="NURSE,FOURTEEN"
GARBAGE(56)="NURSE,NINE"
GARBAGE(57)="NURSE,ONE"
GARBAGE(58)="NURSE,SEVEN"
GARBAGE(59)="NURSE,SIX"
GARBAGE(60)="NURSE,TEN"
GARBAGE(61)="NURSE,THIRTEEN"
GARBAGE(62)="NURSE,THREE"
GARBAGE(63)="NURSE,TWELVE"
GARBAGE(64)="NURSE,TWO"
GARBAGE(65)="PATCHES,ALL D"
GARBAGE(66)="POSTMASTER"
GARBAGE(67)="PRCA,AUTOAUDIT"
GARBAGE(68)="RADIOLOGY,OUTSIDE SERVICE"
GARBAGE(69)="RUNNER,ROAD"
====================================================================================================

RETURN
}~0 = ADMINISTRATOR,SYSTEM
}~1 = ANALYST,ONE
}~2 = ANALYST,THREE
}~3 = ANALYST,TWO
}~4 = AUTHORIZER,IB MRA
}~5 = CENTRAL,PAID
}~6 = CLERK,EIGHT
}~7 = CLERK,ELEVEN
}~8 = CLERK,FIFTEEN
}~9 = CLERK,FIVE
}~10 = CLERK,FOUR =[CLERK,TEN],
}~11 = CLERK,FOURTEENstep INTO// SHOW RETURN
}~12 = CLERK,NINE
}~13 = CLERK,ONE==================================
}~14 = CLERK,SEVEN
}~15 = CLERK,SIXgger in THIS window.
}~16 = CLERK,TENgger CONTROLLER for another Process.
}~17 = CLERK,THIRTEENcontrol to a Controller.
}~18 = CLERK,THREE breakpoint
}~19 = CLERK,TWELVE breakpoint
}~20 = CLERK,TWOHER PROCESS
}~21 = COORDINATOR,CLINICAL
}~22 = COORDINATOR,EIGHT
}~23 = COORDINATOR,FIVEom last run
}~24 = COORDINATOR,FOUR===========================
}~25 = COORDINATOR,NINEbort): ^// 1
}~26 = COORDINATOR,ONE
}~27 = COORDINATOR,SEVEN
}~28 = COORDINATOR,SIX
}~29 = COORDINATOR,THREE
}~30 = COORDINATOR,TWO
}~31 = DOCTOR,EIGHT
}~32 = DOCTOR,ELEVEN
}~33 = DOCTOR,FIVE
}~34 = DOCTOR,FOUR
}~35 = DOCTOR,NINE
}~36 = DOCTOR,ONE
}~37 = DOCTOR,SEVENdebugging environment
}~38 = DOCTOR,SIX command...
}~39 = DOCTOR,TENETF200^KBANEXT(.GARBAGE)
=== Routine: ^KBANEXT (GETF200+5^KBANEXT) ==========================================================
 +25 FOR  SET I=$ORDER(VALUES(I)) QUIT:I=""  SET SUM=SUM+I
 +26 BREAK
 +27 QUIT SUM
 +28GETF200(RETURN)
 +29 NEW I SET I=""
 +30 NEW COUNTER SET COUNTER=0
 +31 FOR  SET I=$ORDER(^VA(200,"B",I)) QUIT:I=""  DO
 +32 . SET RETURN(COUNTER)=I
>+33 . SET COUNTER=COUNTER+1
 +34 QUIT
 +35
07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)
}COUNTER =[17], I =[CLERK,THIRTEEN],
Action (? for help): step INTO// CLS

}~56 = NURSE,NINE
}~57 = NURSE,ONE
}~58 = NURSE,SEVEN
}~59 = NURSE,SIX
}~60 = NURSE,TEN
}~61 = NURSE,THIRTEEN
}~62 = NURSE,THREE
}~63 = NURSE,TWELVE
}~64 = NURSE,TWO
}~65 = PATCHES,ALL D
}~66 = POSTMASTER
}~67 = PRCA,AUTOAUDIT
}~68 = RADIOLOGY,OUTSIDE SERVICE
}~69 = RUNNER,ROAD
}~70 = SAM,YOSEMEDIE
}~71 = SHARED,MAIL
}~72 = SHDIFAT,HANEEN
}~73 = STARTUP,SYSTEM
}~74 = USER,OVID
}~75 = USER,PATCH
}~76 = USER,TEST
}~77 = VPFS,[[APPLICATION~|Application]] PROXY
}~78 = WVEHR,PATCH INSTALLER
}~79 = XOBVTESTER,[[APPLICATION~|Application]] PROXY
}~80 = ZZ IT,MANAGER

----- Press Key To Continue -----
=== Routine: ^KBANEXT (GETF200+6^KBANEXT) ==========================================================
 +26 BREAK
 +27 QUIT SUM
 +28GETF200(RETURN)
 +29 NEW I SET I=""
 +30 NEW COUNTER SET COUNTER=0
 +31 FOR  SET I=$ORDER(^VA(200,"B",I)) QUIT:I=""  DO
 +32 . SET RETURN(COUNTER)=I
 +33 . SET COUNTER=COUNTER+1
>+34 QUIT
 +35
 +36
07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)07:45, 2 Apr 2011 (PDT)
}COUNTER =[81], I =[],
Action (? for help): step INTO//

}~31 = DOCTOR,EIGHT

----- Press Key To Continue -----

























(^ to quit) //Leaving TMG debugging environment.  Goodbye.

GTM>ZWRITE GARBAGE
GARBAGE(18)="CLERK,THREE"
GARBAGE(19)="CLERK,TWELVE"
GARBAGE(20)="CLERK,TWO"
GARBAGE(21)="COORDINATOR,CLINICAL"
GARBAGE(22)="COORDINATOR,EIGHT"
GARBAGE(23)="COORDINATOR,FIVE"
GARBAGE(24)="COORDINATOR,FOUR"
GARBAGE(25)="COORDINATOR,NINE"
GARBAGE(26)="COORDINATOR,ONE"
GARBAGE(27)="COORDINATOR,SEVEN"
GARBAGE(28)="COORDINATOR,SIX"
GARBAGE(29)="COORDINATOR,THREE"
GARBAGE(30)="COORDINATOR,TWO"
GARBAGE(31)="DOCTOR,EIGHT"
GARBAGE(32)="DOCTOR,ELEVEN"
GARBAGE(33)="DOCTOR,FIVE"
GARBAGE(34)="DOCTOR,FOUR"
GARBAGE(35)="DOCTOR,NINE"
GARBAGE(36)="DOCTOR,ONE"
GARBAGE(37)="DOCTOR,SEVEN"
GARBAGE(38)="DOCTOR,SIX"
GARBAGE(39)="DOCTOR,TEN"
GARBAGE(40)="DOCTOR,THREE"
GARBAGE(41)="DOCTOR,TWELVE"
GARBAGE(42)="DOCTOR,TWO"
GARBAGE(43)="EDILOCKBOX,AUTOMATIC"
GARBAGE(44)="HABIEL,SAM"
GARBAGE(45)="INTERFACE,IB IIV"
GARBAGE(46)="LAB,SUPERUSER"
GARBAGE(47)="LRLAB,HL"
GARBAGE(48)="LRLAB,POC"
GARBAGE(49)="MANAGER,SYSTEM"
GARBAGE(50)="NURSE,EIGHT"
GARBAGE(51)="NURSE,ELEVEN"
GARBAGE(52)="NURSE,FIFTEEN"
GARBAGE(53)="NURSE,FIVE"
GARBAGE(54)="NURSE,FOUR"
GARBAGE(55)="NURSE,FOURTEEN"
GARBAGE(56)="NURSE,NINE"
GARBAGE(57)="NURSE,ONE"
GARBAGE(58)="NURSE,SEVEN"
GARBAGE(59)="NURSE,SIX"
GARBAGE(60)="NURSE,TEN"
GARBAGE(61)="NURSE,THIRTEEN"
GARBAGE(62)="NURSE,THREE"
GARBAGE(63)="NURSE,TWELVE"
GARBAGE(64)="NURSE,TWO"
GARBAGE(65)="PATCHES,ALL D"
GARBAGE(66)="POSTMASTER"
GARBAGE(67)="PRCA,AUTOAUDIT"
GARBAGE(68)="RADIOLOGY,OUTSIDE SERVICE"
GARBAGE(69)="RUNNER,ROAD"
GARBAGE(70)="SAM,YOSEMEDIE"
GARBAGE(71)="SHARED,MAIL"
GARBAGE(72)="SHDIFAT,HANEEN"
GARBAGE(73)="STARTUP,SYSTEM"
GARBAGE(74)="USER,OVID"
GARBAGE(75)="USER,PATCH"
GARBAGE(76)="USER,TEST"
GARBAGE(77)="VPFS,[[APPLICATION~|Application]] PROXY"
GARBAGE(78)="WVEHR,PATCH INSTALLER"
GARBAGE(79)="XOBVTESTER,[[APPLICATION~|Application]] PROXY"
GARBAGE(80)="ZZ IT,MANAGER"

GTM>ZED

GTM>D GETF200^KBANEXT(.BLAHBLAH
%GTM-E-COMMAORRPAREXP, Comma or right parenthesis expected but not found
        D GETF200^KBANEXT(.BLAHBLAH
                                   ^-----

GTM>D GETF200^KBANEXT(.BLAHBLAH)

GTM>ZWRITE BLAHBLAH
BLAHBLAH(0)="ADMINISTRATOR,SYSTEM"
BLAHBLAH(1)="ANALYST,ONE"
BLAHBLAH(2)="ANALYST,THREE"
BLAHBLAH(3)="ANALYST,TWO"
BLAHBLAH(4)="AUTHORIZER,IB MRA"
BLAHBLAH(5)="CENTRAL,PAID"
BLAHBLAH(6)="CLERK,EIGHT"
BLAHBLAH(7)="CLERK,ELEVEN"
BLAHBLAH(8)="CLERK,FIFTEEN"
BLAHBLAH(9)="CLERK,FIVE"
BLAHBLAH(10)="CLERK,FOUR"
BLAHBLAH(11)="CLERK,FOURTEEN"
BLAHBLAH(12)="CLERK,NINE"
BLAHBLAH(13)="CLERK,ONE"
BLAHBLAH(14)="CLERK,SEVEN"
BLAHBLAH(15)="CLERK,SIX"
BLAHBLAH(16)="CLERK,TEN"
BLAHBLAH(17)="CLERK,THIRTEEN"
BLAHBLAH(18)="CLERK,THREE"
BLAHBLAH(19)="CLERK,TWELVE"
BLAHBLAH(20)="CLERK,TWO"
BLAHBLAH(21)="COORDINATOR,CLINICAL"
BLAHBLAH(22)="COORDINATOR,EIGHT"
BLAHBLAH(23)="COORDINATOR,FIVE"
BLAHBLAH(24)="COORDINATOR,FOUR"
BLAHBLAH(25)="COORDINATOR,NINE"
BLAHBLAH(26)="COORDINATOR,ONE"
BLAHBLAH(27)="COORDINATOR,SEVEN"
BLAHBLAH(28)="COORDINATOR,SIX"
BLAHBLAH(29)="COORDINATOR,THREE"
BLAHBLAH(30)="COORDINATOR,TWO"
BLAHBLAH(31)="DOCTOR,EIGHT"
BLAHBLAH(32)="DOCTOR,ELEVEN"
BLAHBLAH(33)="DOCTOR,FIVE"
BLAHBLAH(34)="DOCTOR,FOUR"
BLAHBLAH(35)="DOCTOR,NINE"
BLAHBLAH(36)="DOCTOR,ONE"
BLAHBLAH(37)="DOCTOR,SEVEN"
BLAHBLAH(38)="DOCTOR,SIX"
BLAHBLAH(39)="DOCTOR,TEN"
BLAHBLAH(40)="DOCTOR,THREE"
BLAHBLAH(41)="DOCTOR,TWELVE"
BLAHBLAH(42)="DOCTOR,TWO"
BLAHBLAH(43)="EDILOCKBOX,AUTOMATIC"
BLAHBLAH(44)="HABIEL,SAM"
BLAHBLAH(45)="INTERFACE,IB IIV"
BLAHBLAH(46)="LAB,SUPERUSER"
BLAHBLAH(47)="LRLAB,HL"
BLAHBLAH(48)="LRLAB,POC"
BLAHBLAH(49)="MANAGER,SYSTEM"
BLAHBLAH(50)="NURSE,EIGHT"
BLAHBLAH(51)="NURSE,ELEVEN"
BLAHBLAH(52)="NURSE,FIFTEEN"
BLAHBLAH(53)="NURSE,FIVE"
BLAHBLAH(54)="NURSE,FOUR"
BLAHBLAH(55)="NURSE,FOURTEEN"
BLAHBLAH(56)="NURSE,NINE"
BLAHBLAH(57)="NURSE,ONE"
BLAHBLAH(58)="NURSE,SEVEN"
BLAHBLAH(59)="NURSE,SIX"
BLAHBLAH(60)="NURSE,TEN"
BLAHBLAH(61)="NURSE,THIRTEEN"
BLAHBLAH(62)="NURSE,THREE"
BLAHBLAH(63)="NURSE,TWELVE"
BLAHBLAH(64)="NURSE,TWO"
BLAHBLAH(65)="PATCHES,ALL D"
BLAHBLAH(66)="POSTMASTER"
BLAHBLAH(67)="PRCA,AUTOAUDIT"
BLAHBLAH(68)="RADIOLOGY,OUTSIDE SERVICE"
BLAHBLAH(69)="RUNNER,ROAD"
BLAHBLAH(70)="SAM,YOSEMEDIE"
BLAHBLAH(71)="SHARED,MAIL"
BLAHBLAH(72)="SHDIFAT,HANEEN"
BLAHBLAH(73)="STARTUP,SYSTEM"
BLAHBLAH(74)="USER,OVID"
BLAHBLAH(75)="USER,PATCH"
BLAHBLAH(76)="USER,TEST"
BLAHBLAH(77)="VPFS,[[APPLICATION~|Application]] PROXY"
BLAHBLAH(78)="WVEHR,PATCH INSTALLER"
BLAHBLAH(79)="XOBVTESTER,[[APPLICATION~|Application]] PROXY"
BLAHBLAH(80)="ZZ IT,MANAGER"

GTM>; Guessing Game

GTM>; HW: Computer will pick a random number between 1 and 100

GTM>; Player has to guess the number

GTM>; Computer will compare number and say: too low, or too high; and try again;

GTM>; until players get it right.

GTM>; $RANDOME

GTM>; $RANDOM

GTM>WRITE $RANDOM(100)
48
GTM>WRITE $RANDOM(100)
33
GTM>WRITE $RANDOM(100)
38
GTM>WRITE $RANDOM(100)
57
GTM>WRITE $RANDOM(100)
63
GTM>WRITE $RANDOM(100)
68
GTM>WRITE $RANDOM(100)
69
GTM>WRITE $RANDOM(100)
3
GTM>WRITE $RANDOM(100)
44
GTM>WRITE $RANDOM(100)
86
GTM>WRITE $RANDOM(100)+1
28
GTM>WRITE $RANDOM(100)+1
10
GTM>WRITE $RANDOM(100)+1
79
GTM>WRITE $RANDOM(100)+1
77
GTM>WRITE $RANDOM(100)+1
92
GTM>WRITE $RANDOM(100)+1
62
GTM>WRITE $RANDOM(100)+1
54
GTM>WRITE $RANDOM(100)+1
1
GTM>