Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BGP4DESL

BGP4DESL.m

Go to the documentation of this file.
  1. BGP4DESL ; IHS/CMI/LAB - FY 11 DISPLAY IND LISTS ;
  1. ;;14.1;IHS CLINICAL REPORTING;;MAY 29, 2014;Build 114
  1. ;; ;
  1. RT ;EP
  1. ;for each measure list, choose report type
  1. W !!,"Select List Type.",!,"NOTE: If you select All Patients, your list may be",!,"hundreds of pages and take hours to print.",!
  1. S DIR(0)="S^R:Random Patient List;P:Patient List by Provider;A:All Patients",DIR("A")="Choose report type for the Lists",DIR("B")="R" KILL DA D ^DIR KILL DIR
  1. I $D(DIRUT) S BGPQUIT="" K BGPLIST Q
  1. S BGPLIST=Y
  1. I BGPLIST="A" Q
  1. I BGPLIST="P" D G:BGPLPROV="" RT Q
  1. .S BGPLPROV="",BGPLPRV=""
  1. .S DIR(0)="9000001,.14",DIR("A")="Enter Designated Provider Name" KILL DA D ^DIR KILL DIR
  1. .I $D(DIRUT) Q
  1. .I Y="" Q
  1. .S BGPLPRV=+Y,BGPLPROV=Y(0,0)
  1. Q
  1. EP ;EP - CALLED FROM OPTION
  1. D EN
  1. Q
  1. EOJ1 ;EP
  1. K BGPGLIST,BGPTIND,BGPHIGH,BGPANS,BGPC,BGPGANS,BGPGC,BGPGI,BGPI,BGPX
  1. Q
  1. ;; ;
  1. EN ;EP -- main entry point for GPRA LIST DISPLAY
  1. D EN^VALM("BGP 14 ELDER LIST SELECTION")
  1. D CLEAR^VALM1
  1. D FULL^VALM1
  1. W:$D(IOF) @IOF
  1. D EOJ1
  1. Q
  1. ;
  1. HDR ; -- header code
  1. S VALMHDR(1)="IHS FY 11 ELDER Performance Measure Lists of Patients"
  1. S VALMHDR(2)="* indicates the list has been selected"
  1. Q
  1. ;
  1. INIT ; -- init variables and list array
  1. K BGPGLIST,BGPNOLI S BGPHIGH=""
  1. S (X,C,I)=0 F S X=$O(BGPIND(X)) Q:X'=+X D
  1. .I $P(^BGPELIJ(X,0),U,5)]"" S C=C+1 D Q
  1. ..S BGPGLIST(C,0)=C_")",$E(BGPGLIST(C,0),5)=$P(^BGPELIJ(X,0),U,5),BGPGLIST("IDX",C,C)=X I $D(BGPLIST(X)) S BGPGLIST(C,0)="*"_BGPGLIST(C,0)
  1. .I $P(^BGPELIJ(X,0),U,5)="" S C=C+1 D
  1. ..S BGPGLIST(C,0)="NO patient list available for measure: "_$P(^BGPELIJ(X,0),U,4),BGPGLIST("IDX",C,C)=X,BGPNOLI(X)="" I $D(BGPLIST(X)) S BGPGLIST(C,0)="*"_BGPGLIST(C,0)
  1. S (VALMCNT,BGPHIGH)=C
  1. Q
  1. ;
  1. HELP ; -- help code
  1. S X="?" D DISP^XQORM1 W !!
  1. Q
  1. ;
  1. EXIT ; -- exit code
  1. Q
  1. ;
  1. EXPND ; -- expand code
  1. Q
  1. ;
  1. BACK ;go back to listman
  1. D TERM^VALM0
  1. S VALMBCK="R"
  1. D INIT
  1. D HDR
  1. K DIR
  1. K X,Y,Z,I
  1. Q
  1. ;
  1. ADD ;EP - add an item to the selected list - called from a protocol
  1. W ! S DIR(0)="LO^1:"_BGPHIGH,DIR("A")="Which item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I Y="" W !,"No items selected." G ADDX
  1. I $D(DIRUT) W !,"No items selected." G ADDX
  1. D FULL^VALM1 W:$D(IOF) @IOF
  1. S BGPGANS=Y,BGPGC="" F BGPGI=1:1 S BGPGC=$P(BGPGANS,",",BGPGI) Q:BGPGC="" S BGPI=BGPGLIST("IDX",BGPGC,BGPGC) I $D(BGPIND(BGPI)),'$D(BGPNOLI(BGPI)) S BGPLIST(BGPI)=""
  1. ADDX ;
  1. D BACK
  1. Q
  1. ADDALL ;
  1. F X=1:1:BGPHIGH S I=$G(BGPGLIST("IDX",X,X)) I $D(BGPIND(I)),'$D(BGPNOLI(I)) S BGPLIST(I)=""
  1. D BACK
  1. Q
  1. ;
  1. REM ;
  1. W ! S DIR(0)="LO^1:"_BGPHIGH,DIR("A")="Which item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I Y="" W !,"No items selected." G ADDX
  1. I $D(DIRUT) W !,"No items selected." G ADDX
  1. D FULL^VALM1 W:$D(IOF) @IOF
  1. S BGPGANS=Y,BGPGC="" F BGPGI=1:1 S BGPGC=$P(BGPGANS,",",BGPGI) Q:BGPGC="" S I=BGPGLIST("IDX",BGPGC,BGPGC) K BGPLIST(I)
  1. REMX ;
  1. D BACK
  1. Q
  1. ;
  1. PT ;EP
  1. S (BGPROT,BGPDELT,BGPDELF)=""
  1. W !!,"Please choose an output type. For an explanation of the delimited",!,"file please see the user manual.",!
  1. 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",DIR("A")="Select an Output Option",DIR("B")="P" KILL DA D ^DIR KILL DIR
  1. I $D(DIRUT) Q
  1. S BGPROT=Y
  1. Q:BGPROT="P"
  1. S BGPDELF="",BGPDELT=""
  1. W !!,"You have selected to create a delimited output file. You can have this",!,"output file created as a text file in the pub directory, ",!,"OR you can have the delimited output display on your screen so that"
  1. W !,"you can do a file capture. Keep in mind that if you choose to",!,"do a screen capture you CANNOT Queue your report to run in the background!!",!!
  1. S DIR(0)="S^S:SCREEN - delimited output will display on screen for capture;F:FILE - delimited output will be written to a file in pub",DIR("A")="Select output type",DIR("B")="S" KILL DA D ^DIR KILL DIR
  1. I $D(DIRUT) G PT
  1. S BGPDELT=Y
  1. Q:BGPDELT="S"
  1. 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
  1. I $D(DIRUT) G PT
  1. S BGPDELF=Y
  1. W !!,"When the report is finished your delimited output will be found in the",!,$P($G(^AUTTSITE(1,1)),U,2)," directory. The filename will be ",BGPDELF,".txt",!
  1. Q