- ABPAEEC1 ;ENTER/EDT/PVT INS CLAIMS - PART 2; [ 07/09/91 11:21 AM ]
- ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
- Q ;;NOT AN ENTRY POINT
- WRITE F ABPAJ=3:1 Q:$P(ABPATEXT,";",ABPAJ)="" D
- .S @("P"_ABPAJ)=$P(ABPATEXT,";",ABPAJ)
- W ! S DX=P5,DY=P6 S:IOST["QUME" DY=DY+1 X XY
- W P3,$J(P4,22) W:$D(ABPAEOL)=1 @(ABPAEOL)
- I $D(P7)=1 W " " W:$D(@P7)=1 @P7
- Q
- ;
- REVON S DX=0,DY=19 W ! X XY D EOP^ABPAMAIN W:IOST["QUME" !
- W:$D(ABPARON) @(ABPARON)
- Q
- ;
- SCREEN S ABPAHD1="ENTER/EDIT CLAIM DATA" D HEADER^ABPAMAIN
- F ABPAI=1:1 S ABPATEXT=$T(PROMPT+ABPAI) Q:ABPATEXT="" D WRITE
- W !,ABPALL
- Q
- ;
- EDIT D REVON W "Select FIELD NUMBER to edit (4 - 8)"
- W:$D(ABPARON)=1 @(ABPAROFF)
- R !,"FIELD NUMBER: ",ABPAI:DTIME I $T=0!(ABPAI["^")!(ABPAI="") G XIT
- I ABPAI["?" D G EDIT
- .W " -- ENTER A NUMBER BETWEEN 4 AND 8" H 3
- I +ABPAI>0&(+ABPAI<4) D G EDIT
- .W *7," -- SORRY, YOU ARE NOT ALLOWED TO CHANGE THIS FIELD" H 3
- I +ABPAI=0!(+ABPAI>8) D G EDIT
- .W *7," -- INVAILID SELECTION" H 3
- S LBL="FLD"_+ABPAI K DIC,DIE,DA,DR,X,Y D @LBL
- G EDIT
- ;
- FLD4 S DA(1)=+ABPATDFN,DA=+ABPACDFN,DIE="^ABPVAO("_DA(1)_",1,",DR=.01
- S DIE("NO^")="" D REVON W "Enter the DATE OF SERVICE being billed"
- W:$D(ABPARON)=1 @(ABPAROFF)
- D ^DIE K DIC S DIC="^ABPVAO("_DA(1)_",1,",DIC(0)="Z"
- W:$D(ABPARON)=1 @(ABPAROFF)
- D ^DIC S ABPADOS=Y(0,0)
- D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+4) D WRITE
- Q
- ;
- FLD5 S DA(1)=+ABPATDFN,DA=+ABPACDFN,DIE="^ABPVAO("_DA(1)_",1,",DR=.04
- S DIE("NO^")="" D REVON
- S ABPAMESS="VISIT TYPE - ""O"", ""I"", ""P"", or ""D""" W ABPAMESS
- W:$D(ABPARON)=1 @(ABPAROFF)
- D ^DIE S ABPATYPE=X
- I ABPATYPE="O" D
- .S ABPATYPE="OUTPATIENT",DR=".05////1" D ^DIE S ABPADV=1
- S:ABPATYPE="I" ABPATYPE="INPATIENT (HOSPITAL ONLY)"
- I ABPATYPE="P" D
- .S ABPATYPE="INPATIENT (PHYSICIAN ONLY)",DR=".05////0" D ^DIE
- .S ABPADV=0
- I ABPATYPE="D" D
- .S ABPATYPE="DENTAL",DR=".05////1" D ^DIE S ABPADV=1
- D:$Y>21 SCREEN S ABPATEXT=$T(PROMPT+5) D WRITE
- I ABPATYPE["HOSPITAL" G FLD6
- S ABPATEXT=$T(PROMPT+6) D WRITE
- Q
- ;
- FLD6 I ABPATYPE["PHYSICIAN" D Q
- .W *7," - Cannot edit in-patient physician workload " H 3
- I ABPATYPE["OUTPATIENT" D Q
- .W *7," - Cannot edit out-patient workload " H 3
- I ABPATYPE["DENTAL" D Q
- .W *7," - Cannot edit dental workload " H 3
- S DA(1)=+ABPATDFN,DA=+ABPACDFN,DIE="^ABPVAO("_DA(1)_",1,",DR=.05
- S DIE("NO^")="" D REVON
- W "Number of outpatient VISITS or inpatient DAYS (0 - 50)"
- W:$D(ABPARON) @(ABPAROFF)
- D ^DIE S ABPADV=X
- I ((ABPATYPE["INPATIENT")!(ABPATYPE["DENTAL"))&(+ABPADV'>0) D G FLD6
- .W *7," - Workload must be greater than zero " H 3
- D:$Y>21 SCREEN S ABPATEXT=$T(PROMPT+6) D WRITE
- Q
- ;
- FLD7 S DA(1)=+ABPATDFN,DA=+ABPACDFN,DIE="^ABPVAO("_DA(1)_",1,",DR=.06
- S DIE("NO^")="" D REVON
- W "Name of the INSURANCE COMPANY being billed"
- W:$D(ABPARON)=1 @(ABPAROFF)
- D ^DIE S ABPAINS=X,ABPAINS=$P(^AUTNINS(+ABPAINS,0),"^")
- S DR=.062 D ^DIE S ABPAPHNM=X
- S DR=.064 D ^DIE S ABPAPNUM=X
- D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+7) D WRITE
- Q
- ;
- FLD8 S DA(1)=+ABPATDFN,DA=+ABPACDFN,DIE="^ABPVAO("_DA(1)_",1,",DR=.07
- S DIE("NO^")="" D REVON
- W "Enter the dollar AMOUNT being claimed (0 - 99999)"
- W:$D(ABPARON)=1 @(ABPAROFF) D ^DIE
- S ABPAAMT="$"_$J(X,8,2) D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+8) D WRITE
- Q
- ;
- FLD9 S DA(1)=+ABPATDFN,DA=+ABPACDFN,DIE="^ABPVAO("_DA(1)_",1,",DR=".11R~T"
- S DIE("NO^")="" D REVON
- W "Enter the date of the BILL LOG where this bill can be found"
- W:$D(ABPARON)=1 @(ABPAROFF) D ^DIE S DR=".115///"_X D ^DIE
- Q
- ;
- XIT G START^ABPAEEC0
- ;
- PROMPT ;;FLD #;TITLE;X-POSITION;Y-POSITION;VARIABLE NAME
- ;;(1) ;Patient Name:;7;8;ABPAPNAM
- ;;(2) ;Facility:;7;9;ABPAFAC
- ;;(3) ;Health Record Number:;7;10;ABPAHRN
- ;;(4) ;Date of Service:;7;11;ABPADOS
- ;;(5) ;Visit Type:;7;12;ABPATYPE
- ;;(6) ;Days or Visits:;7;13;ABPADV
- ;;(7) ;Insurance Company:;7;14;ABPAINS
- ;; (a);Policy Holder Name:;7;15;ABPAPHNM
- ;; (b);Policy Number:;7;16;ABPAPNUM
- ;;(8) ;Claim Amount:;7;17;ABPAAMT
- ABPAEEC1 ;ENTER/EDT/PVT INS CLAIMS - PART 2; [ 07/09/91 11:21 AM ]
- +1 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
- +2 ;;NOT AN ENTRY POINT
- QUIT
- WRITE FOR ABPAJ=3:1
- IF $PIECE(ABPATEXT,";",ABPAJ)=""
- QUIT
- Begin DoDot:1
- +1 SET @("P"_ABPAJ)=$PIECE(ABPATEXT,";",ABPAJ)
- End DoDot:1
- +2 WRITE !
- SET DX=P5
- SET DY=P6
- IF IOST["QUME"
- SET DY=DY+1
- XECUTE XY
- +3 WRITE P3,$JUSTIFY(P4,22)
- IF $DATA(ABPAEOL)=1
- WRITE @(ABPAEOL)
- +4 IF $DATA(P7)=1
- WRITE " "
- IF $DATA(@P7)=1
- WRITE @P7
- +5 QUIT
- +6 ;
- REVON SET DX=0
- SET DY=19
- WRITE !
- XECUTE XY
- DO EOP^ABPAMAIN
- IF IOST["QUME"
- WRITE !
- +1 IF $DATA(ABPARON)
- WRITE @(ABPARON)
- +2 QUIT
- +3 ;
- SCREEN SET ABPAHD1="ENTER/EDIT CLAIM DATA"
- DO HEADER^ABPAMAIN
- +1 FOR ABPAI=1:1
- SET ABPATEXT=$TEXT(PROMPT+ABPAI)
- IF ABPATEXT=""
- QUIT
- DO WRITE
- +2 WRITE !,ABPALL
- +3 QUIT
- +4 ;
- EDIT DO REVON
- WRITE "Select FIELD NUMBER to edit (4 - 8)"
- +1 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- +2 READ !,"FIELD NUMBER: ",ABPAI:DTIME
- IF $TEST=0!(ABPAI["^")!(ABPAI="")
- GOTO XIT
- +3 IF ABPAI["?"
- Begin DoDot:1
- +4 WRITE " -- ENTER A NUMBER BETWEEN 4 AND 8"
- HANG 3
- End DoDot:1
- GOTO EDIT
- +5 IF +ABPAI>0&(+ABPAI<4)
- Begin DoDot:1
- +6 WRITE *7," -- SORRY, YOU ARE NOT ALLOWED TO CHANGE THIS FIELD"
- HANG 3
- End DoDot:1
- GOTO EDIT
- +7 IF +ABPAI=0!(+ABPAI>8)
- Begin DoDot:1
- +8 WRITE *7," -- INVAILID SELECTION"
- HANG 3
- End DoDot:1
- GOTO EDIT
- +9 SET LBL="FLD"_+ABPAI
- KILL DIC,DIE,DA,DR,X,Y
- DO @LBL
- +10 GOTO EDIT
- +11 ;
- FLD4 SET DA(1)=+ABPATDFN
- SET DA=+ABPACDFN
- SET DIE="^ABPVAO("_DA(1)_",1,"
- SET DR=.01
- +1 SET DIE("NO^")=""
- DO REVON
- WRITE "Enter the DATE OF SERVICE being billed"
- +2 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- +3 DO ^DIE
- KILL DIC
- SET DIC="^ABPVAO("_DA(1)_",1,"
- SET DIC(0)="Z"
- +4 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- +5 DO ^DIC
- SET ABPADOS=Y(0,0)
- +6 IF $Y>3
- DO SCREEN
- SET ABPATEXT=$TEXT(PROMPT+4)
- DO WRITE
- +7 QUIT
- +8 ;
- FLD5 SET DA(1)=+ABPATDFN
- SET DA=+ABPACDFN
- SET DIE="^ABPVAO("_DA(1)_",1,"
- SET DR=.04
- +1 SET DIE("NO^")=""
- DO REVON
- +2 SET ABPAMESS="VISIT TYPE - ""O"", ""I"", ""P"", or ""D"""
- WRITE ABPAMESS
- +3 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- +4 DO ^DIE
- SET ABPATYPE=X
- +5 IF ABPATYPE="O"
- Begin DoDot:1
- +6 SET ABPATYPE="OUTPATIENT"
- SET DR=".05////1"
- DO ^DIE
- SET ABPADV=1
- End DoDot:1
- +7 IF ABPATYPE="I"
- SET ABPATYPE="INPATIENT (HOSPITAL ONLY)"
- +8 IF ABPATYPE="P"
- Begin DoDot:1
- +9 SET ABPATYPE="INPATIENT (PHYSICIAN ONLY)"
- SET DR=".05////0"
- DO ^DIE
- +10 SET ABPADV=0
- End DoDot:1
- +11 IF ABPATYPE="D"
- Begin DoDot:1
- +12 SET ABPATYPE="DENTAL"
- SET DR=".05////1"
- DO ^DIE
- SET ABPADV=1
- End DoDot:1
- +13 IF $Y>21
- DO SCREEN
- SET ABPATEXT=$TEXT(PROMPT+5)
- DO WRITE
- +14 IF ABPATYPE["HOSPITAL"
- GOTO FLD6
- +15 SET ABPATEXT=$TEXT(PROMPT+6)
- DO WRITE
- +16 QUIT
- +17 ;
- FLD6 IF ABPATYPE["PHYSICIAN"
- Begin DoDot:1
- +1 WRITE *7," - Cannot edit in-patient physician workload "
- HANG 3
- End DoDot:1
- QUIT
- +2 IF ABPATYPE["OUTPATIENT"
- Begin DoDot:1
- +3 WRITE *7," - Cannot edit out-patient workload "
- HANG 3
- End DoDot:1
- QUIT
- +4 IF ABPATYPE["DENTAL"
- Begin DoDot:1
- +5 WRITE *7," - Cannot edit dental workload "
- HANG 3
- End DoDot:1
- QUIT
- +6 SET DA(1)=+ABPATDFN
- SET DA=+ABPACDFN
- SET DIE="^ABPVAO("_DA(1)_",1,"
- SET DR=.05
- +7 SET DIE("NO^")=""
- DO REVON
- +8 WRITE "Number of outpatient VISITS or inpatient DAYS (0 - 50)"
- +9 IF $DATA(ABPARON)
- WRITE @(ABPAROFF)
- +10 DO ^DIE
- SET ABPADV=X
- +11 IF ((ABPATYPE["INPATIENT")!(ABPATYPE["DENTAL"))&(+ABPADV'>0)
- Begin DoDot:1
- +12 WRITE *7," - Workload must be greater than zero "
- HANG 3
- End DoDot:1
- GOTO FLD6
- +13 IF $Y>21
- DO SCREEN
- SET ABPATEXT=$TEXT(PROMPT+6)
- DO WRITE
- +14 QUIT
- +15 ;
- FLD7 SET DA(1)=+ABPATDFN
- SET DA=+ABPACDFN
- SET DIE="^ABPVAO("_DA(1)_",1,"
- SET DR=.06
- +1 SET DIE("NO^")=""
- DO REVON
- +2 WRITE "Name of the INSURANCE COMPANY being billed"
- +3 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- +4 DO ^DIE
- SET ABPAINS=X
- SET ABPAINS=$PIECE(^AUTNINS(+ABPAINS,0),"^")
- +5 SET DR=.062
- DO ^DIE
- SET ABPAPHNM=X
- +6 SET DR=.064
- DO ^DIE
- SET ABPAPNUM=X
- +7 IF $Y>3
- DO SCREEN
- SET ABPATEXT=$TEXT(PROMPT+7)
- DO WRITE
- +8 QUIT
- +9 ;
- FLD8 SET DA(1)=+ABPATDFN
- SET DA=+ABPACDFN
- SET DIE="^ABPVAO("_DA(1)_",1,"
- SET DR=.07
- +1 SET DIE("NO^")=""
- DO REVON
- +2 WRITE "Enter the dollar AMOUNT being claimed (0 - 99999)"
- +3 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- DO ^DIE
- +4 SET ABPAAMT="$"_$JUSTIFY(X,8,2)
- IF $Y>3
- DO SCREEN
- SET ABPATEXT=$TEXT(PROMPT+8)
- DO WRITE
- +5 QUIT
- +6 ;
- FLD9 SET DA(1)=+ABPATDFN
- SET DA=+ABPACDFN
- SET DIE="^ABPVAO("_DA(1)_",1,"
- SET DR=".11R~T"
- +1 SET DIE("NO^")=""
- DO REVON
- +2 WRITE "Enter the date of the BILL LOG where this bill can be found"
- +3 IF $DATA(ABPARON)=1
- WRITE @(ABPAROFF)
- DO ^DIE
- SET DR=".115///"_X
- DO ^DIE
- +4 QUIT
- +5 ;
- XIT GOTO START^ABPAEEC0
- +1 ;
- PROMPT ;;FLD #;TITLE;X-POSITION;Y-POSITION;VARIABLE NAME
- +1 ;;(1) ;Patient Name:;7;8;ABPAPNAM
- +2 ;;(2) ;Facility:;7;9;ABPAFAC
- +3 ;;(3) ;Health Record Number:;7;10;ABPAHRN
- +4 ;;(4) ;Date of Service:;7;11;ABPADOS
- +5 ;;(5) ;Visit Type:;7;12;ABPATYPE
- +6 ;;(6) ;Days or Visits:;7;13;ABPADV
- +7 ;;(7) ;Insurance Company:;7;14;ABPAINS
- +8 ;; (a);Policy Holder Name:;7;15;ABPAPHNM
- +9 ;; (b);Policy Number:;7;16;ABPAPNUM
- +10 ;;(8) ;Claim Amount:;7;17;ABPAAMT