public TextTO getLabReportsAsXML(string appPwd, string patientICN, string fromDate, string toDate)
{
TextTO result = new TextTO();
if (mySession == null || mySession.SiteTable == null || mySession.SiteTable.getSite("201") == null ||
mySession.SiteTable.getSite("201").Sources == null || mySession.SiteTable.getSite("201").Sources[0] == null)
{
result.fault = new FaultTO("No CDS endpoint (site 201) in sites file!");
}
if (result.fault != null)
{
return result;
}
CdsConnection cxn = new CdsConnection(mySession.SiteTable.getSite("201").Sources[0]);
cxn.Pid = patientICN;
CdsLabsDao dao = new CdsLabsDao(cxn);
try
{
// TODO - validate app password
result.text = dao.getAllLabReports(fromDate, toDate, 0); // function is probably ignoring these params
}
catch (Exception exc)
{
result.fault = new FaultTO(exc);
}
return result;
}