///<summary>If the statement does not have a short guid or URL, a call will be made to HQ to assign it one. The statement will be updated ///to the database.</summary> public static void AssignURLsIfNecessary(Statement stmt, Patient pat) { if (string.IsNullOrEmpty(stmt.ShortGUID) || string.IsNullOrEmpty(stmt.StatementURL)) { List <WebServiceMainHQProxy.ShortGuidResult> listShortGuidUrls = WebServiceMainHQProxy.GetShortGUIDs(1, 1, pat.ClinicNum, eServiceCode.PatientPortalViewStatement); Statement stmtOld = stmt.Copy(); stmt.ShortGUID = listShortGuidUrls[0].ShortGuid; stmt.StatementURL = listShortGuidUrls[0].MediumURL; stmt.StatementShortURL = listShortGuidUrls[0].ShortURL; Statements.Update(stmt, stmtOld); } }