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

PRCIREC1.m

Go to the documentation of this file.
  1. PRCIREC1 ;WISC/SWS-Filed transform code ;9/7/06 14:22
  1. V ;;5.1;IFCAP;**107**;Oct 20, 2000;Build 13
  1. ;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;This routine serves as the input transform for the field Inventory Point in File ^PRCP(445)
  1. Q
  1. START S:X'["-" X=$G(PRC("SITE"))_"-"_X
  1. I 'X!($L(X)>30)!(X'?3N1"-"1ANP.ANP)!('$G(PRCPPRIV)) K X Q
  1. I +X'=PRC("SITE") D
  1. . K MSG
  1. .S MSG(1)=" "_+X_" not current station number."
  1. .D EN^DDIOL(.MSG)
  1. .K MSG,X
  1. I $D(X),$O(^PRCP(445,"B",X,0)) D
  1. . S MSG(1)=" DUPLICATE NAME"
  1. . D EN^DDIOL(.MSG)
  1. . K MSG,X
  1. Q
  1. DELETE I $P($G(^PRCP(445,D0,0)),U,3)="W" D
  1. . K MSG
  1. . S MSG(1)="YOU CANNOT DELETE WAREHOUSE TYPE INVENTORY POINTS.",MSG(1,"F")="!?2"
  1. . D EN^DDIOL(.MSG)
  1. . K MSG
  1. Q