ABMDELOO ; IHS/ASDST/DMJ - Claim Looping Utility ;
;;2.6;IHS 3P BILLING SYSTEM;**9**;NOV 12, 2009
;
; IHS/DSD/LSL 03/20/98 Set ABMPERM("EDITOR") when looping
; through flagged as billable cross-reference to
; avoid user being kicked out to menu.
;
; IHS/SD/SDR - v2.5 p12 - UFMS
; If user isn't logged into cashiering session they can't do
; this option
;
K ABM,ABMP,ABMPP,DIC,ABMX,ABMV,ABMZ,ABMC,ABMU,ABML,DIROUT,DIRUT,DTOUT,DUOUT
I $P($G(^ABMDPARM(DUZ(2),1,0)),"^",15)'="Y" D Q
.W !!?5,*7,"ACCESS to the CLAIM EDITOR is DENIED until SITE PARAMETERS file",!?5,"has been Reviewed!"
.S DIR(0)="E" D ^DIR K DIR
S ABMPERM("EDITOR")=1
;
; var def: ABMPP("STATUS") is defined as the status for looping
; where: 0 - looping is active
; 1 - looping is completed
; 2 - looping is terminated
;
;start new code abm*2.6*9 NOHEAT - ensure UFMS is setup
I $P($G(^ABMDPARM(DUZ(2),1,4)),U,15)="" D Q
.W !!,"* * UFMS SETUP MUST BE DONE BEFORE ANY BILLING FUNCTIONS CAN BE USED! * *",!
.S DIR(0)="E",DIR("A")="Enter RETURN to Continue" D ^DIR K DIR
;end new code
I $P($G(^ABMDPARM(DUZ(2),1,4)),U,15)=1 D Q:+$G(ABMUOPNS)=0
.S ABMUOPNS=$$FINDOPEN^ABMUCUTL(DUZ)
.I +$G(ABMUOPNS)=0 D Q
..W !!,"* * YOU MUST SIGN IN TO BE ABLE TO PERFORM BILLING FUNCTIONS! * *",!
..S DIR(0)="E",DIR("A")="Enter RETURN to Continue" D ^DIR K DIR
;
D ^ABMDESEL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
S ABMPP("STATUS")=0
S ABMPP("CLM")=0 F S ABMPP("CLM")=$O(^ABMDCLM(DUZ(2),"AS","O",ABMPP("CLM"))) D Q:ABMPP("STATUS")
.I 'ABMPP("CLM") S ABMPP("STATUS")=1 Q
.S ABMP("HIT")=0,ABM=ABMPP("CLM") D ^ABMDECHK K ABM Q:'ABMP("HIT")
.W !!,"LOOPING through CLAIMS with a Status of ROLLED-In Edit Mode...."
.S ABMPERM("EDITOR")=1
.S ABMP("CDFN")=ABMPP("CLM") D EXT^ABMDE
.Q:ABMPP("STATUS")=2
.D ASK
G XIT:ABMPP("STATUS")'=1
S ABMPP("STATUS")=0,ABMPP("TIME1")=$P($H,",",2)
S ABMPP("CLM")=0 F S ABMPP("CLM")=$O(^ABMDCLM(DUZ(2),"AS","E",ABMPP("CLM"))) D Q:ABMPP("STATUS")
.I $D(ABMPP("TIME1")) S ABMPP("TIME2")=$P($H,",",2) I ABMPP("TIME2")-ABMPP("TIME1")>5 D WAIT^DICD S ABMPP("TIME1")=ABMPP("TIME2")
.I 'ABMPP("CLM") S ABMPP("STATUS")=1 Q
.S ABMP("HIT")=0,ABM=ABMPP("CLM") D ^ABMDECHK K ABM Q:'ABMP("HIT")
.K ABMPP("TIME1")
.W !!,"LOOPING through CLAIMS with a Status of IN EDIT MODE...."
.S ABMPERM("EDITOR")=1
.S ABMP("CDFN")=ABMPP("CLM") D EXT^ABMDE
.Q:ABMPP("STATUS")=2
.D ASK
.S ABMPP("TIME1")=$P($H,",",2)
G XIT:ABMPP("STATUS")'=1
;
S ABMPP("STATUS")=0
S ABMPP("CLM")=0 F S ABMPP("CLM")=$O(^ABMDCLM(DUZ(2),"AS","F",ABMPP("CLM"))) D Q:ABMPP("STATUS")
.I 'ABMPP("CLM") S ABMPP("STATUS")=1 Q
.S ABMP("HIT")=0,ABM=ABMPP("CLM") D ^ABMDECHK K ABM Q:'ABMP("HIT")
.W !!,"LOOPING through CLAIMS with a Status of FLAGGED AS BILLABLE...."
.S ABMPERM("EDITOR")=1
.S ABMP("CDFN")=ABMPP("CLM") D EXT^ABMDE
.Q:ABMPP("STATUS")=2
.I ABMPP("STATUS") D ASK
TT G XIT
;
ASK G LOOP:'$D(^XUSEC("ABMDZ MANAGEMENT",DUZ))!'ABMPP("STATUS")
K DIR W !! S DIR(0)="SO^1:CONTINUE LOOPING;2:DELETE CLAIM;3:QUIT"
S DIR("A")="Desired ACTION",DIR("B")=1
D ^DIR K DIR
I Y'=2 S ABMPP("STATUS")=$S(Y'=1:2,1:0) Q
S ABMP("CDFN")=ABMPP("CLM") D ENT^ABMDECAN
;
LOOP W ! K DIR S DIR(0)="YO",DIR("A")="Want to Continue LOOPING (Y/N)",DIR("B")="Y" D ^DIR S ABMPP("STATUS")=$S($G(Y):0,1:2)
Q
;
XIT K ABMPP
Q
ABMDELOO ; IHS/ASDST/DMJ - Claim Looping Utility ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**9**;NOV 12, 2009
+2 ;
+3 ; IHS/DSD/LSL 03/20/98 Set ABMPERM("EDITOR") when looping
+4 ; through flagged as billable cross-reference to
+5 ; avoid user being kicked out to menu.
+6 ;
+7 ; IHS/SD/SDR - v2.5 p12 - UFMS
+8 ; If user isn't logged into cashiering session they can't do
+9 ; this option
+10 ;
+11 KILL ABM,ABMP,ABMPP,DIC,ABMX,ABMV,ABMZ,ABMC,ABMU,ABML,DIROUT,DIRUT,DTOUT,DUOUT
+12 IF $PIECE($GET(^ABMDPARM(DUZ(2),1,0)),"^",15)'="Y"
Begin DoDot:1
+13 WRITE !!?5,*7,"ACCESS to the CLAIM EDITOR is DENIED until SITE PARAMETERS file",!?5,"has been Reviewed!"
+14 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
QUIT
+15 SET ABMPERM("EDITOR")=1
+16 ;
+17 ; var def: ABMPP("STATUS") is defined as the status for looping
+18 ; where: 0 - looping is active
+19 ; 1 - looping is completed
+20 ; 2 - looping is terminated
+21 ;
+22 ;start new code abm*2.6*9 NOHEAT - ensure UFMS is setup
+23 IF $PIECE($GET(^ABMDPARM(DUZ(2),1,4)),U,15)=""
Begin DoDot:1
+24 WRITE !!,"* * UFMS SETUP MUST BE DONE BEFORE ANY BILLING FUNCTIONS CAN BE USED! * *",!
+25 SET DIR(0)="E"
SET DIR("A")="Enter RETURN to Continue"
DO ^DIR
KILL DIR
End DoDot:1
QUIT
+26 ;end new code
+27 IF $PIECE($GET(^ABMDPARM(DUZ(2),1,4)),U,15)=1
Begin DoDot:1
+28 SET ABMUOPNS=$$FINDOPEN^ABMUCUTL(DUZ)
+29 IF +$GET(ABMUOPNS)=0
Begin DoDot:2
+30 WRITE !!,"* * YOU MUST SIGN IN TO BE ABLE TO PERFORM BILLING FUNCTIONS! * *",!
+31 SET DIR(0)="E"
SET DIR("A")="Enter RETURN to Continue"
DO ^DIR
KILL DIR
End DoDot:2
QUIT
End DoDot:1
IF +$GET(ABMUOPNS)=0
QUIT
+32 ;
+33 DO ^ABMDESEL
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
+34 SET ABMPP("STATUS")=0
+35 SET ABMPP("CLM")=0
FOR
SET ABMPP("CLM")=$ORDER(^ABMDCLM(DUZ(2),"AS","O",ABMPP("CLM")))
Begin DoDot:1
+36 IF 'ABMPP("CLM")
SET ABMPP("STATUS")=1
QUIT
+37 SET ABMP("HIT")=0
SET ABM=ABMPP("CLM")
DO ^ABMDECHK
KILL ABM
IF 'ABMP("HIT")
QUIT
+38 WRITE !!,"LOOPING through CLAIMS with a Status of ROLLED-In Edit Mode...."
+39 SET ABMPERM("EDITOR")=1
+40 SET ABMP("CDFN")=ABMPP("CLM")
DO EXT^ABMDE
+41 IF ABMPP("STATUS")=2
QUIT
+42 DO ASK
End DoDot:1
IF ABMPP("STATUS")
QUIT
+43 IF ABMPP("STATUS")'=1
GOTO XIT
+44 SET ABMPP("STATUS")=0
SET ABMPP("TIME1")=$PIECE($HOROLOG,",",2)
+45 SET ABMPP("CLM")=0
FOR
SET ABMPP("CLM")=$ORDER(^ABMDCLM(DUZ(2),"AS","E",ABMPP("CLM")))
Begin DoDot:1
+46 IF $DATA(ABMPP("TIME1"))
SET ABMPP("TIME2")=$PIECE($HOROLOG,",",2)
IF ABMPP("TIME2")-ABMPP("TIME1")>5
DO WAIT^DICD
SET ABMPP("TIME1")=ABMPP("TIME2")
+47 IF 'ABMPP("CLM")
SET ABMPP("STATUS")=1
QUIT
+48 SET ABMP("HIT")=0
SET ABM=ABMPP("CLM")
DO ^ABMDECHK
KILL ABM
IF 'ABMP("HIT")
QUIT
+49 KILL ABMPP("TIME1")
+50 WRITE !!,"LOOPING through CLAIMS with a Status of IN EDIT MODE...."
+51 SET ABMPERM("EDITOR")=1
+52 SET ABMP("CDFN")=ABMPP("CLM")
DO EXT^ABMDE
+53 IF ABMPP("STATUS")=2
QUIT
+54 DO ASK
+55 SET ABMPP("TIME1")=$PIECE($HOROLOG,",",2)
End DoDot:1
IF ABMPP("STATUS")
QUIT
+56 IF ABMPP("STATUS")'=1
GOTO XIT
+57 ;
+58 SET ABMPP("STATUS")=0
+59 SET ABMPP("CLM")=0
FOR
SET ABMPP("CLM")=$ORDER(^ABMDCLM(DUZ(2),"AS","F",ABMPP("CLM")))
Begin DoDot:1
+60 IF 'ABMPP("CLM")
SET ABMPP("STATUS")=1
QUIT
+61 SET ABMP("HIT")=0
SET ABM=ABMPP("CLM")
DO ^ABMDECHK
KILL ABM
IF 'ABMP("HIT")
QUIT
+62 WRITE !!,"LOOPING through CLAIMS with a Status of FLAGGED AS BILLABLE...."
+63 SET ABMPERM("EDITOR")=1
+64 SET ABMP("CDFN")=ABMPP("CLM")
DO EXT^ABMDE
+65 IF ABMPP("STATUS")=2
QUIT
+66 IF ABMPP("STATUS")
DO ASK
End DoDot:1
IF ABMPP("STATUS")
QUIT
TT GOTO XIT
+1 ;
ASK IF '$DATA(^XUSEC("ABMDZ MANAGEMENT",DUZ))!'ABMPP("STATUS")
GOTO LOOP
+1 KILL DIR
WRITE !!
SET DIR(0)="SO^1:CONTINUE LOOPING;2:DELETE CLAIM;3:QUIT"
+2 SET DIR("A")="Desired ACTION"
SET DIR("B")=1
+3 DO ^DIR
KILL DIR
+4 IF Y'=2
SET ABMPP("STATUS")=$SELECT(Y'=1:2,1:0)
QUIT
+5 SET ABMP("CDFN")=ABMPP("CLM")
DO ENT^ABMDECAN
+6 ;
LOOP WRITE !
KILL DIR
SET DIR(0)="YO"
SET DIR("A")="Want to Continue LOOPING (Y/N)"
SET DIR("B")="Y"
DO ^DIR
SET ABMPP("STATUS")=$SELECT($GET(Y):0,1:2)
+1 QUIT
+2 ;
XIT KILL ABMPP
+1 QUIT