source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUEN169.m@ 1396

Last change on this file since 1396 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.8 KB
Line 
1TIUEN169 ; SLC/MAM - Environment Check Rtn for TIU*1*169 ; 7/28/2004
2 ;;1.0;Text Integration Utilities;**169**;Jun 20, 1997
3 ; External References
4 ; DBIA 3409 ^USR(8930,"B"
5MAIN ; Check environment. If problems found, warn but do not abort install.
6 ; -- Check if done:
7 I $G(^XTMP("TIU169","DONE"))="ALL" W !,"All Document Definitions for C&P Worksheets have already been",!," created. You won't need to rerun the option." Q
8 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.",!
9 W !,"Remember to run option TIU169 DDEFS, C&P WORKSHEETS",!,"after installing the patch."
10 Q
11 ;
12SETBASIC ; Set up basic data in ^TMP("TIU169",$J,"BASICS")
13 N NUMBER
14 ; -- Set ^TMP("TIU169",$J,"BASICS",[NUMBER],["INTTYPE" or "NAME"])
15 ; -- Set basic data NAME and interior TYPE for new DDEFS into TMP.
16 ; Reference DDEFS by NUMBER.
17 ; Number parent-to-be BEFORE child.
18 ; Name MUST be upper case or ADDITEM fails
19 S ^TMP("TIU169",$J,"BASICS",1,"INTTYPE")="DC"
20 F NUMBER=2:1:58 S ^TMP("TIU169",$J,"BASICS",NUMBER,"INTTYPE")="DOC"
21 F NUMBER=1:1:58 S ^TMP("TIU169",$J,"BASICS",NUMBER,"NAME")=$P($T(NAME+NUMBER),";;",2,99)
22 Q
23 ;
24TIUDUPS(TIUDUPS,TIUDCDA) ; Set array TIUDUPS of potential duplicate DDEFS
25 ; TIUDCDA = IEN of designated DC or 0 if none desig.
26 ; Checks for Titles;
27 ; If no DC designated, checks for DC too.
28 N NUM
29 S (TIUDUPS("INDC"),TIUDUPS("NOTINDC"))=0
30 I $G(^XTMP("TIU169","DONE"))="ALL" Q
31 F NUM=1:1:58 Q:'NUM D
32 . ; -- When looking for duplicates, ignore DDEF if
33 . ; previously created, designated,or skipped by this patch:
34 . I $G(^XTMP("TIU169",NUM,"DONE")) Q
35 . ; -- If site already has DDEF w/ same Name & Type as one
36 . ; we are exporting, set its number into array TIUDUPS:
37 . N NAME,TYPE,TIUDA S TIUDA=0
38 . S NAME=^TMP("TIU169",$J,"BASICS",NUM,"NAME")
39 . S TYPE=^TMP("TIU169",$J,"BASICS",NUM,"INTTYPE")
40 . F S TIUDA=$O(^TIU(8925.1,"B",NAME,TIUDA)) Q:+TIUDA'>0 D
41 . . Q:$P($G(^TIU(8925.1,+TIUDA,0)),U,4)'=TYPE
42 . . I $$ISA^TIULX(+TIUDA,TIUDCDA) S TIUDUPS("INDC",NUM)=+TIUDA,TIUDUPS("INDC")=TIUDUPS("INDC")+1 I 1
43 . . E I TIUDA'=+DESDC S TIUDUPS("NOTINDC",NUM)=+TIUDA,TIUDUPS("NOTINDC")=TIUDUPS("NOTINDC")+1
44 Q
45 ;
46LISTDUPS(TIUDUPS,INDCFLG) ; List duplicates by name
47 ; TIUDUPS = array as set in TIUDUPS. Required.
48 ; INDCFLG = 1: List dups in designated DC for skipping over
49 ; INDCFLG '= 1: List dups not in designated DC - Quit
50 N NUM,SUBSCPT,TIUCNT
51 I '$G(INDCFLG),$G(TIUDUPS("NOTINDC",1)) D Q
52 . W !!,"You already have the Document Class exported by this patch, C&P EXAMINATION"
53 . W !,"REPORTS. Please designate it or change its name (and print name)."
54 I '$G(INDCFLG),$G(TIUDUPS("NOTINDC")) D
55 . S SUBSCPT="NOTINDC"
56 . W !!,"You already have the following DDEFS exported by this patch. I cannot create"
57 . W !,"duplicates. Please change their names so they no longer match exported DDEFS,"
58 . W !,"or if you are not using them, delete them. If you change the name of a DDEF"
59 . W !,"you plan to continue using, remember to update its Print Name as well."
60 . W !,"For help, contact Enterprise VistA Support."
61 . W !!,"You may not run this option until these matches are eliminated."
62 I $G(INDCFLG),$G(TIUDUPS("INDC")) D
63 . S SUBSCPT="INDC"
64 . W !!,"Your designated C&P Document Class already has matching Titles:"
65 Q:'$D(SUBSCPT)
66 S NUM=0
67 F TIUCNT=1:1:10 S NUM=$O(TIUDUPS(SUBSCPT,NUM)) Q:'NUM D
68 . W !," "_^TMP("TIU169",$J,"BASICS",NUM,"NAME")
69 I TIUDUPS(SUBSCPT)>8 W !,"... and more; ",TIUDUPS(SUBSCPT)," in all."
70 Q
71 ;
72DESGNATE() ; Get Designated DC to create C&P titles under
73 ; Returns:
74 ; -1 - timeout, ^, lookup failed
75 ; 0 - none designated; create new DC
76 ; DCIFN^DCNAME in 8925.1 - designated DC
77 N TIUY,DTOUT,DUOUT,DIRUT,DIROUT
78 W !,"I can create a new C&P Document Class or you can designate an existing one."
79 W !,"If you designate an existing one, I will change its name to C&P EXAMINATION REPORTS. I will create the new C&P Titles under it, skipping any you already have."
80 S TIUY=$$READ^TIUU("YO","Do you want to designate a Document Class","YES")
81 I $D(DIRUT) Q -1
82 I +TIUY'=1 Q 0
83 N Y,DIC,DTOUT,DUOUT
84 S DIC=8925.1,DIC(0)="ABEFQ",DIC("S")="I $P(^(0),U,4)=""DC"",$D(^TIU(8925.1,3,10,""B"",Y))"
85 D ^DIC
86 Q Y
87 ;
88NAME ; Names of DDEFS in order from 1 to 58
89 ;;C&P EXAMINATION REPORTS
90 ;;C&P EXAMINATION
91 ;;C&P MULTIPLE EXAM
92 ;;C&P ACROMEGALY
93 ;;C&P AID AND ATTENDANCE OR HOUSEBOUND EXAM
94 ;;C&P ARRHYTHMIAS
95 ;;C&P ARTERIES, VEINS AND MISC
96 ;;C&P AUDIO
97 ;;C&P BONES
98 ;;C&P BRAIN AND SPINAL CORD
99 ;;C&P CHRONIC FATIGUE SYNDROME
100 ;;C&P COLD INJURY PROTOCOL
101 ;;C&P CRANIAL NERVES
102 ;;C&P CUSHING'S SYNDROME
103 ;;C&P DENTAL AND ORAL
104 ;;C&P DIABETES MELLITUS
105 ;;C&P DIGESTIVE CONDITIONS
106 ;;C&P EAR DISEASE
107 ;;C&P EATING DISORDERS
108 ;;C&P ENDOCRINE DISEASES
109 ;;C&P EPILEPSY AND NARCOLEPSY
110 ;;C&P ESOPHAGUS AND HIATAL HERNIA
111 ;;C&P EYE
112 ;;C&P FEET
113 ;;C&P FIBROMYALGIA
114 ;;C&P GENERAL MEDICAL
115 ;;C&P GENITOURINARY
116 ;;C&P GULF WAR PROTOCOL
117 ;;C&P GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST
118 ;;C&P HAND, THUMB AND FINGERS
119 ;;C&P HEART
120 ;;C&P HEMIC DISORDERS
121 ;;C&P HIV-RELATED ILLNESS
122 ;;C&P HYPERTENSION
123 ;;C&P INFECTIOUS, IMMUNE AND NUTRITIONAL DISABILITIES
124 ;;C&P INTESTINES
125 ;;C&P JOINTS (SHOULDER, ELBOW, WRIST, HIP, KNEE, ANKLE)
126 ;;C&P LIVER, GALL BLADDER, AND PANCREAS
127 ;;C&P LYMPHATIC DISORDERS
128 ;;C&P MENTAL DISORDERS
129 ;;C&P MOUTH, LIPS, AND TONGUE
130 ;;C&P MUSCLES
131 ;;C&P NEUROLOGICAL DISORDERS
132 ;;C&P NOSE, SINUS, LARYNX, AND PHARYNX
133 ;;C&P PERIPHERAL NERVES
134 ;;C&P PRISONER OF WAR PROTOCOL
135 ;;C&P PTSD, INITIAL EVALUATION
136 ;;C&P PTSD, REVIEW
137 ;;C&P PULMONARY TUBERCULOSIS AND MYCOBACTERIAL DISEASES
138 ;;C&P RECTUM AND ANUS
139 ;;C&P RESIDUALS OF AMPUTATIONS
140 ;;C&P RESPIRATORY
141 ;;C&P SCARS
142 ;;C&P SENSE OF SMELL AND TASTE
143 ;;C&P SKIN DISEASES
144 ;;C&P SPINE
145 ;;C&P STOMACH, DUODENUM, AND PERITONEAL ADHESIONS
146 ;;C&P THYROID AND PARATHYROID DISEASES
147 Q
Note: See TracBrowser for help on using the repository browser.