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

TIUEN182.m

Go to the documentation of this file.
  1. TIUEN182 ; SLC/MAM - Environment Check Rtn for TIU*1*182 ; 6/9/04
  1. ;;1.0;Text Integration Utilities;**182**;Jun 20, 1997
  1. ; External References
  1. ; DBIA 3409 ^USR(8930,"B"
  1. MAIN ; Check environment. If problems found, warn but do not abort install.
  1. ; -- Check if done:
  1. I $G(^XTMP("TIU182","DONE"))="ALL" W !,"All Document Definitions exported for the Medicine Conversion have already",!," been created. You won't need to rerun the option." Q
  1. I '$$CLASS^TIUCP W !,"I can't find Class CLINICAL PROCEDURES, exported in patch TIU*1*109. You",!,"won't be able to run the option that creates the Document Definitions",!,"without this class. See patch description.",!
  1. I $O(^USR(8930,"B","CLINICAL COORDINATOR",""))="" W !,"I can't find User Class CLINICAL COORDINATOR. You won't be able to run",!,"the option that creates the Document Definitions without this class. See",!,"patch description.",!
  1. ; -- Check for potential DDEF duplicates at site:
  1. D SETBASIC ; Set basic data for DDEFS into ^TMP for dups check
  1. W !,"Checking for potential duplicate Document Definitions..."
  1. N TIUDUPS
  1. D TIUDUPS(.TIUDUPS)
  1. I 'TIUDUPS W !," No potential duplicates found.",!,"Remember to run option TIU182 DDEFS, MED CONVERSION after installing the patch." G MAINX
  1. ; -- If potential duplicates exist, list them:
  1. K ^TMP("TIU182MSG",$J) ; LISTDUPS needs new ^TMP("TIU182MSG",$J)
  1. D LISTDUPS(.TIUDUPS,0,0)
  1. MAINX K ^TMP("TIU182MSG",$J) ; Clean up after LISTDUPS
  1. K ^TMP("TIU182",$J) ; Clean up after SETBASIC
  1. Q
  1. ;
  1. SETBASIC ; Set up basic data in ^TMP("TIU182",$J,"BASICS")
  1. N NUMBER
  1. ; -- Set ^TMP("TIU182",$J,"BASICS",[NUMBER],["INTTYPE" or "NAME"])
  1. ; -- Set basic data NAME and interior TYPE for new DDEFS into TMP.
  1. ; Reference DDEFS by NUMBER.
  1. ; Number parent-to-be BEFORE child.
  1. ; Name MUST be upper case or ADDITEM fails
  1. S ^TMP("TIU182",$J,"BASICS",1,"INTTYPE")="DC"
  1. F NUMBER=2:1:13 S ^TMP("TIU182",$J,"BASICS",NUMBER,"INTTYPE")="DOC"
  1. F NUMBER=1:1:13 S ^TMP("TIU182",$J,"BASICS",NUMBER,"NAME")=$P($T(NAME+NUMBER),";;",2,99)
  1. Q
  1. ;
  1. TIUDUPS(TIUDUPS,OPTFLG) ; Set array TIUDUPS of potential duplicate DDEFS
  1. N NUM S TIUDUPS=0,OPTFLG=+$G(OPTFLG)
  1. I $G(^XTMP("TIU182","DONE"))="ALL" Q
  1. F NUM=1:1:13 Q:'NUM D
  1. . ; -- When looking for duplicates, ignore DDEF if
  1. . ; previously created by this patch:
  1. . Q:$G(^XTMP("TIU182",NUM,"DONE"))
  1. . ; -- If site already has DDEF w/ same Name & Type as one
  1. . ; we are exporting, set its number into array TIUDUPS:
  1. . N NAME,TYPE,TIUDA S TIUDA=0
  1. . S NAME=^TMP("TIU182",$J,"BASICS",NUM,"NAME")
  1. . S TYPE=^TMP("TIU182",$J,"BASICS",NUM,"INTTYPE")
  1. . F S TIUDA=$O(^TIU(8925.1,"B",NAME,TIUDA)) Q:+TIUDA'>0 D
  1. . . I $P($G(^TIU(8925.1,+TIUDA,0)),U,4)=TYPE S TIUDUPS(NUM)=+TIUDA,TIUDUPS=1
  1. Q
  1. ;
  1. LISTDUPS(TIUDUPS,TMPCNT,OPTFLG) ; List duplicates by name
  1. ; TIUDUPS = array as set in TIUDUPS. Required.
  1. ; TMPCNT = Count at which to start message array ^TMP("TIU182MSG",$J,TMPCNT); Received by reference. (Array already has some nodes if called from option.) Optional.
  1. ; OPTFLG = 1 if called from option;
  1. ; 0 if called from env check. Optional.
  1. N NUM
  1. S OPTFLG=+$G(OPTFLG)
  1. S TMPCNT=$S($G(TMPCNT):TMPCNT,1:0)
  1. S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)="You already have the following Document Definitions exported by this patch."
  1. S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)="I don't want to overwrite them. Please change their names so they no longer"
  1. S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)="match the exported ones, or if you are not using them, delete them. If you"
  1. S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)="change the name of a Document Definition you plan to continue using, remember"
  1. S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)="to update its Print Name, as well. For help, contact Enterprise VistA Support."
  1. S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)=""
  1. S TMPCNT=TMPCNT+1
  1. I 'OPTFLG D
  1. . S ^TMP("TIU182MSG",$J,TMPCNT)="You will not be able to run option TIU182 DDEFS, MED CONVERSION to create the"
  1. . S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)="DDEFS until these matches are eliminated."
  1. E S ^TMP("TIU182MSG",$J,TMPCNT)="You may not run this option until these matches are eliminated."
  1. S NUM=0
  1. F S NUM=$O(TIUDUPS(NUM)) Q:'NUM D
  1. . S TMPCNT=TMPCNT+1,^TMP("TIU182MSG",$J,TMPCNT)=" "_^TMP("TIU182",$J,"BASICS",NUM,"NAME")
  1. ; -- If called from env check, not option, write list:
  1. I OPTFLG Q
  1. N TIUI S TIUI=0
  1. F S TIUI=$O(^TMP("TIU182MSG",$J,TIUI)) Q:'TIUI D
  1. . W !,^TMP("TIU182MSG",$J,TIUI)
  1. Q
  1. ;
  1. NAME ; Names of DDEFS in order from 1 to 13
  1. ;;HISTORICAL PROCEDURES
  1. ;;HISTORICAL CARDIAC CATHETERIZATION PROCEDURE
  1. ;;HISTORICAL ELECTROCARDIOGRAM PROCEDURE
  1. ;;HISTORICAL ECHOCARDIOGRAM PROCEDURE
  1. ;;HISTORICAL ELECTROPHYSIOLOGY PROCEDURE
  1. ;;HISTORICAL HOLTER PROCEDURE
  1. ;;HISTORICAL EXERCISE TOLERANCE TEST PROCEDURE
  1. ;;HISTORICAL PRE/POST SURGERY RISK NOTE
  1. ;;HISTORICAL ENDOSCOPIC PROCEDURE
  1. ;;HISTORICAL PULMONARY FUNCTION TEST PROCEDURE
  1. ;;HISTORICAL HEMATOLOGY PROCEDURE
  1. ;;HISTORICAL PACEMAKER IMPLANTATION PROCEDURE
  1. ;;HISTORICAL RHEUMATOLOGY PROCEDURE
  1. Q