MAGGTU4M ;WOIFO/GEK - MUSE3 VIEWER UTILITIES
;;3.0;IMAGING;**188**;Mar 19, 2002;Build 61;Mar 18, 2018
;; 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. |
;; +---------------------------------------------------------------+
;;
; This routine contains Utilities for the MUSE FORMAT TABLE
;
Q
;
; The default Format ID's listed below are used to generate the
; MUSE Test for the specified Test Type.
; If Site Specific Format ID's have been entered into the
; MUSE FORMAT TABLE, those Format ID's will override the defaults
;
; ***** DEFAULTS for Test Type -> Format ID mapping
;;===============================================================
; Test Type Grid Format ID
; RestingECG Y 6
; Stress Y 7
; Holter Y 8
; HiRes Y 9
; RestingECG N 12
; HiRes N 13
; Stress N 14
; Holter N 15
;;===============================================================
;
NETLOC(MAGRY,IEN) ;RPC [MAG4 GET NETLOC INFO]
; Gets info from Network Location file.
; IEN is the Internal Entry Number in the NETWORK LOCATION File
;
; The Return String is in the format :
; .01 Description ^ Physical Reference ^ Operational Status (OnLine/OffLine)
N IC,FNUM,MAGZZ,MAGERR
N $ETRAP,$ESTACK S $ETRAP="D ERR^MAGGTERR"
S FNUM="2005.2"
K MAGRY
I '$G(IEN) D Q ;
. S MAGRY="0^INVALID Input: "_IEN
. Q
I '$D(^MAG(2005.2,IEN,0)) D Q ;
. S MAGRY="0^INVALID NETWORK LOCATION Entry: "_IEN
. Q
K MAGZZ,MAGERR
D GETS^DIQ(FNUM,IEN,".01;1;5","EI","MAGZZ","MAGERR")
S IC=IEN_","
S MAGRY="1^"_MAGZZ(FNUM,IC,".01","E")_"^"_IEN_"^"_MAGZZ(FNUM,IC,"1","E")_"^"_MAGZZ(FNUM,IC,"5","E")
Q
TABLE(MAGRY,IEN) ;RPC [MAG4 GET MUSE TABLE]
; IEN is the Internal Entry Number in the NETWORK LOCATION File.
; This will return all MUSE FORMAT TABLE entries for the IEN.
; or
; IEN = 'SITE'
; This will return MUSE FORMAT TABLE entries that are defined for
; MUSE Sites.
; or
; IEN = 'ALL'
; This will return an Array, including the Default Format mapping
; in a format that can be shown to the user.
;
N I,CT,NETLOC,IC,FNUM,MAGZZ,MAGERR
N $ETRAP,$ESTACK S $ETRAP="D ERRA^MAGGTERR"
S FNUM="2006.172"
S CT=0
K MAGRY
I IEN="ALL" D ALL Q ;
I IEN="SITE" D SITE Q ;
I '$G(IEN) D Q ;
. S MAGRY(0)="0^INVALID Input: "_IEN
. Q
I '$D(^MAG(2005.2,IEN,0)) D Q ;
. S MAGRY(0)="0^INVALID NETWORK LOCATION Entry: "_IEN
. Q
S NETLOC=$P(^MAG(2005.2,IEN,0),"^",1)
I '$D(^MAG(2006.172,"C",IEN)) D Q ;
. S MAGRY(0)="0^There are no MUSE FORMAT TABLE entries for: "_NETLOC_" ("_IEN_")"
. Q
S I="" F S I=$O(^MAG(2006.172,"C",IEN,I)) Q:'I D ;
. K MAGZZ,MAGERR
. D GETS^DIQ(FNUM,I,".01;1;2;3;4","EI","MAGZZ","MAGERR")
. S CT=CT+1
. S IC=I_","
. S MAGRY(CT)=MAGZZ(FNUM,IC,1,"E")_"^"_IEN_"^"_MAGZZ(FNUM,IC,2,"E")
. S MAGRY(CT)=MAGRY(CT)_"^"_MAGZZ(FNUM,IC,3,"E")_"^"_MAGZZ(FNUM,IC,4,"E")
. Q
I CT=0 S MAGRY(0)="0^0 Entries in MUSE FORMAT TABLE for: "_MAGZZ(FNUM,IC,1,"E")_" ("_IEN_")"
I CT>0 S MAGRY(0)="1^"_CT_" MUSE FORMAT TABLE Entries for: "_MAGZZ(FNUM,IC,1,"E")_" ("_IEN_")"
Q
SITE ;called internally
; We get here if user wants ALL MUSE FORMAT TABLE Entered at this VistA Site.
S MAGRY(0)="1^Returning All entries in MUSE FORMAT TABLE"
N J
S J=0
F S J=$O(^MAG(2006.172,J)) Q:'J D ;
. K MAGZZ,MAGERR
. D GETS^DIQ(FNUM,J,".01;1;2;3;4","EI","MAGZZ","MAGERR")
. S CT=CT+1
. S IC=J_","
. S MAGRY(CT)=MAGZZ(FNUM,IC,1,"E")_"^"_MAGZZ(FNUM,IC,1,"I")_"^"_MAGZZ(FNUM,IC,2,"E")
. S MAGRY(CT)=MAGRY(CT)_"^"_MAGZZ(FNUM,IC,3,"E")_"^"_MAGZZ(FNUM,IC,4,"E")
. Q
I CT=0 S MAGRY(0)="0^0 Entries in MUSE FORMAT TABLE."
I CT>0 S MAGRY(0)="1^"_CT_" MUSE FORMAT TABLE Entries."
Q
ALL ;called internally
; This function will return an array of MUSE FORMAT TABLE entries for Display
; to the user.
; This Array will include the 'Default' values that are used, and any
; Site Specific entries in the MUSE FORMAT TABLE File.
;
S MAGRY(1)="Site^IEN^Test Type^Grid^Format ID"
S MAGRY(2)="All Sites^0^RestingECG^Yes^6"
S MAGRY(3)="All Sites^0^Stress^Yes^7"
S MAGRY(4)="All Sites^0^Holter^Yes^8"
S MAGRY(5)="All Sites^0^HiRes^Yes^9"
;
S MAGRY(6)="All Sites^0^RestingECG^No^12"
S MAGRY(7)="All Sites^0^HiRes^No^13"
S MAGRY(8)="All Sites^0^Stress^No^14"
S MAGRY(9)="All Sites^0^Holter^No^15"
S CT=9
D SITE
S MAGRY(0)="1^All Format Table entries, including the Default Format IDs."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGGTU4M 5435 printed Dec 13, 2024@02:03:28 Page 2
MAGGTU4M ;WOIFO/GEK - MUSE3 VIEWER UTILITIES
+1 ;;3.0;IMAGING;**188**;Mar 19, 2002;Build 61;Mar 18, 2018
+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 ; This routine contains Utilities for the MUSE FORMAT TABLE
+18 ;
+19 QUIT
+20 ;
+21 ; The default Format ID's listed below are used to generate the
+22 ; MUSE Test for the specified Test Type.
+23 ; If Site Specific Format ID's have been entered into the
+24 ; MUSE FORMAT TABLE, those Format ID's will override the defaults
+25 ;
+26 ; ***** DEFAULTS for Test Type -> Format ID mapping
+27 ;;===============================================================
+28 ; Test Type Grid Format ID
+29 ; RestingECG Y 6
+30 ; Stress Y 7
+31 ; Holter Y 8
+32 ; HiRes Y 9
+33 ; RestingECG N 12
+34 ; HiRes N 13
+35 ; Stress N 14
+36 ; Holter N 15
+37 ;;===============================================================
+38 ;
NETLOC(MAGRY,IEN) ;RPC [MAG4 GET NETLOC INFO]
+1 ; Gets info from Network Location file.
+2 ; IEN is the Internal Entry Number in the NETWORK LOCATION File
+3 ;
+4 ; The Return String is in the format :
+5 ; .01 Description ^ Physical Reference ^ Operational Status (OnLine/OffLine)
+6 NEW IC,FNUM,MAGZZ,MAGERR
+7 NEW $ETRAP,$ESTACK
SET $ETRAP="D ERR^MAGGTERR"
+8 SET FNUM="2005.2"
+9 KILL MAGRY
+10 ;
IF '$GET(IEN)
Begin DoDot:1
+11 SET MAGRY="0^INVALID Input: "_IEN
+12 QUIT
End DoDot:1
QUIT
+13 ;
IF '$DATA(^MAG(2005.2,IEN,0))
Begin DoDot:1
+14 SET MAGRY="0^INVALID NETWORK LOCATION Entry: "_IEN
+15 QUIT
End DoDot:1
QUIT
+16 KILL MAGZZ,MAGERR
+17 DO GETS^DIQ(FNUM,IEN,".01;1;5","EI","MAGZZ","MAGERR")
+18 SET IC=IEN_","
+19 SET MAGRY="1^"_MAGZZ(FNUM,IC,".01","E")_"^"_IEN_"^"_MAGZZ(FNUM,IC,"1","E")_"^"_MAGZZ(FNUM,IC,"5","E")
+20 QUIT
TABLE(MAGRY,IEN) ;RPC [MAG4 GET MUSE TABLE]
+1 ; IEN is the Internal Entry Number in the NETWORK LOCATION File.
+2 ; This will return all MUSE FORMAT TABLE entries for the IEN.
+3 ; or
+4 ; IEN = 'SITE'
+5 ; This will return MUSE FORMAT TABLE entries that are defined for
+6 ; MUSE Sites.
+7 ; or
+8 ; IEN = 'ALL'
+9 ; This will return an Array, including the Default Format mapping
+10 ; in a format that can be shown to the user.
+11 ;
+12 NEW I,CT,NETLOC,IC,FNUM,MAGZZ,MAGERR
+13 NEW $ETRAP,$ESTACK
SET $ETRAP="D ERRA^MAGGTERR"
+14 SET FNUM="2006.172"
+15 SET CT=0
+16 KILL MAGRY
+17 ;
IF IEN="ALL"
DO ALL
QUIT
+18 ;
IF IEN="SITE"
DO SITE
QUIT
+19 ;
IF '$GET(IEN)
Begin DoDot:1
+20 SET MAGRY(0)="0^INVALID Input: "_IEN
+21 QUIT
End DoDot:1
QUIT
+22 ;
IF '$DATA(^MAG(2005.2,IEN,0))
Begin DoDot:1
+23 SET MAGRY(0)="0^INVALID NETWORK LOCATION Entry: "_IEN
+24 QUIT
End DoDot:1
QUIT
+25 SET NETLOC=$PIECE(^MAG(2005.2,IEN,0),"^",1)
+26 ;
IF '$DATA(^MAG(2006.172,"C",IEN))
Begin DoDot:1
+27 SET MAGRY(0)="0^There are no MUSE FORMAT TABLE entries for: "_NETLOC_" ("_IEN_")"
+28 QUIT
End DoDot:1
QUIT
+29 ;
SET I=""
FOR
SET I=$ORDER(^MAG(2006.172,"C",IEN,I))
if 'I
QUIT
Begin DoDot:1
+30 KILL MAGZZ,MAGERR
+31 DO GETS^DIQ(FNUM,I,".01;1;2;3;4","EI","MAGZZ","MAGERR")
+32 SET CT=CT+1
+33 SET IC=I_","
+34 SET MAGRY(CT)=MAGZZ(FNUM,IC,1,"E")_"^"_IEN_"^"_MAGZZ(FNUM,IC,2,"E")
+35 SET MAGRY(CT)=MAGRY(CT)_"^"_MAGZZ(FNUM,IC,3,"E")_"^"_MAGZZ(FNUM,IC,4,"E")
+36 QUIT
End DoDot:1
+37 IF CT=0
SET MAGRY(0)="0^0 Entries in MUSE FORMAT TABLE for: "_MAGZZ(FNUM,IC,1,"E")_" ("_IEN_")"
+38 IF CT>0
SET MAGRY(0)="1^"_CT_" MUSE FORMAT TABLE Entries for: "_MAGZZ(FNUM,IC,1,"E")_" ("_IEN_")"
+39 QUIT
SITE ;called internally
+1 ; We get here if user wants ALL MUSE FORMAT TABLE Entered at this VistA Site.
+2 SET MAGRY(0)="1^Returning All entries in MUSE FORMAT TABLE"
+3 NEW J
+4 SET J=0
+5 ;
FOR
SET J=$ORDER(^MAG(2006.172,J))
if 'J
QUIT
Begin DoDot:1
+6 KILL MAGZZ,MAGERR
+7 DO GETS^DIQ(FNUM,J,".01;1;2;3;4","EI","MAGZZ","MAGERR")
+8 SET CT=CT+1
+9 SET IC=J_","
+10 SET MAGRY(CT)=MAGZZ(FNUM,IC,1,"E")_"^"_MAGZZ(FNUM,IC,1,"I")_"^"_MAGZZ(FNUM,IC,2,"E")
+11 SET MAGRY(CT)=MAGRY(CT)_"^"_MAGZZ(FNUM,IC,3,"E")_"^"_MAGZZ(FNUM,IC,4,"E")
+12 QUIT
End DoDot:1
+13 IF CT=0
SET MAGRY(0)="0^0 Entries in MUSE FORMAT TABLE."
+14 IF CT>0
SET MAGRY(0)="1^"_CT_" MUSE FORMAT TABLE Entries."
+15 QUIT
ALL ;called internally
+1 ; This function will return an array of MUSE FORMAT TABLE entries for Display
+2 ; to the user.
+3 ; This Array will include the 'Default' values that are used, and any
+4 ; Site Specific entries in the MUSE FORMAT TABLE File.
+5 ;
+6 SET MAGRY(1)="Site^IEN^Test Type^Grid^Format ID"
+7 SET MAGRY(2)="All Sites^0^RestingECG^Yes^6"
+8 SET MAGRY(3)="All Sites^0^Stress^Yes^7"
+9 SET MAGRY(4)="All Sites^0^Holter^Yes^8"
+10 SET MAGRY(5)="All Sites^0^HiRes^Yes^9"
+11 ;
+12 SET MAGRY(6)="All Sites^0^RestingECG^No^12"
+13 SET MAGRY(7)="All Sites^0^HiRes^No^13"
+14 SET MAGRY(8)="All Sites^0^Stress^No^14"
+15 SET MAGRY(9)="All Sites^0^Holter^No^15"
+16 SET CT=9
+17 DO SITE
+18 SET MAGRY(0)="1^All Format Table entries, including the Default Format IDs."
+19 QUIT