- RGP62PST ;OAK/ELZ-POST-INIT TO RETIRE #234 EXCEPTIONS ;9/29/2014
- ;;1.0;CLINICAL INFO RESOURCE NETWORK;**62**;30 Apr 99;Build 3
- ;
- ; Loop through the CIRN HL7 EXCEPTION LOG (#991.1) file "AC"
- ; cross reference for the 234 (Primary View Reject) exceptions.
- ; See if they are EXCEPTION STATUS of NOT PROCESSED ("0").
- ; Mark the EXCEPTION STATUS to PROCESSED ("1").
- ; Exception type 234 is obsolete.
- ;
- EXLOG ;
- ;If patch RG*1.0*62 has previously been installed, quit post-init.
- I $$PATCH^XPDUTL("RG*1.0*62") D BMES^XPDUTL(" Post-install previously ran; no need to reprocess file 991.1 again.") Q
- ;
- D BMES^XPDUTL(" The post-init routine will retire Primary View Reject (234)")
- D MES^XPDUTL(" exceptions in the CIRN HL7 EXCEPTION LOG (#991.1) file.")
- ;
- N RGCOUNT,DA,DIE,DR,RGEXIEN,RGIEN,X,Y
- ;
- S (RGCOUNT,RGIEN)=0
- 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
- . ;
- . ; quit if processed
- . I $P(^RGHL7(991.1,RGIEN,1,RGEXIEN,0),"^",5)=1 Q
- . ;I RGCOUNT=3 W "." Q
- . ;
- . ;Update the EXCEPTION STATUS (#6) field to '1' - PROCESSED.
- . S DA(1)=RGIEN,DA=RGEXIEN,DR="6///1"
- . S DIE="^RGHL7(991.1,"_DA(1)_",1,"
- . L +^RGHL7(991.1,RGIEN):10
- . D ^DIE
- . L -^RGHL7(991.1,RGIEN)
- . S RGCOUNT=RGCOUNT+1
- ;
- D BMES^XPDUTL(" A total of "_RGCOUNT_" Primary View Reject exceptions were retired.")
- D MES^XPDUTL(" Post-install routine completed successfully.")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGP62PST 1477 printed Mar 13, 2025@20:47:18 Page 2
- 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
- +2 ;
- +3 ; Loop through the CIRN HL7 EXCEPTION LOG (#991.1) file "AC"
- +4 ; cross reference for the 234 (Primary View Reject) exceptions.
- +5 ; See if they are EXCEPTION STATUS of NOT PROCESSED ("0").
- +6 ; Mark the EXCEPTION STATUS to PROCESSED ("1").
- +7 ; Exception type 234 is obsolete.
- +8 ;
- EXLOG ;
- +1 ;If patch RG*1.0*62 has previously been installed, quit post-init.
- +2 IF $$PATCH^XPDUTL("RG*1.0*62")
- DO BMES^XPDUTL(" Post-install previously ran; no need to reprocess file 991.1 again.")
- QUIT
- +3 ;
- +4 DO BMES^XPDUTL(" The post-init routine will retire Primary View Reject (234)")
- +5 DO MES^XPDUTL(" exceptions in the CIRN HL7 EXCEPTION LOG (#991.1) file.")
- +6 ;
- +7 NEW RGCOUNT,DA,DIE,DR,RGEXIEN,RGIEN,X,Y
- +8 ;
- +9 SET (RGCOUNT,RGIEN)=0
- +10 FOR
- SET RGIEN=$ORDER(^RGHL7(991.1,"AC",234,RGIEN))
- if 'RGIEN
- QUIT
- SET RGEXIEN=0
- FOR
- SET RGEXIEN=$ORDER(^RGHL7(991.1,RGIEN,1,RGEXIEN))
- if 'RGEXIEN
- QUIT
- Begin DoDot:1
- +11 ;
- +12 ; quit if processed
- +13 IF $PIECE(^RGHL7(991.1,RGIEN,1,RGEXIEN,0),"^",5)=1
- QUIT
- +14 ;I RGCOUNT=3 W "." Q
- +15 ;
- +16 ;Update the EXCEPTION STATUS (#6) field to '1' - PROCESSED.
- +17 SET DA(1)=RGIEN
- SET DA=RGEXIEN
- SET DR="6///1"
- +18 SET DIE="^RGHL7(991.1,"_DA(1)_",1,"
- +19 LOCK +^RGHL7(991.1,RGIEN):10
- +20 DO ^DIE
- +21 LOCK -^RGHL7(991.1,RGIEN)
- +22 SET RGCOUNT=RGCOUNT+1
- End DoDot:1
- +23 ;
- +24 DO BMES^XPDUTL(" A total of "_RGCOUNT_" Primary View Reject exceptions were retired.")
- +25 DO MES^XPDUTL(" Post-install routine completed successfully.")
- +26 QUIT