source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUADSIG.m@ 1742

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

initial load of WorldVistAEHR

File size: 717 bytes
Line 
1TIUADSIG ;SLC/JMH - Additional signature/surrogate methods ;10/13/04 [10/15/04 9:55am]
2 ;;1.0;TEXT INTEGRATION UTILITIES;**157**;Jun 20, 1997
3ASURG(TIUDA) ; checks if current user is a surrogate for an additional signer
4 ; if so then it returns the 8925.7 record IEN
5 N TIUASDA,TIUY
6 S TIUASDA="",TIUY=0
7 F S TIUASDA=$O(^TIU(8925.7,"B",TIUDA,TIUASDA)) Q:'TIUASDA!(TIUY) D
8 . N TIUAS
9 . S TIUAS=$P($G(^TIU(8925.7,TIUASDA,0)),U,3)
10 . Q:'$G(TIUAS)
11 . I +$P($G(^TIU(8925.7,+TIUASDA,0)),U,4) Q
12 . I $$ISSURFOR(DUZ,TIUAS) S TIUY=TIUASDA
13 Q TIUY
14ISSURFOR(USER1,USER2) ; check with kernel to see if USER1 is a surrogate for
15 ; USER2
16 N ACTSUR ;actual surrogate
17 S ACTSUR=$$CURRSURO^XQALSURO(USER2)
18 I ACTSUR=USER1 Q 1
19 Q 0
Note: See TracBrowser for help on using the repository browser.