TIUP258E ;;SP/WAT - Environment Check for TIU*1*258 ;03/30/17 15:50
;;1.0;TEXT INTEGRATION UTILITIES;**258**;Jun 20, 1997;Build 96
; environment check
;2051 $$FIND1^DIC
N TIUCDCDA,TIUCONS,TIUHDCDA,TIUCNT,TIUABORT
S TIUCNT=0
K ^TMP("TIUP258",$J)
;TIUCDCDA ; CARE COORD. DOC CLASS
;TIUHDCDA ; HOME TELE. DOC CLASS
;TIUCONS ; CONSULTS DOC CLASS
S TIUCDCDA=$$LU(8925.1,"CARE COORDINATION HOME TELEHEALTH NOTES","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")
S TIUHDCDA=$$LU(8925.1,"HOME TELEHEALTH NOTES","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")
S TIUCONS=$$LU(8925.1,"CONSULTS","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")
W !," Verifying installation environment...",!!
I +$$LU(8930,"CLINICAL COORDINATOR","X")'>0 W " Installation Error: User Class CLINICAL COORDINATOR cannot be found.",!! S TIUABORT=1
I +$$LU(8925.1,"CONSULTS","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")'>0 W " Installation Error: Cannot find CONSULTS document class.",!! S TIUABORT=1
W !,"Checking for existing document classes..."
W:+$G(TIUCDCDA)>0 !,"Document class found: CARE COORDINATION HOME TELEHEALTH NOTES"
W:+$G(TIUHDCDA)>0 !,"Document class found: HOME TELEHEALTH NOTES"
I +$G(TIUCDCDA)'>0&(+$G(TIUHDCDA)'>0) D
. W !," ENVIRONMENT NOTICE:",!
. W !," Document Class CARE COORDINATION HOME TELEHEALTH NOTES not found.",!
. W !," Document Class HOME TELEHEALTH NOTES not found.",!
. W !," This patch will install a new document class named",!
. W !," HOME TELEHEALTH NOTES which will be placed under the",!
. W !," PROGRESS NOTES document class."
W !!,"Document class check complete.",!!
W !,"Now checking for any local titles that may conflict with new national titles."
N TIUI,TITLESTR,TIUTTL0,TIUTTL1,TTL0DA,TTL1DA
F TIUI=1:1 S TITLESTR=$P($T(TITLES+TIUI),";",3) Q:TITLESTR="EOL" D
.S TIUTTL0=$P(TITLESTR,U) Q:TIUTTL0']""
.S TIUTTL1=$P(TITLESTR,U,2) Q:TIUTTL1']""
.S TTL0DA=$O(^TIU(8925.1,"B",TIUTTL0,""))
.S TTL1DA=$O(^TIU(8925.1,"B",TIUTTL1,""))
.I +$G(TTL0DA)>0 D
..I TIUTTL0["CONSULT"&('$$ISA^TIULX(+$G(TTL0DA),TIUCONS)) S:$P(^TIU(8925.1,TTL0DA,0),U,4)="DOC" ^TMP("TIUP258",$J,TIUCNT)=TIUTTL0_"(#"_+$G(TTL0DA)_")",TIUCNT=TIUCNT+1
.;;
.I +$G(TTL1DA)>0 D
..I TIUTTL1["CONSULT"&('$$ISA^TIULX(+$G(TTL1DA),TIUCONS)) S:$P(^TIU(8925.1,TTL1DA,0),U,4)="DOC" ^TMP("TIUP258",$J,TIUCNT)=TIUTTL1_"(#"_+$G(TTL1DA)_")",TIUCNT=TIUCNT+1
.;;
.I +TIUHDCDA>0 D
..I +$G(TTL0DA)>0 D
...I TIUTTL0'["CONSULT"&('$$ISA^TIULX(+$G(TTL0DA),$G(TIUHDCDA))) S:$P(^TIU(8925.1,TTL0DA,0),U,4)="DOC" ^TMP("TIUP258",$J,TIUCNT)=TIUTTL0_"(#"_+$G(TTL0DA)_")",TIUCNT=TIUCNT+1
..I +$G(TTL1DA)>0 D
...I TIUTTL1'["CONSULT"&('$$ISA^TIULX(+$G(TTL1DA),$G(TIUHDCDA))) S:$P(^TIU(8925.1,TTL1DA,0),U,4)="DOC" ^TMP("TIUP258",$J,TIUCNT)=TIUTTL1_"(#"_+$G(TTL1DA)_")",TIUCNT=TIUCNT+1
.;;
.I +TIUCDCDA>0 D
..I +$G(TTL0DA)>0 D
...I TIUTTL0'["CONSULT"&('$$ISA^TIULX(+$G(TTL0DA),$G(TIUCDCDA))) S:$P(^TIU(8925.1,TTL0DA,0),U,4)="DOC" ^TMP("TIUP258",$J,TIUCNT)=TIUTTL0_"(#"_+$G(TTL0DA)_")",TIUCNT=TIUCNT+1
..I +$G(TTL1DA)>0 D
...I TIUTTL1'["CONSULT"&('$$ISA^TIULX(+$G(TTL1DA),$G(TIUCDCDA))) S:$P(^TIU(8925.1,TTL1DA,0),U,4)="DOC" ^TMP("TIUP258",$J,TIUCNT)=TIUTTL1_"(#"_+$G(TTL1DA)_")",TIUCNT=TIUCNT+1
I $D(^TMP("TIUP258",$J))>0 D REPORT S TIUABORT=1
K ^TMP("TIUP258",$J)
I +$G(TIUABORT) W !!,"Please re-install HT TEMPLATES PROJECT 1.0 when corrections are complete.",!! S XPDABORT=1 Q
W !!,"Local title check complete. No conflicts found."
W !,"Environment check complete. Install will proceed.",!
Q
;
REPORT ; report any titles found
W !!,"***INSTALL ABORTING***",!! H 2
W !!,"The following title NAMES(.01) have been found in TIU DOCUMENT DEFINITION."
W !,"These titles are NOT part of the HOME TELEHEALTH NOTES document class or"
W !,"the CARE COORDINATION HOME TELEHEALTH NOTES document class."
W !,"These NAMES will clash with new National titles in patch TIU*1*258."
W !,"To correct this issue, please work with site staff to rename these titles.",!
W !,"Each title is listed with its IEN from file 8925.1, TIU DOCUMENT DEFINITION.",!
N TIUINC S TIUINC=""
F S TIUINC=$O(^TMP("TIUP258",$J,TIUINC)) Q:TIUINC="" D
.W !,^TMP("TIUP258",$J,TIUINC)
W !!,"**INSTALL WILL NOW ABORT. TRANSPORT GLOBAL(S) WILL BE UNLOADED**",!!
Q
LU(FILE,NAME,FLAGS,SCREEN,INDEXES) ; call FileMan Finder to look up file entry
Q $$FIND1^DIC(FILE,"",$G(FLAGS),NAME,$G(INDEXES),$G(SCREEN),"MSGERR")
;
TITLES ; list of titles NAME YOU ARE LOOKING FOR ^ WHAT IT WILL BE RENAMED TO ^ VHA ENT STD TITLE ^ MENU TEXT
;;CCHT SCREENING CONSULT^HT SCREENING CONSULT^CARE COORDINATION HOME TELEHEALTH CONSULT^HT Screening Consult
;;CARE COORDINATION HOME TELEHEALTH SUBSEQUENT EVAL NOTE^HT INTERVENTION NOTE^CARE COORDINATION HOME TELEHEALTH FOLLOW-UP NOTE^HT Subsequent Eval
;;CARE COORDINATION HOME TELEHEALTH SUMMARY OF EPISODE NOTE^HT SUMMARY OF EPISODE NOTE^CARE COORDINATION HOME TELEHEALTH SUMMARIZATION NOTE^HT Summary Episode
;;CCHT DISCHARGE NOTE^HT DISCHARGE NOTE^CARE COORDINATION HOME TELEHEALTH DISCHARGE NOTE^HT Discharge Note
;;CCHT VIDEO VISIT NOTE^HT VIDEO VISIT NOTE^CARE COORDINATION HOME TELEHEALTH VIDEO VISIT NOTE^HT Video Visit Note
;;CCHT ASSESSMENT TREATMENT PLAN NOTE^HT ASSESSMENT TREATMENT PLAN NOTE^CARE COORDINATION HOME TELEHEALTH TREATMENT PLAN NOTE^HT Assmnt Trmnt Plan
;;CCHT CAREGIVER ASSESSMENT NOTE^HT CAREGIVER ASSESSMENT NOTE^CARE COORDINATION HOME TELEHEALTH E & M NOTE^HT Caregiver Assmnt
;;CCHT CONTINUUM OF CARE NOTE^HT CONTINUUM OF CARE NOTE^CARE COORDINATION HOME TELEHEALTH E & M NOTE^HT Continuum Care
;;CCHT NOTE^HT NOTE^CARE COORDINATION HOME TELEHEALTH NOTE^HT Note
;;CCHT PERIODIC EVALUATION NOTE^HT PERIODIC EVALUATION NOTE^CARE COORDINATION HOME TELEHEALTH REPORT^HT Periodic Eval
;;CCHT TECH EDUCATION NOTE^HT TECH EDUCATION NOTE^CARE COORDINATION HOME TELEHEALTH EDUCATION NOTE^HT Tech Education
;;CCHT TELEPHONE CASE MANAGEMENT NOTE^HT TELEPHONE CASE MANAGEMENT NOTE^CARE COORDINATION HOME TELEHEALTH NOTE^HT Case Mgmt Note
;;EOL
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUP258E 6055 printed Nov 22, 2024@17:52:50 Page 2
TIUP258E ;;SP/WAT - Environment Check for TIU*1*258 ;03/30/17 15:50
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**258**;Jun 20, 1997;Build 96
+2 ; environment check
+3 ;2051 $$FIND1^DIC
+4 NEW TIUCDCDA,TIUCONS,TIUHDCDA,TIUCNT,TIUABORT
+5 SET TIUCNT=0
+6 KILL ^TMP("TIUP258",$JOB)
+7 ;TIUCDCDA ; CARE COORD. DOC CLASS
+8 ;TIUHDCDA ; HOME TELE. DOC CLASS
+9 ;TIUCONS ; CONSULTS DOC CLASS
+10 SET TIUCDCDA=$$LU(8925.1,"CARE COORDINATION HOME TELEHEALTH NOTES","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")
+11 SET TIUHDCDA=$$LU(8925.1,"HOME TELEHEALTH NOTES","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")
+12 SET TIUCONS=$$LU(8925.1,"CONSULTS","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")
+13 WRITE !," Verifying installation environment...",!!
+14 IF +$$LU(8930,"CLINICAL COORDINATOR","X")'>0
WRITE " Installation Error: User Class CLINICAL COORDINATOR cannot be found.",!!
SET TIUABORT=1
+15 IF +$$LU(8925.1,"CONSULTS","X","I $P(^TIU(8925.1,+Y,0),U,4)=""DC""")'>0
WRITE " Installation Error: Cannot find CONSULTS document class.",!!
SET TIUABORT=1
+16 WRITE !,"Checking for existing document classes..."
+17 if +$GET(TIUCDCDA)>0
WRITE !,"Document class found: CARE COORDINATION HOME TELEHEALTH NOTES"
+18 if +$GET(TIUHDCDA)>0
WRITE !,"Document class found: HOME TELEHEALTH NOTES"
+19 IF +$GET(TIUCDCDA)'>0&(+$GET(TIUHDCDA)'>0)
Begin DoDot:1
+20 WRITE !," ENVIRONMENT NOTICE:",!
+21 WRITE !," Document Class CARE COORDINATION HOME TELEHEALTH NOTES not found.",!
+22 WRITE !," Document Class HOME TELEHEALTH NOTES not found.",!
+23 WRITE !," This patch will install a new document class named",!
+24 WRITE !," HOME TELEHEALTH NOTES which will be placed under the",!
+25 WRITE !," PROGRESS NOTES document class."
End DoDot:1
+26 WRITE !!,"Document class check complete.",!!
+27 WRITE !,"Now checking for any local titles that may conflict with new national titles."
+28 NEW TIUI,TITLESTR,TIUTTL0,TIUTTL1,TTL0DA,TTL1DA
+29 FOR TIUI=1:1
SET TITLESTR=$PIECE($TEXT(TITLES+TIUI),";",3)
if TITLESTR="EOL"
QUIT
Begin DoDot:1
+30 SET TIUTTL0=$PIECE(TITLESTR,U)
if TIUTTL0']""
QUIT
+31 SET TIUTTL1=$PIECE(TITLESTR,U,2)
if TIUTTL1']""
QUIT
+32 SET TTL0DA=$ORDER(^TIU(8925.1,"B",TIUTTL0,""))
+33 SET TTL1DA=$ORDER(^TIU(8925.1,"B",TIUTTL1,""))
+34 IF +$GET(TTL0DA)>0
Begin DoDot:2
+35 IF TIUTTL0["CONSULT"&('$$ISA^TIULX(+$GET(TTL0DA),TIUCONS))
if $PIECE(^TIU(8925.1,TTL0DA,0),U,4)="DOC"
SET ^TMP("TIUP258",$JOB,TIUCNT)=TIUTTL0_"(#"_+$GET(TTL0DA)_")"
SET TIUCNT=TIUCNT+1
End DoDot:2
+36 ;;
+37 IF +$GET(TTL1DA)>0
Begin DoDot:2
+38 IF TIUTTL1["CONSULT"&('$$ISA^TIULX(+$GET(TTL1DA),TIUCONS))
if $PIECE(^TIU(8925.1,TTL1DA,0),U,4)="DOC"
SET ^TMP("TIUP258",$JOB,TIUCNT)=TIUTTL1_"(#"_+$GET(TTL1DA)_")"
SET TIUCNT=TIUCNT+1
End DoDot:2
+39 ;;
+40 IF +TIUHDCDA>0
Begin DoDot:2
+41 IF +$GET(TTL0DA)>0
Begin DoDot:3
+42 IF TIUTTL0'["CONSULT"&('$$ISA^TIULX(+$GET(TTL0DA),$GET(TIUHDCDA)))
if $PIECE(^TIU(8925.1,TTL0DA,0),U,4)="DOC"
SET ^TMP("TIUP258",$JOB,TIUCNT)=TIUTTL0_"(#"_+$GET(TTL0DA)_")"
SET TIUCNT=TIUCNT+1
End DoDot:3
+43 IF +$GET(TTL1DA)>0
Begin DoDot:3
+44 IF TIUTTL1'["CONSULT"&('$$ISA^TIULX(+$GET(TTL1DA),$GET(TIUHDCDA)))
if $PIECE(^TIU(8925.1,TTL1DA,0),U,4)="DOC"
SET ^TMP("TIUP258",$JOB,TIUCNT)=TIUTTL1_"(#"_+$GET(TTL1DA)_")"
SET TIUCNT=TIUCNT+1
End DoDot:3
End DoDot:2
+45 ;;
+46 IF +TIUCDCDA>0
Begin DoDot:2
+47 IF +$GET(TTL0DA)>0
Begin DoDot:3
+48 IF TIUTTL0'["CONSULT"&('$$ISA^TIULX(+$GET(TTL0DA),$GET(TIUCDCDA)))
if $PIECE(^TIU(8925.1,TTL0DA,0),U,4)="DOC"
SET ^TMP("TIUP258",$JOB,TIUCNT)=TIUTTL0_"(#"_+$GET(TTL0DA)_")"
SET TIUCNT=TIUCNT+1
End DoDot:3
+49 IF +$GET(TTL1DA)>0
Begin DoDot:3
+50 IF TIUTTL1'["CONSULT"&('$$ISA^TIULX(+$GET(TTL1DA),$GET(TIUCDCDA)))
if $PIECE(^TIU(8925.1,TTL1DA,0),U,4)="DOC"
SET ^TMP("TIUP258",$JOB,TIUCNT)=TIUTTL1_"(#"_+$GET(TTL1DA)_")"
SET TIUCNT=TIUCNT+1
End DoDot:3
End DoDot:2
End DoDot:1
+51 IF $DATA(^TMP("TIUP258",$JOB))>0
DO REPORT
SET TIUABORT=1
+52 KILL ^TMP("TIUP258",$JOB)
+53 IF +$GET(TIUABORT)
WRITE !!,"Please re-install HT TEMPLATES PROJECT 1.0 when corrections are complete.",!!
SET XPDABORT=1
QUIT
+54 WRITE !!,"Local title check complete. No conflicts found."
+55 WRITE !,"Environment check complete. Install will proceed.",!
+56 QUIT
+57 ;
REPORT ; report any titles found
+1 WRITE !!,"***INSTALL ABORTING***",!!
HANG 2
+2 WRITE !!,"The following title NAMES(.01) have been found in TIU DOCUMENT DEFINITION."
+3 WRITE !,"These titles are NOT part of the HOME TELEHEALTH NOTES document class or"
+4 WRITE !,"the CARE COORDINATION HOME TELEHEALTH NOTES document class."
+5 WRITE !,"These NAMES will clash with new National titles in patch TIU*1*258."
+6 WRITE !,"To correct this issue, please work with site staff to rename these titles.",!
+7 WRITE !,"Each title is listed with its IEN from file 8925.1, TIU DOCUMENT DEFINITION.",!
+8 NEW TIUINC
SET TIUINC=""
+9 FOR
SET TIUINC=$ORDER(^TMP("TIUP258",$JOB,TIUINC))
if TIUINC=""
QUIT
Begin DoDot:1
+10 WRITE !,^TMP("TIUP258",$JOB,TIUINC)
End DoDot:1
+11 WRITE !!,"**INSTALL WILL NOW ABORT. TRANSPORT GLOBAL(S) WILL BE UNLOADED**",!!
+12 QUIT
LU(FILE,NAME,FLAGS,SCREEN,INDEXES) ; call FileMan Finder to look up file entry
+1 QUIT $$FIND1^DIC(FILE,"",$GET(FLAGS),NAME,$GET(INDEXES),$GET(SCREEN),"MSGERR")
+2 ;
TITLES ; list of titles NAME YOU ARE LOOKING FOR ^ WHAT IT WILL BE RENAMED TO ^ VHA ENT STD TITLE ^ MENU TEXT
+1 ;;CCHT SCREENING CONSULT^HT SCREENING CONSULT^CARE COORDINATION HOME TELEHEALTH CONSULT^HT Screening Consult
+2 ;;CARE COORDINATION HOME TELEHEALTH SUBSEQUENT EVAL NOTE^HT INTERVENTION NOTE^CARE COORDINATION HOME TELEHEALTH FOLLOW-UP NOTE^HT Subsequent Eval
+3 ;;CARE COORDINATION HOME TELEHEALTH SUMMARY OF EPISODE NOTE^HT SUMMARY OF EPISODE NOTE^CARE COORDINATION HOME TELEHEALTH SUMMARIZATION NOTE^HT Summary Episode
+4 ;;CCHT DISCHARGE NOTE^HT DISCHARGE NOTE^CARE COORDINATION HOME TELEHEALTH DISCHARGE NOTE^HT Discharge Note
+5 ;;CCHT VIDEO VISIT NOTE^HT VIDEO VISIT NOTE^CARE COORDINATION HOME TELEHEALTH VIDEO VISIT NOTE^HT Video Visit Note
+6 ;;CCHT ASSESSMENT TREATMENT PLAN NOTE^HT ASSESSMENT TREATMENT PLAN NOTE^CARE COORDINATION HOME TELEHEALTH TREATMENT PLAN NOTE^HT Assmnt Trmnt Plan
+7 ;;CCHT CAREGIVER ASSESSMENT NOTE^HT CAREGIVER ASSESSMENT NOTE^CARE COORDINATION HOME TELEHEALTH E & M NOTE^HT Caregiver Assmnt
+8 ;;CCHT CONTINUUM OF CARE NOTE^HT CONTINUUM OF CARE NOTE^CARE COORDINATION HOME TELEHEALTH E & M NOTE^HT Continuum Care
+9 ;;CCHT NOTE^HT NOTE^CARE COORDINATION HOME TELEHEALTH NOTE^HT Note
+10 ;;CCHT PERIODIC EVALUATION NOTE^HT PERIODIC EVALUATION NOTE^CARE COORDINATION HOME TELEHEALTH REPORT^HT Periodic Eval
+11 ;;CCHT TECH EDUCATION NOTE^HT TECH EDUCATION NOTE^CARE COORDINATION HOME TELEHEALTH EDUCATION NOTE^HT Tech Education
+12 ;;CCHT TELEPHONE CASE MANAGEMENT NOTE^HT TELEPHONE CASE MANAGEMENT NOTE^CARE COORDINATION HOME TELEHEALTH NOTE^HT Case Mgmt Note
+13 ;;EOL
+14 QUIT