QAPSTATS ;557/THM-SURVEY GENERATOR STATISTICS, PART 1 [ 06/19/95 12:49 PM ]
;;2.0;Survey Generator;;Jun 20, 1995
;
SCR D SCREEN^QAPUTIL
EN W @IOF,! S QAPHDR="Survey Statistics" X QAPBAR S QAPHDR="Survey Selection" X QAPBAR
K DIC S DIC("S")="I $P(^(0),U,10)'=""c""!($P(^(0),U,5)=DUZ)!($D(^XUSEC(""QAP MANAGER"",DUZ)))!($D(^QA(748,""AB"",DUZ,+Y)))"
S DIC="^QA(748,",DIC(0)="AEQMZ",DIC("A")="Select a survey: " D ^DIC K DIC G:X=""!(X[U) EXIT^QAPUTIL
S SURVEY=+Y,TITLE=$P(^QA(748,SURVEY,0),U,6)
;
W @IOF,! S QAPHDR="Survey Statistics" X QAPBAR S QAPHDR="Survey: "_TITLE X QAPBAR
BYPASS K %Y X CLEOP W "Do you want to include bypassed questions in the",!,"statistics calculations" S %=2 D YN^DICN G:%<0 EXIT^QAPUTIL S BYPASS=%
I $D(%Y),%Y["?" W !!,"Enter Y to print questions skipped by the participants",!,"or No to not print them." H 3 X CLEOP G BYPASS
;
BYPASSNA K %Y X CLEOP W !!,"Do you want to include 'Not Applicable' responses in the",!,"statistics calculations" S %=2 D YN^DICN G:%<0 EXIT^QAPUTIL S BYPASSNA=%
I $D(%Y),%Y["?" W !!,"Enter Y to print responses of 'Not Applicable'",!,"or No to not print them." H 3 G BYPASSNA
;
WPPRT K %Y X CLEOP W "Do you want to print word processing responses" S %=2 D YN^DICN G:%<0 EXIT^QAPUTIL S WPPRT=%
I $D(%Y),%Y["?" W !!,"Enter Y to print word processing questions or No to not print them." H 3 G WPPRT
S %ZIS="AEQ",%ZIS("A")="Output device: " W !! D ^%ZIS G:POP EXIT^QAPUTIL
I $D(IO("Q")) S ZTREQ="@",ZTIO=ION,ZTRTN="PRINT^QAPSTAT1",ZTDESC="Print "_TITLE_" Survey Statistics" F X="SURVEY","TITLE","BYPASS*","WPPRT" S ZTSAVE(X)=""
I D ^%ZTLOAD W:$D(ZTSK) !!,"Queued as task #",ZTSK,!! H 2 K ZTSK G EXIT^QAPUTIL
G PRINT^QAPSTAT1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HQAPSTATS 1713 printed Dec 13, 2024@02:38:36 Page 2
QAPSTATS ;557/THM-SURVEY GENERATOR STATISTICS, PART 1 [ 06/19/95 12:49 PM ]
+1 ;;2.0;Survey Generator;;Jun 20, 1995
+2 ;
SCR DO SCREEN^QAPUTIL
EN WRITE @IOF,!
SET QAPHDR="Survey Statistics"
XECUTE QAPBAR
SET QAPHDR="Survey Selection"
XECUTE QAPBAR
+1 KILL DIC
SET DIC("S")="I $P(^(0),U,10)'=""c""!($P(^(0),U,5)=DUZ)!($D(^XUSEC(""QAP MANAGER"",DUZ)))!($D(^QA(748,""AB"",DUZ,+Y)))"
+2 SET DIC="^QA(748,"
SET DIC(0)="AEQMZ"
SET DIC("A")="Select a survey: "
DO ^DIC
KILL DIC
if X=""!(X[U)
GOTO EXIT^QAPUTIL
+3 SET SURVEY=+Y
SET TITLE=$PIECE(^QA(748,SURVEY,0),U,6)
+4 ;
+5 WRITE @IOF,!
SET QAPHDR="Survey Statistics"
XECUTE QAPBAR
SET QAPHDR="Survey: "_TITLE
XECUTE QAPBAR
BYPASS KILL %Y
XECUTE CLEOP
WRITE "Do you want to include bypassed questions in the",!,"statistics calculations"
SET %=2
DO YN^DICN
if %<0
GOTO EXIT^QAPUTIL
SET BYPASS=%
+1 IF $DATA(%Y)
IF %Y["?"
WRITE !!,"Enter Y to print questions skipped by the participants",!,"or No to not print them."
HANG 3
XECUTE CLEOP
GOTO BYPASS
+2 ;
BYPASSNA KILL %Y
XECUTE CLEOP
WRITE !!,"Do you want to include 'Not Applicable' responses in the",!,"statistics calculations"
SET %=2
DO YN^DICN
if %<0
GOTO EXIT^QAPUTIL
SET BYPASSNA=%
+1 IF $DATA(%Y)
IF %Y["?"
WRITE !!,"Enter Y to print responses of 'Not Applicable'",!,"or No to not print them."
HANG 3
GOTO BYPASSNA
+2 ;
WPPRT KILL %Y
XECUTE CLEOP
WRITE "Do you want to print word processing responses"
SET %=2
DO YN^DICN
if %<0
GOTO EXIT^QAPUTIL
SET WPPRT=%
+1 IF $DATA(%Y)
IF %Y["?"
WRITE !!,"Enter Y to print word processing questions or No to not print them."
HANG 3
GOTO WPPRT
+2 SET %ZIS="AEQ"
SET %ZIS("A")="Output device: "
WRITE !!
DO ^%ZIS
if POP
GOTO EXIT^QAPUTIL
+3 IF $DATA(IO("Q"))
SET ZTREQ="@"
SET ZTIO=ION
SET ZTRTN="PRINT^QAPSTAT1"
SET ZTDESC="Print "_TITLE_" Survey Statistics"
FOR X="SURVEY","TITLE","BYPASS*","WPPRT"
SET ZTSAVE(X)=""
+4 IF $TEST
DO ^%ZTLOAD
if $DATA(ZTSK)
WRITE !!,"Queued as task #",ZTSK,!!
HANG 2
KILL ZTSK
GOTO EXIT^QAPUTIL
+5 GOTO PRINT^QAPSTAT1