- Timestamp:
- Dec 4, 2009, 8:26:01 PM (14 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEST.m
r628 r636 1 1 IBCEST ;ALB/TMP - 837 EDI STATUS MESSAGE PROCESSING ;17-APR-96 2 ;;2.0;INTEGRATED BILLING;**137,189,197,135,283,320,368**;21-MAR-94;Build 21 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,189,197,135,283,320**;21-MAR-94 4 3 ; IA 4042 for call to AUDITX^PRCAUDT 5 4 Q … … 63 62 ; 1 = single bill 0 = batch 64 63 ; 65 N DA,DIK,DIE,DIC,X,Y,DR,DO,DD,DLAYGO,Z,Z0,Z1, Z2,Z3,IBT,IBDUP,IBFLDS,IBY,IBAUTO,IBLN64 N DA,DIK,DIE,DIC,X,Y,DR,DO,DD,DLAYGO,Z,Z0,Z1,IBT,IBDUP,IBFLDS,IBY,IBAUTO 66 65 ; 67 66 S X=IBBILL,IBDUP=0 … … 113 112 . D BLDMSG(IB1,IBTDA,.IBT,.IBAUTO) 114 113 . ; 115 . ; IB*2*368 - ymg - 2Q,RE,RP messages will be filed as informational 116 . ; Z0 is the flag for 2Q code 117 . ; Z1 is the flag for RE code 118 . ; Z2 is the flag for RP code 119 . ; Z3 is the flag for autofiling the message 120 . I $P($G(^IBM(361,+IBY,0)),U,3)="R" D 121 .. S Z="",(Z0,Z1,Z2,Z3)=0 F S Z=$O(IBT(Z)) Q:Z=""!(Z3=1) D 122 ... S IBLN=$$UP^XLFSTR($G(IBT(Z))) 123 ... I (Z0!Z1!Z2)=0 D 124 .... S:IBLN?.E1"CODE:".P1"2Q".E Z0=1 125 .... S:IBLN?.E1"CODE:".P1"RE".E Z1=1 126 .... S:IBLN?.E1"CODE:".P1"RP".E Z2=1 127 ... I Z0=1 S:IBLN?.P1"CLAIM".P1"REJECTED".P1"BY".P1"CLEARINGHOUSE".E Z3=1 128 ... I Z1=1 S:IBLN?.P1"ELECTRONIC".P1"CLAIM".P1"REJECTED".P1"BY".P1"EMDEON".E Z3=1 129 ... I Z2=1 S:IBLN?.P1"PAPER".P1"CLAIM".P1"REJECTED".P1"BY".P1"EMDEON".E Z3=1 130 .. I Z3=1 S IBAUTO=1,DIE=361,DA=+IBY,DR=".03////I" D ^DIE 114 . ; IB*2*320 - esg - 2Q messages will be filed as informational 115 . I $P($G(^IBM(361,+IBY,0)),U,3)="R",$G(IBT(1))["2Q CLAIM REJECTED BY CLEARINGHOUSE" D 116 .. S IBAUTO=1 117 .. S DIE=361,DA=+IBY,DR=".03////I" D ^DIE 131 118 .. Q 132 119 . ; … … 134 121 . I $G(IBAUTO),$P($G(^IBM(361,+IBY,0)),U,3)="I" D 135 122 .. S DIE="^IBM(361,",DR=".09////2;.14////1;.1////F",DA=+IBY D ^DIE 136 .. I IB1,$P($G(^IBM(361,+IBY,0)),U,11) S Z="",Z0=0 F S Z=$O(IBT(Z)) Q:Z=""!(Z0=1) D 137 ... S Z0=$$PRINTUPD^IBCEU0($$UP^XLFSTR($G(IBT(Z))),$P($G(^IBM(361,+IBY,0)),U,11)) 138 . ; 139 . D MSGLNSZ(.IBT) ; Convert Message Lines in IBT to be no longer than 70 chars 123 .. I IB1,$P($G(^IBM(361,+IBY,0)),U,11),$$PRINTUPD^IBCEU0($G(IBT(1)),$P($G(^IBM(361,+IBY,0)),U,11)) 124 . ; 140 125 . D WP^DIE(361,+IBY_",",1,"A","IBT") ; file message text 141 126 . ; … … 158 143 ; Don't move the raw data over, just move the text of the message 159 144 F S IBZ=$O(^IBA(364.2,IBTDA,2,IBZ)) Q:'IBZ S IBZ1=$G(^(IBZ,0)) S IBDATA=($E(IBZ1,1,2)="##") Q:IBDATA S IBZ0=IBZ0+1,IBT(IBZ0)=IBZ1 I 'IBCK S Z=$$CKREVU^IBCEM4(IBZ1,,,.IBCK),IBAUTO=$S(IBCK:0,Z:1,1:IBAUTO) 145 ; 146 ; Convert Message Lines in IBT to be no longer than 70 chars 147 D MSGLNSZ(.IBT) 160 148 Q 161 149 ; … … 206 194 ; which is an array of Converted Message Lines (with lines no more than 70 chars each) 207 195 ; 208 N LN,XARY,XARYLN,CNT,OUTMSG,TMPMSG,LDNGSP,LDNGSPN 209 S LN="",CNT=0 F S LN=$O(MSG(LN)) Q:LN="" D ; 196 N LN,XARY,XARYLN,CNT,OUTMSG,TMPMSG,LDNGSP 197 S LN="",CNT=0 198 F S LN=$O(MSG(LN)) Q:LN="" D ; 199 . ; 210 200 . ; Find any leading spaces in original message line, 211 201 . ; to be used if line got split below 212 202 . S TMPMSG=$$TRIM^XLFSTR(MSG(LN),"L"," ") ;Trim Leading Spaces 213 203 . S LDNGSP=$P(MSG(LN),TMPMSG,1) ;get leading spaces if any 214 . S LDNGSPN=$L(LDNGSP) S:LDNGSPN>30 LDNGSP=$E(LDNGSP,1,30) ;make sure there are no more than 30 leading spaces204 . ; 215 205 . ; Converts a single line to multiple lines with a maximum width of 70 each 216 206 . ; If line is 70 chars or less, this call returns the exact line 217 . K XARY D FSTRNG^IBJU1(TMPMSG,70-LDNGSPN,.XARY) 207 . K XARY D FSTRNG^IBJU1(MSG(LN),70,.XARY) 208 . ; 218 209 . ; Scan lines and merge them into the final output array (OUTMSG) 219 210 . ; On lines 2 and higher, add Leading Spaces found above, if any. 220 . S XARYLN="" F S XARYLN=$O(XARY(XARYLN)) Q:XARYLN="" S CNT=CNT+1,OUTMSG(CNT)=LDNGSP_XARY(XARYLN) 211 . S XARYLN="" 212 . F S XARYLN=$O(XARY(XARYLN)) Q:XARYLN="" S CNT=CNT+1,OUTMSG(CNT)=$S(XARYLN=1:XARY(XARYLN),1:LDNGSP_XARY(XARYLN)) 221 213 ; 222 214 ; Move the final Message Lines (OUTMSG) into MSG array to be returned 223 215 K MSG M MSG=OUTMSG 224 Q 225 ; 216 Q ;MSGLNSZ 217 ;
Note:
See TracChangeset
for help on using the changeset viewer.