Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRPFU1

PRPFU1.m

Go to the documentation of this file.
PRPFU1 ;ALTOONA/CTB  PATIENT FUNDS UTILITY PROGRAM ;11/22/96  4:47 PM
V ;;3.0;PATIENT FUNDS;**6**;JUNE 1, 1989
 ;ENTRY TO BREAK OUT FULL DESSCIPTION FROM SET OF CODES
 ;VARIABLES:  X=INTERNAL VALUE
 ;            DD=DD NUMBER
 ;            F=FIELD NUMBER
 ;RETURNS DESCRIPTION VALUE IN VARIABLE Y
 ;RETURNS %=1 WHEN SUCCESSFUL, %=0 WHEN LOOKUP FAILED
 ;X,DD,F ARE KILLED
SE I X="" S Y="" Q
 S I=2 D SET,Y^DIQ,KILL Q
SET K Y S U="^",%=0,Y="" Q:'$D(X)!('$D(DD))!('$D(F))
 Q:X=""!(DD="")!(F="")
 S Y=X,X="S C=$P(^DD("_DD_","_F_",0),U,"_I_")" X X Q
 Q
KILL K DD,I,C,X,F Q
EXIT ;MASTER MENU EXIT LINE
 K PRPF Q
DATE(Y) ;FUNCTION TO RETURN DATE IN EXTERNAL FORMAT
 D D Q Y
 ;
D ;CONVERTS FILEMAN INTERNAL DATE TO EXTERNAL FORMAT
 S:Y Y=$S($E(Y,4,5):$P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC","^",+$E(Y,4,5))_" ",1:"")_$S($E(Y,6,7):+$E(Y,6,7)_",",1:"")_($E(Y,1,3)+1700)_$P("@"_$E(Y_0,9,10)_":"_$E(Y_"000",11,12),"^",Y[".")
 Q
MSG ;;PRINTS MESSAGE CONTAINED IN X.  IF IT DOESNT FIT ON ONE LINE, X IS PRINTED ON THE NEXT LINE.
 N X1,X2,ZX Q:'$D(X)  I $S('$D(IOM):1,IOM="":1,1:0) W $P(X,"*") R X:2 K X Q
 I ($L($P(X,"*"))+4+$X)>IOM W !,?(IOM-($L($P(X,"*"))+4))
 F ZX=1:1 D BRK:($L(X)+6)>IOM W "  ",$P(X,"*"),! Q:'$D(X1)  S X=X1 K X1
 W:X["*" *7
 Q
BRK N I
 S X1=X F I=1:1 Q:$L($P(X," ",1,I))>(IOM-6)!($L(X)<(IOM-6))  S X1=$P(X," ",1,I)
 S X2=$P(X," ",I,999),X=X1,X1=X2 K X2 Q
DGINPW S DFN(.1)="",DOA="" K VAINDT D INP^VADPT Q:$D(VAIN)<10
 I $D(VAIN(4)),VAIN(4)]"" S DFN(.1)=$P(VAIN(4),"^",2)
 I $D(VAIN(7)),VAIN(7)]"" S DOA=$P(VAIN(7),"^",2)
 K VAIN
 Q