GMRCALOR ;SLC/DCM - Process a consult from an alert notification ;10/9/01 23:11
;;3.0;CONSULT/REQUEST TRACKING;**1,17**;DEC 27, 1997
EN(XQDFN,XQCON) ;process alert from notification screen - entry point to main routine
;XQDFN=XQAID XQCON=XQADATA from CPRS alerts
I +$G(XQCON)<1 S GMRCQIT=1 Q
K XQAKILL,^TMP("GMRCR",$J,"CS"),^TMP("GMRCS",$J),^TMP("GMRCSLIST",$J)
S DFN=$P(XQDFN,",",2)
S (GMRCO,GMRCDA)=$S(XQCON=+XQCON:XQCON,$P(XQCON,";",3)?.N1",GMRC".E:+$P(XQCON,";",3),XQCON?1N.N1",GMRC".E:+XQCON,$P(XQCON,"|",2)["TIU(8925":+XQCON,$P(XQCON,"|",2)]"":+$P(XQCON,"|",2),1:$P($P(XQCON,";",3),",",1))
S GMRCSS=$S($P(^GMR(123,GMRCDA,0),"^",5)]"":$P(^(0),"^",5),1:"")
I $L(GMRCSS) S ^TMP("GMRCS",$J,GMRCSS)=$S(+GMRCSS:$P(^GMR(123.5,GMRCSS,0),"^",1),1:$O(^GMR(123.5,"B",GMRCSS,0)))
I $S('$L(GMRCSS):1,^TMP("GMRCS",$J,GMRCSS)="":1,1:0) S ^TMP("GMRCS",$J,1)="Unknown"
S TAB="",$P(TAB," ",30)="",BLK=0,LNCT=1,GMRCD=0,GMRCDT1="ALL",GMRCDT2=DT S:'$D(GMRCOER) GMRCOER=0
K ^TMP("GMRCR",$J,"CS")
D SET^GMRCSLM1,END^GMRCSLM1
K GMRCWARD,GMRCAD,GMRCSSNM
Q
;
GUI(XQDFN,XQCON) ;entry point for getting consult info for GUI interface
K ^TMP("GMRCR",$J,"CS")
S DFN=$P(XQDFN,",",2),GMRCDA=$P($P(XQCON,";",2),",")
S TAB="",$P(TAB," ",30)="",BLK=0,LNCT=1,GMRCD=0,GMRCDT1="ALL",GMRCDT2=0,GMRCOER=1
D SET^GMRCSLM1,END^GMRCSLM1
Q
GMRCALOR ;SLC/DCM - Process a consult from an alert notification ;10/9/01 23:11
+1 ;;3.0;CONSULT/REQUEST TRACKING;**1,17**;DEC 27, 1997
EN(XQDFN,XQCON) ;process alert from notification screen - entry point to main routine
+1 ;XQDFN=XQAID XQCON=XQADATA from CPRS alerts
+2 IF +$GET(XQCON)<1
SET GMRCQIT=1
QUIT
+3 KILL XQAKILL,^TMP("GMRCR",$JOB,"CS"),^TMP("GMRCS",$JOB),^TMP("GMRCSLIST",$JOB)
+4 SET DFN=$PIECE(XQDFN,",",2)
+5 SET (GMRCO,GMRCDA)=$SELECT(XQCON=+XQCON:XQCON,$PIECE(XQCON,";",3)?.N1",GMRC".E:+$PIECE(XQCON,";",3),XQCON?1N.N1",GMRC".E:+XQCON,$PIECE(XQCON,"|",2)["TIU(8925":+XQCON,$PIECE(XQCON,"|",2)]"":+$PIECE(XQCON,"|",2),1:$PIECE($PIECE(XQCON,";",3),",",1
))
+6 SET GMRCSS=$SELECT($PIECE(^GMR(123,GMRCDA,0),"^",5)]"":$PIECE(^(0),"^",5),1:"")
+7 IF $LENGTH(GMRCSS)
SET ^TMP("GMRCS",$JOB,GMRCSS)=$SELECT(+GMRCSS:$PIECE(^GMR(123.5,GMRCSS,0),"^",1),1:$ORDER(^GMR(123.5,"B",GMRCSS,0)))
+8 IF $SELECT('$LENGTH(GMRCSS):1,^TMP("GMRCS",$JOB,GMRCSS)="":1,1:0)
SET ^TMP("GMRCS",$JOB,1)="Unknown"
+9 SET TAB=""
SET $PIECE(TAB," ",30)=""
SET BLK=0
SET LNCT=1
SET GMRCD=0
SET GMRCDT1="ALL"
SET GMRCDT2=DT
IF '$DATA(GMRCOER)
SET GMRCOER=0
+10 KILL ^TMP("GMRCR",$JOB,"CS")
+11 DO SET^GMRCSLM1
DO END^GMRCSLM1
+12 KILL GMRCWARD,GMRCAD,GMRCSSNM
+13 QUIT
+14 ;
GUI(XQDFN,XQCON) ;entry point for getting consult info for GUI interface
+1 KILL ^TMP("GMRCR",$JOB,"CS")
+2 SET DFN=$PIECE(XQDFN,",",2)
SET GMRCDA=$PIECE($PIECE(XQCON,";",2),",")
+3 SET TAB=""
SET $PIECE(TAB," ",30)=""
SET BLK=0
SET LNCT=1
SET GMRCD=0
SET GMRCDT1="ALL"
SET GMRCDT2=0
SET GMRCOER=1
+4 DO SET^GMRCSLM1
DO END^GMRCSLM1
+5 QUIT