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

RAO7VLD.m

Go to the documentation of this file.
  1. RAO7VLD ;HISC/GJC-Validate OE/RR data to Rad (frontdoor) ;1/6/98 13:02
  1. ;;5.0;Radiology/Nuclear Medicine;**75**;Mar 16, 1998;Build 4
  1. ;
  1. EN1(RAA,RAB,RAC,RAX,RAY,RAZ) ; Pass in parameters to validate data
  1. ; Returns '0' if data is valid, '1' if data is invalid
  1. ; This call is not used on pointer type data fields.
  1. ; ***** variable list *****
  1. ; RAA=file # RAB=field #
  1. ; RAC=flag parameters RAX=value being checked
  1. ; RAY=result of call array RAZ=Error Array (not used)
  1. ;***********************************************************************
  1. K %DT(0) D CHK^DIE(RAA,RAB,RAC,RAX,.RAY)
  1. Q $S(RAY["^":1,1:0)
  1. ;
  1. EN2(T1,T2,T3) ;
  1. ; Pass in parameters to validate pointer type data.
  1. ; This call is only used on pointer type data fields.
  1. ; ***** variable list *****
  1. ; T1=file # T2=IEN (if app) T3=.01 fields value
  1. ; X=0 if proper match, 1 if no match Y=global node (assumed to be '0')
  1. ;***********************************************************************
  1. N X,Y,Z S X=0
  1. F Z=$G(T1),$G(T2),$G(T3) S:Z']"" X=1 Q:X
  1. Q:X X ; all parameters must be defined
  1. S Y=$G(@(^DIC(T1,0,"GL")_T2_",0)"))
  1. Q $S($P(Y,"^")=T3:0,1:1)
  1. EN3(X,Y) ; does entry exist in a file
  1. ; X-> file # 'Y'-> ien
  1. ; 0 if entry exists, 1 if entry does not exist
  1. Q $S($D(@(^DIC(+X,0,"GL")_+Y_",0)"))#2:0,1:1)
  1. ;
  1. EN4(X) ;P75 Check CPRS entered CLINICAL HISTORY text for validity.
  1. ;This function returns: 1 if the string is valid else 0.
  1. ;Please note that once the data is valid, (a minimum of two
  1. ;alphanumeric characters on a character string) subsequent data
  1. ;strings may not be valid but are still stored.
  1. N CHAR,CNT,FLG,I,LEN S (CNT,FLG)=0,LEN=$L(X)
  1. F I=1:1:LEN D Q:FLG
  1. .S CHAR=$E(X,I)
  1. .S:CHAR?1AN CNT=CNT+1
  1. .I CHAR'?1AN,(CNT) S CNT=0
  1. .S:CNT=2 FLG=1
  1. .Q
  1. Q FLG
  1. ;
  1. EN5(RAD0,RANSTAT,RADUZ,RAREA) ; update the 'REQUEST STATUS TIMES' multiple
  1. ; in the Rad/Nuc Med Orders file. All parameters must be in the
  1. ; internal format.
  1. ; RAD0=top level ien RANSTAT=new status
  1. ; RADUZ=user ien RAREA=reason for status change
  1. ; Pass back '1' if error, '0' if no error.
  1. N ARR
  1. S ARR(7,75.12,"+1,"_RAD0_",",".01")=RALDT
  1. S ARR(7,75.12,"+1,"_RAD0_",",2)=RANSTAT
  1. S ARR(7,75.12,"+1,"_RAD0_",",3)=RADUZ
  1. S ARR(7,75.12,"+1,"_RAD0_",",4)=RAREA
  1. D UPDATE^DIE("","ARR(7)")
  1. Q +$G(DIERR)
  1. EN6(X) ; Check if parent procedure has descendents
  1. ; Passes back: 0 if descendents else 1
  1. ; X is the ien of the procedure (71)
  1. Q $S(+$O(^RAMIS(71,X,4,0)):0,1:1)