source: WorldVistAEHR/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCNOTF.m@ 1240

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1GMRCNOTF ;SLC/JFR - NOTIFICATION RECIPIENT UTILITIES; 7/31/99 21:58
2 ;;3.0;CONSULT/REQUEST TRACKING;**11**;DEC 27, 1997
3EN ; -- main entry point for GMRC NOTIFICATION RECIPS
4 N GMRCSV
5 D SELSS Q:'$D(GMRCSV)
6 D INIT
7 D EN^VALM("GMRC NOTIFICATION RECIPS")
8 Q
9 ;
10SELSS ; select new service
11 N DIR,X,Y,DIRUT,DUOUT,DTOUT
12 D FULL^VALM1
13 S DIR(0)="PO^123.5:EMQ",DIR("A")="Select Service"
14 D ^DIR
15 I $D(DIRUT) Q
16 S GMRCSV=+Y
17 K ^TMP("GMRCNOTF",$J)
18 Q
19 ;
20HDR ; -- header code
21 S VALMHDR(1)="Notification Recipients for: "
22 S VALMHDR(1)=VALMHDR(1)_$P(^GMR(123.5,+GMRCSV,0),U)
23 Q
24 ;
25INIT ; -- init variables and list array
26 N GMRCADUZ,LINE,GMRCI,PERS
27 D EN^GMRCT(+GMRCSV,,1)
28 I '$D(GMRCADUZ) S ^TMP("GMRCNOTF",$J,1,0)="No notification recipients"
29 S GMRCI=0,LINE=1
30 F S GMRCI=$O(GMRCADUZ(GMRCI)) Q:'GMRCI D
31 . S PERS=$$GET1^DIQ(200,GMRCI,.01)
32 . S ^TMP("GMRCNOTF",$J,"B",PERS)=GMRCADUZ(GMRCI)
33 S PERS="" F S PERS=$O(^TMP("GMRCNOTF",$J,"B",PERS)) Q:PERS="" D
34 . I $L($P(^TMP("GMRCNOTF",$J,"B",PERS),"~",2)) D Q
35 .. N LOOP,SERV S LOOP=2
36 .. N SPACES S SPACES=$$REPEAT^XLFSTR(" ",(34-$L(PERS)))
37 .. S ^TMP("GMRCNOTF",$J,LINE,0)=PERS_SPACES_$P(^TMP("GMRCNOTF",$J,"B",PERS),"~")
38 .. S LINE=LINE+1
39 .. F S SERV=$P(^TMP("GMRCNOTF",$J,"B",PERS),"~",LOOP) Q:SERV="" D
40 ... S ^TMP("GMRCNOTF",$J,LINE,0)=$$REPEAT^XLFSTR(" ",34)_SERV
41 ... S LOOP=LOOP+1,LINE=LINE+1
42 . N SPACES S SPACES=$$REPEAT^XLFSTR(" ",(34-$L(PERS)))
43 . S ^TMP("GMRCNOTF",$J,LINE,0)=PERS_SPACES_^TMP("GMRCNOTF",$J,"B",PERS)
44 . S LINE=LINE+1
45 K ^TMP("GMRCNOTF",$J,"B")
46 S VALMCNT=$O(^TMP("GMRCNOTF",$J,999999),-1)
47 S VALMBG=1
48 Q
49 ;
50HELP ; -- help code
51 S X="?" D DISP^XQORM1 W !!
52 Q
53 ;
54EXIT ; -- exit code
55 Q
56 ;
57EXPND ; -- expand code
58 Q
59 ;
Note: See TracBrowser for help on using the repository browser.