public OrderListItem CreateOrderListItem(Order order, IPersistenceContext context)
		{
			var data = new OrderListItem();

			UpdateListItem(data, order, context);
			UpdateListItem(data, order.Visit, context);

			return data;
		}
		public OrderListItem CreateOrderListItem(Procedure rp, IPersistenceContext context)
		{
			var data = new OrderListItem();

			UpdateListItem(data, rp.Order, context);
			UpdateListItem(data, rp.Order.Visit, context);
			UpdateListItem(data, rp, context);

			return data;
		}
		private static void UpdateListItem(OrderListItem data, Order order, IPersistenceContext context)
		{
			var practitionerAssembler = new ExternalPractitionerAssembler();
			var dsAssembler = new DiagnosticServiceAssembler();
			var facilityAssembler = new FacilityAssembler();

			data.OrderRef = order.GetRef();
			data.PlacerNumber = order.PlacerNumber;
			data.AccessionNumber = order.AccessionNumber;
			data.DiagnosticService = dsAssembler.CreateSummary(order.DiagnosticService);
			data.EnteredTime = order.EnteredTime;
			data.SchedulingRequestTime = order.SchedulingRequestTime;
			data.OrderingPractitioner = practitionerAssembler.CreateExternalPractitionerSummary(order.OrderingPractitioner, context);
			data.OrderingFacility = facilityAssembler.CreateFacilitySummary(order.OrderingFacility);
			data.ReasonForStudy = order.ReasonForStudy;
			data.OrderPriority = EnumUtils.GetEnumValueInfo(order.Priority, context);
			data.CancelReason = order.CancelInfo != null && order.CancelInfo.Reason != null ? EnumUtils.GetEnumValueInfo(order.CancelInfo.Reason) : null;
			data.OrderStatus = EnumUtils.GetEnumValueInfo(order.Status, context);
			data.OrderScheduledStartTime = order.ScheduledStartTime;
		}
		private static void UpdateListItem(OrderListItem data, Procedure rp, IPersistenceContext context)
		{
			var rptAssembler = new ProcedureTypeAssembler();
			data.ProcedureRef = rp.GetRef();
			data.ProcedureType = rptAssembler.CreateSummary(rp.Type);
			data.ProcedureScheduledStartTime = rp.ScheduledStartTime;
			data.ProcedureSchedulingCode = EnumUtils.GetEnumValueInfo(rp.SchedulingCode);
			data.ProcedureCheckInTime = rp.ProcedureCheckIn.CheckInTime;
			data.ProcedureCheckOutTime = rp.ProcedureCheckIn.CheckOutTime;
			data.ProcedureStatus = EnumUtils.GetEnumValueInfo(rp.Status, context);
			data.ProcedurePerformingFacility = new FacilityAssembler().CreateFacilitySummary(rp.PerformingFacility);
			data.ProcedurePortable = rp.Portable;
			data.ProcedureLaterality = EnumUtils.GetEnumValueInfo(rp.Laterality, context);
		}
		/// <summary>
		/// Formats the procedure name, portable and laterality similar to "Name (Portable/Laterality)".  
		/// Name is formatted according to the default person name format as specified in <see cref="FormatSettings"/>
		/// </summary>
		/// <param name="item"></param>
		/// <returns></returns>
		public static string Format(OrderListItem item)
		{
			return Format(item.ProcedureType.Name, item.ProcedurePortable, item.ProcedureLaterality, FormatSettings.Default.ProcedurePortableLateralityDefaultFormat);
		}