- IBEMTF ;ALB/CPM - FLAG STOP CODES, DISPOSITIONS, AND CLINICS ; 22-JUL-93
- ;;2.0;INTEGRATED BILLING;**167**;21-MAR-94
- ;;Per VHA Directive 10-93-142, this routine should not be modified.
- ;
- EN ; Option entry point - main processing loop.
- ;
- ; per patch ib*2*167, this option no longer valid
- ;
- W !!,"Due to the new Means Test Copayment Tier, this option, is no longer used!",!!
- N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT S DIR(0)="E" D ^DIR
- Q
- ;
- ;
- ;
- S IBQ=0 F D UPD Q:IBQ
- K IBQ
- Q
- ;
- UPD ; Update the billable status for stop codes, dispositions, or clinics.
- W @IOF,*13,?6,"Flag Stop Codes, Dispositions, and Clinics for Means Test Billing"
- W !,$$DASH(),!,"This option is used to set up Clinic Stop Codes, Dispositions, and Clinics"
- W !,"as either non-billable or billable for the Means Test Outpatient Copayment."
- W !!,"Use of this option will have an immediate effect on your billing operations,"
- W !,"so you should have your work pre-planned before using this option.",!,$$DASH()
- ;
- ; - select stop codes, dispositions, or clinics.
- S DIR(0)="SO^S:STOP CODES;D:DISPOSITIONS;C:CLINICS",DIR("?")="^D HSEL^IBEMTF1"
- S DIR("A")="Enter your choice" D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) G UPDQ
- S IBINFO=$T(@Y+1)
- ;
- ; - some help
- W !!,$$DASH(),!,"You may now enter the ",$P(IBINFO,";",3)," that you wish to flag. Please note"
- W !,"all ",$P(IBINFO,";",3)," that you select will be assigned the same effective"
- W !,"date and billable status.",!,$$DASH(),!
- ;
- ; - select all entries to be updated
- S (IBNUM,IBHIT)=0 D UPDQ1 F D Q:Y<0
- .S DIC=$P(IBINFO,";",5),DIC(0)="QEAMZ"
- .S DIC("A")=$S(IBHIT:"Next",1:"Select")_" "_$P(IBINFO,";",4)_": "
- .S:$P(IBINFO,";",6)]"" DIC("S")=$P(IBINFO,";",6)
- .D ^DIC K DIC Q:Y<0 S IBHIT=1
- .I $D(^TMP("IBEMTF",$J,+Y)) W !,"Please note that you've already selected ",Y(0,0),"."
- .E S ^TMP("IBEMTF",$J,+Y)=Y(0,0),IBNUM=IBNUM+1
- ;
- ; - quit if no selections were made.
- I '$D(^TMP("IBEMTF",$J)) W !!,"No ",$P(IBINFO,";",3)," selected!" S IBQ=1 G UPDQ
- ;
- ; - allow review of the selections.
- I IBNUM>1 D REV^IBEMTF1 I IBQ G UPDQ
- ;
- ; - quit if all entries were de-selected (but allow re-start).
- I '$D(^TMP("IBEMTF",$J)) W !!,"All ",$P(IBINFO,";",3)," were de-selected!" G UPDQ
- ;
- ; - should Means Test billing be ignored or activated?
- S DIR(0)="Y",DIR("A")="Ignore Means Test billing for "_$S(IBNUM=1:"this",1:"these")_" "_$P(IBINFO,";",$S(IBNUM=1:7,1:3))
- S DIR("?")="^D HACT^IBEMTF1"
- W ! D ^DIR K DIR G:($D(DIRUT))!($D(DUOUT)) UPDQ
- S IBFILE=+Y,IBACT=$S(IBFILE:"ignore",1:"activate")
- ;
- ; - what is the effective date for this action?
- S %DT="AEX",%DT("A")="Please enter the effective date to "_IBACT_" billing: "
- D ^%DT K %DT G:Y<0 UPDQ S IBDAT=Y
- I Y>DT W !!,"Please note that you've selected a future date!"
- ;
- ; - re-display the list of selected entries.
- W !!,"Action to take => ",IBACT," billing for the following ",$P(IBINFO,";",3),":" D LIST^IBEMTF1 W !
- ;
- ; - okay to proceed and file entries?
- S DIR(0)="Y",DIR("A")="Is it okay to proceed and file these entries"
- S DIR("?")="Enter 'Y' to file these entries, 'N' to try again, or '^' to quit."
- D ^DIR K DIR I 'Y!($D(DIRUT))!($D(DUOUT)) G UPDQ
- ;
- ; - file selected entries.
- W !!,"Filing these ",$P(IBINFO,";",4)," entries... " D FILE^IBEMTF1
- W ! S DIR(0)="E" D ^DIR K DIR,DIRUT,DUOUT
- ;
- UPDQ S:$D(DIRUT)!($D(DUOUT)) IBQ=1
- K DIRUT,DUOUT,DTOUT,DIROUT,IBINFO,IBNUM,IBFILE,IBACT,IBDAT,IBHIT
- UPDQ1 K ^TMP("IBEMTF",$J)
- Q
- ;
- DASH() ; Write a dashed line.
- Q $TR($J("",79)," ","=")
- ;
- INFO ; Description of stop/disposition/clinic information listed below.
- ;;desc (plural);desc (selection);source file root;source screen;desc (sing);dest file root;dest file #
- ;
- S ; Stop Code Information
- ;;clinic stop codes;CLINIC STOP CODE;^DIC(40.7,;I '$P(^(0),U,3);clinic stop code;^IBE(352.3,;352.3
- ;
- D ; Disposition Information
- ;;dispositions;DISPOSITION;^DIC(37,;I '$P(^(0),U,10);disposition;^IBE(352.2,;352.2
- ;
- C ; Clinic Information
- ;;clinics;CLINIC;^SC(;I $P(^(0),U,3)="C";clinic;^IBE(352.4,;352.4
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBEMTF 4106 printed Mar 13, 2025@21:27:03 Page 2
- IBEMTF ;ALB/CPM - FLAG STOP CODES, DISPOSITIONS, AND CLINICS ; 22-JUL-93
- +1 ;;2.0;INTEGRATED BILLING;**167**;21-MAR-94
- +2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
- +3 ;
- EN ; Option entry point - main processing loop.
- +1 ;
- +2 ; per patch ib*2*167, this option no longer valid
- +3 ;
- +4 WRITE !!,"Due to the new Means Test Copayment Tier, this option, is no longer used!",!!
- +5 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
- SET DIR(0)="E"
- DO ^DIR
- +6 QUIT
- +7 ;
- +8 ;
- +9 ;
- +10 SET IBQ=0
- FOR
- DO UPD
- if IBQ
- QUIT
- +11 KILL IBQ
- +12 QUIT
- +13 ;
- UPD ; Update the billable status for stop codes, dispositions, or clinics.
- +1 WRITE @IOF,*13,?6,"Flag Stop Codes, Dispositions, and Clinics for Means Test Billing"
- +2 WRITE !,$$DASH(),!,"This option is used to set up Clinic Stop Codes, Dispositions, and Clinics"
- +3 WRITE !,"as either non-billable or billable for the Means Test Outpatient Copayment."
- +4 WRITE !!,"Use of this option will have an immediate effect on your billing operations,"
- +5 WRITE !,"so you should have your work pre-planned before using this option.",!,$$DASH()
- +6 ;
- +7 ; - select stop codes, dispositions, or clinics.
- +8 SET DIR(0)="SO^S:STOP CODES;D:DISPOSITIONS;C:CLINICS"
- SET DIR("?")="^D HSEL^IBEMTF1"
- +9 SET DIR("A")="Enter your choice"
- DO ^DIR
- KILL DIR
- IF $DATA(DIRUT)!($DATA(DUOUT))
- GOTO UPDQ
- +10 SET IBINFO=$TEXT(@Y+1)
- +11 ;
- +12 ; - some help
- +13 WRITE !!,$$DASH(),!,"You may now enter the ",$PIECE(IBINFO,";",3)," that you wish to flag. Please note"
- +14 WRITE !,"all ",$PIECE(IBINFO,";",3)," that you select will be assigned the same effective"
- +15 WRITE !,"date and billable status.",!,$$DASH(),!
- +16 ;
- +17 ; - select all entries to be updated
- +18 SET (IBNUM,IBHIT)=0
- DO UPDQ1
- FOR
- Begin DoDot:1
- +19 SET DIC=$PIECE(IBINFO,";",5)
- SET DIC(0)="QEAMZ"
- +20 SET DIC("A")=$SELECT(IBHIT:"Next",1:"Select")_" "_$PIECE(IBINFO,";",4)_": "
- +21 if $PIECE(IBINFO,";",6)]""
- SET DIC("S")=$PIECE(IBINFO,";",6)
- +22 DO ^DIC
- KILL DIC
- if Y<0
- QUIT
- SET IBHIT=1
- +23 IF $DATA(^TMP("IBEMTF",$JOB,+Y))
- WRITE !,"Please note that you've already selected ",Y(0,0),"."
- +24 IF '$TEST
- SET ^TMP("IBEMTF",$JOB,+Y)=Y(0,0)
- SET IBNUM=IBNUM+1
- End DoDot:1
- if Y<0
- QUIT
- +25 ;
- +26 ; - quit if no selections were made.
- +27 IF '$DATA(^TMP("IBEMTF",$JOB))
- WRITE !!,"No ",$PIECE(IBINFO,";",3)," selected!"
- SET IBQ=1
- GOTO UPDQ
- +28 ;
- +29 ; - allow review of the selections.
- +30 IF IBNUM>1
- DO REV^IBEMTF1
- IF IBQ
- GOTO UPDQ
- +31 ;
- +32 ; - quit if all entries were de-selected (but allow re-start).
- +33 IF '$DATA(^TMP("IBEMTF",$JOB))
- WRITE !!,"All ",$PIECE(IBINFO,";",3)," were de-selected!"
- GOTO UPDQ
- +34 ;
- +35 ; - should Means Test billing be ignored or activated?
- +36 SET DIR(0)="Y"
- SET DIR("A")="Ignore Means Test billing for "_$SELECT(IBNUM=1:"this",1:"these")_" "_$PIECE(IBINFO,";",$SELECT(IBNUM=1:7,1:3))
- +37 SET DIR("?")="^D HACT^IBEMTF1"
- +38 WRITE !
- DO ^DIR
- KILL DIR
- if ($DATA(DIRUT))!($DATA(DUOUT))
- GOTO UPDQ
- +39 SET IBFILE=+Y
- SET IBACT=$SELECT(IBFILE:"ignore",1:"activate")
- +40 ;
- +41 ; - what is the effective date for this action?
- +42 SET %DT="AEX"
- SET %DT("A")="Please enter the effective date to "_IBACT_" billing: "
- +43 DO ^%DT
- KILL %DT
- if Y<0
- GOTO UPDQ
- SET IBDAT=Y
- +44 IF Y>DT
- WRITE !!,"Please note that you've selected a future date!"
- +45 ;
- +46 ; - re-display the list of selected entries.
- +47 WRITE !!,"Action to take => ",IBACT," billing for the following ",$PIECE(IBINFO,";",3),":"
- DO LIST^IBEMTF1
- WRITE !
- +48 ;
- +49 ; - okay to proceed and file entries?
- +50 SET DIR(0)="Y"
- SET DIR("A")="Is it okay to proceed and file these entries"
- +51 SET DIR("?")="Enter 'Y' to file these entries, 'N' to try again, or '^' to quit."
- +52 DO ^DIR
- KILL DIR
- IF 'Y!($DATA(DIRUT))!($DATA(DUOUT))
- GOTO UPDQ
- +53 ;
- +54 ; - file selected entries.
- +55 WRITE !!,"Filing these ",$PIECE(IBINFO,";",4)," entries... "
- DO FILE^IBEMTF1
- +56 WRITE !
- SET DIR(0)="E"
- DO ^DIR
- KILL DIR,DIRUT,DUOUT
- +57 ;
- UPDQ if $DATA(DIRUT)!($DATA(DUOUT))
- SET IBQ=1
- +1 KILL DIRUT,DUOUT,DTOUT,DIROUT,IBINFO,IBNUM,IBFILE,IBACT,IBDAT,IBHIT
- UPDQ1 KILL ^TMP("IBEMTF",$JOB)
- +1 QUIT
- +2 ;
- DASH() ; Write a dashed line.
- +1 QUIT $TRANSLATE($JUSTIFY("",79)," ","=")
- +2 ;
- INFO ; Description of stop/disposition/clinic information listed below.
- +1 ;;desc (plural);desc (selection);source file root;source screen;desc (sing);dest file root;dest file #
- +2 ;
- S ; Stop Code Information
- +1 ;;clinic stop codes;CLINIC STOP CODE;^DIC(40.7,;I '$P(^(0),U,3);clinic stop code;^IBE(352.3,;352.3
- +2 ;
- D ; Disposition Information
- +1 ;;dispositions;DISPOSITION;^DIC(37,;I '$P(^(0),U,10);disposition;^IBE(352.2,;352.2
- +2 ;
- C ; Clinic Information
- +1 ;;clinics;CLINIC;^SC(;I $P(^(0),U,3)="C";clinic;^IBE(352.4,;352.4
- +2 ;