GMTSP67E ;ISP/WAT - HEALTH SUMMARY PATCH 67 ENVIRONMENT CHECK TASKS ;Jul 18, 2019@11:20
;;2.7;Health Summary;**67**;Oct 20, 1995;Build 538
;check for and warn installer about duplicate Names or Abbreviations between local system and incoming national components (142.1)
D INFO,CONT
N GMTSITEM,GMTSINC,GMTSFLG,GMTSCONT,GMTSIEN S (GMTSITEM,GMTSINC)="",(GMTSFLG,GMTSCONT,GMTSIEN)=0
F GMTSINC=1:1 S GMTSITEM=$P($T(ABV+GMTSINC),";",3),GMTSIEN=$P(GMTSITEM,U,2),GMTSITEM=$P(GMTSITEM,U) Q:GMTSITEM="EOF" D
.Q:$D(^GMT(142.1,"C",GMTSITEM))&(GMTSIEN=+$O(^GMT(142.1,"C",GMTSITEM,""))) ;for test sites & multiple installs
.I $D(^GMT(142.1,"C",GMTSITEM)) D ;report conflict if abbreviation found
.. W !,"CONFLICT: "_GMTSITEM_" is an existing ABBREVIATION for IEN "_+$O(^GMT(142.1,"C",GMTSITEM,""))
..S GMTSFLG=1
S (GMTSITEM,GMTSINC)="",GMTSCONT=0
F GMTSINC=1:1 S GMTSITEM=$P($T(NAME+GMTSINC),";",3),GMTSIEN=$P(GMTSITEM,U,2),GMTSITEM=$P(GMTSITEM,U) Q:GMTSITEM="EOF" D
.Q:$D(^GMT(142.1,"B",GMTSITEM))&(GMTSIEN=+$O(^GMT(142.1,"B",GMTSITEM,""))) ;for test sites & multiple installs
.I $D(^GMT(142.1,"B",GMTSITEM)) D ;report conflict if name found
..W !,"CONFLICT: "_GMTSITEM_" is an existing NAME for IEN "_+$O(^GMT(142.1,"B",GMTSITEM,""))
..S GMTSFLG=1
S:GMTSFLG GMTSCONT=$$OW
W:$G(GMTSCONT)=1 !,"OK - Install will continue"
I GMTSFLG=0,GMTSCONT=0 D
.W !,"Environment check complete. No conflicts found."
Q
INFO ; info
W !,"New Health Summary Component (#142.1) entries will be installed by this"
W !,"patch. NAME (.01) and ABBREVIATION (4) values should be unique throughout"
W !,"this file. Any conflicts found will be written to the screen and you will"
W !,"have the choice to continue with installation or abort. Conflicts do not"
W !,"prevent you from installing, but should be addressed soon after install.",!
Q
CONT() ; -- read output before continuing
N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
S DIR(0)="FO",DIR("A")="<Enter> to continue"
D ^DIR
Q
OW() ;ASK THE USER TO CONTINUE WITH INSTALLATION
N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
W !!,"Installation *may* continue, but you must record these conflicts and"
W !,"pass along to the appropriate site resource for review and edit of"
W !,"local/existing items.",!
S DIR(0)="Y^",DIR("A")="Do you wish to proceed with installation of this patch",DIR("B")="NO"
D ^DIR
W !
S:+$G(Y)=0 XPDQUIT=2
Q:$G(XPDQUIT)=2 +$G(Y)
Q +$G(Y)
ABV ;abbreviations
;;WHL^260
;;WHP^259
;;WHPL^266
;;EOF
NAME ;names
;;WH LACTATION DOCUMENTATION^260
;;WH PREGNANCY DOCUMENTATION^259
;;WH PREGNANCY & LACTATION DOC^266
;;EOF
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSP67E 2639 printed Dec 13, 2024@01:58:59 Page 2
GMTSP67E ;ISP/WAT - HEALTH SUMMARY PATCH 67 ENVIRONMENT CHECK TASKS ;Jul 18, 2019@11:20
+1 ;;2.7;Health Summary;**67**;Oct 20, 1995;Build 538
+2 ;check for and warn installer about duplicate Names or Abbreviations between local system and incoming national components (142.1)
+3 DO INFO
DO CONT
+4 NEW GMTSITEM,GMTSINC,GMTSFLG,GMTSCONT,GMTSIEN
SET (GMTSITEM,GMTSINC)=""
SET (GMTSFLG,GMTSCONT,GMTSIEN)=0
+5 FOR GMTSINC=1:1
SET GMTSITEM=$PIECE($TEXT(ABV+GMTSINC),";",3)
SET GMTSIEN=$PIECE(GMTSITEM,U,2)
SET GMTSITEM=$PIECE(GMTSITEM,U)
if GMTSITEM="EOF"
QUIT
Begin DoDot:1
+6 ;for test sites & multiple installs
if $DATA(^GMT(142.1,"C",GMTSITEM))&(GMTSIEN=+$ORDER(^GMT(142.1,"C",GMTSITEM,"")))
QUIT
+7 ;report conflict if abbreviation found
IF $DATA(^GMT(142.1,"C",GMTSITEM))
Begin DoDot:2
+8 WRITE !,"CONFLICT: "_GMTSITEM_" is an existing ABBREVIATION for IEN "_+$ORDER(^GMT(142.1,"C",GMTSITEM,""))
+9 SET GMTSFLG=1
End DoDot:2
End DoDot:1
+10 SET (GMTSITEM,GMTSINC)=""
SET GMTSCONT=0
+11 FOR GMTSINC=1:1
SET GMTSITEM=$PIECE($TEXT(NAME+GMTSINC),";",3)
SET GMTSIEN=$PIECE(GMTSITEM,U,2)
SET GMTSITEM=$PIECE(GMTSITEM,U)
if GMTSITEM="EOF"
QUIT
Begin DoDot:1
+12 ;for test sites & multiple installs
if $DATA(^GMT(142.1,"B",GMTSITEM))&(GMTSIEN=+$ORDER(^GMT(142.1,"B",GMTSITEM,"")))
QUIT
+13 ;report conflict if name found
IF $DATA(^GMT(142.1,"B",GMTSITEM))
Begin DoDot:2
+14 WRITE !,"CONFLICT: "_GMTSITEM_" is an existing NAME for IEN "_+$ORDER(^GMT(142.1,"B",GMTSITEM,""))
+15 SET GMTSFLG=1
End DoDot:2
End DoDot:1
+16 if GMTSFLG
SET GMTSCONT=$$OW
+17 if $GET(GMTSCONT)=1
WRITE !,"OK - Install will continue"
+18 IF GMTSFLG=0
IF GMTSCONT=0
Begin DoDot:1
+19 WRITE !,"Environment check complete. No conflicts found."
End DoDot:1
+20 QUIT
INFO ; info
+1 WRITE !,"New Health Summary Component (#142.1) entries will be installed by this"
+2 WRITE !,"patch. NAME (.01) and ABBREVIATION (4) values should be unique throughout"
+3 WRITE !,"this file. Any conflicts found will be written to the screen and you will"
+4 WRITE !,"have the choice to continue with installation or abort. Conflicts do not"
+5 WRITE !,"prevent you from installing, but should be addressed soon after install.",!
+6 QUIT
CONT() ; -- read output before continuing
+1 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
+2 SET DIR(0)="FO"
SET DIR("A")="<Enter> to continue"
+3 DO ^DIR
+4 QUIT
OW() ;ASK THE USER TO CONTINUE WITH INSTALLATION
+1 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
+2 WRITE !!,"Installation *may* continue, but you must record these conflicts and"
+3 WRITE !,"pass along to the appropriate site resource for review and edit of"
+4 WRITE !,"local/existing items.",!
+5 SET DIR(0)="Y^"
SET DIR("A")="Do you wish to proceed with installation of this patch"
SET DIR("B")="NO"
+6 DO ^DIR
+7 WRITE !
+8 if +$GET(Y)=0
SET XPDQUIT=2
+9 if $GET(XPDQUIT)=2
QUIT +$GET(Y)
+10 QUIT +$GET(Y)
ABV ;abbreviations
+1 ;;WHL^260
+2 ;;WHP^259
+3 ;;WHPL^266
+4 ;;EOF
NAME ;names
+1 ;;WH LACTATION DOCUMENTATION^260
+2 ;;WH PREGNANCY DOCUMENTATION^259
+3 ;;WH PREGNANCY & LACTATION DOC^266
+4 ;;EOF