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

MAGVD007.m

Go to the documentation of this file.
  1. MAGVD007 ;WOIFO/DAC,MLH - Get images by accession number ; 30 Jan 2012 04:04 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. ;+++++ Get Images by Accession Number
  1. ;
  1. ; Input Parameters
  1. ; ================
  1. ; ACCNUM - Accession Number
  1. ;
  1. ; Return Values
  1. ; =============
  1. ; OUT - status`status message
  1. ; a status of 0 indicates success, a negative integer indicates an error occurred
  1. ;
  1. ; MAGARR(1..n,"IMAGES")
  1. ; MAGARR(1..n,"MAGDFN") - Patient DFN
  1. ; MAGARR(1..n,"MAGD1") - Radiology DT
  1. ; MAGARR(1..n,"MAGD2") - Radiology P
  1. ;
  1. GIBYACC(OUT,ACCNUM,MAGARR) ; Get Images by Accession Number
  1. N SSEP,ANY,I
  1. N P,REQ,IARRAY,MAGD0,MAGD1,MAGD2,PROC ; Needed for function call ACCIEN^MAGVD006
  1. S SSEP=$$STATSEP^MAGVRS41
  1. I $G(ACCNUM)="" S OUT=-1_SSEP_"No accession number provided" Q
  1. S OUT=0
  1. K ^TMP("MAG",$J,"QR")
  1. K MAGARR
  1. S REQ("0008,0050",ACCNUM)=ACCNUM
  1. D ACCNUM^MAGDQR07(.REQ,"0008,0050",ACCNUM,.ANY)
  1. S P=""
  1. S I=0
  1. F S P=$O(^TMP("MAG",$J,"QR",6,P)) Q:P="" D
  1. . K IARRAY
  1. . S (MAGD0,MAGD1,MAGD2)=0
  1. . D ACCIEN^MAGVD006(P,.REQ,.IARRAY,.MAGD0,.MAGD1,.MAGD2,.PROC)
  1. . I $O(IARRAY(""))="" Q
  1. . S I=I+1
  1. . M MAGARR(I,"IMAGES")=IARRAY
  1. . S MAGARR(I,"MAGDFN")=$G(MAGD0)
  1. . S MAGARR(I,"MAGD1")=$G(MAGD1)
  1. . S MAGARR(I,"MAGD2")=$G(MAGD2)
  1. . S MAGARR(I,"PROC")=$G(PROC)
  1. . Q
  1. K ^TMP("MAG",$J,"QR")
  1. Q