VistA-FOIAVistA/r/LIBRARY-LBR-LBRS/LBRYFINP.m

38 lines
1.3 KiB
Mathematica
Raw Permalink Normal View History

LBRYFINP ;SSI/ALA-FORUM INPUT CHECKS ;[ 07/22/97 3:23 PM ]
;;2.5;Library;**2**;Mar 11, 1996
PP ; Prediction Pattern Input
Q:$G(LBRYNEW)=1
NEW DIC,DIE,DR,DA
S TY=$S(OPP="":"ADDED",NPP="":"DELETED",1:"CHANGED")
S TYP="CPT" NEW X D FTRN^LBRYUTL S $P(^LBRY(682.1,LBRYDA,0),U,8)=TY
S $P(^LBRY(682.1,LBRYDA,1),U)=$P(^LBRY(680.5,LBRYCLS,0),U)
I OPP'="" NEW X,LBRYCLS S LBRYCLS=OPP D PRP^LBRYTRN
K OPP,NPP,TY,TYP,LBRYDA
Q
FR ; Frequency Input
Q:$G(LBRYNEW)=1
NEW DIC,DIE,DR,DA
S TY=$S(OFR="":"ADDED",NFR="":"DELETED",1:"CHANGED")
S TYP="CFQ" NEW X D FTRN^LBRYUTL S $P(^LBRY(682.1,LBRYDA,0),U,8)=TY
S $P(^LBRY(682.1,LBRYDA,1),U)=$P(^LBRY(680.5,LBRYCLS,0),U)
I OFR'="" NEW X S FRQ=OFR D FRQ^LBRYTRN
K OFR,NFR,TY,TYP,LBRYDA
Q
LS ; Last Issue Input
Q:$G(LBRYNEW)=1
NEW DIC,DIE,DR,DA
Q:$P($G(^LBRY(680.5,LBRYCLS,3)),U,4)=""
S TYP="TCP" NEW X D FTRN^LBRYUTL S $P(^LBRY(682.1,LBRYDA,0),U,8)="CEASED"
S $P(^LBRY(682.1,LBRYDA,1),U)=$P(^LBRY(680.5,LBRYCLS,0),U)
S $P(^LBRY(682.1,LBRYDA,4),U,3)=$P(^LBRY(680.5,LBRYCLS,3),U,4)
K OLS,NLS,TYP,LBRYDA
Q
TCN ; SERLINE Unique Identifier input check
I $D(X) I $L(X)>9!($L(X)<9) K X Q
I $E(X,1,2)="SR",$E(X,3,9)?.N Q
I $E(X,1,1)?.A,$E(X,2,9)?.N Q
S TXT="SERLINE Title Control Number format is: SR####### or A-Z followed by all numbers"
D EN^DDIOL(TXT,"","!!")
K X,TCN
Q