Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

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  
    11IBCEST ;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
    43 ; IA 4042 for call to AUDITX^PRCAUDT
    54 Q
     
    6362 ;       1 = single bill 0 = batch
    6463 ;
    65  N DA,DIK,DIE,DIC,X,Y,DR,DO,DD,DLAYGO,Z,Z0,Z1,Z2,Z3,IBT,IBDUP,IBFLDS,IBY,IBAUTO,IBLN
     64 N DA,DIK,DIE,DIC,X,Y,DR,DO,DD,DLAYGO,Z,Z0,Z1,IBT,IBDUP,IBFLDS,IBY,IBAUTO
    6665 ;
    6766 S X=IBBILL,IBDUP=0
     
    113112 . D BLDMSG(IB1,IBTDA,.IBT,.IBAUTO)
    114113 . ;
    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
    131118 .. Q
    132119 . ;
     
    134121 . I $G(IBAUTO),$P($G(^IBM(361,+IBY,0)),U,3)="I" D
    135122 .. 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 . ;
    140125 . D WP^DIE(361,+IBY_",",1,"A","IBT")    ; file message text
    141126 . ;
     
    158143 ; Don't move the raw data over, just move the text of the message
    159144 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)
    160148 Q
    161149 ;
     
    206194 ; which is an array of Converted Message Lines (with lines no more than 70 chars each)
    207195 ;
    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 . ;
    210200 . ; Find any leading spaces in original message line,
    211201 . ; to be used if line got split below
    212202 . S TMPMSG=$$TRIM^XLFSTR(MSG(LN),"L"," ")  ;Trim Leading Spaces
    213203 . 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 spaces
     204 . ;
    215205 . ; Converts a single line to multiple lines with a maximum width of 70 each
    216206 . ; 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 . ;
    218209 . ; Scan lines and merge them into the final output array (OUTMSG)
    219210 . ; 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))
    221213 ;
    222214 ; Move the final Message Lines (OUTMSG) into MSG array to be returned
    223215 K MSG M MSG=OUTMSG
    224  Q
    225  ;
     216 Q  ;MSGLNSZ
     217 ;
Note: See TracChangeset for help on using the changeset viewer.