MCEPROC ;WISC/DCB-Printer driver ;12/13/93
;;2.3;Medicine;;09/13/1996
N TEMP,MCTYPE
S TEMP=$G(^MCAR(697.2,MCARP,0)) Q:MCARP=0
S MCARP="",MCARP=+$O(^MCAR(697.2,"B",MCPRO,MCARP)),MCTYPE=$E($P(XQY0,U,1),2,2),MCROUT=$P(TEMP,U,8),MCFILE=+$P($P(TEMP,U,2),"MCAR(",2),MCESON=+$P(TEMP,U,14),MCESSEC=0,MCESKEY=$P(TEMP,U,15)
I MCESKEY,MCESON S:$D(^XUSEC(MCESKEY,DUZ)) MCESSEC=1
I MCFILE=699 S MCARCODE=$S($P(XQY0,U,1)["GI":"G",1:"P")
S MCBS=$S(MCTYPE["B":1,1:0)
I MCTYPE["P"!(MCTYPE["MFD") D PRINT Q
D EDIT Q
EDIT ;
S MCEBRIEF=$P(TEMP,U,11),MCEFULL=$P(TEMP,U,10) Q
PRINT ;
S MCPRTRTN=$P(TEMP,U,5)_"^"_$P(TEMP,U,6) Q
KILLVAR ; Kill off the variables that was set by EDIT and PRINT.
K MCARP,MCFILE,MCESON,MCESKEY,MCROUT,MCARCODE,MCTYPE
K MCEBRIEF,MCEFULL,MCPBRIEF,MCPFULL,MCPRTRTN,MCBS
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCEPROC 807 printed Dec 13, 2024@02:15:02 Page 2
MCEPROC ;WISC/DCB-Printer driver ;12/13/93
+1 ;;2.3;Medicine;;09/13/1996
+2 NEW TEMP,MCTYPE
+3 SET TEMP=$GET(^MCAR(697.2,MCARP,0))
if MCARP=0
QUIT
+4 SET MCARP=""
SET MCARP=+$ORDER(^MCAR(697.2,"B",MCPRO,MCARP))
SET MCTYPE=$EXTRACT($PIECE(XQY0,U,1),2,2)
SET MCROUT=$PIECE(TEMP,U,8)
SET MCFILE=+$PIECE($PIECE(TEMP,U,2),"MCAR(",2)
SET MCESON=+$PIECE(TEMP,U,14)
SET MCESSEC=0
SET MCESKEY=$PIECE(TEMP,U,15)
+5 IF MCESKEY
IF MCESON
if $DATA(^XUSEC(MCESKEY,DUZ))
SET MCESSEC=1
+6 IF MCFILE=699
SET MCARCODE=$SELECT($PIECE(XQY0,U,1)["GI":"G",1:"P")
+7 SET MCBS=$SELECT(MCTYPE["B":1,1:0)
+8 IF MCTYPE["P"!(MCTYPE["MFD")
DO PRINT
QUIT
+9 DO EDIT
QUIT
EDIT ;
+1 SET MCEBRIEF=$PIECE(TEMP,U,11)
SET MCEFULL=$PIECE(TEMP,U,10)
QUIT
PRINT ;
+1 SET MCPRTRTN=$PIECE(TEMP,U,5)_"^"_$PIECE(TEMP,U,6)
QUIT
KILLVAR ; Kill off the variables that was set by EDIT and PRINT.
+1 KILL MCARP,MCFILE,MCESON,MCESKEY,MCROUT,MCARCODE,MCTYPE
+2 KILL MCEBRIEF,MCEFULL,MCPBRIEF,MCPFULL,MCPRTRTN,MCBS
+3 QUIT