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

RMPFUTL.m

Go to the documentation of this file.
RMPFUTL ;DDC/KAW-REMOTE ORDER/ENTRY UTILITIES; [ 06/16/95   3:06 PM ]
 ;;2.0;REMOTE ORDER/ENTRY SYSTEM;;JUN 16, 1995
 ;; input: RMPFMENU
 ;;output: RMPFSYS,RMPFDAT,RMPFSTAN,RMPFSTAP
 K RMPFDAT,RMPFSYS,RMPFSTAN S Y=DT D DD^%DT S RMPFDAT=Y
 S X=$O(^RMPF(791813,0)) G P2:'X
 G P2:'$D(^RMPF(791813,X,RMPFMENU)),P1:$P(^(RMPFMENU),U,5)
 S RMPFSTAN=X,RMPFSTAP=$S($D(^DIC(4,RMPFSTAN,99)):$P(^(99),U,1),1:"")
 S:RMPFSTAP'="" RMPFSTAP=RMPFSTAP_" - "
 S RMPFSTAP=RMPFSTAP_$P(^(0),U,1)
 S:RMPFSTAP="" RMPFSTAP="UNKNOWN"
 D PARAM G P2
P1 S DIC=791813,DIC(0)="AEQN" D ^DIC K DIC I Y=-1 K RMPFSTAN,RMPFSYS G P2
 S RMPFSTAN=+Y,RMPFSTAP=$S($D(^DIC(4,RMPFSTAN,99)):$P(^(99),U,1),1:"") S:RMPFSTAP'="" RMPFSTAP=RMPFSTAP_" - " S RMPFSTAP=RMPFSTAP_$P(^(0),U,1) D PARAM
P2 I $D(RMPFSTAN),RMPFSTAN,$D(^RMPF(791813,RMPFSTAN,0)),$D(RMPFSYS)
 E  W $C(7),!!,"*** REMOTE ORDER/ENTRY PARAMETERS HAVE NOT BEEN DEFINED ***"
 K DIC,%X,CT,C,Q,I,%,%Y,X,Y Q
PARAM K RMPFSYS Q:'$D(^RMPF(791813,RMPFSTAN,RMPFMENU))
 S RMPFSYS=^RMPF(791813,RMPFSTAN,RMPFMENU)
 S RMPFSYS(1)=$G(^RMPF(791813,RMPFSTAN,RMPFMENU+1)) Q
PAT ;;input:  DFN
 ;;output: RMPFNAM,RMPFSSN,RMPFDOB
 Q:'$D(DFN)  D DEM^VADPT
 S RMPFNAM=VADM(1),RMPFSSN=$P(VADM(2),U,2),Y=$P(VADM(3),U,1)
 D DD^%DT S RMPFDOB=Y,RMPFDOD=$P(VADM(6),U,1)
 I RMPFDOD S Y=RMPFDOD D DD^%DT S RMPFDOD=Y
 K VADM,VA,VAERR,Y Q
COST ;;input:  X
 ;;output: X
 Q:'$D(X)  S Z1=$P(^RMPF(791810,DA(2),101,DA(1),0),U,1)
 I 'Z1 K X G COSTE
 I '$D(^RMPF(791811,Z1,101,"B",X)) K X G COSTE
 S Z2=$O(^RMPF(791811,Z1,101,"B",X,0)) I 'Z2 K X G COSTE
 I '$D(^RMPF(791811,Z1,101,Z2,0)) K X G COSTE
 I '$D(^RMPF(791811,Z1,0)) K X G COSTE
 S M=$P(^RMPF(791811,Z1,0),U,6)
 S Z3=$P(^RMPF(791811,Z1,101,Z2,0),U,2)*$S(M:1+(M/100),1:1)
 S $P(^RMPF(791810,DA(2),101,DA(1),102,DA,0),U,2)=Z3
COSTE K Z1,Z2,Z3,M Q
COSTKILL S $P(^RMPF(791810,DA(2),101,DA(1),102,DA,0),U,2)="" Q
END Q
 ;;output: RMPFMENU
 S DIC="^RMPF(791810.5,",DIC(0)="AEMQ"
 S DIC("A")="Select ROES Menu Name: " D ^DIC G MENUE:Y=-1
 S RMPFMENU=$P(^RMPF(791810.5,+Y,0),U,2) I RMPFMENU="" K RMPFMENU
DISABLE ;; input: RMPFMENU
 ;;output: RMPFL
 K RMPFL S X=0
 F I=1:1 S X=$O(^RMPF(791810.3,X)) Q:'X  I $D(^(X,0)) S S0=^RMPF(791810.3,X,0),Y=$P(S0,U,1),Z=0 F J=1:1 S Z=$O(^DIC(31,"C",Y,Z)) Q:'Z  S RMPFL(Z)=""
 K X,Y,Z,I,J,S0 Q
READ K RMPFOUT,RMPFQUT
 R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
 I Y?1"^".E S (RMPFOUT,Y)="" Q
 S:Y?1"?".E (RMPFQUT,Y)=""
 Q