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

MAGNTLR5.m

Go to the documentation of this file.
  1. MAGNTLR5 ;WOIFO/NST - TeleReader Configuration utilities ; 11 Apr 2012 11:19 AM
  1. ;;3.0;IMAGING;**127**;Mar 19, 2002;Build 4231;Apr 01, 2013
  1. ;; Per VHA Directive 2004-038, this routine should not be modified.
  1. ;; +---------------------------------------------------------------+
  1. ;; | Property of the US Government. |
  1. ;; | No permission to copy or redistribute this software is given. |
  1. ;; | Use of unreleased versions of this software requires the user |
  1. ;; | to execute a written test agreement with the VistA Imaging |
  1. ;; | Development Office of the Department of Veterans Affairs, |
  1. ;; | telephone (301) 734-0100. |
  1. ;; | The Food and Drug Administration classifies this software as |
  1. ;; | a medical device. As such, it may not be changed in any way. |
  1. ;; | Modifications to this software may result in an adulterated |
  1. ;; | medical device under 21CFR820, the use of which is considered |
  1. ;; | to be a violation of US Federal Statutes. |
  1. ;; +---------------------------------------------------------------+
  1. ;;
  1. Q
  1. ;
  1. ;***** Get TIU Note Titles list
  1. ;
  1. ; RPC: MAG3 TELEREADER TIU TITLES LST
  1. ;
  1. ; .MAGRY Reference to a local variable where the results are returned to.
  1. ;
  1. ; Input Parameters
  1. ; ================
  1. ; N/A
  1. ;
  1. ; Return Values
  1. ; =============
  1. ; A list with TIU NOTE TITLES for consult and clinical procedure classes
  1. ;
  1. ; if error
  1. ; MAGRY(0) = 0 ^ Error message
  1. ; if success
  1. ; MAGRY(0) = 1 ^ Number of records return
  1. ; MAGRY(1..n) = IEN of TIU NOTE TITLE ^ Long description of TIU NOTE TITLE
  1. ;
  1. ; Notes
  1. ; =====
  1. ; Temporary global nodes ^TMP("MAGNTLR5",$J) is used by this procedure.
  1. ;
  1. TIUTLST(MAGRY) ; RPC [MAG3 TELEREADER TIU TITLES LST]
  1. N $ETRAP,$ESTACK S $ETRAP="D AERRA^MAGGTERR"
  1. N TARR,CLASSNUM,FROM
  1. K ^TMP("MAGNTLR5",$J)
  1. S MAGRY=$NA(^TMP("MAGNTLR5",$J))
  1. ; Get TIU NOTE Consult titles
  1. D CNSLCLAS^TIUSRVD(.CLASSNUM) ; IA #2876
  1. D BUILDONE^MAGNTLR5(MAGRY,CLASSNUM) ; append the TIU NOTE Consult titles
  1. ; Get TIU NOTE CP titles
  1. D CPCLASS^TIUCP(.CLASSNUM) ; IA #3568
  1. D BUILDONE^MAGNTLR5(MAGRY,CLASSNUM) ; append the TIU NOTE CP titles
  1. Q
  1. ;
  1. BUILDONE(MAGARR,CLASSNUM) ; Get all TIU NOTE TITLES per a TIU CLASS
  1. ; MAGARR = The name of the result array
  1. ; MAGARR(0)= current number of records in MAGARR
  1. ; MAGARR(n) = TIU NOTE TITLE IEN ^ Name of the Title
  1. ; CLASSNUM = TIU CLASS IEN
  1. N CNT,TARR,FROM,DONE,I
  1. S FROM=""
  1. S DONE=0
  1. S CNT=$P($G(@MAGARR@(0),0),"^",2)
  1. F Q:DONE D
  1. . K TARR
  1. . D LONGLIST^TIUSRVD(.TARR,CLASSNUM,FROM,1) ; IA #2876
  1. . ; TARR(n)="647^OPHTHALMOLOGY <CP OPHTHALMOLOGY NOTE>"
  1. . I '$D(TARR) S DONE=1 Q ; No more titles
  1. . S I=0
  1. . F S I=$O(TARR(I)) Q:I="" D
  1. . . S CNT=CNT+1
  1. . . S @MAGARR@(CNT)=TARR(I)
  1. . . Q
  1. . S FROM=$P(@MAGARR@(CNT),U,2)
  1. . Q
  1. S @MAGARR@(0)=1_"^"_CNT
  1. Q