ABPVEEC1 ;ENTER/EDIT PVT INS CLAIMS - PART 2; [ 06/06/91 8:34 AM ]
;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
Q ;;NOT AN ENTRY POINT
WRITE F ABPVJ=3:1 Q:$P(ABPVTEXT,";",ABPVJ)="" D
.S @("P"_ABPVJ)=$P(ABPVTEXT,";",ABPVJ)
W ! S DX=P5,DY=P6 S:IOST["QUME" DY=DY+1 X XY W P3,$J(P4,22)
I $D(P7)=1 W " " W:$D(@P7)=1 @P7
Q
;
REVON S DX=0,DY=18 W ! X XY D EOP^ABPVZMM
W:$D(ABPVRON) @(ABPVRON)
Q
;
SCREEN S ABPV("HD",1)=ABPVTLE,ABPV("HD",2)="Enter/Edit Claim"
I $D(ABPVCDFN)=1 D
.S ABPV("HD",2)=ABPV("HD",2)_" #"_$P(^ABPVFAC(ABPVCDFN,0),"^")
D ^ABPVHD
F ABPVI=1:1 S ABPVTEXT=$T(PROMPT+ABPVI) Q:ABPVTEXT="" D WRITE
W !,ABPVLL,!
Q
;
EDIT I ABPVTXDT D G XIT
.D REVON W "Claim exported on "
.S Y=ABPVTXDT X ^DD("DD") W Y,@ABPVROFF
.D PAUSE^ABPVZMM
D REVON W "Select FIELD NUMBER to edit (4 - 8)"
W:$D(ABPVRON)=1 @(ABPVROFF)
R !,"FIELD NUMBER: ",ABPVI:DTIME I $T=0!(ABPVI["^")!(ABPVI="") G XIT
I ABPVI["?" D G EDIT
.W " -- ENTER A NUMBER BETWEEN 4 AND 8" H 3
I +ABPVI>0&(+ABPVI<4) D G EDIT
.W *7," -- SORRY, YOU ARE NOT ALLOWED TO CHANGE THIS FIELD" H 3
I +ABPVI=0!(+ABPVI>8) D G EDIT
.W *7," -- INVAILID SELECTION" H 3
S LBL="FLD"_+ABPVI K DIC,DIE,DA,DR,X,Y D @LBL
G EDIT
;
FLD4 S DA=+ABPVCDFN,DIE="^ABPVFAC(",DR=2
S DIE("NO^")="" D REVON W "Enter the DATE OF SERVICE being billed"
W:$D(ABPVRON)=1 @(ABPVROFF)
D ^DIE K DIC S DIC="^ABPVFAC(",DIC(0)="Z"
W:$D(ABPVRON)=1 @(ABPVROFF)
D ^DIC I +X>0 S ABPVDOS=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
D:$Y>21 SCREEN S ABPVTEXT=$T(PROMPT+4) D WRITE
Q
;
FLD5 S DA=+ABPVCDFN,DIE="^ABPVFAC(",DR=5
S DIE("NO^")="" D REVON
S ABPVMESS="VISIT TYPE - ""O"", ""I"", ""P"", or ""D""" W ABPVMESS
W:$D(ABPVRON)=1 @(ABPVROFF)
D ^DIE S ABPVTYPE=X
I ABPVTYPE="O" D
.S ABPVTYPE="OUTPATIENT",DR="6////1" D ^DIE S ABPVDV=1
S:ABPVTYPE="I" ABPVTYPE="INPATIENT (HOSPITAL ONLY)"
I ABPVTYPE="P" D
.S ABPVTYPE="INPATIENT (PHYSICIAN ONLY)",DR="6////0" D ^DIE
.S ABPVDV=0
I ABPVTYPE="D" D
.S ABPVTYPE="DENTAL",DR="6////1" D ^DIE S ABPVDV=1
D:$Y>21 SCREEN S ABPVTEXT=$T(PROMPT+5) D WRITE
I ABPVTYPE["HOSPITAL" G FLD6
S ABPVTEXT=$T(PROMPT+6) D WRITE
Q
;
FLD6 I ABPVTYPE["PHYSICIAN" D Q
.W *7," - Cannot edit in-patient physician workload " H 3
I ABPVTYPE["OUTPATIENT" D Q
.W *7," - Cannot edit out-patient workload " H 3
I ABPVTYPE["DENTAL" D Q
.W *7," - Cannot edit dental workload " H 3
S DA=+ABPVCDFN,DIE="^ABPVFAC(",DR=6
S DIE("NO^")="" D REVON
W "Number of outpatient VISITS or inpatient DAYS (0 - 50)"
W:$D(ABPVRON) @(ABPVROFF)
D ^DIE S ABPVDV=X
I ((ABPVTYPE["INPATIENT")!(ABPVTYPE["DENTAL"))&(+ABPVDV'>0) D G FLD6
.W *7," - Workload must be greater than zero " H 3
D:$Y>21 SCREEN S ABPVTEXT=$T(PROMPT+6) D WRITE
Q
;
FLD7 S DA=+ABPVCDFN,DIE="^ABPVFAC(",DR=7
S DIE("NO^")="" D REVON
W "Name of the INSURANCE COMPANY being billed"
W:$D(ABPVRON)=1 @(ABPVROFF)
D ^DIE S ABPVINS=X,ABPVINS=$P(^AUTNINS(+ABPVINS,0),"^")
S DR=7.03 D ^DIE S ABPVPHNM=X,DR=7.05 D ^DIE S ABPVPNUM=X
D:$Y>3 SCREEN S ABPVTEXT=$T(PROMPT+7) D WRITE
Q
;
FLD8 S DA=+ABPVCDFN,DIE="^ABPVFAC(",DR=8
S DIE("NO^")="" D REVON
W "Enter the dollar AMOUNT being claimed (0 - 99999)"
W:$D(ABPVRON)=1 @(ABPVROFF) D ^DIE S ABPVAMT="$"_$J(X,8,2)
D:$Y>21 SCREEN S ABPVTEXT=$T(PROMPT+10) D WRITE
Q
;
XIT G MAIN^ABPVEEC0
;
PROMPT ;;FLD #;TITLE;X-POSITION;Y-POSITION;VARIABLE NAME
;;(1) ;Patient Name:;7;7;ABPVPNAM
;;(2) ;Facility:;7;8;ABPVFAC
;;(3) ;Health Record Number:;7;9;ABPVHRN
;;(4) ;Date of Service:;7;10;ABPVDOS
;;(5) ;Visit Type:;7;11;ABPVTYPE
;;(6) ;Days or Visits:;7;12;ABPVDV
;;(7) ;Insurance Company:;7;13;ABPVINS
;; (a);Policy Holder Name:;7;14;ABPVPHNM
;; (b);Policy Number:;7;15;ABPVPNUM
;;(8) ;Claim Amount:;7;16;ABPVAMT
ABPVEEC1 ;ENTER/EDIT PVT INS CLAIMS - PART 2; [ 06/06/91 8:34 AM ]
+1 ;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
+2 ;;NOT AN ENTRY POINT
QUIT
WRITE FOR ABPVJ=3:1
IF $PIECE(ABPVTEXT,";",ABPVJ)=""
QUIT
Begin DoDot:1
+1 SET @("P"_ABPVJ)=$PIECE(ABPVTEXT,";",ABPVJ)
End DoDot:1
+2 WRITE !
SET DX=P5
SET DY=P6
IF IOST["QUME"
SET DY=DY+1
XECUTE XY
WRITE P3,$JUSTIFY(P4,22)
+3 IF $DATA(P7)=1
WRITE " "
IF $DATA(@P7)=1
WRITE @P7
+4 QUIT
+5 ;
REVON SET DX=0
SET DY=18
WRITE !
XECUTE XY
DO EOP^ABPVZMM
+1 IF $DATA(ABPVRON)
WRITE @(ABPVRON)
+2 QUIT
+3 ;
SCREEN SET ABPV("HD",1)=ABPVTLE
SET ABPV("HD",2)="Enter/Edit Claim"
+1 IF $DATA(ABPVCDFN)=1
Begin DoDot:1
+2 SET ABPV("HD",2)=ABPV("HD",2)_" #"_$PIECE(^ABPVFAC(ABPVCDFN,0),"^")
End DoDot:1
+3 DO ^ABPVHD
+4 FOR ABPVI=1:1
SET ABPVTEXT=$TEXT(PROMPT+ABPVI)
IF ABPVTEXT=""
QUIT
DO WRITE
+5 WRITE !,ABPVLL,!
+6 QUIT
+7 ;
EDIT IF ABPVTXDT
Begin DoDot:1
+1 DO REVON
WRITE "Claim exported on "
+2 SET Y=ABPVTXDT
XECUTE ^DD("DD")
WRITE Y,@ABPVROFF
+3 DO PAUSE^ABPVZMM
End DoDot:1
GOTO XIT
+4 DO REVON
WRITE "Select FIELD NUMBER to edit (4 - 8)"
+5 IF $DATA(ABPVRON)=1
WRITE @(ABPVROFF)
+6 READ !,"FIELD NUMBER: ",ABPVI:DTIME
IF $TEST=0!(ABPVI["^")!(ABPVI="")
GOTO XIT
+7 IF ABPVI["?"
Begin DoDot:1
+8 WRITE " -- ENTER A NUMBER BETWEEN 4 AND 8"
HANG 3
End DoDot:1
GOTO EDIT
+9 IF +ABPVI>0&(+ABPVI<4)
Begin DoDot:1
+10 WRITE *7," -- SORRY, YOU ARE NOT ALLOWED TO CHANGE THIS FIELD"
HANG 3
End DoDot:1
GOTO EDIT
+11 IF +ABPVI=0!(+ABPVI>8)
Begin DoDot:1
+12 WRITE *7," -- INVAILID SELECTION"
HANG 3
End DoDot:1
GOTO EDIT
+13 SET LBL="FLD"_+ABPVI
KILL DIC,DIE,DA,DR,X,Y
DO @LBL
+14 GOTO EDIT
+15 ;
FLD4 SET DA=+ABPVCDFN
SET DIE="^ABPVFAC("
SET DR=2
+1 SET DIE("NO^")=""
DO REVON
WRITE "Enter the DATE OF SERVICE being billed"
+2 IF $DATA(ABPVRON)=1
WRITE @(ABPVROFF)
+3 DO ^DIE
KILL DIC
SET DIC="^ABPVFAC("
SET DIC(0)="Z"
+4 IF $DATA(ABPVRON)=1
WRITE @(ABPVROFF)
+5 DO ^DIC
IF +X>0
SET ABPVDOS=$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
+6 IF $Y>21
DO SCREEN
SET ABPVTEXT=$TEXT(PROMPT+4)
DO WRITE
+7 QUIT
+8 ;
FLD5 SET DA=+ABPVCDFN
SET DIE="^ABPVFAC("
SET DR=5
+1 SET DIE("NO^")=""
DO REVON
+2 SET ABPVMESS="VISIT TYPE - ""O"", ""I"", ""P"", or ""D"""
WRITE ABPVMESS
+3 IF $DATA(ABPVRON)=1
WRITE @(ABPVROFF)
+4 DO ^DIE
SET ABPVTYPE=X
+5 IF ABPVTYPE="O"
Begin DoDot:1
+6 SET ABPVTYPE="OUTPATIENT"
SET DR="6////1"
DO ^DIE
SET ABPVDV=1
End DoDot:1
+7 IF ABPVTYPE="I"
SET ABPVTYPE="INPATIENT (HOSPITAL ONLY)"
+8 IF ABPVTYPE="P"
Begin DoDot:1
+9 SET ABPVTYPE="INPATIENT (PHYSICIAN ONLY)"
SET DR="6////0"
DO ^DIE
+10 SET ABPVDV=0
End DoDot:1
+11 IF ABPVTYPE="D"
Begin DoDot:1
+12 SET ABPVTYPE="DENTAL"
SET DR="6////1"
DO ^DIE
SET ABPVDV=1
End DoDot:1
+13 IF $Y>21
DO SCREEN
SET ABPVTEXT=$TEXT(PROMPT+5)
DO WRITE
+14 IF ABPVTYPE["HOSPITAL"
GOTO FLD6
+15 SET ABPVTEXT=$TEXT(PROMPT+6)
DO WRITE
+16 QUIT
+17 ;
FLD6 IF ABPVTYPE["PHYSICIAN"
Begin DoDot:1
+1 WRITE *7," - Cannot edit in-patient physician workload "
HANG 3
End DoDot:1
QUIT
+2 IF ABPVTYPE["OUTPATIENT"
Begin DoDot:1
+3 WRITE *7," - Cannot edit out-patient workload "
HANG 3
End DoDot:1
QUIT
+4 IF ABPVTYPE["DENTAL"
Begin DoDot:1
+5 WRITE *7," - Cannot edit dental workload "
HANG 3
End DoDot:1
QUIT
+6 SET DA=+ABPVCDFN
SET DIE="^ABPVFAC("
SET DR=6
+7 SET DIE("NO^")=""
DO REVON
+8 WRITE "Number of outpatient VISITS or inpatient DAYS (0 - 50)"
+9 IF $DATA(ABPVRON)
WRITE @(ABPVROFF)
+10 DO ^DIE
SET ABPVDV=X
+11 IF ((ABPVTYPE["INPATIENT")!(ABPVTYPE["DENTAL"))&(+ABPVDV'>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 ABPVTEXT=$TEXT(PROMPT+6)
DO WRITE
+14 QUIT
+15 ;
FLD7 SET DA=+ABPVCDFN
SET DIE="^ABPVFAC("
SET DR=7
+1 SET DIE("NO^")=""
DO REVON
+2 WRITE "Name of the INSURANCE COMPANY being billed"
+3 IF $DATA(ABPVRON)=1
WRITE @(ABPVROFF)
+4 DO ^DIE
SET ABPVINS=X
SET ABPVINS=$PIECE(^AUTNINS(+ABPVINS,0),"^")
+5 SET DR=7.03
DO ^DIE
SET ABPVPHNM=X
SET DR=7.05
DO ^DIE
SET ABPVPNUM=X
+6 IF $Y>3
DO SCREEN
SET ABPVTEXT=$TEXT(PROMPT+7)
DO WRITE
+7 QUIT
+8 ;
FLD8 SET DA=+ABPVCDFN
SET DIE="^ABPVFAC("
SET DR=8
+1 SET DIE("NO^")=""
DO REVON
+2 WRITE "Enter the dollar AMOUNT being claimed (0 - 99999)"
+3 IF $DATA(ABPVRON)=1
WRITE @(ABPVROFF)
DO ^DIE
SET ABPVAMT="$"_$JUSTIFY(X,8,2)
+4 IF $Y>21
DO SCREEN
SET ABPVTEXT=$TEXT(PROMPT+10)
DO WRITE
+5 QUIT
+6 ;
XIT GOTO MAIN^ABPVEEC0
+1 ;
PROMPT ;;FLD #;TITLE;X-POSITION;Y-POSITION;VARIABLE NAME
+1 ;;(1) ;Patient Name:;7;7;ABPVPNAM
+2 ;;(2) ;Facility:;7;8;ABPVFAC
+3 ;;(3) ;Health Record Number:;7;9;ABPVHRN
+4 ;;(4) ;Date of Service:;7;10;ABPVDOS
+5 ;;(5) ;Visit Type:;7;11;ABPVTYPE
+6 ;;(6) ;Days or Visits:;7;12;ABPVDV
+7 ;;(7) ;Insurance Company:;7;13;ABPVINS
+8 ;; (a);Policy Holder Name:;7;14;ABPVPHNM
+9 ;; (b);Policy Number:;7;15;ABPVPNUM
+10 ;;(8) ;Claim Amount:;7;16;ABPVAMT