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

AMQQQ2.m

Go to the documentation of this file.
AMQQQ2 ; IHS/CMI/THL - COMPILES SCRIPT QUERIES ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;-----
RUN D SUBJ
EN1 ; ENTRY POINT FROM NATURAL LANGUAGE INTERFACE
 F AMQQYYAT=0:0 S AMQQYYAT=$O(AMQQXX(AMQQYYAT)) Q:'AMQQYYAT  D ATT
EXIT K X,AMQQYYYY,AMQQYYCC,AMQQYYAA,AMQQNSUB,%
 Q
 ;
SUBJ S Y=AMQQXX(0)
 I Y?1"`"1.N S Y="^DPT(^"_$E(Y,2,9)_U_$P(^DPT($E(Y,2,9),0),U) D PERSON^AMQQ1
 Q
 ;
ATT I $D(AMQQXX(AMQQYYAT,2)) D OR Q
 S (%,AMQQYYYY)=AMQQXX(AMQQYYAT,1)
 I $E($P(%,";",2))="M" S AMQQCTXS=1,AMQQXXND="AMQQXX("_AMQQYYAT_",1)" D MULT G ASET
A1 S (Y,AMQQYYAA)=$P(%,";")
 S AMQQYYCC=$P(%,";",2)
 S AMQQCOMP=$P(%,";",3,4)
 I AMQQYYCC="TAX" D TAX G ASET
 D EN1^AMQQATA
 I $D(AMQQONE) D ^AMQQAC Q
 I AMQQYYCC'="" S Y=AMQQYYCC D EN1^AMQQAC
 I +$G(AMQQYYAA)=112 D ^AMQQAC,^AMQQAV
ASET D SET^AMQQAT
 D EXIT^AMQQAT
 D ^AMQQATR
 D ^AMQQATS
 S AMQQUATN=AMQQUATN+1
 S:'$D(AMQQNULL) AMQQUNBC=AMQQUNBC+1
 K AMQQNULL
 Q
 ;
TAX S %=^AMQQ(5,+Y,0)
 S AMQQATNM=$P(Y,U,2)
 S AMQQLINK=$P(%,U,5)
 S AMQQATN=+Y
 S AMQQSBCT=$P(%,U,20)
 I $G(AMQQSBCT)="" S AMQQSBCT=$P(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