Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AMQQF1

AMQQF1.m

Go to the documentation of this file.
AMQQF1 ; IHS/CMI/THL - MORE ANALYTIC FUNCTIONS ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;-----
TEST N T
 S T=$T
 I '$D(AMQQNOT)=T K ^UTILITY("AMQQ",$J,AMQQAG,AMQQUATN,I)
EXIT Q
 ;
COMP S X1=Z
 S X2=$P(AMQQCOMP,";")
 D C^%DTC
 S A=X
 S X1=Z
 S X2=$P(AMQQCOMP,";",2)
 D C^%DTC
 S B=X
 Q
 ;
CDOB N X,Y,Z,%,I,A,B
 S Z=$P(^DPT(AMQP(0),0),U,3)
 I Z D COMP
 F I=0:0 S I=$O(^UTILITY("AMQQ",$J,AMQQAG,AMQQUATN,I)) Q:'I  S Y=$P(^(I),U,2) D CDOB1,TEST
 K AMQQNOT
 Q
 ;
CDOB1 I Z="" Q
 I Y<A!(Y>B)
 Q
 ;
CDOD N X,Y,Z,%,I,A,B
 S Z=""
 I $D(^DPT(AMQP(0),.35)) S Z=+^(.35) I Z D COMP
 F I=0:0 S I=$O(^UTILITY("AMQQ",$J,AMQQAG,AMQQUATN,I)) Q:'I  S Y=$P(^(I),U,2) D CDOD1,TEST
 K AMQQNOT
 Q
 ;
CDOD1 I Z="" Q
 I Y<B!(Y>A)
 Q
 ;
CAGE N X,Y,Z,%,I,A,B
 S X1=$P(^DPT(AMQP(0),0),U,3)
 I X1="" K X1 S Z="" G CAGET
 S X2=$P(AMQQCOMP,";",4)
 D C^%DTC
 S Z=X
 D COMP
CAGET F I=0:0 S I=$O(^UTILITY("AMQQ",$J,AMQQAG,AMQQUATN,I)) Q:'I  S Y=$P(^(I),U,2) D CAGE1,TEST
 K AMQQNOT
 Q
 ;
CAGE1 I Z="" Q
 I Y<A!(Y>B)
 Q
 ;
SUB N AMQQSQFS,AMQQSQFN,AMQQSQFP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