1 | GMRCSLMA ;SLC/DLT - List Manager protocol entry, exit actions ; 11/25/2000
|
---|
2 | ;;3.0;CONSULT/REQUEST TRACKING;**4,18**;DEC 27, 1997
|
---|
3 | ; This routine invokes IA #875,#2638
|
---|
4 | ;Variables used in entry and exit actions
|
---|
5 | ; GMRCALFL is 1 flags the action is executing from an alert
|
---|
6 | ; set logic is GMRCALFL=$S($D(XQAID)&($D(XQADATA):1,1:0)
|
---|
7 | ; VALMBCK="R" to refresh screen
|
---|
8 | ; =NULL to clear bottom portion of screen and prompt for action
|
---|
9 | ; =Q to exit List manager
|
---|
10 | ; GMRC("NMBR") = the currently highlighed entry in the list
|
---|
11 | ; BLK=
|
---|
12 | ; LNCT= Set to 1 if the GMRCALFL flag is 1
|
---|
13 | ; GMRCQUT= if defined than exit list manager?
|
---|
14 | ; GMRCEN = defined if branched to date range prompt by EN^GMRCSLM
|
---|
15 | ; GMRCOER= used to indicate whether CPRS or consults initiated action
|
---|
16 | ; 0 for Consults List Manager
|
---|
17 | ; 1 for GUI
|
---|
18 | ; 2 for CPRS Consults tab to Detailed Display
|
---|
19 | ; ^TMP("GMRC",$J,"CURRENT","MENU"))= the action menu for user
|
---|
20 | ; based on the service by EN^GMRCMENU
|
---|
21 | ;Entry points called:
|
---|
22 | ; AD^GMRCSLM1 ;Loop through AD cross-reference doing SET
|
---|
23 | ; SET^GMRCSLM1 ;Format entries into ^TMP("GMRCR",$J,"CS"
|
---|
24 | ; INIT^GMRCSLM ;Initialize variables and list array
|
---|
25 | ; END^GMRCSLM1 ;Resets BLK and LNCT and kills variables
|
---|
26 | ; HDR^GMRCSLM ;Reset the VALMHDR values
|
---|
27 | ; AGAIN^GMRCSLMV(GMRC("NMBR")) ;Reset the video attribute only, do not redisplay
|
---|
28 | ; RESET^GMRCSLMV(GMRC("NMBR")) ;turn reverse video off when another item is selected
|
---|
29 | ;
|
---|
30 | ENTRY(TYPE) ; -- Entry action for list manager actions
|
---|
31 | ;Actions: RT,DT
|
---|
32 | ;TYPE="" when the list and header have no change
|
---|
33 | ;TYPE["L"
|
---|
34 | ; Assumes Rebuild the list due to change in the list information
|
---|
35 | ; Use for GMRCACT CANCEL REQUEST, GMRCACT DISCONTINUE
|
---|
36 | ; GMRCACT COMPLETE,GMRCACT EDIT/RESUBMIT
|
---|
37 | ;TYPE["H"
|
---|
38 | ; Assumes need to rebuild the header too due to change in the list
|
---|
39 | ; manager used while processing the action
|
---|
40 | ; Use for GMRCACT COMPLETE, DD, RT, since it goes to TIU
|
---|
41 | S VALMBCK="R"
|
---|
42 | ;Q:$D(GMRCQUT)
|
---|
43 | ;
|
---|
44 | I $D(GMRCALFL) D Q ;Processing from an alert, quit
|
---|
45 | . K ^TMP("GMRCR",$J,"CS"),GMRCDA
|
---|
46 | . S BLK=0,LNCT=1
|
---|
47 | . S VALMBCK="R"
|
---|
48 | . D SET^GMRCSLM1
|
---|
49 | . D INIT^GMRCSLM
|
---|
50 | . ;D END^GMRCSLM1 ;cancel,receive
|
---|
51 | . Q
|
---|
52 | ;
|
---|
53 | ;Processing from Consults action
|
---|
54 | I $G(TYPE)["L" D AD^GMRCSLM1,INIT^GMRCSLM S VALMBG=1
|
---|
55 | I $G(TYPE)["H" D HDR^GMRCSLM,INIT^GMRCSLM
|
---|
56 | Q
|
---|
57 | ;alert logic not flushed out
|
---|
58 | ;. I $G(TYPE)["L" D
|
---|
59 | ;. . ; rebuild the list
|
---|
60 | ;. . K ^TMP("GMRCR",$J,"CS")
|
---|
61 | ;. . D SET^GMRCSLM1
|
---|
62 | ;. . D INIT^GMRCSLM
|
---|
63 | ;. I $G(TYPE)["H" D HDR^GMRCSLM,INIT^GMRCSLM
|
---|
64 | ;. I $G(TYPE)["L" D END^GMRCSLM1 ;cancel,receive
|
---|
65 | ;. Q
|
---|
66 | ;
|
---|
67 | EXIT(LINE) ; -- Exit action for list manager to refresh screen and reset the menu
|
---|
68 | ;Actions using this: RT,DT
|
---|
69 | ;LINE contains "A" Re-highlight line on list
|
---|
70 | ;LINE contains "R" Remove highlight on list
|
---|
71 | ;Used by GMRCACT CANCEL REQUEST,GMRCACT COMMENT ORDERS,
|
---|
72 | ; GMRCACT EDIT/RESUBMIT
|
---|
73 | I "A"[LINE,$D(GMRC("NMBR")) D AGAIN^GMRCSLMV(GMRC("NMBR")) ;DD entry and RD exit action
|
---|
74 | I "R"[LINE,$D(GMRC("NMBR")) D RESET^GMRCSLMV(GMRC("NMBR")) K GMRC("NMBR")
|
---|
75 | S VALMBCK="R"
|
---|
76 | S:$D(^TMP("GMRC",$J,"CURRENT","MENU")) XQORM("HIJACK")=^("MENU")
|
---|
77 | S VALMBG=1
|
---|
78 | K GMRCSEL,GMRCO,GMRCND
|
---|
79 | Q
|
---|
80 | ;
|
---|
81 | PHDR ; -- protocol header code called from the protocol action menus
|
---|
82 | ;S VALMSG=$$MSG
|
---|
83 | D SHOW^VALM
|
---|
84 | S XQORM("#")=$O(^ORD(101,"B","GMRC SELECT ITEM",0))_"^1:"_VALMCNT
|
---|
85 | S XQORM("A")="Select: "
|
---|
86 | S XQORM("KEY","EX")=$O(^ORD(101,"B","GMRCACT QUIT",0))_"^1"
|
---|
87 | S XQORM("KEY","Q")=$O(^ORD(101,"B","GMRCACT QUIT",0))_"^1"
|
---|
88 | S XQORM("KEY","CLOSE")=$O(^ORD(101,"B","GMRCACT QUIT",0))_"^1"
|
---|
89 | S XQORM("KEY","NX")=$O(^ORD(101,"B","GMRCACT NEXT SCREEN",0))_"^1"
|
---|
90 | S XQORM("KEY","NEXT")=$O(^ORD(101,"B","GMRCACT NEXT SCREEN",0))_"^1"
|
---|
91 | S XQORM("KEY","PS")=$O(^ORD(101,"B","GMRCACT PRINT CONSULT FORM",0))_"^1"
|
---|
92 | S XQORM("KEY","CM")=$O(^ORD(101,"B","GMRCACT COMMENT ORDERS",0))_"^1"
|
---|
93 | K GMRCNMBR
|
---|
94 | Q
|
---|
95 | ;I '+$G(OVRRIDE),$$VALID^GMRCAU(+$G(GMRCSS)) D ;set 2.5 mnem's into XQORM("KEY")
|
---|
96 | ;. S XQORM("KEY","AC")="$O(^ORD(101,"B","GMRCACT ADMIN COMPLETE",0)_"^1"
|
---|
97 | ;. S XQORM("KEY","DY")=$O(^ORD(101,"B","GMRCACT CANCEL",0))_"^1"
|
---|
98 | ;. S XQORM("KEY","ED")=$O(^ORD(101,"B","GMRC CHANGE ORDERS",0))_"^1"
|
---|
99 | Q
|
---|
100 | MSG() ; -- LMgr message bar
|
---|
101 | Q "Enter the number of the item you wish to act on, or select an action."
|
---|
102 | ;
|
---|
103 | MARGIN ; -- Reset bottom margin if menu display off
|
---|
104 | N BM S BM=$S(VALMMENU:17,1:21) Q:BM=VALM("BM") ; no change
|
---|
105 | S VALM("BM")=BM,VALM("LINES")=VALM("BM")-VALM("TM")+1,VALMBCK="R"
|
---|
106 | Q
|
---|
107 | ;
|
---|
108 | SELEXIT ; -- Exit action for list manager when selection criteria changed
|
---|
109 | S:$D(^TMP("GMRC",$J,"CURRENT","MENU")) XQORM("HIJACK")=^("MENU")
|
---|
110 | S VALMBCK="R"
|
---|
111 | Q:($D(GMRCQUT)!$D(GMRCQUIT)) ;status exit using GMRCQUIT??
|
---|
112 | I $D(GMRC("NMBR")) D RESET^GMRCSLMV(GMRC("NMBR")) K GMRC("NMBR")
|
---|
113 | D AD^GMRCSLM1
|
---|
114 | D INIT^GMRCSLM ;from select patient, select service
|
---|
115 | D HDR^GMRCSLM ;from select patient, select date range
|
---|
116 | K GMRCSEL,GMRCO,GMRCND
|
---|
117 | Q
|
---|
118 | ;
|
---|