1 | YTCROSS ;SLC/TGA-SET 'AD' CROSS REFERENCE, FILE 601.2 ; 5/1/89 11:04 ;
|
---|
2 | ;;5.01;MENTAL HEALTH;;Dec 30, 1994
|
---|
3 | SET ;
|
---|
4 | Q:'$D(^YTD(601.2,DA(2),1,DA(1),1,DA,0))
|
---|
5 | 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)
|
---|
6 | S X=$E(X,1,5) S:$D(^YTD(601.2,"AD",YSS,YSE,X,YSN)) ^(YSN)=^(YSN)+1 S:'$D(^(YSN)) ^(YSN)=1
|
---|
7 | Q
|
---|
8 | KILL ;
|
---|
9 | Q:$D(YSNOKILL) Q:'$D(^YTD(601.2,DA(2),1,DA(1),1,DA,0))
|
---|
10 | 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)
|
---|