AMQQATL1 ; IHS/CMI/THL - OVERFLOW FROM AMQQATL ;
;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
;-----
ZSET ; ENTRY POINT FROM AMQQSQL
I '$D(AMQQQ) Q
I AMQQQ[";INVERSE^" S Z="(INVERSE SET)" Q
I $G(AMQQSQNM)="RESULT/DIAGNOSIS" D I $G(Z)]"" Q
. I AMQQQ[";ALL^" S Z=" (ALL)" Q
. I AMQQQ[";ANY^" S Z=" (ANY)" Q
. I AMQQQ[";EXISTS^" S Z=" (EXISTS)" Q
N AMQQZT,X,Y,N,J,I,%
S N=$P(AMQQQ,U,9)
S N=$P(N,";",4)
S (X,%)=""
F I=1:1:3 S X=$O(^UTILITY("AMQQ TAX",$J,N,X)) Q:X="" I X'?1.P S AMQQZT=X D ZTRANS S %=%_AMQQZT_U
I %="" Q
S Y=" ("
F J=1,2 S X=$P(%,U,J) Q:X="" S:J=2 Y=Y_"/" S Y=Y_X
I $P(%,U,3)'="" S Z=Y_"...)" Q
S Z=Y_")"
Q
;
ZTRANS N X,Y,N,J,I,% S X=AMQQZT
I "^266^297^679^"[(U_+AMQQQ_U) D I 1
.S X=$P($$ICDDX^ICDEX(X,"","","I"),U,2)
.S AMQQZT=X
E I +AMQQQ=302 S X=$P(^AUTTHF(X,0),U) S AMQQZT=X
E I $D(^AMQQ(1,+AMQQQ,4,1,1)) X ^(1) S AMQQZT=X
S AMQQZT=$P(AMQQZT,",")
S AMQQZT=$E(AMQQZT,1,12)
Q
;
AMQQATL1 ; IHS/CMI/THL - OVERFLOW FROM AMQQATL ;
+1 ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
+2 ;-----
ZSET ; ENTRY POINT FROM AMQQSQL
+1 IF '$DATA(AMQQQ)
QUIT
+2 IF AMQQQ[";INVERSE^"
SET Z="(INVERSE SET)"
QUIT
+3 IF $GET(AMQQSQNM)="RESULT/DIAGNOSIS"
Begin DoDot:1
+4 IF AMQQQ[";ALL^"
SET Z=" (ALL)"
QUIT
+5 IF AMQQQ[";ANY^"
SET Z=" (ANY)"
QUIT
+6 IF AMQQQ[";EXISTS^"
SET Z=" (EXISTS)"
QUIT
End DoDot:1
IF $GET(Z)]""
QUIT
+7 NEW AMQQZT,X,Y,N,J,I,%
+8 SET N=$PIECE(AMQQQ,U,9)
+9 SET N=$PIECE(N,";",4)
+10 SET (X,%)=""
+11 FOR I=1:1:3
SET X=$ORDER(^UTILITY("AMQQ TAX",$JOB,N,X))
IF X=""
QUIT
IF X'?1.P
SET AMQQZT=X
DO ZTRANS
SET %=%_AMQQZT_U
+12 IF %=""
QUIT
+13 SET Y=" ("
+14 FOR J=1,2
SET X=$PIECE(%,U,J)
IF X=""
QUIT
IF J=2
SET Y=Y_"/"
SET Y=Y_X
+15 IF $PIECE(%,U,3)'=""
SET Z=Y_"...)"
QUIT
+16 SET Z=Y_")"
+17 QUIT
+18 ;
ZTRANS NEW X,Y,N,J,I,%
SET X=AMQQZT
+1 IF "^266^297^679^"[(U_+AMQQQ_U)
Begin DoDot:1
+2 SET X=$PIECE($$ICDDX^ICDEX(X,"","","I"),U,2)
+3 SET AMQQZT=X
End DoDot:1
IF 1
+4 IF '$TEST
IF +AMQQQ=302
SET X=$PIECE(^AUTTHF(X,0),U)
SET AMQQZT=X
+5 IF '$TEST
IF $DATA(^AMQQ(1,+AMQQQ,4,1,1))
XECUTE ^(1)
SET AMQQZT=X
+6 SET AMQQZT=$PIECE(AMQQZT,",")
+7 SET AMQQZT=$EXTRACT(AMQQZT,1,12)
+8 QUIT
+9 ;