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

MAG7UNM.m

Go to the documentation of this file.
  1. MAG7UNM ;WOIFO/MLH - imaging HL7 utilities - NEW PERSON name retrieval ; 02 Jul 2013 1:10 PM
  1. ;;3.0;IMAGING;**138**;Mar 19, 2002;Build 5380;Sep 03, 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. NPNAME(OUT,IEN) ; fetch/format elements for name from entry IEN in NEW PERSON File (#200)
  1. N NAMLKUPELTS ; lookup elements for name
  1. N NAME ; returned name from file 200 lookup
  1. N X ; scratch status variable return from extrinsic function call
  1. K OUT S OUT=0 ; refresh return array & status
  1. I $G(IEN)'?1.N S OUT="-1001`invalid format for NEW PERSON ien ("_IEN_")" Q OUT
  1. S NAMLKUPELTS("FILE")=200
  1. S NAMLKUPELTS("IENS")=IEN
  1. S NAMLKUPELTS("FIELD")=.01
  1. S OUT=$$HLNAME^XLFNAME(.NAMLKUPELTS)
  1. S X=$$FMNAME^XLFNAME(.OUT,"C"),OUT=0
  1. Q OUT