Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BAREDP4B

BAREDP4B.m

Go to the documentation of this file.
BAREDP4B ; IHS/SD/POT - MATCH REASONS AND CLAIMS PART3; 03/17/2014
 ;;1.8;IHS ACCOUNTS RECEIVABLE;**24**;OCT 26, 2005;Build 69
 ;;IHS/SD/POT NEW ROUTINE - OVERFLOW CODE FROM BAREDP04
 Q
 ;
ADDREAS(IMPDA,CLMDA,ERRORS) ;EP - ADD RSN NOT SENT TO 'RSN NOT TO POST MULTIPLE'
 S SHOWMSG=$G(SHOWMSG)
 N REASON,STAT,ERRDA,CURSTAT
 S REASON=""
 F  S REASON=$O(ERRORS(REASON)) Q:REASON=""  D
 . I REASON="CT" D STAT(IMPDA,CLMDA)
 . I SHOWMSG D
 . .S ERRDA=$O(^BARERR("B",REASON,""))
 . .W !,$$GET1^DIQ(90056.21,ERRDA_",",.02,"E")
 . K DIC,DIE,DR,DA,DIR
 . S DIC("P")=$P(^DD(90056.0205,401,0),U,2)
 . S DA(2)=IMPDA
 . S DA(1)=CLMDA
 . S DIC(0)="L"
 . S DIC="^BAREDI(""I"",DUZ(2),"_DA(2)_",30,"_DA(1)_",4,"
 . S X=REASON
 . D ^DIC
 Q
 ;
STAT(IMPDA,CLMDA) ;EP
 K DR,DIE,DA
 S DIE=$$DIC^XBDIQ1(90056.0205)
 S STAT="C"
 S DR=".02///^S X=STAT"
 S DA(1)=IMPDA
 S DA=CLMDA
 D ^DIE
 Q
 ; 
DELREAS(IMPDA,CLMDA) ;EP -CLR 'RSN NOT TO POST' MULTIPLES IN ERA FILE
 N REASDA,BAREIENS
 K DA,DIR,DIC,DIE,DR
 S REASDA=0
 F  S REASDA=$O(^BAREDI("I",DUZ(2),IMPDA,30,CLMDA,4,REASDA)) Q:'REASDA  D
 . S DA(2)=IMPDA
 . S DA(1)=CLMDA
 . S DIE="^BAREDI(""I"","_DUZ(2)_","_DA(2)_",30,"_DA(1)_",4,"
 . S DA=REASDA
 . S DR=".01///@"
 . D ^DIE
 K DA,DR,DIE,DIC,DIR
 S DIE=$$DIC^XBDIQ1(90056.0205)
 S DR=""
 S BAREIENS=CLMDA_","_IMPDA_","
 I $$GET1^DIQ(90056.0205,BAREIENS,71)="" S DR=".02///C"  ;'STATUS' FLD CLM UNMATCHED
 S DR=DR_";501///@"  ;'POST CLM AS TYPE'
 S DR=DR_";601///@"  ;'PYMT CRDT APPLIED TO'
 S DR=DR_";602///@"  ;'PYMT CRDT APPLIED FROM'
 S DA(1)=IMPDA
 S DA=CLMDA
 D ^DIE
 K DA,DR,DIE,DIC,DIR
 Q
 ;---EOR