C# Class gov.va.medora.mdws.AccountLib

Logins and visits.
Mostrar archivo Open project: OSEHRA/mdws Class Usage Examples

Public Methods

Method Description
AccountLib ( MySession mySession ) : System

Only constructor requires a MySession.

connectAndLogin ( string sourceId, string accountId, string accountPwd, string permissionString ) : UserTO

Connect to and log onto a data source.

Combines connecting, authentication and authorization into a single function. It will create a new set of session credentials and a primary permission. These credentials can then be used for subsequent visits. Calls login.

cprsLaunch ( string pwd, string sourceId, string userId, string patientId ) : PersonsTO

This method assumes there has been no login and therefore no credentials or user so it makes a new ConnectionSet, new credentials, etc.

login ( string accountId, string accountPwd, string permissionString ) : UserTO

Log onto a data source.

Combines authentication and authorization into a single function. It will create a new set of session credentials and a primary permission. These credentials can then be used for subsequent visits. Login requires a previous connection.

patientVisit ( string pwd, string homeSitecode, string mpiPid, bool multiSite ) : SiteArray

patientVisit This method is used by MHV and will probably be used by other PHR apps.

patientVisit ( string pwd, string sitecode, string mpiPid ) : SiteTO
setupMultiSourcePatientQuery ( string pwd, string context ) : SiteArray

After selecting a patient at one site, make subsequent queries multi-site.

This function will detect and visit all the other sites at which the patient has been seen. Subsequent queries, then, will return data from all these sources. This method requires a previous login or visit to have set the credentials in mySession, as well as a previous patient select to have set the patient in mySession.

visit ( string pwd, string sourceId, string permissionString ) : TaggedTextArray

Visit a single data source after a login.

This method is for visits after a login and the credentials are therefore already in mySession. It does not alter the credentials. It visits only 1 site but returns the multi-site visit return object. Calls visitSites.

visitAndAuthorize ( string pwd, string sourceId, string userSourceId, string userName, string userLocalId, string userFederatedId, string permissionString ) : UserTO

Visit a single data source and authorize without a previous login.

This method is for visits without logins. It makes its credentials and user the session credentials and session user.

visitDoD ( string pwd ) : TaggedTextArray
visitSites ( string pwd, string sourceList, string permissionString ) : TaggedTextArray

Visit multiple data sources after a login.

Requires a previous login so the credentials are already in mySession and are not altered. Can visit a single source or multiple sources. Sources may be VAMCs, VISNs, some combination of VAMCs and VISNs, or the entire VHA. See the sourceList parameter.

visitSites ( string pwd, string sourceList, string userSitecode, string userName, string DUZ, string permissionStr ) : TaggedTextArray

Visit multiple data sources without a login.

Requires no previous login. Used by daemon apps to visit multiple sources. Sources may be VAMCs, VISNs, some combination of VAMCs and VISNs, or the entire VHA. See the sourceList parameter.

visitSites ( string pwd, string sourceList, string userSitecode, string userName, string DUZ, string SSN, string permissionStr ) : TaggedTextArray

Visit multiple data sources without a login.

Requires no previous login. Used by daemon apps to visit multiple sources. Sources may be VAMCs, VISNs, some combination of VAMCs and VISNs, or the entire VHA. See the sourceList parameter.

Private Methods

Method Description
addMyCxn2CxnSet ( ) : void
doTheVisit ( string sitecode, AbstractCredentials credentials, AbstractPermission permission ) : gov.va.medora.mdo.User
getAdministrativeCredentials ( Site site ) : AbstractCredentials
getVisitorData ( string userSitecode, string DUZ, string appPwd ) : gov.va.medora.mdo.User
setupMultiSourceQuery ( string pwd, List sources, string context ) : TaggedTextArray
setupMultiSourceQuery ( string pwd, StringDictionary siteIds, string context ) : TaggedTextArray

Method Details

AccountLib() public method

Only constructor requires a MySession.
public AccountLib ( MySession mySession ) : System
mySession MySession Holds credentials, primary permission, default visit method
return System

connectAndLogin() public method

Connect to and log onto a data source.
Combines connecting, authentication and authorization into a single function. It will create a new set of session credentials and a primary permission. These credentials can then be used for subsequent visits. Calls login.
public connectAndLogin ( string sourceId, string accountId, string accountPwd, string permissionString ) : UserTO
sourceId string Station number
accountId string Access code
accountPwd string Verify code
permissionString string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.UserTO

cprsLaunch() public method

This method assumes there has been no login and therefore no credentials or user so it makes a new ConnectionSet, new credentials, etc.
public cprsLaunch ( string pwd, string sourceId, string userId, string patientId ) : PersonsTO
pwd string Client app's BSE security phrase
sourceId string Station number
userId string DUZ
patientId string DFN
return gov.va.medora.mdws.dto.PersonsTO

