AMQQSQVS ; IHS/CMI/THL - GETS VISUAL ACUITY DATA ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;-----
N AMQQLINK,AMQQFTYP,AMQQQ,AMQQATNM,AMQQCONM,AMQQCOMP,AMQQNOCO,AMQQNOT,AMQQTMPC
S AMQQCOMP=""
RUN D SET
D GET
I $D(AMQQQUIT)!($D(AMQQSQQT))!(AMQQCOMP="") G EXIT
S AMQQNOCO=AMQQNOCO_"~"_AMQQNOCO
S AMQQTMPC=AMQQTMPC_"~"_AMQQTMPC
D VAND
EXIT K AMQQTMPC,X
Q
;
SET S AMQQCOND=+Y
S AMQQNOCO=$P(^AMQQ(5,+Y,0),U,8)
S AMQQCONM=$P(Y,U,2)
S AMQQSQCT="B"
S AMQQSQVV=""
S AMQQSYMB=$P(^AMQQ(5,+Y,0),U,6)
I $D(AMQQSQNT) S AMQQSYMB="'"_AMQQSYMB K AMQQSQNT
Q
;
GET D COMPV^AMQQAV2
I $D(AMQQQUIT) Q
I $G(AMQQCOMP)="" Q
I AMQQNOCO=2 S AMQQTMPC="'<:"_$P(AMQQCOMP,";")_":'>:"_$P(AMQQCOMP,";",2) Q
S AMQQTMPC=AMQQSYMB_":"_AMQQCOMP
Q
;
VAND W !!!,"When I analyze the results =>",!
W !?5,"1) Vision in ",@AMQQRV,"BOTH",@AMQQNV," eyes must meet your criteria"
W !?5,"2) Vision in ",@AMQQRV,"AT LEAST ONE",@AMQQNV," eye must meet your criteria",!
VANDQ W !,"Your choice (1-2): 1// "
R X:DTIME E S X=U
I $E(X)=U S AMQQQUIT="" Q
I X="" S X=1
I X?1."?" W !!,"Choose between ""and"" logic and ""or"" logic" G VANDQ
I X=1 S AMQQSQCV=AMQQTMPC_"~&" Q
I X=2 S AMQQSQCV=AMQQTMPC_"~!" Q
W " ??",*7
G VANDQ
;
AMQQSQVS ; IHS/CMI/THL - GETS VISUAL ACUITY DATA ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;-----
+3 NEW AMQQLINK,AMQQFTYP,AMQQQ,AMQQATNM,AMQQCONM,AMQQCOMP,AMQQNOCO,AMQQNOT,AMQQTMPC
+4 SET AMQQCOMP=""
RUN DO SET
+1 DO GET
+2 IF $DATA(AMQQQUIT)!($DATA(AMQQSQQT))!(AMQQCOMP="")
GOTO EXIT
+3 SET AMQQNOCO=AMQQNOCO_"~"_AMQQNOCO
+4 SET AMQQTMPC=AMQQTMPC_"~"_AMQQTMPC
+5 DO VAND
EXIT KILL AMQQTMPC,X
+1 QUIT
+2 ;
SET SET AMQQCOND=+Y
+1 SET AMQQNOCO=$PIECE(^AMQQ(5,+Y,0),U,8)
+2 SET AMQQCONM=$PIECE(Y,U,2)
+3 SET AMQQSQCT="B"
+4 SET AMQQSQVV=""
+5 SET AMQQSYMB=$PIECE(^AMQQ(5,+Y,0),U,6)
+6 IF $DATA(AMQQSQNT)
SET AMQQSYMB="'"_AMQQSYMB
KILL AMQQSQNT
+7 QUIT
+8 ;
GET DO COMPV^AMQQAV2
+1 IF $DATA(AMQQQUIT)
QUIT
+2 IF $GET(AMQQCOMP)=""
QUIT
+3 IF AMQQNOCO=2
SET AMQQTMPC="'<:"_$PIECE(AMQQCOMP,";")_":'>:"_$PIECE(AMQQCOMP,";",2)
QUIT
+4 SET AMQQTMPC=AMQQSYMB_":"_AMQQCOMP
+5 QUIT
+6 ;
VAND WRITE !!!,"When I analyze the results =>",!
+1 WRITE !?5,"1) Vision in ",@AMQQRV,"BOTH",@AMQQNV," eyes must meet your criteria"
+2 WRITE !?5,"2) Vision in ",@AMQQRV,"AT LEAST ONE",@AMQQNV," eye must meet your criteria",!
VANDQ WRITE !,"Your choice (1-2): 1// "
+1 READ X:DTIME
IF '$TEST
SET X=U
+2 IF $EXTRACT(X)=U
SET AMQQQUIT=""
QUIT
+3 IF X=""
SET X=1
+4 IF X?1."?"
WRITE !!,"Choose between ""and"" logic and ""or"" logic"
GOTO VANDQ
+5 IF X=1
SET AMQQSQCV=AMQQTMPC_"~&"
QUIT
+6 IF X=2
SET AMQQSQCV=AMQQTMPC_"~!"
QUIT
+7 WRITE " ??",*7
+8 GOTO VANDQ
+9 ;