PSBOAL ;BIRMINGHAM/EFC-BCMA UTILITIES ;Mar 2004
;;3.0;BAR CODE MED ADMIN;;Mar 2004
;
; Reference/IA
; ^GMRADPT/10099
; ^GMRAOR2/2422
EN ;
N PSBLIST,PSBGBL,DFN
S PSBGBL="^TMP(""PSBO"",$J,""B"")"
F S PSBGBL=$Q(@PSBGBL) Q:PSBGBL="" Q:$QS(PSBGBL,2)'=$J Q:$QS(PSBGBL,1)'["PSBO" D
.S DFN=$QS(PSBGBL,5)
.D EN1
K ^TMP("PSBO",$J)
Q
;
EN1 ;
S GMRA="0^0^111" S PSBLIST=""
D EN1^GMRADPT
F S PSBLIST=$O(GMRAL(PSBLIST)) Q:'PSBLIST D
.K PSBARRY
.D EN1^GMRAOR2(PSBLIST,"PSBARRY")
.W !,""
.W !," Causative agent : "_$P(PSBARRY,U)
.W !,""
.I $D(PSBARRY("S",1)) D SYMP
.I $D(PSBARRY("V",1)) D CLAS
.W !," Verified : "_$S($P(PSBARRY,U,4)="VERIFIED":"Yes",1:"No")
.W !," Observed/Historical : "_$S($P(PSBARRY,U,5)="OBSERVED":"Observed",$P(PSBARRY,U,5)="HISTORICAL":"Historical",1:"")
.W !," ******************************************"
Q
;
SYMP ;
S K=0,N=0 F S K=$O(PSBARRY("S",K)) Q:K'>0 D
.I N=0 W !," Signs/symptoms : "_PSBARRY("S",K)
.E W !," "_PSBARRY("S",K)
.S N=N+1
W !
K N,K
Q
CLAS ;
S K=0,N=0 F S K=$O(PSBARRY("V",K)) Q:K'>0 D
.I N=0 W !," Drug Classes : "_$P(PSBARRY("V",K),U,2)
.E W !," "_$P(PSBARRY("V",K),U,2)
.S N=N+1
W !
K N,K
Q
PSBOAL ;BIRMINGHAM/EFC-BCMA UTILITIES ;Mar 2004
+1 ;;3.0;BAR CODE MED ADMIN;;Mar 2004
+2 ;
+3 ; Reference/IA
+4 ; ^GMRADPT/10099
+5 ; ^GMRAOR2/2422
EN ;
+1 NEW PSBLIST,PSBGBL,DFN
+2 SET PSBGBL="^TMP(""PSBO"",$J,""B"")"
+3 FOR
SET PSBGBL=$QUERY(@PSBGBL)
IF PSBGBL=""
QUIT
IF $QSUBSCRIPT(PSBGBL,2)'=$JOB
QUIT
IF $QSUBSCRIPT(PSBGBL,1)'["PSBO"
QUIT
Begin DoDot:1
+4 SET DFN=$QSUBSCRIPT(PSBGBL,5)
+5 DO EN1
End DoDot:1
+6 KILL ^TMP("PSBO",$JOB)
+7 QUIT
+8 ;
EN1 ;
+1 SET GMRA="0^0^111"
SET PSBLIST=""
+2 DO EN1^GMRADPT
+3 FOR
SET PSBLIST=$ORDER(GMRAL(PSBLIST))
IF 'PSBLIST
QUIT
Begin DoDot:1
+4 KILL PSBARRY
+5 DO EN1^GMRAOR2(PSBLIST,"PSBARRY")
+6 WRITE !,""
+7 WRITE !," Causative agent : "_$PIECE(PSBARRY,U)
+8 WRITE !,""
+9 IF $DATA(PSBARRY("S",1))
DO SYMP
+10 IF $DATA(PSBARRY("V",1))
DO CLAS
+11 WRITE !," Verified : "_$SELECT($PIECE(PSBARRY,U,4)="VERIFIED":"Yes",1:"No")
+12 WRITE !," Observed/Historical : "_$SELECT($PIECE(PSBARRY,U,5)="OBSERVED":"Observed",$PIECE(PSBARRY,U,5)="HISTORICAL":"Historical",1:"")
+13 WRITE !," ******************************************"
End DoDot:1
+14 QUIT
+15 ;
SYMP ;
+1 SET K=0
SET N=0
FOR
SET K=$ORDER(PSBARRY("S",K))
IF K'>0
QUIT
Begin DoDot:1
+2 IF N=0
WRITE !," Signs/symptoms : "_PSBARRY("S",K)
+3 IF '$TEST
WRITE !," "_PSBARRY("S",K)
+4 SET N=N+1
End DoDot:1
+5 WRITE !
+6 KILL N,K
+7 QUIT
CLAS ;
+1 SET K=0
SET N=0
FOR
SET K=$ORDER(PSBARRY("V",K))
IF K'>0
QUIT
Begin DoDot:1
+2 IF N=0
WRITE !," Drug Classes : "_$PIECE(PSBARRY("V",K),U,2)
+3 IF '$TEST
WRITE !," "_$PIECE(PSBARRY("V",K),U,2)
+4 SET N=N+1
End DoDot:1
+5 WRITE !
+6 KILL N,K
+7 QUIT