BGPMUDSL ; IHS/MSC/MMT - DISPLAY Measure LISTS ;02-Mar-2011 14:00;DU
;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
;;
RT ;EP
;
;for each measure list, choose report type
W !!,"Select List Type.",!
W:'$G(BGP0NPLT) "NOTE: If you select All Patients, your list may be",!,"hundreds of pages and take hours to print.",!
S DIR(0)="S^D:Pts. Not in numerator;N:Pts in numerator;A:All Patients",DIR("A")="Choose report type for the Lists: " KILL DA D ^DIR KILL DIR
I $D(DIRUT) S BGPQUIT="" K BGPLIST Q
S BGPLIST=Y
Q
EP ;EP - CALLED FROM OPTION
D EN
Q
EOJ1 ;EP
K BGPMUGL,BGPTIND,BGPHIGH,BGPANS,BGPC,BGPGANS,BGPGC,BGPGI,BGPI,BGPX
Q
;; ;
EN ;EP -- main entry point for LIST DISPLAY
D EN^VALM("BGPMU 11 LIST SELECTION")
D CLEAR^VALM1
D FULL^VALM1
W:$D(IOF) @IOF
D EOJ1
Q
;
HDR ; -- header code
S VALMHDR(1)="IHS Meaningful Use Clinical Quality Measure Lists of Patients"
S VALMHDR(2)="* indicates the list has been selected"
Q
;
INIT ;EP -- init variables and list array
K BGPMUGL,BGPNOLI S BGPHIGH=""
N X,C,I,O
S (X,C,I,O)=0 F S O=$O(^BGPMUIND(BGPMUYF,"ADO",O)) Q:O'=+O S X=$O(^BGPMUIND(BGPMUYF,"ADO",O,0)) I $D(BGPIND(X)) D
.S C=C+1 S BGPMUGL(C,0)=C_")",$E(BGPMUGL(C,0),5)=$P(^BGPMUIND(BGPMUYF,X,0),U,5),BGPMUGL("IDX",C,C)=X I $D(BGPLIST(X)) S BGPMUGL(C,0)="*"_BGPMUGL(C,0)
;.I $P(^BGPMUIND(BGPMUYF,X,0),U,5)="" S C=C+1 D
;..S BGPMUGL(C,0)=$P(^BGPMUIND(BGPMUYF,X,0),U,4)_" NO patient list available for measure: ",BGPMUGL("IDX",C,C)=X,BGPNOLI(X)="" I $D(BGPLIST(X)) S BGPMUGL(C,0)="*"_BGPMUGL(C,0)
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 ! 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 BGPGANS=Y,BGPGC="" F BGPGI=1:1 S BGPGC=$P(BGPGANS,",",BGPGI) Q:BGPGC="" S BGPI=$O(BGPMUGL("IDX",BGPGC,0)) S BGPIND=BGPMUGL("IDX",BGPGC,BGPI) I $D(BGPIND(BGPIND)),'$D(BGPNOLI(BGPIND)) S BGPLIST(BGPIND)=""
ADDX ;
D BACK
Q
ADDALL ;
F X=1:1:BGPHIGH S I=$G(BGPMUGL("IDX",X,X)) I $D(BGPIND(I)),'$D(BGPNOLI(I)) S BGPLIST(I)=""
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 BGPGANS=Y,BGPGC="" F BGPGI=1:1 S BGPGC=$P(BGPGANS,",",BGPGI) Q:BGPGC="" S I=$G(BGPMUGL("IDX",BGPGC,BGPGC)) K BGPLIST(I)
REMX ;
D BACK
Q
;
PT ;EP
S (BGPROT,BGPDELT,BGPDELF)=""
W !!,"Please choose an output type. For an explanation of the delimited",!,"file please see the user manual.",!
;S DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);B:Both a Printed Report and Delimited File;X:Create an XML output file",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
S DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);X:Create an XML output file",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
I $D(DIRUT) Q
S BGPROT=Y
Q:BGPROT="P"
S BGPDELF="",BGPDELT=""
W !!,"You have selected to create a "_$S(BGPROT="X":"XML",1:"delimited")_" output file. You can have this"
W !,"output file created as a text file in the pub directory, "
W !,"OR you can have the "_$S(BGPROT="X":"XML",1:"delimited")_" output display on your screen so that"
W !,"you can do a file capture. Keep in mind that if you choose to do a"
W !,"screen capture you CANNOT Queue your report to run in the background!!",!!
S DIR(0)="S^S:SCREEN - "_$S(BGPROT="X":"XML",1:"delimited")_" output will display on screen for capture;F:FILE - "_$S(BGPROT="X":"XML",1:"delimited")_" output will be written to a file in pub"
S DIR("A")="Select output type",DIR("B")="S" KILL DA D ^DIR KILL DIR
I $D(DIRUT) G PT
S BGPDELT=Y
Q:BGPDELT="S"
I BGPROT'="X" D
.S DIR(0)="F^1:40",DIR("A")="Enter a filename for the delimited output (no more than 40 characters)" KILL DA D ^DIR KILL DIR
.I $D(DIRUT) G PT
.S BGPDELF=Y
I BGPROT="X" S BGPNOW=$$NOW^XLFDT,BGPDELF="XML."_$$INITIALS^BGPMUUT2(BGPPROV)_"."_$E(BGPNOW,2,12)_".xml"
W !!,"When the report is finished your "_$S(BGPROT="X":"XML",1:"delimited")_" output will be found in the",!,$P($G(^AUTTSITE(1,1)),U,2)," directory. The filename will be ",BGPDELF,$S(BGPROT="X":"",1:".txt"),!
Q
;
PH ;EP prompt for output creation type (hospital measures)
S (BGPROT,BGPDELT,BGPDELF)=""
W !!,"Please choose an output type. For an explanation of the delimited",!,"file please see the user manual.",!
;S DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);B:Both a Printed Report and Delimited File;X:Create an XML output file",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
S DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);X:Create an XML output file",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
I $D(DIRUT) Q
S BGPROT=Y
Q:BGPROT="P"
S BGPDELF="",BGPDELT=""
W !!,"You have selected to create a "_$S(BGPROT="X":"XML",1:"delimited")_" output file. You can have this"
W !,"output file created as a text file in the pub directory, "
W !,"OR you can have the "_$S(BGPROT="X":"XML",1:"delimited")_" output display on your screen so that"
W !,"you can do a file capture. Keep in mind that if you choose to do a"
W !,"screen capture you CANNOT Queue your report to run in the background!!",!!
S DIR(0)="S^S:SCREEN - "_$S(BGPROT="X":"XML",1:"delimited")_" output will display on screen for capture;F:FILE - "_$S(BGPROT="X":"XML",1:"delimited")_" output will be written to a file in pub"
S DIR("A")="Select output type",DIR("B")="S" KILL DA D ^DIR KILL DIR
I $D(DIRUT) G PT
S BGPDELT=Y
Q:BGPDELT="S"
I BGPROT'="X" D
.S DIR(0)="F^1:40",DIR("A")="Enter a filename for the delimited output (no more than 40 characters)" KILL DA D ^DIR KILL DIR
.I $D(DIRUT) G PT
.S BGPDELF=Y
I BGPROT="X" S BGPNOW=$$NOW^XLFDT,BGPDELF="XML.HOSPITAL."_$E(BGPNOW,2,12)_".xml"
W !!,"When the report is finished your "_$S(BGPROT="X":"XML",1:"delimited")_" output will be found in the",!,$P($G(^AUTTSITE(1,1)),U,2)," directory. The filename will be ",BGPDELF,$S(BGPROT="X":"",1:".txt"),!
Q
BGPMUDSL ; IHS/MSC/MMT - DISPLAY Measure LISTS ;02-Mar-2011 14:00;DU
+1 ;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
+2 ;;
RT ;EP
+1 ;
+2 ;for each measure list, choose report type
+3 WRITE !!,"Select List Type.",!
+4 IF '$GET(BGP0NPLT)
WRITE "NOTE: If you select All Patients, your list may be",!,"hundreds of pages and take hours to print.",!
+5 SET DIR(0)="S^D:Pts. Not in numerator;N:Pts in numerator;A:All Patients"
SET DIR("A")="Choose report type for the Lists: "
KILL DA
DO ^DIR
KILL DIR
+6 IF $DATA(DIRUT)
SET BGPQUIT=""
KILL BGPLIST
QUIT
+7 SET BGPLIST=Y
+8 QUIT
EP ;EP - CALLED FROM OPTION
+1 DO EN
+2 QUIT
EOJ1 ;EP
+1 KILL BGPMUGL,BGPTIND,BGPHIGH,BGPANS,BGPC,BGPGANS,BGPGC,BGPGI,BGPI,BGPX
+2 QUIT
+3 ;; ;
EN ;EP -- main entry point for LIST DISPLAY
+1 DO EN^VALM("BGPMU 11 LIST SELECTION")
+2 DO CLEAR^VALM1
+3 DO FULL^VALM1
+4 IF $DATA(IOF)
WRITE @IOF
+5 DO EOJ1
+6 QUIT
+7 ;
HDR ; -- header code
+1 SET VALMHDR(1)="IHS Meaningful Use Clinical Quality Measure Lists of Patients"
+2 SET VALMHDR(2)="* indicates the list has been selected"
+3 QUIT
+4 ;
INIT ;EP -- init variables and list array
+1 KILL BGPMUGL,BGPNOLI
SET BGPHIGH=""
+2 NEW X,C,I,O
+3 SET (X,C,I,O)=0
FOR
SET O=$ORDER(^BGPMUIND(BGPMUYF,"ADO",O))
IF O'=+O
QUIT
SET X=$ORDER(^BGPMUIND(BGPMUYF,"ADO",O,0))
IF $DATA(BGPIND(X))
Begin DoDot:1
+4 SET C=C+1
SET BGPMUGL(C,0)=C_")"
SET $EXTRACT(BGPMUGL(C,0),5)=$PIECE(^BGPMUIND(BGPMUYF,X,0),U,5)
SET BGPMUGL("IDX",C,C)=X
IF $DATA(BGPLIST(X))
SET BGPMUGL(C,0)="*"_BGPMUGL(C,0)
End DoDot:1
+5 ;.I $P(^BGPMUIND(BGPMUYF,X,0),U,5)="" S C=C+1 D
+6 ;..S BGPMUGL(C,0)=$P(^BGPMUIND(BGPMUYF,X,0),U,4)_" NO patient list available for measure: ",BGPMUGL("IDX",C,C)=X,BGPNOLI(X)="" I $D(BGPLIST(X)) S BGPMUGL(C,0)="*"_BGPMUGL(C,0)
+7 SET (VALMCNT,BGPHIGH)=C
+8 QUIT
+9 ;
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 !
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 BGPGANS=Y
SET BGPGC=""
FOR BGPGI=1:1
SET BGPGC=$PIECE(BGPGANS,",",BGPGI)
IF BGPGC=""
QUIT
SET BGPI=$ORDER(BGPMUGL("IDX",BGPGC,0))
SET BGPIND=BGPMUGL("IDX",BGPGC,BGPI)
IF $DATA(BGPIND(BGPIND))
IF '$DATA(BGPNOLI(BGPIND))
SET BGPLIST(BGPIND)=""
ADDX ;
+1 DO BACK
+2 QUIT
ADDALL ;
+1 FOR X=1:1:BGPHIGH
SET I=$GET(BGPMUGL("IDX",X,X))
IF $DATA(BGPIND(I))
IF '$DATA(BGPNOLI(I))
SET BGPLIST(I)=""
+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 BGPGANS=Y
SET BGPGC=""
FOR BGPGI=1:1
SET BGPGC=$PIECE(BGPGANS,",",BGPGI)
IF BGPGC=""
QUIT
SET I=$GET(BGPMUGL("IDX",BGPGC,BGPGC))
KILL BGPLIST(I)
REMX ;
+1 DO BACK
+2 QUIT
+3 ;
PT ;EP
+1 SET (BGPROT,BGPDELT,BGPDELF)=""
+2 WRITE !!,"Please choose an output type. For an explanation of the delimited",!,"file please see the user manual.",!
+3 ;S DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);B:Both a Printed Report and Delimited File;X:Create an XML output file",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
+4 SET DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);X:Create an XML output file"
SET DIR("A")="Select an Output Option"
SET DIR("B")="P"
KILL DA
DO ^DIR
KILL DIR
+5 IF $DATA(DIRUT)
QUIT
+6 SET BGPROT=Y
+7 IF BGPROT="P"
QUIT
+8 SET BGPDELF=""
SET BGPDELT=""
+9 WRITE !!,"You have selected to create a "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output file. You can have this"
+10 WRITE !,"output file created as a text file in the pub directory, "
+11 WRITE !,"OR you can have the "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output display on your screen so that"
+12 WRITE !,"you can do a file capture. Keep in mind that if you choose to do a"
+13 WRITE !,"screen capture you CANNOT Queue your report to run in the background!!",!!
+14 SET DIR(0)="S^S:SCREEN - "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output will display on screen for capture;F:FILE - "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output will be written to a file in pub"
+15 SET DIR("A")="Select output type"
SET DIR("B")="S"
KILL DA
DO ^DIR
KILL DIR
+16 IF $DATA(DIRUT)
GOTO PT
+17 SET BGPDELT=Y
+18 IF BGPDELT="S"
QUIT
+19 IF BGPROT'="X"
Begin DoDot:1
+20 SET DIR(0)="F^1:40"
SET DIR("A")="Enter a filename for the delimited output (no more than 40 characters)"
KILL DA
DO ^DIR
KILL DIR
+21 IF $DATA(DIRUT)
GOTO PT
+22 SET BGPDELF=Y
End DoDot:1
+23 IF BGPROT="X"
SET BGPNOW=$$NOW^XLFDT
SET BGPDELF="XML."_$$INITIALS^BGPMUUT2(BGPPROV)_"."_$EXTRACT(BGPNOW,2,12)_".xml"
+24 WRITE !!,"When the report is finished your "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output will be found in the",!,$PIECE($GET(^AUTTSITE(1,1)),U,2)," directory. The filename will be ",BGPDELF,$SELECT(BGPROT="X":"",1:".txt"),!
+25 QUIT
+26 ;
PH ;EP prompt for output creation type (hospital measures)
+1 SET (BGPROT,BGPDELT,BGPDELF)=""
+2 WRITE !!,"Please choose an output type. For an explanation of the delimited",!,"file please see the user manual.",!
+3 ;S DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);B:Both a Printed Report and Delimited File;X:Create an XML output file",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
+4 SET DIR(0)="S^P:Print Report on Printer or Screen;D:Create Delimited output file (for use in Excel);X:Create an XML output file"
SET DIR("A")="Select an Output Option"
SET DIR("B")="P"
KILL DA
DO ^DIR
KILL DIR
+5 IF $DATA(DIRUT)
QUIT
+6 SET BGPROT=Y
+7 IF BGPROT="P"
QUIT
+8 SET BGPDELF=""
SET BGPDELT=""
+9 WRITE !!,"You have selected to create a "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output file. You can have this"
+10 WRITE !,"output file created as a text file in the pub directory, "
+11 WRITE !,"OR you can have the "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output display on your screen so that"
+12 WRITE !,"you can do a file capture. Keep in mind that if you choose to do a"
+13 WRITE !,"screen capture you CANNOT Queue your report to run in the background!!",!!
+14 SET DIR(0)="S^S:SCREEN - "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output will display on screen for capture;F:FILE - "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output will be written to a file in pub"
+15 SET DIR("A")="Select output type"
SET DIR("B")="S"
KILL DA
DO ^DIR
KILL DIR
+16 IF $DATA(DIRUT)
GOTO PT
+17 SET BGPDELT=Y
+18 IF BGPDELT="S"
QUIT
+19 IF BGPROT'="X"
Begin DoDot:1
+20 SET DIR(0)="F^1:40"
SET DIR("A")="Enter a filename for the delimited output (no more than 40 characters)"
KILL DA
DO ^DIR
KILL DIR
+21 IF $DATA(DIRUT)
GOTO PT
+22 SET BGPDELF=Y
End DoDot:1
+23 IF BGPROT="X"
SET BGPNOW=$$NOW^XLFDT
SET BGPDELF="XML.HOSPITAL."_$EXTRACT(BGPNOW,2,12)_".xml"
+24 WRITE !!,"When the report is finished your "_$SELECT(BGPROT="X":"XML",1:"delimited")_" output will be found in the",!,$PIECE($GET(^AUTTSITE(1,1)),U,2)," directory. The filename will be ",BGPDELF,$SELECT(BGPROT="X":"",1:".txt"),!
+25 QUIT