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

MAGDQRUE.m

Go to the documentation of this file.
  1. MAGDQRUE ;WOIFO/MLH - Imaging RPCs for Query/Retrieve - error utilities ; 30 Dec 2011 2:17 PM
  1. ;;3.0;IMAGING;**118**;Mar 19, 2002;Build 4525;May 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. ERR(X) S ^TMP("MAG",$J,"ERR",$O(^TMP("MAG",$J,"ERR"," "),-1)+1)=X
  1. Q
  1. ;
  1. ERRLOG N I,O,X
  1. S O=1,I=""
  1. F S I=$O(^TMP("MAG",$J,"ERR",I)) Q:I="" S X=$G(^(I)) D
  1. . S O=O+1,OUT(O)=X
  1. . Q
  1. D LOG^MAGDQRUL("Error","",(-O)_",Errors encountered")
  1. Q
  1. ;
  1. ERRSAV N I,O,RESGBL,X
  1. Q:'$G(RESULT) S RESGBL=$NA(^MAGDQR(2006.5732,RESULT))
  1. S $P(@RESGBL@(0),"^",2,3)="OK^"_$$NOW^XLFDT()
  1. K @RESGBL@(1)
  1. S O=0,I=""
  1. F S I=$O(^TMP("MAG",$J,"ERR",I)) Q:I="" S X=$G(^(I)) D
  1. . S O=O+1,@RESGBL@(1,O,0)="0000,0902^"_X
  1. . Q
  1. Q