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

ASUAUDIR.m

Go to the documentation of this file.
ASUAUDIR ;DSD/DFM - STANDARD POINTER TYPE READ ROUTINE WITH SCREENING;  [ 04/15/98  2:50 PM ]
 ;;3.0;SAMS;**1**;AUG 20, 1993
 ;THIS ROUTINE IS NEEDED TO DO SCREENING ON POINTER TYPE CALLS WHICH
 ;WOULD NORMALLY CALL DIR - WHEN DIR IS FIXED TO HANDLE SCREENING,
 ;THIS ROUTINE CAN BE DELETED AND ALL CALLS TO IT BE REPLACED WITH
 ;CALLS TO DIR
DIR ;
 S:$D(DIR("S")) DIC("S")=DIR("S")
 W !,DIR("A"),": "
 W:$D(DIR("B")) DIR("B"),"// "
 R X:DTIME
 I '$T S DTOUT=1 G EXIT
 S DIC=$P($P(DIR(0),U,2),":",1)
 I X="?",DIC=9002039.07,$D(ASUTRNS(ASUTRNS,"SUB OBJECT")),$D(ASUTR(0,"ACCOUNT")) D HELP7 G DIR
 I X="!" S X="" G DIR
 I X="",$D(DIR("B")) S X=DIR("B") K DIR("B") G READ
 I X="@" S X=""
 I X="",$P(DIR(0),U)["O" S Y=X G EXIT E  W !!,"This is a required entry.  Enter '^' to exit or '?' to see valid codes.",!! G DIR
 I X="^" K X S DUOUT=1 G EXIT
 I X="^^" K X S DIROUT=1 G EXIT
 I X'=" " G READ
 I '$D(DUZ) G NOSAVE
 I $E(DIC)?1"^" S ASUDIC=DIC G CKDISV
 I $E(DIC)?1A S ASUDIC=U_DIC G CKDISV
 I $E(DIC)?1N S ASUDIC=^DIC(DIC,0,"GL")
 I '$D(ASUDIC) G NOSAVE
 I ASUDIC']"" G NOSAVE
CKDISV ;
 I '$D(^DISV(DUZ,ASUDIC)) G NOSAVE
 G READ
NOSAVE ;
 W !,"Previous entry not available" G DIR
READ ;
 S:DIC'?1N.E DIC=U_DIC
 S DIC(0)=$P($P(DIR(0),U,2),":",2)
 D ^DIC I X="?" G DIR
 I Y<0 W *7,!!,DIR("?"),!,"Enter '^' to exit or '?' to see valid codes",!! G DIR
 I X=" " W $P(Y,U,2)
EXIT ;RETURN TO CALLING ROUTINE
 K ASUDIC,DIC
 Q
HELP7 ;
 S ASUTR(7,"CAT")=""
 F  S ASUTR(7,"CAT")=$O(^ASUTB07("D",ASUTRNS(ASUTRNS,"SUB OBJECT"),ASUTR(7,"CAT"))) Q:ASUTR(7,"CAT")=""  D
 .S ASUTR(7,"SOBJ")=$O(^ASUTB07("D",ASUTRNS(ASUTRNS,"SUB OBJECT"),ASUTR(7,"CAT"),""))
 .Q:$P(^ASUTB07(ASUTR(7,"CAT"),1,ASUTR(7,"SOBJ"),0),U)'=ASUTR(0,"ACCOUNT")
 .W !?5,^ASUTB07(ASUTR(7,"CAT"),0),?10,$P(^ASUTB07(ASUTR(7,"CAT"),1,ASUTR(7,"SOBJ"),0),U,3)
 K ASUTR(7,"CAT"),ASUTR(7,"SOBJ")
 Q