Changeset 636 for FOIAVistA/tag/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, 8:26:01 PM (14 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/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
r628 r636 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) 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) ; 13 5 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 14 ;check Key for the option; p45715 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 XQRT18 ;loop through higher menu options.19 6 S XQY=$P(XQCY0,"^",5) 20 7 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 Q8 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3) I XQK'="",'$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q 22 9 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) 10 ; Entry point for checking all Reversed Locks for a option 11 CHCKRL(XQCY0,DUZ) ; 29 12 N XQI,XQY,XQX,XQRT,XQK S (XQRT,XQX)=0 30 ;check Reversed Key for the option; p45731 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 XQRT34 ;loop through higher menu options.35 13 S XQY=$P(XQCY0,"^",5) 36 14 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 Q15 . I +XQX S XQK=$$GET1^DIQ(19,XQX,3.01) I XQK'="",$D(^XUSEC(XQK,DUZ)) S XQRT=1_"^"_XQK Q 38 16 Q XQRT 39 ;40 GETIEN(XQNAME) ;get IEN for an option; 45741 ;; XQNAME is name of an option42 ;; Retrun XQIEN: Null or IEN if existed43 N XQIEN S XQIEN=""44 I $G(XQNAME)="" Q XQIEN45 I '$D(^DIC(19,"B",XQNAME)) Q XQIEN46 S XQIEN=$O(^DIC(19,"B",XQNAME,XQIEN))47 Q XQIEN48 ;49 CHKTOPL(XQIEN,XQDUZ) ;Check Lock for the top level of the secondary options50 ;this need to be called to check the top level first when check the51 ;Locks for lower menu option because the 6th piece of ^XUTL does not52 ;contain the IEN of the top menu option.53 N XQRT,XQK S XQRT=054 I XQIEN'=+$G(XQIEN) Q XQRT55 S XQK=$$GET1^DIQ(19,XQIEN,3)56 I $G(XQK)'="",'$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK57 Q XQRT58 ;59 CHKTOPRL(XQIEN,XQDUZ) ;Check Reversed Lock the top level of the secondary options60 ;this need to be called to check the top level first when check the61 ;Reversed Locks for lower menu option because the 6th piece of ^XUTL does not62 ;contain the IEN of the top menu option.63 N XQRT,XQK S XQRT=064 I XQIEN'=+$G(XQIEN) Q XQRT65 S XQK=$$GET1^DIQ(19,XQIEN,3.01)66 I $G(XQK)'="",$D(^XUSEC(XQK,XQDUZ)) S XQRT=1_"^"_XQK67 Q XQRT
Note:
See TracChangeset
for help on using the changeset viewer.