source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCFU.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1PRCFU ;WISC@ALTOONA/CTB/BGJ-UTILITY ROUTINE CODE SHEETS ;10 Sep 89/3:08 PM
2V ;;5.1;IFCAP;**39**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;THIS PROGRAM PADS OUTPUT FOR USE BY THE CODE SHEET PROGRAM
5 ;Y IS IN AND OUT VARIABLE AND MUST BE PRESENT
6 ;PRCFLN IS FIELD LENGTH IN WHICH VARIABLE IS TO BE PADDED
7 ;;;SAMPLE CODE IN OUTPUT TRANSFORM S Y=Y(0) S:$D(YOUR VARIABLE) PRCFLN=(FIELD LENGTH) D:$D(YOUR VARIABLE) TYPEOFPAD^PRCFU
8LZF ;LEFT ZERO A FIELD, Y IS VARIABLE IN, Y IS VARIABLE OUT, PRCFLN IS FIELD LENGTH
9 K PRCFZ Q:'$D(PRCFLN)
10 S $P(PRCFZ,"0",PRCFLN)=0,PRCFZ=PRCFZ_Y,Y=$E(PRCFZ,$L(PRCFZ)-PRCFLN+1,$L(PRCFZ)) K PRCFLN,PRCFZ Q
11RZF ;RIGHT ZERO FILL A FIELD ; Y = DATA , PRCFLN = FIELD LENGTH
12 K PRCFZ Q:'$D(PRCFLN)
13 S $P(PRCFZ,"0",PRCFLN)=0,Y=$E(Y_PRCFZ,1,PRCFLN) K PRCFLN,PRCFZ Q
14LBF ;LEFT BLANK FILL ;Y = DATA, PRCFLN=FIELD LENGTH
15 K PRCFZ Q:'$D(PRCFLN)
16 S $P(PRCFZ," ",PRCFLN)=" ",PRCFZ=PRCFZ_Y,Y=$E(PRCFZ,$L(PRCFZ)-PRCFLN+1,$L(PRCFZ)) K PRCFLN,PRCFZ Q
17RBF ;RIGHT BLANK FILL ; Y=DATA,PRCFLN=FIELD LENGTH
18 K PRCFZ Q:'$D(PRCFLN)
19 S $P(PRCFZ," ",PRCFLN)=" ",Y=$E(Y_PRCFZ,1,PRCFLN) K PRCFLN,PRCFZ Q
20DIC N C,D,DB,DIA,DIC,DICR,DIE,DIX,DO,DR,DS,DSC,DV,DXS,L S DIC=4,DIC(0)="QEMZ",DIC("S")="I $S('$D(^(99)):0,$P(^(99),U)>0:1,1:0)" D ^DIC K DG Q
21 Q
22EX W !! N %,C,D,DB,DD,DG,DIA,DIBTDH,DIC,DIE,DIX,DIY,DO,DQ,DR,DCS,DXS,DZ,DZ1,L,X,XQH,Y S DIC=4,DIC(0)="QEM",DIC("S")="I $S('$D(^(99)):0,1:0)",X="?" D ^DIC Q
23CAPSDATE ;CONVERT INTERNAL FM DATE IN Y TO MM,DD,YY FORMAT FOR CAPPS
24 S Y=$E(Y,4,5)_$E(Y,6,7)_$E(Y,2,3) S PRCFLN=6 D RBF Q
25CAPSDOL ;CREATE CAPS DOLLAR FIELD TO 9 NUMBER LZF
26 Q:'$D(PRCF("OUT")) S PRCFLN=9 D LZF Q
27LBF1(STRING,LENGTH) ;Left blank fill string in a field with specified length
28 N X
29 S $P(X," ",LENGTH)=" ",STRING=X_STRING
30 Q $E(STRING,$L(STRING)-(LENGTH-1),$L(STRING))
Note: See TracBrowser for help on using the repository browser.