Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: TIUP258E

TIUP258E.m

Go to the documentation of this file.
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