MAGNTLR5 ;WOIFO/NST - TeleReader Configuration utilities ; 11 Apr 2012 11:19 AM
;;3.0;IMAGING;**127**;Mar 19, 2002;Build 4231;Apr 01, 2013
;; Per VHA Directive 2004-038, this routine should not be modified.
;; +---------------------------------------------------------------+
;; | Property of the US Government. |
;; | No permission to copy or redistribute this software is given. |
;; | Use of unreleased versions of this software requires the user |
;; | to execute a written test agreement with the VistA Imaging |
;; | Development Office of the Department of Veterans Affairs, |
;; | telephone (301) 734-0100. |
;; | The Food and Drug Administration classifies this software as |
;; | a medical device. As such, it may not be changed in any way. |
;; | Modifications to this software may result in an adulterated |
;; | medical device under 21CFR820, the use of which is considered |
;; | to be a violation of US Federal Statutes. |
;; +---------------------------------------------------------------+
;;
Q
;
;***** Get TIU Note Titles list
;
; RPC: MAG3 TELEREADER TIU TITLES LST
;
; .MAGRY Reference to a local variable where the results are returned to.
;
; Input Parameters
; ================
; N/A
;
; Return Values
; =============
; A list with TIU NOTE TITLES for consult and clinical procedure classes
;
; if error
; MAGRY(0) = 0 ^ Error message
; if success
; MAGRY(0) = 1 ^ Number of records return
; MAGRY(1..n) = IEN of TIU NOTE TITLE ^ Long description of TIU NOTE TITLE
;
; Notes
; =====
; Temporary global nodes ^TMP("MAGNTLR5",$J) is used by this procedure.
;
TIUTLST(MAGRY) ; RPC [MAG3 TELEREADER TIU TITLES LST]
N $ETRAP,$ESTACK S $ETRAP="D AERRA^MAGGTERR"
N TARR,CLASSNUM,FROM
K ^TMP("MAGNTLR5",$J)
S MAGRY=$NA(^TMP("MAGNTLR5",$J))
; Get TIU NOTE Consult titles
D CNSLCLAS^TIUSRVD(.CLASSNUM) ; IA #2876
D BUILDONE^MAGNTLR5(MAGRY,CLASSNUM) ; append the TIU NOTE Consult titles
; Get TIU NOTE CP titles
D CPCLASS^TIUCP(.CLASSNUM) ; IA #3568
D BUILDONE^MAGNTLR5(MAGRY,CLASSNUM) ; append the TIU NOTE CP titles
Q
;
BUILDONE(MAGARR,CLASSNUM) ; Get all TIU NOTE TITLES per a TIU CLASS
; MAGARR = The name of the result array
; MAGARR(0)= current number of records in MAGARR
; MAGARR(n) = TIU NOTE TITLE IEN ^ Name of the Title
; CLASSNUM = TIU CLASS IEN
N CNT,TARR,FROM,DONE,I
S FROM=""
S DONE=0
S CNT=$P($G(@MAGARR@(0),0),"^",2)
F Q:DONE D
. K TARR
. D LONGLIST^TIUSRVD(.TARR,CLASSNUM,FROM,1) ; IA #2876
. ; TARR(n)="647^OPHTHALMOLOGY <CP OPHTHALMOLOGY NOTE>"
. I '$D(TARR) S DONE=1 Q ; No more titles
. S I=0
. F S I=$O(TARR(I)) Q:I="" D
. . S CNT=CNT+1
. . S @MAGARR@(CNT)=TARR(I)
. . Q
. S FROM=$P(@MAGARR@(CNT),U,2)
. Q
S @MAGARR@(0)=1_"^"_CNT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGNTLR5 2939 printed Dec 13, 2024@02:07:23 Page 2
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
+2 ;; Per VHA Directive 2004-038, this routine should not be modified.
+3 ;; +---------------------------------------------------------------+
+4 ;; | Property of the US Government. |
+5 ;; | No permission to copy or redistribute this software is given. |
+6 ;; | Use of unreleased versions of this software requires the user |
+7 ;; | to execute a written test agreement with the VistA Imaging |
+8 ;; | Development Office of the Department of Veterans Affairs, |
+9 ;; | telephone (301) 734-0100. |
+10 ;; | The Food and Drug Administration classifies this software as |
+11 ;; | a medical device. As such, it may not be changed in any way. |
+12 ;; | Modifications to this software may result in an adulterated |
+13 ;; | medical device under 21CFR820, the use of which is considered |
+14 ;; | to be a violation of US Federal Statutes. |
+15 ;; +---------------------------------------------------------------+
+16 ;;
+17 QUIT
+18 ;
+19 ;***** Get TIU Note Titles list
+20 ;
+21 ; RPC: MAG3 TELEREADER TIU TITLES LST
+22 ;
+23 ; .MAGRY Reference to a local variable where the results are returned to.
+24 ;
+25 ; Input Parameters
+26 ; ================
+27 ; N/A
+28 ;
+29 ; Return Values
+30 ; =============
+31 ; A list with TIU NOTE TITLES for consult and clinical procedure classes
+32 ;
+33 ; if error
+34 ; MAGRY(0) = 0 ^ Error message
+35 ; if success
+36 ; MAGRY(0) = 1 ^ Number of records return
+37 ; MAGRY(1..n) = IEN of TIU NOTE TITLE ^ Long description of TIU NOTE TITLE
+38 ;
+39 ; Notes
+40 ; =====
+41 ; Temporary global nodes ^TMP("MAGNTLR5",$J) is used by this procedure.
+42 ;
TIUTLST(MAGRY) ; RPC [MAG3 TELEREADER TIU TITLES LST]
+1 NEW $ETRAP,$ESTACK
SET $ETRAP="D AERRA^MAGGTERR"
+2 NEW TARR,CLASSNUM,FROM
+3 KILL ^TMP("MAGNTLR5",$JOB)
+4 SET MAGRY=$NAME(^TMP("MAGNTLR5",$JOB))
+5 ; Get TIU NOTE Consult titles
+6 ; IA #2876
DO CNSLCLAS^TIUSRVD(.CLASSNUM)
+7 ; append the TIU NOTE Consult titles
DO BUILDONE^MAGNTLR5(MAGRY,CLASSNUM)
+8 ; Get TIU NOTE CP titles
+9 ; IA #3568
DO CPCLASS^TIUCP(.CLASSNUM)
+10 ; append the TIU NOTE CP titles
DO BUILDONE^MAGNTLR5(MAGRY,CLASSNUM)
+11 QUIT
+12 ;
BUILDONE(MAGARR,CLASSNUM) ; Get all TIU NOTE TITLES per a TIU CLASS
+1 ; MAGARR = The name of the result array
+2 ; MAGARR(0)= current number of records in MAGARR
+3 ; MAGARR(n) = TIU NOTE TITLE IEN ^ Name of the Title
+4 ; CLASSNUM = TIU CLASS IEN
+5 NEW CNT,TARR,FROM,DONE,I
+6 SET FROM=""
+7 SET DONE=0
+8 SET CNT=$PIECE($GET(@MAGARR@(0),0),"^",2)
+9 FOR
if DONE
QUIT
Begin DoDot:1
+10 KILL TARR
+11 ; IA #2876
DO LONGLIST^TIUSRVD(.TARR,CLASSNUM,FROM,1)
+12 ; TARR(n)="647^OPHTHALMOLOGY <CP OPHTHALMOLOGY NOTE>"
+13 ; No more titles
IF '$DATA(TARR)
SET DONE=1
QUIT
+14 SET I=0
+15 FOR
SET I=$ORDER(TARR(I))
if I=""
QUIT
Begin DoDot:2
+16 SET CNT=CNT+1
+17 SET @MAGARR@(CNT)=TARR(I)
+18 QUIT
End DoDot:2
+19 SET FROM=$PIECE(@MAGARR@(CNT),U,2)
+20 QUIT
End DoDot:1
+21 SET @MAGARR@(0)=1_"^"_CNT
+22 QUIT