Skip to main content

HS.Registry.Person.User

persistent class HS.Registry.Person.User extends %Library.Persistent, HS.Push.Registry.Recipient, HS.Registry.Person.Base

SQL Table Name: HS_Registry_Person.UserClinician

Include (HS.Common, %ZHSLIB)

Property Inventory

Method Inventory

Parameters

parameter DSINTERVAL = 5;
Inherited description: DSINTERVAL is the number of seconds between one DSTIME value and the next. The DSTIME value for DSINTERVAL > 0 is computed from $ZTIMESTAMP and is the number of seconds from day 0, time 0 to the nearest interval, rounded down. Using an interval has the effect of grouping all DSTIME entries for the class in some number of seconds.
parameter DSTIME = AUTO;
Inherited description: If the DSTIME parameter is set to AUTO then the most recent filing operation in the current DSTIME value for each object will be recorded in a global, ^OBJ.DSTIME:
^OBJ.DSTIME(ExtentName,DSTIME,objectID) = filing operation
For DSTIME=AUTO the DSTIME value is recorded in ^OBJ.DSTIME and is set by the consumer of DSTIME data.
Refer to %DeepSee documentation for more information on how DSTIME is used by %DeepSee.
The filing operations are:
CodeOperation
0Update
1Insert
2Delete

If the DSTIME parameter is set to MANUAL then the user is responsible for journaling object filing operations. If DSTIME is set to "CONDITIONAL", the user is expected to define the parameter DSCONDITION setting it to an expression which will determine if the actions performed when DSTIME is set to AUTO will execute or not
parameter EMAILCOPYGLOBAL = ^CacheTemp.CopyEmailAddrToID;
This global is used for storing process id for the background process of copying email addr into email id

Properties

