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

FBXIP91.m

Go to the documentation of this file.
  1. FBXIP91 ;WCIOFO/SAB-PATCH INSTALL ROUTINE ;4/28/2005
  1. ;;3.5;FEE BASIS;**91**;JAN 30, 1995
  1. Q
  1. ;
  1. PS ; post-install entry point
  1. ; create KIDS checkpoints with call backs
  1. N FBX,Y
  1. F FBX="CVT" D
  1. . S Y=$$NEWCP^XPDUTL(FBX,FBX_"^FBXIP91")
  1. . I 'Y D BMES^XPDUTL("ERROR Creating "_FBX_" Checkpoint.")
  1. Q
  1. ;
  1. CVT ; Fix Invalid Data in Field #8.5 within the PRESCRIPTION muliple
  1. ; of file 162.1
  1. N FBC,FB85I,FBDA,FBDA1,FBFDA,FBTXT,FBX
  1. D BMES^XPDUTL(" Fixing data in SubFile 162.11 Field #8.5...")
  1. ;
  1. S FBC=0 ; init count of corrected values
  1. ; loop thru pharmacy invoices
  1. S FBDA=0 F S FBDA=$O(^FBAA(162.1,FBDA)) Q:'FBDA D
  1. . ; loop thru prescriptions
  1. . S FBDA1=0 F S FBDA1=$O(^FBAA(162.1,FBDA,"RX",FBDA1)) Q:'FBDA1 D
  1. . . ; obtain internal value of field #8.5
  1. . . S FB85I=$P($G(^FBAA(162.1,FBDA,"RX",FBDA1,0)),U,21)
  1. . . S FBX=$S(FB85I="Yes":"Y",FB85I="No":"N",1:"")
  1. . . Q:FBX="" ; not one of the values that should be converted
  1. . . S FBFDA(162.11,FBDA1_","_FBDA_",",8.5)=FBX
  1. . . D FILE^DIE("","FBFDA")
  1. . . S FBC=FBC+1
  1. ;
  1. S FBTXT=" "_FBC_" invalid value"_$S(FBC=1:" was",1:"s were")_" found and corrected."
  1. D MES^XPDUTL(FBTXT)
  1. Q
  1. ;
  1. ;FBXIP91