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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1DGPTFTR ;ALB/JDS - TRANSMISSION OF PTF ; 1/31/05 11:53am
2 ;;5.3;Registration;**37,415,530,601,614,645**;Aug 13, 1993
3 ;
4ENN L ^DGP(45.83):5 I '$T W !,"Already transmitting" Q
5 D CEN^DGPTUTL
6 I '$D(DGRTY) S Y=1 D RTY^DGPTUTL
7 D FDT^DGPTUTL S DGFMTDT=Y
8 ;
9EN5 K DIC S DIC=45.83,DIC(0)="AMZEQ",DIC("A")="Enter Start Date: "
10 S DIC("S")="I $O(^DGP(45.83,+Y,""P"",0)) F DGX=0:0 S DGX=$O(^DGP(45.83,+Y,""P"",DGX)) Q:'DGX I '$P(^DGP(45.83,+Y,""P"",DGX,0),U,2),$D(^DGPT(DGX,0)),$D(^(70)),+^(70)>2901000,$P(^(0),U,11)=+DGRTY Q"
11 S D="ANT" D IX^DIC G ENQ1:X["^"!(X=""),EN5:Y'>0
12 S DGSD=+Y(0),DIC(0)="EAMZQ",DIC("S")="I Y'<DGSD"_" "_DIC("S"),DIC("A")="Enter Through Date: TODAY// ",D="ANT" D IX^DIC K DIC,D
13 ;
14 G ENQ1:X["^" S DGED=$S(Y>0:+Y(0),1:DT)
15 ; -- 125 cols
16 S VATNAME="PTF125" D ^VATRAN I VATERR K VATNAME,VATERR,VAT L G ENQ
17 S DGFMT=2 D SCAN G:DGOUTX ENQ1
18ENQ D SCAN^DGPTFTR3
19ENQ1 L K DGACNT,DGXM,XMDUN,XMY,DGOUTX,DGSTCNT,DIC,DGX,DGRTY,DGRTY0,DGCN,DGCN0,DGPTFMT,DGFMT,DGFMTDT,DGLOGIC,VAT,VATERR,VATNAME,DGSD,DGED
20 Q
21 ;
22SCAN K DGERR S DGPTFMT=2 D LOG S DGCNT=1,DGD=DGSD-.01,DGTR=0,DGID=1
23 ; DG*5.3*614 - DGFIRST identifies first record in a batch
24 N DGFIRST S DGFIRST=1
25 W !!,"Now transmitting 125 column ",$P(DGRTY0,U)," records..."
26 W !,"Includes records of "
27 ;
28DAT D:DGCNT>1 XMIT S DGD=$O(^DGP(45.83,DGD))
29 I DGD>0,DGD'>DGED D SETTRAN^DGPTUTL1 Q:DGOUTX
30 I DGD'>0!(DGD>DGED) D BULL^DGPTFTR3 G DATQ
31 S J=0 G PWR
32DATQ Q
33 ;
34PWR S P=J,J=$O(^DGP(45.83,DGD,"P",J)) G DAT:J'>0,PWR:$P(^(J,0),U,2)
35 I $D(^DGPT(J,0)),$P(^(0),U,11)'=+DGRTY G PWR
36 I $P(DGCN0,U,3)>DT,DGRTY=1 D CEN^DGPTFTR3 G PWR:'Y
37 S Y=$S($D(^DGPT(J,70)):+^(70),1:0) D FMT^DGPTUTL G PWR:DGPTFMT'=DGFMT
38 S T1=0,T2=9999999,Y=J,X=0 S:DGRTY=2 T2=+DGCN0_".9",T1=+$P(DGCN0,U,5) D LINES^DGPTFVC2 I (DGCNT+X)>VAT("F"),'$G(DGFIRST) S J=P G XMIT
39 I $G(DGFIRST)=1 S DGFIRST=0
40 K DICR S DGERR=0,DGSTCNT("P",J)=DGCNT
41 W !,$E($P(^DPT(+^DGPT(J,0),0),U),1,25),?27,"(#",J,")" S X=^DGPT(J,0) D WR^DGPTF
42 K ^TMP("AEDIT",$J),^TMP("AERROR",$J) S DGACNT=0
43 I DGRTY=1 D COM
44 I DGRTY=2 S T2=+DGCN0_".9",T1=+$P(DGCN0,U,5),(PTF,DGCI)=J D COM1
45 I DGERR D OPEN^DGPTFTR3
46 K ^TMP("AEDIT",$J)
47 I 'DGERR W ?70," Okay" S DGTR=DGTR+1 G XMIT:DGCNT>VAT("F")
48 G PWR
49 Q
50 ;
51XMIT K XMY D ROUTER
52 S XMZ=DGXMZ,^XMB(3.9,XMZ,2,0)="^3.92A^"_(DGCNT-1)_"^"_(DGCNT-1)_"^"_DT,DGJ=J
53 S XMDUZ=.5,XMDUN=$P(^VA(200,DUZ,0),U) D ENT1^XMD
54 W !,"Transmission Queued" S DGIDN(DGID)=XMZ
55 F DGK=0:0 S DGK=$O(DGSTCNT("P",DGK)) Q:DGK'>0 D REC
56 S DGFIRST=1
57 K DGK S DGCNT=1,DGID=DGID+1,J=DGJ Q:J'>0 D SETTRAN^DGPTUTL1 G:'DGOUTX PWR
58 Q
59 ;
60REC ;
61 S DGSENFLG=""
62 S DIE="^DGP(45.83,",DA=DGD,DR="10///"_DGK,DR(2,45.831)="1///TODAY;2///"_XMZ D ^DIE K DA,DR,DIE
63 S DIE="^DGPT(",DR="6///3",DA=DGK D ^DIE K DA,DR,DIE
64 K DGSENFLG
65 Q
66 ;
67COM S T1=0,T2=9999999 S:'$D(PTF) PTF=J S:PTF'=J PTF=J
68COM1 F K=0,70,71,101,"401P" S @("DG"_K)=$S($D(^DGPT(J,K)):^(K),1:"")
69 F K=10,.11,.3,.32,.321,.52,57 S @("DG"_$S(K[".":$E(K,2,99),1:K))=$S($D(^DGP(45.84,J,K)):^(K),$D(^DPT(+^DGPT(J,0),$S(K'=10:K,1:0))):$S(K'=10:^(K),1:^(0)),1:"")
70 F K=.02,.06 M @("DG"_$S(K[".":$E(K,2,99),1:K))=^DPT(+^DGPT(J,0),K)
71 D ^DGPTFTR0:DGPTFMT=1,^DGPTR0:DGPTFMT=2
72 ;
73Q L F K=0,10,701,"401P",101,11,3,32,41,52,57,70,321,502,702,"02","06" K @("DG"_K)
74 K DGCDR,DGT,DIC,DGADM,DGAO,DGDOB,DGHEAD,DGJ,DGK,DGL,DGM,DGNAM,DGNT,DGO,DGSSN,DGSUD,DGSUR,DGTD,DGX,DGXLS,E,ERR,F,G,H,I,K,L,T,W,Z,DGPROC,DGPROCD ;** NOTE: do not kill variables needed by PTF load/edit option!!!
75 I $D(DGERR),DGERR<1 D ^DGPTFVC1 D:'T1 ^DGPTFVC3
76 I $D(DGERR),DGERR<1 D EN^DGPTFVC2
77 Q
78 ;
79LOG ;called from PRINT+1^DGPTF2,CLS+1^DGPTF2,EN^DGPTFVC
80 D LOG^DGPTFTR1:DGPTFMT=1,LOG^DGPTR1:DGPTFMT=2,COM:$D(DGERR)
81 Q
82 ;
83 ;-- check for real queue if census should be removed for national rel
84ROUTER S XMDUZ=.5 F DGSDI=0:0 S DGSDI=$O(VAT(DGSDI)) Q:'DGSDI S X=VAT(DGSDI),XMN=0,XMDF="" D INST^XMA21 K XMN,XMDF
85 S XMY(DUZ)=""
86 Q
Note: See TracBrowser for help on using the repository browser.