source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCFACXL.m@ 1245

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1PRCFACXL ;WISC@ALTOONA/CTB-LOG CODE SHEET STRING GENERATOR ;10 Sep 89/3:08 PM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 S U="^" K PRCFDEL,TERM S:'$D(DA) DA=PRCFA("CSDA") K Q,Q0,Q1 F I=-1:0 S I=$O(^PRCF(423,DA,I)) Q:I=""!(I'=+I) S:$D(^(I))'["0" Q(I)=^(I) I $D(^PRCF(423,DA,I,0)) D D1
5 S Q=$P(Q(0),U,3),Q=$E(Q,2,($L(Q)-1)),Q("MAP")=$O(^PRCD(422,"AD",Q,0)) F I=0:0 S I=$O(^PRCD(422,Q("MAP"),1,I)) Q:I="" S:$D(^(I,0)) Q("MAPSTR",I)=^(0)
6 S X=0,XL1=81,Q1(X)="",S=";",C=",",DEL="." I $D(PRCHLOG) S DEL="",XL1=80
7 S N1=0 F I=1:1 S N1=$O(Q("MAPSTR",N1)) Q:'N1 F N2=1:1 Q:$P(Q("MAPSTR",N1),"\",N2)="" S A=$P(Q("MAPSTR",N1),"\",N2) D @($S(A'[",":"SINGLE",1:"MULTI")) Q:$D(TERM)
8 S:$E(Q1(0),1)="." Q1(0)=$P(Q1(0),".",2,999)
9 F I=0:1:X I Q1(I)["$" D A Q
10 F K=I+1:1:X K Q1(K)
11TRANSMIT G:'$D(^PRCF(423,DA,"TRANS")) ^PRCFACX0 I $D(^PRCF(423,DA,"TRANS")),$P(^("TRANS"),U,1)'="Y" G ^PRCFACX0
12 S ^PRCF(423,DA,"TRANS")="N"
13 W $C(7) S %A="THIS CODE SHEET HAS ALREADY BEEN PRINTED.",%A(1)="DO YOU WISH TO RETRANSMIT IT",%B="'YES' to mark for retransmission.",%B(1)="'NO' or '^' to hold in file."
14 S %=2 D ^PRCFYN I %'=1 W !,$C(7),"NO ACTION TAKEN " R X:3 K PRCFA("PODA") Q
15 S DR=".3////N;.4///@",DIE="^PRCF(423," D ^DIE
16 G ^PRCFACX0
17SINGLE S B=$P(A,S,2,3) S:'$D(Q(+B)) Q(+B)="" S Q=$P(Q(+B),U,$P(B,S,2))
18 I $P(A,S)["T",$D(^DD(423,+A,2.1)),^(2.1)["PRCHLOG" S Y=Q X ^(2.1) S Q=Y
19S1 S Q1(X)=Q1(X)_DEL_Q I $L(Q1(X))>XL1 S Q1(X+1)=$E(Q1(X),XL1+1,999),Q1(X)=$E(Q1(X),1,XL1) S X=X+1,XL1=80 K QX1,QX2 I Q="$" S TERM=1 Q
20 Q
21MULTI S NODE1=$P(A,S,2) F D1=0:0 S D1=$O(Q(NODE1,D1)) Q:'D1 F J1=2:1 Q:$P(A,C,J1)="" S A1=$P(A,C,J1),B1=$P(A1,S,2,3) S:'$D(Q(NODE1,D1,+B1)) Q(NODE1,D1+B1)="" D M2
22 Q
23M2 S Q=$P(Q(NODE1,D1,+B1),U,$P(B1,S,2)) D S1 Q
24 Q
25D1 F J=0:0 S J=$O(^PRCF(423,DA,I,J)) Q:'J F K=-1:0 S K=$O(^(J,K)) Q:K=""!(K'=+K) S:$D(^PRCF(423,DA,I,J,K)) Q(I,J,K)=^(K)
26 Q
27OUT K B,D,D0,DG,DIC,DIE,DIG,DIH,DIU,DIV,DIW,DLAYGO,DR,K,Q,Q1,S,X,XL1 Q
28A I Q1(I)="$" S I=I-1,Q1(I)=$E(Q1(I),1,$L(Q1(I))-1)_"$" Q
29 S Q1(I)=$P(Q1(I),"$",1),Q1(I)=$E(Q1(I),1,$L(Q1(I))-1)_"$" Q
30DEL ;KILL THE CODE SHEET AND CROSS REFERENCES
Note: See TracBrowser for help on using the repository browser.