Mumps Class 6

 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: Thu Jan 20 02:51:53 2011 worldvistaEHR@cassandra:~$ gtm

GTM>; Structure of Mumps: Command, Argument, Command Argument

GTM>; comma: repeats a command

GTM>; colon : acts like a mini if on a command

GTM>; this is called post-conditional

GTM>; do and goto take post conditionals on arguments

GTM>; Set command

GTM>; Simple form

GTM>SET X=1

GTM>; with a comma

GTM>SET X=1,Y=2

GTM>; with parentheses

GTM>SET (X,Y)=3

GTM>; with $Piece and $Extract

GTM>SET X="MARY HAS A LITTLE LAMB"

GTM>WRITE $PIECE(X," ",2) HAS GTM>SET $PIECE(X," ",2)="HAD"

GTM>WRITE X MARY HAD A LITTLE LAMB GTM>SET $EXTRACT(X,1,2)="BU"

GTM>WRITE X BURY HAD A LITTLE LAMB GTM>WRITE X,Y BURY HAD A LITTLE LAMB3 GTM>; new line !

GTM>WRITE X,!,Y BURY HAD A LITTLE LAMB 3 GTM>READ X,Y 45 GTM>WRITE X 4 GTM>WRITE Y 5 GTM>WRITE ?15,"HELLO" HELLO GTM>WRITE ?20,"HELLO" HELLO GTM>; ? positions where the write happens on a screen

GTM>; # means form feed. For printers, starts the next page; For screens, it cle ars the screen

GTM>WRITE #

GTM>; Write can send control characters as well. Use $CHAR to send the character which you want to write.

GTM>; Write ASCII bell

GTM>WRITE $CHAR(7)

GTM>WRITE $CHAR(27),"[31m"

GTM>; I am in red!

GTM>; Reset terminal

GTM>WRITE $CHAR(27),"c"

GTM>; * notation for write

GTM>; Typically not standardized

GTM>; * usually means $Char

GTM>WRITE *27,"c"

GTM>; Read

GTM>; Normal Read

GTM>read X HELLO WORLD GTM>WRITE X HELLO WORLD GTM>READ X#3 HEL GTM>Read X#6 qwerty GTM>; using a # with read restricts it to a specific number of characters

GTM>Read X:5

GTM>WRITE X

GTM>WRITE X="" 1 GTM>; using : with read makes it wait only for a specific number of seconds befo re returning

GTM>d ^XUP

Setting up programmer environment This is a TEST account.

Access Code: ********* Terminal Type set to: C-VT100

Select OPTION NAME: EHR:cassandra>W DTIME 9999 EHR:cassandra>READ X:5

EHR:cassandra>WRITE X="" 1 EHR:cassandra>READ X:5

EHR:cassandra>ELSE WRITE "I didn't read anything" I didn't read anything EHR:cassandra>; if you time out, you can use Else to execute code after the time out

EHR:cassandra>READ X:5 ELSE WRITE "I didn't read anything" 4 EHR:cassandra>WRITE X 4 EHR:cassandra>READ X:5 ELSE WRITE "I didn't read anything" I didn't read anything EHR:cassandra>READ X

EHR:cassandra>WRITE X

EHR:cassandra>WRITE X="" 1 EHR:cassandra>; Using the *

EHR:cassandra>READ *X

EHR:cassandra>WRITE X 27 EHR:cassandra>; * allows you to read one character, including control characters

EHR:cassandra>; Kill command

EHR:cassandra>Removes either a local variable or a global variable. %GTM-E-INVCMD, Invalid command keyword encountered Removes either a local variable or a global variable. ^-

EHR:cassandra>; Removes either a local variable or a global variable.

EHR:cassandra>; WARNING: REMOVING A GLOBAL REMOVES IT FROM DISK

EHR:cassandra>; THIS MEAN YOU CAN REMOVE ALL PATIENTS FROM A DATABASE WITH A FEW CHARACTERS OF TYPING

EHR:cassandra>; If you have a ^ in front of a variable, it means that this varia ble is stored on disk, and you can retrieve it later.

EHR:cassandra>SET ^SAM=1

EHR:cassandra>; Just stored 1 on disk

EHR:cassandra>KILL ^SAM

EHR:cassandra>; Just removed ^SAM from the disk

EHR:cassandra>SET LOCALSAM=1

EHR:cassandra>KILL LOCALSAM

EHR:cassandra>KILL LOCALSAM

EHR:cassandra>; Kill allows you to remove a variable even if it is not present. This is a nice feature; you don't have to check if a variable exists before kill ing it.

EHR:cassandra>zed "PSOSTART"

EHR:cassandra>SET EMPLOYEE("NAME")="HABA,HABA"

EHR:cassandra>SET EMPLOYEE("PHONE",1)="07623423423"

EHR:cassandra>SET EMPLOYEE("PHONE",2)="098798709384"

EHR:cassandra>SET EMPLOYEE("PHONE",3)="9827349738"

EHR:cassandra>SET EMPLOYEE("DATE OF BIRTH")="20100101"

EHR:cassandra>zwrite EMPLOYEE EMPLOYEE("DATE OF BIRTH")=20100101 EMPLOYEE("NAME")="HABA,HABA" EMPLOYEE("PHONE",1)="07623423423" EMPLOYEE("PHONE",2)="098798709384" EMPLOYEE("PHONE",3)=9827349738

EHR:cassandra>; Kill kills off branches if requested

EHR:cassandra>; KILL EMPLOYEE will delete all of Employee

EHR:cassandra>; Kill EMPLOYEE("PHONE") will kill the phone tree, but nothing els e

EHR:cassandra>; Let's try it

EHR:cassandra>KILL EMPLOYEE("PHONE")

EHR:cassandra>ZWRITE EMPLOYEE EMPLOYEE("DATE OF BIRTH")=20100101 EMPLOYEE("NAME")="HABA,HABA"

EHR:cassandra>; To delete a specific node:

EHR:cassandra>KILL EMPLOYEE("PHONE",1)

EHR:cassandra>ZED

EHR:cassandra>