Introduced in the 1990 ANSI M[UMPS] language standard.
This function returns a value that is either equal to the value of the parameter specified, or to a default value.
SET VALUE=$GET(^PATIENT(ID,1,2,3))
Addition in the 1995 ANSI M[UMPS] language standard: allow for the specification of a default value when no original value is available.
SET TIMEOUT=$GET(TIMEOUT,300)
WRITE $JUSTIFY($GET(X,"--"),8)
SET STATUS=$GET(^STORAGE(ITEM),"Not for sale")
IF STATUS=0 SET STATUS="Sold out"
Examples with naked references:
$GET(GLVN)
SET ^ABC(1,2)="reset naked indicator"
; Naked indicator is now ^ABC(1,
SET ^(3,4)=$GET(^(5,6))
; 1. fetch ^(5,6) = ^ABC(1,5,6)
; 2. store ^(3,4) = ^ABC(1,5,3,4)
; Naked indicator is now: ^ABC(1,5,3,
$GET(GLVN,VALUE)
SET ^ABC(1,2)="reset naked indicator"
; Naked indicator is now ^ABC(1,
SET ^(3,4)=$GET(^(5,6),^(7,8))
; 1. fetch ^(5,6) = ^ABC(1,5,6)
; 2. fetch ^(7,8) = ^ABC(1,5,7,8)
; 3. store ^(3,4) = ^ABC(1,5,7,3,4)
; Naked indicator is now: ^ABC(1,5,7,3,
This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under
the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.