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

FBXDIPS.m

Go to the documentation of this file.
  1. FBXDIPS ;WIRMFO/SAB-POST INSTALL ;12/9/1998
  1. ;;3.5;FEE BASIS;**13**;JAN 30, 1995
  1. ;
  1. ; only perform during 1st install
  1. I $$PATCH^XPDUTL("FB*3.5*13") D BMES^XPDUTL(" Skipping post install since patch was previously installed.") Q
  1. ;
  1. N DA,DIK,FBC,FBAC,FBDA,FBFDA,FBPROG,FBY
  1. ;
  1. D BMES^XPDUTL(" Checking Purpose of Visit codes")
  1. S FBPROG=$O(^FBAA(161.8,"B","CHAMPVA",0))
  1. F FBAC=12,13 D
  1. . S FBDA=0 F S FBDA=$O(^FBAA(161.82,"C",FBAC,FBDA)) Q:'FBDA D
  1. . . S FBY=$G(^FBAA(161.82,FBDA,0)) Q:FBY=""
  1. . . Q:$P(FBY,U,2)=FBPROG ; already points to CHAPMVA
  1. . . S FBFDA(161.82,FBDA_",",2)=$S(FBPROG:FBPROG,1:"@")
  1. . . D MES^XPDUTL(" updating fee program for POV with ien "_FBDA)
  1. I $D(FBFDA) D FILE^DIE("","FBFDA") D MSG^DIALOG()
  1. ;
  1. D BMES^XPDUTL(" Building new cross-reference for existing authorizations...")
  1. ; init variables
  1. S FBC("TOT")=$P($G(^FBAAA(0)),U,4) ; total number of patients to index
  1. S FBC("PAT")=0 ; count of re-indexed patients
  1. S XPDIDTOT=FBC("TOT") ; set total for status bar
  1. S FBC("UPD")=5 ; initial % required to update status bar
  1. ;
  1. ; loop thru patients
  1. S FBDA=0 F S FBDA=$O(^FBAAA(FBDA)) Q:'FBDA D
  1. . S FBC("PAT")=FBC("PAT")+1
  1. . S FBC("%")=FBC("PAT")*100/FBC("TOT") ; calculate % complete
  1. . ; check if status bar should be updated
  1. . I FBC("%")>FBC("UPD") D
  1. . . D UPDATE^XPDID(FBC("PAT")) ; update status bar
  1. . . S FBC("UPD")=FBC("UPD")+5 ; increase update criteria by 5%
  1. . ; build B index for patient authorizations
  1. . K DA S DIK="^FBAAA("_FBDA_",1,",DIK(1)=".01^B",DA(1)=FBDA D ENALL^DIK
  1. ;
  1. D MES^XPDUTL(" done.")
  1. ;
  1. Q
  1. ;FBXDIPS