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

ISIJLS1.m

Go to the documentation of this file.
  1. ISIJLS1 ; ISI/JHC - ISIRAD exam list functions ; 10/17/2022
  1. ;;1.1;ESL ISI IMAGING;**99,103,110**;Dec 21, 2022;Build 41
  1. ;; This routine is the property of ViTel Net, and should not be modified.
  1. ;; This software is a medical device and is subject to FDA regulation.
  1. ;; Modifications to this software may only be made under the terms of
  1. ;; 21CFR820 regulation. 21CFR Subpart A 820.1: "The failure to comply
  1. ;; with any applicable provision in this part renders a device
  1. ;; adulterated under section 501(h) of the act. Such a device,
  1. ;; as well as any person responsible for the failure to comply,
  1. ;; is subject to regulatory action."
  1. ; Reference to SVMAG2A^MAGJLS3 in ICR #7403
  1. ; Reference to GETEXAM2^MAGJUTL1 in ICR #7404
  1. ; Reference to File #2006.631 in ICR #7409
  1. Q
  1. ;;
  1. ;
  1. ; entry point for List Type = "I" lists, called from magjls3
  1. ;
  1. INDXBLD ; compile Indexed exam data (List Type = "I")
  1. ; look up compile routine entry-point & call the subroutine
  1. ; else, quit with problem error code
  1. N NOGO,INDXTAG,INDXRTN,X
  1. S NOGO=0,REPLY="" ; reply variable controlled by calling routine (magjls3)
  1. S X=$G(^MAG(2006.631,LSTID,"ISI")),INDXTAG=$P(X,U),INDXRTN=$P(X,U,2)
  1. D I NOGO Q
  1. . I INDXTAG]"",(INDXRTN]"")
  1. . I $T(@(INDXTAG_U_INDXRTN))]"" ; test for routine in env.
  1. . E S NOGO=1,REPLY="0^1~Problem with compile specification for this Index list (LISTID="_LSTID_")."
  1. D @(INDXTAG_U_INDXRTN_"(.REPLY)")
  1. I REPLY="" S REPLY="0^1~No results found for Indexed exams list."
  1. ;
  1. Q
  1. ;
  1. FAVCOMP(REPLY) ; compile Favorites exam list
  1. N DASH,EXAMIEN,FIL,MAGRET,USERIEN,USERFILE,RADFN,RADTI,RACNI
  1. N KEYWD1,KEYWD2,FAVNOTE,FAVICT,FAVCT
  1. S REPLY="",FAVCT=0
  1. S USERFILE=23451,DASH="-"
  1. S USERIEN=$$USERIEN^ISIJFAV(DUZ)
  1. I 'USERIEN S REPLY="0^1~Current user has not stored any Favorites exams." Q
  1. S FIL=$NA(^ISI(USERFILE,USERIEN)),EXAMIEN=0
  1. F FAVICT=0:1 S EXAMIEN=$O(@FIL@(1,EXAMIEN)) Q:'EXAMIEN S X=^(EXAMIEN,0),Y=$P(X,U) D
  1. . S RADFN=$P(Y,DASH),RADTI=$P(Y,DASH,2),RACNI=$P(Y,DASH,3)
  1. . S KEYWD1=$P(X,U,2),KEYWD2=$P(X,U,3)
  1. . S FAVNOTE=$$FAVNOTE()
  1. . D GETEXAM2^MAGJUTL1(RADFN,RADTI,RACNI,0,.MAGRET)
  1. . I MAGRET D
  1. . . S X=$P(^TMP($J,"MAGRAEX",1,2),U,11)
  1. . . I X]"",("EW")[X Q ; exclude if in Waiting or Examined status
  1. . . S FAVCT=FAVCT+1
  1. . . ; stuff Favorites data into list compile results
  1. . . S $P(^TMP($J,"MAGRAEX",1,"ISI"),U,4)=KEYWD1,$P(^("ISI"),U,5)=KEYWD2,$P(^("ISI"),U,6)=FAVNOTE
  1. . . D SVMAG2A^MAGJLS3()
  1. I 'FAVCT D
  1. . I 'FAVICT S REPLY="0^1~No Favorites exams found for current user."
  1. . E S REPLY="0^1~Current user's Favorites exams are all in Waiting or Examined status; display not permitted."
  1. Q
  1. ;
  1. FAVNOTE() ; determine what to return for the notes
  1. ; because regular list columns cannot manage W-P data
  1. N RET,I,X,Y
  1. S RET=""
  1. S X=$G(@FIL@(1,EXAMIEN,1,0))
  1. I X]"" S Y=$P(X,U,4) D
  1. . I Y=1 D Q:(RET]"") ; only one notes line; return only if short enough
  1. . . S I=$O(@FIL@(1,EXAMIEN,1,0))
  1. . . S:I RET=$G(^(I,0))
  1. . . I $L(RET)>40 S RET=""
  1. . . E I '$L(RET) S RET=" "
  1. . I RET="" S RET="Use 'View/Edit' to display notes"
  1. Q:$Q RET Q
  1. ;
  1. STATUS(STS) ; return a status "value" for the input Status IEN
  1. ; Returns Status ORDER if = 0/1/9; else return Vrad Category "equivalent"
  1. N X
  1. I STS]"" D
  1. . S X=^RA(72,STS,0)
  1. . S STS=$P(X,U,3) ; status order
  1. . I STS=0!(STS=1)!(STS=9) Q ; Cancelled/Waiting/Complete
  1. . S STS=$P(X,U,9) ; vrad category
  1. . I STS="D"!(STS="T") S STS="I" Q ; Dict or Transcribe == "I" (interpreted)
  1. Q:$Q STS Q
  1. ;
  1. END ;