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

MAGUFFLA.m

Go to the documentation of this file.
  1. MAGUFFLA ;WOIFO/MLH - Imaging FileMan utility - return list of attributes for a field; 24 Sep 2011 01:49 PM
  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. FIELDATT(OUT,FILENO,FIELDNO) ; rpc MAG FILEMAN FIELD ATTS
  1. ; input: FILENO The number of a Fileman file or subfile
  1. ; FIELDNO The number of a field within the file
  1. ;
  1. ; output: OUT() Array of return values formatted as follows:
  1. ; If no input or processing error:
  1. ; OUT(1) = 0``n where n = number of entries on the OUT() array
  1. ; OUT(m) where 1 < m <= n
  1. ; = attribute`value
  1. ; If an input or processing error:
  1. ; OUT(1) = n`error_message
  1. ;
  1. ; All ^DD references permitted under ICR #5551
  1. ;
  1. K OUT
  1. I FILENO=+FILENO,$D(^DD(FILENO)) ; valid input
  1. E S OUT(1)="-1`'"_FILENO_"' not a valid Fileman file or subfile number" Q
  1. I FIELDNO=+FIELDNO,$D(^DD(FILENO,FIELDNO)) ; valid input
  1. E S OUT(1)="-2`'"_FIELDNO_"' not a valid field number" Q
  1. N ATTSTR,ATTARY,ATT,WPIX,OUTIX
  1. S ATTSTR="AUDIT;AUDIT CONDITION;COMPUTE ALGORITHM;COMPUTED FIELDS USED;"
  1. S ATTSTR=ATTSTR_"DATE FIELD LAST EDITED;DECIMAL DEFAULT;DELETE ACCESS;"
  1. S ATTSTR=ATTSTR_"DESCRIPTION;FIELD LENGTH;GLOBAL SUBSCRIPT LOCATION;"
  1. S ATTSTR=ATTSTR_"HELP-PROMPT;INPUT TRANSFORM;LABEL,MULTIPLE-VALUED;"
  1. S ATTSTR=ATTSTR_"OUTPUT TRANSFORM;POINTER;READ ACCESS;SOURCE;SPECIFIER;"
  1. S ATTSTR=ATTSTR_"TECHNICAL DESCRIPTION;TITLE;TYPE;WRITE ACCESS;"
  1. S ATTSTR=ATTSTR_"XECUTABLE HELP"
  1. D FIELD^DID(FILENO,FIELDNO,"N",ATTSTR,"ATTARY")
  1. S ATT="",OUTIX=1
  1. F S ATT=$O(ATTARY(ATT)) Q:ATT="" D
  1. . I $D(ATTARY(ATT))=1 D Q
  1. . . S OUTIX=OUTIX+1,OUT(OUTIX)=ATT_"`"_ATTARY(ATT)
  1. . . Q
  1. . S WPIX=""
  1. . F S WPIX=$O(ATTARY(ATT,WPIX)) Q:WPIX="" D
  1. . . S OUTIX=OUTIX+1,OUT(OUTIX)=ATT_"`"_ATTARY(ATT,WPIX)
  1. . . Q
  1. . Q
  1. S OUT(1)="0``"_OUTIX ; count
  1. Q