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

AMQQMULN.m

Go to the documentation of this file.
AMQQMULN ; IHS/CMI/THL - AMQQMULT SUBROUTINE...SPECIAL EVALUATION OF VALUES ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;-----
RUN I AMQQVALU="" X "I 0" Q
 I AMQQVAL1=-999999999,AMQQVAL2=999999999 Q
 D NN2:AMQQNNA=2
 D NN3:AMQQNNA=3
 D NN4:AMQQNNA=4
 D NN5:AMQQNNA=5
 D NN6:AMQQNNA=6
 D NN7:AMQQNNA=7
EXIT ;
 Q
 ;
NN2 ; ENTRY POINT FROM AMQQMULT
 S %=AMQQVALU
 S AMQQVALU=$S($E(%)="N":0,$E(%)="T":1,1:(+%+1))
 I AMQQVAL1'>AMQQVAL2,AMQQVALU'<AMQQVAL1,AMQQVALU'>AMQQVAL2 Q
 I AMQQVAL1>AMQQVAL2,AMQQVALU<AMQQVAL2!(AMQQVALU>AMQQVAL1)
 Q
 ;
NN3 ; ENTRY POINT FROM AMQQMULT ; POS/NEG
 S AMQQVALU='($E(AMQQVALU)="N")
 I AMQQVALU'<AMQQVAL1,AMQQVALU'>AMQQVAL2
 Q
 ;
NN4 ; ENTRY POINT FROM AMQQMULT ; TITRE
 S AMQQVALU=$S($E(AMQQVALU)="N":0,$E(AMQQVALU)="P":.1,1:+$P(AMQQVALU,":",2))
 I AMQQVALU'="" S AMQQVALU=+AMQQVALU
 I AMQQVAL1'>AMQQVAL2,AMQQVALU'<AMQQVAL1,AMQQVALU'>AMQQVAL2 Q
 I AMQQVAL1>AMQQVAL2,AMQQVALU<AMQQVAL2!(AMQQVALU>AMQQVAL1) Q
 Q
 ;
NN5 ; IMMUNIZATIONS ; ENTRY POINT FROM AMQQMULT
 N %
 S %=$P(^AUTTIMM(AMQQIDX,0),U,2),AMQQVALU=% I 1 Q
 I AMQQVAL1="U",AMQQVALU="" S AMQQVALU=%_"(?)" Q
 I AMQQVAL1="A",AMQQVALU'="" S AMQQVALU=%_"("_AMQQVALU_")" Q
 I AMQQVALU=AMQQVAL1 S AMQQVALU=%_"("_AMQQVAL1_")" Q
 Q
 ;
BP ; - EP -
 N T,X,A,B,C
 S X=1
 S A=AMQQVAL1
 S B=AMQQVAL2
 S C=$P(AMQQVALU,"/")
 D BOOLEAN
 S X=2
 S A=AMQQVAL3
 S B=AMQQVAL4
 S C=$P(AMQQVALU,"/",2)
 D BOOLEAN
 S X="I "_X(1)_AMQQBOOL_"("_X(2)_")"
 X X
 Q
 ;
BOOLEAN S X(X)=0
 I A>B,C<B!(C>A) S X(X)=1 Q
 I C=A,C=B S X(X)=1 Q
 I C>A,C<B S X(X)=1
 Q
 ;
NN6 ; SET OF CODES
 I AMQQVAL1="=",AMQQVALU=AMQQVAL2 Q
 I AMQQVAL1="'=",AMQQVALU'=AMQQVAL2 Q
 I AMQQVAL1="EXISTS"!(AMQQVAL1)="ALL" S AMQQSPEC="EXISTS" Q
 I $E(AMQQVAL1,1,3)="ANY" S AMQQSPEC="ANY" Q
 Q
 ;
NN7 ; TAXONOMY
 I $D(^UTILITY("AMQQ TAX",$J,AMQQVAL1,AMQQVALU))+$D(^("*"))='$D(^("--"))
 Q
 ;