login() public method

Log onto a data source.
Combines authentication and authorization into a single function. It will create a new set of session credentials and a primary permission. These credentials can then be used for subsequent visits. Login requires a previous connection.
public login ( string accountId, string accountPwd, string permissionString ) : UserTO
accountId string Access code
accountPwd string Verify code
permissionString string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.UserTO

patientVisit() public method

patientVisit This method is used by MHV and will probably be used by other PHR apps.
public patientVisit ( string pwd, string homeSitecode, string mpiPid, bool multiSite ) : SiteArray
pwd string Client app's BSE security phrase
homeSitecode string Station number
mpiPid string ICN
multiSite bool Set to false for now
return gov.va.medora.mdws.dto.SiteArray

patientVisit() public method

public patientVisit ( string pwd, string sitecode, string mpiPid ) : SiteTO
pwd string
sitecode string
mpiPid string
return gov.va.medora.mdws.dto.SiteTO

setupMultiSourcePatientQuery() public method

After selecting a patient at one site, make subsequent queries multi-site.
This function will detect and visit all the other sites at which the patient has been seen. Subsequent queries, then, will return data from all these sources. This method requires a previous login or visit to have set the credentials in mySession, as well as a previous patient select to have set the patient in mySession.
public setupMultiSourcePatientQuery ( string pwd, string context ) : SiteArray
pwd string Client app's BSE security phrase
context string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.SiteArray

visit() public method

Visit a single data source after a login.
This method is for visits after a login and the credentials are therefore already in mySession. It does not alter the credentials. It visits only 1 site but returns the multi-site visit return object. Calls visitSites.
public visit ( string pwd, string sourceId, string permissionString ) : TaggedTextArray
pwd string Client app's BSE security phrase
sourceId string Station number of site to visit
permissionString string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.TaggedTextArray

visitAndAuthorize() public method

Visit a single data source and authorize without a previous login.
This method is for visits without logins. It makes its credentials and user the session credentials and session user.
public visitAndAuthorize ( string pwd, string sourceId, string userSourceId, string userName, string userLocalId, string userFederatedId, string permissionString ) : UserTO
pwd string Client app's BSE security phrase
sourceId string Station number of site to visit
userSourceId string User's station number
userName string User's name as it appears in VistA
userLocalId string User's DUZ
userFederatedId string User's SSN
permissionString string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.UserTO

visitDoD() public method

public visitDoD ( string pwd ) : TaggedTextArray
pwd string
return gov.va.medora.mdws.dto.TaggedTextArray

visitSites() public method

Visit multiple data sources after a login.
Requires a previous login so the credentials are already in mySession and are not altered. Can visit a single source or multiple sources. Sources may be VAMCs, VISNs, some combination of VAMCs and VISNs, or the entire VHA. See the sourceList parameter.
public visitSites ( string pwd, string sourceList, string permissionString ) : TaggedTextArray
pwd string Client app's BSE security phrase
sourceList string /// A comma-delimited list of station numbers and/or VISN IDs, as in /// "402,550" or "V12,V22" or "V1,V2,456". To visit all VistA systems set the param /// to "*". Duplicate station #'s are ignored. ///
permissionString string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.TaggedTextArray

visitSites() public method

Visit multiple data sources without a login.
Requires no previous login. Used by daemon apps to visit multiple sources. Sources may be VAMCs, VISNs, some combination of VAMCs and VISNs, or the entire VHA. See the sourceList parameter.
public visitSites ( string pwd, string sourceList, string userSitecode, string userName, string DUZ, string permissionStr ) : TaggedTextArray
pwd string Client app's BSE security phrase
sourceList string /// A comma-delimited list of station numbers and/or VISN IDs, as in /// "402,550" or "V12,V22" or "V1,V2,456". To visit all VistA systems set the param /// to "*". Duplicate station #'s are ignored. ///
userSitecode string
userName string
DUZ string
permissionStr string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.TaggedTextArray

visitSites() public method

Visit multiple data sources without a login.
Requires no previous login. Used by daemon apps to visit multiple sources. Sources may be VAMCs, VISNs, some combination of VAMCs and VISNs, or the entire VHA. See the sourceList parameter.
public visitSites ( string pwd, string sourceList, string userSitecode, string userName, string DUZ, string SSN, string permissionStr ) : TaggedTextArray
pwd string Client app's BSE security phrase
sourceList string /// A comma-delimited list of station numbers and/or VISN IDs, as in /// "402,550" or "V12,V22" or "V1,V2,456". To visit all VistA systems set the param /// to "*". Duplicate station #'s are ignored. ///
userSitecode string
userName string
DUZ string
SSN string
permissionStr string If blank defaults to CPRS context
return gov.va.medora.mdws.dto.TaggedTextArray