DVBAB89 ;GT-CAPRI FULL ;05/10/02
;;2.7;AMIE;**42**;Apr 10, 1995
;
;
START(MSG,DFN) ;CALLED BY REMOTE PROCEDURE DVBAB SURGERY CASE
;Parameters
;=============
; MSG : Output - data global ^TMP("SURGERY")
; DFN : Patient Identification Number
;
K ^TMP("DVBSURGERY",$J)
N COUNT,VAR S VAR="",COUNT=0
I '$D(^DPT(DFN,0)) S ^TMP("DVBSURGERY",$J,COUNT)="Not a valid patient" Q
I $D(^SRF("B",DFN)) D
. F S VAR=$O(^SRF("B",DFN,VAR)) Q:VAR="" D
. . S DVBSROP=$P(^SRF(VAR,"OP"),"^",1)
. . D ^DVBASRP1
. . S ^TMP("DVBSURGERY",$J,COUNT)=VAR_"^"_$P(^SRF(VAR,0),"^",9)_"^"_DVBSROP_$C(13)
. . S COUNT=COUNT+1
S MSG=$NA(^TMP("DVBSURGERY",$J))
Q
;
XDA(MSG,DFN) ;CALLED BY REMOTE PROCEDURE DVBAB ORIGINAL PROCESSING DATE
K ^TMP("REPRINT",$J)
N VAR,COUNT
I '$D(DFN) S ^TMP("REPRINT",$J,COUNT)="0^Undefined Patient IEN" Q
S DIC=2,DIC(0)="NZX",X=DFN D ^DIC I Y<0 D
. S ^TMP("REPRINT",$J,COUNT)="0^Invalid Patient Name." Q
S VAR="",COUNT=0
I $D(^DVB(396,"B",DFN)) D
. F S VAR=$O(^DVB(396,"B",DFN,VAR)) Q:VAR="" D
. . I $D(^DVB(396,VAR,4)),$P(^DVB(396,VAR,4),U,4)]"",$D(^DVB(396,VAR,2)),$P(^DVB(396,VAR,2),U,10)'="L",$D(^DPT($P(^DVB(396,VAR,0),U,1),0)) D
. . . S ^TMP("REPRINT",$J,COUNT)=VAR_"^"_$P(^DVB(396,VAR,4),"^",2)_$C(13)
. . . S COUNT=COUNT+1
S MSG=$NA(^TMP("REPRINT",$J))
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAB89 1330 printed Oct 16, 2024@17:41:32 Page 2
DVBAB89 ;GT-CAPRI FULL ;05/10/02
+1 ;;2.7;AMIE;**42**;Apr 10, 1995
+2 ;
+3 ;
START(MSG,DFN) ;CALLED BY REMOTE PROCEDURE DVBAB SURGERY CASE
+1 ;Parameters
+2 ;=============
+3 ; MSG : Output - data global ^TMP("SURGERY")
+4 ; DFN : Patient Identification Number
+5 ;
+6 KILL ^TMP("DVBSURGERY",$JOB)
+7 NEW COUNT,VAR
SET VAR=""
SET COUNT=0
+8 IF '$DATA(^DPT(DFN,0))
SET ^TMP("DVBSURGERY",$JOB,COUNT)="Not a valid patient"
QUIT
+9 IF $DATA(^SRF("B",DFN))
Begin DoDot:1
+10 FOR
SET VAR=$ORDER(^SRF("B",DFN,VAR))
if VAR=""
QUIT
Begin DoDot:2
+11 SET DVBSROP=$PIECE(^SRF(VAR,"OP"),"^",1)
+12 DO ^DVBASRP1
+13 SET ^TMP("DVBSURGERY",$JOB,COUNT)=VAR_"^"_$PIECE(^SRF(VAR,0),"^",9)_"^"_DVBSROP_$CHAR(13)
+14 SET COUNT=COUNT+1
End DoDot:2
End DoDot:1
+15 SET MSG=$NAME(^TMP("DVBSURGERY",$JOB))
+16 QUIT
+17 ;
XDA(MSG,DFN) ;CALLED BY REMOTE PROCEDURE DVBAB ORIGINAL PROCESSING DATE
+1 KILL ^TMP("REPRINT",$JOB)
+2 NEW VAR,COUNT
+3 IF '$DATA(DFN)
SET ^TMP("REPRINT",$JOB,COUNT)="0^Undefined Patient IEN"
QUIT
+4 SET DIC=2
SET DIC(0)="NZX"
SET X=DFN
DO ^DIC
IF Y<0
Begin DoDot:1
+5 SET ^TMP("REPRINT",$JOB,COUNT)="0^Invalid Patient Name."
QUIT
End DoDot:1
+6 SET VAR=""
SET COUNT=0
+7 IF $DATA(^DVB(396,"B",DFN))
Begin DoDot:1
+8 FOR
SET VAR=$ORDER(^DVB(396,"B",DFN,VAR))
if VAR=""
QUIT
Begin DoDot:2
+9 IF $DATA(^DVB(396,VAR,4))
IF $PIECE(^DVB(396,VAR,4),U,4)]""
IF $DATA(^DVB(396,VAR,2))
IF $PIECE(^DVB(396,VAR,2),U,10)'="L"
IF $DATA(^DPT($PIECE(^DVB(396,VAR,0),U,1),0))
Begin DoDot:3
+10 SET ^TMP("REPRINT",$JOB,COUNT)=VAR_"^"_$PIECE(^DVB(396,VAR,4),"^",2)_$CHAR(13)
+11 SET COUNT=COUNT+1
End DoDot:3
End DoDot:2
End DoDot:1
+12 SET MSG=$NAME(^TMP("REPRINT",$JOB))
+13 QUIT