Example In the event handler for the Commit event of the TContextorControl, developers can check whether or not the user was previously defined, and is now undefined or null. In this case, developers would want to do any necessary processing, and then halt. Figure : IsUserCleared Method—Example Procedure TForm1.CommitHandler(Sender: TObject) begin with CCOWRPCBroker1 do if WasUserDefined and IsUserCleared then begin // do any necessary processing before halting halt; end; end; IsUserContextPending Method Declaration function IsUserContextPending(aContextItemCollection: IContextItemCollection): Boolean; This method returns a value of True if the pending context change is related to User Context; if not, then it may be related to the Patient Context, etc. This method returns: True—CCOW pending context change is related to User Context. False—CCOW pending context change is not related to User Context (e.g., Patient Context change). This method is used in response to an OnPending event to determine if the pending change is User Context related, and if so, whether the User value in the Context Vault has been cleared. If the value has been cleared, then the application should shut down. Switching User Context is not supported, since Office of Cyber and Information Security (OCIS) policy indicates that the current user must sign off the client workstation and the new user must sign on the client workstation. REF: For an example of the IsUserContextPending method, run the RPC Broker Example (i.e., BrokerExample.exe); located in the following directory: BDK32\Samples\BrokerEx
CCOWLogonVpidValue Property (read-only) Applies to TCCOWRPCBroker Component Declaration property CCOWLogonVpidValue: String; Description The CCOWLogonVpidValue property is available at run-time only. This read-only property gives the value of the VA Person Identification (VPID) value for the currently logged on user, if the facility has been enumerated; otherwise, the value returned is a null string. It permits the user to identify the logon VPID value associated with the CCOWLogonVpid Property (read-only) logon VPID name used within the Context Vault related to User Context. ClearParameters Property Applies to TRPCBroker Component Declaration property ClearParameters: Boolean; Description The ClearParameters design-time property gives the developer the option to clear the Param Property after every invocation of any of the following methods: Call Method strCall Method lstCall Method Setting ClearParameters to True clears the Param Property. Simple assignment of True to this property clears the Param Property after every invocation of the Call Method, strCall Method, and lstCall Method. Thus, the parameters need only be prepared for the next call without being concerned about what was remaining from the previous call. By setting ClearParameters to False, the developer can make multiple calls with the same Param Property. It is also appropriate to set this property to False when a majority of the parameters in the Param Property should remain the same between calls. However, minor changes to the parameters can still be made.
Examples C // XWB is a “B” (Broker) type option in the OPTION file. result = RPCBCreateContext(RPCBroker, “XWB EGCHO”); C++ // XWB EGCHO is a “B” (Broker) type option in the OPTION file. MyInstance.RPCBCreateContext(“XWB EGCHO”) Visual Basic intResult = RPCBCreateContext(intRPCBHandle, “MY APPLICATION”) ‘where MY APPLICATION is a “B” (Broker) type option in the Option file. RPCBFree Function The RPCBFree function destroys the RPC Broker component and releases associated memory (see “Memory section). Declarations Table : RPCBFree Function—Declarations Software Declaration Delphi procedure RPCBFree(RPCBroker: TRPCBroker); C void (__stdcall *RPCBFree)(void *); C++ N/A (encapsulated in TRPCBroker class definition) VB Sub RPCBFree (ByVal intRPCBHandle As Long) Parameter Description Table : RPCBFree Function—Parameter Parameter Description RPCBroker Handle of the TRPCBroker Component to destroy.