ABME5CTP ; IHS/SD/SDR - 837 CTP Segment
;;2.6;IHS Third Party Billing System;**6**;NOV 12, 2009
;Transaction Set Header
;
EP ;EP - START HERE
K ABMREC("CTP"),ABMR("CTP")
S ABME("RTYPE")="CTP"
D LOOP
K ABME,ABM
Q
LOOP ;LOOP HERE
F I=10:10:120 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),ABME("RTYPE"),I)) D @(^(I))
.I $G(ABMREC("CTP"))'="" S ABMREC("CTP")=ABMREC("CTP")_"*"
.S ABMREC("CTP")=$G(ABMREC("CTP"))_ABMR("CTP",I)
Q
10 ;segment
S ABMR("CTP",10)="CTP"
Q
20 ;CTP01 - Class of Trade Code - NOT USED
S ABMR("CTP",20)=""
Q
30 ;CTP02 - Price Identifier Code - NOT USED
S ABMR("CTP",30)=""
Q
40 ;CTP03 - Unit Price - NOT USED
S ABMR("CTP",40)=""
Q
50 ;CTP04 - Quantity
S ABMR("CTP",50)=$P(ABMRV(ABMI,ABMJ,ABMK),U,5)
Q
60 ;CTP05 - Composite Unit of Measure
;CTP05-1 - Unit Or Basis for Measurement Code
;CTP05-2 - Exponent - not used
;CTP05-3 - Multiplier - not used
S ABMR("CTP",60)="UN"
Q
70 ;CTP06 - Price Multiplier Qualifier - NOT USED
S ABMR("CTP",70)=""
Q
80 ;CTP07 - Multiplier - NOT USED
S ABMR("CTP",80)=""
Q
90 ;CTP08 - Monetary Amount - NOT USED
S ABMR("CTP",90)=""
Q
100 ;CTP09 - Basis of Unit Price Code - NOT USED
S ABMR("CTP",100)=""
Q
110 ;CTP10 - Condition Value - NOT USED
S ABMR("CTP",110)=""
Q
120 ;CTP11 - Multiple Price Quantity - NOT USED
S ABMR("CTP",120)=""
Q
ABME5CTP ; IHS/SD/SDR - 837 CTP Segment
+1 ;;2.6;IHS Third Party Billing System;**6**;NOV 12, 2009
+2 ;Transaction Set Header
+3 ;
EP ;EP - START HERE
+1 KILL ABMREC("CTP"),ABMR("CTP")
+2 SET ABME("RTYPE")="CTP"
+3 DO LOOP
+4 KILL ABME,ABM
+5 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:120
Begin DoDot:1
+2 DO @I
+3 IF $DATA(^ABMEXLM("AA",+$GET(ABMP("INS")),+$GET(ABMP("EXP")),ABME("RTYPE"),I))
DO @(^(I))
+4 IF $GET(ABMREC("CTP"))'=""
SET ABMREC("CTP")=ABMREC("CTP")_"*"
+5 SET ABMREC("CTP")=$GET(ABMREC("CTP"))_ABMR("CTP",I)
End DoDot:1
+6 QUIT
10 ;segment
+1 SET ABMR("CTP",10)="CTP"
+2 QUIT
20 ;CTP01 - Class of Trade Code - NOT USED
+1 SET ABMR("CTP",20)=""
+2 QUIT
30 ;CTP02 - Price Identifier Code - NOT USED
+1 SET ABMR("CTP",30)=""
+2 QUIT
40 ;CTP03 - Unit Price - NOT USED
+1 SET ABMR("CTP",40)=""
+2 QUIT
50 ;CTP04 - Quantity
+1 SET ABMR("CTP",50)=$PIECE(ABMRV(ABMI,ABMJ,ABMK),U,5)
+2 QUIT
60 ;CTP05 - Composite Unit of Measure
+1 ;CTP05-1 - Unit Or Basis for Measurement Code
+2 ;CTP05-2 - Exponent - not used
+3 ;CTP05-3 - Multiplier - not used
+4 SET ABMR("CTP",60)="UN"
+5 QUIT
70 ;CTP06 - Price Multiplier Qualifier - NOT USED
+1 SET ABMR("CTP",70)=""
+2 QUIT
80 ;CTP07 - Multiplier - NOT USED
+1 SET ABMR("CTP",80)=""
+2 QUIT
90 ;CTP08 - Monetary Amount - NOT USED
+1 SET ABMR("CTP",90)=""
+2 QUIT
100 ;CTP09 - Basis of Unit Price Code - NOT USED
+1 SET ABMR("CTP",100)=""
+2 QUIT
110 ;CTP10 - Condition Value - NOT USED
+1 SET ABMR("CTP",110)=""
+2 QUIT
120 ;CTP11 - Multiple Price Quantity - NOT USED
+1 SET ABMR("CTP",120)=""
+2 QUIT