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

MAGDQR23.m

Go to the documentation of this file.
  1. MAGDQR23 ;WOIFO/EdM,MLH - UID logic for C-FIND - return results for rad studies in old DB structure ; 25 Jan 2012 11:47 AM
  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. PATSSNOL(IMAGE,REQ,RESULT,MAGDUZ,FD,LD,ERROR,FATAL) ; Radiology images (old DB structure) case - called from PATSSN^MAGDQR02
  1. N X,V,MAGD0,MAGD1,MAGD2
  1. Q:$P($G(^MAG(2005,IMAGE,0)),"^",10)
  1. S X=$G(^MAG(2005,IMAGE,2))
  1. S V=$P(X,"^",5) I V,(V<FD)!(V>LD) Q ; study out of date range
  1. S V=$P(X,"^",6)
  1. I V=74 D Q ; Radiology Image
  1. . S V=$P(X,"^",5) I V,(V<FD)!(V>LD) Q
  1. . S X=$G(^RARPT(+$P(X,"^",7),0)) ; IA # 1171
  1. . S MAGD0=$P(X,"^",2),MAGD1=9999999.9999-$P(X,"^",3),V=$P(X,"^",4)
  1. . S MAGD2=$O(^RADPT(MAGD0,"DT",MAGD1,"P","B",V,"")) ; IA # 1172
  1. . D RESULT^MAGDQR03("R",.REQ,RESULT,IMAGE,MAGDUZ,MAGD0,MAGD1,MAGD2,.ERROR,.FATAL)
  1. . Q
  1. I (V=8925)!(V=2006.5839) D Q ; Consult Image
  1. . S MAGD0=+$P($G(^MAG(2005,IMAGE,0)),"^",7)
  1. . D RESULT^MAGDQR03("C",.REQ,RESULT,IMAGE,MAGDUZ,MAGD0,0,0,.ERROR,.FATAL)
  1. . Q
  1. Q