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 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; }
public HospitalLocationTO(HospitalLocation mdo) { if (mdo == null) { return; } this.id = mdo.Id; this.name = mdo.Name; this.department = new TaggedText(mdo.Department); this.service = new TaggedText(mdo.Service); this.specialty = new TaggedText(mdo.Specialty); if (mdo.Facility != null) { this.facility = new SiteTO(mdo.Facility); } this.building = mdo.Building; this.floor = mdo.Floor; this.room = mdo.Room; this.bed = mdo.Bed; this.status = mdo.Status; this.phone = mdo.Phone; this.appointmentTimestamp = mdo.AppointmentTimestamp; this.type = mdo.Type; this.physicalLocation = mdo.PhysicalLocation; }
public ProblemTO(Problem mdo) { this.id = mdo.Id; this.status = mdo.Status; this.providerNarrative = mdo.ProviderNarrative; this.onsetDate = mdo.OnsetDate; this.modifiedDate = mdo.ModifiedDate; this.exposures = mdo.Exposures; this.noteNarrative = mdo.NoteNarrative; if (mdo.Observer != null) { this.observer = new AuthorTO(mdo.Observer); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Type != null) { this.type = new ObservationTypeTO(mdo.Type); } this.comment = mdo.Comment; if (mdo.OrganizationProperties != null && mdo.OrganizationProperties.Count > 0) { this.organizationalProperties = new TaggedTextArray(mdo.OrganizationProperties); } }
public HospitalLocationTO(HospitalLocation mdo) { if (mdo == null) { return; } this.id = mdo.Id; this.name = mdo.Name; this.department = new TaggedText(mdo.Department); this.service = new TaggedText(mdo.Service); this.specialty = new TaggedText(mdo.Specialty); this.stopCode = new TaggedText(mdo.StopCode); if (mdo.Facility != null) { this.facility = new SiteTO(mdo.Facility); } this.building = mdo.Building; this.floor = mdo.Floor; this.room = mdo.Room; this.bed = mdo.Bed; this.status = mdo.Status; this.phone = mdo.Phone; this.appointmentTimestamp = mdo.AppointmentTimestamp; this.type = mdo.Type; this.physicalLocation = mdo.PhysicalLocation; this.askForCheckIn = mdo.AskForCheckIn; this.appointmentLength = mdo.AppointmentLength; this.clinicDisplayStartTime = mdo.ClinicDisplayStartTime; this.displayIncrements = mdo.DisplayIncrements; this.availability = new TimeSlotArray(mdo.Availability); }
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; }
public ConsultTO(Consult mdo) { this.id = mdo.Id; this.timestamp = mdo.Timestamp.ToString("yyyyMMdd.HHmmss"); this.toService = new TaggedText(mdo.Service); this.status = mdo.Status; this.title = mdo.Title; this.text = mdo.Text; }
public MentalHealthInstrumentResultSetTO(MentalHealthInstrumentResultSet mdo) { this.id = mdo.Id; this.administrationId = mdo.AdministrationId; this.scale = new TaggedText(mdo.Scale); this.rawScore = mdo.RawScore; this.transformedScores = new TaggedTextArray(mdo.TransformedScores); this.instrument = new TaggedText(mdo.Instrument); }
public OefOifTO(OEF_OIF o) { this.location = o.Location; this.fromDate = o.FromDate.ToString("yyyyMMdd"); this.toDate = o.ToDate.ToString("yyyyMMdd"); this.dataLocked = o.DataLocked; this.recordedDate = o.RecordedDate.ToString("yyyyMMdd"); this.recordingSite = new TaggedText(o.RecordingSite); }
public IcdRpt(IcdReport mdo) { this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } this.icdCode = mdo.IcdCode; }
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 LabSpecimenTO(LabSpecimen mdo) { this.id = mdo.Id; this.name = StringUtils.stripInvalidXmlCharacters(mdo.Name); this.collectionDate = mdo.CollectionDate; this.accessionNum = mdo.AccessionNumber; this.site = mdo.Site; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Name); } }
public ProblemTO(Problem mdo) { if (mdo == null) { return; } this.resolvedDate = mdo.ResolvedDate; this.removed = mdo.Removed; this.verified = mdo.Verified; if (mdo.Comments != null && mdo.Comments.Count > 0) { Note[] noteComments = new Note[mdo.Comments.Count]; mdo.Comments.CopyTo(noteComments, 0); this.comments = new TaggedNoteArray("comments", noteComments); } this.acuity = new TaggedText(mdo.Acuity); this.id = mdo.Id; this.status = mdo.Status; this.providerNarrative = mdo.ProviderNarrative; this.onsetDate = mdo.OnsetDate; this.modifiedDate = mdo.ModifiedDate; this.exposures = mdo.Exposures; this.noteNarrative = mdo.NoteNarrative; this.priority = mdo.Priority; this.resolvedDate = mdo.ResolvedDate; if (mdo.Observer != null) { this.observer = new AuthorTO(mdo.Observer); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Type != null) { this.type = new ObservationTypeTO(mdo.Type); } this.comment = mdo.Comment; if (mdo.OrganizationProperties != null && mdo.OrganizationProperties.Count > 0) { this.organizationalProperties = new TaggedTextArray(mdo.OrganizationProperties); } this.timestamp = mdo.Timestamp; }
public VitalSignSetTO(VitalSignSet mdo) { this.timestamp = mdo.Timestamp; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Count != 0) { VitalSign[] mdoSigns = mdo.VitalSigns; this.vitalSigns = new VitalSignTO[mdoSigns.Length]; for (int i = 0; i < mdoSigns.Length; i++) { this.vitalSigns[i] = new VitalSignTO(mdoSigns[i]); } } this.units = mdo.Units; this.qualifiers = mdo.Qualifiers; }
public MentalHealthInstrumentAdministrationTO(MentalHealthInstrumentAdministration mdo) { this.id = mdo.Id; this.patient = new TaggedText(mdo.Patient); this.instrument = new TaggedText(mdo.Instrument); this.dateAdministered = mdo.DateAdministered; this.dateSaved = mdo.DateSaved; this.orderedBy = new TaggedText(mdo.OrderedBy); this.administeredBy = new TaggedText(mdo.AdministeredBy); this.isSigned = mdo.IsSigned; this.isComplete = mdo.IsComplete; this.numberOfQuestionsAnswered = mdo.NumberOfQuestionsAnswered; this.transmitStatus = mdo.TransmissionStatus; this.transmitTime = mdo.TransmissionTime; this.hospitalLocation = new TaggedText(mdo.HospitalLocation); if (mdo.ResultSet != null) { this.results = new MentalHealthInstrumentResultSetTO(mdo.ResultSet); } }
public SymptomTO(Symptom mdo) { this.id = mdo.Id; this.name = mdo.Name; this.isNational = mdo.IsNational; this.vuid = mdo.Vuid; if (mdo.Type != null) { this.type = new ObservationTypeTO(mdo.Type); } if (mdo.Observer != null) { this.observer = new AuthorTO(mdo.Observer); } this.timestamp = mdo.Timestamp; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } }
public MicrobiologyRpt(MicrobiologyReport mdo) { this.id = mdo.Id; this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Author != null) { this.author = new AuthorTO(mdo.Author); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Specimen != null) { this.specimen = new LabSpecimenTO(mdo.Specimen); } this.comment = mdo.Comment; this.sample = mdo.Sample; this.text = mdo.Text; }
public SurgeryReportTO(SurgeryReport mdo) { this.id = mdo.Id; this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Author != null) { this.author = new AuthorTO(mdo.Author); } this.text = mdo.Text; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } this.status = mdo.Status; this.specialty = new TaggedText(mdo.Specialty); this.preOpDx = mdo.PreOpDx; this.postOpDx = mdo.PostOpDx; this.labWork = mdo.LabWork; this.dictationTimestamp = mdo.DictationTimestamp; this.transcriptionTimestamp = mdo.TranscriptionTimestamp; }
public SurgicalPathologyRpt(SurgicalPathologyReport mdo) { this.id = mdo.Id; this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Author != null) { this.author = new AuthorTO(mdo.Author); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Specimen != null) { this.specimen = new LabSpecimenTO(mdo.Specimen); } this.clinicalHx = mdo.ClinicalHx; this.description = mdo.Description; this.exam = mdo.Exam; this.diagnosis = mdo.Diagnosis; this.comment = mdo.Comment; }
public CytologyRpt(CytologyReport mdo) { this.id = mdo.Id; this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Author != null) { this.author = new AuthorTO(mdo.Author); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Specimen != null) { this.specimen = new LabSpecimenTO(mdo.Specimen); } this.clinicalHx = mdo.ClinicalHx; this.description = mdo.Description; this.exam = mdo.Exam; this.diagnosis = mdo.Diagnosis; this.comment = mdo.Comment; this.supplementalRpt = mdo.SupplementalReport; }
public ChemHemRpt(ChemHemReport mdo) { this.id = mdo.Id; this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Author != null) { this.author = new AuthorTO(mdo.Author); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Specimen != null) { this.specimen = new LabSpecimenTO(mdo.Specimen); } this.comment = mdo.Comment; if (mdo.Results != null) { this.results = new LabResultTO[mdo.Results.Length]; for (int i = 0; i < mdo.Results.Length; i++) { this.results[i] = new LabResultTO(mdo.Results[i]); } } if (mdo.LabSites != null) { this.labSites = new SiteTO[mdo.LabSites.Count]; int i = 0; foreach (DictionaryEntry de in mdo.LabSites) { this.labSites[i++] = new SiteTO((Site)de.Value); } } }
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 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]]); } } }
public TaggedText isOneVisitNote(string sitecode, string noteDefinitionIEN, string noteTitle, string visitStr) { TaggedText result = new TaggedText(); string msg = MdwsUtils.isAuthorizedConnection(_mySession, sitecode); if (msg != "OK") { result.fault = new FaultTO(msg); } else if (String.IsNullOrEmpty(noteDefinitionIEN)) { result.fault = new FaultTO("Missing noteDefinitionIEN"); } // TODO - this arg is superfluous - remove from future versions or rename to dfn (patient IEN) to remove need to select patient //else if (String.IsNullOrEmpty(noteTitle)) //{ // result.fault = new FaultTO("Missing noteTitle"); //} else if (String.IsNullOrEmpty(visitStr)) { result.fault = new FaultTO("Missing visitStr"); } else if (String.IsNullOrEmpty(_mySession.ConnectionSet.BaseConnection.Pid)) { result.fault = new FaultTO("No patient selected", "Need to select patient"); } if (result.fault != null) { return result; } if (sitecode == null) { sitecode = _mySession.ConnectionSet.BaseSiteId; } try { AbstractConnection cxn = _mySession.ConnectionSet.getConnection(sitecode); bool f = _api.isOneVisitNote(cxn, noteDefinitionIEN, _mySession.ConnectionSet.BaseConnection.Pid, visitStr); if (f) { result.tag = "Y"; result.text = "There is already a " + noteTitle + " note for this visit.\r\n" + "Only ONE record of this type per Visit is allowed...\r\n\r\n" + "You can addend the existing record."; } else { result.tag = "N"; result.text = ""; } } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }
public TaggedText isSurgeryNote(string sitecode, string noteDefinitionIEN) { TaggedText result = new TaggedText(); string msg = MdwsUtils.isAuthorizedConnection(_mySession, sitecode); if (msg != "OK") { result.fault = new FaultTO(msg); } else if (noteDefinitionIEN == "") { result.fault = new FaultTO("Missing noteDefinitionIEN"); } if (result.fault != null) { return result; } if (sitecode == null) { sitecode = _mySession.ConnectionSet.BaseSiteId; } try { AbstractConnection cxn = _mySession.ConnectionSet.getConnection(sitecode); bool f = _api.isSurgeryNote(cxn, noteDefinitionIEN); result.tag = (f ? "Y" : "N"); result.text = (f ? "Cannot create new surgery note at this time" : ""); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }
public TaggedText getMOSReport(string appPwd, string EDIPI) { TaggedText result = new TaggedText(); if (String.IsNullOrEmpty(appPwd)) { result.fault = new FaultTO("Missing appPwd"); } else if (String.IsNullOrEmpty(EDIPI)) { result.fault = new FaultTO("Missing EDIPI"); } if (result.fault != null) { return result; } try { AbstractConnection cxn = new MdoOracleConnection(new DataSource() { ConnectionString = mySession.MdwsConfiguration.MosConnectionString }); PatientApi api = new PatientApi(); Patient p = new Patient() { EDIPI = EDIPI }; TextReport rpt = api.getMOSReport(cxn, p); result.text = rpt.Text; result.tag = "VADIR"; } catch (Exception exc) { result.fault = new FaultTO(exc); } return result; }
public TaggedText getPcpForPatient(string pid) { TaggedText result = new TaggedText(); string msg = MdwsUtils.isAuthorizedConnection(mySession); if (msg != "OK") { result.fault = new FaultTO(msg); } else if (String.IsNullOrEmpty(pid)) { result.fault = new FaultTO("Empty PID"); } if (result.fault != null) { return result; } try { KeyValuePair<string, string> kvp = Patient.getPcpForPatient(mySession.ConnectionSet.BaseConnection, pid); result = new TaggedText(kvp); } catch (Exception exc) { result.fault = new FaultTO(exc); } return result; }
public TaggedText(string tag, TaggedText[] taggedResults) { this.tag = tag; this.taggedResults = taggedResults; }
public TaggedText siteHasPatch(string patchId) { TaggedText result = new TaggedText(); if (mySession.ConnectionSet.Count == 0 || !mySession.ConnectionSet.IsAuthorized) { result.fault = new FaultTO(NO_CONNECTIONS); } else if (String.IsNullOrEmpty(patchId)) { result.fault = new FaultTO("Missing patchId"); } if (result.fault != null) { return result; } try { bool f = mySession.ConnectionSet.BaseConnection.hasPatch(patchId); result = new TaggedText(mySession.ConnectionSet.BaseConnection.DataSource.SiteId.Id, f == true ? "Y" : "N"); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }
public TaggedText getTeams(string sitecode) { TaggedText result = new TaggedText(); string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode); if (msg != "OK") { result.fault = new FaultTO(msg); } if (result.fault != null) { return result; } if (sitecode == null) { sitecode = mySession.ConnectionSet.BaseSiteId; } try { AbstractConnection cxn = mySession.ConnectionSet.getConnection(sitecode); EncounterApi api = new EncounterApi(); DictionaryHashList teams = api.getTeams(cxn); result = new TaggedText(sitecode, teams); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }
public MedicationTO(Medication mdo) { this.id = mdo.Id; this.name = mdo.Name; this.rxNum = mdo.RxNumber; this.quantity = mdo.Quantity; this.expirationDate = mdo.ExpirationDate; this.issueDate = mdo.IssueDate; this.startDate = mdo.StartDate; this.stopDate = mdo.StopDate; this.orderId = mdo.OrderId; this.status = mdo.Status; this.refills = mdo.Refills; this.isOutpatient = mdo.IsOutpatient; this.isInpatient = mdo.IsInpatient; this.isIV = mdo.IsIV; this.isUnitDose = mdo.IsUnitDose; this.isNonVA = mdo.IsNonVA; this.lastFillDate = mdo.LastFillDate; this.remaining = mdo.Remaining; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Provider != null) { this.provider = new AuthorTO(mdo.Provider); } this.cost = mdo.Cost; this.sig = mdo.Sig; this.type = mdo.Type; this.additives = mdo.Additives; this.solution = mdo.Solution; this.rate = mdo.Rate; this.route = mdo.Route; this.dose = mdo.Dose; this.instruction = mdo.Instruction; this.comment = mdo.Comment; this.dateDocumented = mdo.DateDocumented; if (mdo.Documentor != null) { this.documentor = new AuthorTO(mdo.Documentor); } this.detail = mdo.Detail; this.schedule = mdo.Schedule; this.daysSupply = mdo.DaysSupply; this.isImo = mdo.IsImo; if(!String.IsNullOrEmpty(mdo.Hospital.Value)) this.hospital = new TaggedText(mdo.Hospital); if (!String.IsNullOrEmpty(mdo.Drug.Value)) this.drug = new TaggedText(mdo.Drug); }