public patientInquiry ( ConnectionSet cxns, string pid ) : IndexedHashtable | ||
cxns | ConnectionSet | |
pid | string | |
return | IndexedHashtable |
/// <summary> /// Make a patient inquiry call (address, contact numbers, NOK, etc. information) /// </summary> /// <returns>TextTO with selected patient inquiry text</returns> 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; }