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

YTCROSS.m

Go to the documentation of this file.
YTCROSS ;SLC/TGA-SET 'AD' CROSS REFERENCE, FILE 601.2 ; 5/1/89  11:04 ;
 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
SET ;
 Q:'$D(^YTD(601.2,DA(2),1,DA(1),1,DA,0))
 S YSE=$P(^YTD(601.2,DA(2),1,DA(1),1,DA,0),U,6),YSS=$P(^(0),U,7),YSN=$P(^YTD(601.2,DA(2),1,DA(1),0),U) Q:YSN<1  Q:'$D(^YTT(601,YSN))  Q:$P(^YTT(601,YSN,0),U,9)="I"  Q:YSE<1!(YSS<1)
 S X=$E(X,1,5) S:$D(^YTD(601.2,"AD",YSS,YSE,X,YSN)) ^(YSN)=^(YSN)+1 S:'$D(^(YSN)) ^(YSN)=1
 Q
KILL ;
 Q:$D(YSNOKILL)  Q:'$D(^YTD(601.2,DA(2),1,DA(1),1,DA,0))
 S YSE=$P(^YTD(601.2,DA(2),1,DA(1),1,DA,0),U,6),YSS=$P(^(0),U,7),YSN=$P(^YTD(601.2,DA(2),1,DA(1),0),U) Q:YSN<1!(YSS<1)!(YSE<1)  S X=$E(X,1,5) I $D(^YTD(601.2,"AD",YSS,YSE,X,YSN)) S ^(YSN)=^(YSN)-1 I ^(YSN)<1 K ^(YSN)