Exemple #1
0
        public HospitalLocationTO getClinicSchedulingDetails(string clinicId)
        {
            HospitalLocationTO result = new HospitalLocationTO();

            if (!_mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (String.IsNullOrEmpty(clinicId))
            {
                result.fault = new FaultTO("Missing clinic ID");
            }

            if (result.fault != null)
            {
                return result;
            }

            try
            {
                result = new HospitalLocationTO(new EncounterApi().getClinicSchedulingDetails(_mySession.ConnectionSet.BaseConnection, clinicId));
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }

            return result;
        }
Exemple #2
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;
 }
Exemple #3
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));
            }
        }
Exemple #4
0
 public ObservationTO(Observation mdo)
 {
     if (mdo == null)
     {
         return;
     }
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
 }
Exemple #5
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;
 }
Exemple #6
0
 public VitalSignTO(VitalSign mdo)
 {
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment    = mdo.Comment;
     this.value1     = mdo.Value1;
     this.value2     = mdo.Value2;
     this.units      = mdo.Units;
     this.qualifiers = mdo.Qualifiers;
 }
Exemple #7
0
 public AppointmentTO(Appointment mdo)
 {
     this.id = mdo.Id;
     this.timestamp = mdo.Timestamp;
     this.title = mdo.Title;
     this.status = mdo.Status;
     this.text = mdo.Text;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Clinic != null)
     {
         this.clinic = new HospitalLocationTO(mdo.Clinic);
         if (mdo.Clinic.Facility != null)
         {
             this.clinic.facility = new SiteTO();
             this.clinic.facility.name = mdo.Clinic.Facility.Name;
         }
     }
     this.labDateTime = mdo.LabDateTime;
     this.xrayDateTime = mdo.XrayDateTime;
     this.ekgDateTime = mdo.EkgDateTime;
     this.purpose = mdo.Purpose;
     this.type = mdo.Type;
     this.currentStatus = mdo.CurrentStatus;
 }
Exemple #8
0
 public VitalSignTO(VitalSign mdo)
 {
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
     this.value1 = mdo.Value1;
     this.value2 = mdo.Value2;
     this.units = mdo.Units;
     this.qualifiers = mdo.Qualifiers;
 }
 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;
 }
Exemple #10
0
 public AppointmentTO(Appointment mdo)
 {
     this.id           = mdo.Id;
     this.timestamp    = mdo.Timestamp;
     this.title        = mdo.Title;
     this.status       = mdo.Status;
     this.text         = mdo.Text;
     this.visitId      = mdo.VisitId;
     this.providerName = mdo.ProviderName;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Clinic != null)
     {
         this.clinic = new HospitalLocationTO(mdo.Clinic);
         if (mdo.Clinic.Facility != null)
         {
             this.clinic.facility      = new SiteTO();
             this.clinic.facility.name = mdo.Clinic.Facility.Name;
         }
     }
     this.labDateTime   = mdo.LabDateTime;
     this.xrayDateTime  = mdo.XrayDateTime;
     this.ekgDateTime   = mdo.EkgDateTime;
     this.purpose       = mdo.Purpose;
     this.type          = mdo.Type;
     this.currentStatus = mdo.CurrentStatus;
 }
Exemple #11
0
 public ObservationTO(Observation mdo)
 {
     if (mdo == null)
     {
         return;
     }
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
 }
Exemple #12
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;
 }
Exemple #13
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;
 }
Exemple #14
0
 public AllergyTO(Allergy mdo)
 {
     this.allergenId   = mdo.AllergenId;
     this.allergenName = mdo.AllergenName;
     this.allergenType = mdo.AllergenType;
     if (mdo.Reactions != null)
     {
         this.reactions = new SymptomTO[mdo.Reactions.Count];
         for (int i = 0; i < mdo.Reactions.Count; i++)
         {
             this.reactions[i] = new SymptomTO(mdo.Reactions[i]);
         }
     }
     this.severity = mdo.Severity;
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
     if (mdo.DrugIngredients != null)
     {
         this.drugIngredients = new TaggedText[mdo.DrugIngredients.Count];
         int idx = 0;
         foreach (DictionaryEntry de in mdo.DrugIngredients)
         {
             this.drugIngredients[idx++] = new TaggedText(de);
         }
     }
     if (mdo.DrugClasses != null)
     {
         this.drugClasses = new TaggedText[mdo.DrugClasses.Count];
         int idx = 0;
         foreach (DictionaryEntry de in mdo.DrugClasses)
         {
             this.drugClasses[idx++] = new TaggedText(de);
         }
     }
 }
 public TaggedHospitalLocationArray(string tag, HospitalLocation[] mdoLocations)
 {
     this.tag = tag;
     if (mdoLocations == null)
     {
         this.count = 0;
         return;
     }
     locations = new HospitalLocationTO[mdoLocations.Length];
     for (int i = 0; i < mdoLocations.Length; i++)
     {
         locations[i] = new HospitalLocationTO(mdoLocations[i]);
     }
     count = mdoLocations.Length;
 }
 public TaggedHospitalLocationArray(string tag, HospitalLocation[] mdoLocations)
 {
     this.tag = tag;
     if (mdoLocations == null)
     {
         this.count = 0;
         return;
     }
     locations = new HospitalLocationTO[mdoLocations.Length];
     for (int i = 0; i < mdoLocations.Length; i++)
     {
         locations[i] = new HospitalLocationTO(mdoLocations[i]);
     }
     count = mdoLocations.Length;
 }
