![]() ![]() |
Reference Type: Supported, Category: Device Handler, ICR#: 3771
The DEVICE^XUDHGUI API allows VistA Graphical User Interface (GUI)-based applications to look up devices. This API retrieves the first 20 devices that meet the specifications passed.
NOTE: This API was made available with Kernel Patch XU*8.0*220.
DEVICE^XUDHGUI(.list,starting_point[,direction][,right_margin_range])
.list: |
(required) Named array to store output. |
starting_point: |
(required) This parameter indicates where to start the $ORDERing of the Global.
|
direction: |
(optional) This parameter indicates whether to $ORDER up or down from the starting_point parameter. The acceptable values are 1 and -1:
|
right_margin_range: |
(optional) This parameter is used to specify a width range of devices:
|
.list: |
The data is returned in this named array. Data is returned in the following format: IEN^NAME^DISPLAY NAME^LOCATION^RIGHT MARGIN^PAGE LENGTH |
This example stores/displays a list of all devices that begin with P in an array (e.g., DEVICES), without passing a direction or right margin range parameter:
>K DEVICES >D DEVICE^XUDHGUI(.DEVICES,"P") |
The DEVICES array displays the following results:
>ZW DEVICES DEVICES(1)=358^P-MESSAGE-HFS^P-MESSAGE-HFS^HFS FILE=>MESSAGE^255^256 DEVICES(2)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999 DEVICES(3)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256 DEVICES(4)=292^P-RESMON^P-RESMON^IRM^132^64 DEVICES(5)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256 |
This example stores/displays a list of all devices that begin with P in an array (e.g., DEVICES), without passing a direction parameter but including those devices with a right margin of an exact width of 80:
>K DEVICES >D DEVICE^XUDHGUI(.DEVICES,"P",,"80-80") |
The DEVICES array displays the following results:
>ZW DEVICES DEVICES(1)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999 DEVICES(2)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256 DEVICES(3)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256 |
This example stores/displays a list of all devices that begin with P in an array (e.g., DEVICES), without passing a direction parameter but including those devices with a right margin width range of 80-132:
>K DEVICES >D DEVICE^XUDHGUI(.DEVICES,"P",,"80-132") |
The DEVICES array displays the following results:
>ZW DEVICES DEVICES(1)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999 DEVICES(2)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256 DEVICES(3)=292^P-RESMON^P-RESMON^IRM^132^64 DEVICES(4)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256 |
This example stores/displays a list of up to 20 devices, the first of which starts with P, in an array (e.g., DEVICES), without passing a direction or right margin range parameter:
>K DEVICES >D DEVICE^XUDHGUI(.DEVICES,"P*") |
The DEVICES array displays the following results:
>ZW DEVICES DEVICES(1)=358^P-MESSAGE-HFS^P-MESSAGE-HFS^HFS FILE=>MESSAGE^255^256 DEVICES(2)=348^P-MESSAGE-HFS-ONT^P-MESSAGE-HFS-ONT^HFS FILE==> MESSAGE^80^999 DEVICES(3)=274^P-MESSAGE-HFS-VXD^P-MESSAGE-HFS-VXD^HFS FILE==> MESSAGE^80^256 DEVICES(4)=292^P-RESMON^P-RESMON^IRM^132^64 DEVICES(5)=310^P-WINDOC^P-WINDOC^MWI WINDOW DOCUMENT BOX^80^256 DEVICES(6)=202^C6_SDD_MX3 ROUTINE^ROUTINE |