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

QAPFILE.m

Go to the documentation of this file.
  1. QAPFILE ;557/THM-POPULATE THE DEMOGRAPHIC REFERENCE FILE [ 06/19/95 11:59 AM ]
  1. ;;2.0;Survey Generator;;Jun 20, 1995
  1. ;
  1. D SCREEN^QAPUTIL
  1. EN I $D(DUZ)#2=0 W !!,*7,"Your DUZ is missing ! " H 2 G EXIT
  1. I '$D(DUZ(0)) W !!,*7,"Your DUZ(0) is missing ! " H 2 G EXIT
  1. ;
  1. BEGIN W @IOF,! S QAPHDR="Populate the Demographic Reference File" X QAPBAR W !!
  1. I DUZ(0)'="@" W !!,*7,"Programmer access required for this program ! " H 2 G EXIT
  1. W !,"Enter DEMOGRAPHIC REFERENCE FILE NAME: " R X:DTIME I X[U!(X="") G EXIT
  1. S DLAYGO=748.2,DIC="^QA(748.2,",DIC(0)="EQLMZ"
  1. I X["?" S IOTM=1,IOBM=24 W @TOPBOT,@IOF,! D ^DIC G:$D(DTOUT) EXIT W !!,"Press RETURN " R ANS:DTIME G:'$T EXIT S IOTM=8,IOBM=24 W @TOPBOT G BEGIN
  1. D ^DIC G:X=""!(X[U) EXIT S DA=+Y I +Y<0 H 1 G EN
  1. I $P(Y,U,3)'=1 S DR=".01",DIE=DIC W !! D ^DIE G EN
  1. ;
  1. EXIT G EXIT^QAPUTIL
  1. ;
  1. SCREEN ;screen any user file selections on demographics
  1. ;they are not allowed to use files they have no normal access to
  1. S QAPY=Y,QAPY=+$P($G(^QA(748.2,+QAPY,0)),U,1)
  1. S PROTECT=$G(^DIC(+QAPY,0,"RD"))
  1. I DUZ(0)="@"!(DUZ(0)[PROTECT) ;set $T
  1. K PROTECT,DIC("S"),QAPY Q