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

RGP62PST.m

Go to the documentation of this file.
  1. RGP62PST ;OAK/ELZ-POST-INIT TO RETIRE #234 EXCEPTIONS ;9/29/2014
  1. ;;1.0;CLINICAL INFO RESOURCE NETWORK;**62**;30 Apr 99;Build 3
  1. ;
  1. ; Loop through the CIRN HL7 EXCEPTION LOG (#991.1) file "AC"
  1. ; cross reference for the 234 (Primary View Reject) exceptions.
  1. ; See if they are EXCEPTION STATUS of NOT PROCESSED ("0").
  1. ; Mark the EXCEPTION STATUS to PROCESSED ("1").
  1. ; Exception type 234 is obsolete.
  1. ;
  1. EXLOG ;
  1. ;If patch RG*1.0*62 has previously been installed, quit post-init.
  1. I $$PATCH^XPDUTL("RG*1.0*62") D BMES^XPDUTL(" Post-install previously ran; no need to reprocess file 991.1 again.") Q
  1. ;
  1. D BMES^XPDUTL(" The post-init routine will retire Primary View Reject (234)")
  1. D MES^XPDUTL(" exceptions in the CIRN HL7 EXCEPTION LOG (#991.1) file.")
  1. ;
  1. N RGCOUNT,DA,DIE,DR,RGEXIEN,RGIEN,X,Y
  1. ;
  1. S (RGCOUNT,RGIEN)=0
  1. F S RGIEN=$O(^RGHL7(991.1,"AC",234,RGIEN)) Q:'RGIEN S RGEXIEN=0 F S RGEXIEN=$O(^RGHL7(991.1,RGIEN,1,RGEXIEN)) Q:'RGEXIEN D
  1. . ;
  1. . ; quit if processed
  1. . I $P(^RGHL7(991.1,RGIEN,1,RGEXIEN,0),"^",5)=1 Q
  1. . ;I RGCOUNT=3 W "." Q
  1. . ;
  1. . ;Update the EXCEPTION STATUS (#6) field to '1' - PROCESSED.
  1. . S DA(1)=RGIEN,DA=RGEXIEN,DR="6///1"
  1. . S DIE="^RGHL7(991.1,"_DA(1)_",1,"
  1. . L +^RGHL7(991.1,RGIEN):10
  1. . D ^DIE
  1. . L -^RGHL7(991.1,RGIEN)
  1. . S RGCOUNT=RGCOUNT+1
  1. ;
  1. D BMES^XPDUTL(" A total of "_RGCOUNT_" Primary View Reject exceptions were retired.")
  1. D MES^XPDUTL(" Post-install routine completed successfully.")
  1. Q