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

ASDZAGE.m

Go to the documentation of this file.
ASDZAGE ; IHS/DSD/ENM - DICTIONARY ENTRY LOOK-UP UTILITY [ 03/25/1999  11:48 AM ]
 ;;5.0;IHS SCHEDULING;; MAR 25, 1999
 ;Original Routine = AUDICLK called by AGE()^ASDAIU
 ;IHS-OKLA CITY AREA OFFICE-LMD
L1 K PCC,LKPRINT,LKDATA,LKERR,GL,DENT,NEW G END:'$D(DR)!'$D(DIC)!'$D(DA) S LK("I")=1,DIC(1)=DIC,DR(1)=DR G END:+DR<.01!(+DIC<1)!(+DA<1)
 I $D(^DD(DIC,DR,0)) S G=^DD(DIC,DR,0) G COMP:$P(G,"^",2)["C" I +$P(G,"^",2)>0 S LKERR=5 G END
L2 I '$D(^DD(DIC(LK("I")),DR(LK("I")),0)) S LKERR=3 G END
 S SUB=$P(^DD(DIC(LK("I")),DR(LK("I")),0),"^",4),PC(LK("I"))=$P(SUB,";",2),SUB(LK("I"))=$P(SUB,";",1) I '$D(^DD(DIC(LK("I")),0,"UP")) G L4
L3 S LKERR=4 S:$D(DRENT1) DRENT=0 G END:'$D(DRENT) G END:DRENT'="0"&(+DRENT<0) G END:DRENT\1'=DRENT S:DRENT=0 NEW="" K LKERR
 S LK("I")=LK("I")+1,DIC(LK("I"))=^DD(DIC(LK("I")-1),0,"UP"),DR(LK("I"))=0,DR(LK("I"))=$O(^DD(DIC(LK("I")),"SB",DIC(LK("I")-1),DR(LK("I")))) G L2
L4 S GL=^DIC(DIC(LK("I")),0,"GL")_DA,GL(1)=GL_",0)" I '$D(@GL(1)) S LKERR=1 G END
 I LK("I")=1 K:$D(DRENT) DRENT G L5
 F LK("J")=LK("I"):-1:2 S GL=GL_","_SUB(LK("J")) S:LK("J")>2 GL=GL_",1"
L5 S PCC=PC(1) I '$D(DRENT) S DRENT="" G L6
L5A S GL(0)=GL_",0)" I '$D(@GL(0)) S LKERR=6,GL=GL_",1,0)" G END
L5B S DENT=$P(@GL(0),"^",4) S:DENT="" DENT=0 I DENT=0!(DRENT>DENT) S LKERR=2 G END
L5BB I $D(DRENT1) D DNT4 G L5E:DNT'="" S LKERR=2 G END
L5C I DRENT>0 D DNT2 S DRENT=DNT G L5E:DNTT>0 S LKERR=2 G END
L5D S GL(0)=GL_",0)" D DNT
L5E S DRENT=","_DRENT
L6 S GL=GL_DRENT_","_SUB(1)_")" I GL[",," S LKERR=2,NEW="" G END
 I '$D(@GL) S LKERR=2,NEW="" G END
L6A S (LKPRINT,LKDATA)=$P(@GL,"^",PC(1)) G END:LKPRINT=""
L7 S GG=$P(G,"^",2),LK("H")=$P(G,"^",3) G SET:GG["S",DATE:GG["D",PTR:GG["P",TRX:$D(^DD(DIC(1),DR(1),2))
END K DRENT,DRENT1,D0,DNT,DNTT,LK,LKH,GG,GGG,GLL,SUB,PC S:'$D(LKPRINT)&'$D(LKERR) LKERR=0 Q
DNT S DNT=0
DNT1 S GLL=GL_",DNT)",DNT=$O(@GLL) Q:DNT'=+DNT  S DRENT=DNT G DNT1
DNT2 S (DNT,DNTT)=0
DNT3 S GLL=GL_",DNT)",DNT=$O(@GLL) Q:DNT=""  S DNTT=DNTT+1 Q:DNTT=DRENT  G DNT3
DNT4 S DNT=0
DNT5 S GLL=GL_",DNT)",DNT=$O(@GLL) Q:DNT=""  S:DNT=DRENT1 DRENT=DNT Q:DRENT=DNT  G DNT5
SET F LK("I")=1:1 S GGG=$P(LK("H"),";",LK("I")) G END:GGG="" S:$P(GGG,":",1)=LKDATA LKPRINT=$P(GGG,":",2)
 G END
DATE S Y=LKDATA X ^DD("DD") S LKPRINT=Y G END
PTR S GGG="^"_LK("H")_LKDATA_",0)" I '$D(@GGG) S LKERR=7 G END
 S LKPRINT=$P(@GGG,"^",1) G END
COMP S LKH=$E($P(G,";",2),3,999),D0=DA X LKH S LKPRINT=X G END
TRX S Y=LKDATA X ^DD(DIC(1),DR(1),2) S LKPRINT=Y G END