public IenResult SavePatientItem(PatientEducationItem item) { IenResult result = new IenResult(); if (this.broker != null) { DsioEducationItem dsioEdItem = GetDsioItem(item); DsioPatientEducationItem dsioItem = new DsioPatientEducationItem(dsioEdItem); dsioItem.EducationItemIen = item.EducationItemIen; dsioItem.PatientDfn = item.PatientDfn; dsioItem.CompletedOn = Util.GetFileManDateAndTime(item.CompletedOn); DsioSavePatientEducationCommand command = new DsioSavePatientEducationCommand(this.broker); command.AddCommandArguments(dsioItem); RpcResponse response = command.Execute(); result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage); if (result.Success) { result.Ien = command.Ien; } } return(result); }
public IenResult SavePregnancy(PregnancyDetails pregnancy) { // *** Saves pregnancy data *** IenResult result = new IenResult(); // *** Create the dsio pregnancy string data *** DsioPregnancy dsioPregnancy = CreateDsioPregnancy(pregnancy); // *** Create RPC command *** DsioSavePregDetailsCommand command = new DsioSavePregDetailsCommand(this.broker); // *** Add command arguments *** command.AddCommandArguments(dsioPregnancy, false); // *** Execute the command *** RpcResponse response = command.Execute(); // *** Add response data to result *** result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage); if (result.Success) { result.Ien = command.Ien; } return(result); }
public IenResult SavePregnancyItem(PregnancyChecklistItem item) { IenResult result = new IenResult(); if (this.broker != null) { DsioSaveMccPatChecklistCommand command = new DsioSaveMccPatChecklistCommand(broker); DsioChecklistItem dsioItem = GetDsioChecklistItem(item); DsioPatientChecklistItem patItem = new DsioPatientChecklistItem(dsioItem); patItem.PatientDfn = item.PatientDfn; patItem.PregnancyIen = item.PregnancyIen; if (item.SpecificDueDate != DateTime.MinValue) { patItem.SpecificDueDate = Util.GetFileManDate(item.SpecificDueDate); } patItem.CompletionStatus = item.CompletionStatus; patItem.CompleteDate = Util.GetFileManDate(item.CompleteDate); patItem.CompletionLink = item.CompletionLink; patItem.CompletedBy = item.CompletedBy; patItem.Note = item.StoredNote; patItem.InProgress = (item.InProgress) ? "1" : "0"; // *** These items not saved - generated internally *** //patItem.User = item.User; //patItem.ItemDate = Util.GetFileManDate(item.ItemDate); command.AddCommandArguments(patItem); RpcResponse response = command.Execute(); result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage); if (result.Success) { result.Ien = command.Ien; } } return(result); }
public IenResult SaveEducationItem(EducationItem item) { IenResult result = new IenResult(); if (this.broker != null) { DsioSaveEducationItemCommand command = new DsioSaveEducationItemCommand(this.broker); DsioEducationItem dsioItem = GetDsioItem(item); command.AddCommandArguments(dsioItem); RpcResponse response = command.Execute(); result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage); if (result.Success) { result.Ien = command.Ien; } } return(result); }