Inheritance: PersonTO
Esempio n. 1
0
 public VisitTO(Visit mdo)
 {
     this.id = mdo.Id;
     this.type = mdo.Type;
     if (mdo.Patient != null)
     {
         this.patient = new PatientTO(mdo.Patient);
     }
     if (mdo.Attending != null)
     {
         this.attending = new UserTO(mdo.Attending);
     }
     if (mdo.Provider != null)
     {
         this.provider = new UserTO(mdo.Provider);
     }
     this.service = mdo.Service;
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     this.patientType = mdo.PatientType;
     this.visitId = mdo.VisitId;
     this.timestamp = mdo.Timestamp;
     this.status = mdo.Status;
 }
Esempio n. 2
0
 public VisitTO(Visit mdo)
 {
     this.id   = mdo.Id;
     this.type = mdo.Type;
     if (mdo.Patient != null)
     {
         this.patient = new PatientTO(mdo.Patient);
     }
     if (mdo.Attending != null)
     {
         this.attending = new UserTO(mdo.Attending);
     }
     if (mdo.Provider != null)
     {
         this.provider = new UserTO(mdo.Provider);
     }
     this.service = mdo.Service;
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     this.patientType = mdo.PatientType;
     this.visitId     = mdo.VisitId;
     this.timestamp   = mdo.Timestamp;
     this.status      = mdo.Status;
 }
