| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Text;
|
|---|
| 4 |
|
|---|
| 5 | namespace IndianHealthService.BMXNet.Model
|
|---|
| 6 | {
|
|---|
| 7 | /// <summary>
|
|---|
| 8 | /// The visit object is used to determine the current context of the application. The key wrinkle in the visit
|
|---|
| 9 | /// class relates to create a common interface for EHR/VueCentric and WinForm applications. The EHR/VueCentric supports
|
|---|
| 10 | /// visit stubs by default and the WinFramework does not. If the consumer of the visit object is going to use
|
|---|
| 11 | /// it to make changes to RPMS then the visit can not be a stub and must the visit must be created.
|
|---|
| 12 | /// <example>
|
|---|
| 13 | /// In either EHR or WinForm applications, always check for a stub before you call RPC's to update RPMS. If you
|
|---|
| 14 | /// do not, the visit may not have been created on RPMS and the visit id will be null.
|
|---|
| 15 | /// <code>
|
|---|
| 16 | /// if (this.Context.HasVisit)
|
|---|
| 17 | /// {
|
|---|
| 18 | /// if (this.Context.Visit.IsStub && !this.Context.Visit.Create())
|
|---|
| 19 | /// {
|
|---|
| 20 | /// MessageBox.Show("Unable to establish visit.","Editing Disabled");
|
|---|
| 21 | /// return;
|
|---|
| 22 | /// }
|
|---|
| 23 | ///
|
|---|
| 24 | /// //Call RPC to update RPMS with current visit ien
|
|---|
| 25 | /// }
|
|---|
| 26 | /// </code>
|
|---|
| 27 | /// </example>
|
|---|
| 28 | /// </summary>
|
|---|
| 29 | public interface Visit
|
|---|
| 30 | {
|
|---|
| 31 | /// <summary>
|
|---|
| 32 | /// This will be non-null if the visit has been created in RPMS, otherwise
|
|---|
| 33 | /// it is null and the receiver in considered a stub.
|
|---|
| 34 | /// </summary>
|
|---|
| 35 | String Ien { get; }
|
|---|
| 36 |
|
|---|
| 37 | /// <summary>
|
|---|
| 38 | /// Primary provider of the visit
|
|---|
| 39 | /// </summary>
|
|---|
| 40 | String ProviderName { get; }
|
|---|
| 41 |
|
|---|
| 42 | /// <summary>
|
|---|
| 43 | /// Hospital Location of the visit
|
|---|
| 44 | /// </summary>
|
|---|
| 45 | String LocationName { get; }
|
|---|
| 46 |
|
|---|
| 47 | /// <summary>
|
|---|
| 48 | /// Official timetamp of the visit
|
|---|
| 49 | /// </summary>
|
|---|
| 50 | DateTime DateTime { get; }
|
|---|
| 51 |
|
|---|
| 52 | /// <summary>
|
|---|
| 53 | /// If a visit is transient in the client memory space, it is a stub.
|
|---|
| 54 | /// In the EHR visits are often created as stubs (Create New is not checked)
|
|---|
| 55 | /// Once data is entered, the visit is created.
|
|---|
| 56 | /// The WinForm only supports full created visits therefore IsStub is always false
|
|---|
| 57 | /// </summary>
|
|---|
| 58 | bool IsStub { get; }
|
|---|
| 59 | /// <summary>
|
|---|
| 60 | /// Answer true if a future appointment.
|
|---|
| 61 | /// </summary>
|
|---|
| 62 | bool IsFutureAppointment { get; }
|
|---|
| 63 |
|
|---|
| 64 | /// <summary>
|
|---|
| 65 | /// If the receiver is a stub, then call Create() to create a visit in RPMS and
|
|---|
| 66 | /// then new data can be added in the context of a created visit. In the WinForm
|
|---|
| 67 | /// edition, this all Visits are created to the method will do nothing yet you should
|
|---|
| 68 | /// call it to be consistent.
|
|---|
| 69 | /// </summary>
|
|---|
| 70 | /// <returns>True if the visit has been created (always True for WinForm)</returns>
|
|---|
| 71 | bool Create();
|
|---|
| 72 | /// <summary>
|
|---|
| 73 | /// In the EHR some visits need user interaction to change from a stub to a created visit.
|
|---|
| 74 | /// </summary>
|
|---|
| 75 | /// <param name="showGuiToCreateVisit"></param>
|
|---|
| 76 | /// <returns></returns>
|
|---|
| 77 | bool Create(bool showGuiToCreateVisit);
|
|---|
| 78 |
|
|---|
| 79 | /// <summary>
|
|---|
| 80 | /// If a visit can not be added to if it is locked. In the WinForm edition, all
|
|---|
| 81 | /// visits answered by BMX FIND VISIT are considered unlocked.
|
|---|
| 82 | /// </summary>
|
|---|
| 83 | bool IsLocked { get;}
|
|---|
| 84 | }
|
|---|
| 85 | }
|
|---|