AQAOQT13 ; IHS/ORDC/LJF - BRAINSTORMING REPORTS SUBRTNS ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn contains entry points for the reports function.
;
RESULTS ;ENTRY POINT >> SUBRTN to print multivoting results <<
;called by AQAOQT1
D INIT^AQAOUTIL
S AQAORNG=$P(^AQAO1(8,AQAOMTG,0),U,2),AQAORNG=$P(^AQAO1(1,AQAORNG,0),U)
S Y=$P(^AQAO1(8,AQAOMTG,0),U) X ^DD("DD") S AQAORNG=AQAORNG_" - "_Y
S AQAOTY="MULTIVOTING RESULTS FOR "_$P(^AQAO1(8,AQAOMTG,0),U,3)
D HEADING^AQAOUTIL W ?AQAOIOMX-$L(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
;
; >> gather results
LOOP S AQAOY=0 K AQAOCNT
F S AQAOY=$O(^AQAO1(7,"AC",AQAOMTG,AQAOY)) Q:AQAOY="" D
.Q:'$O(^AQAO1(7,AQAOY,"MV",0)) S X=^AQAO1(7,AQAOY,0)
.S AQAOCAT=$S($P(X,U,3)]"":$P(X,U,3),1:$P(X,U))
.S AQAOX=0
.F S AQAOX=$O(^AQAO1(7,AQAOY,"MV",AQAOX)) Q:AQAOX'=+AQAOX D
..Q:'$D(^AQAO1(7,AQAOY,"MV",AQAOX,0)) S AQAOS=^(0)
..S AQAOUSN=$P(AQAOS,U) ;voter name
..S AQAOCNT(AQAOCAT)=$G(AQAOCNT(AQAOCAT))+$P(AQAOS,U,2) ;total count
..S AQAOCNT(AQAOCAT,AQAOUSN)=$P(AQAOS,U,2) ;count by voter
;
; >> print results
S AQAOCAT=0
F S AQAOCAT=$O(AQAOCNT(AQAOCAT)) Q:AQAOCAT="" Q:AQAOSTOP=U D
.W !!,AQAOCAT
.S AQAOUSN=0 F S AQAOUSN=$O(AQAOCNT(AQAOCAT,AQAOUSN)) Q:AQAOUSN="" D
..W !?15,AQAOUSN,?55,$J(AQAOCNT(AQAOCAT,AQAOUSN),3)
..I $Y>(IOSL-4) D
...D NEWPG^AQAOUTIL Q:AQAOSTOP=U
...W ?AQAOIOMX-$L(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
.W !?55,"______",!?55,$J(AQAOCNT(AQAOCAT),3)
I IOST["C-" D
.W ! K DIR S DIR(0)="E"
.S DIR("A")="Press RETURN when ready to continue" D ^DIR
D ^%ZISC I $D(ZTQUEUED) D KILL^AQAOUTIL
Q
; >> END OF RESULTS SUBRTN <<
;
;
FULL ;ENTRY POINT >> SUBRTN to print full report <<
;called by AQAOQT1
D INIT^AQAOUTIL
S AQAORNG=$P(^AQAO1(8,AQAOMTG,0),U,2),AQAORNG=$P(^AQAO1(1,AQAORNG,0),U)
S Y=$P(^AQAO1(8,AQAOMTG,0),U) X ^DD("DD") S AQAORNG=AQAORNG_" - "_Y
S AQAOTY="BRAINSTORMING REPORT FOR "_$P(^AQAO1(8,AQAOMTG,0),U,3)
D HEADING^AQAOUTIL W ?AQAOIOMX-$L(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
;
W !,"MINUTES: " K ^UTILITY("DIQ1",$J)
S DIC=9002169.8,DR="1",DA=AQAOMTG D EN^DIQ1
K ^UTILITY($J,"W") S AQAOX=0
F S AQAOX=$O(^UTILITY("DIQ1",$J,9002169.8,AQAOMTG,1,AQAOX)) Q:AQAOX="" D
.S X=^UTILITY("DIQ1",$J,9002169.8,AQAOMTG,1,AQAOX)
.S DIWL=10,DIWR=75,DIWF="WB4" D ^DIWP
D ^DIWW
;
I $Y>(IOSL-4) D Q:AQAOSTOP=U
.D NEWPG^AQAOUTIL Q:AQAOSTOP=U
.W ?AQAOIOMX-$L(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
W !!,"MEMBERS IN ATTENDANCE: " S AQAOX=0
F S AQAOX=$O(^AQAO1(8,AQAOMTG,"MEM",AQAOX)) Q:AQAOX'=+AQAOX Q:AQAOSTOP=U D
.Q:'$D(^AQAO1(8,AQAOMTG,"MEM",AQAOX,0)) S AQAOS=^(0)
.W ?25,$P(^VA(200,+AQAOS,0),U) S X=$P(AQAOS,U,2)
.W ?55,$S(X="L":"LEADER",X="F":"FACILITATOR",1:"MEMBER"),!
.I $Y>(IOSL-4) D
..D NEWPG^AQAOUTIL Q:AQAOSTOP=U
..W ?AQAOIOMX-$L(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
;
W !!,"BRAINSTORMING IDEAS AND CATEGORIES:"
S AQAOX=0
MORE F S AQAOX=$O(^AQAO1(7,"AC",AQAOMTG,AQAOX)) Q:AQAOX="" Q:AQAOSTOP=U D
.W !?5,$P(^AQAO1(7,AQAOX,0),U),?40,$P(^(0),U,3)
.I $Y>(IOSL-4) D
..D NEWPG^AQAOUTIL Q:AQAOSTOP=U
..W ?AQAOIOMX-$L(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
;
W !!,"MULTIVOTING RESULTS:"
D LOOP ;print multivoting results
D ^%ZISC I $D(ZTQUEUED) D KILL^AQAOUTIL
Q
; >> END OF FULL SUBRTN <<
AQAOQT13 ; IHS/ORDC/LJF - BRAINSTORMING REPORTS SUBRTNS ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn contains entry points for the reports function.
+4 ;
RESULTS ;ENTRY POINT >> SUBRTN to print multivoting results <<
+1 ;called by AQAOQT1
+2 DO INIT^AQAOUTIL
+3 SET AQAORNG=$PIECE(^AQAO1(8,AQAOMTG,0),U,2)
SET AQAORNG=$PIECE(^AQAO1(1,AQAORNG,0),U)
+4 SET Y=$PIECE(^AQAO1(8,AQAOMTG,0),U)
XECUTE ^DD("DD")
SET AQAORNG=AQAORNG_" - "_Y
+5 SET AQAOTY="MULTIVOTING RESULTS FOR "_$PIECE(^AQAO1(8,AQAOMTG,0),U,3)
+6 DO HEADING^AQAOUTIL
WRITE ?AQAOIOMX-$LENGTH(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
+7 ;
+8 ; >> gather results
LOOP SET AQAOY=0
KILL AQAOCNT
+1 FOR
SET AQAOY=$ORDER(^AQAO1(7,"AC",AQAOMTG,AQAOY))
IF AQAOY=""
QUIT
Begin DoDot:1
+2 IF '$ORDER(^AQAO1(7,AQAOY,"MV",0))
QUIT
SET X=^AQAO1(7,AQAOY,0)
+3 SET AQAOCAT=$SELECT($PIECE(X,U,3)]"":$PIECE(X,U,3),1:$PIECE(X,U))
+4 SET AQAOX=0
+5 FOR
SET AQAOX=$ORDER(^AQAO1(7,AQAOY,"MV",AQAOX))
IF AQAOX'=+AQAOX
QUIT
Begin DoDot:2
+6 IF '$DATA(^AQAO1(7,AQAOY,"MV",AQAOX,0))
QUIT
SET AQAOS=^(0)
+7 ;voter name
SET AQAOUSN=$PIECE(AQAOS,U)
+8 ;total count
SET AQAOCNT(AQAOCAT)=$GET(AQAOCNT(AQAOCAT))+$PIECE(AQAOS,U,2)
+9 ;count by voter
SET AQAOCNT(AQAOCAT,AQAOUSN)=$PIECE(AQAOS,U,2)
End DoDot:2
End DoDot:1
+10 ;
+11 ; >> print results
+12 SET AQAOCAT=0
+13 FOR
SET AQAOCAT=$ORDER(AQAOCNT(AQAOCAT))
IF AQAOCAT=""
QUIT
IF AQAOSTOP=U
QUIT
Begin DoDot:1
+14 WRITE !!,AQAOCAT
+15 SET AQAOUSN=0
FOR
SET AQAOUSN=$ORDER(AQAOCNT(AQAOCAT,AQAOUSN))
IF AQAOUSN=""
QUIT
Begin DoDot:2
+16 WRITE !?15,AQAOUSN,?55,$JUSTIFY(AQAOCNT(AQAOCAT,AQAOUSN),3)
+17 IF $Y>(IOSL-4)
Begin DoDot:3
+18 DO NEWPG^AQAOUTIL
IF AQAOSTOP=U
QUIT
+19 WRITE ?AQAOIOMX-$LENGTH(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
End DoDot:3
End DoDot:2
+20 WRITE !?55,"______",!?55,$JUSTIFY(AQAOCNT(AQAOCAT),3)
End DoDot:1
+21 IF IOST["C-"
Begin DoDot:1
+22 WRITE !
KILL DIR
SET DIR(0)="E"
+23 SET DIR("A")="Press RETURN when ready to continue"
DO ^DIR
End DoDot:1
+24 DO ^%ZISC
IF $DATA(ZTQUEUED)
DO KILL^AQAOUTIL
+25 QUIT
+26 ; >> END OF RESULTS SUBRTN <<
+27 ;
+28 ;
FULL ;ENTRY POINT >> SUBRTN to print full report <<
+1 ;called by AQAOQT1
+2 DO INIT^AQAOUTIL
+3 SET AQAORNG=$PIECE(^AQAO1(8,AQAOMTG,0),U,2)
SET AQAORNG=$PIECE(^AQAO1(1,AQAORNG,0),U)
+4 SET Y=$PIECE(^AQAO1(8,AQAOMTG,0),U)
XECUTE ^DD("DD")
SET AQAORNG=AQAORNG_" - "_Y
+5 SET AQAOTY="BRAINSTORMING REPORT FOR "_$PIECE(^AQAO1(8,AQAOMTG,0),U,3)
+6 DO HEADING^AQAOUTIL
WRITE ?AQAOIOMX-$LENGTH(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
+7 ;
+8 WRITE !,"MINUTES: "
KILL ^UTILITY("DIQ1",$JOB)
+9 SET DIC=9002169.8
SET DR="1"
SET DA=AQAOMTG
DO EN^DIQ1
+10 KILL ^UTILITY($JOB,"W")
SET AQAOX=0
+11 FOR
SET AQAOX=$ORDER(^UTILITY("DIQ1",$JOB,9002169.8,AQAOMTG,1,AQAOX))
IF AQAOX=""
QUIT
Begin DoDot:1
+12 SET X=^UTILITY("DIQ1",$JOB,9002169.8,AQAOMTG,1,AQAOX)
+13 SET DIWL=10
SET DIWR=75
SET DIWF="WB4"
DO ^DIWP
End DoDot:1
+14 DO ^DIWW
+15 ;
+16 IF $Y>(IOSL-4)
Begin DoDot:1
+17 DO NEWPG^AQAOUTIL
IF AQAOSTOP=U
QUIT
+18 WRITE ?AQAOIOMX-$LENGTH(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
End DoDot:1
IF AQAOSTOP=U
QUIT
+19 WRITE !!,"MEMBERS IN ATTENDANCE: "
SET AQAOX=0
+20 FOR
SET AQAOX=$ORDER(^AQAO1(8,AQAOMTG,"MEM",AQAOX))
IF AQAOX'=+AQAOX
QUIT
IF AQAOSTOP=U
QUIT
Begin DoDot:1
+21 IF '$DATA(^AQAO1(8,AQAOMTG,"MEM",AQAOX,0))
QUIT
SET AQAOS=^(0)
+22 WRITE ?25,$PIECE(^VA(200,+AQAOS,0),U)
SET X=$PIECE(AQAOS,U,2)
+23 WRITE ?55,$SELECT(X="L":"LEADER",X="F":"FACILITATOR",1:"MEMBER"),!
+24 IF $Y>(IOSL-4)
Begin DoDot:2
+25 DO NEWPG^AQAOUTIL
IF AQAOSTOP=U
QUIT
+26 WRITE ?AQAOIOMX-$LENGTH(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
End DoDot:2
End DoDot:1
+27 ;
+28 WRITE !!,"BRAINSTORMING IDEAS AND CATEGORIES:"
+29 SET AQAOX=0
MORE FOR
SET AQAOX=$ORDER(^AQAO1(7,"AC",AQAOMTG,AQAOX))
IF AQAOX=""
QUIT
IF AQAOSTOP=U
QUIT
Begin DoDot:1
+1 WRITE !?5,$PIECE(^AQAO1(7,AQAOX,0),U),?40,$PIECE(^(0),U,3)
+2 IF $Y>(IOSL-4)
Begin DoDot:2
+3 DO NEWPG^AQAOUTIL
IF AQAOSTOP=U
QUIT
+4 WRITE ?AQAOIOMX-$LENGTH(AQAORNG)/2,AQAORNG,!,AQAOLINE,!
End DoDot:2
End DoDot:1
+5 ;
+6 WRITE !!,"MULTIVOTING RESULTS:"
+7 ;print multivoting results
DO LOOP
+8 DO ^%ZISC
IF $DATA(ZTQUEUED)
DO KILL^AQAOUTIL
+9 QUIT
+10 ; >> END OF FULL SUBRTN <<