BMXNET 4.0 Developer API

Context interface provides the current status and related events of the patient/visit context within an application, or the EHR.

Namespace:  IndianHealthService.BMXNet.Model
Assembly:  BMXNET40 (in BMXNET40.dll)

Syntax

         
 C#  Visual Basic  Visual C++ 
public interface Context
Public Interface Context
public interface class Context

Members

         
 All Members  Properties   Events  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Changed
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.
Changing
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:
Copy Code
            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.
HasPatient
Answer true/false if there is a patient currently selected. This is a convenience method.
HasUnlockedVisit
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.
HasVisit
Answer true/false if there is a patient currently selected. This is a convenience method.
Patient
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.
User
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.
Visit
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.

Remarks

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.

See Also