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

ISIJUTL1.m

Go to the documentation of this file.
  1. ISIJUTL1 ; ISI/JHC - ISI Rad subroutines ; 10/17/2022
  1. ;;1.1;ESL ISI IMAGING;**99,106,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. ;
  1. Q
  1. ;
  1. ERR ;
  1. S @MAGRY@(0)="0^4~ERROR "_$$EC^%ZOSV
  1. D @^%ZOSF("ERRTN")
  1. Q:$Q 1 Q
  1. ;
  1. ;
  1. ASIGME(ASIGNEE,LIST,STATUS) ; ISI calc truth value re assignment status vs user type
  1. ; Called by: Exam Open code to control locking of an exam,
  1. ; Exam List compile to control display of an exam
  1. ; Input:
  1. ; ASIGNEE--DUZ of assignee, required
  1. ; LIST--optional, = List # for List compile to filter appropriately for Lists
  1. ; STATUS--optional, exam Status code, used for List compile ...
  1. ; Returns:
  1. ; TRUE--ok for this user to lock an exam, or see exam list entry, acc to calling routine
  1. ; FALSE--otherwise; see logic below
  1. N ASIGMINE,RESULT,RADTECH
  1. S LIST=$G(LIST,0),STATUS=$G(STATUS,0)
  1. S RESULT=1 ; default = allow LIST display; allow locking
  1. I ASIGNEE D ; only matters if case is assigned
  1. . S ASIGMINE=ASIGNEE=DUZ
  1. . I ASIGMINE Q ; OK if it is my assignment, for any purpose
  1. . I 'LIST S RESULT=$S(+MAGJOB("USER",1):0,1:1) Q ; Lock request: prevent for rist, else OK
  1. . I $$ASSTATUS(STATUS) Q ; exam list checks below only matter for certain status values
  1. . S RADTECH=$D(^VA(200,"ARC","T",+DUZ))
  1. . I +MAGJOB("USER",1)!RADTECH D ;
  1. . . ; line below: user has key to view "master" lists of all assigned exams
  1. . . I $D(MAGJOB("KEYS","ISIJ ASSIGN EXAMS-VIEW ALL")),((LIST=9802)!(LIST=9803)) Q
  1. . . I RADTECH,'((LIST=9800)!(LIST=9801)) Q:'+MAGJOB("USER",1) ; tech--filter out the "My Assigned"; other lists allow
  1. . . S RESULT=0 ; block display or lock of another's assigned exam
  1. Q:$Q RESULT Q
  1. ;
  1. ASSTATUS(STS) ; return False if status is Waiting or Examined
  1. ; exams in these statuses are of interest regarding locks & list display
  1. N OK,X
  1. S OK=1
  1. I STS]"" D
  1. . S X=^RA(72,STS,0)
  1. . I $P(X,U,3)=1 S OK=0 Q ; Waiting
  1. . I $P(X,U,9)="R" S OK=0 Q ; Ready for Interp ; P106
  1. . I $P(X,U,9)="E" S OK=0 Q ; Examined
  1. Q:$Q OK Q
  1. ;
  1. ASENA(MAGRY) ; RPC: ISIJ ASSIGN ENABLE
  1. ; Deprecated functionality--reply will disable function in client
  1. ; RETURN: 0 ^ Menu
  1. ; Menu -- Hard code to nil
  1. ;
  1. N $ETRAP,$ESTACK S $ETRAP="D ERR^ISIJUTL1"
  1. N CT,MAGLST,REPLY
  1. S DIQUIET=1 D DT^DICRW
  1. S CT=0,MENU="",MAGLST="ISIASSIGNENA"
  1. K MAGRY S MAGRY=$NA(^TMP($J,MAGLST)) K @MAGRY ; assign MAGRY value
  1. S REPLY=CT_U_MENU
  1. S @MAGRY@(0)=REPLY
  1. Q
  1. ;
  1. QRYSTAT ; Inquire into ISIJ DYNAMIC QUERY STATS file entries
  1. N MAGIEN,IENCT,TEMP
  1. W !!?5,"NOTE: the output for this report works best on a 132 column display."
  1. QRYSLOOP S IENCT=0,TEMP="ISIJTEMP" K ^TMP($J,TEMP)
  1. W !!?15,"Display ISI Rad Query Statistics",!!
  1. S DIC=23450,DIC(0)="AMEQ"
  1. F D Q:Y=-1
  1. . D ^DIC I Y=-1 Q
  1. . S DA=+Y,IENCT=IENCT+1,^TMP($J,TEMP,IENCT,DA)=""
  1. W !
  1. I 'IENCT K DIC,DA,DR W ! Q
  1. S L(0)=2,BY(0)="^TMP($J,TEMP"
  1. S FLDS="[ISIJ QUERY STATS]"
  1. D EN1^DIP W !
  1. G QRYSLOOP
  1. Q
  1. ;
  1. END Q
  1. ;