Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRCSLMA

GMRCSLMA.m

Go to the documentation of this file.
  1. GMRCSLMA ;SLC/DLT - List Manager protocol entry, exit actions ; 11/25/2000
  1. ;;3.0;CONSULT/REQUEST TRACKING;**4,18,63**;DEC 27, 1997;Build 10
  1. ; This routine invokes IA #875,#2638
  1. ;Variables used in entry and exit actions
  1. ; GMRCALFL is 1 flags the action is executing from an alert
  1. ; set logic is GMRCALFL=$S($D(XQAID)&($D(XQADATA):1,1:0)
  1. ; VALMBCK="R" to refresh screen
  1. ; =NULL to clear bottom portion of screen and prompt for action
  1. ; =Q to exit List manager
  1. ; GMRC("NMBR") = the currently highlighed entry in the list
  1. ; BLK=
  1. ; LNCT= Set to 1 if the GMRCALFL flag is 1
  1. ; GMRCQUT= if defined than exit list manager?
  1. ; GMRCEN = defined if branched to date range prompt by EN^GMRCSLM
  1. ; GMRCOER= used to indicate whether CPRS or consults initiated action
  1. ; 0 for Consults List Manager
  1. ; 1 for GUI
  1. ; 2 for CPRS Consults tab to Detailed Display
  1. ; ^TMP("GMRC",$J,"CURRENT","MENU"))= the action menu for user
  1. ; based on the service by EN^GMRCMENU
  1. ;Entry points called:
  1. ; AD^GMRCSLM1 ;Loop through AD cross-reference doing SET
  1. ; SET^GMRCSLM1 ;Format entries into ^TMP("GMRCR",$J,"CS"
  1. ; INIT^GMRCSLM ;Initialize variables and list array
  1. ; END^GMRCSLM1 ;Resets BLK and LNCT and kills variables
  1. ; HDR^GMRCSLM ;Reset the VALMHDR values
  1. ; AGAIN^GMRCSLMV(GMRC("NMBR")) ;Reset the video attribute only, do not redisplay
  1. ; RESET^GMRCSLMV(GMRC("NMBR")) ;turn reverse video off when another item is selected
  1. ;
  1. ENTRY(TYPE) ; -- Entry action for list manager actions
  1. ;Actions: RT,DT
  1. ;TYPE="" when the list and header have no change
  1. ;TYPE["L"
  1. ; Assumes Rebuild the list due to change in the list information
  1. ; Use for GMRCACT CANCEL REQUEST, GMRCACT DISCONTINUE
  1. ; GMRCACT COMPLETE,GMRCACT EDIT/RESUBMIT
  1. ;TYPE["H"
  1. ; Assumes need to rebuild the header too due to change in the list
  1. ; manager used while processing the action
  1. ; Use for GMRCACT COMPLETE, DD, RT, since it goes to TIU
  1. S VALMBCK="R"
  1. ;Q:$D(GMRCQUT)
  1. ;
  1. I $D(GMRCALFL) D Q ;Processing from an alert, quit
  1. . K ^TMP("GMRCR",$J,"CS"),GMRCDA
  1. . S BLK=0,LNCT=1
  1. . S VALMBCK="R"
  1. . D SET^GMRCSLM1
  1. . D INIT^GMRCSLM
  1. . S VALMCNT=1
  1. . ;D END^GMRCSLM1 ;cancel,receive
  1. . Q
  1. ;
  1. ;Processing from Consults action
  1. I $G(TYPE)["L" D AD^GMRCSLM1,INIT^GMRCSLM S VALMBG=1
  1. I $G(TYPE)["H" D HDR^GMRCSLM,INIT^GMRCSLM
  1. Q
  1. ;alert logic not flushed out
  1. ;. I $G(TYPE)["L" D
  1. ;. . ; rebuild the list
  1. ;. . K ^TMP("GMRCR",$J,"CS")
  1. ;. . D SET^GMRCSLM1
  1. ;. . D INIT^GMRCSLM
  1. ;. I $G(TYPE)["H" D HDR^GMRCSLM,INIT^GMRCSLM
  1. ;. I $G(TYPE)["L" D END^GMRCSLM1 ;cancel,receive
  1. ;. Q
  1. ;
  1. EXIT(LINE) ; -- Exit action for list manager to refresh screen and reset the menu
  1. ;Actions using this: RT,DT
  1. ;LINE contains "A" Re-highlight line on list
  1. ;LINE contains "R" Remove highlight on list
  1. ;Used by GMRCACT CANCEL REQUEST,GMRCACT COMMENT ORDERS,
  1. ; GMRCACT EDIT/RESUBMIT
  1. I "A"[LINE,$D(GMRC("NMBR")) D AGAIN^GMRCSLMV(GMRC("NMBR")) ;DD entry and RD exit action
  1. I "R"[LINE,$D(GMRC("NMBR")) D RESET^GMRCSLMV(GMRC("NMBR")) K GMRC("NMBR")
  1. S VALMBCK="R"
  1. S:$D(^TMP("GMRC",$J,"CURRENT","MENU")) XQORM("HIJACK")=^("MENU")
  1. S VALMBG=1
  1. K GMRCSEL,GMRCO,GMRCND
  1. Q
  1. ;
  1. PHDR ; -- protocol header code called from the protocol action menus
  1. ;S VALMSG=$$MSG
  1. D SHOW^VALM
  1. S XQORM("#")=$O(^ORD(101,"B","GMRC SELECT ITEM",0))_"^1:"_VALMCNT
  1. S XQORM("A")="Select: "
  1. S XQORM("KEY","EX")=$O(^ORD(101,"B","GMRCACT QUIT",0))_"^1"
  1. S XQORM("KEY","Q")=$O(^ORD(101,"B","GMRCACT QUIT",0))_"^1"
  1. S XQORM("KEY","CLOSE")=$O(^ORD(101,"B","GMRCACT QUIT",0))_"^1"
  1. S XQORM("KEY","NX")=$O(^ORD(101,"B","GMRCACT NEXT SCREEN",0))_"^1"
  1. S XQORM("KEY","NEXT")=$O(^ORD(101,"B","GMRCACT NEXT SCREEN",0))_"^1"
  1. S XQORM("KEY","PS")=$O(^ORD(101,"B","GMRCACT PRINT CONSULT FORM",0))_"^1"
  1. S XQORM("KEY","CM")=$O(^ORD(101,"B","GMRCACT COMMENT ORDERS",0))_"^1"
  1. K GMRCNMBR
  1. Q
  1. ;I '+$G(OVRRIDE),$$VALID^GMRCAU(+$G(GMRCSS)) D ;set 2.5 mnem's into XQORM("KEY")
  1. ;. S XQORM("KEY","AC")="$O(^ORD(101,"B","GMRCACT ADMIN COMPLETE",0)_"^1"
  1. ;. S XQORM("KEY","DY")=$O(^ORD(101,"B","GMRCACT CANCEL",0))_"^1"
  1. ;. S XQORM("KEY","ED")=$O(^ORD(101,"B","GMRC CHANGE ORDERS",0))_"^1"
  1. Q
  1. MSG() ; -- LMgr message bar
  1. Q "Enter the number of the item you wish to act on, or select an action."
  1. ;
  1. MARGIN ; -- Reset bottom margin if menu display off
  1. N BM S BM=$S(VALMMENU:17,1:21) Q:BM=VALM("BM") ; no change
  1. S VALM("BM")=BM,VALM("LINES")=VALM("BM")-VALM("TM")+1,VALMBCK="R"
  1. Q
  1. ;
  1. SELEXIT ; -- Exit action for list manager when selection criteria changed
  1. S:$D(^TMP("GMRC",$J,"CURRENT","MENU")) XQORM("HIJACK")=^("MENU")
  1. S VALMBCK="R"
  1. Q:($D(GMRCQUT)!$D(GMRCQUIT)) ;status exit using GMRCQUIT??
  1. I $D(GMRC("NMBR")) D RESET^GMRCSLMV(GMRC("NMBR")) K GMRC("NMBR")
  1. D AD^GMRCSLM1
  1. D INIT^GMRCSLM ;from select patient, select service
  1. D HDR^GMRCSLM ;from select patient, select date range
  1. K GMRCSEL,GMRCO,GMRCND
  1. Q
  1. ;