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

BQIULSC.m

Go to the documentation of this file.
  1. BQIULSC ;PRXM/HC/BWF - Security Utilities ; 20 Dec 2005 3:54 PM
  1. ;;2.3;ICARE MANAGEMENT SYSTEM;;Apr 18, 2012;Build 59
  1. ;
  1. Q
  1. ;
  1. ; NOTE: This function is not currently used, but may be activated at a later date.
  1. ;
  1. ; This function will return information on whether or not a user has a given key.
  1. ; The user and the key to be tested are parameters that are passed into the function.
  1. ;
  1. ; INPUT:
  1. ; KEY - The is the key that we are validating under the user's DUZ.
  1. ; - This may be passed by IEN or key name.
  1. ; USER - The DUZ of the user selecting the Health summaries.
  1. ;
  1. ;
  1. ; OUTPUT:
  1. ; 1 - User has security key
  1. ; 0 - User does not have security key
  1. ; -1 - Unable to process request (an error has occurred) such as,
  1. ; the key does not exist, calling routine should not be checking
  1. ; for a key that does not exist.
  1. ;
  1. KEYCHK(KEY,USER) ;EP
  1. ; If security key is not numeric, it is assumed that the key was passed by name.
  1. N KEYIEN,VAL
  1. I KEY'?1N.N D Q VAL
  1. .I '$D(^DIC(19.1,"B",KEY)) S VAL=-1 Q
  1. .S KEYIEN=$O(^DIC(19.1,"B",KEY,0))
  1. .I '$D(^VA(200,USER,51,KEYIEN)) S VAL=0 Q
  1. .S VAL=1
  1. I '$D(^VA(200,USER,51,KEY)) S VAL=0 Q VAL
  1. S VAL=1
  1. Q VAL
  1. ;
  1. VLDPSW(DATA,PSW) ;EP -- BQI CHECK VERIFY CODE
  1. NEW UID,II,RESULT
  1. S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
  1. S DATA=$NA(^TMP("BQIULSC",UID))
  1. K @DATA
  1. NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIULSC D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
  1. S II=0,@DATA@(II)="I00010RESULT^T00080MESSAGE"_$C(30)
  1. S PSW=$$DECRYP^XUSRB1(PSW)
  1. S:'$$GET^XPAR("SYS","XU VC CASE SENSITIVE") PSW=$$UP^XLFSTR(PSW)
  1. S RESULT=$$EN^XUSHSH(PSW)=$P($G(^VA(200,+DUZ,.1)),U,2)
  1. ;
  1. I RESULT=1 S II=II+1,@DATA@(II)="1^"_$C(30)
  1. E S II=II+1,@DATA@(II)="-1^Incorrect VERIFY CODE"_$C(30)
  1. Q
  1. ;
  1. ERR ;
  1. D ^%ZTER
  1. NEW Y,ERRDTM
  1. S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
  1. S BMXSEC="Recording that an error occurred at "_ERRDTM
  1. I $D(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
  1. Q