public ReminderReportPatientListTO getPatientListForReminderReport(string rptId) { ReminderReportPatientListTO result = new ReminderReportPatientListTO(); if (!mySession.ConnectionSet.IsAuthorized) { result.fault = new FaultTO("Connections not ready for operation", "Need to login?"); } else if (String.IsNullOrEmpty(rptId)) { result.fault = new FaultTO("Empty rptId"); } if (result.fault != null) { return(result); } try { ReminderReportPatientList lst = ClinicalReminder.getPatientListForReminderReport(mySession.ConnectionSet.BaseConnection, rptId); result = new ReminderReportPatientListTO(lst); } catch (Exception e) { result.fault = new FaultTO(e); } return(result); }
internal ReminderReportPatientList toPatientListMdo(string response) { if (String.IsNullOrEmpty(response)) { return(null); } string[] lines = StringUtils.split(response, StringUtils.CRLF); ReminderReportPatientList result = new ReminderReportPatientList(); string[] flds = StringUtils.split(lines[0], StringUtils.CARET); result.ReportName = flds[1]; flds = StringUtils.split(lines[1], StringUtils.CARET); result.ReportTimestamp = flds[1]; for (int i = 2; i < lines.Length; i++) { if (String.IsNullOrEmpty(lines[i])) { continue; } flds = StringUtils.split(lines[i], StringUtils.CARET); // check for flds[1] being integer result.AddPatient(Convert.ToInt16(flds[1]), flds[3], flds[4], flds[5]); } return(result); }
public ReminderReportPatientList getPatientListForReminderReport(string rptId) { MdoQuery request = builtGetPatientListForReminderReportRequest(rptId); string response = (string)cxn.query(request, new MenuOption("AMOJ VL CPGPI")); ReminderReportPatientList result = toPatientListMdo(response); result.ReportId = rptId; return(result); }
public ReminderReportPatientListTO(ReminderReportPatientList mdo) { this.reportId = mdo.ReportId; this.reportName = mdo.ReportName; this.reportTimestamp = mdo.ReportTimestamp; if (mdo.Patients != null && mdo.Patients.Count > 0) { this.patients = new PatientListEntryTO[mdo.Patients.Count]; for (int i = 0; i < mdo.Patients.Count; i++) { this.patients[i] = new PatientListEntryTO(mdo.Patients[i]); } } }
internal ReminderReportPatientList toPatientListMdo(string response) { if (String.IsNullOrEmpty(response)) { return null; } string[] lines = StringUtils.split(response, StringUtils.CRLF); ReminderReportPatientList result = new ReminderReportPatientList(); string[] flds = StringUtils.split(lines[0], StringUtils.CARET); result.ReportName = flds[1]; flds = StringUtils.split(lines[1], StringUtils.CARET); result.ReportTimestamp = flds[1]; for (int i = 2; i < lines.Length; i++) { if (String.IsNullOrEmpty(lines[i])) { continue; } flds = StringUtils.split(lines[i], StringUtils.CARET); // check for flds[1] being integer result.AddPatient(Convert.ToInt16(flds[1]), flds[3],flds[4],flds[5]); } return result; }