private void initCollections() { //CCR = new ContinuityOfCareRecord() { Body = new ContinuityOfCareRecordBody() }; //CCR.Body.Immunizations = new List<StructuredProductType>(); FaultArray = new TaggedFaultArray(); Patient = new TaggedPatientArrays(); 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(); Immunizations = new TaggedImmunizationArrays(); ImagingExams = new TaggedImagingExamArrays(); EKGs = new TaggedClinicalProcedureArrays(); }
public PatientMedicalRecordTO(IndexedHashtable ihs) { //initCollections(); if (ihs == null || ihs.Count == 0) { return; } FaultArray = new TaggedFaultArray(ihs); // we need a way to report faults at the top level - this should provide that Patient = new TaggedPatientArrays(ihs); Immunizations = new TaggedImmunizationArrays(ihs); Vitals = new TaggedVitalSignArrays(ihs); ImagingExams = new TaggedImagingExamArrays(ihs); Problems = new TaggedProblemArrays(ihs); DischargeSummaries = new TaggedNoteArrays(ihs, "dischargeSummaries"); Notes = new TaggedNoteArrays(ihs); Labs = new TaggedLabReportArrays(ihs); Allergies = new TaggedAllergyArrays(ihs); EKGs = new TaggedClinicalProcedureArrays(ihs); }
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; }
public TaggedPatientArrays matchByNameCityStateMS(string name, string city, string stateAbbr) { TaggedPatientArrays result = new TaggedPatientArrays(); string msg = MdwsUtils.isAuthorizedConnection(mySession); if (msg != "OK") { result.fault = new FaultTO(msg); } if (name == "") { result.fault = new FaultTO("Missing name"); } else if (city == "") { result.fault = new FaultTO("Missing city"); } else if (stateAbbr == "") { result.fault = new FaultTO("Missing stateAbbr"); } else if (!State.isValidAbbr(stateAbbr)) { result.fault = new FaultTO("Invalid stateAbbr"); } if (result.fault != null) { return result; } try { PatientApi api = new PatientApi(); IndexedHashtable matches = api.matchByNameCityState(mySession.ConnectionSet, name, city, stateAbbr); result = new TaggedPatientArrays(matches); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }
public TaggedPatientArrays match(string target) { TaggedPatientArrays result = new TaggedPatientArrays(); if (!mySession.ConnectionSet.IsAuthorized) { result.fault = new FaultTO("Connections not ready for operation", "Need to login?"); } else if (String.IsNullOrEmpty(target)) { result.fault = new FaultTO("Missing target"); } if (result.fault != null) { return result; } try { PatientApi api = new PatientApi(); IndexedHashtable t = api.match(mySession.ConnectionSet, target); return new TaggedPatientArrays(t); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return result; }