ABSPOS2B ; IHS/FCS/DRS - ABSPOS2 continuation ;
;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
Q
COM70 N X2,X3 S X3=7,X2=0 G COM
COM60 N X2,X3 S X3=6,X2=0 ; and fall through to COM
COM ; input X, output formatted X, copied from COMMA^%DTC with NEWs added
; X2=# decimal digits opt. followed by "$", X3=len of desired output
; and falls through into L1
N %,%D,%L
I $D(X3) S X3=X3+1 ; make room for the trailing space we'll get rid of
S %D=X<0 S:%D X=-X S %=$S($D(X2):+X2,1:2),X=$J(X,1,%),%=$L(X)-3-$E(23456789,%),%L=$S($D(X3):X3,1:12)
F %=%:-3 Q:$E(X,%)="" S X=$E(X,1,%)_","_$E(X,%+1,99)
S:$D(X2) X=$E("$",X2["$")_X S X=$J($E("(",%D)_X_$E(" )",%D+1),%L)
I $E(X,$L(X))=" " S X=$E(X,1,$L(X)-1)
L1 ; given R=row,C=col,X=string
; Duplicate of L1^ABSPOS2C
D SET^VALM10(R,$$SETSTR^VALM1(X,$G(@VALMAR@(R,0)),C,$L(X)))
I $$VISIBLE(R) D WRITE^VALM10(R)
Q
VISIBLE(R) ;EP -
I $G(NODISPLY) Q 0
;Q 1
I '$G(VALMBG) Q 0
I R<VALMBG Q 0
I R>(VALMBG+(18-3)) Q 0
Q 1
VALUES ;EP - from ABSPOS2
; note! This must correspond with the LABELS code in ABSPOS2C
N R,R1,R2,C,X,X2,X3
N TIME S TIME=CURR("COMM","$$H")-CURR("COMM",2) I 'TIME S TIME=1
S R1=1,CDIV=50
VA001 S R=R1 ;,C=3,X="* * * * * COMMUNICATIONS STATISTICS * * * * *" D L1
S R=R+1 ;,C=9,X="Packets Per min Bytes Per Min" D L1
S R=R+1 ;,C=3,X="Sent" D L1
I $D(CHG("COMM",402)) D
.S C=9,X=CHG("COMM",402),X2=0,X3=7 D COM
I $D(CHG("COMM","$$H"))!$D(CHG("COMM",402)) D
.S C=18,X=CURR("COMM",402)/TIME*60,X2=1,X3=6 D COM
I $D(CHG("COMM",403)) D
.S C=27,X=CHG("COMM",403),X2=0,X3=11 D COM
I $D(CHG("COMM","$$H"))!$D(CHG("COMM",403)) D
.S C=41,X=CURR("COMM",403)/TIME*60,X2=0,X3=7 D COM
;S R=R+1 ;,C=1,X="Rexmit" D L1
VA005 S R=R+1 ;,C=3,X="Recd" D L1
I $D(CHG("COMM",404)) D
.S C=9,X=$G(CHG("COMM",404)),X2=0,X3=7 D COM
I $D(CHG("COMM",404))!$G(CHG("COMM","$$H")) D
.S C=18,X=CURR("COMM",404)/TIME*60,X2=1,X3=6 D COM
I $D(CHG("COMM",405)) D
.S C=27,X=CHG("COMM",405),X2=0,X3=11 D COM
I $D(CHG("COMM",405))!$D(CHG("COMM","$$H")) D
.S C=41,X=CURR("COMM",405)/TIME*60,X2=0,X3=7 D COM
S R=R+1 ;,C=3,X="Total claims" D L1 S C=26,X="Average per min" D L1
I $D(CHG("COMM",200)) D
.S C=16,X=CHG("COMM",200),X2=0,X3=7 D COM
I $D(CHG("COMM",200))!$D(CHG("COMM","$$H")) D
.S C=41,X=CURR("COMM",200)/TIME*60,X2=1,X3=6 D COM
S R=R+1 ;,C=3,X="Average claims per packet" D L1
I $D(CHG("COMM",200))!$D(CHG("COMM",402)) D
.S C=34
.I CURR("COMM",402) S X=CURR("COMM",200)/CURR("COMM",402)
.E S X=0
.S X2=2,X3=5 D COM
S R=R+1 ;,C=3,X="Average seconds per transaction" D L1
I $D(CHG("COMM",501))!$D(CHG("COMM",404)) D
.; Just let Receive packets = transaction count
.S C=34
.I CURR("COMM",404) S X=CURR("COMM",501)/CURR("COMM",404)
.E S X=0
.S X2=2,X3=5 D COM
S R=R+1 ;,C=32,X="Now Average" D L1
VA010 S R=R+1 ;,C=3,X="Packets waiting to be sent" D L1
I $D(CHG("PKTQ","C")) D
.S C=31,X=CHG("PKTQ","C"),X2=0,X3=4 D COM
.; the average would be xxx.x in column C=38,C2=1,X3=5
S R=R+1 ;,C=3,X="Responses waiting for proc" D L1
I $D(CHG("PKTQ","R")) D
.S C=31,X=CHG("PKTQ","R"),X2=0,X3=4 D COM
.; the average would be xxx.x in column C=38,C2=1,X3=5
S R=R+1 ;C=1,X="* * * Transaction Codes * * * Control Chars * * *" D L1
S R=R+1 ;,C=7,X="01" D L1 S C=30,X="Dialing out"
I $D(CHG("COMM",411)) D
.S C=4,X=CHG("COMM",411),X2=0,X3=7 D COM
I $D(CHG("COMM",414)) D
.S C=19,X=CHG("COMM",414),X2=0,X3=7 D COM
I $O(CHG("COMM",599))<700 D ; dialing errors
.N % S X=0,%=602 ; sum dial errors: fields 603-699
.F S %=$O(CURR("COMM",%)) Q:%>699 S X=X+CURR("COMM",%)
.S C=43,X2=0,X3=5 D COM
S R=R+1 ;,C=7,X="02" D L1 S C=30,X="Sending"
I $D(CHG("COMM",412)) D
.S C=4,X=CHG("COMM",412),X2=0,X3=7 D COM
I $D(CHG("COMM",415)) D
.S C=19,X=CHG("COMM",415),X2=0,X3=7 D COM
I $O(CHG("COMM",700))<800 D ; problems around sending time 700-799
.N % S X=0,%=700
.F S %=$O(CURR("COMM",%)) Q:%>799 I %'=702 S X=X+CURR("COMM",%)
.S C=43,X=0,X3=5 D COM
VA015 S R=R+1 ;,C=7,X="03" D L1 S C=30,X="Receiving"
I $D(CHG("COMM",413)) S C=4,X=CHG("COMM",413),X2=0,X3=7 D COM
I $D(CHG("COMM",419)) S C=19,X=CHG("COMM",419),X2=0,X3=7 D COM
I $G(CHG("COMM",799))<900 D
.N % S X=0,%=799 ; sum receive errors: fields 801-899
.F S %=$O(CURR("COMM",%)) Q:%>899 S X=X+CURR("COMM",%)
.S C=43,X2=0,X3=5 D COM
S R=R+1 ; we sent nak
I $D(CHG("COMM",408)) D ; details of responses to nak in #901-999
.S C=43,X=CHG("COMM",408),X2=0,X3=5 D COM
S R=R+1 ;,C=7,X="11",C=11,X="Other" D L1
S R2=R ;,C=CDIV,X="|" F R=R1:1:R2 D L1
VA101 S R=R1 ;,C=CDIV+2,X="* * * CLAIM STATUS * * *" D L1
S R=R+1 ;,C=CDIV+2,X="Waiting to start" D L1
I $D(CHG("STAT",0)) D
.S C=CDIV+20,X=CHG("STAT",0),X2=0,X3=3 D COM
S R=R+1 ;,X="Gathering info" D L1
I $D(CHG("STAT",10)) D
.S C=CDIV+20,X=CHG("STAT",10),X2=0,X3=3 D COM
VA105 S R=R+1 ;,X="Wait packet build" D L1
I $D(CHG("STAT",30)) D
.S C=CDIV+20,X=CHG("STAT",30),X2=0,X3=3 D COM
S R=R+1 ;,X="Building packet" D L1
I $D(CHG("STAT",40)) D
.S C=CDIV+20,X=CHG("STAT",40),X2=0,X3=3 D COM
S R=R+1 ;,X="Wait for transmit" D L1
I $D(CHG("STAT",50)) D
.S C=CDIV+20,X=CHG("STAT",50),X2=0,X3=3 D COM
S R=R+1 ;,X="Transmitting" D L1
I $D(CHG("STAT",60)) D
.S C=CDIV+20,X=CHG("STAT",60),X2=0,X3=3 D COM
S R=R+1 ;,X="Receiv'g response" D L1
I $D(CHG("STAT",70)) D
.S C=CDIV+20,X=CHG("STAT",70),X2=0,X3=3 D COM
VA110 S R=R+1 ;,X="Wait resp process" D L1
I $D(CHG("STAT",80)) D
.S C=CDIV+20,X=CHG("STAT",80),X2=0,X3=3 D COM
S R=R+1 ;,X="Proces'g response" D L1
I $D(CHG("STAT",90)) D
.S C=CDIV+20,X=CHG("STAT",90),X2=0,X3=3 D COM
S R=R+1 ; * CLAIM RESULTS *
S R=R+1 ;,X="Paid claims" D L1
I $D(CHG("COMM",203)) D
.S C=CDIV+1,X=CHG("COMM",203),X2=0,X3=7 D COM
S R=R+1 ;,X="Rejected claims" D L1
I $D(CHG("COMM",202)) D
.S C=CDIV+1,X=CHG("COMM",202),X2=0,X3=7 D COM
S R=R+1 ;,X="Unbillable claims"
I $D(CHG("COMM",201)) D
.S C=CDIV+1,X=CHG("COMM",201),X2=0,X3=7 D COM
VA115 S R=R+1 ;,X="Duplicate claims" D L1
I $D(CHG("COMM",204)) D
.S C=CDIV+1,X=CHG("COMM",204),X2=0,X3=7 D COM
VA116 S R=R+1 ;,X="Captured claims" D L1
I $D(CHG("COMM",205)) D
.S C=CDIV+1,X=CHG("COMM",205),X2=0,X3=7 D COM
;S VALMCNT=$S(R>R2:R,1:R2)
VA200 ; Then line 18 begins "Next screen"
S (R,R1)=17
;S X="***** Communications Problems *****",C=$L(X)/2*-1+80 D L1
N C1 S C1=1+$L("Other errors during dialing")+2,X2=0,X3=4
VA210 S R=R+1 ;,X="* Dialing and Connecting *" D L1
S R=R+1 ;,X="How many times we dialed" D L1
I $D(CHG("COMM",601)) D
.N X2,X3 S C=C1,X=CHG("COMM",601) D COM60
S R=R+1 ;,X="Did not receive CONNECT" D L1
I $D(CHG("COMM",604)) S C=C1,X=CHG("COMM",604) D COM60
S R=R+1 ;,X="Other errors during dialing" D L1
I $D(CHG("COMM",603)) S C=C1,X=CHG("COMM",603) D COM60
S R=R+1
VA220 S R=R+1 ;,X="* Before & After Sending *" D L1
S R=R+1 ;,X="No initial ENQ rec'd" D L1
I $D(CHG("COMM",719)) S C=C1,X=CHG("COMM",719) D COM60
S R=R+1 ;,X="Didn't get STX back" D L1
I $D(CHG("COMM",701)) S C=C1,X=CHG("COMM",701) D COM60
S R=R+1 ;,X="Got ENQ instead" D L1
I $D(CHG("COMM",702)) S C=C1,X=CHG("COMM",702) D COM60
S R=R+1 ;,X="Got NAK instead" D L1
I $D(CHG("COMM",703)) S C=C1,X=CHG("COMM",703) D COM60
S R=R+1 ;,X="Got +++ instead" D L1
I $D(CHG("COMM",704)) S C=C1,X=CHG("COMM",704) D COM60
S R=R+1 ;,X="Got null instead" D L1
I $D(CHG("COMM",705)) S C=C1,X=CHG("COMM",705) D COM60
S R=R+1 ;,X="Got something else" D L1
I $D(CHG("COMM",709)) S C=C1,X=CHG("COMM",709) D COM60
S R2=R,CDIV=40,C=CDIV ;,X="|" F R=R1+1:1:R2 D L1
S R=R1,C1=CDIV+4+$L("Received null during")+1
VA260 S R=R+1 ;,X="* While receiving responses *" D L1
S R=R+1 ;,X="Did not receive ETX" D L1
I $D(CHG("COMM",801)) S X=CHG("COMM",801),C=C1 D COM60
S R=R+1 ;,X="Received EOT during" D L1
I $D(CHG("COMM",802)) S X=CHG("COMM",802),C=C1 D COM60
S R=R+1 ;,X="Received null during" D L1
I $D(CHG("COMM",803)) S X=CHG("COMM",803),C=C1 D COM60
S R=R+1 ;,X="Received +++ during" D L1
I $D(CHG("COMM",804)) S X=CHG("COMM",804),C=C1 D COM60
S R=R+1 ;,X="Miscellaneous" D L1
I $D(CHG("COMM",809)) S X=CHG("COMM",809),C=C1 D COM60
S R=R+1
VA270 S R=R+1 ;,X="* We sent NAK *" D L1
S R=R+1 ;,X="How many times" D L1
I $D(CHG("COMM",408)) S X=CHG("COMM",408),C=C1 D COM60
S R=R+1 ;,X="Got STX back (good)" D L1
I $D(CHG("COMM",902)) S X=CHG("COMM",902),C=C1 D COM60
S R=R+1 ;,X="Got null back" D L1
I $D(CHG("COMM",903)) S X=CHG("COMM",903),C=C1 D COM60
S R=R+1 ;,X="Got +++ back" D L1
I $D(CHG("COMM",904)) S X=CHG("COMM",904),C=C1 D COM60
S R=R+1 ;,X="Got something else" D L1
I $D(CHG("COMM",909)) S X=CHG("COMM",909),C=C1 D COM60
VA300 S (R,R1)=33 ; begin page 3
S C=5
S R=R+1 ;,X="*** Front-end inputs ***" D L1
S R=R+1 ;,X="Total claims submitted" D L1
S X=$G(CHG("COMM",101)) I X]"" D COM70
S R=R+1 ;,X="Unique, first-time ones" D L1
S X=$G(CHG("COMM",102)) I X]"" D COM70
S R=R+1 ;,X,"Repeat submissions" D L1
S X=$G(CHG("COMM",103)) I X]"" D COM70
S R=R+1
S R=R+1 ;,X="*** Finding PCC Visits ***" D L1
S R=R+1 ;,X="Found via PCC link in prescription file" D L1
S X=$G(CHG("COMM",1101)) I X]"" D COM70
S R=R+1 ;,X="Found by patient,date@time ""AA"" index" D L1
S X=$G(CHG("COMM",1102)) I X]"" D COM70
S R=R+1 ;,X="Could not find; created new visit" D L1
S X=$G(CHG("COMM",1103)) I X]"" D COM70
;S VALMCNT=R
K CHG
Q
ABSPOS2B ; IHS/FCS/DRS - ABSPOS2 continuation ;
+1 ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
+2 QUIT
COM70 NEW X2,X3
SET X3=7
SET X2=0
GOTO COM
COM60 ; and fall through to COM
NEW X2,X3
SET X3=6
SET X2=0
COM ; input X, output formatted X, copied from COMMA^%DTC with NEWs added
+1 ; X2=# decimal digits opt. followed by "$", X3=len of desired output
+2 ; and falls through into L1
+3 NEW %,%D,%L
+4 ; make room for the trailing space we'll get rid of
IF $DATA(X3)
SET X3=X3+1
+5 SET %D=X<0
IF %D
SET X=-X
SET %=$SELECT($DATA(X2):+X2,1:2)
SET X=$JUSTIFY(X,1,%)
SET %=$LENGTH(X)-3-$EXTRACT(23456789,%)
SET %L=$SELECT($DATA(X3):X3,1:12)
+6 FOR %=%:-3
IF $EXTRACT(X,%)=""
QUIT
SET X=$EXTRACT(X,1,%)_","_$EXTRACT(X,%+1,99)
+7 IF $DATA(X2)
SET X=$EXTRACT("$",X2["$")_X
SET X=$JUSTIFY($EXTRACT("(",%D)_X_$EXTRACT(" )",%D+1),%L)
+8 IF $EXTRACT(X,$LENGTH(X))=" "
SET X=$EXTRACT(X,1,$LENGTH(X)-1)
L1 ; given R=row,C=col,X=string
+1 ; Duplicate of L1^ABSPOS2C
+2 DO SET^VALM10(R,$$SETSTR^VALM1(X,$GET(@VALMAR@(R,0)),C,$LENGTH(X)))
+3 IF $$VISIBLE(R)
DO WRITE^VALM10(R)
+4 QUIT
VISIBLE(R) ;EP -
+1 IF $GET(NODISPLY)
QUIT 0
+2 ;Q 1
+3 IF '$GET(VALMBG)
QUIT 0
+4 IF R<VALMBG
QUIT 0
+5 IF R>(VALMBG+(18-3))
QUIT 0
+6 QUIT 1
VALUES ;EP - from ABSPOS2
+1 ; note! This must correspond with the LABELS code in ABSPOS2C
+2 NEW R,R1,R2,C,X,X2,X3
+3 NEW TIME
SET TIME=CURR("COMM","$$H")-CURR("COMM",2)
IF 'TIME
SET TIME=1
+4 SET R1=1
SET CDIV=50
VA001 ;,C=3,X="* * * * * COMMUNICATIONS STATISTICS * * * * *" D L1
SET R=R1
+1 ;,C=9,X="Packets Per min Bytes Per Min" D L1
SET R=R+1
+2 ;,C=3,X="Sent" D L1
SET R=R+1
+3 IF $DATA(CHG("COMM",402))
Begin DoDot:1
+4 SET C=9
SET X=CHG("COMM",402)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+5 IF $DATA(CHG("COMM","$$H"))!$DATA(CHG("COMM",402))
Begin DoDot:1
+6 SET C=18
SET X=CURR("COMM",402)/TIME*60
SET X2=1
SET X3=6
DO COM
End DoDot:1
+7 IF $DATA(CHG("COMM",403))
Begin DoDot:1
+8 SET C=27
SET X=CHG("COMM",403)
SET X2=0
SET X3=11
DO COM
End DoDot:1
+9 IF $DATA(CHG("COMM","$$H"))!$DATA(CHG("COMM",403))
Begin DoDot:1
+10 SET C=41
SET X=CURR("COMM",403)/TIME*60
SET X2=0
SET X3=7
DO COM
End DoDot:1
+11 ;S R=R+1 ;,C=1,X="Rexmit" D L1
VA005 ;,C=3,X="Recd" D L1
SET R=R+1
+1 IF $DATA(CHG("COMM",404))
Begin DoDot:1
+2 SET C=9
SET X=$GET(CHG("COMM",404))
SET X2=0
SET X3=7
DO COM
End DoDot:1
+3 IF $DATA(CHG("COMM",404))!$GET(CHG("COMM","$$H"))
Begin DoDot:1
+4 SET C=18
SET X=CURR("COMM",404)/TIME*60
SET X2=1
SET X3=6
DO COM
End DoDot:1
+5 IF $DATA(CHG("COMM",405))
Begin DoDot:1
+6 SET C=27
SET X=CHG("COMM",405)
SET X2=0
SET X3=11
DO COM
End DoDot:1
+7 IF $DATA(CHG("COMM",405))!$DATA(CHG("COMM","$$H"))
Begin DoDot:1
+8 SET C=41
SET X=CURR("COMM",405)/TIME*60
SET X2=0
SET X3=7
DO COM
End DoDot:1
+9 ;,C=3,X="Total claims" D L1 S C=26,X="Average per min" D L1
SET R=R+1
+10 IF $DATA(CHG("COMM",200))
Begin DoDot:1
+11 SET C=16
SET X=CHG("COMM",200)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+12 IF $DATA(CHG("COMM",200))!$DATA(CHG("COMM","$$H"))
Begin DoDot:1
+13 SET C=41
SET X=CURR("COMM",200)/TIME*60
SET X2=1
SET X3=6
DO COM
End DoDot:1
+14 ;,C=3,X="Average claims per packet" D L1
SET R=R+1
+15 IF $DATA(CHG("COMM",200))!$DATA(CHG("COMM",402))
Begin DoDot:1
+16 SET C=34
+17 IF CURR("COMM",402)
SET X=CURR("COMM",200)/CURR("COMM",402)
+18 IF '$TEST
SET X=0
+19 SET X2=2
SET X3=5
DO COM
End DoDot:1
+20 ;,C=3,X="Average seconds per transaction" D L1
SET R=R+1
+21 IF $DATA(CHG("COMM",501))!$DATA(CHG("COMM",404))
Begin DoDot:1
+22 ; Just let Receive packets = transaction count
+23 SET C=34
+24 IF CURR("COMM",404)
SET X=CURR("COMM",501)/CURR("COMM",404)
+25 IF '$TEST
SET X=0
+26 SET X2=2
SET X3=5
DO COM
End DoDot:1
+27 ;,C=32,X="Now Average" D L1
SET R=R+1
VA010 ;,C=3,X="Packets waiting to be sent" D L1
SET R=R+1
+1 IF $DATA(CHG("PKTQ","C"))
Begin DoDot:1
+2 SET C=31
SET X=CHG("PKTQ","C")
SET X2=0
SET X3=4
DO COM
+3 ; the average would be xxx.x in column C=38,C2=1,X3=5
End DoDot:1
+4 ;,C=3,X="Responses waiting for proc" D L1
SET R=R+1
+5 IF $DATA(CHG("PKTQ","R"))
Begin DoDot:1
+6 SET C=31
SET X=CHG("PKTQ","R")
SET X2=0
SET X3=4
DO COM
+7 ; the average would be xxx.x in column C=38,C2=1,X3=5
End DoDot:1
+8 ;C=1,X="* * * Transaction Codes * * * Control Chars * * *" D L1
SET R=R+1
+9 ;,C=7,X="01" D L1 S C=30,X="Dialing out"
SET R=R+1
+10 IF $DATA(CHG("COMM",411))
Begin DoDot:1
+11 SET C=4
SET X=CHG("COMM",411)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+12 IF $DATA(CHG("COMM",414))
Begin DoDot:1
+13 SET C=19
SET X=CHG("COMM",414)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+14 ; dialing errors
IF $ORDER(CHG("COMM",599))<700
Begin DoDot:1
+15 ; sum dial errors: fields 603-699
NEW %
SET X=0
SET %=602
+16 FOR
SET %=$ORDER(CURR("COMM",%))
IF %>699
QUIT
SET X=X+CURR("COMM",%)
+17 SET C=43
SET X2=0
SET X3=5
DO COM
End DoDot:1
+18 ;,C=7,X="02" D L1 S C=30,X="Sending"
SET R=R+1
+19 IF $DATA(CHG("COMM",412))
Begin DoDot:1
+20 SET C=4
SET X=CHG("COMM",412)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+21 IF $DATA(CHG("COMM",415))
Begin DoDot:1
+22 SET C=19
SET X=CHG("COMM",415)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+23 ; problems around sending time 700-799
IF $ORDER(CHG("COMM",700))<800
Begin DoDot:1
+24 NEW %
SET X=0
SET %=700
+25 FOR
SET %=$ORDER(CURR("COMM",%))
IF %>799
QUIT
IF %'=702
SET X=X+CURR("COMM",%)
+26 SET C=43
SET X=0
SET X3=5
DO COM
End DoDot:1
VA015 ;,C=7,X="03" D L1 S C=30,X="Receiving"
SET R=R+1
+1 IF $DATA(CHG("COMM",413))
SET C=4
SET X=CHG("COMM",413)
SET X2=0
SET X3=7
DO COM
+2 IF $DATA(CHG("COMM",419))
SET C=19
SET X=CHG("COMM",419)
SET X2=0
SET X3=7
DO COM
+3 IF $GET(CHG("COMM",799))<900
Begin DoDot:1
+4 ; sum receive errors: fields 801-899
NEW %
SET X=0
SET %=799
+5 FOR
SET %=$ORDER(CURR("COMM",%))
IF %>899
QUIT
SET X=X+CURR("COMM",%)
+6 SET C=43
SET X2=0
SET X3=5
DO COM
End DoDot:1
+7 ; we sent nak
SET R=R+1
+8 ; details of responses to nak in #901-999
IF $DATA(CHG("COMM",408))
Begin DoDot:1
+9 SET C=43
SET X=CHG("COMM",408)
SET X2=0
SET X3=5
DO COM
End DoDot:1
+10 ;,C=7,X="11",C=11,X="Other" D L1
SET R=R+1
+11 ;,C=CDIV,X="|" F R=R1:1:R2 D L1
SET R2=R
VA101 ;,C=CDIV+2,X="* * * CLAIM STATUS * * *" D L1
SET R=R1
+1 ;,C=CDIV+2,X="Waiting to start" D L1
SET R=R+1
+2 IF $DATA(CHG("STAT",0))
Begin DoDot:1
+3 SET C=CDIV+20
SET X=CHG("STAT",0)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+4 ;,X="Gathering info" D L1
SET R=R+1
+5 IF $DATA(CHG("STAT",10))
Begin DoDot:1
+6 SET C=CDIV+20
SET X=CHG("STAT",10)
SET X2=0
SET X3=3
DO COM
End DoDot:1
VA105 ;,X="Wait packet build" D L1
SET R=R+1
+1 IF $DATA(CHG("STAT",30))
Begin DoDot:1
+2 SET C=CDIV+20
SET X=CHG("STAT",30)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+3 ;,X="Building packet" D L1
SET R=R+1
+4 IF $DATA(CHG("STAT",40))
Begin DoDot:1
+5 SET C=CDIV+20
SET X=CHG("STAT",40)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+6 ;,X="Wait for transmit" D L1
SET R=R+1
+7 IF $DATA(CHG("STAT",50))
Begin DoDot:1
+8 SET C=CDIV+20
SET X=CHG("STAT",50)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+9 ;,X="Transmitting" D L1
SET R=R+1
+10 IF $DATA(CHG("STAT",60))
Begin DoDot:1
+11 SET C=CDIV+20
SET X=CHG("STAT",60)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+12 ;,X="Receiv'g response" D L1
SET R=R+1
+13 IF $DATA(CHG("STAT",70))
Begin DoDot:1
+14 SET C=CDIV+20
SET X=CHG("STAT",70)
SET X2=0
SET X3=3
DO COM
End DoDot:1
VA110 ;,X="Wait resp process" D L1
SET R=R+1
+1 IF $DATA(CHG("STAT",80))
Begin DoDot:1
+2 SET C=CDIV+20
SET X=CHG("STAT",80)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+3 ;,X="Proces'g response" D L1
SET R=R+1
+4 IF $DATA(CHG("STAT",90))
Begin DoDot:1
+5 SET C=CDIV+20
SET X=CHG("STAT",90)
SET X2=0
SET X3=3
DO COM
End DoDot:1
+6 ; * CLAIM RESULTS *
SET R=R+1
+7 ;,X="Paid claims" D L1
SET R=R+1
+8 IF $DATA(CHG("COMM",203))
Begin DoDot:1
+9 SET C=CDIV+1
SET X=CHG("COMM",203)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+10 ;,X="Rejected claims" D L1
SET R=R+1
+11 IF $DATA(CHG("COMM",202))
Begin DoDot:1
+12 SET C=CDIV+1
SET X=CHG("COMM",202)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+13 ;,X="Unbillable claims"
SET R=R+1
+14 IF $DATA(CHG("COMM",201))
Begin DoDot:1
+15 SET C=CDIV+1
SET X=CHG("COMM",201)
SET X2=0
SET X3=7
DO COM
End DoDot:1
VA115 ;,X="Duplicate claims" D L1
SET R=R+1
+1 IF $DATA(CHG("COMM",204))
Begin DoDot:1
+2 SET C=CDIV+1
SET X=CHG("COMM",204)
SET X2=0
SET X3=7
DO COM
End DoDot:1
VA116 ;,X="Captured claims" D L1
SET R=R+1
+1 IF $DATA(CHG("COMM",205))
Begin DoDot:1
+2 SET C=CDIV+1
SET X=CHG("COMM",205)
SET X2=0
SET X3=7
DO COM
End DoDot:1
+3 ;S VALMCNT=$S(R>R2:R,1:R2)
VA200 ; Then line 18 begins "Next screen"
+1 SET (R,R1)=17
+2 ;S X="***** Communications Problems *****",C=$L(X)/2*-1+80 D L1
+3 NEW C1
SET C1=1+$LENGTH("Other errors during dialing")+2
SET X2=0
SET X3=4
VA210 ;,X="* Dialing and Connecting *" D L1
SET R=R+1
+1 ;,X="How many times we dialed" D L1
SET R=R+1
+2 IF $DATA(CHG("COMM",601))
Begin DoDot:1
+3 NEW X2,X3
SET C=C1
SET X=CHG("COMM",601)
DO COM60
End DoDot:1
+4 ;,X="Did not receive CONNECT" D L1
SET R=R+1
+5 IF $DATA(CHG("COMM",604))
SET C=C1
SET X=CHG("COMM",604)
DO COM60
+6 ;,X="Other errors during dialing" D L1
SET R=R+1
+7 IF $DATA(CHG("COMM",603))
SET C=C1
SET X=CHG("COMM",603)
DO COM60
+8 SET R=R+1
VA220 ;,X="* Before & After Sending *" D L1
SET R=R+1
+1 ;,X="No initial ENQ rec'd" D L1
SET R=R+1
+2 IF $DATA(CHG("COMM",719))
SET C=C1
SET X=CHG("COMM",719)
DO COM60
+3 ;,X="Didn't get STX back" D L1
SET R=R+1
+4 IF $DATA(CHG("COMM",701))
SET C=C1
SET X=CHG("COMM",701)
DO COM60
+5 ;,X="Got ENQ instead" D L1
SET R=R+1
+6 IF $DATA(CHG("COMM",702))
SET C=C1
SET X=CHG("COMM",702)
DO COM60
+7 ;,X="Got NAK instead" D L1
SET R=R+1
+8 IF $DATA(CHG("COMM",703))
SET C=C1
SET X=CHG("COMM",703)
DO COM60
+9 ;,X="Got +++ instead" D L1
SET R=R+1
+10 IF $DATA(CHG("COMM",704))
SET C=C1
SET X=CHG("COMM",704)
DO COM60
+11 ;,X="Got null instead" D L1
SET R=R+1
+12 IF $DATA(CHG("COMM",705))
SET C=C1
SET X=CHG("COMM",705)
DO COM60
+13 ;,X="Got something else" D L1
SET R=R+1
+14 IF $DATA(CHG("COMM",709))
SET C=C1
SET X=CHG("COMM",709)
DO COM60
+15 ;,X="|" F R=R1+1:1:R2 D L1
SET R2=R
SET CDIV=40
SET C=CDIV
+16 SET R=R1
SET C1=CDIV+4+$LENGTH("Received null during")+1
VA260 ;,X="* While receiving responses *" D L1
SET R=R+1
+1 ;,X="Did not receive ETX" D L1
SET R=R+1
+2 IF $DATA(CHG("COMM",801))
SET X=CHG("COMM",801)
SET C=C1
DO COM60
+3 ;,X="Received EOT during" D L1
SET R=R+1
+4 IF $DATA(CHG("COMM",802))
SET X=CHG("COMM",802)
SET C=C1
DO COM60
+5 ;,X="Received null during" D L1
SET R=R+1
+6 IF $DATA(CHG("COMM",803))
SET X=CHG("COMM",803)
SET C=C1
DO COM60
+7 ;,X="Received +++ during" D L1
SET R=R+1
+8 IF $DATA(CHG("COMM",804))
SET X=CHG("COMM",804)
SET C=C1
DO COM60
+9 ;,X="Miscellaneous" D L1
SET R=R+1
+10 IF $DATA(CHG("COMM",809))
SET X=CHG("COMM",809)
SET C=C1
DO COM60
+11 SET R=R+1
VA270 ;,X="* We sent NAK *" D L1
SET R=R+1
+1 ;,X="How many times" D L1
SET R=R+1
+2 IF $DATA(CHG("COMM",408))
SET X=CHG("COMM",408)
SET C=C1
DO COM60
+3 ;,X="Got STX back (good)" D L1
SET R=R+1
+4 IF $DATA(CHG("COMM",902))
SET X=CHG("COMM",902)
SET C=C1
DO COM60
+5 ;,X="Got null back" D L1
SET R=R+1
+6 IF $DATA(CHG("COMM",903))
SET X=CHG("COMM",903)
SET C=C1
DO COM60
+7 ;,X="Got +++ back" D L1
SET R=R+1
+8 IF $DATA(CHG("COMM",904))
SET X=CHG("COMM",904)
SET C=C1
DO COM60
+9 ;,X="Got something else" D L1
SET R=R+1
+10 IF $DATA(CHG("COMM",909))
SET X=CHG("COMM",909)
SET C=C1
DO COM60
VA300 ; begin page 3
SET (R,R1)=33
+1 SET C=5
+2 ;,X="*** Front-end inputs ***" D L1
SET R=R+1
+3 ;,X="Total claims submitted" D L1
SET R=R+1
+4 SET X=$GET(CHG("COMM",101))
IF X]""
DO COM70
+5 ;,X="Unique, first-time ones" D L1
SET R=R+1
+6 SET X=$GET(CHG("COMM",102))
IF X]""
DO COM70
+7 ;,X,"Repeat submissions" D L1
SET R=R+1
+8 SET X=$GET(CHG("COMM",103))
IF X]""
DO COM70
+9 SET R=R+1
+10 ;,X="*** Finding PCC Visits ***" D L1
SET R=R+1
+11 ;,X="Found via PCC link in prescription file" D L1
SET R=R+1
+12 SET X=$GET(CHG("COMM",1101))
IF X]""
DO COM70
+13 ;,X="Found by patient,date@time ""AA"" index" D L1
SET R=R+1
+14 SET X=$GET(CHG("COMM",1102))
IF X]""
DO COM70
+15 ;,X="Could not find; created new visit" D L1
SET R=R+1
+16 SET X=$GET(CHG("COMM",1103))
IF X]""
DO COM70
+17 ;S VALMCNT=R
+18 KILL CHG
+19 QUIT