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

RAORR2.m

Go to the documentation of this file.
  1. RAORR2 ;HISC/CAH,FPT,GJC AISC/DMK-Verify a request from OERR ;9/12/94 11:11
  1. ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
  1. K RAERR
  1. I $S('$D(ORPK):1,'ORPK:1,'$D(ORVP):1,'$L(ORVP):1,'$D(^RAO(75.1,ORPK,0)):1,1:0) S RAERR=1 G FAIL
  1. S RAIPROC=$P(^RAO(75.1,ORPK,0),"^",2) I 'RAIPROC S RAERR=1 G FAIL
  1. I '$D(^RAO(75.1,"AP",+ORVP,RAIPROC)) S RAERR=1 G FAIL
  1. S RATIME=$O(^RAO(75.1,"AP",+ORVP,RAIPROC,0))
  1. I $P(RATIME,".")>(9999999-DT) S RAERR=2 G FAIL
  1. ;
  1. S RAS3=+ORVP,X=RAIPROC,RAQUIT=1
  1. D ORDPRC1^RAUTL2,STATUS:'$D(RAQUIT)
  1. K RAERR,RAIPROC,RAO(0),RARDT,RAROIFN,RATIME,RAQUIT,RAQUIT,X,RAMDV
  1. Q
  1. ;
  1. STATUS S RAERR=3 D FAIL H 1 Q
  1. Q
  1. ;
  1. FAIL W !!,$P($T(ERR+RAERR),";;",2),! I RAERR=1 S OREND=1
  1. Q
  1. ERR ;Error messages if the order fails the verify process(ORGY=10)
  1. ;;Invalid or missing information needed to verify the order.
  1. ;;Request Date for this order is in the past. May want to cancel the order.
  1. ;;You may want to cancel this order.
  1. Q