MAGVIM04 ;WOIFO/MAT - Utilities for RPC calls for DICOM file processing ; 3 Feb 2012 4:35 AM
;;3.0;IMAGING;**118**;Mar 19, 2002;Build 4525;May 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
;+++ Importer II Log Reports: Data Delivery
;
; Internal processing routine for RPC: MAGV IMPORT STUDY LOG REPORT
;
; Output report data from MAGV IMPORTER LOG File (#2006.9421).
;
; Inputs:
; =======
;
; MAGVARY .... Variable for returned data.
; FILE ....... Data source file number.
; REPORT ..... Report selector = {1, 2, 3}
; STARTDT .... Inclusive lower bound of query date range.
; STOPDT ..... Inclusive upper "".
;
; Outputs:
; ========
;
; Expected: ^(0) 0`Count of lines returned.
; (n) Global array of report data.
;
; On Error: ^(0) <0`Error message.
;
; Notes
; =====
;
; Called by IMPLOGEX^MAGVIM03.
;
MAGVQRY(MAGVARY,FILE,REPORT,STARTDT,STOPDT) ;
;
;--- Initialize counter arrays.
K MAGVCT,MAGVDT,MAGVLC,MAGVMC,MAGVTP
S MAGVCT("TOTALDT")=0 ;Hits within date range.
S MAGVCT("RSELTOT")=0 ;Total ... total what?
;--- Initialize overhead counters for SERIES, OBJECTs imported, OBjects FAILED
N SS F SS="SERIES","OBJECT","OBFAIL" S MAGVCT(SS)=0
N MAGVNOD S MAGVNOD=$NA(^MAGV(FILE,"B",STARTDT))
N STOPDT0
D
. ;--- Compensate STOPDT for $QS logic. IA #10000
. N X,X1,X2 S X1=STOPDT,X2=1 D C^%DTC S STOPDT0=X
F S MAGVNOD=$Q(@MAGVNOD) Q:+$QS(MAGVNOD,3)]STOPDT0 Q:$QS(MAGVNOD,2)'="B" D
. ;
. S MAGVCT("TOTALDT")=MAGVCT("TOTALDT")+1
. ;--- Count of imported studies per date.
. N RECDT S RECDT=$QS(MAGVNOD,3)\1
. S:'$D(MAGVDT(RECDT)) MAGVDT(RECDT)=0
. S MAGVDT(RECDT)=MAGVDT(RECDT)+1
. N MAGVIEN S MAGVIEN=$QS(MAGVNOD,4)
. ;--- Set working node.
. N MAGVNOD0 S MAGVNOD0=$G(^MAGV(FILE,MAGVIEN,0))
. ;
. ;--- Get counts for this MAGVIEN.
. ;--- Counts per "Study Performed Location"
. N MAGVSLOC S MAGVSLOC=$P(MAGVNOD0,U,7)
. S:MAGVSLOC="" MAGVSLOC="UNSPECIFIED"
. S:MAGVSLOC?1N.N MAGVSLOC="UNSPECIFIED"
. S:'$D(MAGVLC(MAGVSLOC)) MAGVLC(MAGVSLOC)=0,MAGVLC(0)=0
. S MAGVLC(MAGVSLOC)=MAGVLC(MAGVSLOC)+1,MAGVLC(0)=MAGVLC(0)+1
. ;--- Count of imported studies per study type.
. N MAGVSTYP S MAGVSTYP=$P(MAGVNOD0,U,8) S:MAGVSTYP="" MAGVSTYP="UNSPECIFIED"
. S:'$D(MAGVTP(MAGVSTYP)) MAGVTP(MAGVSTYP)=0
. S MAGVTP(MAGVSTYP)=MAGVTP(MAGVSTYP)+1
. ;
. N CTSERIES S CTSERIES=$P(MAGVNOD0,U,9)
. N CTOBJECT S CTOBJECT=$P(MAGVNOD0,U,10)
. N CTOBFAIL S CTOBFAIL=$P(MAGVNOD0,U,12)
. ;
. F SS="SERIES","OBJECT","OBFAIL" D
. . ;--- Add each to its overhead counter.
. . S MAGVCT(SS)=MAGVCT(SS)+@("CT"_SS)
. . ;
. . ;--- Add each to its per-date counter.
. . S:'$D(MAGVDT(RECDT,SS)) MAGVDT(RECDT,SS)=0
. . S MAGVDT(RECDT,SS)=MAGVDT(RECDT,SS)+@("CT"_SS)
. . ;
. . ;--- Add each to its per-location counter.
. . S:'$D(MAGVLC(MAGVSLOC,SS)) MAGVLC(MAGVSLOC,SS)=0
. . S MAGVLC(MAGVSLOC,SS)=MAGVLC(MAGVSLOC,SS)+@("CT"_SS)
. . ;
. . ;--- Add each to its per-studyType counter.
. . S:'$D(MAGVTP(MAGVSTYP,SS)) MAGVTP(MAGVSTYP,SS)=0
. . S MAGVTP(MAGVSTYP,SS)=MAGVTP(MAGVSTYP,SS)+@("CT"_SS)
. . Q
. ;--- Count of modalities (only for REPORT=3 right now).
. I REPORT=3 D K MAGVA
. . ;
. . N CTNDX,SFNDX,SUBFILE
. . S SUBFILE=2006.94211
. . ;
. . ;--- Get number of modality counter subfile entries.
. . S CTNDX=$P($G(^MAGV(FILE,MAGVIEN,100,0)),U,3)
. . Q:CTNDX<1
. . ;
. . ;--- Grand Total counter ... no filter.
. . F SFNDX=1:1:CTNDX D
. . . ;
. . . N MAGVLB S MAGVLB=$$GET1^DIQ(SUBFILE,SFNDX_","_MAGVIEN_",",.01)
. . . N MAGVMCT S MAGVMCT=+$$GET1^DIQ(SUBFILE,SFNDX_","_MAGVIEN_",",.02)
. . . S:'$D(MAGVMC(MAGVLB)) MAGVMC(MAGVLB)=0
. . . S MAGVMC(MAGVLB)=MAGVMC(MAGVLB)+MAGVMCT
. . . Q
. . Q
. Q
D MAGVOUTP
Q
;
;+++ Internal entry point: Assemble report output.
;
MAGVOUTP ;
;
N CT S CT=0
;
N TIME S TIME=$$NOW^XLFDT,TIME=$$FMTE^XLFDT(TIME)
N LNA S LNA="" S $P(LNA,"*",81)=""
N LNH S LNH="" S $P(LNH,"-",81)=""
N LNS S LNS="" S $P(LNS," ",81)=""
N LNU S LNU="" S $P(LNU,"_",81)=""
;--- Output general header.
S CT=CT+1,@MAGVARY@(CT)="Imaging Importer II Report: "_TIME
;
D ZRUCR(2)
D
. S CT=CT+1
. I STARTDT=STOPDT D Q
. . S @MAGVARY@(CT)=" Imported on "_$$FMTE^XLFDT(STARTDT,5)_":"
. S @MAGVARY@(CT)=" Imported between "_$$FMTE^XLFDT(STARTDT,5)_" and "_$$FMTE^XLFDT(STOPDT,5)_":"
D ZRUCR(2)
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,23)_$J(MAGVCT("TOTALDT"),10)_" Studies"
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,23)_$J(MAGVCT("SERIES"),10)_" Series"
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,23)_$J(MAGVCT("OBJECT"),10)_" Objects"
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,23)_$J(MAGVCT("OBFAIL"),10)_" Objects Failed"
S CT=CT+1,@MAGVARY@(CT)=$E(LNU,1,56)
D ZRUCR(1)
;--- Branch to specific report.
D
. I REPORT=1 D REPDAT Q
. I REPORT=2 D REPLCN Q
. I REPORT=3 D REPMOD Q
S CT=CT+1,@MAGVARY@(CT)=$E(LNA,1,6)_" END OF REPORT "_$E(LNA,1,6)
Q
;
REPDAT ;
;--- Output date specific column headers.
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,45)_"Failed"
S CT=CT+1,@MAGVARY@(CT)="DATE______"_" Studies"_" Series"_" Objects"_" Objects"
D ZRUCR(1)
;
;--- Tabular output by date.
N DATE S DATE=""
F S DATE=$O(MAGVDT(DATE)) Q:DATE="" D
. ;
. S CT=CT+1
. N OUTDATE S OUTDATE=$$FMTE^XLFDT(DATE,5)
. S @MAGVARY@(CT)=$J(OUTDATE,10)_" "_$J(MAGVDT(DATE),8)_" "_$J(MAGVDT(DATE,"SERIES"),8)
. S @MAGVARY@(CT)=@MAGVARY@(CT)_" "_$J(MAGVDT(DATE,"OBJECT"),8)_" "_$J(MAGVDT(DATE,"OBFAIL"),8)
. Q
D ZRUCR(1)
Q
;
REPLCN ;
;--- Output location specific column headers.
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,50)_"Failed"
S CT=CT+1,@MAGVARY@(CT)="LOCATION_______"_" Studies"_" Series"_" Objects"_" Objects"
D ZRUCR(2)
;
;--- Tabular output by location.
N LOCN S LOCN=$O(MAGVLC(""))
F S LOCN=$O(MAGVLC(LOCN)) Q:LOCN="" D
. ;
. ;--- Pad a location under 15 characters.
. N LLOCN S LLOCN=$L($E(LOCN,1,15))
. N SPAD S SPAD=3+(15-LLOCN)
. ;
. S CT=CT+1
. S @MAGVARY@(CT)=$E(LOCN,1,15)_":"_$E(LNS,1,SPAD)_$J(MAGVLC(LOCN),8)_" "_$J(MAGVLC(LOCN,"SERIES"),8)
. S @MAGVARY@(CT)=@MAGVARY@(CT)_" "_$J(MAGVLC(LOCN,"OBJECT"),8)_" "_$J(MAGVLC(LOCN,"OBFAIL"),8)
. ;
. D ZRUCR(1)
. S CT=CT+1,@MAGVARY@(CT)=$E(LNH,1,56)
. D ZRUCR(2)
D ZRUCR(1)
Q
;
REPMOD ;
S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,27)_"COUNT ... MODALITY"
D ZRUCR(1)
S SS="" F S SS=$O(MAGVMC(SS)) Q:SS="" D
. S CT=CT+1,@MAGVARY@(CT)=$E(LNS,1,22)_$J(MAGVMC(SS),10)_" ... "_SS
D ZRUCR(1)
Q
;+++ Routine utility: Output 'Carriage Return'
ZRUCR(REP) ;
N X F X=1:1:REP S CT=CT+1,@MAGVARY@(CT)=""
Q
;
; MAGVIM04
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGVIM04 7672 printed Dec 13, 2024@02:09:51 Page 2
MAGVIM04 ;WOIFO/MAT - Utilities for RPC calls for DICOM file processing ; 3 Feb 2012 4:35 AM
+1 ;;3.0;IMAGING;**118**;Mar 19, 2002;Build 4525;May 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 ;+++ Importer II Log Reports: Data Delivery
+19 ;
+20 ; Internal processing routine for RPC: MAGV IMPORT STUDY LOG REPORT
+21 ;
+22 ; Output report data from MAGV IMPORTER LOG File (#2006.9421).
+23 ;
+24 ; Inputs:
+25 ; =======
+26 ;
+27 ; MAGVARY .... Variable for returned data.
+28 ; FILE ....... Data source file number.
+29 ; REPORT ..... Report selector = {1, 2, 3}
+30 ; STARTDT .... Inclusive lower bound of query date range.
+31 ; STOPDT ..... Inclusive upper "".
+32 ;
+33 ; Outputs:
+34 ; ========
+35 ;
+36 ; Expected: ^(0) 0`Count of lines returned.
+37 ; (n) Global array of report data.
+38 ;
+39 ; On Error: ^(0) <0`Error message.
+40 ;
+41 ; Notes
+42 ; =====
+43 ;
+44 ; Called by IMPLOGEX^MAGVIM03.
+45 ;
MAGVQRY(MAGVARY,FILE,REPORT,STARTDT,STOPDT) ;
+1 ;
+2 ;--- Initialize counter arrays.
+3 KILL MAGVCT,MAGVDT,MAGVLC,MAGVMC,MAGVTP
+4 ;Hits within date range.
SET MAGVCT("TOTALDT")=0
+5 ;Total ... total what?
SET MAGVCT("RSELTOT")=0
+6 ;--- Initialize overhead counters for SERIES, OBJECTs imported, OBjects FAILED
+7 NEW SS
FOR SS="SERIES","OBJECT","OBFAIL"
SET MAGVCT(SS)=0
+8 NEW MAGVNOD
SET MAGVNOD=$NAME(^MAGV(FILE,"B",STARTDT))
+9 NEW STOPDT0
+10 Begin DoDot:1
+11 ;--- Compensate STOPDT for $QS logic. IA #10000
+12 NEW X,X1,X2
SET X1=STOPDT
SET X2=1
DO C^%DTC
SET STOPDT0=X
End DoDot:1
+13 FOR
SET MAGVNOD=$QUERY(@MAGVNOD)
if +$QSUBSCRIPT(MAGVNOD,3)]STOPDT0
QUIT
if $QSUBSCRIPT(MAGVNOD,2)'="B"
QUIT
Begin DoDot:1
+14 ;
+15 SET MAGVCT("TOTALDT")=MAGVCT("TOTALDT")+1
+16 ;--- Count of imported studies per date.
+17 NEW RECDT
SET RECDT=$QSUBSCRIPT(MAGVNOD,3)\1
+18 if '$DATA(MAGVDT(RECDT))
SET MAGVDT(RECDT)=0
+19 SET MAGVDT(RECDT)=MAGVDT(RECDT)+1
+20 NEW MAGVIEN
SET MAGVIEN=$QSUBSCRIPT(MAGVNOD,4)
+21 ;--- Set working node.
+22 NEW MAGVNOD0
SET MAGVNOD0=$GET(^MAGV(FILE,MAGVIEN,0))
+23 ;
+24 ;--- Get counts for this MAGVIEN.
+25 ;--- Counts per "Study Performed Location"
+26 NEW MAGVSLOC
SET MAGVSLOC=$PIECE(MAGVNOD0,U,7)
+27 if MAGVSLOC=""
SET MAGVSLOC="UNSPECIFIED"
+28 if MAGVSLOC?1N.N
SET MAGVSLOC="UNSPECIFIED"
+29 if '$DATA(MAGVLC(MAGVSLOC))
SET MAGVLC(MAGVSLOC)=0
SET MAGVLC(0)=0
+30 SET MAGVLC(MAGVSLOC)=MAGVLC(MAGVSLOC)+1
SET MAGVLC(0)=MAGVLC(0)+1
+31 ;--- Count of imported studies per study type.
+32 NEW MAGVSTYP
SET MAGVSTYP=$PIECE(MAGVNOD0,U,8)
if MAGVSTYP=""
SET MAGVSTYP="UNSPECIFIED"
+33 if '$DATA(MAGVTP(MAGVSTYP))
SET MAGVTP(MAGVSTYP)=0
+34 SET MAGVTP(MAGVSTYP)=MAGVTP(MAGVSTYP)+1
+35 ;
+36 NEW CTSERIES
SET CTSERIES=$PIECE(MAGVNOD0,U,9)
+37 NEW CTOBJECT
SET CTOBJECT=$PIECE(MAGVNOD0,U,10)
+38 NEW CTOBFAIL
SET CTOBFAIL=$PIECE(MAGVNOD0,U,12)
+39 ;
+40 FOR SS="SERIES","OBJECT","OBFAIL"
Begin DoDot:2
+41 ;--- Add each to its overhead counter.
+42 SET MAGVCT(SS)=MAGVCT(SS)+@("CT"_SS)
+43 ;
+44 ;--- Add each to its per-date counter.
+45 if '$DATA(MAGVDT(RECDT,SS))
SET MAGVDT(RECDT,SS)=0
+46 SET MAGVDT(RECDT,SS)=MAGVDT(RECDT,SS)+@("CT"_SS)
+47 ;
+48 ;--- Add each to its per-location counter.
+49 if '$DATA(MAGVLC(MAGVSLOC,SS))
SET MAGVLC(MAGVSLOC,SS)=0
+50 SET MAGVLC(MAGVSLOC,SS)=MAGVLC(MAGVSLOC,SS)+@("CT"_SS)
+51 ;
+52 ;--- Add each to its per-studyType counter.
+53 if '$DATA(MAGVTP(MAGVSTYP,SS))
SET MAGVTP(MAGVSTYP,SS)=0
+54 SET MAGVTP(MAGVSTYP,SS)=MAGVTP(MAGVSTYP,SS)+@("CT"_SS)
+55 QUIT
End DoDot:2
+56 ;--- Count of modalities (only for REPORT=3 right now).
+57 IF REPORT=3
Begin DoDot:2
+58 ;
+59 NEW CTNDX,SFNDX,SUBFILE
+60 SET SUBFILE=2006.94211
+61 ;
+62 ;--- Get number of modality counter subfile entries.
+63 SET CTNDX=$PIECE($GET(^MAGV(FILE,MAGVIEN,100,0)),U,3)
+64 if CTNDX<1
QUIT
+65 ;
+66 ;--- Grand Total counter ... no filter.
+67 FOR SFNDX=1:1:CTNDX
Begin DoDot:3
+68 ;
+69 NEW MAGVLB
SET MAGVLB=$$GET1^DIQ(SUBFILE,SFNDX_","_MAGVIEN_",",.01)
+70 NEW MAGVMCT
SET MAGVMCT=+$$GET1^DIQ(SUBFILE,SFNDX_","_MAGVIEN_",",.02)
+71 if '$DATA(MAGVMC(MAGVLB))
SET MAGVMC(MAGVLB)=0
+72 SET MAGVMC(MAGVLB)=MAGVMC(MAGVLB)+MAGVMCT
+73 QUIT
End DoDot:3
+74 QUIT
End DoDot:2
KILL MAGVA
+75 QUIT
End DoDot:1
+76 DO MAGVOUTP
+77 QUIT
+78 ;
+79 ;+++ Internal entry point: Assemble report output.
+80 ;
MAGVOUTP ;
+1 ;
+2 NEW CT
SET CT=0
+3 ;
+4 NEW TIME
SET TIME=$$NOW^XLFDT
SET TIME=$$FMTE^XLFDT(TIME)
+5 NEW LNA
SET LNA=""
SET $PIECE(LNA,"*",81)=""
+6 NEW LNH
SET LNH=""
SET $PIECE(LNH,"-",81)=""
+7 NEW LNS
SET LNS=""
SET $PIECE(LNS," ",81)=""
+8 NEW LNU
SET LNU=""
SET $PIECE(LNU,"_",81)=""
+9 ;--- Output general header.
+10 SET CT=CT+1
SET @MAGVARY@(CT)="Imaging Importer II Report: "_TIME
+11 ;
+12 DO ZRUCR(2)
+13 Begin DoDot:1
+14 SET CT=CT+1
+15 IF STARTDT=STOPDT
Begin DoDot:2
+16 SET @MAGVARY@(CT)=" Imported on "_$$FMTE^XLFDT(STARTDT,5)_":"
End DoDot:2
QUIT
+17 SET @MAGVARY@(CT)=" Imported between "_$$FMTE^XLFDT(STARTDT,5)_" and "_$$FMTE^XLFDT(STOPDT,5)_":"
End DoDot:1
+18 DO ZRUCR(2)
+19 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,23)_$JUSTIFY(MAGVCT("TOTALDT"),10)_" Studies"
+20 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,23)_$JUSTIFY(MAGVCT("SERIES"),10)_" Series"
+21 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,23)_$JUSTIFY(MAGVCT("OBJECT"),10)_" Objects"
+22 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,23)_$JUSTIFY(MAGVCT("OBFAIL"),10)_" Objects Failed"
+23 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNU,1,56)
+24 DO ZRUCR(1)
+25 ;--- Branch to specific report.
+26 Begin DoDot:1
+27 IF REPORT=1
DO REPDAT
QUIT
+28 IF REPORT=2
DO REPLCN
QUIT
+29 IF REPORT=3
DO REPMOD
QUIT
End DoDot:1
+30 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNA,1,6)_" END OF REPORT "_$EXTRACT(LNA,1,6)
+31 QUIT
+32 ;
REPDAT ;
+1 ;--- Output date specific column headers.
+2 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,45)_"Failed"
+3 SET CT=CT+1
SET @MAGVARY@(CT)="DATE______"_" Studies"_" Series"_" Objects"_" Objects"
+4 DO ZRUCR(1)
+5 ;
+6 ;--- Tabular output by date.
+7 NEW DATE
SET DATE=""
+8 FOR
SET DATE=$ORDER(MAGVDT(DATE))
if DATE=""
QUIT
Begin DoDot:1
+9 ;
+10 SET CT=CT+1
+11 NEW OUTDATE
SET OUTDATE=$$FMTE^XLFDT(DATE,5)
+12 SET @MAGVARY@(CT)=$JUSTIFY(OUTDATE,10)_" "_$JUSTIFY(MAGVDT(DATE),8)_" "_$JUSTIFY(MAGVDT(DATE,"SERIES"),8)
+13 SET @MAGVARY@(CT)=@MAGVARY@(CT)_" "_$JUSTIFY(MAGVDT(DATE,"OBJECT"),8)_" "_$JUSTIFY(MAGVDT(DATE,"OBFAIL"),8)
+14 QUIT
End DoDot:1
+15 DO ZRUCR(1)
+16 QUIT
+17 ;
REPLCN ;
+1 ;--- Output location specific column headers.
+2 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,50)_"Failed"
+3 SET CT=CT+1
SET @MAGVARY@(CT)="LOCATION_______"_" Studies"_" Series"_" Objects"_" Objects"
+4 DO ZRUCR(2)
+5 ;
+6 ;--- Tabular output by location.
+7 NEW LOCN
SET LOCN=$ORDER(MAGVLC(""))
+8 FOR
SET LOCN=$ORDER(MAGVLC(LOCN))
if LOCN=""
QUIT
Begin DoDot:1
+9 ;
+10 ;--- Pad a location under 15 characters.
+11 NEW LLOCN
SET LLOCN=$LENGTH($EXTRACT(LOCN,1,15))
+12 NEW SPAD
SET SPAD=3+(15-LLOCN)
+13 ;
+14 SET CT=CT+1
+15 SET @MAGVARY@(CT)=$EXTRACT(LOCN,1,15)_":"_$EXTRACT(LNS,1,SPAD)_$JUSTIFY(MAGVLC(LOCN),8)_" "_$JUSTIFY(MAGVLC(LOCN,"SERIES"),8)
+16 SET @MAGVARY@(CT)=@MAGVARY@(CT)_" "_$JUSTIFY(MAGVLC(LOCN,"OBJECT"),8)_" "_$JUSTIFY(MAGVLC(LOCN,"OBFAIL"),8)
+17 ;
+18 DO ZRUCR(1)
+19 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNH,1,56)
+20 DO ZRUCR(2)
End DoDot:1
+21 DO ZRUCR(1)
+22 QUIT
+23 ;
REPMOD ;
+1 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,27)_"COUNT ... MODALITY"
+2 DO ZRUCR(1)
+3 SET SS=""
FOR
SET SS=$ORDER(MAGVMC(SS))
if SS=""
QUIT
Begin DoDot:1
+4 SET CT=CT+1
SET @MAGVARY@(CT)=$EXTRACT(LNS,1,22)_$JUSTIFY(MAGVMC(SS),10)_" ... "_SS
End DoDot:1
+5 DO ZRUCR(1)
+6 QUIT
+7 ;+++ Routine utility: Output 'Carriage Return'
ZRUCR(REP) ;
+1 NEW X
FOR X=1:1:REP
SET CT=CT+1
SET @MAGVARY@(CT)=""
+2 QUIT
+3 ;
+4 ; MAGVIM04