source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRUGV16.m@ 1416

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1DGRUGV16 ;ALB/BOK - RUG/PAI TRANSMISSION ; 12 MAY 87 07:25
2 ;;5.3;Registration;;Aug 13, 1993
3QUIT K ^UTILITY($J),%,%DT,D,DA,DGBC,DGPGM,DGCNT,DGED,DGFLG,DGI,DGP,DGPG,DGROW,DGS,DGSD,DGVAR,DGXX,DGSDI,VAT,VATERR,VATNAME,DIE,DR,I,J,K,L,POP,S,X,XMDUZ,XMSUB,XMTEXT,XMY,Y Q
4DEV S %ZIS("A")="Device to print errors on: ",DGVAR="DGP^DGSD^DGED^VAT#^DUZ",DGPGM="EN^DGRUGV16" D ZIS^DGUTQ G:POP QUIT
5EN D LO^DGUTL S (DGFLG,DGXX)="",(DGCNT,DGROW)=0,DGPG=1,$P(DGXX," ",81)=""
6 F I=DGSD:0 S I=$O(^DG(45.9,"AP",DGP,I)) Q:I'>0!(I>DGED) F J=0:0 S J=$O(^DG(45.9,"AP",DGP,I,J)) Q:J'>0 I $D(^DG(45.9,J,0)) S DGI=^(0),DGS=$S($D(^DG(45.9,J,"C")):+^("C"),1:"") D ERR:DGS'=2 I DGS=2 D SET:$D(DGFLG)
7 I $D(^UTILITY($J,"DGRUG")) F DGBC=1:1:DGPG D ROUTER S XMSUB="RUG-II TRANSMISSION, MESSAGE # "_DGBC,XMTEXT="^UTILITY("_$J_",""DGRUG"","_DGBC_",1," D ^XMD
8 G PERR
9ROUTER F DGSDI=0:0 S DGSDI=$O(VAT(DGSDI)) Q:DGSDI'>0 S XMY(VAT(DGSDI))=""
10 S XMDUZ=.5,XMY(DUZ)="" Q
11SET S X="" F K=3:1:5 S L=$P(DGI,U,K) G ERR:L']"" S X=X_L
12 S D=$P(DGI,U,2) D DAT S X=X_$P(DGI,U,6),D=$P(DGI,U,7) D DAT F K=8:1:20 S L=$P(DGI,U,K) G ERR:L']"" S X=X_L
13 S X=X_" " F K=23:1:28 S L=$P(DGI,U,K) G ERR:L']"" S X=X_L
14 S X=X_" " F K=32:1:35 S L=$P(DGI,U,K) G ERR:L']"" S X=X_L
15 S X=X_" " F K=40:1:57 S L=$P(DGI,U,K) G ERR:L']"" S X=X_L
16 S:DGROW+1>VAT("F") DGPG=DGPG+1,DGROW=0 S DGROW=DGROW+1,^UTILITY($J,"DGRUG",DGPG,1,DGROW,0)=$E(X_DGXX,1,80),DGCNT=DGCNT+1
17 S DA=J,DR="80///4;83///"_DT,DIE="^DG(45.9," D ^DIE Q
18ERR S:DGS=4 ^UTILITY($J,"TRANS",J)=DGI S:DGS'=4 ^UTILITY($J,"ERR",J)=DGI Q
19PERR S X=132 X ^%ZOSF("RM")
20 W @IOF,!?95,"Transmission Date: " S Y=DT D DT^DIQ W:($D(^UTILITY($J,"ERR"))!$D(^("TRANS"))) !!?5,"NAME",?40,"SSN",?55,"ASSESSMENT DATE",?80,"STATUS",! S I="",$P(I,"*",132)="" W I
21 I $D(^UTILITY($J,"ERR")) W !!,"ERRORS",! F J=0:0 S J=$O(^UTILITY($J,"ERR",J)) Q:J'>0 S K=^(J) W !,$P(^DPT(+K,0),U,1),?38,$P(K,U,3),?55,$E($P(K,U,2),4,5)_"/"_$E($P(K,U,2),6,7)_"/"_$E($P(K,U,2),2,3),?82 D STAT W S
22 I $D(^UTILITY($J,"TRANS")) W !!,"RECORDS ALREADY TRANSMITTED",! F J=0:0 S J=$O(^UTILITY($J,"TRANS",J)) Q:J'>0 S K=^(J) W !,$P(^DPT(+K,0),U,1),?38,$P(K,U,3),?55,$E($P(K,U,2),4,5)_"/"_$E($P(K,U,2),6,7)_"/"_$E($P(K,U,2),2,3),?82 D STAT W S
23 W !!!,I,!!!,"NUMBER OF RECORDS SENT TO AUSTIN: ",DGCNT,!,"DATE RANGE SENT: " S Y=DGSD+.1 D DT^DIQ W " - " S Y=DGED D DT^DIQ W !,"ASSESSMENT PURPOSE: ",$S(DGP=1:"ADMISSION/TRANSFER",1:"SEMI-ANNUAL"),@IOF
24CLOSE D QUIT,CLOSE^DGUTQ
25 Q
26STAT S S=$S($D(^DG(45.9,J,"C")):+^("C"),1:""),S=$S(S=1:"COMPLETED",S=2:"CLOSED BUT MISSING DATA",S=3:"RELEASED",S=4:"TRANSMITTED",S=0:"OPEN",5:"INCOMPLETE",1:"NO STATUS") Q
27DAT S D=$E(D,4,5)_$E(D,6,7)_$E(D,2,3),X=X_D Q
Note: See TracBrowser for help on using the repository browser.