source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAO7VLD.m@ 1763

Last change on this file since 1763 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1RAO7VLD ;HISC/GJC-Validate OE/RR data to Rad (frontdoor) ;1/6/98 13:02
2 ;;5.0;Radiology/Nuclear Medicine;**75**;Mar 16, 1998;Build 4
3 ;
4EN1(RAA,RAB,RAC,RAX,RAY,RAZ) ; Pass in parameters to validate data
5 ; Returns '0' if data is valid, '1' if data is invalid
6 ; This call is not used on pointer type data fields.
7 ; ***** variable list *****
8 ; RAA=file # RAB=field #
9 ; RAC=flag parameters RAX=value being checked
10 ; RAY=result of call array RAZ=Error Array (not used)
11 ;***********************************************************************
12 K %DT(0) D CHK^DIE(RAA,RAB,RAC,RAX,.RAY)
13 Q $S(RAY["^":1,1:0)
14 ;
15EN2(T1,T2,T3) ;
16 ; Pass in parameters to validate pointer type data.
17 ; This call is only used on pointer type data fields.
18 ; ***** variable list *****
19 ; T1=file # T2=IEN (if app) T3=.01 fields value
20 ; X=0 if proper match, 1 if no match Y=global node (assumed to be '0')
21 ;***********************************************************************
22 N X,Y,Z S X=0
23 F Z=$G(T1),$G(T2),$G(T3) S:Z']"" X=1 Q:X
24 Q:X X ; all parameters must be defined
25 S Y=$G(@(^DIC(T1,0,"GL")_T2_",0)"))
26 Q $S($P(Y,"^")=T3:0,1:1)
27EN3(X,Y) ; does entry exist in a file
28 ; X-> file # 'Y'-> ien
29 ; 0 if entry exists, 1 if entry does not exist
30 Q $S($D(@(^DIC(+X,0,"GL")_+Y_",0)"))#2:0,1:1)
31 ;
32EN4(X) ;P75 Check CPRS entered CLINICAL HISTORY text for validity.
33 ;This function returns: 1 if the string is valid else 0.
34 ;Please note that once the data is valid, (a minimum of two
35 ;alphanumeric characters on a character string) subsequent data
36 ;strings may not be valid but are still stored.
37 N CHAR,CNT,FLG,I,LEN S (CNT,FLG)=0,LEN=$L(X)
38 F I=1:1:LEN D Q:FLG
39 .S CHAR=$E(X,I)
40 .S:CHAR?1AN CNT=CNT+1
41 .I CHAR'?1AN,(CNT) S CNT=0
42 .S:CNT=2 FLG=1
43 .Q
44 Q FLG
45 ;
46EN5(RAD0,RANSTAT,RADUZ,RAREA) ; update the 'REQUEST STATUS TIMES' multiple
47 ; in the Rad/Nuc Med Orders file. All parameters must be in the
48 ; internal format.
49 ; RAD0=top level ien RANSTAT=new status
50 ; RADUZ=user ien RAREA=reason for status change
51 ; Pass back '1' if error, '0' if no error.
52 N ARR
53 S ARR(7,75.12,"+1,"_RAD0_",",".01")=RALDT
54 S ARR(7,75.12,"+1,"_RAD0_",",2)=RANSTAT
55 S ARR(7,75.12,"+1,"_RAD0_",",3)=RADUZ
56 S ARR(7,75.12,"+1,"_RAD0_",",4)=RAREA
57 D UPDATE^DIE("","ARR(7)")
58 Q +$G(DIERR)
59EN6(X) ; Check if parent procedure has descendents
60 ; Passes back: 0 if descendents else 1
61 ; X is the ien of the procedure (71)
62 Q $S(+$O(^RAMIS(71,X,4,0)):0,1:1)
Note: See TracBrowser for help on using the repository browser.