ABMDRSU ; IHS/ASDST/DMJ - Display Summarized Claim ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;
;
SEL K ABM,ABMP
S ABM("STA")="F",ABM("STA","NM")="Flagged as Billable"
S ABM("NODX")="" D ^ABMDRSEL I $D(DTOUT)!$D(DUOUT)!$D(DIROUT) K ABM,DTOUT,DUOUT,DIROUT Q
S ABMP("HEAD2")="SUMMARIZED LISTING of CLAIMS "_ABM("STA","NM"),ABM("HD",0)="" D HD^ABMDRHD S ABMP("HEAD3")=ABM("HD",0)
S ABMP("OPT")=ABM("STA"),ABMP("PG")=0
I ABMP("OPT")'="",'$D(^ABMDCLM(DUZ(2),"AS",ABMP("OPT"))) D G DONE
.W !,"No Claims to report",!
.S DIR(0)="E" D ^DIR K DIR
S ABMQ("RP")="ENT^ABMDRSU",ABMQ("NS")="ABM",ABMQ("RX")="POUT^ABMDRUTL"
D ^ABMDRDBQ
Q
;
ENT ;TaskMan Entry Point
S ABMP("CDFN")="" K ABMP("QUIT")
I ABMP("OPT")="" F ABMP("OPT")="E","F","R","U","C" D L2 Q
L2 ;LOOP THROUGH 'AS' X-REF
F S ABMP("CDFN")=$O(^ABMDCLM(DUZ(2),"AS",ABMP("OPT"),ABMP("CDFN"))) Q:ABMP("CDFN")=""!($D(ABMP("QUIT"))) D
.Q:'$D(^ABMDCLM(DUZ(2),ABMP("CDFN"),0)) S ABM("V")=$P(^(0),U,7),ABM("L")=$P(^(0),U,3),ABM("I")=$P(^(0),U,8),ABM("P")=$P(^(0),U),ABM("D")=$P(^(0),U,2)
.Q:ABM("L")=""!(ABM("I")="")!(ABM("P")="")!(ABM("D")="")!(ABM("V")="")
.Q:'$D(^AUTNINS(ABM("I"),0))
.I $D(ABMY("PAT")),ABMY("PAT")'=ABM("P") Q
.I $D(ABMY("LOC")),ABMY("LOC")'=ABM("L") Q
.I $D(ABMY("INS")),ABMY("INS")'=ABM("I") Q
.I $D(ABMY("TYP")) Q:ABMY("TYP")'[$P($G(^AUTNINS(ABM("I"),2)),U)
.I $D(ABMY("DT")),ABM("D")<ABMY("DT",1)!(ABM("D")>ABMY("DT",2)) Q
.D ^ABMDRSU1
DONE Q
;
SELT ;EP
SEL2 S ABMP("PG")=0,ABMP("SEL")=0
S ABMP("HEAD2")="SUMMARIZED CLAIM DISPLAY"
K %P,DIR W !!
LOOP S DIR("A")="Select CLAIM",DIR(0)="PO^9002274.3:QZEM" D ^DIR K DIR
I $D(DUOUT)!($D(DIROUT)) K ABMP Q
I X="" S ABMQ("RP")="ENT2^ABMDRSU",ABMQ("RX")="POUT^ABMDRUTL",ABMQ("NS")="ABMP" D ^ABMDRDBQ Q
I +Y<1 G LOOP
S ABMP("SEL")=ABMP("SEL")+1,ABMP("SEL",ABMP("SEL"))=+Y
G LOOP
;
ENT2 ;EP FOR LOOPING THROUGH ABMP ARRAY
S ABMP("SEL")=0 F S ABMP("SEL")=$O(ABMP("SEL",ABMP("SEL"))) Q:ABMP("SEL")="" S ABMP("CDFN")=ABMP("SEL",ABMP("SEL")) D ^ABMDRSU1 Q:$D(ABMP("QUIT"))
Q
ABMDRSU ; IHS/ASDST/DMJ - Display Summarized Claim ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;
+3 ;
SEL KILL ABM,ABMP
+1 SET ABM("STA")="F"
SET ABM("STA","NM")="Flagged as Billable"
+2 SET ABM("NODX")=""
DO ^ABMDRSEL
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
KILL ABM,DTOUT,DUOUT,DIROUT
QUIT
+3 SET ABMP("HEAD2")="SUMMARIZED LISTING of CLAIMS "_ABM("STA","NM")
SET ABM("HD",0)=""
DO HD^ABMDRHD
SET ABMP("HEAD3")=ABM("HD",0)
+4 SET ABMP("OPT")=ABM("STA")
SET ABMP("PG")=0
+5 IF ABMP("OPT")'=""
IF '$DATA(^ABMDCLM(DUZ(2),"AS",ABMP("OPT")))
Begin DoDot:1
+6 WRITE !,"No Claims to report",!
+7 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
GOTO DONE
+8 SET ABMQ("RP")="ENT^ABMDRSU"
SET ABMQ("NS")="ABM"
SET ABMQ("RX")="POUT^ABMDRUTL"
+9 DO ^ABMDRDBQ
+10 QUIT
+11 ;
ENT ;TaskMan Entry Point
+1 SET ABMP("CDFN")=""
KILL ABMP("QUIT")
+2 IF ABMP("OPT")=""
FOR ABMP("OPT")="E","F","R","U","C"
DO L2
QUIT
L2 ;LOOP THROUGH 'AS' X-REF
+1 FOR
SET ABMP("CDFN")=$ORDER(^ABMDCLM(DUZ(2),"AS",ABMP("OPT"),ABMP("CDFN")))
IF ABMP("CDFN")=""!($DATA(ABMP("QUIT")))
QUIT
Begin DoDot:1
+2 IF '$DATA(^ABMDCLM(DUZ(2),ABMP("CDFN"),0))
QUIT
SET ABM("V")=$PIECE(^(0),U,7)
SET ABM("L")=$PIECE(^(0),U,3)
SET ABM("I")=$PIECE(^(0),U,8)
SET ABM("P")=$PIECE(^(0),U)
SET ABM("D")=$PIECE(^(0),U,2)
+3 IF ABM("L")=""!(ABM("I")="")!(ABM("P")="")!(ABM("D")="")!(ABM("V")="")
QUIT
+4 IF '$DATA(^AUTNINS(ABM("I"),0))
QUIT
+5 IF $DATA(ABMY("PAT"))
IF ABMY("PAT")'=ABM("P")
QUIT
+6 IF $DATA(ABMY("LOC"))
IF ABMY("LOC")'=ABM("L")
QUIT
+7 IF $DATA(ABMY("INS"))
IF ABMY("INS")'=ABM("I")
QUIT
+8 IF $DATA(ABMY("TYP"))
IF ABMY("TYP")'[$PIECE($GET(^AUTNINS(ABM("I"),2)),U)
QUIT
+9 IF $DATA(ABMY("DT"))
IF ABM("D")<ABMY("DT",1)!(ABM("D")>ABMY("DT",2))
QUIT
+10 DO ^ABMDRSU1
End DoDot:1
DONE QUIT
+1 ;
SELT ;EP
SEL2 SET ABMP("PG")=0
SET ABMP("SEL")=0
+1 SET ABMP("HEAD2")="SUMMARIZED CLAIM DISPLAY"
+2 KILL %P,DIR
WRITE !!
LOOP SET DIR("A")="Select CLAIM"
SET DIR(0)="PO^9002274.3:QZEM"
DO ^DIR
KILL DIR
+1 IF $DATA(DUOUT)!($DATA(DIROUT))
KILL ABMP
QUIT
+2 IF X=""
SET ABMQ("RP")="ENT2^ABMDRSU"
SET ABMQ("RX")="POUT^ABMDRUTL"
SET ABMQ("NS")="ABMP"
DO ^ABMDRDBQ
QUIT
+3 IF +Y<1
GOTO LOOP
+4 SET ABMP("SEL")=ABMP("SEL")+1
SET ABMP("SEL",ABMP("SEL"))=+Y
+5 GOTO LOOP
+6 ;
ENT2 ;EP FOR LOOPING THROUGH ABMP ARRAY
+1 SET ABMP("SEL")=0
FOR
SET ABMP("SEL")=$ORDER(ABMP("SEL",ABMP("SEL")))
IF ABMP("SEL")=""
QUIT
SET ABMP("CDFN")=ABMP("SEL",ABMP("SEL"))
DO ^ABMDRSU1
IF $DATA(ABMP("QUIT"))
QUIT
+2 QUIT