AMQQATSQ ; IHS/CMI/THL - OVERRUN FROM AMQQATL ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;-----
SQ ; - ENTRY POINT - from AMQQATL
I '$D(AMQQGVF),"GL"[$P(AMQQQ,U,3) S Z="" D ZSET^AMQQATL1 S AMQQILIN=AMQQILIN+1,^UTILITY("AMQQ",$J,"LIST",AMQQILIN)="W ?"_(3*AMQQUSQL+3)_","""_$P(AMQQQ,U,2)_Z_""""
I $D(AMQQLSQF) D SQ1^AMQQATL K ^UTILITY("AMQQ",$J,"SQL"),^UTILITY("AMQQ",$J,"SQXL"),AMQQLSQF,AMQQSQLN Q
I '$D(AMQQLSQF),$D(^UTILITY("AMQQ",$J,"SQL",0,1)) S AMQQILIN=AMQQILIN+1,^UTILITY("AMQQ",$J,"LIST",AMQQILIN)="W ?9,""(INVERSE SET)""" K ^UTILITY("AMQQ",$J,"SQL")
I $P(AMQQQ,U,3)="I" N % S %=$P($P(AMQQQ,U,9),";",4) S:"A"[$E(%) %="ALL" S AMQQILIN=AMQQILIN+1,^UTILITY("AMQQ",$J,"LIST",AMQQILIN)="W ?"_(3*AMQQUSQL+3)_",""IMMUNIZED WITH "_$P(AMQQQ,U,2)_" ("_%_")"""
I S %=$P(AMQQQ,U,11) I +% S ^UTILITY("AMQQ",$J,"LIST",AMQQILIN)=^UTILITY("AMQQ",$J,"LIST",AMQQILIN)
Q
;
AMQQATSQ ; IHS/CMI/THL - OVERRUN FROM AMQQATL ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;-----
SQ ; - ENTRY POINT - from AMQQATL
+1 IF '$DATA(AMQQGVF)
IF "GL"[$PIECE(AMQQQ,U,3)
SET Z=""
DO ZSET^AMQQATL1
SET AMQQILIN=AMQQILIN+1
SET ^UTILITY("AMQQ",$JOB,"LIST",AMQQILIN)="W ?"_(3*AMQQUSQL+3)_","""_$PIECE(AMQQQ,U,2)_Z_""""
+2 IF $DATA(AMQQLSQF)
DO SQ1^AMQQATL
KILL ^UTILITY("AMQQ",$JOB,"SQL"),^UTILITY("AMQQ",$JOB,"SQXL"),AMQQLSQF,AMQQSQLN
QUIT
+3 IF '$DATA(AMQQLSQF)
IF $DATA(^UTILITY("AMQQ",$JOB,"SQL",0,1))
SET AMQQILIN=AMQQILIN+1
SET ^UTILITY("AMQQ",$JOB,"LIST",AMQQILIN)="W ?9,""(INVERSE SET)"""
KILL ^UTILITY("AMQQ",$JOB,"SQL")
+4 IF $PIECE(AMQQQ,U,3)="I"
NEW %
SET %=$PIECE($PIECE(AMQQQ,U,9),";",4)
IF "A"[$EXTRACT(%)
SET %="ALL"
SET AMQQILIN=AMQQILIN+1
SET ^UTILITY("AMQQ",$JOB,"LIST",AMQQILIN)="W ?"_(3*AMQQUSQL+3)_",""IMMUNIZED WITH "_$PIECE(AMQQQ,U,2)_" ("_%_")"""
+5 IF $TEST
SET %=$PIECE(AMQQQ,U,11)
IF +%
SET ^UTILITY("AMQQ",$JOB,"LIST",AMQQILIN)=^UTILITY("AMQQ",$JOB,"LIST",AMQQILIN)
+6 QUIT
+7 ;