ABMRSCIN ; IHS/SD/SDR - Setup option to split claims in claim generator;
;;2.6;IHS 3P BILLING SYSTEM;**22**;NOV 12, 2009;Build 418
;IHS/SD/SDR 2.6*22 HEAT335246 - New routine
;
Q
START ;
S ABMP("RTN")="ABMRSCIN" ;Routine used to get data
S ABMMENU="Split claim setup for claim generator"
SEL ;
K ABMY,ABM
K DTOUT,DIRUT,DUOUT,DIROUT
I $D(ABMY("RTYP")) S ABM("HD",0)=ABMY("RTYP","NM")_" "_ABMMENU
E S ABM("HD",0)=ABMMENU
W !!,"This option allows sites to have claims automatically split into"
W !,"multiple claims for billing. The split will occur when the claim"
W !,"generator runs. You can split each page of the claim editor into"
W !,"a new claim, or you can split each individual charge into a new"
W !,"claim. The pages available for splitting are 8D Medications,"
W !,"8E Laboratory, 8F Radiology, or 8H HCPCS."
W !!,"NOTE: This option does NOT split claims that have a Service"
W !,"Category of Hospitalization (H) or In Hospital (I)."
W !!,"For example, if you have an outpatient visit with three medications"
W !,"and the setup is done so each charge is on its own claim, you will end"
W !,"up with"
W !,"4 claims --> 1 with the E&M code"
W !," --> 3 with one medication each"
W !!,"A different example, if you have an outpatient visit with four labs"
W !,"and the setup is for a page to be on its own claim, you will end up with"
W !,"2 claims --> 1 with the E&M code"
W !," --> 1 with all four lab codes"
W !!,"NOTE: all prompts are required"
W !
S DIR(0)="Y",DIR("A")="Do you wish to continue" D ^DIR K DIR
I 'Y Q ;quit if they say NO
SEL2 ;EP
D INS ;select insurer(s)
I +$G(ABMY("INS"))=0 Q ;no insurer was selected
SEL3 ;EP
D INSCHK ;check if this insurer already has something setup and display if so.
I +$G(ABMIFLG)=1 D ;ABMIFLG means this insurer has something setup - display it
.S ABMEFLG=1
.I $P(Y,U,3)'=1 D ;not a new entry; display what we found and ask add/term an existing entry
..S DIR(0)="S^A:ADD;T:TERMINATE"
..S DIR("A")="Add or Terminate Entry?"
..S DIR("B")="A"
..D ^DIR K DIR
..Q:$D(DUOUT)!$D(DTOUT)!$D(DIROUT)!$D(DIRUT)
..S ABMANS=Y
..I ((ABMANS="T")&(ABMICNT>1)) D ;multiple entries - pick which one to end (that's the only edit option)
...D ^XBFMK
...S DIR(0)="NO^1:"_ABMICNT
...W !!
...S DIR("A",1)="Entries that are already terminated can't be terminated again"
...S DIR("A")="Terminate which entry?"
...D ^DIR
...Q:$D(DUOUT)!$D(DTOUT)!$D(DIROUT)!$D(DIRUT)
...Q:+Y<0
...S ABMENTR=+Y
...I +$P($G(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMENTR,0)),U,4)'=0 W !!,"That entry has already been terminated and is therefore unselectable.",! H 1 K ABMANS S ABMEFLG=0
..Q:$D(DUOUT)!$D(DTOUT)!$D(DIROUT)!$D(DIRUT)
..I ABMICNT=1 S ABMENTR=1
..I $G(ABMANS)="T" D END
Q:$D(DUOUT)!$D(DTOUT)!$D(DIROUT)!$D(DIRUT)
I +$G(ABMEFLG)=0&($G(ABMIFLG)=1) Q
;
D PGS ;what pages do you want to split (8D, 8E, 8F, 8H, 8Z)
I '$D(ABMY("PGS")) Q ;no pages were selected
D PGCK ;check if insurer/page combination already exists
I ABMPGCK=1 D G SEL2
.W !!,"That insurer/page combination has already been setup."
.W !,"If you need to change something you'll need to term the"
.W !,"Existing setup and create a new entry."
.H 1
D SDT ;select visit or approval date range
I '$D(ABMY("DT",1)) Q ;no dates were entered
D SPLITHOW ;split
I '$D(ABMY("SPLITHOW")) Q ;no split option was selected
;
D DISPLAY
;
W !!
D ^XBFMK
S DIR(0)="Y",DIR("A")="Do you wish to continue" D ^DIR K DIR
Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)!$D(DIRUT)
I 'Y G SEL2 ;start over if they say NO
D SAVE ;save what they setup
Q
INS ;EP
K ABMY("INS")
W !!,"Insurers selected here MUST be the active insurer in order for claims/bills"
W !,"to use this setup!",!
D ^XBFMK
S DIC="^AUTNINS("
S DIC(0)="QEAMZ"
D ^DIC
Q:+Y<0
;check if the insurer they selected is merged
I $$GET1^DIQ(9999999.18,+Y,".27","E")'="" D Q:(+Y<1)!$D(DUOUT)!$D(DTOUT)!$D(DIROUT)!$D(DIRUT)
.W !!!,"The insurer you selected has been merged into insurer "_$$GET1^DIQ(9999999.18,+Y,".27","E")
.S ABMITMP=+Y
.D ^XBFMK
.S DIR(0)="Y",DIR("A")="Do you wish to continue" D ^DIR K DIR
.Q:+Y<1
.S Y=ABMITMP
S ABMY("INS")=+Y
Q:$$GET1^DIQ(9999999.181,$$GET1^DIQ(9999999.18,+ABMY("INS"),".211","I"),1,"I")'="R" ;stop here if not Medicare FI insurer type
W !!,"You selected a MEDICARE FI insurer type",!
S DIR(0)="Y",DIR("A")="Do you really wish to continue" D ^DIR K DIR
I 'Y Q ;exit if they say NO, don't continue
Q
INSCHK ;EP
K ABMIFLG
S ABMICNT=0
Q:+$O(^ABMNINS(DUZ(2),ABMY("INS"),6,0))=0 ;quit because no entries exist
S ABMIFLG=1
W !!,"There is already data setup for that insurer:"
W !!,"#",?4,"PAGE",?9,"START DT",?20,"SPLIT CLAIM HOW",?37,"END DATE",?50,"CREATED",?61,"BY",?68,"ENDED",?77,"BY"
S ABMI=0
F S ABMI=$O(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMI)) Q:'ABMI D
.S ABMREC=$G(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMI,0))
.S ABMPG=$P(ABMREC,U) ;page to split
.S ABMSDT=$P(ABMREC,U,2) ;start date
.S ABMSPLHW=$P(ABMREC,U,3) ;split claim how
.S ABMEDT=$P(ABMREC,U,4) ;end date
.S ABMCRDT=$P(ABMREC,U,5) ;entry created on
.S ABMCRU=$P(ABMREC,U,6) ;entry created by
.S ABMENDDT=$P(ABMREC,U,7) ;end date was entered on
.S ABMENDDU=$P(ABMREC,U,8) ;entry created by
.W !,ABMI,?5,ABMPG
.W ?9,$$SDTO^ABMDUTL(ABMSDT)
.W ?21,$S(ABMSPLHW=1:"1 Clm/CHRG",ABMSPLHW=2:"1 Clm/PAGE",1:"Don't split")
.W:ABMEDT ?37,$$SDTO^ABMDUTL(ABMEDT)
.;
.W ?50,$$SDTO^ABMDUTL(ABMCRDT)
.W ?61,$P($G(^VA(200,ABMCRU,0)),U,2)
.W:ABMENDDT ?66,$$SDTO^ABMDUTL(ABMENDDT)
.W:ABMENDDU ?77,$P($G(^VA(200,ABMENDDU,0)),U,2)
.S ABMICNT=+$G(ABMICNT)+1
W !
Q
SDT ;EP
W !,"Enter a start date. The DOS on a claim will be compared to this date"
W !,"to determine if it should be split or not. Claims with a DOS prior"
W !,"to this date will not split."
S DIR("A")="Enter START date"
S DIR(0)="DO^::EP"
D ^DIR
Q:$D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)
S ABMY("DT",1)=Y
Q
PGS ;
S ABMSTRG=""
K ABMY("PGS")
S DIR(0)="SO^8D:MEDICATIONS;8E:LABORATORY;8F:RADIOLOGY;8H:HCPCS"
S DIR("A")="Move Which Section(s)? "
D ^DIR
Q:'Y
S ABMY("PGS")="^"_Y_"^"
Q
PGCK ;EP
S ABMPGCK=0
S ABMY("PGCK")=$TR(ABMY("PGS"),"^")
S ABMICK=0
F S ABMICK=$O(^ABMNINS(DUZ(2),ABMY("INS"),6,"B",ABMY("PGCK"),ABMICK)) Q:'ABMICK D
.Q:$P($G(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMICK,0)),U,4)'="" ;there's an end date on it
.S ABMPGCK=1
Q
SPLITHOW ;EP
K ABMY("SPLITHOW")
S DIR(0)="SO^C:Yes, 1 Claim for each CHARGE;P:Yes, 1 Claim for each PAGE;N:No, don't split the claim"
S DIR("A")="Split the claim? "
S DIR("B")="N"
D ^DIR
Q:$G(Y)=""
Q:$D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)
S ABMY("SPLITHOW")=$S(Y="C":1,Y="P":2,1:0)
Q
DISPLAY ;EP
W !!,"You selected: "
W !?11,"Insurer: ",$P($G(^AUTNINS(ABMY("INS"),0)),U)
W !?8,"Start Date: ",$$SDT^ABMDUTL(ABMY("DT",1))
W !?8,"Split page: ",$TR(ABMY("PGS"),"^","")_" "_$S(ABMY("PGS")["8D":"MEDICATIONS",ABMY("PGS")["8E":"LABORATORY",ABMY("PGS")["8F":"RADIOLOGY",ABMY("PGS")["8H":"HCPCS",1:"")
W !?3,"Split claim how: "_$S(ABMY("SPLITHOW")=1:"1 Claim for each CHARGE",ABMY("SPLITHOW")=2:"1 Claim for each PAGE",1:"No, don't split the claim")
Q
SAVE ;EP
W !!,"Saving setup.."
K DIC,DIE,DA,DR,X,Y
S DA(1)=ABMY("INS")
S X=$TR(ABMY("PGS"),"^")
S DIC="^ABMNINS("_DUZ(2)_","_DA(1)_",6,"
S DIC("P")=$P(^DD(9002274.09,6,0),U,2)
S DIC(0)="LX"
S DIC("DR")=".02////"_ABMY("DT",1) ;start date for this split entry
S DIC("DR")=DIC("DR")_";.03///"_ABMY("SPLITHOW") ;1 chg/clm or 1 pg/clm
S DIC("DR")=DIC("DR")_";.05///NOW" ;entry created date
S DIC("DR")=DIC("DR")_";.06////"_DUZ ;who created
K DD,DO
D FILE^DICN
I Y<0 W !!,"Entry not saved."
D PAZ^ABMDRUTL
Q
END ;EP
S ABMEFLG=0
K DIC,DIE,DIR,DA,DR,X,Y
S DIR(0)="DO^"_$P($G(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMENTR,0)),U,2)
S DIR("A",1)="End date must be ON or AFTER the start date for this entry"
S DIR("A")="END DATE"
D ^DIR
I $D(DIRUT)!$D(DIROUT)!$D(DTOUT)!$D(DUOUT) Q
I +Y<1
S ABMEDT=+Y ;end date
K DIC,DIE,DIR,DA,DR,X,Y
S DIR(0)="Y"
S DIR("A")="Are you sure you wish to terminate this entry"
S DIR("B")="N"
D ^DIR
I +Y<1 W !!,"Entry not terminated." H 1 Q
;
;save entry
W !!,"Saving setup.."
S DA(1)=ABMY("INS")
S DA=ABMENTR
S DIE="^ABMNINS("_DUZ(2)_","_DA(1)_",6,"
S DR=".04////"_ABMEDT ;end date
S DR=DR_";.07///NOW;.08////"_DUZ ;end date entered on and by whom
D ^DIE
D PAZ^ABMDRUTL
Q
ABMRSCIN ; IHS/SD/SDR - Setup option to split claims in claim generator;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**22**;NOV 12, 2009;Build 418
+2 ;IHS/SD/SDR 2.6*22 HEAT335246 - New routine
+3 ;
+4 QUIT
START ;
+1 ;Routine used to get data
SET ABMP("RTN")="ABMRSCIN"
+2 SET ABMMENU="Split claim setup for claim generator"
SEL ;
+1 KILL ABMY,ABM
+2 KILL DTOUT,DIRUT,DUOUT,DIROUT
+3 IF $DATA(ABMY("RTYP"))
SET ABM("HD",0)=ABMY("RTYP","NM")_" "_ABMMENU
+4 IF '$TEST
SET ABM("HD",0)=ABMMENU
+5 WRITE !!,"This option allows sites to have claims automatically split into"
+6 WRITE !,"multiple claims for billing. The split will occur when the claim"
+7 WRITE !,"generator runs. You can split each page of the claim editor into"
+8 WRITE !,"a new claim, or you can split each individual charge into a new"
+9 WRITE !,"claim. The pages available for splitting are 8D Medications,"
+10 WRITE !,"8E Laboratory, 8F Radiology, or 8H HCPCS."
+11 WRITE !!,"NOTE: This option does NOT split claims that have a Service"
+12 WRITE !,"Category of Hospitalization (H) or In Hospital (I)."
+13 WRITE !!,"For example, if you have an outpatient visit with three medications"
+14 WRITE !,"and the setup is done so each charge is on its own claim, you will end"
+15 WRITE !,"up with"
+16 WRITE !,"4 claims --> 1 with the E&M code"
+17 WRITE !," --> 3 with one medication each"
+18 WRITE !!,"A different example, if you have an outpatient visit with four labs"
+19 WRITE !,"and the setup is for a page to be on its own claim, you will end up with"
+20 WRITE !,"2 claims --> 1 with the E&M code"
+21 WRITE !," --> 1 with all four lab codes"
+22 WRITE !!,"NOTE: all prompts are required"
+23 WRITE !
+24 SET DIR(0)="Y"
SET DIR("A")="Do you wish to continue"
DO ^DIR
KILL DIR
+25 ;quit if they say NO
IF 'Y
QUIT
SEL2 ;EP
+1 ;select insurer(s)
DO INS
+2 ;no insurer was selected
IF +$GET(ABMY("INS"))=0
QUIT
SEL3 ;EP
+1 ;check if this insurer already has something setup and display if so.
DO INSCHK
+2 ;ABMIFLG means this insurer has something setup - display it
IF +$GET(ABMIFLG)=1
Begin DoDot:1
+3 SET ABMEFLG=1
+4 ;not a new entry; display what we found and ask add/term an existing entry
IF $PIECE(Y,U,3)'=1
Begin DoDot:2
+5 SET DIR(0)="S^A:ADD;T:TERMINATE"
+6 SET DIR("A")="Add or Terminate Entry?"
+7 SET DIR("B")="A"
+8 DO ^DIR
KILL DIR
+9 IF $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIROUT)!$DATA(DIRUT)
QUIT
+10 SET ABMANS=Y
+11 ;multiple entries - pick which one to end (that's the only edit option)
IF ((ABMANS="T")&(ABMICNT>1))
Begin DoDot:3
+12 DO ^XBFMK
+13 SET DIR(0)="NO^1:"_ABMICNT
+14 WRITE !!
+15 SET DIR("A",1)="Entries that are already terminated can't be terminated again"
+16 SET DIR("A")="Terminate which entry?"
+17 DO ^DIR
+18 IF $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIROUT)!$DATA(DIRUT)
QUIT
+19 IF +Y<0
QUIT
+20 SET ABMENTR=+Y
+21 IF +$PIECE($GET(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMENTR,0)),U,4)'=0
WRITE !!,"That entry has already been terminated and is therefore unselectable.",!
HANG 1
KILL ABMANS
SET ABMEFLG=0
End DoDot:3
+22 IF $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIROUT)!$DATA(DIRUT)
QUIT
+23 IF ABMICNT=1
SET ABMENTR=1
+24 IF $GET(ABMANS)="T"
DO END
End DoDot:2
End DoDot:1
+25 IF $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIROUT)!$DATA(DIRUT)
QUIT
+26 IF +$GET(ABMEFLG)=0&($GET(ABMIFLG)=1)
QUIT
+27 ;
+28 ;what pages do you want to split (8D, 8E, 8F, 8H, 8Z)
DO PGS
+29 ;no pages were selected
IF '$DATA(ABMY("PGS"))
QUIT
+30 ;check if insurer/page combination already exists
DO PGCK
+31 IF ABMPGCK=1
Begin DoDot:1
+32 WRITE !!,"That insurer/page combination has already been setup."
+33 WRITE !,"If you need to change something you'll need to term the"
+34 WRITE !,"Existing setup and create a new entry."
+35 HANG 1
End DoDot:1
GOTO SEL2
+36 ;select visit or approval date range
DO SDT
+37 ;no dates were entered
IF '$DATA(ABMY("DT",1))
QUIT
+38 ;split
DO SPLITHOW
+39 ;no split option was selected
IF '$DATA(ABMY("SPLITHOW"))
QUIT
+40 ;
+41 DO DISPLAY
+42 ;
+43 WRITE !!
+44 DO ^XBFMK
+45 SET DIR(0)="Y"
SET DIR("A")="Do you wish to continue"
DO ^DIR
KILL DIR
+46 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)!$DATA(DIRUT)
QUIT
+47 ;start over if they say NO
IF 'Y
GOTO SEL2
+48 ;save what they setup
DO SAVE
+49 QUIT
INS ;EP
+1 KILL ABMY("INS")
+2 WRITE !!,"Insurers selected here MUST be the active insurer in order for claims/bills"
+3 WRITE !,"to use this setup!",!
+4 DO ^XBFMK
+5 SET DIC="^AUTNINS("
+6 SET DIC(0)="QEAMZ"
+7 DO ^DIC
+8 IF +Y<0
QUIT
+9 ;check if the insurer they selected is merged
+10 IF $$GET1^DIQ(9999999.18,+Y,".27","E")'=""
Begin DoDot:1
+11 WRITE !!!,"The insurer you selected has been merged into insurer "_$$GET1^DIQ(9999999.18,+Y,".27","E")
+12 SET ABMITMP=+Y
+13 DO ^XBFMK
+14 SET DIR(0)="Y"
SET DIR("A")="Do you wish to continue"
DO ^DIR
KILL DIR
+15 IF +Y<1
QUIT
+16 SET Y=ABMITMP
End DoDot:1
IF (+Y<1)!$DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIROUT)!$DATA(DIRUT)
QUIT
+17 SET ABMY("INS")=+Y
+18 ;stop here if not Medicare FI insurer type
IF $$GET1^DIQ(9999999.181,$$GET1^DIQ(9999999.18,+ABMY("INS"),".211","I"),1,"I")'="R"
QUIT
+19 WRITE !!,"You selected a MEDICARE FI insurer type",!
+20 SET DIR(0)="Y"
SET DIR("A")="Do you really wish to continue"
DO ^DIR
KILL DIR
+21 ;exit if they say NO, don't continue
IF 'Y
QUIT
+22 QUIT
INSCHK ;EP
+1 KILL ABMIFLG
+2 SET ABMICNT=0
+3 ;quit because no entries exist
IF +$ORDER(^ABMNINS(DUZ(2),ABMY("INS"),6,0))=0
QUIT
+4 SET ABMIFLG=1
+5 WRITE !!,"There is already data setup for that insurer:"
+6 WRITE !!,"#",?4,"PAGE",?9,"START DT",?20,"SPLIT CLAIM HOW",?37,"END DATE",?50,"CREATED",?61,"BY",?68,"ENDED",?77,"BY"
+7 SET ABMI=0
+8 FOR
SET ABMI=$ORDER(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMI))
IF 'ABMI
QUIT
Begin DoDot:1
+9 SET ABMREC=$GET(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMI,0))
+10 ;page to split
SET ABMPG=$PIECE(ABMREC,U)
+11 ;start date
SET ABMSDT=$PIECE(ABMREC,U,2)
+12 ;split claim how
SET ABMSPLHW=$PIECE(ABMREC,U,3)
+13 ;end date
SET ABMEDT=$PIECE(ABMREC,U,4)
+14 ;entry created on
SET ABMCRDT=$PIECE(ABMREC,U,5)
+15 ;entry created by
SET ABMCRU=$PIECE(ABMREC,U,6)
+16 ;end date was entered on
SET ABMENDDT=$PIECE(ABMREC,U,7)
+17 ;entry created by
SET ABMENDDU=$PIECE(ABMREC,U,8)
+18 WRITE !,ABMI,?5,ABMPG
+19 WRITE ?9,$$SDTO^ABMDUTL(ABMSDT)
+20 WRITE ?21,$SELECT(ABMSPLHW=1:"1 Clm/CHRG",ABMSPLHW=2:"1 Clm/PAGE",1:"Don't split")
+21 IF ABMEDT
WRITE ?37,$$SDTO^ABMDUTL(ABMEDT)
+22 ;
+23 WRITE ?50,$$SDTO^ABMDUTL(ABMCRDT)
+24 WRITE ?61,$PIECE($GET(^VA(200,ABMCRU,0)),U,2)
+25 IF ABMENDDT
WRITE ?66,$$SDTO^ABMDUTL(ABMENDDT)
+26 IF ABMENDDU
WRITE ?77,$PIECE($GET(^VA(200,ABMENDDU,0)),U,2)
+27 SET ABMICNT=+$GET(ABMICNT)+1
End DoDot:1
+28 WRITE !
+29 QUIT
SDT ;EP
+1 WRITE !,"Enter a start date. The DOS on a claim will be compared to this date"
+2 WRITE !,"to determine if it should be split or not. Claims with a DOS prior"
+3 WRITE !,"to this date will not split."
+4 SET DIR("A")="Enter START date"
+5 SET DIR(0)="DO^::EP"
+6 DO ^DIR
+7 IF $DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)
QUIT
+8 SET ABMY("DT",1)=Y
+9 QUIT
PGS ;
+1 SET ABMSTRG=""
+2 KILL ABMY("PGS")
+3 SET DIR(0)="SO^8D:MEDICATIONS;8E:LABORATORY;8F:RADIOLOGY;8H:HCPCS"
+4 SET DIR("A")="Move Which Section(s)? "
+5 DO ^DIR
+6 IF 'Y
QUIT
+7 SET ABMY("PGS")="^"_Y_"^"
+8 QUIT
PGCK ;EP
+1 SET ABMPGCK=0
+2 SET ABMY("PGCK")=$TRANSLATE(ABMY("PGS"),"^")
+3 SET ABMICK=0
+4 FOR
SET ABMICK=$ORDER(^ABMNINS(DUZ(2),ABMY("INS"),6,"B",ABMY("PGCK"),ABMICK))
IF 'ABMICK
QUIT
Begin DoDot:1
+5 ;there's an end date on it
IF $PIECE($GET(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMICK,0)),U,4)'=""
QUIT
+6 SET ABMPGCK=1
End DoDot:1
+7 QUIT
SPLITHOW ;EP
+1 KILL ABMY("SPLITHOW")
+2 SET DIR(0)="SO^C:Yes, 1 Claim for each CHARGE;P:Yes, 1 Claim for each PAGE;N:No, don't split the claim"
+3 SET DIR("A")="Split the claim? "
+4 SET DIR("B")="N"
+5 DO ^DIR
+6 IF $GET(Y)=""
QUIT
+7 IF $DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)
QUIT
+8 SET ABMY("SPLITHOW")=$SELECT(Y="C":1,Y="P":2,1:0)
+9 QUIT
DISPLAY ;EP
+1 WRITE !!,"You selected: "
+2 WRITE !?11,"Insurer: ",$PIECE($GET(^AUTNINS(ABMY("INS"),0)),U)
+3 WRITE !?8,"Start Date: ",$$SDT^ABMDUTL(ABMY("DT",1))
+4 WRITE !?8,"Split page: ",$TRANSLATE(ABMY("PGS"),"^","")_" "_$SELECT(ABMY("PGS")["8D":"MEDICATIONS",ABMY("PGS")["8E":"LABORATORY",ABMY("PGS")["8F":"RADIOLOGY",ABMY("PGS")["8H":"HCPCS",1:"")
+5 WRITE !?3,"Split claim how: "_$SELECT(ABMY("SPLITHOW")=1:"1 Claim for each CHARGE",ABMY("SPLITHOW")=2:"1 Claim for each PAGE",1:"No, don't split the claim")
+6 QUIT
SAVE ;EP
+1 WRITE !!,"Saving setup.."
+2 KILL DIC,DIE,DA,DR,X,Y
+3 SET DA(1)=ABMY("INS")
+4 SET X=$TRANSLATE(ABMY("PGS"),"^")
+5 SET DIC="^ABMNINS("_DUZ(2)_","_DA(1)_",6,"
+6 SET DIC("P")=$PIECE(^DD(9002274.09,6,0),U,2)
+7 SET DIC(0)="LX"
+8 ;start date for this split entry
SET DIC("DR")=".02////"_ABMY("DT",1)
+9 ;1 chg/clm or 1 pg/clm
SET DIC("DR")=DIC("DR")_";.03///"_ABMY("SPLITHOW")
+10 ;entry created date
SET DIC("DR")=DIC("DR")_";.05///NOW"
+11 ;who created
SET DIC("DR")=DIC("DR")_";.06////"_DUZ
+12 KILL DD,DO
+13 DO FILE^DICN
+14 IF Y<0
WRITE !!,"Entry not saved."
+15 DO PAZ^ABMDRUTL
+16 QUIT
END ;EP
+1 SET ABMEFLG=0
+2 KILL DIC,DIE,DIR,DA,DR,X,Y
+3 SET DIR(0)="DO^"_$PIECE($GET(^ABMNINS(DUZ(2),ABMY("INS"),6,ABMENTR,0)),U,2)
+4 SET DIR("A",1)="End date must be ON or AFTER the start date for this entry"
+5 SET DIR("A")="END DATE"
+6 DO ^DIR
+7 IF $DATA(DIRUT)!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)
QUIT
+8 IF +Y<1
+9 ;end date
SET ABMEDT=+Y
+10 KILL DIC,DIE,DIR,DA,DR,X,Y
+11 SET DIR(0)="Y"
+12 SET DIR("A")="Are you sure you wish to terminate this entry"
+13 SET DIR("B")="N"
+14 DO ^DIR
+15 IF +Y<1
WRITE !!,"Entry not terminated."
HANG 1
QUIT
+16 ;
+17 ;save entry
+18 WRITE !!,"Saving setup.."
+19 SET DA(1)=ABMY("INS")
+20 SET DA=ABMENTR
+21 SET DIE="^ABMNINS("_DUZ(2)_","_DA(1)_",6,"
+22 ;end date
SET DR=".04////"_ABMEDT
+23 ;end date entered on and by whom
SET DR=DR_";.07///NOW;.08////"_DUZ
+24 DO ^DIE
+25 DO PAZ^ABMDRUTL
+26 QUIT