source: WorldVistAEHR/trunk/r/VICTORY_PROGRAMMING_ENVIRONMENT-ZVEM/ZVEMSN.m@ 623

Last change on this file since 623 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.3 KB
Line 
1ZVEMSN ;DJB,VSHL**VPE Notes [2/1/97 10:32am]
2 ;;12;VPE;;COPYRIGHT David Bolduc @1993
3 ;
4NOTES ;;;;
5 ;;; -----> V P E P A R A M E T E R P A S S I N G
6 ;;;
7 ;;; NOTE: When entering fields, if the field is a multiple you MUST use the
8 ;;; field's name, not it's number. When entering file or field names, if the
9 ;;; name contains a space you MUST enclose the name in quotes.
10 ;;;
11 ;;; 1) VEDD PARAM^%ZVEMD(File Name/Num,Menu Option Mnemonic,Field Names/Nums)
12 ;;; Ind Fld Sum............DO PARAM^%ZVEMD("USER","I",".01;2")
13 ;;; Fld Global Location....DO PARAM^%ZVEMD("USER","G",30)
14 ;;; ..VEDD USER I .01;2
15 ;;; ..VEDD "NEW PERSON" G 30
16 ;;;
17 ;;; 2) VGL PARAM^%ZVEMG(^Global -or- File Name)
18 ;;; DO PARAM^%ZVEMG("^VA(200") ..VGL ^VA(200
19 ;;; DO PARAM^%ZVEMG("NEW PERSON") ..VGL "NEW PERSON"
20 ;;;
21 ;;; 3) VRR PARAM^%ZVEMR(Routine Name)
22 ;;; DO PARAM^%ZVEMR("ZVEMD") ..VRR ZVEMD
23 ;;;
24 ;;; -----> V P E P R O G R A M M E R C A L L S
25 ;;;
26 ;;; 1) SINGLE CHARACTER READ
27 ;;; S X=$$READ^%ZVEMKRN X=String, VEE("K")=Key, VEE array left defined
28 ;;;
29 ;;; 2) STRING EDITOR
30 ;;; S CD=String D SCREEN^%ZVEMKEA("PROMPT:",2,75)
31 ;;; CD=Edited String, VEESHC=<RET>, VEE array left defined
32 ;;;
33 ;;; 3) CHOICE SELECTION
34 ;;; W !?2,"Proceed with deletion?" S X=$$CHOICE^%ZVEMKC("YES^NO",1,10,21)
35 ;;; 1=Option to be highlighted 10,21=$X,$Y (use when placing prompts)
36 ;;; For MSM, RM0 is in effect, after calling CHOICE.
37 ;;; Returns number of CHOICE selected, or 0. VEE array left defined.
38 ;;;
39 ;;; 4) MENU
40 ;;; Copy ^ZVEMSH,^ZVEMSHY. Change any calls to the new rtns.
41 ;;; Edit subroutine INIT^ROUTINE:
42 ;;; COLUMNS="6^7" ;Number of options in each column
43 ;;; WIDTH=31 ;Width of reverse video
44 ;;; HD=Heading ;Heading for new menu
45 ;;; Insert ";;***" in MENU lines and adj COLUMNS to reduce number of menu
46 ;;; options. Can be more than 2 columns. Edit TOPICS^ROUTINE for subheadings.
47 ;;; Ex: TOPICS+1 - ;;;E D I T;;;3;4
48 ;;;
49 ;;; 5) GENERIC SELECTOR
50 ;;; Put items in an array.
51 ;;; Call SELECTOR, passing 3 parameters:
52 ;;; Parameter 1: Array root
53 ;;; Parameter 2: 1=All choices in the display will be numbered
54 ;;; Parameter 3: 1=NEW allowed. This adds menu option N=New to bottom
55 ;;; of the screen. ^TMP("VPE","SELECT",$J,"NEW")="" will
56 ;;; be returned if user hits N. This allows user to
57 ;;; indicate that they want to add a new entry.
58 ;;;
59 ;;; SELECTOR will return items selected in ^TMP("VPE","SELECT",$J)
60 ;;;
61 ;;; Example: Build array of names:
62 ;;; ^TMP("TEST",$J,1)="Bolduc,David J."
63 ;;; ^TMP("TEST",$J,2)="Duck,Donald"
64 ;;; ^TMP("TEST",$J,3)="Mouse,Mickey"
65 ;;; Call SELECTOR:
66 ;;; D SELECT^%ZVEMKT("^TMP(""TEST"","_$J_")",1)
67 ;;; SELECTOR returns items selected:
68 ;;; ^TMP("VPE","SELECT",$J,1)="Bolduc,David J."
69 ;;;
70 ;;; You can control what SELECTOR returns in ^TMP("VPE","SELECT",$J).
71 ;;; When array is built, concantenate what you want returned, to the front
72 ;;; of the array node using $C(9) as a delimiter. A common returned value
73 ;;; is the item's Internal Entry Number. The SELECTOR will only display
74 ;;; the characters to the right of the $C(9).
75 ;;;
76 ;;; The default heading is "Select: ITEMS". You can replace the word ITEMS
77 ;;; with a word of your choice by setting a "HD" node in your array.
78 ;;;
79 ;;; Example:
80 ;;; ^TMP("TEST",$J,"HD")="PARTICIPANT"
81 ;;; ^TMP("TEST",$J,1)="234"_$C(9)_"Bolduc,David J."
82 ;;; ^TMP("TEST",$J,2)="45"_$C(9)_"Duck,Donald"
83 ;;; ^TMP("TEST",$J,3)="14"_$C(9)_"Mouse,Mickey"
84 ;;; If Bolduc were selected, SELECTOR would return:
85 ;;; ^TMP("VPE","SELECT",$J,1)="234$C(9)Bolduc,David J."
86 ;;;
87 ;;; 6) FILEMAN FIELD SELECTOR
88 ;;; D SELECT^%ZVEMKTF(FileNumber,LEVEL)
89 ;;; LEVEL: "TOP"=Top level flds only "ALL"=Include multiple flds
90 ;;; Example: D SELECT^%ZVEMKTF(200,"TOP")
91 ;;; Allows you to select from all top level fields
92 ;;; of the NEW PERSON file.
93 ;;; Returns array: ^TMP("VPE","FIELDS",$J,FILE#,FIELD#)
94 ;;;***
Note: See TracBrowser for help on using the repository browser.