source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPR222.m@ 1800

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1TIUPR222 ; SLC/AJB - TIU Form Letter Update;06Mar07 ;12/27/07 18:20
2 ;;1.0;TEXT INTEGRATION UTILITIES;**222**;Jun 20, 1997
3 Q
4EN ;
5 N TIUQUIT
6 I $$PATCH^XPDUTL("TIU*1.0*222") D
7 . F NAME="FORM LETTERS","FORM LETTER EXAMPLE" D
8 . . I $$CHKTITLE(8925.1,NAME)>0 S TIUQUIT=1
9 I +$G(TIUQUIT) W !!,"Titles have already been installed and will not be installed again." Q
10 I '$D(ZTQUEUED) X ^%ZOSF("EON") W $G(IOCUON),@IOF ;WVEHR/VOE IOCUON TO $G(IOCUON)
11 I $$CHKTITLE(8925.1,"PROGRESS NOTES")<0 G EXIT
12 W !!,"Creating the new DOCUMENT CLASS ""FORM LETTERS"" and"
13 W !,"and the new TITLE ""FORM LETTER EXAMPLE"" in FILE #8925.1"
14 F NAME="FORM LETTERS","FORM LETTER EXAMPLE" D
15 . I $$CHKTITLE(8925.1,NAME)>0 D
16 . . W !!,"The entry "_NAME_" already exists in "
17 . . W !,"File #8925.1 and must be renamed or deleted "
18 . . W !,"before installation can continue."
19 . . S XPDABORT=1
20 I +$G(XPDABORT) G EXIT
21 F NAME="FORM LETTERS^DC^PROGRESS NOTES^Form Letters","FORM LETTER EXAMPLE^DOC^FORM LETTERS^Form Letter Example" D
22 . D CREATE($P(NAME,U),$P(NAME,U,2))
23 . D ATTACH($$CHKTITLE(8925.1,$P(NAME,U)),$$CHKTITLE(8925.1,$P(NAME,U,3)),$P(NAME,U,4))
24 . W !!,$P(NAME,U)," created"
25 W !!,"Done!"
26EXIT D
27 . N DIR,X,Y
28 . S DIR(0)="E"
29 . W ! D ^DIR
30 Q
31CHKTITLE(FILE,NAME) ;
32 N DIC,X,Y
33 S DIC=FILE,DIC(0)="X"
34 S X=NAME
35 D ^DIC
36 Q +Y
37ATTACH(KID,PARENT,NAME) ;
38 N MSG,TIU,TIUIEN
39 S TIU(8925.14,"+2,"_PARENT_",",.01)=KID
40 S TIU(8925.14,"+2,"_PARENT_",",4)=NAME
41 D UPDATE^DIE("","TIU","TIUIEN","MSG")
42 Q
43CREATE(NAME,CLASS) ;
44 N MSG,TIU,TIUIEN
45 S TIU(8925.1,"+1,",.01)=NAME
46 S TIU(8925.1,"+1,",.02)=""
47 S TIU(8925.1,"+1,",.03)=NAME
48 S TIU(8925.1,"+1,",.04)=CLASS
49 S TIU(8925.1,"+1,",.05)=""
50 S TIU(8925.1,"+1,",.06)=$$LU(8930,"CLINICAL COORDINATOR","X")
51 S TIU(8925.1,"+1,",.07)=13
52 S TIU(8925.1,"+1,",3.02)=1
53 S TIU(8925.1,"+1,",6)="D ENTRY^TIUFLP"
54 S TIU(8925.1,"+1,",99)=$H
55 D UPDATE^DIE("","TIU","TIUIEN","MSG")
56 Q
57MEMBEROF(TITLE,CLASS) ;
58 N TIUY S TIUY=0
59 S CLASS=+$$CLASS(CLASS) Q:+CLASS'>0 TIUY
60 S TIUY=+$$ISA^TIULX(TITLE,CLASS)
61 S:TITLE=CLASS TIUY=1
62 Q TIUY
63CLASS(CLNAME) ;
64 N TIUY S TIUY=+$O(^TIU(8925.1,"B",CLNAME,0))
65 I +TIUY>0,$S($P($G(^TIU(8925.1,+TIUY,0)),U,4)="CL":0,$P($G(^(0)),U,4)="DC":0,1:1) S TIUY=0
66 Q TIUY
67LU(FILE,NAME,FLAGS,SCREEN,INDEXES) ;
68 Q $$FIND1^DIC(FILE,"",$G(FLAGS),NAME,$G(INDEXES),$G(SCREEN),"TIUERR")
Note: See TracBrowser for help on using the repository browser.