source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCOCRYP.m@ 1654

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1PRCOCRYP ;(WASH CIOFO)/LKG- ENCODE/DECODE FIELD IN PHA ;4/28/97 10:41
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4ENCODE(X,X1) ; Encode
5 ;X is the input string to be encoded
6 ;X1 is the document number
7 ;Returns encoded string
8 N PA,PI,PL,PY,PY1
9 I $G(X)=""!($G(X1)="") S PY="" G ENX
10 I X["^"!(X["|")!(X["~")!(X["$") S PY="" G ENX
11 S PL=$L(X) D CL S PY=""
12 F PI=1:1:PL S PY1=$E(PA(PI),$A(X,PI)-31),PY=PY_PY1
13ENX Q PY
14 ;
15DECODE(X,X1) ; Decode
16 ;X is the encoded input string
17 ;X1 is the document number
18 ;Returns decode string
19 N PA,PI,PL,PY,PY1
20 I $G(X)=""!($G(X1)="") S PY="" G DEX
21 S PL=$L(X) D CL S PY=""
22 F PI=1:1:PL S PY1=$F(PA(PI),$E(X,PI))+30,PY=PY_$C(PY1)
23DEX Q PY
24 ;
25CL F PI=1:1:PL S PA(PI)=$P($T(Z+(X1+PI#20+1)),";",3,9)
26 Q
27Z ;;
28 ;;e&Qu|l) Jjk1O+NpA=3*Lbv[(XF,zZWHgi>S"UM;0@.dIon}4_Pw-8qyC?K/YV|6t7sE]fx'D`TB%R#a{\!G<29h5rc:|m|
29 ;;j<eH|,xKA9\; s>?%`51I=il_fQ)-tFWg@0D[T2{MZLb/o8y.Jp3Oh7w:knRmq|VXu#E]GYC+'!rP(4ScBU"Nv*}z&da|6|
30 ;;(iLJ|!E'S<MRe&p.mjI\d`u9tzb1ZsHoTnY;av%0O+hX,gx[?qCFA/:6{V7y*f|}]258)4GUNl-Q_@r#cPW>=w kB3D"|K|
31 ;;,gkh|FDc4}K9n5Y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