ABMDRCO3 ; IHS/ASDST/DMJ - CO VISITS REPORT (PRINT) ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;
;
HEAD ;EP to print page heading
W $$EN^ABMVDF("IOF"),!,?11,"*****Confidential Patient Data Covered by Privacy Act*****",!
W !,?132-$L(ABMD("FAC"))/2,ABMD("FAC")
W !,?45,"COMMISSIONED OFFICERS & DEPENDENTS VISITS"
W !,?55,ABMD("BDT")_" to "_ABMD("EDT")
S X=$S(ABMD("II")="O":"OUTPATIENT VISITS",ABMD("II")="I":"INPATIENT VISITS",1:"DENTAL VISITS")
W !,?132-$L(X)/2,X,!
F ABMD("J")=1:1:132 W "-"
W !,"Patient Name",?23,"Chart #",?36,"SSN",?45,"CO or Dep"
W ?58,"Sponsor",?80,"SSN"
W ?97,$S(ABMD("II")="I":"Admit Date",1:"Visit Date")
W ?110,$S(ABMD("II")="I":"Dsch Date",1:"No. of Visits")
I ABMD("II")="I" W ?122,"# of Days"
W ! F J=1:1:132 W "-"
W ! Q
;
PAGE ;EP to form feed to new page
I IOST'?1"C-".E D HEAD Q
K DIR W ! S DIR(0)="EO",ABMDSTOP=""
S DIR("A")="Enter <return> to continue or '^' to stop"
D ^DIR K DIR
I $D(DTOUT)!$D(DUOUT)!$D(DIROUT) S ABMD("STOP")="^" Q
D HEAD
Q
;
PRVTINS ;EP does patient have co dep info in prvt ins file?
G PRV9:ABMD("CHMP")=""
G PRV9:ABMD("BENP")="CO",PRV9:ABMD("BENP")="RET"
S ABMD("INS")=$O(^AUPNPRVT("I",ABMD("CHMP"),ABMD("DFN"),0)) G PRV9:ABMD("INS")=""
Q:$P($G(^AUPNPRVT(ABMD("DFN"),11,ABMD("INS"),0)),U)="" ;ABM*2.5*8 IHS/SD/TPF 6/14/2005 IM17673
S ABMD("STR1")=^AUPNPRVT(ABMD("DFN"),11,ABMD("INS"),0) W ?58,$P(ABMD("STR1"),"^",4)
S X=$P(ABMD("STR1"),"^",2) W ?80,$E(X,1,3)_"-"_$E(X,4,5)_"-"_$E(X,6,9)
PRV9 Q
;
TOTAL ;EP to print visit total
Q:ABMD("STOP")="^"
I $Y>(IOSL-6) D PAGE
I ABMD("II")="O" W !!,?80,"TOTAL OUTPATIENT VISITS:",?112,$J(ABMD("TOT"),3)
I ABMD("II")="I" W !!,?95,"TOTAL INPATIENT DAYS:",?121,$J(ABMD("TOT"),3)
I ABMD("II")="D" W !!,?80,"TOTAL DENTAL VISITS:",?112,$J(ABMD("TOT"),3)
S ABMD("TOT")=0 ;reset for next category
I IOST?1"C-".E W ! K DIR S DIR(0)="EO",DIR("A")="Enter <return> to continue or '^' to stop" D ^DIR K DIR I $D(DTOUT)!$D(DIROUT)!$D(DUOUT) S ABMD("STOP")="^" Q
Q
ABMDRCO3 ; IHS/ASDST/DMJ - CO VISITS REPORT (PRINT) ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;
+3 ;
HEAD ;EP to print page heading
+1 WRITE $$EN^ABMVDF("IOF"),!,?11,"*****Confidential Patient Data Covered by Privacy Act*****",!
+2 WRITE !,?132-$LENGTH(ABMD("FAC"))/2,ABMD("FAC")
+3 WRITE !,?45,"COMMISSIONED OFFICERS & DEPENDENTS VISITS"
+4 WRITE !,?55,ABMD("BDT")_" to "_ABMD("EDT")
+5 SET X=$SELECT(ABMD("II")="O":"OUTPATIENT VISITS",ABMD("II")="I":"INPATIENT VISITS",1:"DENTAL VISITS")
+6 WRITE !,?132-$LENGTH(X)/2,X,!
+7 FOR ABMD("J")=1:1:132
WRITE "-"
+8 WRITE !,"Patient Name",?23,"Chart #",?36,"SSN",?45,"CO or Dep"
+9 WRITE ?58,"Sponsor",?80,"SSN"
+10 WRITE ?97,$SELECT(ABMD("II")="I":"Admit Date",1:"Visit Date")
+11 WRITE ?110,$SELECT(ABMD("II")="I":"Dsch Date",1:"No. of Visits")
+12 IF ABMD("II")="I"
WRITE ?122,"# of Days"
+13 WRITE !
FOR J=1:1:132
WRITE "-"
+14 WRITE !
QUIT
+15 ;
PAGE ;EP to form feed to new page
+1 IF IOST'?1"C-".E
DO HEAD
QUIT
+2 KILL DIR
WRITE !
SET DIR(0)="EO"
SET ABMDSTOP=""
+3 SET DIR("A")="Enter <return> to continue or '^' to stop"
+4 DO ^DIR
KILL DIR
+5 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
SET ABMD("STOP")="^"
QUIT
+6 DO HEAD
+7 QUIT
+8 ;
PRVTINS ;EP does patient have co dep info in prvt ins file?
+1 IF ABMD("CHMP")=""
GOTO PRV9
+2 IF ABMD("BENP")="CO"
GOTO PRV9
IF ABMD("BENP")="RET"
GOTO PRV9
+3 SET ABMD("INS")=$ORDER(^AUPNPRVT("I",ABMD("CHMP"),ABMD("DFN"),0))
IF ABMD("INS")=""
GOTO PRV9
+4 ;ABM*2.5*8 IHS/SD/TPF 6/14/2005 IM17673
IF $PIECE($GET(^AUPNPRVT(ABMD("DFN"),11,ABMD("INS"),0)),U)=""
QUIT
+5 SET ABMD("STR1")=^AUPNPRVT(ABMD("DFN"),11,ABMD("INS"),0)
WRITE ?58,$PIECE(ABMD("STR1"),"^",4)
+6 SET X=$PIECE(ABMD("STR1"),"^",2)
WRITE ?80,$EXTRACT(X,1,3)_"-"_$EXTRACT(X,4,5)_"-"_$EXTRACT(X,6,9)
PRV9 QUIT
+1 ;
TOTAL ;EP to print visit total
+1 IF ABMD("STOP")="^"
QUIT
+2 IF $Y>(IOSL-6)
DO PAGE
+3 IF ABMD("II")="O"
WRITE !!,?80,"TOTAL OUTPATIENT VISITS:",?112,$JUSTIFY(ABMD("TOT"),3)
+4 IF ABMD("II")="I"
WRITE !!,?95,"TOTAL INPATIENT DAYS:",?121,$JUSTIFY(ABMD("TOT"),3)
+5 IF ABMD("II")="D"
WRITE !!,?80,"TOTAL DENTAL VISITS:",?112,$JUSTIFY(ABMD("TOT"),3)
+6 ;reset for next category
SET ABMD("TOT")=0
+7 IF IOST?1"C-".E
WRITE !
KILL DIR
SET DIR(0)="EO"
SET DIR("A")="Enter <return> to continue or '^' to stop"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DIROUT)!$DATA(DUOUT)
SET ABMD("STOP")="^"
QUIT
+8 QUIT