source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGODCV.m@ 1093

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1DGODCV ;ALB/EG - STORE GENERATED REPORT INTO VAMC FILEMAN ; 11 APR 89
2 ;;5.3;Registration;;Aug 13, 1993
3 ;;V 4.5
4 S U="^",(DGTN,DGDV,DGV,DGMT,DGEL)=""
5 S DGTOP1=$S(DGJB=2:1,1:3),GOX=$S(DGJB=1:"AO",1:"AI") F DGTN=1:1:DGTOP1 D @GOX
6 K %DT,AX,DA,DFN,DGL,DGPT,DGREP,DGSTN,DGSTN1,DGTOP,DGTOP1,DGTYPE,DIC,DLAYGO,GOX,X5 Q
7AO S DGDV="" F I=1:1 S DGDV=$O(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV)) Q:(DGDV="")!(DGDV="TOT") I $D(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV))>0&(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"TOT","N")+^("V")>0) D ENTY,2
8 Q
9AI S DGDV="" F I=1:1 S DGDV=$O(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV)) Q:(DGDV="")!(DGDV="TOT") D AI1
10 Q
11AI1 I ($P(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV),U,7)>0)&($D(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV))=1) D ENTY Q
12 I ($D(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV))=11)&(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"TOT","N")+^("V")>0) D ENTY,2
13 Q
142 F DGV="V","N" S DGTOP=$S(DGV="V":6,1:8) F DGEL=1:1:DGTOP,"*" D 3
15 Q
163 S DGL=$S((DGV="V")&(DGEL'="*"):DGEL,(DGV="V")&(DGEL="*"):7,(DGV="N")&(DGEL="*"):16,1:DGEL+7)
17 S I1=0 F DGMT="AS","AN","B","C","N","X","U" S I1=I1+1,AX(I1)=^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,DGMT,DGEL)
18 S DA=DFN,DIE="^VAT(408,",DR="5///0"_";6///"_DGTOUT_";8///"_DGL
19 S DR(2,408.08)="1///"_AX(1)_";2///"_AX(2)_";3///"_AX(3)_";4///"_AX(4)_";5///"_AX(5)_";6///"_AX(6)_";7///"_AX(7) D ^DIE K DR
20 Q
21ENTY ;stuff run date (.01)
22 S DIC="^VAT(408,",DLAYGO=408,DIC(0)="L",%DT="TS",X="N" D ^%DT S X=Y,DGSTN=$P(^DG(40.8,1,0),U,1),DGSTN1=$P(^DIC(4,$P(^DG(40.8,1,0),U,7),99),U,1)
23LOCK L ^VAT(408,+X):1 I '$T!$D(^VAT(408,+X)) L S X=X+.000001 G LOCK
24 S X5=^UTILITY("DGOD",$J,DGJB,DGTN,DGDV),DGTOUT=$S(DGJB=1:$P(X5,U,7),1:$P(X5,U,8)),DGPT=$S(DGJB=2:$P(X5,U,7),1:"")
25 S DGTYPE=$S(DGJB=2:2,(DGJB=1)&(DGTN=1):1,(DGJB=1)&(DGTN=2):4,(DGJB=1)&(DGTN=3):3,1:0),DIC("DR")="1///"_DGREP_";2///"_DGDV_";3///"_DGSTN1_";4///"_DGTYPE_";9///"_DGPT D ^DIC S DFN=$P(Y,U,1),DA=DFN K DR,DIC("DR")
26 Q
Note: See TracBrowser for help on using the repository browser.