APCDVAR ; IHS/CMI/LAB - SET UP SITE PARAMETER VARS ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
I '$D(^APCDSITE(DUZ(2),0)) W !!,"The DATA ENTRY Site Parameters have not been",!,"established for this facility. PLEASE NOTIFY YOUR SUPERVISOR!",$C(7),$C(7) D DEFAULT,CURRENT,XIT Q
S APCDPARM=^APCDSITE(DUZ(2),0)
I $P(APCDPARM,U,2)="U" S AUPNLK("ALL")=""
I $P(APCDPARM,U,6)="Y" D SETDEF
;
CURRENT D HOME^%ZIS
S APCDNRV="",APCDX="APCDNRV"
I $D(IOST(0)) S APCDTRM=$S($D(^%ZIS(2,IOST(0),5)):^(5),1:""),APCDRVON=$S($P(APCDTRM,U,4)]"":$P(APCDTRM,U,4),1:APCDX),APCDRVOF=$S($P(APCDTRM,U,5)]"":$P(APCDTRM,U,5),1:APCDX)
S:'$D(APCDRVON) (APCDRVON,APCDRVOF)=""
DUZ ;
I '$G(DUZ) W !!,"WARNING: User NOT set in DUZ - Use Kernel!!",$C(7),$C(7)
E K APCDMFI
XIT ;
K APCDX,APCDTRM
Q
DEFAULT ;EP
W !!,"Defaulting Site Parameters to the Following: ",!
W "1) Site Specific Lookup 2) Do Not ask 'Yes' on Visit Creation",!,"3) Display Problem Lists and Historical Data 4) FORMS Tracking OFF ",!,"5) NO Default Values Used",!
S APCDPARM="^S^N^Y^N^N^Y^Y^"
Q
;
SETDEF ;
S APCDDEFL=$P(^APCDSITE(DUZ(2),0),U,9),APCDDEFT=$P(^(0),U,11),APCDDEFS=$P(^(0),U,12),APCDDEFC=$P(^(0),U,13)
Q
ERR ;
W !,$C(7),"Default Values Missing!! Notify your PCC Manager!",! S $P(APCDPARM,U,6)="N"
Q
APCDVAR ; IHS/CMI/LAB - SET UP SITE PARAMETER VARS ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 IF '$DATA(^APCDSITE(DUZ(2),0))
WRITE !!,"The DATA ENTRY Site Parameters have not been",!,"established for this facility. PLEASE NOTIFY YOUR SUPERVISOR!",$CHAR(7),$CHAR(7)
DO DEFAULT
DO CURRENT
DO XIT
QUIT
+3 SET APCDPARM=^APCDSITE(DUZ(2),0)
+4 IF $PIECE(APCDPARM,U,2)="U"
SET AUPNLK("ALL")=""
+5 IF $PIECE(APCDPARM,U,6)="Y"
DO SETDEF
+6 ;
CURRENT DO HOME^%ZIS
+1 SET APCDNRV=""
SET APCDX="APCDNRV"
+2 IF $DATA(IOST(0))
SET APCDTRM=$SELECT($DATA(^%ZIS(2,IOST(0),5)):^(5),1:"")
SET APCDRVON=$SELECT($PIECE(APCDTRM,U,4)]"":$PIECE(APCDTRM,U,4),1:APCDX)
SET APCDRVOF=$SELECT($PIECE(APCDTRM,U,5)]"":$PIECE(APCDTRM,U,5),1:APCDX)
+3 IF '$DATA(APCDRVON)
SET (APCDRVON,APCDRVOF)=""
DUZ ;
+1 IF '$GET(DUZ)
WRITE !!,"WARNING: User NOT set in DUZ - Use Kernel!!",$CHAR(7),$CHAR(7)
+2 IF '$TEST
KILL APCDMFI
XIT ;
+1 KILL APCDX,APCDTRM
+2 QUIT
DEFAULT ;EP
+1 WRITE !!,"Defaulting Site Parameters to the Following: ",!
+2 WRITE "1) Site Specific Lookup 2) Do Not ask 'Yes' on Visit Creation",!,"3) Display Problem Lists and Historical Data 4) FORMS Tracking OFF ",!,"5) NO Default Values Used",!
+3 SET APCDPARM="^S^N^Y^N^N^Y^Y^"
+4 QUIT
+5 ;
SETDEF ;
+1 SET APCDDEFL=$PIECE(^APCDSITE(DUZ(2),0),U,9)
SET APCDDEFT=$PIECE(^(0),U,11)
SET APCDDEFS=$PIECE(^(0),U,12)
SET APCDDEFC=$PIECE(^(0),U,13)
+2 QUIT
ERR ;
+1 WRITE !,$CHAR(7),"Default Values Missing!! Notify your PCC Manager!",!
SET $PIECE(APCDPARM,U,6)="N"
+2 QUIT