BGP8PESI ; IHS/CMI/LAB - DISPLAY IND LISTS ;
;;18.1;IHS CLINICAL REPORTING;;MAY 25, 2018;Build 66
;; ;
EP ;EP - CALLED FROM OPTION
D EN
Q
EOJ ;EP
K BGPTIND,BGPHIGH,BGPANS,BGPC,BGPGANS,BGPGC,BGPGI,BGPI,BGPX
Q
;; ;
EN ;EP -- main entry point for APCH HMR DISPLAY
D EN^VALM("BGP 18 PATED MEASURE SEL")
D CLEAR^VALM1
D FULL^VALM1
W:$D(IOF) @IOF
D EOJ
Q
;
HDR ; -- header code
S VALMHDR(1)="IHS Patient Education Measures"
S VALMHDR(2)="* indicates the performance measure has been selected"
Q
;
INIT ; -- init variables and list array
K BGPTIND S BGPHIGH=""
S (X,Y,Z,C)=0 F S X=$O(^BGPPEIR("AO",X)) Q:X'=+X S Y=$O(^BGPPEIR("AO",X,Y)) Q:Y'=+Y D
.S C=C+1,BGPTIND(C,0)=C_")",$E(BGPTIND(C,0),5)=$P(^BGPPEIR(Y,0),U,2),BGPTIND(C,C)=Y I $D(BGPIND(Y)) S BGPTIND(C,0)="*"_BGPTIND(C,0)
.Q
S (VALMCNT,BGPHIGH)=C
Q
;
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ; -- exit code
Q
;
EXPND ; -- expand code
Q
;
BACK ;go back to listman
D TERM^VALM0
S VALMBCK="R"
D INIT
D HDR
K DIR
K X,Y,Z,I
Q
;
ADD ;EP - add an item to the selected list - called from a protocol
W !
I $G(BGPRTYPE)'=1 S DIR(0)="LO^1:"_BGPHIGH,DIR("A")="Which item(s)"
I $G(BGPRTYPE)=1 S DIR(0)="LO^1:"_BGPHIGH,DIR("A")="Which Measure Topic"
D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I Y="" W !,"No items selected." G ADDX
I $D(DIRUT) W !,"No items selected." G ADDX
D FULL^VALM1 W:$D(IOF) @IOF
S BGPANS=Y,BGPC="" F BGPI=1:1 S BGPC=$P(BGPANS,",",BGPI) Q:BGPC="" S BGPIND(BGPTIND(BGPC,BGPC))=""
ADDX ;
D BACK
Q
ADDALL ;
F X=1:1:BGPHIGH S BGPIND(X)=""
D BACK
Q
;
REM ;
W ! S DIR(0)="LO^1:"_BGPHIGH,DIR("A")="Which item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I Y="" W !,"No items selected." G ADDX
I $D(DIRUT) W !,"No items selected." G ADDX
D FULL^VALM1 W:$D(IOF) @IOF
S BGPANS=Y,BGPC="" F BGPI=1:1 S BGPC=$P(BGPANS,",",BGPI) Q:BGPC="" K BGPIND(BGPTIND(BGPC,BGPC))
REMX ;
D BACK
Q
BGP8PESI ; IHS/CMI/LAB - DISPLAY IND LISTS ;
+1 ;;18.1;IHS CLINICAL REPORTING;;MAY 25, 2018;Build 66
+2 ;; ;
EP ;EP - CALLED FROM OPTION
+1 DO EN
+2 QUIT
EOJ ;EP
+1 KILL BGPTIND,BGPHIGH,BGPANS,BGPC,BGPGANS,BGPGC,BGPGI,BGPI,BGPX
+2 QUIT
+3 ;; ;
EN ;EP -- main entry point for APCH HMR DISPLAY
+1 DO EN^VALM("BGP 18 PATED MEASURE SEL")
+2 DO CLEAR^VALM1
+3 DO FULL^VALM1
+4 IF $DATA(IOF)
WRITE @IOF
+5 DO EOJ
+6 QUIT
+7 ;
HDR ; -- header code
+1 SET VALMHDR(1)="IHS Patient Education Measures"
+2 SET VALMHDR(2)="* indicates the performance measure has been selected"
+3 QUIT
+4 ;
INIT ; -- init variables and list array
+1 KILL BGPTIND
SET BGPHIGH=""
+2 SET (X,Y,Z,C)=0
FOR
SET X=$ORDER(^BGPPEIR("AO",X))
IF X'=+X
QUIT
SET Y=$ORDER(^BGPPEIR("AO",X,Y))
IF Y'=+Y
QUIT
Begin DoDot:1
+3 SET C=C+1
SET BGPTIND(C,0)=C_")"
SET $EXTRACT(BGPTIND(C,0),5)=$PIECE(^BGPPEIR(Y,0),U,2)
SET BGPTIND(C,C)=Y
IF $DATA(BGPIND(Y))
SET BGPTIND(C,0)="*"_BGPTIND(C,0)
+4 QUIT
End DoDot:1
+5 SET (VALMCNT,BGPHIGH)=C
+6 QUIT
+7 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 QUIT
+2 ;
EXPND ; -- expand code
+1 QUIT
+2 ;
BACK ;go back to listman
+1 DO TERM^VALM0
+2 SET VALMBCK="R"
+3 DO INIT
+4 DO HDR
+5 KILL DIR
+6 KILL X,Y,Z,I
+7 QUIT
+8 ;
ADD ;EP - add an item to the selected list - called from a protocol
+1 WRITE !
+2 IF $GET(BGPRTYPE)'=1
SET DIR(0)="LO^1:"_BGPHIGH
SET DIR("A")="Which item(s)"
+3 IF $GET(BGPRTYPE)=1
SET DIR(0)="LO^1:"_BGPHIGH
SET DIR("A")="Which Measure Topic"
+4 DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+5 IF Y=""
WRITE !,"No items selected."
GOTO ADDX
+6 IF $DATA(DIRUT)
WRITE !,"No items selected."
GOTO ADDX
+7 DO FULL^VALM1
IF $DATA(IOF)
WRITE @IOF
+8 SET BGPANS=Y
SET BGPC=""
FOR BGPI=1:1
SET BGPC=$PIECE(BGPANS,",",BGPI)
IF BGPC=""
QUIT
SET BGPIND(BGPTIND(BGPC,BGPC))=""
ADDX ;
+1 DO BACK
+2 QUIT
ADDALL ;
+1 FOR X=1:1:BGPHIGH
SET BGPIND(X)=""
+2 DO BACK
+3 QUIT
+4 ;
REM ;
+1 WRITE !
SET DIR(0)="LO^1:"_BGPHIGH
SET DIR("A")="Which item(s)"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF Y=""
WRITE !,"No items selected."
GOTO ADDX
+3 IF $DATA(DIRUT)
WRITE !,"No items selected."
GOTO ADDX
+4 DO FULL^VALM1
IF $DATA(IOF)
WRITE @IOF
+5 SET BGPANS=Y
SET BGPC=""
FOR BGPI=1:1
SET BGPC=$PIECE(BGPANS,",",BGPI)
IF BGPC=""
QUIT
KILL BGPIND(BGPTIND(BGPC,BGPC))
REMX ;
+1 DO BACK
+2 QUIT