GMTSP78 ;ISP/TDP - PRE/POST INSTALL FOR GMTS*2.7*78; 8/25/2005
;;2.7;Health Summary;**78**;Oct 20, 1995
Q
;
POST ; Start of Post-init for patch GMTS*2.7*78
N %
S %=$$NEWCP^XPDUTL("POST1","POST1^GMTSP78")
Q
POST1 ;
D BMES^XPDUTL("Starting Post-init...")
D SEARCH
D BMES^XPDUTL("Post-init complete.")
Q
;
SEARCH ; Search EXTERNAL/EXTRACT ROUTINE (#1.1) field of the HEALTH SUMMARY
; COMPONENT (#142.1) file for EN1;GMRVUT0 and replace with EN1;GMVHS.
N CNT,DA,DIC,DIE,DO,DR,GMTSCHG,GMTSEXRT,GMTSIEN,GMTSRTN,GMTSVARY,GMTSVITL,X,Y
S GMTSRTN="EN1;GMVHS"
S GMTSVARY="VITAL SIGNS^VITAL SIGNS DETAILED DISPLAY^VITAL SIGNS OUTPATIENT^VITAL SIGNS SELECTED^VITAL SIGNS SELECTED OUTPAT."
F CNT=1:1:5 S GMTSVITL=$P(GMTSVARY,"^",CNT) D
. S GMTSIEN=0 F S GMTSIEN=$O(^GMT(142.1,"B",GMTSVITL,GMTSIEN)) Q:GMTSIEN="" D
.. S GMTSCHG=0
.. I $O(^GMT(142.1,GMTSIEN,.1,"B",GMTSRTN,0)) D Q
... D BMES^XPDUTL(">>> EXTERNAL/EXTRACT ROUTINE FOR "_GMTSVITL_" HEALTH"),MES^XPDUTL(">>> SUMMARY COMPONENT ALREADY CONTAINS EN1;GMVHS. NO CHANGES MADE.")
.. S GMTSEXRT=$O(^GMT(142.1,GMTSIEN,.1,"B","EN1;GMRVUT0",0))
.. I GMTSEXRT'="" D
... S DIE="^GMT(142.1,"_GMTSIEN_",.1,",DA=GMTSEXRT,DA(1)=GMTSIEN,DR=".01////@"
... D ^DIE K DIE,DA,DR
... S GMTSCHG=1
.. K DO
.. S DA=+$P($G(^GMT(142.1,GMTSIEN,.1,0)),U,3)+1,DA(1)=GMTSIEN
.. S DIC="^GMT(142.1,GMTSIEN,.1,",DIC(0)="L",X=GMTSRTN
.. D FILE^DICN
.. I GMTSCHG=0 D
... I Y=-1 D BMES^XPDUTL(">>> ERROR TRYING TO ADD EXTERNAL/EXTRACT ROUTINE OF EN1;GMVHS TO"),MES^XPDUTL(">>> "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
... I Y>0 D BMES^XPDUTL(">>> EXTERNAL/EXTRACT ROUTINE OF EN1;GMVHS HAS BEEN ADDED TO"),MES^XPDUTL(">>> "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
.. I GMTSCHG=1 D
... I Y=-1 D BMES^XPDUTL(">>> ERROR TRYING TO CHANGE EXTERNAL/EXTRACT ROUTINE FROM EN1;GMRVUT0"),MES^XPDUTL(">>> TO EN1;GMVHS FOR "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
... I Y>0 D BMES^XPDUTL(">>> CHANGED EXTERNAL/EXTRACT ROUTINE FROM EN1;GMRVUT0 TO EN1;GMVHS FOR"),MES^XPDUTL(">>> "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
.. K DA,DIC,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSP78 2113 printed Nov 22, 2024@17:09:08 Page 2
GMTSP78 ;ISP/TDP - PRE/POST INSTALL FOR GMTS*2.7*78; 8/25/2005
+1 ;;2.7;Health Summary;**78**;Oct 20, 1995
+2 QUIT
+3 ;
POST ; Start of Post-init for patch GMTS*2.7*78
+1 NEW %
+2 SET %=$$NEWCP^XPDUTL("POST1","POST1^GMTSP78")
+3 QUIT
POST1 ;
+1 DO BMES^XPDUTL("Starting Post-init...")
+2 DO SEARCH
+3 DO BMES^XPDUTL("Post-init complete.")
+4 QUIT
+5 ;
SEARCH ; Search EXTERNAL/EXTRACT ROUTINE (#1.1) field of the HEALTH SUMMARY
+1 ; COMPONENT (#142.1) file for EN1;GMRVUT0 and replace with EN1;GMVHS.
+2 NEW CNT,DA,DIC,DIE,DO,DR,GMTSCHG,GMTSEXRT,GMTSIEN,GMTSRTN,GMTSVARY,GMTSVITL,X,Y
+3 SET GMTSRTN="EN1;GMVHS"
+4 SET GMTSVARY="VITAL SIGNS^VITAL SIGNS DETAILED DISPLAY^VITAL SIGNS OUTPATIENT^VITAL SIGNS SELECTED^VITAL SIGNS SELECTED OUTPAT."
+5 FOR CNT=1:1:5
SET GMTSVITL=$PIECE(GMTSVARY,"^",CNT)
Begin DoDot:1
+6 SET GMTSIEN=0
FOR
SET GMTSIEN=$ORDER(^GMT(142.1,"B",GMTSVITL,GMTSIEN))
if GMTSIEN=""
QUIT
Begin DoDot:2
+7 SET GMTSCHG=0
+8 IF $ORDER(^GMT(142.1,GMTSIEN,.1,"B",GMTSRTN,0))
Begin DoDot:3
+9 DO BMES^XPDUTL(">>> EXTERNAL/EXTRACT ROUTINE FOR "_GMTSVITL_" HEALTH")
DO MES^XPDUTL(">>> SUMMARY COMPONENT ALREADY CONTAINS EN1;GMVHS. NO CHANGES MADE.")
End DoDot:3
QUIT
+10 SET GMTSEXRT=$ORDER(^GMT(142.1,GMTSIEN,.1,"B","EN1;GMRVUT0",0))
+11 IF GMTSEXRT'=""
Begin DoDot:3
+12 SET DIE="^GMT(142.1,"_GMTSIEN_",.1,"
SET DA=GMTSEXRT
SET DA(1)=GMTSIEN
SET DR=".01////@"
+13 DO ^DIE
KILL DIE,DA,DR
+14 SET GMTSCHG=1
End DoDot:3
+15 KILL DO
+16 SET DA=+$PIECE($GET(^GMT(142.1,GMTSIEN,.1,0)),U,3)+1
SET DA(1)=GMTSIEN
+17 SET DIC="^GMT(142.1,GMTSIEN,.1,"
SET DIC(0)="L"
SET X=GMTSRTN
+18 DO FILE^DICN
+19 IF GMTSCHG=0
Begin DoDot:3
+20 IF Y=-1
DO BMES^XPDUTL(">>> ERROR TRYING TO ADD EXTERNAL/EXTRACT ROUTINE OF EN1;GMVHS TO")
DO MES^XPDUTL(">>> "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
+21 IF Y>0
DO BMES^XPDUTL(">>> EXTERNAL/EXTRACT ROUTINE OF EN1;GMVHS HAS BEEN ADDED TO")
DO MES^XPDUTL(">>> "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
End DoDot:3
+22 IF GMTSCHG=1
Begin DoDot:3
+23 IF Y=-1
DO BMES^XPDUTL(">>> ERROR TRYING TO CHANGE EXTERNAL/EXTRACT ROUTINE FROM EN1;GMRVUT0")
DO MES^XPDUTL(">>> TO EN1;GMVHS FOR "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
+24 IF Y>0
DO BMES^XPDUTL(">>> CHANGED EXTERNAL/EXTRACT ROUTINE FROM EN1;GMRVUT0 TO EN1;GMVHS FOR")
DO MES^XPDUTL(">>> "_GMTSVITL_" HEALTH SUMMARY COMPONENT.")
End DoDot:3
+25 KILL DA,DIC,X,Y
End DoDot:2
End DoDot:1
+26 QUIT