property Active as %Boolean [ InitialExpression = 1 ];
Set to True to prevent recipient from being selected
Property methods: ActiveDisplayToLogical(), ActiveGet(), ActiveGetStored(), ActiveIsValid(), ActiveLogicalToDisplay(), ActiveLogicalToXSD(), ActiveNormalize(), ActiveSet(), ActiveXSDToLogical()
property CacheUser as %Boolean [ InitialExpression = 0 ];
If this is a Cache User, then the UserID is their Cache User ID, and their authentication cannot be delegated
Property methods: CacheUserDisplayToLogical(), CacheUserGet(), CacheUserGetStored(), CacheUserIsValid(), CacheUserLogicalToDisplay(), CacheUserLogicalToXSD(), CacheUserNormalize(), CacheUserSet(), CacheUserXSDToLogical()
property Description as %String);
Inherited description: Description of clinician
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
relationship Emails as array of HS.Registry.Person.UserEmail [ InitialExpression = $listbuild("HS.Registry.Person.UserEmail","UserClinician",+$this,"children",1,1) , Transient , Inverse = UserClinician , Cardinality = children ];
Property methods: EmailsGet(), EmailsGetObject(), EmailsGetObjectId(), EmailsGetSwizzled(), EmailsIsEmpty(), EmailsIsValid(), EmailsNewObject(), EmailsRClose(), EmailsRExec(), EmailsRFetch(), EmailsRelate(), EmailsSQLCompute(), EmailsSet(), EmailsUnRelate()
relationship Facilities as array of HS.Registry.Person.UserFacility [ InitialExpression = $listbuild("HS.Registry.Person.UserFacility","UserClinician",+$this,"children",1,1) , Transient , Inverse = UserClinician , Cardinality = children ];
Property methods: FacilitiesGet(), FacilitiesGetObject(), FacilitiesGetObjectId(), FacilitiesGetSwizzled(), FacilitiesIsEmpty(), FacilitiesIsValid(), FacilitiesNewObject(), FacilitiesRClose(), FacilitiesRExec(), FacilitiesRFetch(), FacilitiesRelate(), FacilitiesSQLCompute(), FacilitiesSet(), FacilitiesUnRelate()
relationship Folders as array of HS.Push.MessageCenter.Folder [ InitialExpression = $listbuild("HS.Push.MessageCenter.Folder","OwnerUser",+$this,"many",1,1) , Transient , Inverse = OwnerUser , Cardinality = many ];
Property methods: FoldersGet(), FoldersGetObject(), FoldersGetObjectId(), FoldersGetSwizzled(), FoldersIsEmpty(), FoldersIsValid(), FoldersNewObject(), FoldersRClose(), FoldersRExec(), FoldersRFetch(), FoldersRelate(), FoldersSQLCompute(), FoldersSet(), FoldersUnRelate()
relationship Idents as array of HS.Registry.Person.UserIdentifier [ InitialExpression = $listbuild("HS.Registry.Person.UserIdentifier","UserClinician",+$this,"children",1,1) , Transient , Inverse = UserClinician , Cardinality = children ];
Property methods: IdentsGet(), IdentsGetObject(), IdentsGetObjectId(), IdentsGetSwizzled(), IdentsIsEmpty(), IdentsIsValid(), IdentsNewObject(), IdentsRClose(), IdentsRExec(), IdentsRFetch(), IdentsRelate(), IdentsSQLCompute(), IdentsSet(), IdentsUnRelate()
property IgnoreProviderUpdates as %Boolean [ InitialExpression = 0 ];
When true and syncing with provider directory , will ignore demographic, telecom and identifier updates sent from HSPD
Property methods: IgnoreProviderUpdatesDisplayToLogical(), IgnoreProviderUpdatesGet(), IgnoreProviderUpdatesGetStored(), IgnoreProviderUpdatesIsValid(), IgnoreProviderUpdatesLogicalToDisplay(), IgnoreProviderUpdatesLogicalToXSD(), IgnoreProviderUpdatesNormalize(), IgnoreProviderUpdatesSet(), IgnoreProviderUpdatesXSDToLogical()
property LastLoginDate as %Date;
Used to check for inactivity
Property methods: LastLoginDateDisplayToLogical(), LastLoginDateGet(), LastLoginDateGetStored(), LastLoginDateIsValid(), LastLoginDateLogicalToDisplay(), LastLoginDateLogicalToOdbc(), LastLoginDateLogicalToXSD(), LastLoginDateNormalize(), LastLoginDateOdbcToLogical(), LastLoginDateSet(), LastLoginDateXSDToLogical()
property Location as %String (MAXLEN = 256);
Free text, site specific meaning
Property methods: LocationDisplayToLogical(), LocationGet(), LocationGetStored(), LocationIsValid(), LocationLogicalToDisplay(), LocationLogicalToOdbc(), LocationNormalize(), LocationSet()
relationship LoginIDs as array of HS.Registry.Person.UserLoginID [ InitialExpression = $listbuild("HS.Registry.Person.UserLoginID","UserClinician",+$this,"children",1,1) , Transient , Inverse = UserClinician , Cardinality = children ];
Property methods: LoginIDsGet(), LoginIDsGetObject(), LoginIDsGetObjectId(), LoginIDsGetSwizzled(), LoginIDsIsEmpty(), LoginIDsIsValid(), LoginIDsNewObject(), LoginIDsRClose(), LoginIDsRExec(), LoginIDsRFetch(), LoginIDsRelate(), LoginIDsSQLCompute(), LoginIDsSet(), LoginIDsUnRelate()
property MessageRepository as %String (MAXLEN = 256);
Property methods: MessageRepositoryDisplayToLogical(), MessageRepositoryGet(), MessageRepositoryGetStored(), MessageRepositoryIsValid(), MessageRepositoryLogicalToDisplay(), MessageRepositoryLogicalToOdbc(), MessageRepositoryNormalize(), MessageRepositorySet()
property Organization as %Boolean [ InitialExpression = 0 ];
Support organization to differenciate from user type
Property methods: OrganizationDisplayToLogical(), OrganizationGet(), OrganizationGetStored(), OrganizationIsValid(), OrganizationLogicalToDisplay(), OrganizationLogicalToXSD(), OrganizationNormalize(), OrganizationSet(), OrganizationXSDToLogical()
property ProviderID as %String (MAXLEN = 128);
The UniqueID of the Home Provider created for the User
Property methods: ProviderIDDisplayToLogical(), ProviderIDGet(), ProviderIDGetStored(), ProviderIDIsValid(), ProviderIDLogicalToDisplay(), ProviderIDLogicalToOdbc(), ProviderIDNormalize(), ProviderIDSet()
property Proxies as array of %String;
The set of users who are allowed to be a proxy for this user Proxies act on behalf of this user, and implicitly get their consent groups This is an array of UserID strings
Property methods: ProxiesBuildValueArray(), ProxiesCollectionToDisplay(), ProxiesCollectionToOdbc(), ProxiesDisplayToCollection(), ProxiesDisplayToLogical(), ProxiesGet(), ProxiesGetObject(), ProxiesGetObjectId(), ProxiesGetStored(), ProxiesGetSwizzled(), ProxiesIsValid(), ProxiesLogicalToDisplay(), ProxiesLogicalToOdbc(), ProxiesNormalize(), ProxiesOdbcToCollection(), ProxiesSet(), ProxiesSetObject(), ProxiesSetObjectId()
property Specialty as %String (MAXLEN = 256);
Property methods: SpecialtyDisplayToLogical(), SpecialtyGet(), SpecialtyGetStored(), SpecialtyIsValid(), SpecialtyLogicalToDisplay(), SpecialtyLogicalToOdbc(), SpecialtyNormalize(), SpecialtySet()
property SubSpecialty as %String (MAXLEN = 256);
Property methods: SubSpecialtyDisplayToLogical(), SubSpecialtyGet(), SubSpecialtyGetStored(), SubSpecialtyIsValid(), SubSpecialtyLogicalToDisplay(), SubSpecialtyLogicalToOdbc(), SubSpecialtyNormalize(), SubSpecialtySet()
property UserID as %String (MAXLEN = 128, SELECTIVITY = 1) [ Required ];
Will end up as $username. It's not an IDKEY - that's an internalID
Property methods: UserIDDisplayToLogical(), UserIDExists(), UserIDGet(), UserIDGetStored(), UserIDIsValid(), UserIDLogicalToDisplay(), UserIDLogicalToOdbc(), UserIDNormalize(), UserIDSet()