Exemple #17
0
 public NoteTO(Note mdoNote)
 {
     if (mdoNote == null) // || ((mdoNote.Id == null || mdoNote.Id == "") && mdoNote.ApprovedBy == null))
     {
         return;
     }
     this.id                 = mdoNote.Id;
     this.timestamp          = mdoNote.Timestamp;
     this.admitTimestamp     = mdoNote.AdmitTimestamp;
     this.dischargeTimestamp = mdoNote.DischargeTimestamp;
     this.localTitle         = mdoNote.LocalTitle;
     this.standardTitle      = mdoNote.StandardTitle;
     this.serviceCategory    = mdoNote.ServiceCategory;
     if (mdoNote.Author != null)
     {
         this.author = new AuthorTO(mdoNote.Author);
     }
     if (mdoNote.Location != null)
     {
         this.location = new HospitalLocationTO(mdoNote.Location);
     }
     // Why is this here? Site is not the same as location...
     //else if (!String.IsNullOrEmpty(mdoNote.SiteId.Id) || !String.IsNullOrEmpty(mdoNote.SiteId.Name))
     //{
     //    HospitalLocation hl = new HospitalLocation(mdoNote.SiteId.Id, mdoNote.SiteId.Name);
     //    this.location = new HospitalLocationTO(hl);
     //}
     this.text           = mdoNote.Text;
     this.hasAddendum    = mdoNote.HasAddendum;
     this.isAddendum     = mdoNote.IsAddendum;
     this.originalNoteID = mdoNote.OriginalNoteId;
     this.hasImages      = mdoNote.HasImages;
     if (mdoNote.ApprovedBy != null)
     {
         this.approvedBy = new AuthorTO(mdoNote.ApprovedBy);
     }
     this.status             = mdoNote.Status;
     this.type               = mdoNote.Type;
     this.signatureTimestamp = mdoNote.ProcTimestamp;
 }
Exemple #18
0
 public NoteTO(Note mdoNote)
 {
     if (mdoNote == null) // || ((mdoNote.Id == null || mdoNote.Id == "") && mdoNote.ApprovedBy == null))
     {
         return;
     }
     this.id = mdoNote.Id;
     this.timestamp = mdoNote.Timestamp;
     this.admitTimestamp = mdoNote.AdmitTimestamp;
     this.dischargeTimestamp = mdoNote.DischargeTimestamp;
     this.localTitle = mdoNote.LocalTitle;
     this.standardTitle = mdoNote.StandardTitle;
     this.serviceCategory = mdoNote.ServiceCategory;
     if (mdoNote.Author != null)
     {
         this.author = new AuthorTO(mdoNote.Author);
     }
     if (mdoNote.Location != null)
     {
         this.location = new HospitalLocationTO(mdoNote.Location);
     }
     else if (!String.IsNullOrEmpty(mdoNote.SiteId.Id) || !String.IsNullOrEmpty(mdoNote.SiteId.Name))
     {
         HospitalLocation hl = new HospitalLocation(mdoNote.SiteId.Id, mdoNote.SiteId.Name);
         this.location = new HospitalLocationTO(hl);
     }
     this.text = mdoNote.Text;
     this.hasAddendum = mdoNote.HasAddendum;
     this.isAddendum = mdoNote.IsAddendum;
     this.originalNoteID = mdoNote.OriginalNoteId;
     this.hasImages = mdoNote.HasImages;
     if (mdoNote.ApprovedBy != null)
     {
         this.approvedBy = new AuthorTO(mdoNote.ApprovedBy);
     }
     this.status = mdoNote.Status;
 }
