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

GMRCSLDT.m

Go to the documentation of this file.
  1. GMRCSLDT ;SLC/DCM - Get a consults detailed tracking history formated for List Manager ;9/8/98 03:29
  1. ;;3.0;CONSULT/REQUEST TRACKING;**1,4,15**;DEC 27, 1997
  1. ;
  1. HDR ;Header code for detailed display.(also used for results display)
  1. I '$D(DFN) N DFN D Q:'$D(DFN)
  1. . I $D(ORVP) S DFN=+ORVP
  1. D HDR1^GMRCSLM
  1. I '$D(GMRCVTIT) S GMRCX="Consult No.: "_GMRCO D HDR2^GMRCSLM(GMRCX)
  1. D TITLE
  1. Q
  1. ;
  1. EN ;Select a consult for detailed display of information.
  1. K GMRCQUT,GMRCQIT,GMRCSEL
  1. I '+$G(GMRCO) D SELECT^GMRCA2(.GMRCO) I $D(GMRCQUT) Q
  1. I '+$G(GMRCO) S GMRCQUT=1 Q
  1. ;
  1. S GMRCND=GMRCO
  1. ;S GMRCDT=$O(^TMP("GMRCR",$J,"CS","AD",GMRCNO,0))
  1. ;S GMRCND=$O(^TMP("GMRCR",$J,"CS","AD",GMRCNO,GMRCDT,0))
  1. W !!,"Compiling Detailed Display..."
  1. D LMFMT(GMRCND)
  1. D EN^VALM("GMRC DETAILED DISPLAY")
  1. Q
  1. ;
  1. TITLE ;override title if medicine resulting
  1. I $D(GMRCVTIT) S VALM("TITLE")=GMRCVTIT
  1. Q
  1. LMFMT(GMRCND) ;Build the ^TMP("GMRCR",$J,"DT", global and format the header variables and set the data into List Manager for display of detailed data.
  1. N DFN,GMRCAGE,GMRCDOB,GMRCPNM,GMRCSSN,GMRCSS,GMRCSSN,VALMHDR
  1. S:'$D(TAB) TAB="",$P(TAB," ",30)=""
  1. S DFN=$P(^GMR(123,GMRCND,0),"^",2) D DEM^GMRCU
  1. S GMRCSS=$P(^GMR(123,GMRCND,0),"^",5) S GMRCSSN=$S(GMRCSS]"":$P($G(^GMR(123.5,GMRCSS,0)),"^",1),1:"Unknown Location")
  1. D DT^GMRCSLM2(+GMRCND)
  1. I $D(GMRCQUT) Q
  1. K ^TMP("GMRCR",$J,"DTLIST") S DSPLINE=0,VALMAR="^TMP(""GMRCR"",$J,""DTLIST"")"
  1. F LINE=1:1:GMRCCT S DSPLINE=$O(^TMP("GMRCR",$J,"DT",DSPLINE)) Q:DSPLINE=""!(DSPLINE?1A.E) S DATA=^(DSPLINE,0) D SET^VALM10(LINE,DATA)
  1. S VALMCNT=LINE-1,XQORM("A")="Select Action: "
  1. K DSPLINE,LINE,DATA
  1. Q
  1. ;
  1. PHDR ; -- protocol header code called from the display action protocol 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 Action: "
  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. K GMRCNMBR
  1. Q
  1. HELP ; -- display help code
  1. N X S VALMBCK="" D FULL^VALM1 S VALMBCK="R"
  1. W !!,"Use the actions listed to scroll up and down, to view the data; if you want",!,"to search the data for a particular string, enter SL. You may print the"
  1. W !,"data, either the entire list or just the current screen, by entering PT or PS",!,"respectively. Enter Q when finished to return to the chart."
  1. W !!,"Press <return> to continue ..." R X:DTIME
  1. Q
  1. ;
  1. EXIT K ^TMP("GMRCR",$J,"DT"),^TMP("GMRCR",$J,"DTLIST"),GMRCCT
  1. ;D KILL^VALM10(GMRCO)
  1. K GMRCWT
  1. Q