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

ABMPST10.m

Go to the documentation of this file.
  1. ABMPST10 ; IHS/ASDS/LSL - V2.4 Patch 10 Post init
  1. ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
  1. ;
  1. ; IHS/ASDS/LSL - V2.4 Patch 10 - NOIS QBA-1201-130010
  1. ; loop MCR part B that were created in patch 7 and
  1. ; make Medicare active.
  1. ;
  1. ; *********************************************************************
  1. PATCH10 ;
  1. Q:$G(^ABMCNVRT("MCRC","START"))
  1. S ^ABMCNVRT("MCRC","START")=$H
  1. ;
  1. ; *********************************************************************
  1. ALL ;
  1. ; all sites
  1. S ABMDUZ2=DUZ(2)
  1. S DUZ(2)=0
  1. F S DUZ(2)=$O(^ABMDCLM(DUZ(2))) Q:'DUZ(2) Q:DUZ(2)'=+DUZ(2) D
  1. .D ONE
  1. S DUZ(2)=ABMDUZ2
  1. K ABMDUZ2
  1. S ^ABMCNVRT("MCRC","STOP")=$H
  1. Q
  1. ;
  1. ; *********************************************************************
  1. ONE ;
  1. ; one site
  1. Q:$P($G(^ABMDPARM(DUZ(2),5)),U)
  1. W !!,"Site= ",$P(^AUTTLOC(DUZ(2),0),"^",2)
  1. S ABMDT=3010700
  1. F S ABMDT=$O(^ABMDCLM(DUZ(2),"AD",ABMDT)) Q:'ABMDT D
  1. . S ABMCLM=0
  1. . F S ABMCLM=$O(^ABMDCLM(DUZ(2),"AD",ABMDT,ABMCLM)) Q:'ABMCLM D
  1. . . Q:'$D(^ABMDCLM(DUZ(2),ABMCLM))
  1. . . Q:$P(^ABMDCLM(DUZ(2),ABMCLM,0),"^",7)'=999 ;must be prof comp
  1. . . D CLAIM
  1. Q
  1. ;
  1. ; *********************************************************************
  1. CLAIM ;
  1. ; one claim
  1. S (ABMPRI,ABMDONE)=0
  1. F S ABMPRI=$O(^ABMDCLM(DUZ(2),ABMCLM,13,"C",ABMPRI)) Q:'+ABMPRI D Q:ABMDONE
  1. . S ABM13=0
  1. . F S ABM13=$O(^ABMDCLM(DUZ(2),ABMCLM,13,"C",ABMPRI,ABM13)) Q:'+ABM13 D Q:ABMDONE
  1. . . Q:'$D(^ABMDCLM(DUZ(2),ABMCLM,13,ABM13))
  1. . . S ABMINS=$P($G(^ABMDCLM(DUZ(2),ABMCLM,13,ABM13,0)),U)
  1. . . I $P($G(^AUTNINS(ABMINS,2)),U)="R" S ABMDONE=1 Q
  1. Q:'ABMDONE
  1. Q:$P($G(^ABMDCLM(DUZ(2),ABMCLM,13,ABM13,0)),U,3)'="C"
  1. S ABMBILL=$O(^ABMDBILL(DUZ(2),"B",ABMCLM_" "))
  1. ;
  1. ; If no bill for this claim do the following:
  1. I ABMCLM'=+ABMBILL D
  1. . W !,ABMCLM
  1. . Q
  1. . S DIE="^ABMDCLM(DUZ(2),"
  1. . S DA=ABMCLM
  1. . S DR=".08////^S X=ABMINS"
  1. . D ^DIE
  1. . S DIE="^ABMDCLM(DUZ(2),"_ABMCLM_",13,"
  1. . S DA(1)=ABMCLM
  1. . S DA=ABM13
  1. . S DR=".03////I"
  1. . D ^DIE
  1. . K DR,DA,DIE
  1. Q