Exemple #19
0
        public PatientTO(Patient mdo)
        {
            if (mdo == null)
            {
                return;
            }
            this.name = this.patientName = mdo.Name == null ? "" : mdo.Name.getLastNameFirst();
            this.ssn = mdo.SSN == null ? "" : mdo.SSN.toString();
            this.dob = mdo.DOB;
            this.gender = mdo.Gender;
            this.mpiPid = mdo.MpiPid;
            this.mpiChecksum = mdo.MpiChecksum;
            this.localPid = mdo.LocalPid;
            this.sitePids = mdo.SitePids == null || mdo.SitePids.Count == 0 ? null : new TaggedTextArray(mdo.SitePids);
            this.vendorPid = mdo.VendorPid;
            this.location = new HospitalLocationTO(mdo.Location);
            this.age = mdo.Age;
            this.cwad = mdo.Cwad;
            this.restricted = mdo.IsRestricted;
            //this.admitTimestamp = mdo.AdmitTimestamp.Year == 1 ? "" : mdo.AdmitTimestamp.ToString("yyyyMMdd.HHmmss");
            this.admitTimestamp = mdo.AdmitTimestamp;
            this.serviceConnected = mdo.IsServiceConnected;
            this.scPercent = mdo.ScPercent;
            this.inpatient = mdo.IsInpatient;
            //this.deceasedDate = mdo.DeceasedDate.Year == 1 ? "" : mdo.DeceasedDate.ToString("yyyyMMdd.HHmmss");
            this.deceasedDate = mdo.DeceasedDate;
            this.confidentiality = new TaggedText(mdo.Confidentiality);
            this.needsMeansTest = mdo.NeedsMeansTest;
            this.cmorSiteId = mdo.CmorSiteId;
            this.activeInsurance = mdo.ActiveInsurance;
            this.isTestPatient = mdo.IsTestPatient;
            this.maritalStatus = mdo.MaritalStatus;
            this.ethnicity = mdo.Ethnicity;
            this.currentMeansStatus = mdo.CurrentMeansStatus;
            this.hasInsurance = mdo.HasInsurance;
            this.preferredFacility = new TaggedText(mdo.PreferredFacility);
            this.patientType = mdo.PatientType;
            this.isVeteran = mdo.IsVeteran;
            this.patientFlags = new TaggedTextArray(mdo.PatientFlags);
            this.isLocallyAssignedMpiPid = mdo.IsLocallyAssignedMpiPid;
            if (mdo.HomeAddress != null)
            {
                this.homeAddress = new AddressTO(mdo.HomeAddress);
            }
            if (mdo.HomePhone != null)
            {
                this.homePhone = new PhoneNumTO(mdo.HomePhone);
            }
            if (mdo.CellPhone != null)
            {
                this.cellPhone = new PhoneNumTO(mdo.CellPhone);
            }
            if (mdo.SiteIDs != null)
            {
                Site[] a = new Site[mdo.SiteIDs.Length];
                for (int i = 0; i < mdo.SiteIDs.Length; i++)
                {
                    a[i] = new Site(mdo.SiteIDs[i].Id, mdo.SiteIDs[i].Name);
                    a[i].LastEventTimestamp = mdo.SiteIDs[i].LastSeenDate;
                    a[i].LastEventReason = mdo.SiteIDs[i].LastEvent;
                }
                this.sites = new SiteArray(a);
            }
            if (mdo.Team != null)
            {
                this.team = new TeamTO(mdo.Team);
            }

            if (mdo.Demographics != null && mdo.Demographics.Count > 0)
            {
                this.demographics = new DemographicSetTO[mdo.Demographics.Count];
                string[] keys = new string[mdo.Demographics.Count];
                mdo.Demographics.Keys.CopyTo(keys, 0);
                for (int i = 0; i < mdo.Demographics.Count; i++)
                {
                    this.demographics[i] = new DemographicSetTO(keys[i], mdo.Demographics[keys[i]]);
                }
            }
        }
