ABMDRSEL ; IHS/ASDST/DMJ - Selective Report Parameters ;
;;2.6;IHS 3P BILLING SYSTEM;**3,4,14,21**;NOV 12, 2009;Build 379
;Original;TMD;07/14/95 12:23 PM
;
;IHS/SD/SDR - v2.5 p8 - Added code for cancelling official
;IHS/SD/SDR,TPB - v2.5 p8 - Added code for pending status (12)
;IHS/SD/SDR - v2.5 p10 - IM20566 - Fix for <UNDEF>PRINT+13^ABMDRST1
;
;IHS/SD/SDR - 2.6*4 - NO HEAT - Fixed closed/exported dates
;IHS/SD/SDR - 2.6*14 - ICD10 009 - Added code for ICD-10 prompts
;IHS/SD/SDR 2.6*14 - HEAT165197 (CR3109) - Made it so a range of alphanumeric codes can be selected.
;IHS/SD/SDR - 2.6*21 - HEAT186137 - Fixed pending report so user can select all visit types and still pick specific reasons
;IHS/SD/SDR - 2.6*21 - HEAT241429 - Added code to not ask ELIGIBILITY STATUS
;
K DIC,DIR,ABMY
S U="^"
S ABMY("X")="W $$SDT^ABMDUTL(X)"
I $D(ABM("APPR")) S ABMY("APPR")=ABM("APPR")
I $D(ABM("CANC")) S ABMY("CANC")=ABM("CANC")
I $D(ABM("CLOS")) S ABMY("CLOS")=ABM("CLOS") ;Closed
I $D(ABM("OVER-DUE")) D
.S ABMY("DT")="X"
.I ABM("OVER-DUE")=2 D Q
..S ABMY("DT")="" ;abm*2.6*3 NOHEAT
..S ABMY("DT",1)=$E(DT,1,5)_"01"
..S ABMY("DT",2)=DT
.I ABM("OVER-DUE")=3 D Q
..S ABMY("DT",1)=$S($E(DT,4,5)>10:$E(DT,1,3)_1001,1:($E(DT,1,3)-1)_1001)
..S ABMY("DT",2)=DT
.S X1=DT
.S X2=-30
.D C^%DTC
.S ABMY("DT",2)=X
.S X1=DT
.S X2=-330
.D C^%DTC
.S ABMY("DT",1)=X
.Q
;
LOOP ;
; Display current exclusion parameters
G XIT:$D(DUOUT)!$D(DTOUT)!$D(DIROUT)
W !!?3,"EXCLUSION PARAMETERS Currently in Effect for RESTRICTING the EXPORT to:",!?3,"======================================================================="
I $D(ABMY("LOC")) W !?3,"- Visit Location.....: ",$P(^DIC(4,ABMY("LOC"),0),U)
I $D(ABMY("INS")) W !?3,"- Billing Entity.....: ",$P(^AUTNINS(ABMY("INS"),0),U)
I $D(ABMY("PAT")) W !?3,"- Billing Entity.....: ",$P(^DPT(ABMY("PAT"),0),U)
I $D(ABMY("TYP")) W !?3,"- Billing Entity.....: ",ABMY("TYP","NM")
I $D(ABMY("DT")) D
.;start old code abm*2.6*4 NOHEAT
.;W !?3,"- ",$S(ABMY("DT")="A":"Approval Dates from: ",ABMY("DT")="V":"Visit Dates from...: ",ABMY("DT")="P":"Payment Dates from.: ",ABMY("DT")="C":"Cancellation Dates from:",ABMY("DT")="X":"Closed Dates from:",1:"Export Dates from..: ")
.;end old code start new code NOHEAT
.W !?3,"- ",$S(ABMY("DT")="A":"Approval Dates from: ",ABMY("DT")="V":"Visit Dates from...: ",ABMY("DT")="P":"Payment Dates from.: ",ABMY("DT")="C":"Cancellation Dates from:",ABMY("DT")="M":"Closed Dates from:",1:"Export Dates from..: ")
.;end new code NOHEAT
I S X=ABMY("DT",1) X ABMY("X") W " to: " S X=ABMY("DT",2) X ABMY("X")
I $G(ABMY("STATUS UPDATER"))'="" W !?3,"- Status Updater.....: ",$P($G(^VA(200,$G(ABMY("STATUS UPDATER")),0)),U)
I $D(ABMY("APPR")) W !?3,"- Approving Official.: ",$P(^VA(200,ABMY("APPR"),0),U)
I $D(ABMY("CANC")) W !?3,"- Cancelling Official.: ",$P(^VA(200,ABMY("CANC"),0),U)
I $D(ABMY("CLOS")) W !?3,"- Closing Official.: ",$P(^VA(200,ABMY("CLOS"),0),U) ;Closing
I $D(ABM("STA")) W !?3,"- Claim Status.......: ",ABM("STA","NM")
I $D(ABMY("PRV")) W !?3,"- Provider...........: ",$P(^VA(200,ABMY("PRV"),0),U)
I $G(ABMY("PTYP")) W !?3,"- Eligibility Status.: ",ABMY("PTYP","NM")
;I $D(ABMY("DX")) W !?3,"- Diagnosis Code from: ",ABMY("DX",1)," to: ",ABMY("DX",2)," (",$S($D(ABMY("DX","ALL")):"Check All Diagnosis",1:"Primary Diagnosis Only"),")" ;abm*2.6*14 ICD10 009
I $D(ABMY("DX",1)) W !?3,"- Diagnosis (ICD-9) Code from: ",ABM("DX",1)," to: ",ABM("DX",2)," (",$S($D(ABMY("DX","ALL")):"Check All Diagnosis",1:"Primary Diagnosis Only"),")" ;abm*2.6*14 ICD10 009 and HEAT165197 (CR3109)
I $D(ABMY("DX",3)) W !?3,"- Diagnosis (ICD-10) Code from: ",ABM("DX",3)," to: ",ABM("DX",4)," (",$S($D(ABMY("DX10","ALL")):"Check All Diagnosis",1:"Primary Diagnosis Only"),")" ;abm*2.6*14 ICD10 009 and HEAT165197 (CR3109)
I $D(ABMY("PX")) W !?3,"- CPT Range from.....: ",ABMY("PX",1)," to: ",ABMY("PX",2)
I $G(ABM("RTYP")) W !?3,"- Report Type........: ",ABM("RTYP","NM")
I $G(ABM("RFOR")) W !?3,"- Output Type........: ",ABM("RFOR","NM") ;abm*2.6*21 IHS/SD/SDR HEAT241429
I (+$G(ABM("RFOR"))=2) W !,?7,"Write file to ",ABM("RPATH")_ABM("RFN") ;abm*2.6*21 IHS/SD/SDR HEAT241429
;
PARM ;
; Choose additional exclusion parameters
K DIR
S DIR(0)="SO^1:LOCATION;2:BILLING ENTITY;3:DATE RANGE;4:"
S DIR(0)=DIR(0)_$S($D(ABM("CANC")):"CANCELLING OFFICIAL",$D(ABM("CLOS")):"CLOSING OFFICIAL",($G(ABM("STA"))'="")&($G(ABM("STA"))'="P"):"CLAIM STATUS",$G(ABM("STA"))="P":"STATUS UPDATER",1:"APPROVING OFFICIAL")
;S DIR(0)=DIR(0)_";5:PROVIDER;6:ELIGIBILITY STATUS" ;abm*2.6*21 IHS/SD/SDR HEAT241429
S DIR(0)=DIR(0)_";5:PROVIDER"_$S($D(ABM("NOSTAT")):"",1:";6:ELIGIBILITY STATUS") ;abm*2.6*21 IHS/SD/SDR HEAT241429
S DIR(0)=DIR(0)_$S($D(ABM("RFOR")):";6:OUTPUT TYPE",1:"") ;abm*2.6*21 IHS/SD/SDR HEAT241429
I '$D(ABM("NODX")) S DIR(0)=DIR(0)_";7:DIAGNOSIS RANGE;8:CPT RANGE"
I $G(ABM("RTYP")) S DIR(0)=DIR(0)_";"_$S($D(ABM("NODX")):7,1:9)_":REPORT TYPE"
S DIR("A")="Select ONE or MORE of the above EXCLUSION PARAMETERS"
S DIR("?")="The report can be restricted to one or more of the listed parameters. A parameter can be removed by reselecting it and making a null entry."
D ^DIR
K DIR
G XIT:$D(DIRUT)!$D(DIROUT)
I Y<6 D @($S(Y=1:"LOC",Y=2:"TYP",Y=3:"DT",$G(ABM("STA"))="P"&(Y=4):"INC",Y=5:"PRV",$D(ABM("CANC")):"CANC",$D(ABM("CLOS")):"CLOS",$D(ABM("STA")):"STATUS",1:"APPR")_"^ABMDRSL1") G LOOP ;Closed
I Y=6&($D(ABM("RFOR"))) D RFOR^ABMDRSL2 G LOOP ;abm*2.6*21 IHS/SD/SDR HEAT241429
I Y=6 D PTYP^ABMDRSL2 G LOOP
I '$D(ABM("NODX")) D @($S(Y=7:"DX",Y=8:"PX",1:"RTYP")_"^ABMDRSL2") G LOOP
D RTYP^ABMDRSL2 G LOOP
;
INS ;
W !!?5,"You can RESTRICT the REPORT to either a SPECIFIC INSURER or",!?5,"else a TYPE of INSURER (i.e. PRIVATE INSURANCE, MEDICAID...).",!
S DIR(0)="Y"
S DIR("A")="Restrict Report to a SPECIFIC INSURER (Y/N)"
S DIR("B")="N"
D ^DIR
G XIT:$D(DIRUT)
D @($S(Y=1:"INS",1:"TYP")_"^ABMDRSL1")
I '$D(DTOUT)!'$D(DUOUT)!'$D(DIROUT) G LOOP
;
XIT ;
G XIT2:'$D(ABM("RTYP"))!$D(DIROUT)!$D(DTOUT)!$D(DUOUT)
W !
K DIR
S DIR(0)="SA^C:CLINIC;V:VISIT TYPE"
S DIR("A")="Sort Report by [V]isit Type or [C]linic: "
S DIR("B")="V"
S DIR("?")="Enter 'V' to sort the report by Visit Type (inpatient, outpatient, etc.) or a 'C' to sort it by the Clinic associated with each visit."
D ^DIR
I '$D(DIROUT)&('$D(DIRUT)) D
.S ABMY("SORT")=Y
.I ABMY("SORT")="C" D CLIN,REASON:$D(ABM("REASON")) Q
.;D VTYP,REASON:$D(ABM("REASON"))&($D(ABMY("VTYP"))) ;abm*2.6*21 IHS/SD/SDR HEAT186137
.I ABMY("SORT")="V" D VTYP,REASON:$D(ABM("REASON")) ;abm*2.6*21 IHS/SD/SDR HEAT186137
.Q
;
XIT2 ;
K ABMY("I"),ABMY("X"),DIR
Q
;
CLIN ;SELECT CLINICS
K ABMY("CLIN")
S DIC="^DIC(40.7,"
S DIC(0)="AEMQ"
S DIC("A")="Select Clinic: ALL// "
F D Q:+Y<0
.I $D(ABMY("CLIN")) S DIC("A")="Select Another Clinic: "
.D ^DIC
.Q:+Y<0
.S ABMY("CLIN",+Y)=""
I '$D(ABMY("CLIN")) D
.I $D(DUOUT) K ABMY("SORT") Q
.W "ALL"
K DIC
Q
;
VTYP ;SELECT VISIT TYPES
K ABMY("VTYP")
S DIC="^ABMDVTYP("
S DIC(0)="AEMQ"
S DIC("A")="Select Visit Type: ALL// "
F D Q:+Y<0
.I $D(ABMY("VTYP")) S DIC("A")="Select Another Visit Type: "
.D ^DIC
.Q:+Y<0
.S ABMY("VTYP",+Y)=""
I '$D(ABMY("VTYP")) D
.I $D(DUOUT) K ABMY("SORT") Q
.W "ALL"
K DIC
Q
REASON ; select reasons (for cancelled and pending claim reports)
K ABMY("REASON")
S DIC=$S($G(ABM("REASON"))="PEND":"^ABMPSTAT(",1:"^ABMCCLMR(")
S DIC(0)="AEMQ"
S DIC("A")="Select Reason: ALL// "
F D Q:+Y<0
.I $D(ABMY("REASON")) S DIC("A")="Select Another Reason: "
.D ^DIC
.Q:+Y<0
.S ABMY("REASON",+Y)=""
I '$D(ABMY("REASON")) D
.I $D(DUOUT) K ABMY("SORT") Q
.W "ALL"
K DIC
Q
ABMDRSEL ; IHS/ASDST/DMJ - Selective Report Parameters ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;**3,4,14,21**;NOV 12, 2009;Build 379
+2 ;Original;TMD;07/14/95 12:23 PM
+3 ;
+4 ;IHS/SD/SDR - v2.5 p8 - Added code for cancelling official
+5 ;IHS/SD/SDR,TPB - v2.5 p8 - Added code for pending status (12)
+6 ;IHS/SD/SDR - v2.5 p10 - IM20566 - Fix for <UNDEF>PRINT+13^ABMDRST1
+7 ;
+8 ;IHS/SD/SDR - 2.6*4 - NO HEAT - Fixed closed/exported dates
+9 ;IHS/SD/SDR - 2.6*14 - ICD10 009 - Added code for ICD-10 prompts
+10 ;IHS/SD/SDR 2.6*14 - HEAT165197 (CR3109) - Made it so a range of alphanumeric codes can be selected.
+11 ;IHS/SD/SDR - 2.6*21 - HEAT186137 - Fixed pending report so user can select all visit types and still pick specific reasons
+12 ;IHS/SD/SDR - 2.6*21 - HEAT241429 - Added code to not ask ELIGIBILITY STATUS
+13 ;
+14 KILL DIC,DIR,ABMY
+15 SET U="^"
+16 SET ABMY("X")="W $$SDT^ABMDUTL(X)"
+17 IF $DATA(ABM("APPR"))
SET ABMY("APPR")=ABM("APPR")
+18 IF $DATA(ABM("CANC"))
SET ABMY("CANC")=ABM("CANC")
+19 ;Closed
IF $DATA(ABM("CLOS"))
SET ABMY("CLOS")=ABM("CLOS")
+20 IF $DATA(ABM("OVER-DUE"))
Begin DoDot:1
+21 SET ABMY("DT")="X"
+22 IF ABM("OVER-DUE")=2
Begin DoDot:2
+23 ;abm*2.6*3 NOHEAT
SET ABMY("DT")=""
+24 SET ABMY("DT",1)=$EXTRACT(DT,1,5)_"01"
+25 SET ABMY("DT",2)=DT
End DoDot:2
QUIT
+26 IF ABM("OVER-DUE")=3
Begin DoDot:2
+27 SET ABMY("DT",1)=$SELECT($EXTRACT(DT,4,5)>10:$EXTRACT(DT,1,3)_1001,1:($EXTRACT(DT,1,3)-1)_1001)
+28 SET ABMY("DT",2)=DT
End DoDot:2
QUIT
+29 SET X1=DT
+30 SET X2=-30
+31 DO C^%DTC
+32 SET ABMY("DT",2)=X
+33 SET X1=DT
+34 SET X2=-330
+35 DO C^%DTC
+36 SET ABMY("DT",1)=X
+37 QUIT
End DoDot:1
+38 ;
LOOP ;
+1 ; Display current exclusion parameters
+2 IF $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIROUT)
GOTO XIT
+3 WRITE !!?3,"EXCLUSION PARAMETERS Currently in Effect for RESTRICTING the EXPORT to:",!?3,"======================================================================="
+4 IF $DATA(ABMY("LOC"))
WRITE !?3,"- Visit Location.....: ",$PIECE(^DIC(4,ABMY("LOC"),0),U)
+5 IF $DATA(ABMY("INS"))
WRITE !?3,"- Billing Entity.....: ",$PIECE(^AUTNINS(ABMY("INS"),0),U)
+6 IF $DATA(ABMY("PAT"))
WRITE !?3,"- Billing Entity.....: ",$PIECE(^DPT(ABMY("PAT"),0),U)
+7 IF $DATA(ABMY("TYP"))
WRITE !?3,"- Billing Entity.....: ",ABMY("TYP","NM")
+8 IF $DATA(ABMY("DT"))
Begin DoDot:1
+9 ;start old code abm*2.6*4 NOHEAT
+10 ;W !?3,"- ",$S(ABMY("DT")="A":"Approval Dates from: ",ABMY("DT")="V":"Visit Dates from...: ",ABMY("DT")="P":"Payment Dates from.: ",ABMY("DT")="C":"Cancellation Dates from:",ABMY("DT")="X":"Closed Dates from:",1:"Export Dates from..: ")
+11 ;end old code start new code NOHEAT
+12 WRITE !?3,"- ",$SELECT(ABMY("DT")="A":"Approval Dates from: ",ABMY("DT")="V":"Visit Dates from...: ",ABMY("DT")="P":"Payment Dates from.: ",ABMY("DT")="C":"Cancellation Dates from:",ABMY("DT")="M":"Closed Dates from:",1:"Export Dates fr
om..: ")
+13 ;end new code NOHEAT
End DoDot:1
+14 IF $TEST
SET X=ABMY("DT",1)
XECUTE ABMY("X")
WRITE " to: "
SET X=ABMY("DT",2)
XECUTE ABMY("X")
+15 IF $GET(ABMY("STATUS UPDATER"))'=""
WRITE !?3,"- Status Updater.....: ",$PIECE($GET(^VA(200,$GET(ABMY("STATUS UPDATER")),0)),U)
+16 IF $DATA(ABMY("APPR"))
WRITE !?3,"- Approving Official.: ",$PIECE(^VA(200,ABMY("APPR"),0),U)
+17 IF $DATA(ABMY("CANC"))
WRITE !?3,"- Cancelling Official.: ",$PIECE(^VA(200,ABMY("CANC"),0),U)
+18 ;Closing
IF $DATA(ABMY("CLOS"))
WRITE !?3,"- Closing Official.: ",$PIECE(^VA(200,ABMY("CLOS"),0),U)
+19 IF $DATA(ABM("STA"))
WRITE !?3,"- Claim Status.......: ",ABM("STA","NM")
+20 IF $DATA(ABMY("PRV"))
WRITE !?3,"- Provider...........: ",$PIECE(^VA(200,ABMY("PRV"),0),U)
+21 IF $GET(ABMY("PTYP"))
WRITE !?3,"- Eligibility Status.: ",ABMY("PTYP","NM")
+22 ;I $D(ABMY("DX")) W !?3,"- Diagnosis Code from: ",ABMY("DX",1)," to: ",ABMY("DX",2)," (",$S($D(ABMY("DX","ALL")):"Check All Diagnosis",1:"Primary Diagnosis Only"),")" ;abm*2.6*14 ICD10 009
+23 ;abm*2.6*14 ICD10 009 and HEAT165197 (CR3109)
IF $DATA(ABMY("DX",1))
WRITE !?3,"- Diagnosis (ICD-9) Code from: ",ABM("DX",1)," to: ",ABM("DX",2)," (",$SELECT($DATA(ABMY("DX","ALL")):"Check All Diagnosis",1:"Primary Diagnosis Only"),")"
+24 ;abm*2.6*14 ICD10 009 and HEAT165197 (CR3109)
IF $DATA(ABMY("DX",3))
WRITE !?3,"- Diagnosis (ICD-10) Code from: ",ABM("DX",3)," to: ",ABM("DX",4)," (",$SELECT($DATA(ABMY("DX10","ALL")):"Check All Diagnosis",1:"Primary Diagnosis Only"),")"
+25 IF $DATA(ABMY("PX"))
WRITE !?3,"- CPT Range from.....: ",ABMY("PX",1)," to: ",ABMY("PX",2)
+26 IF $GET(ABM("RTYP"))
WRITE !?3,"- Report Type........: ",ABM("RTYP","NM")
+27 ;abm*2.6*21 IHS/SD/SDR HEAT241429
IF $GET(ABM("RFOR"))
WRITE !?3,"- Output Type........: ",ABM("RFOR","NM")
+28 ;abm*2.6*21 IHS/SD/SDR HEAT241429
IF (+$GET(ABM("RFOR"))=2)
WRITE !,?7,"Write file to ",ABM("RPATH")_ABM("RFN")
+29 ;
PARM ;
+1 ; Choose additional exclusion parameters
+2 KILL DIR
+3 SET DIR(0)="SO^1:LOCATION;2:BILLING ENTITY;3:DATE RANGE;4:"
+4 SET DIR(0)=DIR(0)_$SELECT($DATA(ABM("CANC")):"CANCELLING OFFICIAL",$DATA(ABM("CLOS")):"CLOSING OFFICIAL",($GET(ABM("STA"))'="")&($GET(ABM("STA"))'="P"):"CLAIM STATUS",$GET(ABM("STA"))="P":"STATUS UPDATER",1:"APPROVING OFFICIAL")
+5 ;S DIR(0)=DIR(0)_";5:PROVIDER;6:ELIGIBILITY STATUS" ;abm*2.6*21 IHS/SD/SDR HEAT241429
+6 ;abm*2.6*21 IHS/SD/SDR HEAT241429
SET DIR(0)=DIR(0)_";5:PROVIDER"_$SELECT($DATA(ABM("NOSTAT")):"",1:";6:ELIGIBILITY STATUS")
+7 ;abm*2.6*21 IHS/SD/SDR HEAT241429
SET DIR(0)=DIR(0)_$SELECT($DATA(ABM("RFOR")):";6:OUTPUT TYPE",1:"")
+8 IF '$DATA(ABM("NODX"))
SET DIR(0)=DIR(0)_";7:DIAGNOSIS RANGE;8:CPT RANGE"
+9 IF $GET(ABM("RTYP"))
SET DIR(0)=DIR(0)_";"_$SELECT($DATA(ABM("NODX")):7,1:9)_":REPORT TYPE"
+10 SET DIR("A")="Select ONE or MORE of the above EXCLUSION PARAMETERS"
+11 SET DIR("?")="The report can be restricted to one or more of the listed parameters. A parameter can be removed by reselecting it and making a null entry."
+12 DO ^DIR
+13 KILL DIR
+14 IF $DATA(DIRUT)!$DATA(DIROUT)
GOTO XIT
+15 ;Closed
IF Y<6
DO @($SELECT(Y=1:"LOC",Y=2:"TYP",Y=3:"DT",$GET(ABM("STA"))="P"&(Y=4):"INC",Y=5:"PRV",$DATA(ABM("CANC")):"CANC",$DATA(ABM("CLOS")):"CLOS",$DATA(ABM("STA")):"STATUS",1:"APPR")_"^ABMDRSL1")
GOTO LOOP
+16 ;abm*2.6*21 IHS/SD/SDR HEAT241429
IF Y=6&($DATA(ABM("RFOR")))
DO RFOR^ABMDRSL2
GOTO LOOP
+17 IF Y=6
DO PTYP^ABMDRSL2
GOTO LOOP
+18 IF '$DATA(ABM("NODX"))
DO @($SELECT(Y=7:"DX",Y=8:"PX",1:"RTYP")_"^ABMDRSL2")
GOTO LOOP
+19 DO RTYP^ABMDRSL2
GOTO LOOP
+20 ;
INS ;
+1 WRITE !!?5,"You can RESTRICT the REPORT to either a SPECIFIC INSURER or",!?5,"else a TYPE of INSURER (i.e. PRIVATE INSURANCE, MEDICAID...).",!
+2 SET DIR(0)="Y"
+3 SET DIR("A")="Restrict Report to a SPECIFIC INSURER (Y/N)"
+4 SET DIR("B")="N"
+5 DO ^DIR
+6 IF $DATA(DIRUT)
GOTO XIT
+7 DO @($SELECT(Y=1:"INS",1:"TYP")_"^ABMDRSL1")
+8 IF '$DATA(DTOUT)!'$DATA(DUOUT)!'$DATA(DIROUT)
GOTO LOOP
+9 ;
XIT ;
+1 IF '$DATA(ABM("RTYP"))!$DATA(DIROUT)!$DATA(DTOUT)!$DATA(DUOUT)
GOTO XIT2
+2 WRITE !
+3 KILL DIR
+4 SET DIR(0)="SA^C:CLINIC;V:VISIT TYPE"
+5 SET DIR("A")="Sort Report by [V]isit Type or [C]linic: "
+6 SET DIR("B")="V"
+7 SET DIR("?")="Enter 'V' to sort the report by Visit Type (inpatient, outpatient, etc.) or a 'C' to sort it by the Clinic associated with each visit."
+8 DO ^DIR
+9 IF '$DATA(DIROUT)&('$DATA(DIRUT))
Begin DoDot:1
+10 SET ABMY("SORT")=Y
+11 IF ABMY("SORT")="C"
DO CLIN
IF $DATA(ABM("REASON"))
DO REASON
QUIT
+12 ;D VTYP,REASON:$D(ABM("REASON"))&($D(ABMY("VTYP"))) ;abm*2.6*21 IHS/SD/SDR HEAT186137
+13 ;abm*2.6*21 IHS/SD/SDR HEAT186137
IF ABMY("SORT")="V"
DO VTYP
IF $DATA(ABM("REASON"))
DO REASON
+14 QUIT
End DoDot:1
+15 ;
XIT2 ;
+1 KILL ABMY("I"),ABMY("X"),DIR
+2 QUIT
+3 ;
CLIN ;SELECT CLINICS
+1 KILL ABMY("CLIN")
+2 SET DIC="^DIC(40.7,"
+3 SET DIC(0)="AEMQ"
+4 SET DIC("A")="Select Clinic: ALL// "
+5 FOR
Begin DoDot:1
+6 IF $DATA(ABMY("CLIN"))
SET DIC("A")="Select Another Clinic: "
+7 DO ^DIC
+8 IF +Y<0
QUIT
+9 SET ABMY("CLIN",+Y)=""
End DoDot:1
IF +Y<0
QUIT
+10 IF '$DATA(ABMY("CLIN"))
Begin DoDot:1
+11 IF $DATA(DUOUT)
KILL ABMY("SORT")
QUIT
+12 WRITE "ALL"
End DoDot:1
+13 KILL DIC
+14 QUIT
+15 ;
VTYP ;SELECT VISIT TYPES
+1 KILL ABMY("VTYP")
+2 SET DIC="^ABMDVTYP("
+3 SET DIC(0)="AEMQ"
+4 SET DIC("A")="Select Visit Type: ALL// "
+5 FOR
Begin DoDot:1
+6 IF $DATA(ABMY("VTYP"))
SET DIC("A")="Select Another Visit Type: "
+7 DO ^DIC
+8 IF +Y<0
QUIT
+9 SET ABMY("VTYP",+Y)=""
End DoDot:1
IF +Y<0
QUIT
+10 IF '$DATA(ABMY("VTYP"))
Begin DoDot:1
+11 IF $DATA(DUOUT)
KILL ABMY("SORT")
QUIT
+12 WRITE "ALL"
End DoDot:1
+13 KILL DIC
+14 QUIT
REASON ; select reasons (for cancelled and pending claim reports)
+1 KILL ABMY("REASON")
+2 SET DIC=$SELECT($GET(ABM("REASON"))="PEND":"^ABMPSTAT(",1:"^ABMCCLMR(")
+3 SET DIC(0)="AEMQ"
+4 SET DIC("A")="Select Reason: ALL// "
+5 FOR
Begin DoDot:1
+6 IF $DATA(ABMY("REASON"))
SET DIC("A")="Select Another Reason: "
+7 DO ^DIC
+8 IF +Y<0
QUIT
+9 SET ABMY("REASON",+Y)=""
End DoDot:1
IF +Y<0
QUIT
+10 IF '$DATA(ABMY("REASON"))
Begin DoDot:1
+11 IF $DATA(DUOUT)
KILL ABMY("SORT")
QUIT
+12 WRITE "ALL"
End DoDot:1
+13 KILL DIC
+14 QUIT