[1146] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Text;
|
---|
| 4 | using IndianHealthService.BMXNet.Model;
|
---|
| 5 | using System.Windows.Forms;
|
---|
| 6 |
|
---|
| 7 | namespace IndianHealthService.BMXNet.EHR.Model
|
---|
| 8 | {
|
---|
| 9 | internal class CiaPatient : CiaObject, Patient,IDisposable
|
---|
| 10 | {
|
---|
| 11 |
|
---|
| 12 | public static CiaPatient FindCurrent(CiaSession aSession)
|
---|
| 13 | {
|
---|
| 14 | CiaPatient answer = new CiaPatient();
|
---|
| 15 |
|
---|
| 16 | if (aSession.CssPatient.Handle == 0)
|
---|
| 17 | {
|
---|
| 18 | return null;
|
---|
| 19 | }
|
---|
| 20 | else
|
---|
| 21 | {
|
---|
| 22 | answer.Ien = aSession.CssPatient.Handle.ToString();
|
---|
| 23 | answer.PatientName = aSession.CssPatient.Name;
|
---|
| 24 | answer.Sex = aSession.CssPatient.Sex;
|
---|
| 25 | answer.HealthRecordNumber = aSession.CssPatient.HRN;
|
---|
| 26 |
|
---|
| 27 | try
|
---|
| 28 | {
|
---|
| 29 | answer.Dob = aSession.CssPatient.DOB;
|
---|
| 30 | }
|
---|
| 31 | catch
|
---|
| 32 | {
|
---|
| 33 | answer.Dob = null;
|
---|
| 34 | }
|
---|
| 35 | try
|
---|
| 36 | {
|
---|
| 37 | answer.AdmitDate = aSession.CssPatient.AdmitDate;
|
---|
| 38 | }
|
---|
| 39 | catch
|
---|
| 40 | {
|
---|
| 41 | answer.AdmitDate = null;
|
---|
| 42 | }
|
---|
| 43 | answer.Age = aSession.CssPatient.Age;
|
---|
| 44 | answer.Ssn = aSession.CssPatient.SSN;
|
---|
| 45 |
|
---|
| 46 | return answer;
|
---|
| 47 | }
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | #region IDisposable Members
|
---|
| 51 |
|
---|
| 52 | public void Dispose()
|
---|
| 53 | {
|
---|
| 54 |
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | #endregion
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 | private String _patientName;
|
---|
| 61 |
|
---|
| 62 | public String PatientName
|
---|
| 63 | {
|
---|
| 64 | get { return _patientName; }
|
---|
| 65 | set { _patientName = value; }
|
---|
| 66 | }
|
---|
| 67 |
|
---|
| 68 | private DateTime? _admitDate;
|
---|
| 69 |
|
---|
| 70 | public DateTime? AdmitDate
|
---|
| 71 | {
|
---|
| 72 | get { return _admitDate; }
|
---|
| 73 | set { _admitDate = value; }
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | private String _healthRecordNumber = "";
|
---|
| 78 |
|
---|
| 79 | public String HealthRecordNumber
|
---|
| 80 | {
|
---|
| 81 | get { return _healthRecordNumber; }
|
---|
| 82 | set { _healthRecordNumber = value; }
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | private float _age;
|
---|
| 86 |
|
---|
| 87 | public float Age
|
---|
| 88 | {
|
---|
| 89 | get { return _age; }
|
---|
| 90 | set { _age = value; }
|
---|
| 91 | }
|
---|
| 92 | private DateTime? _dob;
|
---|
| 93 |
|
---|
| 94 | public DateTime? Dob
|
---|
| 95 | {
|
---|
| 96 | get { return _dob; }
|
---|
| 97 | set { _dob = value; }
|
---|
| 98 | }
|
---|
| 99 | private String _primaryProvider;
|
---|
| 100 |
|
---|
| 101 | public String PrimaryProvider
|
---|
| 102 | {
|
---|
| 103 | get { return _primaryProvider; }
|
---|
| 104 | set { _primaryProvider = value; }
|
---|
| 105 | }
|
---|
| 106 | private String _sex;
|
---|
| 107 |
|
---|
| 108 | public String Sex
|
---|
| 109 | {
|
---|
| 110 | get { return _sex; }
|
---|
| 111 | set { _sex = value; }
|
---|
| 112 | }
|
---|
| 113 | private String _ssn;
|
---|
| 114 |
|
---|
| 115 | public String Ssn
|
---|
| 116 | {
|
---|
| 117 | get { return _ssn; }
|
---|
| 118 | set { _ssn = value; }
|
---|
| 119 | }
|
---|
| 120 |
|
---|
| 121 |
|
---|
| 122 | public String DebugString()
|
---|
| 123 | {
|
---|
| 124 | StringBuilder info = new StringBuilder();
|
---|
| 125 |
|
---|
| 126 | info.Append(this.PatientName);
|
---|
| 127 | info.Append(", ");
|
---|
| 128 | info.Append(this.Dob.HasValue ? this.Dob.Value.ToShortDateString() : "");
|
---|
| 129 |
|
---|
| 130 | return info.ToString();
|
---|
| 131 | }
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 | }
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 | /* Notes
|
---|
| 138 |
|
---|
| 139 | this.CssPatient.AdmitDate
|
---|
| 140 | this.CssPatient.Age
|
---|
| 141 | this.CssPatient.DOB
|
---|
| 142 | this.CssPatient.Detail
|
---|
| 143 | this.CssPatient.DOD
|
---|
| 144 | this.CssPatient.HRN
|
---|
| 145 | this.CssPatient.ICN
|
---|
| 146 | this.CssPatient.Location
|
---|
| 147 | this.CssPatient.LocationName
|
---|
| 148 | this.CssPatient.PrimaryProvider
|
---|
| 149 | this.CssPatient.PrimaryTeam
|
---|
| 150 | this.CssPatient.RoomBed
|
---|
| 151 | this.CssPatient.Sex
|
---|
| 152 | this.CssPatient.SSN
|
---|
| 153 | */
|
---|