Exemple #20
0
        public PatientTO(Patient mdo)
        {
            if (mdo == null)
            {
                return;
            }
            this.name        = this.patientName = mdo.Name == null ? "" : mdo.Name.getLastNameFirst();
            this.ssn         = mdo.SSN == null ? "" : mdo.SSN.toString();
            this.dob         = mdo.DOB;
            this.gender      = mdo.Gender;
            this.mpiPid      = mdo.MpiPid;
            this.mpiChecksum = mdo.MpiChecksum;
            this.localPid    = mdo.LocalPid;
            this.sitePids    = mdo.SitePids == null || mdo.SitePids.Count == 0 ? null : new TaggedTextArray(mdo.SitePids);
            this.vendorPid   = mdo.VendorPid;
            this.location    = new HospitalLocationTO(mdo.Location);
            this.age         = mdo.Age;
            this.cwad        = mdo.Cwad;
            this.restricted  = mdo.IsRestricted;
            //this.admitTimestamp = mdo.AdmitTimestamp.Year == 1 ? "" : mdo.AdmitTimestamp.ToString("yyyyMMdd.HHmmss");
            this.admitTimestamp   = mdo.AdmitTimestamp;
            this.serviceConnected = mdo.IsServiceConnected;
            this.scPercent        = mdo.ScPercent;
            this.inpatient        = mdo.IsInpatient;
            //this.deceasedDate = mdo.DeceasedDate.Year == 1 ? "" : mdo.DeceasedDate.ToString("yyyyMMdd.HHmmss");
            this.deceasedDate            = mdo.DeceasedDate;
            this.confidentiality         = new TaggedText(mdo.Confidentiality);
            this.needsMeansTest          = mdo.NeedsMeansTest;
            this.cmorSiteId              = mdo.CmorSiteId;
            this.activeInsurance         = mdo.ActiveInsurance;
            this.isTestPatient           = mdo.IsTestPatient;
            this.maritalStatus           = mdo.MaritalStatus;
            this.ethnicity               = mdo.Ethnicity;
            this.currentMeansStatus      = mdo.CurrentMeansStatus;
            this.hasInsurance            = mdo.HasInsurance;
            this.preferredFacility       = new TaggedText(mdo.PreferredFacility);
            this.patientType             = mdo.PatientType;
            this.isVeteran               = mdo.IsVeteran;
            this.patientFlags            = new TaggedTextArray(mdo.PatientFlags);
            this.isLocallyAssignedMpiPid = mdo.IsLocallyAssignedMpiPid;
            if (mdo.HomeAddress != null)
            {
                this.homeAddress = new AddressTO(mdo.HomeAddress);
            }
            if (mdo.HomePhone != null)
            {
                this.homePhone = new PhoneNumTO(mdo.HomePhone);
            }
            if (mdo.CellPhone != null)
            {
                this.cellPhone = new PhoneNumTO(mdo.CellPhone);
            }
            if (mdo.SiteIDs != null)
            {
                Site[] a = new Site[mdo.SiteIDs.Length];
                for (int i = 0; i < mdo.SiteIDs.Length; i++)
                {
                    a[i] = new Site(mdo.SiteIDs[i].Id, mdo.SiteIDs[i].Name);
                    a[i].LastEventTimestamp = mdo.SiteIDs[i].LastSeenDate;
                    a[i].LastEventReason    = mdo.SiteIDs[i].LastEvent;
                }
                this.sites = new SiteArray(a);
            }
            if (mdo.Team != null)
            {
                this.team = new TeamTO(mdo.Team);
            }

            if (mdo.Demographics != null && mdo.Demographics.Count > 0)
            {
                this.demographics = new DemographicSetTO[mdo.Demographics.Count];
                string[] keys = new string[mdo.Demographics.Count];
                mdo.Demographics.Keys.CopyTo(keys, 0);
                for (int i = 0; i < mdo.Demographics.Count; i++)
                {
                    this.demographics[i] = new DemographicSetTO(keys[i], mdo.Demographics[keys[i]]);
                }
            }
        }
Exemple #21
0
 public AllergyTO(Allergy mdo)
 {
     this.allergenId = mdo.AllergenId;
     this.allergenName = mdo.AllergenName;
     this.allergenType = mdo.AllergenType;
     if (mdo.Reactions != null)
     {
         this.reactions = new SymptomTO[mdo.Reactions.Count];
         for (int i = 0; i < mdo.Reactions.Count; i++)
         {
             this.reactions[i] = new SymptomTO(mdo.Reactions[i]);
         }
     }
     this.severity = mdo.Severity;
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
     if (mdo.DrugIngredients != null)
     {
         this.drugIngredients = new TaggedText[mdo.DrugIngredients.Count];
         int idx = 0;
         foreach (DictionaryEntry de in mdo.DrugIngredients)
         {
             this.drugIngredients[idx++] = new TaggedText(de);
         }
     }
     if (mdo.DrugClasses != null)
     {
         this.drugClasses = new TaggedText[mdo.DrugClasses.Count];
         int idx = 0;
         foreach (DictionaryEntry de in mdo.DrugClasses)
         {
             this.drugClasses[idx++] = new TaggedText(de);
         }
     }
 }
Exemple #22
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;
 }