Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

$GET

M[UMPS] by Example

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,

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 28-Nov-2011, 21:03:45.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)