MAGURQRS ;WOIFO/MLH - utility - repair headers in ^MAGDAUDT(2006.5733); 18-Jan-2012 08:17
;;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
; This routine resolves issues in ^MAGDAUDT(2006.5733), whose header node
; and subnodes all formerly contained incorrect values in the file number
; portion of the header (e.g., '2006.57633' instead of '2006.5733').
;
Q
;
CLEANUP ;
N FIL,FMDT,MAGIEN,ACTIX
S FIL=$NA(^MAGDAUDT(2006.5733))
L +@FIL:5 E D Q
. W:$D(IO(0)) !,"ERROR: Could not lock statistics file!",!
. Q
S $P(@FIL@(0),"^",2)=2006.5733
S FMDT=0
F S FMDT=$O(@FIL@(FMDT)) Q:'FMDT D
. S $P(@FIL@(FMDT,1,0),"^",2)=2006.57331
. S MAGIEN=0
. F S MAGIEN=$O(@FIL@(FMDT,1,MAGIEN)) Q:'MAGIEN D
. . S $P(@FIL@(FMDT,1,MAGIEN,1,0),"^",2)=2006.57332
. . S ACTIX=0
. . F S ACTIX=$O(@FIL@(FMDT,1,MAGIEN,1,ACTIX)) Q:'ACTIX D
. . . S $P(@FIL@(FMDT,1,MAGIEN,1,ACTIX,1,0),"^",2)=2006.57333
. . . Q
. . Q
. Q
L -@FIL
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGURQRS 1977 printed Dec 13, 2024@02:09:01 Page 2
MAGURQRS ;WOIFO/MLH - utility - repair headers in ^MAGDAUDT(2006.5733); 18-Jan-2012 08:17
+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 ; This routine resolves issues in ^MAGDAUDT(2006.5733), whose header node
+19 ; and subnodes all formerly contained incorrect values in the file number
+20 ; portion of the header (e.g., '2006.57633' instead of '2006.5733').
+21 ;
+22 QUIT
+23 ;
CLEANUP ;
+1 NEW FIL,FMDT,MAGIEN,ACTIX
+2 SET FIL=$NAME(^MAGDAUDT(2006.5733))
+3 LOCK +@FIL:5
IF '$TEST
Begin DoDot:1
+4 if $DATA(IO(0))
WRITE !,"ERROR: Could not lock statistics file!",!
+5 QUIT
End DoDot:1
QUIT
+6 SET $PIECE(@FIL@(0),"^",2)=2006.5733
+7 SET FMDT=0
+8 FOR
SET FMDT=$ORDER(@FIL@(FMDT))
if 'FMDT
QUIT
Begin DoDot:1
+9 SET $PIECE(@FIL@(FMDT,1,0),"^",2)=2006.57331
+10 SET MAGIEN=0
+11 FOR
SET MAGIEN=$ORDER(@FIL@(FMDT,1,MAGIEN))
if 'MAGIEN
QUIT
Begin DoDot:2
+12 SET $PIECE(@FIL@(FMDT,1,MAGIEN,1,0),"^",2)=2006.57332
+13 SET ACTIX=0
+14 FOR
SET ACTIX=$ORDER(@FIL@(FMDT,1,MAGIEN,1,ACTIX))
if 'ACTIX
QUIT
Begin DoDot:3
+15 SET $PIECE(@FIL@(FMDT,1,MAGIEN,1,ACTIX,1,0),"^",2)=2006.57333
+16 QUIT
End DoDot:3
+17 QUIT
End DoDot:2
+18 QUIT
End DoDot:1
+19 LOCK -@FIL
+20 QUIT