source: WorldVistAEHR/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCASV1.m@ 700

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1GMRCASV1 ;SLC/JFR - HIERARCHY MGMT cont'd ; 01/10/02 21:34
2 ;;3.0;CONSULT/REQUEST TRACKING;**18,15,23,22,42**;DEC 27, 1997
3 ;
4 ; This routine invokes IA #3252
5 ;
6 Q ; don't start at the top
7GUI(GMRCARR,GMRCSTRT,GMRCWHY,GMRCSYN,GMRCO) ;;return CSLT services for GUI
8 ;Input:
9 ; GMRCARR - passed in as the array to return results in
10 ; GMRCSTRT- service name or ien to begin building from
11 ; GMRCWHY - 0 for display, 1 for forwarding or ordering
12 ; GMRCSYN - Boolean: 1=return synonyms, 0=do not
13 ; GMRCO - consult ien from file 123
14 ;Output: Array formatted as follows-
15 ; svc ien^svc name or syn^parent^has children^svc usage
16 ;
17 N GMRCDG,GMRCGRP,GMRCTO
18 ;Following line modified to accept the Name as well as the IEN for a Service, TDP - 2/9/2005
19 S GMRCDG=$$FIND1^DIC(123.5,,"AX",GMRCSTRT,"B") I 'GMRCDG Q
20 S GMRCTO=GMRCWHY
21 D SERV1^GMRCASV I '$D(^TMP("GMRCSLIST",$J)) Q
22 I '$G(GMRCSYN) G GUIQ ;M @GMRCARR=^TMP("GMRCSLIST",$J) Q ;no synonyms needed
23 N GMRC,GMRCSVC,GMRCS,NEXT,PIEC
24 S GMRC=0,NEXT=$O(^TMP("GMRCSLIST",$J," "),-1)+1
25 F S GMRC=$O(^TMP("GMRCSLIST",$J,GMRC)) Q:'GMRC Q:$P(^TMP("GMRCSLIST",$J,GMRC),U,5)="S" D
26 . I $P(^TMP("GMRCSLIST",$J,GMRC),U,5)=1 Q
27 . S GMRCSVC=+^TMP("GMRCSLIST",$J,GMRC)
28 . S GMRCS=0
29 . F S GMRCS=$O(^GMR(123.5,GMRCSVC,2,GMRCS)) Q:'GMRCS D
30 .. S PIEC(1)=GMRCSVC
31 .. S PIEC(2)=$P(^GMR(123.5,GMRCSVC,0),U)
32 .. S PIEC(2)=^GMR(123.5,GMRCSVC,2,GMRCS,0)_" <"_PIEC(2)_">"
33 .. S ^TMP("GMRCSLIST",$J,NEXT)=PIEC(1)_"^"_PIEC(2)_"^^^S"
34 .. S NEXT=NEXT+1
35 .. Q
36 . Q
37GUIQ M @GMRCARR=^TMP("GMRCSLIST",$J)
38 K ^TMP("GMRCS",$J),^TMP("GMRCSLIST",$J)
39 Q
40 ;
41PAGE(PG) ;print header and increment page
42 S PG=PG+1
43 W !,"Consult Hierarchy list",?30,$$HTE^XLFDT($H),?60,"Page: ",PG
44 W !,$$REPEAT^XLFSTR("-",78)
45 Q
46 ;
47QUEUE ; queue up the print
48 N ZTRTN,ZTSK,ZTIO,ZTDTH,ZTDESC
49 S ZTRTN="PRTLST^GMRCASV",ZTDESC="Consult Service Hierarchy List"
50 S ZTIO=ION,ZTDTH=$H
51 D ^%ZTLOAD
52 I $G(ZTSK) W !,"Queued to Print, Task # ",ZTSK
53 E W !,"Sorry, Try again Later"
54 Q
Note: See TracBrowser for help on using the repository browser.