BMXNET40 DataTableFutures are created synchrounously when Async calls are made on a RemoteSession. A DataTabelFuture is used to manage each async call and has a variety of methods to support the relativelty long and dynamic lifecycle and an Async call. Beware that all return communications are not on the UI thread unless an InvokedControl is specify. Method to cancel the Async call. This does not stop the server-side processing. The Aborted event will be called immediately. If IsAutoFetchEnabled is false, then the results must be fetched synchrounously useding PostFetch(). Call PostFetch() once and check if HasData is true. If not true, there is was error related to the async call. Triggered with the async returns, see DataTableFutureEventArgs to know if there is a result waiting. It's very common to hook the Returned event after each Async call and then unhook it when the Returned or Aborted calls return. If the InvokedControl is set to a valid Form or Control object (non-displosed), the DataTabletFuture will trigger events on the UI thread using Invoke() If set to true the result will be fetched before the Returned event is called, otherwise the Returned event will be triggered and the application code needs to call PostFetch() to retrieve the result. True by default. Access to any exceptions that occur during Async call. The result table if any, or null. Answer true if canceled. It's common that a dialog would allow the user to cancel the Async call and the Dialog that is holding on the the Future will cancel the Future. Cancelling the Future does not stop the server-side processing but when the server returns nothing will happen. Answer true if the Async call has timeed-out (a time-based version of Cancel) Answer true if the Async call has completed on the server and that a result is ready. Answer true if the data has been fetched from the server and is ready to be used by the application. The time the Future was created. The time the async call returned (the future) How long in milliseconds the Async call took to complete. Number of seconds to wait for an async response before returning without a response. The data set the result data table is in. The AppContext that the async call was made with To test the BMXNetBroker class, we can use one instance of BMXNetBroker to be the authenicated transport and use the receiver to be the encapsulated BMX interaction. BMXNetSessionConnection implements low-level connectivity to RPMS databases. Given strInput = "13" builds "013" if nLength = 3. Default for nLength is 3. Given strInput = "13" builds "013" if nLength = 3 Default for nLength is 3. Default = 3 Concatenates zero-padded length of sInput to sInput Given "Hello" returns "004Hello" If nSize = 5, returns "00004Hello" Default for nSize is 3. Concatenates zero-padded length of sInput to sInput Given "Hello" returns "004Hello" If nSize = 5, returns "00004Hello" Default for nSize is 3. Build protocol header Returns index of first instance of sSubString in sString. If sSubString not found, returns -1. Lock a local or global M variable Returns true if lock is obtained during TimeOut seconds Use + to increment, - to decrement lock. AppContext is managed an client and server with c/s calls to change appContext on the server. There is no use for AppContext on the client so recommend integrated AppContext into BMX Protocol so always passing it and managing switching it on the server. Returns a reference to the internal ReaderWriterLock member. Gets/sets the Kernel Application context Throws an exception if unable to set the context. This implementation EncryptionProvider is the crypto used for the standard Indian Health Service socket-based BMXNET Broker. The crypto used to implement the socket-based BMXNET Broker. Any crypto can be used if a new .NET EncryptionProvider is written and a corresponding modification to the RPMS-side is done. An quick experiment can be done by implementing the following ClearText EncryptionProvider and modifying the RPMS-side encryption routines to do nothing. public class ClearText : EncryptionProvider { public string Encrypt(string aString) { return aString; } public string Decrypt(string aString) { return aString; } } Encrypt aString The string to be encrypted An ASCII encrypted string Decrypt aString The ASCII string to be decrypted An ASCII decrypted string Set a site specific key The required key for BMX Ade BMXAde Implementation String to encrypt Encrypt string BMXAde Implementation String to decrypt Decrypted string Common M[umps] related function libraries implemented with static members. M-like utility method to answer the number of pieces limited by aDelimiter. Corresponds to M's $L(STRING,DELIMITER) Delimited input string e.g. one^two^three Delimiter character or string, commonly ~ ^ or | Count of pieces in thePieces delimited by aDelimiter String team="DOE,JOHN^SMITH, PETER^JONES, SALLY"; if (M.PieceLength(team,"~") >=5 ) { this.PlayBasketBall(); } else { this.PlayTrackAndField(); } M-like utility method to answer the piece at a 1-based offset. Corresponds to M's $$Piece function Delimited input string e.g. one^two^three Delimiter character or string, commonly ~ ^ or | The 1-based index of the piece The piece at the index, or an empty string if the index is higher than the explicit number of pieces String demographics="DOE,JOHN~555-55-5555~34~M"; int age=0; if (int.TryParse(M.Piece(demographics,"~",3), out age)) { System.Console.Writeln(M.Piece(demographics,"~",1)+" is "+ (age >= 18 ) ? "an adult" : "a child"); } M-like utility method to answer a delimited string of pieces between two 1-based offsets Delimited input string e.g. one^two^three Delimiter character or string, commonly ~ ^ or | Starting 1-based index of the pieces to copy from Ending 1-based index of the pieces to copy to The delimited string from start to end, including delimitered blanks for indexes higher than the explicit number of pieces M-like utility method to convert from a DateTime to the FileMan data/time format DateTime to convert String representing aDateTime in FileMan format Exception thrown in conversion fails M-like utility method to convert from a FileMan date/time formatted String to a .NET DateTime date/time formated FileMan string .NET DateTime object from parsing input FileMan string Exception thrown in conversion fails An instance of these args are included with the ContextChanging event and this event is a CancelEventArgs subclass. The Cancel property being set to True represents the desire to Veto the change so the patient (and potentially visit) does not change. The Veto can be overriden by the framework so be prepared for the context to change even if you don't want it to. Answer True if the visit is about to be changed. Answer True if the visit is about to be changed. The current state of the Context. The argument to the ContextChanged method. This event has methods that allow you to detect which aspects of the context have changed and what the new context is. Answer if the visit had changed. When the patient changes and a visit had been selected, the visit will change to null. In the following example, the first tab of a notebook is selected whenever the patient changes. void Context_Changed(object sender, ContextChangedArgs e) { if (e.IsPatientChange) { this.SelectedIndex = 1; this.RefreshAll(); } } Answer if the patient had changed. The current state of the context. This context object is that same instance used for the life of the LocalSession Convienence class to provide information from the AssembleInfo [assembly: AssemblyTitle("IndianHealthService.BMXNet.Test")] [assembly: AssemblyDescription("A test application")] [assembly: AssemblyCompany("IHS")] [assembly: AssemblyProduct("IndianHealthService.BMXNet.Test")] [assembly: AssemblyCopyright("IHS 2009")] [assembly: AssemblyVersion("2.0.0.0")] Convienence method to provide information from the AssembleInfo [assembly: AssemblyTitle("IndianHealthService.BMXNet.Test")] Convienence method to provide information from the AssembleInfo [assembly: AssemblyVersion("2.0.0.0")] Convienence method to provide information from the AssembleInfo [assembly: AssemblyDescription("A test application")] Convienence method to provide information from the AssembleInfo [assembly: AssemblyProduct("IndianHealthService.BMXNet.Test")] Convienence method to provide information from the AssembleInfo [assembly: AssemblyCopyright("IHS 2009")] Convienence method to provide information from the AssembleInfo [assembly: AssemblyCompany("IHS")] All server-side RPMS RPC calls are performed through this interface. Each instance of RemoteSession corresponds to a single job (e.g. Cache process) on RPMS. There is always one primary RemoteSession and potentially more when using RemoteSessionPool. When the primary RemoteSession is closed all secondary pooled sessions are also closed and the server broker connection is terminated. Calls a remote procedure on the RPMS server and returns the result as a String. Presumes that the AppContext was set prior to the call. ... this.RemoteSession.AppContext="VEN RPC"; ... String asqThreadholds= this.RemoteSession.TransmitRPC("VEN ASQ GET DATA", this.Context.Patient.Ien); The remote procedure call name A carrot ^ delimited string of input parameters The result of the RPC call Calls a remote procedure on the RPMS server and returns the result as a String. If there are any exceptions a colon delimited string in the format Exception:Message is returned. Presumes that the AppContext was set prior to the call. ... this.RemoteSession.AppContext="VEN RPC"; ... String asqThreadholds= this.RemoteSession.SafelyTransmitRPC("VEN ASQ GET DATA", this.Context.Patient.Ien); The remote procedure call name A carrot ^ delimited string of input parameters The result of the RPC call. If there are any exceptions a colon delimited string in the format Exception:Message is returned. Calls a remote procedure on the RPMS server and returns the result as a String. If there are any exceptions a colon delimited string in the format Exception:Message is returned. Presumes that the AppContext was set prior to the call. ... this.RemoteSession.AppContext="VEN RPC"; ... String asqThreadholds= this.RemoteSession.SafelyTransmitRPC("VEN ASQ GET DATA", this.Context.Patient.Ien); The remote procedure call name A carrot ^ delimited string of input parameters The AppContext (OPTION) to be set prior to the call( The result of the RPC call. If there are any exceptions a colon delimited string in the format Exception:Message is returned. this.Context.Visit.Create(); if (this.Context.Visit.IsStub) { if (!this.Context.Visit.Create()) { return false; } } this.RemoteSession.SaveChanges(this.ScoreTable); Calling a Custom Remote Procedure call (RPC) registered in VA FileMan’s REMOTE PROCEDURE file that results in a DataTable. You must design your remote procedure’s M routine to build its result its data in the specific format described later in this document. The co /// Normally the AppContext is set once, after logging into the BMX, with a single AppContext for the current applications or specified in every RPC call. The VEN namespace is for PCC+ and the example below would be used at the beginning of a PCC+ application. aRemoteSession.AppContext = "VEN RPC"; The M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. Figure 5 2 shows the M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. PDEMO(BMXY,BMXPAT,BMXCOUNT) ;EP ;This simple RPC demonstrates how to format data ;for the BMXNet ADO.NET data provider ; ;Returns a maximum of BMXCOUNT records from the ;VA PATIENT file whose names begin with BMXPAT ; N BMXI,BMXD,BMXC,BMXNODE,BMXDOB ; ; BMXY is passed in by reference. Set it to ;the value of the variable in which we will return our data: S BMXY="^TMP(BMX,"_$J_")" ; ;The first subnode of the data global contains the column header information ;in the form "txxxxxCOLUMN1NAME^txxxxxCOLUMN2NAME"_$C(30) ;where t is the column data type: ; T for text ; I for integer ; N for floating point number ; D for date/time. ;xxxxx is the length of the column in characters. ; S BMXI=0,BMXC=0 S ^ TMP(BMX,$J,BMXI)="T00030NAME^T00010SEX^D00020DOB"_$C(30) ; ;You MUST set an error trap: S X="PDERR^BMXRPC6",@^%ZOSF("TRAP") ; ;Strip CR, LF, TAB from BMXCOUNT parameter S BMXCOUNT=$TR(BMXCOUNT,$C(13),"") S BMXCOUNT=$TR(BMXCOUNT,$C(10),"") S BMXCOUNT=$TR(BMXCOUNT,$C(9),"") ; ;Iterate through the global and set the data nodes: S:BMXPAT="" BMXPAT="A" S BMXPAT=$O(^DPT("B",BMXPAT),-1) S BMXD=0 F S BMXPAT=$O(^DPT("B",BMXPAT)) Q:BMXPAT="" S BMXD=$O(^DPT("B",BMXPAT,0)) I +BMXD S BMXC=BMXC+1 Q:(BMXCOUNT)BMXC BMXCOUNT) D . Q:'$D(^DPT(BMXD,0)) . S BMXI=BMXI+1 . S BMXNODE=^DPT(BMXD,0) . ;Convert the DOB from FM date to external form . S Y=$P(BMXNODE,U,3) . I +Y X ^DD("DD") . S BMXDOB=Y . ;The data node fields are in the same order as the column header, i.e. NAME^SEX^DOB . ;and terminated with a $C(30) . S ^ TMP(BMX,$J,BMXI)=$P(BMXNODE,U)_U_$P(BMXNODE,U,2)_U_BMXDOB_$C(30) ; ;After all the data nodes have been set, set the final node to $C(31) to indicate ;the end of the recordset S BMXI=BMXI+1 S ^ TMP(BMX,$J,BMXI)=$C(31) Q ; PDERR ;Error trap for PDEMO ; S ^ TMP(BMX,$J,BMXI+1)=$C(31) Q Register as an RPC NAME: BMX DEMO TAG: PDEMO ROUTINE: BMXRPC6 RETURN VALUE TYPE: GLOBAL ARRAY Call using a RemoteSession DataTable demoTable=aRemoteSession.TableFromCommand("BMX DEMO^S^10"); The name of the RPC The resulting DataTable Calling a Custom Remote Procedure call (RPC) registered in VA FileMan’s REMOTE PROCEDURE file that results in a DataTable. You must design your remote procedure’s M routine to build its result its data in the specific format described later in this document. The co /// Normally the AppContext is set once, after logging into the BMX, with a single AppContext for the current applications or specified in every RPC call. The VEN namespace is for PCC+ and the example below would be used at the beginning of a PCC+ application. aRemoteSession.AppContext = "VEN RPC"; The M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. Figure 5 2 shows the M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. PDEMO(BMXY,BMXPAT,BMXCOUNT) ;EP ;This simple RPC demonstrates how to format data ;for the BMXNet ADO.NET data provider ; ;Returns a maximum of BMXCOUNT records from the ;VA PATIENT file whose names begin with BMXPAT ; N BMXI,BMXD,BMXC,BMXNODE,BMXDOB ; ; BMXY is passed in by reference. Set it to ;the value of the variable in which we will return our data: S BMXY="^TMP(BMX,"_$J_")" ; ;The first subnode of the data global contains the column header information ;in the form "txxxxxCOLUMN1NAME^txxxxxCOLUMN2NAME"_$C(30) ;where t is the column data type: ; T for text ; I for integer ; N for floating point number ; D for date/time. ;xxxxx is the length of the column in characters. ; S BMXI=0,BMXC=0 S ^ TMP(BMX,$J,BMXI)="T00030NAME^T00010SEX^D00020DOB"_$C(30) ; ;You MUST set an error trap: S X="PDERR^BMXRPC6",@^%ZOSF("TRAP") ; ;Strip CR, LF, TAB from BMXCOUNT parameter S BMXCOUNT=$TR(BMXCOUNT,$C(13),"") S BMXCOUNT=$TR(BMXCOUNT,$C(10),"") S BMXCOUNT=$TR(BMXCOUNT,$C(9),"") ; ;Iterate through the global and set the data nodes: S:BMXPAT="" BMXPAT="A" S BMXPAT=$O(^DPT("B",BMXPAT),-1) S BMXD=0 F S BMXPAT=$O(^DPT("B",BMXPAT)) Q:BMXPAT="" S BMXD=$O(^DPT("B",BMXPAT,0)) I +BMXD S BMXC=BMXC+1 Q:(BMXCOUNT)BMXC BMXCOUNT) D . Q:'$D(^DPT(BMXD,0)) . S BMXI=BMXI+1 . S BMXNODE=^DPT(BMXD,0) . ;Convert the DOB from FM date to external form . S Y=$P(BMXNODE,U,3) . I +Y X ^DD("DD") . S BMXDOB=Y . ;The data node fields are in the same order as the column header, i.e. NAME^SEX^DOB . ;and terminated with a $C(30) . S ^ TMP(BMX,$J,BMXI)=$P(BMXNODE,U)_U_$P(BMXNODE,U,2)_U_BMXDOB_$C(30) ; ;After all the data nodes have been set, set the final node to $C(31) to indicate ;the end of the recordset S BMXI=BMXI+1 S ^ TMP(BMX,$J,BMXI)=$C(31) Q ; PDERR ;Error trap for PDEMO ; S ^ TMP(BMX,$J,BMXI+1)=$C(31) Q Register as an RPC NAME: BMX DEMO TAG: PDEMO ROUTINE: BMXRPC6 RETURN VALUE TYPE: GLOBAL ARRAY Call using a RemoteSession DataTable demoTable=aRemoteSession.TableFromCommand("BMX DEMO^S^10"); The name of the RPC The AppContext to set prior to the call The resulting DataTable Calling a Custom Remote Procedure call (RPC) registered in VA FileMan’s REMOTE PROCEDURE file that results in a DataTable. You must design your remote procedure’s M routine to build its result its data in the specific format described later in this document. The co /// Normally the AppContext is set once, after logging into the BMX, with a single AppContext for the current applications or specified in every RPC call. The VEN namespace is for PCC+ and the example below would be used at the beginning of a PCC+ application. aRemoteSession.AppContext = "VEN RPC"; The M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. Figure 5 2 shows the M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. PDEMO(BMXY,BMXPAT,BMXCOUNT) ;EP ;This simple RPC demonstrates how to format data ;for the BMXNet ADO.NET data provider ; ;Returns a maximum of BMXCOUNT records from the ;VA PATIENT file whose names begin with BMXPAT ; N BMXI,BMXD,BMXC,BMXNODE,BMXDOB ; ; BMXY is passed in by reference. Set it to ;the value of the variable in which we will return our data: S BMXY="^TMP(BMX,"_$J_")" ; ;The first subnode of the data global contains the column header information ;in the form "txxxxxCOLUMN1NAME^txxxxxCOLUMN2NAME"_$C(30) ;where t is the column data type: ; T for text ; I for integer ; N for floating point number ; D for date/time. ;xxxxx is the length of the column in characters. ; S BMXI=0,BMXC=0 S ^ TMP(BMX,$J,BMXI)="T00030NAME^T00010SEX^D00020DOB"_$C(30) ; ;You MUST set an error trap: S X="PDERR^BMXRPC6",@^%ZOSF("TRAP") ; ;Strip CR, LF, TAB from BMXCOUNT parameter S BMXCOUNT=$TR(BMXCOUNT,$C(13),"") S BMXCOUNT=$TR(BMXCOUNT,$C(10),"") S BMXCOUNT=$TR(BMXCOUNT,$C(9),"") ; ;Iterate through the global and set the data nodes: S:BMXPAT="" BMXPAT="A" S BMXPAT=$O(^DPT("B",BMXPAT),-1) S BMXD=0 F S BMXPAT=$O(^DPT("B",BMXPAT)) Q:BMXPAT="" S BMXD=$O(^DPT("B",BMXPAT,0)) I +BMXD S BMXC=BMXC+1 Q:(BMXCOUNT)BMXC BMXCOUNT) D . Q:'$D(^DPT(BMXD,0)) . S BMXI=BMXI+1 . S BMXNODE=^DPT(BMXD,0) . ;Convert the DOB from FM date to external form . S Y=$P(BMXNODE,U,3) . I +Y X ^DD("DD") . S BMXDOB=Y . ;The data node fields are in the same order as the column header, i.e. NAME^SEX^DOB . ;and terminated with a $C(30) . S ^ TMP(BMX,$J,BMXI)=$P(BMXNODE,U)_U_$P(BMXNODE,U,2)_U_BMXDOB_$C(30) ; ;After all the data nodes have been set, set the final node to $C(31) to indicate ;the end of the recordset S BMXI=BMXI+1 S ^ TMP(BMX,$J,BMXI)=$C(31) Q ; PDERR ;Error trap for PDEMO ; S ^ TMP(BMX,$J,BMXI+1)=$C(31) Q Register as an RPC NAME: BMX DEMO TAG: PDEMO ROUTINE: BMXRPC6 RETURN VALUE TYPE: GLOBAL ARRAY Call using a RemoteSession DataTable demoTable=aRemoteSession.TableFromCommand("BMX DEMO^S^10"); The name of the RPC The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create The resulting DataTable Calling a Custom Remote Procedure call (RPC) registered in VA FileMan’s REMOTE PROCEDURE file that results in a DataTable. You must design your remote procedure’s M routine to build its result its data in the specific format described later in this document. The co /// Normally the AppContext is set once, after logging into the BMX, with a single AppContext for the current applications or specified in every RPC call. The VEN namespace is for PCC+ and the example below would be used at the beginning of a PCC+ application. aRemoteSession.AppContext = "VEN RPC"; The M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. Figure 5 2 shows the M code for a simple remote procedure call (BMX PATIENT DEMO) with two parameters to return a list of patients. See the following example. Note the inclusion of an error trap in the routine; BMXNet RPC routines must contain a functional error trap. PDEMO(BMXY,BMXPAT,BMXCOUNT) ;EP ;This simple RPC demonstrates how to format data ;for the BMXNet ADO.NET data provider ; ;Returns a maximum of BMXCOUNT records from the ;VA PATIENT file whose names begin with BMXPAT ; N BMXI,BMXD,BMXC,BMXNODE,BMXDOB ; ; BMXY is passed in by reference. Set it to ;the value of the variable in which we will return our data: S BMXY="^TMP(BMX,"_$J_")" ; ;The first subnode of the data global contains the column header information ;in the form "txxxxxCOLUMN1NAME^txxxxxCOLUMN2NAME"_$C(30) ;where t is the column data type: ; T for text ; I for integer ; N for floating point number ; D for date/time. ;xxxxx is the length of the column in characters. ; S BMXI=0,BMXC=0 S ^ TMP(BMX,$J,BMXI)="T00030NAME^T00010SEX^D00020DOB"_$C(30) ; ;You MUST set an error trap: S X="PDERR^BMXRPC6",@^%ZOSF("TRAP") ; ;Strip CR, LF, TAB from BMXCOUNT parameter S BMXCOUNT=$TR(BMXCOUNT,$C(13),"") S BMXCOUNT=$TR(BMXCOUNT,$C(10),"") S BMXCOUNT=$TR(BMXCOUNT,$C(9),"") ; ;Iterate through the global and set the data nodes: S:BMXPAT="" BMXPAT="A" S BMXPAT=$O(^DPT("B",BMXPAT),-1) S BMXD=0 F S BMXPAT=$O(^DPT("B",BMXPAT)) Q:BMXPAT="" S BMXD=$O(^DPT("B",BMXPAT,0)) I +BMXD S BMXC=BMXC+1 Q:(BMXCOUNT)BMXC BMXCOUNT) D . Q:'$D(^DPT(BMXD,0)) . S BMXI=BMXI+1 . S BMXNODE=^DPT(BMXD,0) . ;Convert the DOB from FM date to external form . S Y=$P(BMXNODE,U,3) . I +Y X ^DD("DD") . S BMXDOB=Y . ;The data node fields are in the same order as the column header, i.e. NAME^SEX^DOB . ;and terminated with a $C(30) . S ^ TMP(BMX,$J,BMXI)=$P(BMXNODE,U)_U_$P(BMXNODE,U,2)_U_BMXDOB_$C(30) ; ;After all the data nodes have been set, set the final node to $C(31) to indicate ;the end of the recordset S BMXI=BMXI+1 S ^ TMP(BMX,$J,BMXI)=$C(31) Q ; PDERR ;Error trap for PDEMO ; S ^ TMP(BMX,$J,BMXI+1)=$C(31) Q Register as an RPC NAME: BMX DEMO TAG: PDEMO ROUTINE: BMXRPC6 RETURN VALUE TYPE: GLOBAL ARRAY Call using a RemoteSession DataTable demoTable=aRemoteSession.TableFromCommand("BMX DEMO^S^10"); The name of the RPC The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create The AppContext to set prior to the call The resulting DataTable SELECT VA_PATIENT.NAME, VA_PATIENT.SSN, PATIENT.CURRENT_COMMUNITY FROM VA_PATIENT, PATIENT WHERE VA_PATIENT.BMXIEN =* INTERNAL[PATIENT.NAME] AND VA_PATIENT.NAME LIKE 'DEMO%' AND VA_PATIENT.AGE BETWEEN 15 AND 24 SHOWPLAN TabletFromRpc is a double-dispatch method that is used by some developers. Developers create an RPC call the returns a properly format BMX command (custom or BMX SS ADO) that is then transmitted back to RPMS to retrieve the Data Table. The remote procedure call name A carrot ^ delimited string of input parameters The resulting DataTable TabletFromRpc is a double-dispatch method that is used by some developers. Developers create an RPC call the returns a properly format BMX command (custom or BMX SS ADO) that is then transmitted back to RPMS to retrieve the Data Table. The remote procedure call name A carrot ^ delimited string of input parameters The AppContext to set prior to the call The resulting DataTable TabletFromRpc is a double-dispatch method that is used by some developers. Developers create an RPC call the returns a properly format BMX command (custom or BMX SS ADO) that is then transmitted back to RPMS to retrieve the Data Table. The remote procedure call name A carrot ^ delimited string of input parameters The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create The resulting DataTable TabletFromRpc is a double-dispatch method that is used by some developers. Developers create an RPC call the returns a properly format BMX command (custom or BMX SS ADO) that is then transmitted back to RPMS to retrieve the Data Table. The remote procedure call name A carrot ^ delimited string of input parameters The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create The AppContext to set prior to the call The resulting DataTable Same as the corresponding TableFromCommand call except a DataTableFuture is returned. See on how to use a 'Future The name of the RPC A DataTableFuture Same as the corresponding TableFromCommand call except a DataTableFuture is returned. See on how to use a 'Future The name of the RPC The AppContext to set prior to the call A DataTableFuture Same as the corresponding TableFromCommand call except a DataTableFuture is returned. See on how to use a 'Future The name of the RPC The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create A DataTableFuture Same as the corresponding TableFromCommand call except a DataTableFuture is returned. See on how to use a 'Future The name of the RPC The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create The AppContext to set prior to the call A DataTableFuture Same as the corresponding TableFromRPC call except a DataTableFuture is returned. See on how to use a 'Future The remote procedure call name A carrot ^ delimited string of input parameters A DataTableFuture Same as the corresponding TableFromRPC call except a DataTableFuture is returned. See on how to use a 'Future A DataTableFuture Same as the corresponding TableFromRPC call except a DataTableFuture is returned. See on how to use a 'Future The remote procedure call name A carrot ^ delimited string of input parameters The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create A DataTableFuture Same as the corresponding TableFromRPC call except a DataTableFuture is returned. See on how to use a 'Future The remote procedure call name A carrot ^ delimited string of input parameters The DataSet to be populated with a resulting DataTable named aTableNAme The name of the DataTable in the DataSet to populate or to create The AppContext to set prior to the call A DataTableFuture Answer True if aString is a standard BMX ADO SS command that uses the BMX ADO SCHEMA files This is mostly used by the framework but exposed for potential use. The command to be examined True if it complied, otherwise false When done with session it should be closed. Once closed it is unusable. Internally the session is a lightweight object and when using multiple sessions internal RPMS connections are pooled . Close sessions when finished Closing the primary session closes all sessions and shuts down the RPMS connection BMX Broker's host address name or IP Address Authenticated user associated with this remote session this.StatusLabel.Text="Logged in: "+ aRemoteSession.User.Name; /// If there is a remoteSession user, it will be the same as the localSession User object The active AppContext (OPTION) of this remote session. Normally the AppContext is set once, after logging into the BMX, with a single AppContext for the current applications. The AppContext can also be set in every RPC call. If the AppContext is the same as the currently set AppContext, the AppContext will not be re-set. The VEN namespace is for PCC+ and the example below would be used at the beginning of a PCC+ application. aRemoteSession.AppContext = "VEN RPC"; Access the session's RemoteEventServices service provider to configure receiving remote events and to source new events. Job number of server-side Cache/MDB process. Very useful for debugging. String describing RPC call and input parameters of last non-DataTable RPC call String value of last successful non-DataTable RPC call String value of last successful non-DataTable RPC call Last DataTable retrieved by non-async calls The networking data receive timeout (in milliseconds). This value can be changed if the developer finds it neccessary to extend the time after login. Only applicable for the WinFramework The networking data send timeout (in milliseconds). This value can be changed if the developer finds it neccessary to extend the time after login but normally the send timeout should be kept short unless network conditions are poor. Only applicable for the WinFramework The primary session has the unique in that it holds the authenication privileges for all sessions. If you close the primary session, then all will close. This object represents the RPMS Division. All BMX Broker connections must have an estalibshed Division All async communications with RPMS is performed through the RemoteEventService which is found by calling aRemoteSession.EventServices. By default remote events are asynchronous and are not on the UI thread. The development must handed the events propertly and if interacting with a user interface control must use Invoke(). As a convinenence, InvokedControl can be set to any non-disposed Control and the event service is use Invoke() so that the event is triggered on the UI thread The Event timer, IsEventPollingEnabled and EventPollingInterval, is used by the Async RPC calls and is automattically turned on with IsEventPollingEnabled. If the developer turns on polling or changes the EventPollingInterval to be a long period, then the Async RPC calls will not respond in a timely manner if at all. Subscribe to an event named anEventType. These events are trigger exclusivley by other BMXNet remote services and travel from client-to-server-to-client. Once subscribed, the RemoteSession will poll based on the EventPollingInterval to see if a server-side event is waiting to be triggered on the client. The name of the event to subscribe to 1 if successful, otherwise it's an error. Refer to KIDS source for error codes. Unsubscribe from an event named anEventType. Once unsubscribed, published events named anEventType will no longer trigger an event for this RemoteSession. The name of the event to unsubscribe from 1 if successful, otherwise it's an error. Refer to KIDS source for error codes. Access to a RemoteEventService also allows you to publish your own events. Publishing is done through design and documentation to notify other developers what events you will trigger. An event is published, or triggered, by using TriggerEvent with the name of the event, an optional event specific string with data, and whether or not the publisher, if subsubscribed, wants the event published to them. Name of the event to publish An optional string with event specific data Set to True if the publisher of anEventType, that is also a subscriber to anEventType, also wants the event to be triggered back to them This event is triggered when an event named anEventType is published and the receiver has a subscription. Remember that this event is not on the UI-thread unless InvokedControl is properly set. This event is triggered every time the event timer is triggered, based on the EventPollingInterval. Remember that this event is not on the UI-thread unless InvokedControl is properly set. Respond quickly to this event. Set InvokedControl to a form or control of your WinForm application or EHR/VueCentric component that will live the lifetime of your RemoteSession. The RemoteEventServices will Invoke() on the InvokedControl to ensure all events are triggered on the UI thread. EventPolling is used for RemoteService events and Async RPC calls. IsEventPollingEnabled is used to turn polling on and off: True for on and False for off. The Async RPC framework and remote event service needs polling to be turned on. If Async RPC's or remote events are not working debug the RemoteEventService to verify polling is enabled and configured. If using Async RPC or remote service events activate and configure the timer when your applications starts ... //Poll every 10000 ms, or 10 seconds this.RemoteSession.EventServices.EventPollingInterval=10000; this.RemoteSession.EventServices.IsEventPollingEnabled=True; ... ... //Perhaps in another part of your application you have a small active Chat Window ... //Increase the frequency of polling by decreasing the EventPollingInterval to every 2 seconds this.RemoteSession.EventServices.EventPollingInterval=2000; The number of milliseconds (ms) to wait before polling. If a polling event is currently being processed when a second event is trigger, the second event is skipped. It's recommended to keep this interval at 5000 (5 seconds) or higher. Each BMX connection to RPMS contains a single RemoteSessionPool with at least one Session, the primary session. Applications that need additional server processes beyond what can be done with async commands can used the RemoteSessionPool. Access to the RemoteSessionPool is accomplished by implementing the RemoteSessionPoolConsumer interface on your component/control. Secondary sessions can be opened and closed as they are needed. If the AvailableSessionCount is zero then a null RemoteSession is returned so it is recommend to first check the if a pool HasAvailableSessions before an OpenSession() request. RemoteSessionPool high-performance can be achieved by keeping RPMS server jobs alive even after secondary sessions are closed. The pool will maintain MaxSessions - 1 number of jobs alive on the server. If the application is finished for awhile needing IdleSessionCount idle jobs, then TerminateIdleSessions() will release those resources on the server. New jobs will then be created on demand. Open a RemoteSession and answer it. If an idle Session exists, it will be recycled and answered. Use Close() on the RemoteSession to release this secondary RemoteSession back to the pool. A newly created or recycled RemoteSession or null if the number of RemoteSessions has reach the MaxSessions count Open a new RemoteSession and answer it. If an idle Session exists, it will be recycled and answered. Use Close() on the RemoteSession to release this secondary RemoteSession back to the pool. An implementation of Log can be included to trace RPC execution. Logging is not heavily used in BMXNET40 A newly created or recycled RemoteSession or null if the number of RemoteSessions has reach the MaxSessions count True if another secondary session can be opened. For this version of BMX, the EHR does not support secondary RemoteSessions and this method always returns false. If possible, develop your software using the API so when secondary RemoteSessions are supported your application will work. The number of additional secondary RemoteSessions that can be opened. The maximum number of RemoteSessions than can be opened Extends BMX functionality for easier development and debugging. Copied from Component Framework project IndianHealthService.Xo.Framework.Rpms BMXNetBroker implements low-level socket connectivity to RPMS databases. The VA RPC Broker must be running on the RPMS server in order for BMXNetBroker to connect. BMXNetBroker implements low-level socket connectivity to RPMS databases. The VA RPC Broker must be running on the RPMS server in order for BMXNetBroker to connect. Corresponds to M's $L(STRING,DELIMITER) Corresponds to M's $$Piece function Given strInput = "13" builds "013" if nLength = 3. Default for nLength is 3. Given strInput = "13" builds "013" if nLength = 3 Default for nLength is 3. Default = 3 Concatenates zero-padded length of sInput to sInput Given "Hello" returns "004Hello" If nSize = 5, returns "00004Hello" Default for nSize is 3. Concatenates zero-padded length of sInput to sInput Given "Hello" returns "004Hello" If nSize = 5, returns "00004Hello" Default for nSize is 3. Build protocol header Returns index of first instance of sSubString in sString. If sSubString not found, returns -1. The LocalSession is scoped to the client, whether EHR/VueCentric or a WinForm application. User management, patient/visit context, and local events are the key services. Components/controls that are programmed against this API will work within both the EhrFramework and WinFramework environments. Current Logging facility for BMXNet. This facility conforms to the EHR/VueCentric method of logging. Logging is either on or off, there is no scale from Info to Fatal to turn off and on. Logging is not heavily used in BMXNET40. In the EHR/VueCentric, the VIM.exe can be started on the command-line with the /trace option to see RPC calls. Call to send information to the log. A grouping of log entries A sub-grouping of log entries Lines of text to write to the log Call to send information to the log where an exception occured. A grouping of log entries A sub-grouping of log entries An exception to write to the log Lines of text to write to the log True if logging is currently enabled. It's recommend to turn logging off except for diagnositics. Create a new user object. Instances of user are used by Frameworks or for configuration/comparisons. Display name of the user IEN or DUZ of the User Currently set division of the user Simple uniform call for local notifications to the user when an exception occurs. API is not commonly used Title of the dialog Exception to be displayed Simple uniform call for local notifications to the user. API is not commonly used. Title of the dialog Message to be displayed Call to close the LocalSession which is the last action to take when shutdown down your application. In the EHR this call does nothing because each instance of BMX EhrFramework manages a single component within the greater EHR/VueCentric framework. In a WinForm application this call shuts down the WinFramework, closes all RemoteSessions, and closes the LocalSession and disconnects from RPMS. The current patient and visit context. The context object is access exclusively through the LocalSession and LocalSession events. The context can be obtained if your control or component is a LocalSessionConsumer and if so then define the Context property as follows: public Context Context { get { return this.LocalSession == null ? null : this.LocalSession.Context; } } Authenticated user associated with LocalSession If there are also RemoteSessions, the RemoteSessions will have the same User object this.StatusLabel.Text= aLocalSession.User == null ? "No user" : aLocalSession.User.Name; Access to the LocalSessions EventServices A provider of the BMX Ade encryption key BMXNET implementaiton of DbCommand. This class can be used like any ADO.NET DbCommand implementation or the suggested RemoteSession API's can be used. See ADO.NET documentation for details of this class. BMXNET implementaiton of DbDataAdaptor. This class can be used like any ADO.NET DbDataAdaptor implementation or the suggested RemoteSession API's can be used. See ADO.NET documentation for details of this class. The visit object is used to determine the current context of the application. The key wrinkle in the visit class relates to create a common interface for EHR/VueCentric and WinForm applications. The EHR/VueCentric supports visit stubs by default and the WinFramework does not. If the consumer of the visit object is going to use it to make changes to RPMS then the visit can not be a stub and must the visit must be created. In either EHR or WinForm applications, always check for a stub before you call RPC's to update RPMS. If you do not, the visit may not have been created on RPMS and the visit id will be null. if (this.Context.HasVisit) { if (this.Context.Visit.IsStub && !this.Context.Visit.Create()) { MessageBox.Show("Unable to establish visit.","Editing Disabled"); return; } //Call RPC to update RPMS with current visit ien } If the receiver is a stub, then call Create() to create a visit in RPMS and then new data can be added in the context of a created visit. In the WinForm edition, this all Visits are created to the method will do nothing yet you should call it to be consistent. True if the visit has been created (always True for WinForm) In the EHR some visits need user interaction to change from a stub to a created visit. This will be non-null if the visit has been created in RPMS, otherwise it is null and the receiver in considered a stub. Primary provider of the visit Hospital Location of the visit Official timetamp of the visit If a visit is transient in the client memory space, it is a stub. In the EHR visits are often created as stubs (Create New is not checked) Once data is entered, the visit is created. The WinForm only supports full created visits therefore IsStub is always false Answer true if a future appointment. If a visit can not be added to if it is locked. In the WinForm edition, all visits answered by BMX FIND VISIT are considered unlocked. The event args used by the RemoteEventService This string corresponds to well-known/shared EventTypes used to identify different events published and subscribed between BMX implementations using RemoteSessions. This is an optional peice of data with some event-specific details. BMXNET implementaiton of IDbTransaction. This class can be used like any ADO.NET IDbTransaction implementation or the suggested RemoteSession API's can be used. See ADO.NET documentation for details of this class. Note: idle session connections are really being terminated. We do not re-use BMXNetRemoteSession objects that wrap the session connection The Patient object is a read-only object used for patient context. The RPMS intenal entry number for the patient The RPMS HRN or chart number The default displayable version of the patient's name The current admission date of the user. This is a nullable bool for the cases that the patient is not currently admitted. The current age of the patient. If knownn, the DOB of the patient The displayable name (external value) of the patient's primary provider. The sex of the patient The patient's SSN or an abbrievation of the SSN This simple exception wrapper is used for Exceptions thrown by umknown sources and by the BMX library. Check the InnerException for details. BMXNET implementaiton of DbConnection. This class can be used like any ADO.NET DbConnection implementation or the suggested RemoteSession API's can be used. See ADO.NET documentation for details of this class. The user that established the connection to BMX either through the WinFramework dialogs or access/verify codes, or a user established through attach tho the EHR/VueCentric with the EhrFramework. The user breaks down into who is it and what can they do with some identify and security key checing. Check aKey against the active RPMS keys for the user. If the user has the PROGMODE key this method will always return true. The key name that is compared against the keys on the server Return true if the user has the key Fetch from RPMS the user's current keys. The user's division must be set before calling this metohd. Return a list of keys that the user does NOT have. If the user has all of the keys then an empty list is returned List<String> missingKeys=aUser.HasSecurityKeys(new string[] { "Key1","Key2" }); if (missingKeys.Count==0) { //Take a secured path } else { MessageBox.Show(missingKeys); } The HasSecurityKeys appraoch does not give those with PROGMODE a free-pass since it compares the actual keys. HasSecurityKeys uses RequestKeys a list of keys to compare against the user's keys A list of keys the user does not have, empty of the user has them all The DUZ aka IEN of the NEW Person File of this user A displayable name of the user The division that this user to currently operating within This interface is used on an UserControl-based components that are designed to work both inside the EHR and inside a WinForm application. The "Consumer" interfaces basically tell Frameworks that "Consumer" implementating objects need an specific service. If your component doesn't implement RemoteConsumer you can still user your component. Implementing RemoteConsumer is very common and is essential for communicating with the RPMS server. This property will be set with the primary RemoteSession that the interface implementer can use for communicating with the RPMS server. If also using a RemoteSessionPool, it's important to realize the if the primary RemoteSession that is set through this interface is closed then every session in the RemoteSessionPool is also clsoed as well as the broker connection to RPMS. Context interface provides the current status and related events of the patient/visit context within an application, or the EHR. Application developers use the WinFramework and ChangableContext to modify the context. Within the EHR/VueCentric framework, the Context interface is a basic wrapper of some of the EHR facilties. The most important aspect of the Context interface is the Changed event that allows the receiver of the event know when the user is changing patient and visit. Applications need to change the data displayed to represent the currnet Patient and optional visit. The Changed event occurs after there is confirmation that the change has not been vetoed or the veto has been overridden. See Changing event. Users of the Context object should hook the event ASAP. The public void Startup() { if (this.Context != null) { this.Context.Changed += new EventHandler<ContextChangedArgs>(Context_Changed); } The context can be obtained if your control or component is a LocalSessionConsumer and if so then define the Context property as follows: public Context Context { get { return this.LocalSession == null ? null : this.LocalSession.Context; } } When the current patient or visit is being changed by the user, every subscriber to the Changing method has the option to "Veto" the event by Cancelling it: public void Startup() { if (this.Context != null) { this.Context.Changed += new EventHandler<ContextChangedArgs>(Context_Changed); this.Context.Changing += new EventHandler<ContextChangedArgs>(Context_Changing); } void Context_Changing(object sender, ContextChangingArgs e) { e.Cancel = needToFinishSomethingElseBeforeChangingContext; } However, a Veto is like a U.S. presential Veto and that it can be overridden. The WinFramework or EHR can override any Veto so all components (even if they veto changes) must be prepared to have the context changed at anytime. The currently selected patient, or null. The value of the current patient is also in . The concept is that the context is set by external forces, ususally the user. Therefore there is no way to set the patient here. Remember to refresh your user interface based on the new selection to the information your application displays or edits is that same as the current context. The currently selected visit, or null. The value of the current visit is also in ContextChangedArgs. The concept is that the context is set by external forces, ususally the user. Therefore there is no way to set the visit here. In the EHR, a visit stub can be created. A visit stub does not create a visit in RPMS until some data is entered. IsVisit will return true for a visit stub but is it your responbilty to use HasUnlockedVisit or IsStub on the Visit to make sure you have a visit to edit with. Remember to refresh your user interface based on the new selection to the information your application displays or edits is that same as the current context. Answer true/false if there is a patient currently selected. This is a convenience method. Answer true/false if there is a patient currently selected. This is a convenience method. Answer true if there is a visit and if it is unlocked. The EHR/VueCentric has a notion of the locked visit, a visit that can no longer be visited. The EHR/VueCetnric has has a visit stub, a visit that has been create on the desktop but not in RPMS. If a visit is a visit stub, it is not considered unlocked. The user that established the connection to BMX either through the WinFramework dialogs or access/verify codes, or a user established through attach tho the EHR/VueCentric with the EhrFramework. Returns the array of RMPSResultSets retrieved from RPMS Sets and Returns the current recordset The event args for all DataTableFuture events. The DataTableFuture events are trigger in the non-UI thread and will break any application that is not managing it's UI calls properly. If implementing a basic GUI-based application, it's recommended to set the InvokedControl on every DataTableFuture you created. This EventArgs provides the future, which is the same instance created when the Async call was made. The future object that can be used to determine the state of the future, cancel the future, and perform some post future processing. This interface is used on an UserControl-based components that are designed to work both inside the EHR and inside a WinForm application. The "Consumer" interfaces basically tell Frameworks that "Consumer" implementating objects need an specific service. This interface is rarely used but is essential for application needing multiple server-side jobs. This property will be set with the RemoteSessionPool that is used by the Framework. If you only need one RemoteSession, the most common usage pattern, you do not need the RemoteSessionPoolConsumer and should use . The event args used by the LocalEventService. This string corresponds to well-known/shared EventTypes used to identify different events published and subscribed within a local desktop application (WinFramework) or in the EHR. The framewrk implements LocalSession.EventServices.RefreshRequested by sending or receiving the LocalEvent with the EventType=="REFRESH". The Well Child Module growth chart displays Height and Weight. When the EHR vitals component adds new Heights and Weights it publishes a LocalEvent with an EventType PCC*MSR. If the growth chart detects the Vitals update event it then refreshes the growth chart: void Session_ApplicationEvent(object sender, LocalEventArgs e) { if (this.IsVitalsUpdatedEvent(e)) { this.RefreshAll(); } } protected bool IsVitalsUpdatedEvent(LocalEventArgs anEvent) { return anEvent.EventType.StartsWith("PCC") && anEvent.EventType.EndsWith("MSR"); } This is an optional peice of data with some event-specific details. This interface is used on UserControl-based components which are designed to work both inside the EHR and inside a WinForm application. "Consumer" interfaces basically tell Frameworks that a "Consumer"-implementating object need a specific service, versus the service being queried. If your component doesn't implement LocalConsumer you can still have a user-control. However, implementing LocalConsumer is very common because of exclusive access to the patient/visit Context. This property is set with a LocalSession by the framework. The receiver uses it for Context, local Events, and other services. Access to local services are access through this interface. Subscribe to the local event named anEventName. To receive published events, handle the ApplicationEvent. If you explicity subscript to the "REFRESH" event then both RefreshRequested and ApplicationEvent will be triggers. The name of the event. This name should be shared and wellknown between many components. Checks to see there are any subscriptions for this event. If publishing an event, there is no need to first check if there are subscribers unless there is a performance hit for the application to Trigger the event. The name of the event checking to see if it's been subscribed already. Unscribe scribes from the event. It is not mandatory to unsubscribe from this event at the end of your object's lifecycle but you should either subsubscribe or remote the event handler. The name of the event unsubscribing from. To publish an event call TriggerEvent with the event name and optional details. There is no restriction on what local events that can be triggered. A "REFRESH" event can be broadcast as well as any other application specific or well-known loal event. The event name. This is normally a well-known event that multiple components used for event-driven communications. An arbitrary string containing event specific data This commonly broadcasted event is request to refresh content. In the EHR, this is equivalent to the "REFRESH" event. The WinFramework also uses "REFRESH" as the event name for triggering a refresh request. The following code from Well Child Module's Growth Chart shows registering for the Refresh event at startup: public void Startup() { this.LocalSession.EventServices.RefreshRequested += new EventHandler(Session_RefreshRequested); } void Session_RefreshRequested(object sender, EventArgs e) { this.RefreshAll(); } Local event subscribers will have this event triggered. The "REFRESH" event is filtered out and is triggered using the RefreshRequested event The Well Child Module growth chart displays Height and Weight. When the EHR vitals component adds new Heights and Weights it publishes a LocalEvent with an EventType PCC*MSR. If the growth chart detects the Vitals update event it then refreshes the growth chart: public void Startup() { this.LocalSession.EventServices.ApplicationEvent+= new EventHandler<LocalEventArgs>(Session_ApplicationEvent); } void Session_ApplicationEvent(object sender, LocalEventArgs e) { if (this.IsVitalsUpdatedEvent(e)) { this.RefreshAll(); } } protected bool IsVitalsUpdatedEvent(LocalEventArgs anEvent) { return anEvent.EventType.StartsWith("PCC") && anEvent.EventType.EndsWith("MSR"); } BMXNetBroker implements low-level socket connectivity to RPMS databases. The VA RPC Broker must be running on the RPMS server in order for BMXNetBroker to connect. Returns index of first instance of sSubString in sString. If sSubString not found, returns -1. Ping the server, will reset read-timeout Answer the #milliseconds to run or -1 if theres an issue Set and retrieve the timeout, in milliseconds, to receive a response from the RPMS server. If the retrieve time exceeds the timeout, an exception will be thrown and the connection will be closed. The default is 30 seconds. BMXNET implementaiton of IDataReader. This class can be used like any ADO.NET IDataReader implementation or the suggested RemoteSession API's can be used. See ADO.NET documentation for details of this class.