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

MAGJLS3A.m

Go to the documentation of this file.
  1. MAGJLS3A ;WIRMFO/JHC VRAD Exam lists ; 29 Apr 2005 10:00 AM
  1. ;;3.0;IMAGING;**18**;Mar 07, 2006
  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. ;; | |
  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. ; EPs:
  1. ; BLDSTAT--Subrtn for exams list compile
  1. ; HISTBLD -- HISTORY List exams
  1. ;
  1. BLDSTAT ; build list of Exam Status codes: STAT(CATEGORY,IMAG_TYP,STAT)=STATNM
  1. ; called from magjls3
  1. N X,CAT,TYP,STNM K STAT S CAT="",STAT=0
  1. F S CAT=$O(^RA(72,"AVC",CAT)) Q:CAT="" D
  1. . S X=$S(CAT="E":3,1:2),X=$P($G(^MAG(2006.69,1,0)),U,X)
  1. . S:'X X=$S(CAT="E":30,1:6) S X=$H-X+1,X=$$HTFM^XLFDT(X),X=9999999.9999-X
  1. . S STAT(CAT)=X
  1. . F S STAT=$O(^RA(72,"AVC",CAT,STAT)) Q:'STAT D
  1. .. S TYP=$P($G(^RA(72,STAT,0)),U,7),STNM=$P(^(0),U) S:TYP="" TYP="~"
  1. .. S STAT(CAT,TYP)=$P($G(^RA(79.2,TYP,0)),U,3),STAT(CAT,TYP,STAT)=STNM
  1. Q
  1. ;
  1. HISTBLD ;Compile HISTORY List
  1. ; Adds records to History List file; initiated by RPC call MAGJ HISTORYLIST/txid=1
  1. ; called from magjls3
  1. N CNT,INDX,RAST,STATCHK,RECLIST,EXID,PIPE3
  1. S X=$G(^XTMP("MAGJ2","HISTORY",DUZ,DUZ(2),0)),INDX=+$P(X,U,2) ; High_IEN ^ Last_Proc_IEN
  1. F S INDX=$O(^XTMP("MAGJ2","HISTORY",DUZ,DUZ(2),0,"ADD",INDX)) Q:'INDX S X=^(INDX) D
  1. . S EXID=$P(X,"|",2),PIPE3=$P(X,"|",3)
  1. . S RADFN=$P(EXID,U),RADTI=$P(EXID,U,2),RACNI=$P(EXID,U,3),(RAST,STATCHK)=""
  1. . D GETEXAM2^MAGJUTL1(RADFN,RADTI,RACNI,0,.MAGRET)
  1. . I MAGRET D SVMAG2A^MAGJLS3(PIPE3)
  1. . S $P(^XTMP("MAGJ2","HISTORY",DUZ,DUZ(2),0),U,2)=INDX
  1. Q
  1. ;
  1. END Q ;