public TextTO getSurgeryReportText(string siteId, string rptId)
{
TextTO result = new TextTO();
if (!mySession.ConnectionSet.IsAuthorized)
{
result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
}
else if (siteId == "")
{
result.fault = new FaultTO("Missing siteId");
}
else if (rptId == "")
{
result.fault = new FaultTO("Missing rptId");
}
if (result.fault != null)
{
return result;
}
try
{
ClinicalApi api = new ClinicalApi();
string s = api.getSurgeryReportText(mySession.ConnectionSet.getConnection(siteId), rptId);
result = new TextTO(s);
}
catch (Exception e)
{
result.fault = new FaultTO(e);
}
return result;
}