Methods

classmethod CheckEmailDuplication(pExportToFile As %Boolean = 1)
For all existing user/clinician, check the duplication of Email Addresses associated with different users pExportToFile: boolean value to choose whether to export the result to a file under directory /Mgr//
@API.Method
classmethod CopyEmailAddressToEmailID(pClassName As %String, pMethodName As %String, pLogFileName As %String = "CopyEmailAddressToEmailIDLog.txt")
Method to copy Email Addresses to Email IDs based on user-defined mapping method perform in background pClassName: name of the class where the user-defined mapping method exists
pMethodName: name of the user-defined mapping method
pLogFileName: name of the file to write the log messages to. By default, the file will be created in /mgr/ directory.
@API.Method
classmethod FindByEmail(pEmail As %String, Output pId As %String, Output pName As %String, Output pUserId As %String) as %Status
classmethod FindUsersClose(ByRef qHandle As %Binary) as %Status
classmethod FindUsersExecute(ByRef qHandle As %Binary, pActiveOnly As %Boolean = 1, pLastName As %String, pFirstName As %String, pUserId As %String, pNumber As %String, pAssignAuth As %String, pCliniciansOnly As %Boolean, pFilterFlag As %Boolean, pFacilities As %String, pRelationshipId As %String, pMPIID As %String, pDelivery As %Boolean, pOrganizationsOnly As %Boolean) as %Status
classmethod FindUsersFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
method GetExistingData(Output pId As %String) as %Status
classmethod GetUserClinicianFromRequest(pRequestingUser As %String) as %String
classmethod OnCheckPermission(Output pHandled As %Boolean = 0, pOperation As %String, pID As %Integer, pObject As %RegisteredObject = "") as %Status
Checks permissions (parameter-based) on a particular operation + object.
If pHandled is set to true, CheckPermission() will be bypassed.
pOperation is "C" (create), "R" (read), "U" (update), or "D" (delete)
pID is the ID of the object being operated on (empty for new objects)
pObject is the object being operated on (for create/read/update; empty for delete)
Returns $$$ERROR($$$AccessDenied) if the user does not have the requisite permission.
classmethod ResolveClinicianGroup(ByRef pClinicianId As %String = "") as %String
Resolve a clinician group ID
classmethod ResolveUserClinician(ByRef pClinicianId As %String = "", pRequestingUser As %String = "") as %Status
classmethod ReturnSessionInfoResponse(pUserName) as HS.Registry.Person.User.WebServices.Containers.SessionInfo
classmethod SampleMapEmailAddressToEmailID(pUser As HS.Registry.Person.User, pUserLoginIDList As %Library.ListOfObjects)
This example method maps Email Addresses to Email IDs based on security domain and email type pUser: an object HS.Registry.Person.User pUserLoginIDList: the list of HS.Registry.Person.UserLoginID objects for that user User should assume that all LoginID objects passed to this method have an empty Email ID field In this example, in HS default domain, only emails of EmailType Secure ("S") are mapped to Email IDs In other domains, primary emails are mapped to Email IDs. If no email is marked as primary, then use any of the existing emails NOTE: Please do not call %Save() on the modified LoginID objects in this method. This will be handled in CopyEmailAddressToEmailID() method
classmethod SessionUserClinician(pUser As %String = "") as %String
classmethod UpdateMessageRepositoryForAllUsers(pOldRepository As %String, pNewRepository As %String)
Updates the MessageRepository of every record of HS.Registry.Person.User that currently has pOldRepository as it's repository to be pNewRepository. Both arguments MUST match the "Name" property of existing entries in the Gateways Registry i.e. in table HS_Gateway.Config.
This method can be run either directly from terminal OR as a background job using the Job command.
Throws errors when run from terminal. Writes errors to the Application Error Log as well so they can be viewed when run using the Job command.
@API.Method
classmethod UserHasFacility(pRegistryId) as %Integer
Helper method to check whether an exisiting user has facility Return -1 to indicate failure
classmethod UserHasLoginID(pRegistryId) as %Integer
Helper method to check whether an exisiting user has loginid Return -1 to indicate failure
classmethod UserHasRelationships(pRegistryId As %String) as %Integer
Method returns 1 if User has existing Clinician-Patient Relationships, 0 otherwise Paremeters:
  • pRegistryId: The Registry ID associated with the user.

