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

IB20P402.m

Go to the documentation of this file.
  1. IB20P402 ;ALB/CXW - SPECIALTY CODE IN FILE #399;09-SEP-08
  1. ;;2.0;INTEGRATED BILLING;**402**;21-MAR-94;Build 17
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. POST ;
  1. START N U S U="^"
  1. D BMES^XPDUTL("Add the specialty code to file (#399), Post-Install Starting")
  1. ADD ;
  1. ;add the specialty to Field ID .08/subfile 399.0222
  1. ;the bill status is 1 - entered/not reviewed
  1. N DA,DA2,BILL,NUM,PRV,REC,SPEC,IBDT
  1. S DA=0,NUM=0
  1. F S DA=$O(^DGCR(399,DA)) Q:'DA I $P($G(^DGCR(399,DA,0)),U,13)=1 D
  1. . S DA2=0,BILL=$P($G(^DGCR(399,DA,0)),U)
  1. . F S DA2=$O(^DGCR(399,DA,"PRV",DA2)) Q:'DA2 D
  1. .. L +^DGCR(399,DA):1 I '$T D MES^XPDUTL("*7 ANOTHER USER IS EDITING BILL# "_BILL) Q
  1. .. S REC=$G(^DGCR(399,DA,"PRV",DA2,0))
  1. .. S PRV=$P(REC,U,2),IBDT=$P($G(^DGCR(399,DA,"U")),U)
  1. .. S SPEC=$$SPEC^IBCEU(PRV,IBDT)
  1. .. I $P(REC,U,8)="",SPEC'="" D
  1. ... S $P(^DGCR(399,DA,"PRV",DA2,0),U,8)=SPEC
  1. ... I PRV'["IBA(355.93" S PRV=$P($G(^VA(200,+PRV,0)),U)
  1. ... I PRV["IBA(355.93" S PRV=$P($G(^IBA(355.93,+PRV,0)),U)
  1. ... D MES^XPDUTL("Specialty Code "_SPEC_" for provider "_PRV_" added to bill# "_BILL)
  1. ... S NUM=NUM+1
  1. .. L -^DGCR(399,DA)
  1. D BMES^XPDUTL("Total "_NUM_$S(NUM=1:"bill has",1:" bills have")_" been updated")
  1. ;
  1. FINISH ;
  1. D BMES^XPDUTL("Add the specialty code to file (#399), Post-Install Complete")
  1. Q
  1. ;