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

GMRCASV1.m

Go to the documentation of this file.
  1. GMRCASV1 ;SLC/JFR - HIERARCHY MGMT cont'd ; 01/10/02 21:34
  1. ;;3.0;CONSULT/REQUEST TRACKING;**18,15,23,22,42**;DEC 27, 1997
  1. ;
  1. ; This routine invokes IA #3252
  1. ;
  1. Q ; don't start at the top
  1. GUI(GMRCARR,GMRCSTRT,GMRCWHY,GMRCSYN,GMRCO) ;;return CSLT services for GUI
  1. ;Input:
  1. ; GMRCARR - passed in as the array to return results in
  1. ; GMRCSTRT- service name or ien to begin building from
  1. ; GMRCWHY - 0 for display, 1 for forwarding or ordering
  1. ; GMRCSYN - Boolean: 1=return synonyms, 0=do not
  1. ; GMRCO - consult ien from file 123
  1. ;Output: Array formatted as follows-
  1. ; svc ien^svc name or syn^parent^has children^svc usage
  1. ;
  1. N GMRCDG,GMRCGRP,GMRCTO
  1. ;Following line modified to accept the Name as well as the IEN for a Service, TDP - 2/9/2005
  1. S GMRCDG=$$FIND1^DIC(123.5,,"AX",GMRCSTRT,"B") I 'GMRCDG Q
  1. S GMRCTO=GMRCWHY
  1. D SERV1^GMRCASV I '$D(^TMP("GMRCSLIST",$J)) Q
  1. I '$G(GMRCSYN) G GUIQ ;M @GMRCARR=^TMP("GMRCSLIST",$J) Q ;no synonyms needed
  1. N GMRC,GMRCSVC,GMRCS,NEXT,PIEC
  1. S GMRC=0,NEXT=$O(^TMP("GMRCSLIST",$J," "),-1)+1
  1. F S GMRC=$O(^TMP("GMRCSLIST",$J,GMRC)) Q:'GMRC Q:$P(^TMP("GMRCSLIST",$J,GMRC),U,5)="S" D
  1. . I $P(^TMP("GMRCSLIST",$J,GMRC),U,5)=1 Q
  1. . S GMRCSVC=+^TMP("GMRCSLIST",$J,GMRC)
  1. . S GMRCS=0
  1. . F S GMRCS=$O(^GMR(123.5,GMRCSVC,2,GMRCS)) Q:'GMRCS D
  1. .. S PIEC(1)=GMRCSVC
  1. .. S PIEC(2)=$P(^GMR(123.5,GMRCSVC,0),U)
  1. .. S PIEC(2)=^GMR(123.5,GMRCSVC,2,GMRCS,0)_" <"_PIEC(2)_">"
  1. .. S ^TMP("GMRCSLIST",$J,NEXT)=PIEC(1)_"^"_PIEC(2)_"^^^S"
  1. .. S NEXT=NEXT+1
  1. .. Q
  1. . Q
  1. GUIQ M @GMRCARR=^TMP("GMRCSLIST",$J)
  1. K ^TMP("GMRCS",$J),^TMP("GMRCSLIST",$J)
  1. Q
  1. ;
  1. PAGE(PG) ;print header and increment page
  1. S PG=PG+1
  1. W !,"Consult Hierarchy list",?30,$$HTE^XLFDT($H),?60,"Page: ",PG
  1. W !,$$REPEAT^XLFSTR("-",78)
  1. Q
  1. ;
  1. QUEUE ; queue up the print
  1. N ZTRTN,ZTSK,ZTIO,ZTDTH,ZTDESC
  1. S ZTRTN="PRTLST^GMRCASV",ZTDESC="Consult Service Hierarchy List"
  1. S ZTIO=ION,ZTDTH=$H
  1. D ^%ZTLOAD
  1. I $G(ZTSK) W !,"Queued to Print, Task # ",ZTSK
  1. E W !,"Sorry, Try again Later"
  1. Q