Queries

query FindUsers(pActiveOnly As %String, pLastName As %String, pFirstName As %String, pUserId As %String, pNumber As %String, pAssignAuth As %String, pCliniciansOnly As %Boolean, pFilterFlag As %Boolean, pFacilities As %String, pRelationshipId As %String, pMPIID As %String, pDelivery As %Boolean = 0, pOrganizationsOnly As %Boolean = 0)
Selects ID As %String, Name As %String, UserId As %String, Description As %String, Number As %String, AssigningAuthority As %String, ClinicianFlag As %Boolean, Active As %Boolean, Organization As %Boolean
Search for users

Indexes

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (NameIndex on NameParts.Family);
Index methods: NameIndexExists()
index (ProviderIndex on ProviderID);
Will be used when we create a UI for Home Providers, to update corresponding users
Index methods: ProviderIndexExists()
index (Proxies on Proxies(KEYS));
Index methods: ProxiesBuildValueArray(), ProxiesCollectionToDisplay(), ProxiesCollectionToOdbc(), ProxiesDisplayToCollection(), ProxiesDisplayToLogical(), ProxiesGet(), ProxiesGetObject(), ProxiesGetObjectId(), ProxiesGetStored(), ProxiesGetSwizzled(), ProxiesIsValid(), ProxiesLogicalToDisplay(), ProxiesLogicalToOdbc(), ProxiesNormalize(), ProxiesOdbcToCollection(), ProxiesSet(), ProxiesSetObject(), ProxiesSetObjectId()
index (UserID on UserID);
Index methods: UserIDDisplayToLogical(), UserIDExists(), UserIDGet(), UserIDGetStored(), UserIDIsValid(), UserIDLogicalToDisplay(), UserIDLogicalToOdbc(), UserIDNormalize(), UserIDSet()

Inherited Members

Inherited Properties

Inherited Methods

Storage

Storage Model: Storage (HS.Registry.Person.User)

^HS.Registry.Person.UserD(ID,"AdditionalInfo",n)
=
AdditionalInfo(n)

Storage Model: Storage (HS.Registry.Person.User)

^HS.Registry.Person.UserD(ID,"Addresses",n)
=
Addresses(n)

Storage Model: Storage (HS.Registry.Person.User)

^HS.Registry.Person.UserD(ID,"Identifiers",n)
=
Identifiers(n)

Storage Model: Storage (HS.Registry.Person.User)

^HS.Registry.Person.UserD(ID,"Proxies",n)
=
Proxies(n)

Storage Model: Storage (HS.Registry.Person.User)

^HS.Registry.Person.UserD(ID,"Telecoms",n)
=
Telecoms(n)

Storage Model: Storage (HS.Registry.Person.User)

^HS.Registry.Person.UserD(ID)
=
%%CLASSNAME
NameParts
Name
Type
BirthDateTime
BirthPlace
AdministrativeGender
Active
CacheUser
Race
EthnicGroup
LanguageCommunication
VIPIndicator
Description
MaritalStatus
MessageRepository
ReligiousAffiliation
UserID
LastLoginDate
Specialty
SubSpecialty
Location
Roles
ProviderID
IgnoreProviderUpdates
Organization
FeedbackOpens in a new tab