GMTSP109 ;MWA/VMP - install routine for GMTS*2.7*109 ; 5/23/13 2:35pm
;;2.7;Health Summary;**109**;;Build 4
Q ; should not be run from anywhere but entry
;
EN ; main entry point
N X,MSGCNT,GMTSMSG S MSGCNT=4
S X=$O(^GMT(142,"B","REMOTE CLINICAL DATA (1Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Clinical Data (1y)")
S X=$O(^GMT(142,"B","REMOTE CLINICAL DATA (3M)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Clinical Data (3m)")
S X=$O(^GMT(142,"B","REMOTE CLINICAL DATA (4Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Clinical Data (4y)")
S X=$O(^GMT(142,"B","REMOTE DEMO/VISITS/PCE (1Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Demo/Visits/PCE (1y)")
S X=$O(^GMT(142,"B","REMOTE DEMO/VISITS/PCE (3M)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Demo/Visits/PCE (3m)")
S X=$O(^GMT(142,"B","REMOTE DIS SUM/SURG/PROD (12Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Dis Sum/Surg/Prod (12y)")
S X=$O(^GMT(142,"B","REMOTE LABS ALL (1Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Labs All (1y)")
S X=$O(^GMT(142,"B","REMOTE LABS ALL (3M)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Labs All (3m)")
S X=$O(^GMT(142,"B","REMOTE LABS LONG VIEW (12Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Labs Long View (12y)")
S X=$O(^GMT(142,"B","REMOTE MEDS/LABS/ORDERS (1Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Meds/Labs/Orders (1y)")
S X=$O(^GMT(142,"B","REMOTE MEDS/LABS/ORDERS (3M)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Meds/Labs/Orders (3m)")
S X=$O(^GMT(142,"B","REMOTE MH HIGH RISK PATIENT",0)) I $D(^GMT(142,X)) D SET(X,"Remote MH High Risk Patient")
S X=$O(^GMT(142,"B","REMOTE ONCOLOGY VIEW",0)) I $D(^GMT(142,X)) D SET(X,"Remote Oncology View")
S X=$O(^GMT(142,"B","REMOTE TEXT REPORTS (1Y)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Text Reports (1y)")
S X=$O(^GMT(142,"B","REMOTE TEXT REPORTS (3M)",0)) I $D(^GMT(142,X)) D SET(X,"Remote Text Reports (3m)")
D SENDMAIL
Q
SET(GMTSIEN,NWTXT) ;sets the title to the new value and creates mail string
N DIE,DA,DR,OLDTXT S DIE="^GMT(142,",DA=GMTSIEN,DR=".02////"_NWTXT
S OLDTXT=$P($G(^GMT(142,GMTSIEN,"T")),U,1)
D ^DIE
S GMTSMSG(MSGCNT)=$P($G(^GMT(142,GMTSIEN,0)),U,1)_" (IEN #"_GMTSIEN_")",MSGCNT=MSGCNT+1
S GMTSMSG(MSGCNT)="FROM: "_OLDTXT_" TO: "_NWTXT,MSGCNT=MSGCNT+1
S GMTSMSG(MSGCNT)=" ",MSGCNT=MSGCNT+1
Q
;
SENDMAIL ; sends mailman message to inform that routine has run
N XMSUB,XMDUZ,XMTEXT,XMY,DIFROM
S GMTSMSG(1)="GMTS*2.7*109 install routine has completed"
S GMTSMSG(2)="The TITLES for the following HEALTH SUMMARY TYPES have been changed"
S GMTSMSG(3)=" "
I '$D(GMTSMSG(4)) S GMTSMSG(4)="No changes"
S XMSUB="GMTS*2.7*109 install routine has completed"
S XMDUZ="HEALTH SUMMARY PACKAGE"
S XMTEXT="GMTSMSG("
S XMY(DUZ)=""
D ^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSP109 2731 printed Nov 22, 2024@17:08:47 Page 2
GMTSP109 ;MWA/VMP - install routine for GMTS*2.7*109 ; 5/23/13 2:35pm
+1 ;;2.7;Health Summary;**109**;;Build 4
+2 ; should not be run from anywhere but entry
QUIT
+3 ;
EN ; main entry point
+1 NEW X,MSGCNT,GMTSMSG
SET MSGCNT=4
+2 SET X=$ORDER(^GMT(142,"B","REMOTE CLINICAL DATA (1Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Clinical Data (1y)")
+3 SET X=$ORDER(^GMT(142,"B","REMOTE CLINICAL DATA (3M)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Clinical Data (3m)")
+4 SET X=$ORDER(^GMT(142,"B","REMOTE CLINICAL DATA (4Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Clinical Data (4y)")
+5 SET X=$ORDER(^GMT(142,"B","REMOTE DEMO/VISITS/PCE (1Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Demo/Visits/PCE (1y)")
+6 SET X=$ORDER(^GMT(142,"B","REMOTE DEMO/VISITS/PCE (3M)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Demo/Visits/PCE (3m)")
+7 SET X=$ORDER(^GMT(142,"B","REMOTE DIS SUM/SURG/PROD (12Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Dis Sum/Surg/Prod (12y)")
+8 SET X=$ORDER(^GMT(142,"B","REMOTE LABS ALL (1Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Labs All (1y)")
+9 SET X=$ORDER(^GMT(142,"B","REMOTE LABS ALL (3M)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Labs All (3m)")
+10 SET X=$ORDER(^GMT(142,"B","REMOTE LABS LONG VIEW (12Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Labs Long View (12y)")
+11 SET X=$ORDER(^GMT(142,"B","REMOTE MEDS/LABS/ORDERS (1Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Meds/Labs/Orders (1y)")
+12 SET X=$ORDER(^GMT(142,"B","REMOTE MEDS/LABS/ORDERS (3M)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Meds/Labs/Orders (3m)")
+13 SET X=$ORDER(^GMT(142,"B","REMOTE MH HIGH RISK PATIENT",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote MH High Risk Patient")
+14 SET X=$ORDER(^GMT(142,"B","REMOTE ONCOLOGY VIEW",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Oncology View")
+15 SET X=$ORDER(^GMT(142,"B","REMOTE TEXT REPORTS (1Y)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Text Reports (1y)")
+16 SET X=$ORDER(^GMT(142,"B","REMOTE TEXT REPORTS (3M)",0))
IF $DATA(^GMT(142,X))
DO SET(X,"Remote Text Reports (3m)")
+17 DO SENDMAIL
+18 QUIT
SET(GMTSIEN,NWTXT) ;sets the title to the new value and creates mail string
+1 NEW DIE,DA,DR,OLDTXT
SET DIE="^GMT(142,"
SET DA=GMTSIEN
SET DR=".02////"_NWTXT
+2 SET OLDTXT=$PIECE($GET(^GMT(142,GMTSIEN,"T")),U,1)
+3 DO ^DIE
+4 SET GMTSMSG(MSGCNT)=$PIECE($GET(^GMT(142,GMTSIEN,0)),U,1)_" (IEN #"_GMTSIEN_")"
SET MSGCNT=MSGCNT+1
+5 SET GMTSMSG(MSGCNT)="FROM: "_OLDTXT_" TO: "_NWTXT
SET MSGCNT=MSGCNT+1
+6 SET GMTSMSG(MSGCNT)=" "
SET MSGCNT=MSGCNT+1
+7 QUIT
+8 ;
SENDMAIL ; sends mailman message to inform that routine has run
+1 NEW XMSUB,XMDUZ,XMTEXT,XMY,DIFROM
+2 SET GMTSMSG(1)="GMTS*2.7*109 install routine has completed"
+3 SET GMTSMSG(2)="The TITLES for the following HEALTH SUMMARY TYPES have been changed"
+4 SET GMTSMSG(3)=" "
+5 IF '$DATA(GMTSMSG(4))
SET GMTSMSG(4)="No changes"
+6 SET XMSUB="GMTS*2.7*109 install routine has completed"
+7 SET XMDUZ="HEALTH SUMMARY PACKAGE"
+8 SET XMTEXT="GMTSMSG("
+9 SET XMY(DUZ)=""
+10 DO ^XMD
+11 QUIT