public OrderDetailModels GetDetailReceipt(string id, ref string msg) { OrderDetailModels model = new OrderDetailModels(); try { GetOrderDetailRequest paraBody = new GetOrderDetailRequest(); paraBody.ID = id; NSLog.Logger.Info("GetReceiptDetail_Request: ", paraBody); var result = (NSApiResponse)ApiResponse.Post <NSApiResponse>(Commons.ClientSiteYourCartGetOrderDetail, null, paraBody); NSLog.Logger.Info("GetReceiptDetail_Response: ", result); if (result != null) { dynamic data = result.Data; //====Receipt detail var receipt = data["OrderDetail"]; var lstObject = JsonConvert.SerializeObject(receipt); model = JsonConvert.DeserializeObject <OrderDetailModels>(lstObject); NSLog.Logger.Info("GetReceiptDetail_Response: ", model); return(model); } else { msg = result.Message; NSLog.Logger.Info("GetReceiptDetail_Response: ", result.Message); return(model); } } catch (Exception e) { NSLog.Logger.Error("GetReceiptDetail_Fail: ", e); return(model); } }
private GetOrderDetailResponse GetOrderDetail(GetOrderDetailRequest request) { var order = this.PersistenceContext.GetBroker <IOrderBroker>().Load(request.OrderRef); var createOrderDetailOptions = new OrderAssembler.CreateOrderDetailOptions { IncludeVisit = request.IncludeVisit && (new WorkflowConfigurationReader()).EnableVisitWorkflow, IncludeProcedures = request.IncludeProcedures, IncludeNotes = request.IncludeNotes, IncludeVirtualNotes = request.IncludeNotes, // include virtual notes, if including notes at all NoteCategoriesFilter = request.NoteCategoriesFilter, IncludeAttachments = request.IncludeAttachments, IncludeResultRecipients = request.IncludeResultRecipients, IncludeExtendedProperties = request.IncludeExtendedProperties }; var response = new GetOrderDetailResponse(); var orderAssembler = new OrderAssembler(); response.Order = orderAssembler.CreateOrderDetail(order, createOrderDetailOptions, this.PersistenceContext); if (request.IncludeAlerts) { var alertAssembler = new AlertAssembler(); response.OrderAlerts = CollectionUtils.Map <AlertNotification, AlertNotificationDetail>( AlertHelper.Instance.Test(order, this.PersistenceContext), alertAssembler.CreateAlertNotification); } return(response); }
public async Task <IActionResult> GetOrderDetail([FromQuery] GetOrderDetailRequest request) { // some logic ... await Task.Delay(1000); return(Ok(request)); }
private static void UpdateCache(EntityRef orderRef) { Platform.GetService <IBrowsePatientDataService>(service => { var request = new GetOrderDetailRequest(orderRef, false, true, false, false, false, false); var response = service.GetData(new GetDataRequest { GetOrderDetailRequest = request }).GetOrderDetailResponse; // populate cache _studyInstanceUidCache.Put(orderRef, response.Order.Procedures.Select(p => p.StudyInstanceUid)); foreach (var proc in response.Order.Procedures) { _studyInstanceUidCache.Put(proc.ProcedureRef, new[] { proc.StudyInstanceUid }); } }); }
public GetOrderDetailResponse GetOrderDetail(GetOrderDetailRequest request) { var response = new GetOrderDetailResponse(); return(response); }