ORWDBA16 ;SLC/GDU Billing Awareness - Phase I [10/18/04 10:26]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17,1997
;
;Enable Billing Data Capture By Provider Parameter
;ORWDBA16 - Generates and prints parameter report
;
;Programs Called:
; $$GETS1^DIQ DBIA 2056
; ^DIR DBIA 10026
; $$FMTE^XLFDT DBIA 10103
; $$NOW^XLFDT DBIA 10103
; $$REPEAT^XLFSTR DBIA 10103
; ENVAL^XPAR DBIA 2263
;
;Variables Used:
; BAEE External value of the CIDC functionality parameter
; DIR Input array variable for ^DIR
; DTOUT Timeout indicator variable, output from ^DIR
; DUOUT Up Arrow '^' indicator variable, output from ^DIR
; ORERR Error message array variable, output from ENVAL^XPAR
; IEN Internal Entry Number
; LF Line Feed
; LFC Line Feed Count variable
; PAGE Page Counter variable
; RPDT Date the report is run, printed on hardcopy and terminal
; SEARCH Type of report being run. Passed from ORWDBA14
; STOP Report finished control variable, used by hardcopy report.
; U Delimiter variable, defaulted to "^"
; X Work variable
; X1 Work variable
; Y Processed user selection varaible, output from ^DIR
;
;Globals Uses:
; ^TMP("ORPAL"
; Temp global to store raw and processed output of ENVAL^PAR
; Raw output of ENVAL^PAR
; ^TMP("ORPAL",$J,"A")=# Records Returned
; ^TMP("ORPAL",$J,"A",Provider IEN_";VA(200,",1)=Parameter value
; Processed output of ENVAL^PAR
; ^TMP("ORPAL",$J,"B",Name|IEN)=Name^Section^Parameter value
;
RPT ;Build and print parameter report
N BAEE,DIR,DTOUT,DUOUT,ORERR,IEN,LF,LFC,PAGE,NAME,SEC,RPDT,STOP,X,X1,Y
K ^TMP("ORPAL",$J)
S RPDT=$$FMTE^XLFDT($$NOW^XLFDT),(IEN,X)="",U="^"
D ENVAL^XPAR("^TMP(""ORPAL"",$J,""A"")","OR BILLING AWARENESS BY USER",1,.ORERR,1)
F S X=$O(^TMP("ORPAL",$J,"A",X)) Q:X="" D
. S IEN=$P(X,";")
. S BAEE=$S(^TMP("ORPAL",$J,"A",X,1)=0:"No",1:"Yes")
. S NAME=$$GET1^DIQ(200,IEN,.01)
. S SEC=$$GET1^DIQ(200,IEN,29)
. S:SEARCH="A" ^TMP("ORPAL",$J,"B",NAME_"|"_IEN)=NAME_U_SEC_U_BAEE
. S:SEARCH="E"&(BAEE="Yes") ^TMP("ORPAL",$J,"B",NAME_"|"_IEN)=NAME_U_SEC_U_BAEE
. S:SEARCH="D"&(BAEE="No") ^TMP("ORPAL",$J,"B",NAME_"|"_IEN)=NAME_U_SEC_U_BAEE
S (X1,Y)="",PAGE=1,STOP=0
D HDR
F S X1=$O(^TMP("ORPAL",$J,"B",X1)) Q:X1=""!(STOP=1) D
. W !,$P(^TMP("ORPAL",$J,"B",X1),U)
. W ?40,$P(^TMP("ORPAL",$J,"B",X1),U,2)
. W ?70,$P(^TMP("ORPAL",$J,"B",X1),U,3)
. I $Y>(IOSL-4) D EOSP
I STOP=0 S STOP=1
I $E(IOST,1,2)'="C-" D FTR
K ^TMP("ORPAL",$J)
Q
HDR ;Print report page header
W:$E(IOST)="C"!(PAGE>2) @IOF
W !,$P($T(RH),";",2)
W !,RPDT,!!
W:SEARCH="A" $P($T(HDRA),";",2),!
W:SEARCH="E" $P($T(HDRE),";",2),!
W:SEARCH="D" $P($T(HDRD),";",2),!
W !,"Provider",?40,"Section",?70,"Enabled"
W !,$$REPEAT^XLFSTR("-",IOM)
Q
EOSP ;End of Screen/Page
S PAGE=PAGE+1
I $E(IOST,1,2)="C-" D SFTR Q:STOP=1
E D FTR
D HDR
Q
;
SFTR ;Screen report footer
S DIR(0)="E"
D ^DIR K DIR
I $D(DTOUT)!($D(DUOUT)) S STOP=1
E S STOP=0
Q
;
FTR ;Print report page footer
;Used when output is directed to printer or spool device
I STOP=1 D
. S LFC=(IOSL-4)-$Y
. F LF=1:1:LFC W !," "
W:SEARCH="A" !,$P($T(FTRA),";",2)
W:SEARCH="E" !,$P($T(FTRE),";",2)
W:SEARCH="D" !,$P($T(FTRD),";",2)
W ?60,"Page: ",PAGE
Q
;Text used for building page/screen header/footer in HDR
RH ;Clinical Indicator Data Capture By Provider Parameter Report
HDRA ;All Providers With Clinical Indicator Data Capture Parameter
HDRE ;Only Providers With Clinical Indicator Data Capture Enabled
HDRD ;Only Providers With Clinical Indicator Data Capture Disabled
;Text used for building page footer in FTR
PF ;Clinical Data Capture By Provider Parameter Report
FTRA ;All With Parameter
FTRE ;Only Clinical Indicator Data Capture Enabled
FTRD ;Only Clinical Indicator Data Capture Disabled
ORWDBA16 ;SLC/GDU Billing Awareness - Phase I [10/18/04 10:26]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17,1997
+2 ;
+3 ;Enable Billing Data Capture By Provider Parameter
+4 ;ORWDBA16 - Generates and prints parameter report
+5 ;
+6 ;Programs Called:
+7 ; $$GETS1^DIQ DBIA 2056
+8 ; ^DIR DBIA 10026
+9 ; $$FMTE^XLFDT DBIA 10103
+10 ; $$NOW^XLFDT DBIA 10103
+11 ; $$REPEAT^XLFSTR DBIA 10103
+12 ; ENVAL^XPAR DBIA 2263
+13 ;
+14 ;Variables Used:
+15 ; BAEE External value of the CIDC functionality parameter
+16 ; DIR Input array variable for ^DIR
+17 ; DTOUT Timeout indicator variable, output from ^DIR
+18 ; DUOUT Up Arrow '^' indicator variable, output from ^DIR
+19 ; ORERR Error message array variable, output from ENVAL^XPAR
+20 ; IEN Internal Entry Number
+21 ; LF Line Feed
+22 ; LFC Line Feed Count variable
+23 ; PAGE Page Counter variable
+24 ; RPDT Date the report is run, printed on hardcopy and terminal
+25 ; SEARCH Type of report being run. Passed from ORWDBA14
+26 ; STOP Report finished control variable, used by hardcopy report.
+27 ; U Delimiter variable, defaulted to "^"
+28 ; X Work variable
+29 ; X1 Work variable
+30 ; Y Processed user selection varaible, output from ^DIR
+31 ;
+32 ;Globals Uses:
+33 ; ^TMP("ORPAL"
+34 ; Temp global to store raw and processed output of ENVAL^PAR
+35 ; Raw output of ENVAL^PAR
+36 ; ^TMP("ORPAL",$J,"A")=# Records Returned
+37 ; ^TMP("ORPAL",$J,"A",Provider IEN_";VA(200,",1)=Parameter value
+38 ; Processed output of ENVAL^PAR
+39 ; ^TMP("ORPAL",$J,"B",Name|IEN)=Name^Section^Parameter value
+40 ;
RPT ;Build and print parameter report
+1 NEW BAEE,DIR,DTOUT,DUOUT,ORERR,IEN,LF,LFC,PAGE,NAME,SEC,RPDT,STOP,X,X1,Y
+2 KILL ^TMP("ORPAL",$JOB)
+3 SET RPDT=$$FMTE^XLFDT($$NOW^XLFDT)
SET (IEN,X)=""
SET U="^"
+4 DO ENVAL^XPAR("^TMP(""ORPAL"",$J,""A"")","OR BILLING AWARENESS BY USER",1,.ORERR,1)
+5 FOR
SET X=$ORDER(^TMP("ORPAL",$JOB,"A",X))
IF X=""
QUIT
Begin DoDot:1
+6 SET IEN=$PIECE(X,";")
+7 SET BAEE=$SELECT(^TMP("ORPAL",$JOB,"A",X,1)=0:"No",1:"Yes")
+8 SET NAME=$$GET1^DIQ(200,IEN,.01)
+9 SET SEC=$$GET1^DIQ(200,IEN,29)
+10 IF SEARCH="A"
SET ^TMP("ORPAL",$JOB,"B",NAME_"|"_IEN)=NAME_U_SEC_U_BAEE
+11 IF SEARCH="E"&(BAEE="Yes")
SET ^TMP("ORPAL",$JOB,"B",NAME_"|"_IEN)=NAME_U_SEC_U_BAEE
+12 IF SEARCH="D"&(BAEE="No")
SET ^TMP("ORPAL",$JOB,"B",NAME_"|"_IEN)=NAME_U_SEC_U_BAEE
End DoDot:1
+13 SET (X1,Y)=""
SET PAGE=1
SET STOP=0
+14 DO HDR
+15 FOR
SET X1=$ORDER(^TMP("ORPAL",$JOB,"B",X1))
IF X1=""!(STOP=1)
QUIT
Begin DoDot:1
+16 WRITE !,$PIECE(^TMP("ORPAL",$JOB,"B",X1),U)
+17 WRITE ?40,$PIECE(^TMP("ORPAL",$JOB,"B",X1),U,2)
+18 WRITE ?70,$PIECE(^TMP("ORPAL",$JOB,"B",X1),U,3)
+19 IF $Y>(IOSL-4)
DO EOSP
End DoDot:1
+20 IF STOP=0
SET STOP=1
+21 IF $EXTRACT(IOST,1,2)'="C-"
DO FTR
+22 KILL ^TMP("ORPAL",$JOB)
+23 QUIT
HDR ;Print report page header
+1 IF $EXTRACT(IOST)="C"!(PAGE>2)
WRITE @IOF
+2 WRITE !,$PIECE($TEXT(RH),";",2)
+3 WRITE !,RPDT,!!
+4 IF SEARCH="A"
WRITE $PIECE($TEXT(HDRA),";",2),!
+5 IF SEARCH="E"
WRITE $PIECE($TEXT(HDRE),";",2),!
+6 IF SEARCH="D"
WRITE $PIECE($TEXT(HDRD),";",2),!
+7 WRITE !,"Provider",?40,"Section",?70,"Enabled"
+8 WRITE !,$$REPEAT^XLFSTR("-",IOM)
+9 QUIT
EOSP ;End of Screen/Page
+1 SET PAGE=PAGE+1
+2 IF $EXTRACT(IOST,1,2)="C-"
DO SFTR
IF STOP=1
QUIT
+3 IF '$TEST
DO FTR
+4 DO HDR
+5 QUIT
+6 ;
SFTR ;Screen report footer
+1 SET DIR(0)="E"
+2 DO ^DIR
KILL DIR
+3 IF $DATA(DTOUT)!($DATA(DUOUT))
SET STOP=1
+4 IF '$TEST
SET STOP=0
+5 QUIT
+6 ;
FTR ;Print report page footer
+1 ;Used when output is directed to printer or spool device
+2 IF STOP=1
Begin DoDot:1
+3 SET LFC=(IOSL-4)-$Y
+4 FOR LF=1:1:LFC
WRITE !," "
End DoDot:1
+5 IF SEARCH="A"
WRITE !,$PIECE($TEXT(FTRA),";",2)
+6 IF SEARCH="E"
WRITE !,$PIECE($TEXT(FTRE),";",2)
+7 IF SEARCH="D"
WRITE !,$PIECE($TEXT(FTRD),";",2)
+8 WRITE ?60,"Page: ",PAGE
+9 QUIT
+10 ;Text used for building page/screen header/footer in HDR
RH ;Clinical Indicator Data Capture By Provider Parameter Report
HDRA ;All Providers With Clinical Indicator Data Capture Parameter
HDRE ;Only Providers With Clinical Indicator Data Capture Enabled
HDRD ;Only Providers With Clinical Indicator Data Capture Disabled
+1 ;Text used for building page footer in FTR
PF ;Clinical Data Capture By Provider Parameter Report
FTRA ;All With Parameter
FTRE ;Only Clinical Indicator Data Capture Enabled
FTRD ;Only Clinical Indicator Data Capture Disabled