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

ENX3IPS.m

Go to the documentation of this file.
  1. ENX3IPS ;WIRMFO/DH-POST-INIT ;2.23.98
  1. ;;7.0;ENGINEERING;**48**;Aug 17, 1993
  1. ;
  1. I $$PATCH^XPDUTL("EN*7.0*48") D BMES^XPDUTL("Post-initialization has already been done.") Q ;No need to do this more than once!
  1. N DA,NEWID
  1. D BMES^XPDUTL("Converting equipment maintenance histories")
  1. S DA=0 F S DA=$O(^ENG(6914,DA)) Q:'DA S DA(1)=0 F S DA(1)=$O(^ENG(6914,DA,6,DA(1))) Q:'DA(1) D
  1. . W:'(DA#20) "."
  1. . I $E(^ENG(6914,DA,6,DA(1),0))=0 D Q
  1. . . S ENRN=(9999999-(3_$E(^ENG(6914,DA,6,DA(1),0),1,6)))*10
  1. . . S ^ENG(6914,DA,6,ENRN,0)=3_^ENG(6914,DA,6,DA(1),0)
  1. . . K ^ENG(6914,DA,6,DA(1)) ;no x-refs
  1. . S ^ENG(6914,DA,6,DA(1),0)=2_^ENG(6914,DA,6,DA(1),0)
  1. ;
  1. D BMES^XPDUTL("Converting Accident Report LOCAL ENGINEERING #s ...")
  1. S DIE="^ENG(""FSA"",",DA=0 F S DA=$O(^ENG("FSA",DA)) Q:'DA D
  1. . W:'(DA#20) "."
  1. . S NEWID="19"_$P($G(^ENG("FSA",DA,0)),U)
  1. . I NEWID?8N S DR=".01///^S X=NEWID" D ^DIE
  1. ; now increment length of LOCAL ENGINEERING #
  1. S DA(1)=$O(^ENG(6910.9,"B","ENFSA1",0)) Q:'DA(1)
  1. S DA=$O(^ENG(6910.9,DA(1),1,"B","LOCAL ENGINEERING #(R)",0)) Q:'DA
  1. S DIE="^ENG(6910.9,"_DA(1)_",1,",DR=".03///^S X=8" D ^DIE
  1. ;
  1. BERS D BMES^XPDUTL("Converting BERS Survey File (#6916)")
  1. N NEWID,FY
  1. S DIE="^ENGS(6916,",DA=0 F S DA=$O(^ENGS(6916,DA)) Q:'DA D
  1. . Q:$P(^ENGS(6916,DA,0),U)["-"
  1. . S NEWID="19"_$E($P(^ENGS(6916,DA,0),U),1,2)_"-"_$E($P(^(0),U),3,5)
  1. . S DR=".01///^S X=NEWID" D ^DIE
  1. . S FY=$P(^ENGS(6916,DA,0),U,4) I FY?2N S DR="4///^S X=""19""_FY" D ^DIE
  1. . W "."
  1. Q
  1. ;ENX3IPS