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

IBCNICB2.m

Go to the documentation of this file.
  1. IBCNICB2 ;FA/ALB - Update utilities for the ICB interface ;1 SEP 2009
  1. ;;2.0;INTEGRATED BILLING;**549**;21-MAR-94;Build 54
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ; IB*2.0*549 - New routine because of routine size of IBCNICB
  1. ;
  1. EXACTM(IBINSDA,IBBUFDA) ;EP
  1. ; Check for an exact match on an existing group plan when trying to add a
  1. ; new one
  1. ; IB*2.0*549 - Added method
  1. ; Input: IBINSDA - IEN of the Insurance Company (file 36) associated
  1. ; with the group plan being added
  1. ; IBBUFDA - IEN of the Insurance Buffer entry (file 355.33)
  1. ; Returns: 1 - Exact match found on Insurance Company, Group Name and Group Number
  1. ; 0 - Otherwise
  1. N BGRPNM,BGRPNUM,FOUND,GRPNM,GRPNUM,IEN
  1. S BGRPNM=$$GET1^DIQ(355.33,IBBUFDA_",",90.01) ; External Group Name from buffer
  1. S BGRPNM=$$UP^XLFSTR(BGRPNM) ; Convert to Upper case
  1. S BGRPNM=$$TRIM^XLFSTR(BGRPNM,"R"," ") ; Strip Trailing spaces
  1. S BGRPNUM=$$GET1^DIQ(355.33,IBBUFDA_",",90.02) ; External Group Number from buffer
  1. S BGRPNUM=$$UP^XLFSTR(BGRPNUM) ; Convert to Upper case
  1. S BGRPNUM=$$TRIM^XLFSTR(BGRPNUM,"R"," ") ; Strip Trailing spaces
  1. S FOUND=0,IEN=""
  1. ;
  1. ; No need to execute for loop if no group name and no group number
  1. I BGRPNM="",BGRPNUM="" Q FOUND
  1. F D Q:IEN=""!FOUND
  1. . S IEN=$O(^IBA(355.3,"B",IBINSDA,IEN))
  1. . Q:IEN=""
  1. . S GRPNM=$$GET1^DIQ(355.3,IEN_",",2.01) ; External Group Name from group plan
  1. . S GRPNM=$$UP^XLFSTR(GRPNM) ; Convert to Upper case
  1. . S GRPNM=$$TRIM^XLFSTR(GRPNM,"R"," ") ; Strip Trailing spaces
  1. . Q:GRPNM'=BGRPNM ; Not an 'exact' match
  1. . S GRPNUM=$$GET1^DIQ(355.3,IEN_",",2.02) ; External Group Number from group plan
  1. . S GRPNUM=$$UP^XLFSTR(GRPNUM) ; Convert to Upper case
  1. . S GRPNUM=$$TRIM^XLFSTR(GRPNUM,"R"," ") ; Strip Trailing spaces
  1. . Q:GRPNUM'=BGRPNUM ; Not an 'exact' match
  1. . S FOUND=1
  1. Q FOUND
  1. ;