ENXPIPS ;WIRMFO/SAB-POST-INIT ;4.11.97
;;7.0;ENGINEERING;**35**;AUG 17, 1993
;
; *** test site only section - remove for national release
;D BMES^XPDUTL(" Restoring Model cross-reference as regular...")
;K ^ENG(6914,"E")
;K DA S DIK="^ENG(6914,",DIK(1)="4^1" D ENALL^DIK K DIK
;D BMES^XPDUTL(" Restoring Serial cross-reference as regular...")
;K ^ENG(6914,"F")
;K DA S DIK="^ENG(6914,",DIK(1)="5^1" D ENALL^DIK K DIK
; *** end test site only section
;
Q:$$PATCH^XPDUTL("EN*7.0*35") ; only do during 1st install
;
; create KIDS checkpoints with call backs
F ENX="EQMODXF","EQSERXF","ZZMAN","PMPROC","MISC","LOC" D
. S Y=$$NEWCP^XPDUTL(ENX,ENX_"^ENXPIPS")
. I 'Y D DMES^XPDUTL("ERROR Creating "_ENX_" Checkpoint.")
Q
;
EQMODXF ; build new equipment model trigger cross-reference
N DA,DIK
D BMES^XPDUTL(" Building new Model cross-reference...")
K DA S DIK="^ENG(6914,",DIK(1)="4^2" D ENALL^DIK K DIK
Q
;
EQSERXF ; rebuild equipment serial # cross-references
N DA,DIK
D BMES^XPDUTL(" Building new Serial # cross-reference...")
K DA S DIK="^ENG(6914,",DIK(1)="5^2" D ENALL^DIK K DIK
Q
;
ZZMAN ; remove ZZ prefixes from #6912 local entries when not duplicate
N DA,DIE,ENX,X,Y
D BMES^XPDUTL(" Removing ZZ prefixes from Manufacturer List (#6912)")
S DIE="^ENG(""MFG"",",DR=".01///^S X=ENX"
S DA=49999
F S DA=$O(^ENG("MFG",DA)) Q:'DA S Y=$G(^(DA,0)) D:$E($P(Y,U),1,2)="ZZ"
. S ENX=$E($P(Y,U),3,99)
. I ENX]"",'$O(^ENG("MFG","B",ENX,0)) D ^DIE
Q
;
PMPROC ; Build new "C" xref: PM PROCEDURES (#69114.2) file PROCEDURE TITLE (#1)
N DA,DIK
D BMES^XPDUTL(" Building new 'C' x-ref in PM PROCEDURES (#6914.2)...")
S DIK="^ENG(6914.2,",DIK(1)="1" D ENALL^DIK K DIK
Q
;
MISC ; beginning of misc stuff
N DA,DIK
SECT ; Build new "C" xref: ENG SECTION LIST (#6922) file ABBREVIATION (#1)
D BMES^XPDUTL(" Building new 'C' x-ref in ENG SECTION LIST (#6922)...")
S DIK="^DIC(6922,",DIK(1)="1" D ENALL^DIK K DIK
;
BIOMED ; Use ENWOBIOCLSE for shop 35 (Biomed) work order close out
I $G(^DIC(6922,35,0))]"",$P(^(0),U,5)="" S $P(^(0),U,5)=1
;
ASKCC ; Loop thru shops and enable ASK CONDITION CODE
D BMES^XPDUTL(" Setting ASK CONDITION CODE to ALWAYS for Sections...")
S ENDA=0 F S ENDA=$O(^DIC(6922,ENDA)) Q:'ENDA D
. S:$P($G(^DIC(6922,ENDA,0)),U,4)="" $P(^(0),U,4)=2
;
IIWO ; Set Incoming Inspection Software Option to 2
D BMES^XPDUTL(" Set ASK INCOMING INSPECTION W.O. Software Option to YES...")
S ENI=$O(^ENG(6910.2,"B","ASK INCOMING INSPECTION W.O.",0))
I ENI,$P(^ENG(6910.2,ENI,0),U,2)="" S $P(^ENG(6910.2,ENI,0),U,2)="2"
;
BLDGXR ; Build regular x-ref of File 6928.3 by DIVISION
N DA,DIK
D BMES^XPDUTL(" Building regular DIVISION x-ref on File 6928.3.")
S DIK="^ENG(6928.3,",DIK(1)=".2" D ENALL^DIK
;
MISCX ; end of misc stuff
Q
;
LOC ; check exported templates for local version
N ENTEXT,ENTYP,ENX,ENY
D BMES^XPDUTL(" Checking for local versions of patched templates...")
D LINPT^ENXPIEN ; input templates
D LSRTT^ENXPIEN ; sort templates
D LPRTT^ENXPIEN ; print templates
; report existence of local templates
I '$D(ENY) D MES^XPDUTL(" none found.")
I $D(ENY) D
. D MES^XPDUTL(" Local versions of patched template(s) exist. These local template(s)")
. D MES^XPDUTL(" are used in lieu of the national template(s) modified by this patch.")
. D BMES^XPDUTL(" The following local template(s) should be examined and updated")
. D MES^XPDUTL(" to include any appropriate changes made by this patch to the")
. D MES^XPDUTL(" corresponding national template.")
. S ENTEXT=" Local Template Type File Patched National Template"
. D BMES^XPDUTL(ENTEXT)
. S ENTEXT=" ------------------------- ----- -------- -------------------------"
. D MES^XPDUTL(ENTEXT)
. F ENTYP="INP","SRT","PRT" D
. . S ENTYP("E")=$S(ENTYP="INP":"Input",ENTYP="SRT":"Sort ",ENTYP="PRT":"Print",1:"")
. . S ENX("L")="" F S ENX("L")=$O(ENY(ENTYP,ENX("L"))) Q:ENX("L")="" D
. . . S ENTEXT=" "_$$LJ^XLFSTR(ENX("L"),25)
. . . S ENTEXT=ENTEXT_" "_ENTYP("E")
. . . S ENTEXT=ENTEXT_" "_$$LJ^XLFSTR($P(ENY(ENTYP,ENX("L")),U,3),8)
. . . S ENTEXT=ENTEXT_" "_$P(ENY(ENTYP,ENX("L")),U,2)
. . . D MES^XPDUTL(ENTEXT)
Q
;ENXPIPS
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENXPIPS 4316 printed Dec 13, 2024@01:57:03 Page 2
ENXPIPS ;WIRMFO/SAB-POST-INIT ;4.11.97
+1 ;;7.0;ENGINEERING;**35**;AUG 17, 1993
+2 ;
+3 ; *** test site only section - remove for national release
+4 ;D BMES^XPDUTL(" Restoring Model cross-reference as regular...")
+5 ;K ^ENG(6914,"E")
+6 ;K DA S DIK="^ENG(6914,",DIK(1)="4^1" D ENALL^DIK K DIK
+7 ;D BMES^XPDUTL(" Restoring Serial cross-reference as regular...")
+8 ;K ^ENG(6914,"F")
+9 ;K DA S DIK="^ENG(6914,",DIK(1)="5^1" D ENALL^DIK K DIK
+10 ; *** end test site only section
+11 ;
+12 ; only do during 1st install
if $$PATCH^XPDUTL("EN*7.0*35")
QUIT
+13 ;
+14 ; create KIDS checkpoints with call backs
+15 FOR ENX="EQMODXF","EQSERXF","ZZMAN","PMPROC","MISC","LOC"
Begin DoDot:1
+16 SET Y=$$NEWCP^XPDUTL(ENX,ENX_"^ENXPIPS")
+17 IF 'Y
DO DMES^XPDUTL("ERROR Creating "_ENX_" Checkpoint.")
End DoDot:1
+18 QUIT
+19 ;
EQMODXF ; build new equipment model trigger cross-reference
+1 NEW DA,DIK
+2 DO BMES^XPDUTL(" Building new Model cross-reference...")
+3 KILL DA
SET DIK="^ENG(6914,"
SET DIK(1)="4^2"
DO ENALL^DIK
KILL DIK
+4 QUIT
+5 ;
EQSERXF ; rebuild equipment serial # cross-references
+1 NEW DA,DIK
+2 DO BMES^XPDUTL(" Building new Serial # cross-reference...")
+3 KILL DA
SET DIK="^ENG(6914,"
SET DIK(1)="5^2"
DO ENALL^DIK
KILL DIK
+4 QUIT
+5 ;
ZZMAN ; remove ZZ prefixes from #6912 local entries when not duplicate
+1 NEW DA,DIE,ENX,X,Y
+2 DO BMES^XPDUTL(" Removing ZZ prefixes from Manufacturer List (#6912)")
+3 SET DIE="^ENG(""MFG"","
SET DR=".01///^S X=ENX"
+4 SET DA=49999
+5 FOR
SET DA=$ORDER(^ENG("MFG",DA))
if 'DA
QUIT
SET Y=$GET(^(DA,0))
if $EXTRACT($PIECE(Y,U),1,2)="ZZ"
Begin DoDot:1
+6 SET ENX=$EXTRACT($PIECE(Y,U),3,99)
+7 IF ENX]""
IF '$ORDER(^ENG("MFG","B",ENX,0))
DO ^DIE
End DoDot:1
+8 QUIT
+9 ;
PMPROC ; Build new "C" xref: PM PROCEDURES (#69114.2) file PROCEDURE TITLE (#1)
+1 NEW DA,DIK
+2 DO BMES^XPDUTL(" Building new 'C' x-ref in PM PROCEDURES (#6914.2)...")
+3 SET DIK="^ENG(6914.2,"
SET DIK(1)="1"
DO ENALL^DIK
KILL DIK
+4 QUIT
+5 ;
MISC ; beginning of misc stuff
+1 NEW DA,DIK
SECT ; Build new "C" xref: ENG SECTION LIST (#6922) file ABBREVIATION (#1)
+1 DO BMES^XPDUTL(" Building new 'C' x-ref in ENG SECTION LIST (#6922)...")
+2 SET DIK="^DIC(6922,"
SET DIK(1)="1"
DO ENALL^DIK
KILL DIK
+3 ;
BIOMED ; Use ENWOBIOCLSE for shop 35 (Biomed) work order close out
+1 IF $GET(^DIC(6922,35,0))]""
IF $PIECE(^(0),U,5)=""
SET $PIECE(^(0),U,5)=1
+2 ;
ASKCC ; Loop thru shops and enable ASK CONDITION CODE
+1 DO BMES^XPDUTL(" Setting ASK CONDITION CODE to ALWAYS for Sections...")
+2 SET ENDA=0
FOR
SET ENDA=$ORDER(^DIC(6922,ENDA))
if 'ENDA
QUIT
Begin DoDot:1
+3 if $PIECE($GET(^DIC(6922,ENDA,0)),U,4)=""
SET $PIECE(^(0),U,4)=2
End DoDot:1
+4 ;
IIWO ; Set Incoming Inspection Software Option to 2
+1 DO BMES^XPDUTL(" Set ASK INCOMING INSPECTION W.O. Software Option to YES...")
+2 SET ENI=$ORDER(^ENG(6910.2,"B","ASK INCOMING INSPECTION W.O.",0))
+3 IF ENI
IF $PIECE(^ENG(6910.2,ENI,0),U,2)=""
SET $PIECE(^ENG(6910.2,ENI,0),U,2)="2"
+4 ;
BLDGXR ; Build regular x-ref of File 6928.3 by DIVISION
+1 NEW DA,DIK
+2 DO BMES^XPDUTL(" Building regular DIVISION x-ref on File 6928.3.")
+3 SET DIK="^ENG(6928.3,"
SET DIK(1)=".2"
DO ENALL^DIK
+4 ;
MISCX ; end of misc stuff
+1 QUIT
+2 ;
LOC ; check exported templates for local version
+1 NEW ENTEXT,ENTYP,ENX,ENY
+2 DO BMES^XPDUTL(" Checking for local versions of patched templates...")
+3 ; input templates
DO LINPT^ENXPIEN
+4 ; sort templates
DO LSRTT^ENXPIEN
+5 ; print templates
DO LPRTT^ENXPIEN
+6 ; report existence of local templates
+7 IF '$DATA(ENY)
DO MES^XPDUTL(" none found.")
+8 IF $DATA(ENY)
Begin DoDot:1
+9 DO MES^XPDUTL(" Local versions of patched template(s) exist. These local template(s)")
+10 DO MES^XPDUTL(" are used in lieu of the national template(s) modified by this patch.")
+11 DO BMES^XPDUTL(" The following local template(s) should be examined and updated")
+12 DO MES^XPDUTL(" to include any appropriate changes made by this patch to the")
+13 DO MES^XPDUTL(" corresponding national template.")
+14 SET ENTEXT=" Local Template Type File Patched National Template"
+15 DO BMES^XPDUTL(ENTEXT)
+16 SET ENTEXT=" ------------------------- ----- -------- -------------------------"
+17 DO MES^XPDUTL(ENTEXT)
+18 FOR ENTYP="INP","SRT","PRT"
Begin DoDot:2
+19 SET ENTYP("E")=$SELECT(ENTYP="INP":"Input",ENTYP="SRT":"Sort ",ENTYP="PRT":"Print",1:"")
+20 SET ENX("L")=""
FOR
SET ENX("L")=$ORDER(ENY(ENTYP,ENX("L")))
if ENX("L")=""
QUIT
Begin DoDot:3
+21 SET ENTEXT=" "_$$LJ^XLFSTR(ENX("L"),25)
+22 SET ENTEXT=ENTEXT_" "_ENTYP("E")
+23 SET ENTEXT=ENTEXT_" "_$$LJ^XLFSTR($PIECE(ENY(ENTYP,ENX("L")),U,3),8)
+24 SET ENTEXT=ENTEXT_" "_$PIECE(ENY(ENTYP,ENX("L")),U,2)
+25 DO MES^XPDUTL(ENTEXT)
End DoDot:3
End DoDot:2
End DoDot:1
+26 QUIT
+27 ;ENXPIPS