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

ISINUQRY.m

Go to the documentation of this file.
  1. ISINUQRY ; ISI/NST - $Q function ; 10/17/2022
  1. ;;1.1;ESL ISI IMAGING;**99,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. Q
  1. ;
  1. Q(V,D) ; Function to return $QUERY for variable V and direction D.
  1. ; Replacement for Reverse $Q Function
  1. ; 1/8/08 MLP
  1. ;This function can be called for $Query -- either forward or reverse.
  1. ;In place of $Q(V,D), use $$Q^ZDQ($NA(V),D)
  1. ;Note: the 2nd argument is optional.
  1. ;
  1. S D=+$G(D,1)
  1. Q:D=1 $Q(@V) ;Forward $Q
  1. IF D'=-1 Q ;Will cause error due to no argument.
  1. N S
  1. TOP IF $QL(V)=0 Q "" ;done if unsubscripted
  1. BKU S S=$O(@V,-1) ;backup to previous node on current level
  1. S V=$NA(@V,$QL(V)-1) ;remove last subscript
  1. IF S="" G DAT ;go chk for data if backed up all the way
  1. S V=$NA(@V@(S)) ;add the subscript found when backing up.
  1. IF $D(@V)>9 S V=$NA(@V@("")) G BKU ;if downpointer, descend and repeat
  1. DAT IF $D(@V)#2=1 Q V ;if a data node, return with current name
  1. G TOP
  1. ;