ABSPECA7 ; IHS/FCS/DRS - Parse Claim Response ; [ 09/12/2002 9:58 AM ]
;;1.0;PHARMACY POINT OF SALE;**3**;JUN 21, 2001;Build 38
;----------------------------------------------------------------------
;----------------------------------------------------------------------
;Determine if the duplicate record has been paid or captured
;Returns: 0 if Captured
; 1 if PAID
;----------------------------------------------------------------------
PAID(TEXT) ;EP - from ABSPCA4
N X,CHARS
S CHARS="ABCDEFGHIJKLMNOPQR{}"
S X=$E(TEXT,1,30)
Q:'($E(X,1,5)?5N) 0
Q:'($E(X,7,11)?5N) 0
Q:'($E(X,13,17)?5N) 0
Q:'($E(X,19,23)?5N) 0
Q:'($E(X,25,29)?5N) 0
Q:'(CHARS[$E(X,6)) 0
Q:'(CHARS[$E(X,12)) 0
Q:'(CHARS[$E(X,18)) 0
Q:'(CHARS[$E(X,24)) 0
Q:'(CHARS[$E(X,30)) 0
Q 1
;----------------------------------------------------------------------
; This is not called from anywhere, as far as I can tell
PARSETXT(DA,DA1,TEXT) ;
S $P(^ABSPR(DA,1000,DA1,500),U,1)="P"
S $P(^ABSPR(DA,1000,DA1,500),U,5)=$E(TEXT,1,6)
S $P(^ABSPR(DA,1000,DA1,500),U,6)=$E(TEXT,7,12)
S $P(^ABSPR(DA,1000,DA1,500),U,7)=$E(TEXT,13,18)
S $P(^ABSPR(DA,1000,DA1,500),U,8)=$E(TEXT,19,24)
S $P(^ABSPR(DA,1000,DA1,500),U,9)=$E(TEXT,25,30)
S $P(^ABSPR(DA,1000,DA1,500),U,3)=$E(TEXT,31,44)
S $P(^ABSPR(DA,1000,DA1,500),U,4)=$E(TEXT,45,$L(TEXT))
Q
ABSPECA7 ; IHS/FCS/DRS - Parse Claim Response ; [ 09/12/2002 9:58 AM ]
+1 ;;1.0;PHARMACY POINT OF SALE;**3**;JUN 21, 2001;Build 38
+2 ;----------------------------------------------------------------------
+3 ;----------------------------------------------------------------------
+4 ;Determine if the duplicate record has been paid or captured
+5 ;Returns: 0 if Captured
+6 ; 1 if PAID
+7 ;----------------------------------------------------------------------
PAID(TEXT) ;EP - from ABSPCA4
+1 NEW X,CHARS
+2 SET CHARS="ABCDEFGHIJKLMNOPQR{}"
+3 SET X=$EXTRACT(TEXT,1,30)
+4 IF '($EXTRACT(X,1,5)?5N)
QUIT 0
+5 IF '($EXTRACT(X,7,11)?5N)
QUIT 0
+6 IF '($EXTRACT(X,13,17)?5N)
QUIT 0
+7 IF '($EXTRACT(X,19,23)?5N)
QUIT 0
+8 IF '($EXTRACT(X,25,29)?5N)
QUIT 0
+9 IF '(CHARS[$EXTRACT(X,6))
QUIT 0
+10 IF '(CHARS[$EXTRACT(X,12))
QUIT 0
+11 IF '(CHARS[$EXTRACT(X,18))
QUIT 0
+12 IF '(CHARS[$EXTRACT(X,24))
QUIT 0
+13 IF '(CHARS[$EXTRACT(X,30))
QUIT 0
+14 QUIT 1
+15 ;----------------------------------------------------------------------
+16 ; This is not called from anywhere, as far as I can tell
PARSETXT(DA,DA1,TEXT) ;
+1 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,1)="P"
+2 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,5)=$EXTRACT(TEXT,1,6)
+3 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,6)=$EXTRACT(TEXT,7,12)
+4 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,7)=$EXTRACT(TEXT,13,18)
+5 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,8)=$EXTRACT(TEXT,19,24)
+6 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,9)=$EXTRACT(TEXT,25,30)
+7 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,3)=$EXTRACT(TEXT,31,44)
+8 SET $PIECE(^ABSPR(DA,1000,DA1,500),U,4)=$EXTRACT(TEXT,45,$LENGTH(TEXT))
+9 QUIT