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

ADEMNG3.m

Go to the documentation of this file.
ADEMNG3 ; IHS/HQT/MJL  - DENTAL FOLLOWUP MGT PT 3 ;  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
CTRL ;------->GET PRIORITY
1 S Y=1 D PRIO G:'Y END
 ;------->GET ADD DATE & COMPUTE ACTION DATE ADEMACT
2 D ADAT G:X[U 1 G:'Y END
21 D ACT G:X[U 1 G:'Y END
 ;------->GET PROVIDER
3 D PROV G:X[U 1 G:'Y END
 ;------->END
END I 'Y W !,"***FOLLOWUP DATA ENTRY ABORTED***",*7 H 2
 Q
PRIO ;I $D(ADEPRI) S ADEPRI=$S(ADEPRI="u":"URGENT",ADEPRI="r":"ROUTINE",1:"HIGH")
 W !!,"PRIORITY: "_$S($D(ADEPRI):ADEPRI_"// ",1:"") R X:DTIME S:'$T X=U
 I X="",$D(ADEPRI) S X=$E(ADEPRI,1)
 I X="" W " <Required -- type `^' to abort>",*7 G PRIO
 I X[U S Y=0 Q
 I X="R"!(X="r") W " ROUTINE" S Y=1,ADEPRI="r" Q
 I X="H"!(X="h") W " HIGH" S Y=1,ADEPRI="h" Q
 I X="U"!(X="h") W " URGENT" S Y=1,ADEPRI="u" Q
 W:X'["?" " ??",*7
 W !?5,"Enter H for High Priority, R for Routine, U for Urgent"
 G PRIO
 ;
ADAT Q:X[U
 I $D(ADEMDAT) S Y=ADEMDAT X ^DD("DD") S ADEMDAT=Y
 S %DT("A")="DATE ADDED: ",%DT("B")=$S($D(ADEMDAT):ADEMDAT,1:"TODAY"),%DT(0)=-DT,%DT="AEPX"
 D ^%DT ;G:Y<1 ADAT
 I Y<1 S Y=0 Q
 S ADEMDAT=Y
 Q
PROV K DIC,Y S DIC=6,DIC(0)="QMEZ",DIC("S")="I $P(^DIC(6,Y,0),U,4)]"""" S ADEDICS=+^DIC(7,$P(^DIC(6,Y,0),U,4),9999999) X $S((ADEDICS=52)!(ADEDICS=46):""I 1"",1:""I 0"")"
 W !,"Select PROVIDER: ",$S($D(ADEMPRO):ADEMPRO_"// ",1:"") R X:DTIME
 I '$T S X="",Y=0 Q
 I X["^" S Y=0 Q
 I X="",$D(ADEMPRO) S X=ADEMPRO
 D ^DIC K DIC,ADEDICS
 I Y=-1,X["?" G PROV
 I Y=-1 G PROV W *7," ??" G PROV
 S ADEPROD=$P(Y,U),ADEMPRO=Y(0,0)
 S Y=1 Q
ACT G:'ADENEWM A1
 S ADEMACT=$P(^ADETYP(ADESUB,0),U,$S(ADEPRI="r":3,1:2))
 S:+ADEMACT=0 ADEMACT=365
 S X2=ADEMACT,X1=ADEMDAT D C^%DTC S Y=X X ^DD("DD") S ADEMACT=Y K X,X1,X2
A1 S Y=ADEMACT X ^DD("DD") S ADEMACT=Y,%DT("A")="RECALL DATE: ",%DT("B")=ADEMACT,%DT(0)=DT,%DT="AEX"
 D ^%DT ;G:Y<1 ACT
 I Y<1 S Y=0 Q
 S ADEMACT=Y
 Q