source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YTCROSS.m@ 1489

Last change on this file since 1489 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 711 bytes
Line 
1YTCROSS ;SLC/TGA-SET 'AD' CROSS REFERENCE, FILE 601.2 ; 5/1/89 11:04 ;
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3SET ;
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
8KILL ;
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)
Note: See TracBrowser for help on using the repository browser.