public void TestGetPatientEducationItemsPaged() { using (RpcBroker broker = this.GetConnectedBroker()) { this.SignonToBroker(broker, 2); DsioGetPatientEducationCommand command = new DsioGetPatientEducationCommand(broker); command.AddCommandArguments("715", "", "", "", "", 2, 2); RpcResponse response = command.Execute(); Assert.AreEqual(RpcResponseStatus.Success, response.Status); } }
public void TestGetPatientEducationItemsByType() { using (RpcBroker broker = this.GetConnectedBroker()) { this.SignonToBroker(broker, 2); DsioGetPatientEducationCommand command = new DsioGetPatientEducationCommand(broker); command.AddCommandArguments(TestConfiguration.DefaultPatientDfn, "", "", "", "L", 1, 1000); RpcResponse response = command.Execute(); Assert.AreEqual(RpcResponseStatus.Success, response.Status); } }
public PatientEducationItemsResult GetPatientItems(string patientDfn, string ien, DateTime fromDate, DateTime toDate, EducationItemType itemType, int page, int itemsPerPage) { PatientEducationItemsResult result = new PatientEducationItemsResult(); if (this.broker != null) { DsioGetPatientEducationCommand command = new DsioGetPatientEducationCommand(this.broker); string dsioItemType = GetDsioItemType(itemType); string fmFromDate = Util.GetFileManDate(fromDate); string fmToDate = Util.GetFileManDate(toDate); command.AddCommandArguments(patientDfn, ien, fmFromDate, fmToDate, dsioItemType, page, itemsPerPage); RpcResponse response = command.Execute(); result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage); if (result.Success) { if (command.Items != null) { if (command.Items.Count > 0) { foreach (DsioPatientEducationItem dsioItem in command.Items) { EducationItem item = GetItem(dsioItem); PatientEducationItem patItem = new PatientEducationItem(item); patItem.CompletedOn = Util.GetDateTime(dsioItem.CompletedOn); patItem.CompletedBy = dsioItem.CompletedBy; result.Items.Add(patItem); } result.TotalResults = command.TotalResults; } } } } return(result); }