AQAOQT11 ; IHS/ORDC/LJF - BRAINSTORMING SUBRTNS ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn contians entry points to handle the code for the actual
;brainstorming function.
;
IDEAS ;ENTRY POINT >> SUBRTN to loop through entering ideas <<
;called by ^AQAOQT1
W !! K DIR S DIR(0)="FO^3:50",DIR("A")="Enter IDEA" D ^DIR Q:$D(DIRUT)
K DD,DO,DIC,DIE S DIC="^AQAO1(7,",DIC(0)="AEMZLQ",X=Y
S DIC("DR")=".02////"_AQAOMTG D FILE^DICN W " Entered.." G IDEAS
; >> END OF IDEAS SUBRTN <<
;
;
LIST ;ENTRY POINT >> SUBRTN to list ideas entered for this meeting <<
;called by ^AQAOQT1
W !!,"IDEAS ENTERED FOR ",$P(^AQAO1(8,AQAOMTG,0),U,3),":",!
S AQAOX=0,AQAOJ=1
MORE F AQAOI=AQAOJ:1:AQAOJ+12 S AQAOX=$O(^AQAO1(7,"AC",AQAOMTG,AQAOX)) Q:AQAOX="" D
.W !?5,AQAOI_". "_$P(^AQAO1(7,AQAOX,0),U),?40,$P(^(0),U,3)
S AQAOJ=AQAOI+1 Q:AQAOX="" ;end of list
K DIR S DIR("A")="Press RETURN to continue or ""^"" to exit"
S DIR(0)="E" D ^DIR G MORE:Y=1
Q
; >> END OF LIST SUBRTN <<
;
;
CATEGORY ;ENTRY POINT >> SUBRTN to categorize ideas entered <<
;called by ^AQAOQT1
I '$O(^AQAO1(7,"AC",AQAOMTG,0)) D G BRAIN^AQAOQT1
.W !!,"NO IDEAS ENTERED!",!!
W !!?20,"*** CATEGORIZE IDEAS ***",!!
; >> loop and display 20 ideas at a time and select range to group
S AQAOX=0 K DIR S AQAOJ=1,AQAOK=AQAOJ+12
LOOP F AQAOI=AQAOJ:1:AQAOK S AQAOX=$O(^AQAO1(7,"AC",AQAOMTG,AQAOX)) Q:AQAOX="" D
.S AQAOARR(AQAOI)=AQAOX,X=" "
.S DIR("A",AQAOI)=AQAOI_". "_$P(^AQAO1(7,AQAOX,0),U)_X_$P(^(0),U,3)
S AQAOJ=AQAOI+1,AQAOK=AQAOJ+12
I AQAOX=""!'$O(^AQAO1(7,"AC",AQAOMTG,AQAOX)) D
.S DIR("A")="Select IDEAS to group together"
.S DIR(0)="LO^1:"_(AQAOI-1)_"^K:X#1 X"
E D
.S DIR(0)="LO^1:"_AQAOI_"^K:X#1 X"
.S DIR("A")="Select IDEAS to group together OR hit RETURN to list more ideas"
S DIR("?",1)="You may select a RANGE such as 1,3,7 or 2-5."
S DIR("?",2)="OR hit RETURN to see list again,"
S DIR("?",3)="OR enter ""^"" to exit.",DIR("?")=" "
D ^DIR I X="",AQAOX'="" W !! K DIR G LOOP
Q:$D(DIRUT) Q:Y=-1 S AQAORNG=Y
;
; >> ask for category and flag each idea with that category
W !! K DIR S DIR(0)="F^3:50",DIR("A")="CATEGORY" D ^DIR
G CATEGORY:X=U,CATEGORY:Y=-1 Q:$D(DIRUT) S AQAOCAT=Y
K DIE S DIE="^AQAO1(7,",DR=".03////"_AQAOCAT
F AQAOK=1:1 S DA=$P(AQAORNG,",",AQAOK) Q:DA="" D
.S DA=AQAOARR(DA) D ^DIE W ".."
G CATEGORY
; >> END OF CATEGORY SUBRTN <<
;
;
EDIT ;ENTRY POINT >> SUBRTN to edit or delete ideas <<
;called by AQAOQT1
K DIE,DIC S (DIE,DIC)=9002169.7,DIC(0)="AEMZQ"
S DIC("S")="I $P(^(0),U,2)=AQAOMTG" D ^DIC
Q:Y=-1 S DA=+Y,DR=".01",DIDEL=9002169.7 D ^DIE G EDIT
; >> END OF EDIT SUBRTN <<
AQAOQT11 ; IHS/ORDC/LJF - BRAINSTORMING SUBRTNS ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn contians entry points to handle the code for the actual
+4 ;brainstorming function.
+5 ;
IDEAS ;ENTRY POINT >> SUBRTN to loop through entering ideas <<
+1 ;called by ^AQAOQT1
+2 WRITE !!
KILL DIR
SET DIR(0)="FO^3:50"
SET DIR("A")="Enter IDEA"
DO ^DIR
IF $DATA(DIRUT)
QUIT
+3 KILL DD,DO,DIC,DIE
SET DIC="^AQAO1(7,"
SET DIC(0)="AEMZLQ"
SET X=Y
+4 SET DIC("DR")=".02////"_AQAOMTG
DO FILE^DICN
WRITE " Entered.."
GOTO IDEAS
+5 ; >> END OF IDEAS SUBRTN <<
+6 ;
+7 ;
LIST ;ENTRY POINT >> SUBRTN to list ideas entered for this meeting <<
+1 ;called by ^AQAOQT1
+2 WRITE !!,"IDEAS ENTERED FOR ",$PIECE(^AQAO1(8,AQAOMTG,0),U,3),":",!
+3 SET AQAOX=0
SET AQAOJ=1
MORE FOR AQAOI=AQAOJ:1:AQAOJ+12
SET AQAOX=$ORDER(^AQAO1(7,"AC",AQAOMTG,AQAOX))
IF AQAOX=""
QUIT
Begin DoDot:1
+1 WRITE !?5,AQAOI_". "_$PIECE(^AQAO1(7,AQAOX,0),U),?40,$PIECE(^(0),U,3)
End DoDot:1
+2 ;end of list
SET AQAOJ=AQAOI+1
IF AQAOX=""
QUIT
+3 KILL DIR
SET DIR("A")="Press RETURN to continue or ""^"" to exit"
+4 SET DIR(0)="E"
DO ^DIR
IF Y=1
GOTO MORE
+5 QUIT
+6 ; >> END OF LIST SUBRTN <<
+7 ;
+8 ;
CATEGORY ;ENTRY POINT >> SUBRTN to categorize ideas entered <<
+1 ;called by ^AQAOQT1
+2 IF '$ORDER(^AQAO1(7,"AC",AQAOMTG,0))
Begin DoDot:1
+3 WRITE !!,"NO IDEAS ENTERED!",!!
End DoDot:1
GOTO BRAIN^AQAOQT1
+4 WRITE !!?20,"*** CATEGORIZE IDEAS ***",!!
+5 ; >> loop and display 20 ideas at a time and select range to group
+6 SET AQAOX=0
KILL DIR
SET AQAOJ=1
SET AQAOK=AQAOJ+12
LOOP FOR AQAOI=AQAOJ:1:AQAOK
SET AQAOX=$ORDER(^AQAO1(7,"AC",AQAOMTG,AQAOX))
IF AQAOX=""
QUIT
Begin DoDot:1
+1 SET AQAOARR(AQAOI)=AQAOX
SET X=" "
+2 SET DIR("A",AQAOI)=AQAOI_". "_$PIECE(^AQAO1(7,AQAOX,0),U)_X_$PIECE(^(0),U,3)
End DoDot:1
+3 SET AQAOJ=AQAOI+1
SET AQAOK=AQAOJ+12
+4 IF AQAOX=""!'$ORDER(^AQAO1(7,"AC",AQAOMTG,AQAOX))
Begin DoDot:1
+5 SET DIR("A")="Select IDEAS to group together"
+6 SET DIR(0)="LO^1:"_(AQAOI-1)_"^K:X#1 X"
End DoDot:1
+7 IF '$TEST
Begin DoDot:1
+8 SET DIR(0)="LO^1:"_AQAOI_"^K:X#1 X"
+9 SET DIR("A")="Select IDEAS to group together OR hit RETURN to list more ideas"
End DoDot:1
+10 SET DIR("?",1)="You may select a RANGE such as 1,3,7 or 2-5."
+11 SET DIR("?",2)="OR hit RETURN to see list again,"
+12 SET DIR("?",3)="OR enter ""^"" to exit."
SET DIR("?")=" "
+13 DO ^DIR
IF X=""
IF AQAOX'=""
WRITE !!
KILL DIR
GOTO LOOP
+14 IF $DATA(DIRUT)
QUIT
IF Y=-1
QUIT
SET AQAORNG=Y
+15 ;
+16 ; >> ask for category and flag each idea with that category
+17 WRITE !!
KILL DIR
SET DIR(0)="F^3:50"
SET DIR("A")="CATEGORY"
DO ^DIR
+18 IF X=U
GOTO CATEGORY
IF Y=-1
GOTO CATEGORY
IF $DATA(DIRUT)
QUIT
SET AQAOCAT=Y
+19 KILL DIE
SET DIE="^AQAO1(7,"
SET DR=".03////"_AQAOCAT
+20 FOR AQAOK=1:1
SET DA=$PIECE(AQAORNG,",",AQAOK)
IF DA=""
QUIT
Begin DoDot:1
+21 SET DA=AQAOARR(DA)
DO ^DIE
WRITE ".."
End DoDot:1
+22 GOTO CATEGORY
+23 ; >> END OF CATEGORY SUBRTN <<
+24 ;
+25 ;
EDIT ;ENTRY POINT >> SUBRTN to edit or delete ideas <<
+1 ;called by AQAOQT1
+2 KILL DIE,DIC
SET (DIE,DIC)=9002169.7
SET DIC(0)="AEMZQ"
+3 SET DIC("S")="I $P(^(0),U,2)=AQAOMTG"
DO ^DIC
+4 IF Y=-1
QUIT
SET DA=+Y
SET DR=".01"
SET DIDEL=9002169.7
DO ^DIE
GOTO EDIT
+5 ; >> END OF EDIT SUBRTN <<