Changeset 623 for WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQCHK2.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQCHK2.m
r613 r623 1 XQCHK2 ; OAK-BP/BDT - Internal APIs to check Keys for options; 5/20/08 2 ;;8.0;KERNEL;**427,503**;Jul 10, 1995;Build 2 3 ;;"Per VHA Directive 2004-038, this routine should not be modified". 4 Q 5 ;; These Internal Kernel APIs are using in the routine XQCHK 6 ;; to check Keys for options 7 ;; 8 CHCKL(XQCY0,XQDUZ) ;Entry point for checking all Locks for an option 9 ;; XQCY0 is $P(^XUTL("XQO",XQDIC,"^",%XQOP),"^",2,99) 10 ;; XQDUZ is IEN of user 11 ;; Return XQRT: Zero or 1^Key found that user needed for the option 12 S XQCY0=$G(XQCY0) 13 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 14 ;check Key for the option; p457 15 S XQY=$P(XQCY0,"^"),XQX=$$GETIEN(XQY) 16 I +XQX S XQK=$$GET1^DIQ(19,XQX,3) 17 I $G(XQK)'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK Q XQRT 18 ;loop through higher menu options. 19 S XQY=$P(XQCY0,"^",5) 20 F XQI=1:1 S XQX=$P(XQY,",",XQI) Q:'XQX D 21 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3) I XQK'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK Q 22 Q XQRT 23 ; 24 CHCKRL(XQCY0,XQDUZ) ;Entry point for checking all Reversed Locks for an option 25 ;; XQCY0 is $P(^XUTL("XQO",XQDIC,"^",%XQOP),"^",2,99) 26 ;; XQDUZ is IEN of user 27 ;; Return XQRT: Zero or 1^Reversed Key found that user has 28 S XQCY0=$G(XQCY0) 29 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 30 ;check Reversed Key for the option; p457 31 S XQY=$P(XQCY0,"^"),XQX=$$GETIEN(XQY) 32 I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) 33 I $G(XQK)'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK Q XQRT 34 ;loop through higher menu options. 35 S XQY=$P(XQCY0,"^",5) 36 F XQI=1:1 S XQX=$P(XQY,",",XQI) Q:'XQX D 37 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) I XQK'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK Q 38 Q XQRT 39 ; 40 GETIEN(XQNAME) ;get IEN for an option; 457 41 ;; XQNAME is name of an option 42 ;; Retrun XQIEN: Null or IEN if existed 43 N XQIEN S XQIEN="" 44 I $G(XQNAME)="" Q XQIEN 45 I '$D(^DIC(19,"B",XQNAME)) Q XQIEN 46 S XQIEN=$O(^DIC(19,"B",XQNAME,XQIEN)) 47 Q XQIEN 48 ; 49 CHKTOPL(XQIEN,XQDUZ) ;Check Lock for the top level of the secondary options 50 ;this need to be called to check the top level first when check the 51 ;Locks for lower menu option because the 6th piece of ^XUTL does not 52 ;contain the IEN of the top menu option. 53 N XQRT,XQK S XQRT=0 54 I XQIEN'=+$G(XQIEN) Q XQRT 55 S XQK=$$GET1^DIQ(19,XQIEN,3) 56 I $G(XQK)'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK 57 Q XQRT 58 ; 59 CHKTOPRL(XQIEN,XQDUZ) ;Check Reversed Lock the top level of the secondary options 60 ;this need to be called to check the top level first when check the 61 ;Reversed Locks for lower menu option because the 6th piece of ^XUTL does not 62 ;contain the IEN of the top menu option. 63 N XQRT,XQK S XQRT=0 64 I XQIEN'=+$G(XQIEN) Q XQRT 65 S XQK=$$GET1^DIQ(19,XQIEN,3.01) 66 I $G(XQK)'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK 67 Q XQRT 1 XQCHK2 ; BP/BDT - GET CALL FROM XQCHK ; [7/19/06 10:45am] 2 ;;8.0;KERNEL;**427**;Jul 10, 1995;Build 3 3 ; Entry point for checking all Locks for a option 4 CHCKL(XQCY0,DUZ) ; 5 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 6 S XQY=$P(XQCY0,"^",5) 7 F XQI=1:1 S XQX=$P(XQY,",",XQI) Q:'XQX D 8 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3) I XQK'="",'$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q 9 Q XQRT 10 ; Entry point for checking all Reversed Locks for a option 11 CHCKRL(XQCY0,DUZ) ; 12 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 13 S XQY=$P(XQCY0,"^",5) 14 F XQI=1:1 S XQX=$P(XQY,",",XQI) Q:'XQX D 15 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) I XQK'="",$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q 16 Q XQRT
Note:
See TracChangeset
for help on using the changeset viewer.