Esempio n. 3
0
 public InpatientStayTO(InpatientStay mdo)
 {
     if (mdo.Patient != null)
     {
         this.patient = new PatientTO(mdo.Patient);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     this.admitTimestamp     = mdo.AdmitTimestamp;
     this.dischargeTimestamp = mdo.DischargeTimestamp;
     if (mdo.DischargeDiagnoses != null)
     {
         this.dischargeDiagnoses = new DischargeDiagnosesTO(mdo.DischargeDiagnoses);
     }
     this.type = mdo.Type;
     if (mdo.Adts != null && mdo.Adts.Length > 0)
     {
         this.adts = new AdtTO[mdo.Adts.Length];
         for (int i = 0; i < mdo.Adts.Length; i++)
         {
             this.adts[i] = new AdtTO(mdo.Adts[i]);
         }
     }
     this.movementCheckinId = mdo.MovementCheckinId;
 }
Esempio n. 4
0
 public InpatientStayTO(InpatientStay mdo)
 {
     if (mdo.Patient != null)
     {
         this.patient = new PatientTO(mdo.Patient);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     this.admitTimestamp = mdo.AdmitTimestamp;
     this.dischargeTimestamp = mdo.DischargeTimestamp;
     if (mdo.DischargeDiagnoses != null)
     {
         this.dischargeDiagnoses = new DischargeDiagnosesTO(mdo.DischargeDiagnoses);
     }
     this.type = mdo.Type;
     if (mdo.Adts != null && mdo.Adts.Length > 0)
     {
         this.adts = new AdtTO[mdo.Adts.Length];
         for (int i = 0; i < mdo.Adts.Length; i++)
         {
             this.adts[i] = new AdtTO(mdo.Adts[i]);
         }
     }
     this.movementCheckinId = mdo.MovementCheckinId;
 }
Esempio n. 5
0
        public VisitTO(Visit mdo)
        {
            if (mdo == null)
            {
                return;
            }
            this.id   = mdo.Id;
            this.type = mdo.Type;
            if (mdo.Patient != null)
            {
                this.patient = new PatientTO(mdo.Patient);
            }
            if (mdo.Attending != null)
            {
                this.attending = new UserTO(mdo.Attending);
            }
            if (mdo.Provider != null)
            {
                this.provider = new UserTO(mdo.Provider);
            }
            this.service = mdo.Service;
            if (mdo.Location != null)
            {
                this.location = new HospitalLocationTO(mdo.Location);
            }
            this.patientType = mdo.PatientType;
            this.visitId     = mdo.VisitId;
            this.timestamp   = mdo.Timestamp;
            this.status      = mdo.Status;

            if (mdo.Facility != null)
            {
                facility = new SiteTO(new Site(mdo.Facility.Id, mdo.Facility.Name));
            }
        }
Esempio n. 6
0
 public AdtTO(Adt mdo)
 {
     if (mdo == null)
     {
         return;
     }
     this.id         = mdo.Id;
     this.patient    = new PatientTO(mdo.Patient);
     this.checkInId  = mdo.CheckInId;
     this.checkOutId = mdo.CheckOutId;
     this.relatedPhysicalMovementId = mdo.RelatedPhysicalMovementId;
     this.transaction            = mdo.Transaction;
     this.movementType           = mdo.MovementType;
     this.timestamp              = mdo.Timestamp.ToString("yyyyMMdd.HHmmss");
     this.diagnosis              = mdo.Diagnosis;
     this.assignedLocation       = new HospitalLocationTO(mdo.AssignedLocation);
     this.provider               = new UserTO(mdo.Provider);
     this.attending              = new UserTO(mdo.Attending);
     this.transferFacility       = mdo.TransferFacility;
     this.specialty              = new TaggedText(mdo.Specialty);
     this.patientTxId            = mdo.PatientTxId;
     this.visitId                = mdo.VisitId;
     this.patientMovementNumber  = mdo.PatientMovementNumber;
     this.nextPatientMovement    = mdo.NextPatientMovement;
     this.enteredBy              = new UserTO(mdo.EnteredBy);
     this.lengthOfStay           = mdo.LengthOfStay;
     this.passDays               = mdo.PassDays;
     this.daysAbsent             = mdo.DaysAbsent;
     this.asihAdmission          = new TaggedText(mdo.AsihAdmission);
     this.asihTransfer           = mdo.AsihTransfer;
     this.asihSequence           = mdo.AsihSequence;
     this.asihDays               = mdo.AsihDays;
     this.absenceReturnDate      = mdo.AbsenceReturnDate.ToString("yyyyMMdd.HHmmss");
     this.admittedForScCondition = mdo.AdmittedForScCondition;
     this.scheduledAdmission     = mdo.ScheduledAdmission;
     this.admissionSource        = mdo.AdmissionSource;
     this.admittingCategory      = mdo.AdmittingCategory;
     this.admittingRegulation    = new TaggedText(mdo.AdmittingRegulation);
     this.admittingEligibility   = new TaggedText(mdo.AdmittingEligibility);
     this.masMovementType        = new TaggedText(mdo.MasMovementType);
     this.lodgingReason          = mdo.LodgingReason;
     this.lodgingComments        = mdo.LodgingComments;
     this.disposition            = mdo.Disposition;
     this.eligibility            = mdo.Eligibility;
     this.preAdmitId             = mdo.PreAdmitId;
     this.referring              = new UserTO(mdo.Referring);
     this.consulting             = new UserTO(mdo.Consulting);
     this.admitting              = new UserTO(mdo.Admitting);
     this.service                = new TaggedText(mdo.Service);
     this.priorLocation          = new HospitalLocationTO(mdo.PriorLocation);
     this.temporaryLocation      = new HospitalLocationTO(mdo.TemporaryLocation);
     this.pendingLocation        = new HospitalLocationTO(mdo.PendingLocation);
     this.patientType            = mdo.PatientType;
     this.admitTimestamp         = mdo.AdmitTimestamp.ToString("yyyyMMdd.HHmmss");
     this.dischargeTimestamp     = mdo.DischargeTimestamp.ToString("yyyyMMdd.HHmmss");
     this.admitReason            = mdo.AdmitReason;
     this.transferReason         = mdo.TransferReason;
 }
        public PatientMedicalRecordTO(IndexedHashtable ihs)
        {
            initCollections();

            if (ihs == null || ihs.Count == 0)
            {
                return;
            }

            for (int i = 0; i < ihs.Count; i++)
            {
                object key = ihs.GetKey(i);

                if (!(key is string))
                {
                    continue;
                }

                string sitecode = key as string;

                if (!(ihs.GetValue(i) is Hashtable))
                {
                    continue;
                }

                Hashtable domains = ihs.GetValue(i) as Hashtable;

                Meds.add(sitecode, domains["meds"] as IList <Medication>);
                Patient = new PatientTO(domains["demographics"] as Patient);
                Allergies.add(sitecode, domains["reactions"] as IList <Allergy>);
                Notes.add(sitecode, domains["documents"] as IList <Note>);
                Problems.add(sitecode, domains["problems"] as IList <Problem>);
                Appointments.add(sitecode, domains["appointments"] as IList <Appointment>);
                ChemHemReports.add(sitecode, domains["labs"] as IList <LabReport>);

                IList <HealthSummary> healthSummaries = domains["healthFactors"] as IList <HealthSummary>;



                // TODO - implement the remaining hashtable keys
                //results.Add("healthFactors", healthSummaries);
                //results.Add("flags", flags);
                //results.Add("consults", consults);
                //results.Add("procedures", null);
                //results.Add("visits", visits);
                //results.Add("appointments", appointments);
                //results.Add("problems", problems);
                //results.Add("vitals", vitals);
                //results.Add("labs", labs);
                //results.Add("immunizations", null);
            }
        }
Esempio n. 8
0
 private void setProps(Patient[] mdo)
 {
     if (mdo == null)
     {
         return;
     }
     patients = new PatientTO[mdo.Length];
     for (int i = 0; i < mdo.Length; i++)
     {
         patients[i] = new PatientTO(mdo[i]);
     }
     count = mdo.Length;
 }
Esempio n. 9
0
 private void setProps(Patient[] mdo)
 {
     if (mdo == null)
     {
         return;
     }
     patients = new PatientTO[mdo.Length];
     for (int i = 0; i < mdo.Length; i++)
     {
         patients[i] = new PatientTO(mdo[i]);
     }
     count = mdo.Length;
 }
Esempio n. 10
0
        public PatientMedicalRecordTO(IndexedHashtable ihs)
        {
            initCollections();

            if (ihs == null || ihs.Count == 0)
            {
                return;
            }

            for (int i = 0; i < ihs.Count; i++)
            {
                object key = ihs.GetKey(i);

                if (!(key is string))
                {
                    continue;
                }

                string sitecode = key as string;

                if (!(ihs.GetValue(i) is Hashtable))
                {
                    continue;
                }

                Hashtable domains = ihs.GetValue(i) as Hashtable;

                Meds.add(sitecode, domains["meds"] as IList<Medication>);
                Patient = new PatientTO(domains["demographics"] as Patient);
                Allergies.add(sitecode, domains["reactions"] as IList<Allergy>);
                Notes.add(sitecode, domains["documents"] as IList<Note>);
                Problems.add(sitecode, domains["problems"] as IList<Problem>);
                Appointments.add(sitecode, domains["appointments"] as IList<Appointment>);
                ChemHemReports.add(sitecode, domains["labs"] as IList<LabReport>);

                IList<HealthSummary> healthSummaries = domains["healthFactors"] as IList<HealthSummary>;

                // TODO - implement the remaining hashtable keys
                //results.Add("healthFactors", healthSummaries);
                //results.Add("flags", flags);
                //results.Add("consults", consults);
                //results.Add("procedures", null);
                //results.Add("visits", visits);
                //results.Add("appointments", appointments);
                //results.Add("problems", problems);
                //results.Add("vitals", vitals);
                //results.Add("labs", labs);
                //results.Add("immunizations", null);
            }
        }
Esempio n. 11
0
 private void initCollections()
 {
     ContinuityOfCareDocuments = new TaggedTextArray();
     Patient          = new PatientTO();
     Meds             = new TaggedMedicationArrays();
     Allergies        = new TaggedAllergyArrays();
     Appointments     = new TaggedAppointmentArrays();
     Notes            = new TaggedNoteArrays();
     ChemHemReports   = new TaggedChemHemRptArrays();
     MicroReports     = new TaggedMicrobiologyRptArrays();
     Problems         = new TaggedProblemArrays();
     RadiologyReports = new TaggedRadiologyReportArrays();
     SurgeryReports   = new TaggedSurgeryReportArrays();
     Vitals           = new TaggedVitalSignArrays();
 }
Esempio n. 12
0
 public PatientArray(SortedList lst)
 {
     if (lst == null || lst.Count == 0)
     {
         count = 0;
         return;
     }
     patients = new PatientTO[lst.Count];
     IDictionaryEnumerator e = lst.GetEnumerator();
     int i = 0;
     while (e.MoveNext())
     {
         patients[i++] = new PatientTO((Patient)e.Value);
     }
     count = lst.Count;
 }
Esempio n. 13
0
        public PatientArray(SortedList lst)
        {
            if (lst == null || lst.Count == 0)
            {
                count = 0;
                return;
            }
            patients = new PatientTO[lst.Count];
            IDictionaryEnumerator e = lst.GetEnumerator();
            int i = 0;

            while (e.MoveNext())
            {
                patients[i++] = new PatientTO((Patient)e.Value);
            }
            count = lst.Count;
        }
Esempio n. 14
0
        public TaggedPatientArrays getPatientsWithUpdatedChemHemReports(string username, string pwd, string fromDate)
        {
            TaggedPatientArrays result = new TaggedPatientArrays();
            //if (String.IsNullOrEmpty(username) | String.IsNullOrEmpty(pwd) | String.IsNullOrEmpty(fromDate))
            //{
            //    result.fault = new FaultTO("Must supply all arguments");
            //}
            try
            {
                LabsApi api = new LabsApi();
                DataSource ds = new DataSource { ConnectionString = mySession.MdwsConfiguration.CdwConnectionString };
                AbstractConnection cxn = new gov.va.medora.mdo.dao.sql.cdw.CdwConnection(ds);
                Dictionary<string, HashSet<string>> dict = api.getUpdatedChemHemReports(cxn, DateTime.Parse(fromDate));
                result.arrays = new TaggedPatientArray[dict.Keys.Count];
                int arrayCount = 0;

                foreach (string key in dict.Keys)
                {
                    TaggedPatientArray tpa = new TaggedPatientArray(key);
                    tpa.patients = new PatientTO[dict[key].Count];
                    int patientCount = 0;
                    foreach (string patientICN in dict[key])
                    {
                        PatientTO p = new PatientTO { mpiPid = patientICN };
                        tpa.patients[patientCount] = p;
                        patientCount++;
                    }
                    result.arrays[arrayCount] = tpa;
                    arrayCount++;
                }
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }
Esempio n. 15
0
 public UserPatientTO(User user, Patient patient)
 {
     this.user = new UserTO(user);
     this.patient = new PatientTO(patient);
 }
Esempio n. 16
0
 public UserPatientTO(UserTO userTO, PatientTO patientTO)
 {
     this.user = userTO;
     this.patient = patientTO;
 }
Esempio n. 17
0
 public UserPatientTO(UserTO userTO, PatientTO patientTO)
 {
     this.user    = userTO;
     this.patient = patientTO;
 }
Esempio n. 18
0
 public UserPatientTO(User user, Patient patient)
 {
     this.user    = new UserTO(user);
     this.patient = new PatientTO(patient);
 }
Esempio n. 19
0
 public PersonsTO(UserTO user, PatientTO patient)
 {
     this.user = user;
     this.patient = patient;
 }
Esempio n. 20
0
        public PatientTO getDemographics()
        {
            PatientTO result = new PatientTO();

            string msg = MdwsUtils.isAuthorizedConnection(mySession);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (String.IsNullOrEmpty(mySession.ConnectionSet.BaseConnection.Pid) || mySession.Patient == null)
            {
                result.fault = new FaultTO("Need to select patient");
            }
            if (result.fault != null)
            {
                return result;
            }
            try
            {
                result = new PatientTO(getHomeData(mySession.Patient));
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }
Esempio n. 21
0
        public PatientTO select(string sitecode, string localPid)
        {
            PatientTO result = new PatientTO();
            string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (String.IsNullOrEmpty(localPid))
            {
                result.fault = new FaultTO("Missing local PID");
            }
            if (result.fault != null)
            {
                return result;
            }

            if (String.IsNullOrEmpty(sitecode))
            {
                sitecode = mySession.ConnectionSet.BaseSiteId;
            }

            try
            {
                AbstractConnection cxn = mySession.ConnectionSet.getConnection(sitecode);
                PatientApi api = new PatientApi();
                Patient p = api.select(cxn, localPid);
                result = new PatientTO(p);
                mySession.Patient = p;
                mySession.ConnectionSet.getConnection(sitecode).Pid = result.localPid;
                if (p.Confidentiality.Key > 0)
                {
                    if (p.Confidentiality.Key == 1)
                    {
                        // do nothing here - M code takes care of this per documentation
                    }
                    else if (p.Confidentiality.Key == 2)
                    {
                        api.issueConfidentialityBulletin(mySession.ConnectionSet);
                    }
                    else if (p.Confidentiality.Key > 2)
                    {
                        mySession.ConnectionSet.disconnectAll();
                        throw new ApplicationException(p.Confidentiality.Value);
                    }
                }
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }
Esempio n. 22
0
 public PersonsTO(UserTO user, PatientTO patient)
 {
     this.user    = user;
     this.patient = patient;
 }
Esempio n. 23
0
File: AdtTO.cs Progetto: OSEHRA/mdws
 public AdtTO(Adt mdo)
 {
     if (mdo == null)
     {
         return;
     }
     this.id = mdo.Id;
     this.patient = new PatientTO(mdo.Patient);
     this.checkInId = mdo.CheckInId;
     this.checkOutId = mdo.CheckOutId;
     this.relatedPhysicalMovementId = mdo.RelatedPhysicalMovementId;
     this.transaction = mdo.Transaction;
     this.movementType = mdo.MovementType;
     this.timestamp = mdo.Timestamp.ToString("yyyyMMdd.HHmmss");
     this.diagnosis = mdo.Diagnosis;
     this.assignedLocation = new HospitalLocationTO(mdo.AssignedLocation);
     this.provider = new UserTO(mdo.Provider);
     this.attending = new UserTO(mdo.Attending);
     this.transferFacility = mdo.TransferFacility;
     this.specialty = new TaggedText(mdo.Specialty);
     this.patientTxId = mdo.PatientTxId;
     this.visitId = mdo.VisitId;
     this.patientMovementNumber = mdo.PatientMovementNumber;
     this.nextPatientMovement = mdo.NextPatientMovement;
     this.enteredBy = new UserTO(mdo.EnteredBy);
     this.lengthOfStay = mdo.LengthOfStay;
     this.passDays = mdo.PassDays;
     this.daysAbsent = mdo.DaysAbsent;
     this.asihAdmission = new TaggedText(mdo.AsihAdmission);
     this.asihTransfer = mdo.AsihTransfer;
     this.asihSequence = mdo.AsihSequence;
     this.asihDays = mdo.AsihDays;
     this.absenceReturnDate = mdo.AbsenceReturnDate.ToString("yyyyMMdd.HHmmss");
     this.admittedForScCondition = mdo.AdmittedForScCondition;
     this.scheduledAdmission = mdo.ScheduledAdmission;
     this.admissionSource = mdo.AdmissionSource;
     this.admittingCategory = mdo.AdmittingCategory;
     this.admittingRegulation = new TaggedText(mdo.AdmittingRegulation);
     this.admittingEligibility = new TaggedText(mdo.AdmittingEligibility);
     this.masMovementType = new TaggedText(mdo.MasMovementType);
     this.lodgingReason = mdo.LodgingReason;
     this.lodgingComments = mdo.LodgingComments;
     this.disposition = mdo.Disposition;
     this.eligibility = mdo.Eligibility;
     this.preAdmitId = mdo.PreAdmitId;
     this.referring = new UserTO(mdo.Referring);
     this.consulting = new UserTO(mdo.Consulting);
     this.admitting = new UserTO(mdo.Admitting);
     this.service = new TaggedText(mdo.Service);
     this.priorLocation = new HospitalLocationTO(mdo.PriorLocation);
     this.temporaryLocation = new HospitalLocationTO(mdo.TemporaryLocation);
     this.pendingLocation = new HospitalLocationTO(mdo.PendingLocation);
     this.patientType = mdo.PatientType;
     this.admitTimestamp = mdo.AdmitTimestamp.ToString("yyyyMMdd.HHmmss");
     this.dischargeTimestamp = mdo.DischargeTimestamp.ToString("yyyyMMdd.HHmmss");
     this.admitReason = mdo.AdmitReason;
     this.transferReason = mdo.TransferReason;
 }
Esempio n. 24
0
 private void initCollections()
 {
     ContinuityOfCareDocuments = new TaggedTextArray();
     Patient = new PatientTO();
     Meds = new TaggedMedicationArrays();
     Allergies = new TaggedAllergyArrays();
     Appointments = new TaggedAppointmentArrays();
     Notes = new TaggedNoteArrays();
     ChemHemReports = new TaggedChemHemRptArrays();
     MicroReports = new TaggedMicrobiologyRptArrays();
     Problems = new TaggedProblemArrays();
     RadiologyReports = new TaggedRadiologyReportArrays();
     SurgeryReports = new TaggedSurgeryReportArrays();
     Vitals = new TaggedVitalSignArrays();
 }