public TextTO patientInquiry()
{
TextTO result = new TextTO();
if (!mySession.ConnectionSet.IsAuthorized)
{
result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
}
else if (String.IsNullOrEmpty(mySession.ConnectionSet.getConnection(mySession.ConnectionSet.BaseSiteId).Pid))
{
result.fault = new FaultTO("Need to select patient");
}
if (result.fault != null)
{
return result;
}
try
{
AbstractConnection cxn = mySession.ConnectionSet.getConnection(mySession.ConnectionSet.BaseSiteId);
string selectedPatient = cxn.Pid;
PatientApi api = new PatientApi();
string resultText = api.patientInquiry(cxn, selectedPatient);
result = new TextTO(resultText);
}
catch (Exception e)
{
result.fault = new FaultTO(e.Message);
}
return result;
}