public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as SupplyRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.SupplyRequest.SupplyRequestStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (OrderedItem != null) { dest.OrderedItem = (Hl7.Fhir.Model.SupplyRequest.OrderedItemComponent)OrderedItem.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.SupplyRequest.RequesterComponent)Requester.DeepCopy(); } if (Supplier != null) { dest.Supplier = new List <Hl7.Fhir.Model.ResourceReference>(Supplier.DeepCopy()); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.DataType)Reason.DeepCopy(); } if (DeliverFrom != null) { dest.DeliverFrom = (Hl7.Fhir.Model.ResourceReference)DeliverFrom.DeepCopy(); } if (DeliverTo != null) { dest.DeliverTo = (Hl7.Fhir.Model.ResourceReference)DeliverTo.DeepCopy(); } return(dest); }
private void Swap(int index0, int index1) { PriorityElement temp = _list[index1]; _list[index1] = _list[index0]; _list[index0] = temp; }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Appointment; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Appointment.AppointmentStatus>)StatusElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.CodeableConcept)Reason.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Hl7.Fhir.Model.UnsignedInt)PriorityElement.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (StartElement != null) { dest.StartElement = (Hl7.Fhir.Model.Instant)StartElement.DeepCopy(); } if (EndElement != null) { dest.EndElement = (Hl7.Fhir.Model.Instant)EndElement.DeepCopy(); } if (MinutesDurationElement != null) { dest.MinutesDurationElement = (Hl7.Fhir.Model.PositiveInt)MinutesDurationElement.DeepCopy(); } if (Slot != null) { dest.Slot = new List <Hl7.Fhir.Model.ResourceReference>(Slot.DeepCopy()); } if (CommentElement != null) { dest.CommentElement = (Hl7.Fhir.Model.FhirString)CommentElement.DeepCopy(); } if (Participant != null) { dest.Participant = new List <Hl7.Fhir.Model.Appointment.ParticipantComponent>(Participant.DeepCopy()); } return(dest); }
void Grow() { var newheap = new PriorityElement[capacity * 2 + 1]; Array.Copy(heap, newheap, heap.Length); heap = newheap; capacity = capacity * 2; }
public void Enqueue(PriorityElement p) { //Insert into the list _list.Insert(end, p); //'Bubble' up to the correct position BubbleUp(end); //Increase element count end++; }
public void Enqueue(T item, int priority) { if (Count == capacity) { Grow(); } heap[++Count] = new PriorityElement(item, priority); Swim(Count); //Debug.Assert(IsMinHeap()); }
public void Add(PriorityElement <T> element) { int index; for (index = 0; index < Queue.Count; index++) { if (element.Priority < Queue[index].Priority) { break; } } Queue.Insert(index, element); }
public override ErrorList Validate() { var result = new ErrorList(); result.AddRange(base.Validate()); if (Subject != null) { result.AddRange(Subject.Validate()); } if (Orderer != null) { result.AddRange(Orderer.Validate()); } if (Identifier != null) { Identifier.ForEach(elem => result.AddRange(elem.Validate())); } if (Encounter != null) { result.AddRange(Encounter.Validate()); } if (ClinicalNotesElement != null) { result.AddRange(ClinicalNotesElement.Validate()); } if (Specimen != null) { Specimen.ForEach(elem => result.AddRange(elem.Validate())); } if (StatusElement != null) { result.AddRange(StatusElement.Validate()); } if (PriorityElement != null) { result.AddRange(PriorityElement.Validate()); } if (Event != null) { Event.ForEach(elem => result.AddRange(elem.Validate())); } if (Item != null) { Item.ForEach(elem => result.AddRange(elem.Validate())); } return(result); }
public PriorityElement this[int index] { get { PriorityElement deflt = new PriorityElement(); deflt.priority = double.MaxValue; if (index < count) { return(heap[index]); } else { return(deflt); } } }
private void CalculatePath() { Path.Clear(); Vector2 currentPos = Vector2Int.RoundToInt(transform.position); Dictionary <Vector2, Vector2> cameFrom = new Dictionary <Vector2, Vector2>(); Dictionary <Vector2, float> costSoFar = new Dictionary <Vector2, float> { { currentPos, 0 } }; PriorityQueue <Vector2> checkTileQueue = new PriorityQueue <Vector2>(); checkTileQueue.Add(new PriorityElement <Vector2>(currentPos, GetHueristic(currentPos))); while (!checkTileQueue.IsEmpty()) { PriorityElement <Vector2> _CurrentElement = checkTileQueue.Dequeue(); if (_CurrentElement.Item.Equals(target)) { break; } List <Vector2> possibleMoves = GetAdjacents(_CurrentElement.Item); foreach (Vector2 _move in possibleMoves) { float cost = costSoFar[_CurrentElement.Item] + StepSize; if (!costSoFar.ContainsKey(_move)) { costSoFar.Add(_move, cost); AddPossibleMove(cost, _move, checkTileQueue, cameFrom, _CurrentElement.Item); } else if (cost < costSoFar[_move]) { costSoFar[_move] = cost; AddPossibleMove(cost, _move, checkTileQueue, cameFrom, _CurrentElement.Item); } } } if (cameFrom.ContainsKey(target)) { GeneratePath(cameFrom, currentPos); } }
private void BubbleUp( ) { int i, p; for (i = min_heap.Count - 1; i > 0; i = p) { p = (i - 1) / 2; if (min_heap[i].Priority > min_heap[p].Priority) { break; } PriorityElement tmp = min_heap[i]; min_heap[i] = min_heap[p]; min_heap[p] = tmp; } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as CoverageComponent; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Coverage != null) { dest.Coverage = (Hl7.Fhir.Model.ResourceReference)Coverage.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Hl7.Fhir.Model.PositiveInt)PriorityElement.DeepCopy(); } return(dest); }
public void structs_are_rendered_as_table() { var source = new PriorityElement { Url = "Test struct", Priority = 112 }; var rendering = _engine.Render(source); rendering.Mime.Should().Be("text/html"); var html = new HtmlDocument(); html.LoadHtml(rendering.Content.ToString()); var table = html.DocumentNode.SelectSingleNode("table"); table.Should().NotBeNull(); table.SelectNodes("//td") .Select(n => n.InnerText) .Should() .BeEquivalentTo("Url", source.Url, "Priority", "112"); }
public void Add(T element, double priority) { if (heap.Length == count) { var newHeap = new PriorityElement[count * 2]; heap.CopyTo(newHeap, 0); heap = newHeap; } heap[count++] = new PriorityElement(element, priority); var index = count - 1; while (heap[index].priority < heap[Parent(index)].priority) { var temp = heap[index]; heap[index] = heap[Parent(index)]; heap[Parent(index)] = temp; index = Parent(index); } }
public PriorityElement Dequeue() { if (IsEmpty()) { return(null); } else { //Store the top element in a temporary location PriorityElement result = _list[1]; //Swap the top and bottom elements of the list Swap(end - 1, 1); //Set the bottom element to null (which is now the top element) //-This is fine as we have saved it in a temporary location _list[end - 1] = null; end--; BubbleDown(); return(result); } }
private void BubbleDown() { int i, j, p = 0; for (i = 1; i <= min_heap.Count - 1; i = (p * 2 + 1)) { if ((j = i + 1) <= (min_heap.Count - 1) && (min_heap[j].Priority < min_heap[i].Priority)) { i = j; } if (min_heap[i].Priority > min_heap[p].Priority) { break; } PriorityElement tmp = min_heap[p]; min_heap[p] = min_heap[i]; min_heap[i] = tmp; p = i; } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DeviceRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (InstantiatesCanonicalElement != null) { dest.InstantiatesCanonicalElement = new List <Hl7.Fhir.Model.Canonical>(InstantiatesCanonicalElement.DeepCopy()); } if (InstantiatesUriElement != null) { dest.InstantiatesUriElement = new List <Hl7.Fhir.Model.FhirUri>(InstantiatesUriElement.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PriorRequest != null) { dest.PriorRequest = new List <Hl7.Fhir.Model.ResourceReference>(PriorRequest.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (IntentElement != null) { dest.IntentElement = (Code <Hl7.Fhir.Model.RequestIntent>)IntentElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableReference)Code.DeepCopy(); } if (Parameter != null) { dest.Parameter = new List <Hl7.Fhir.Model.DeviceRequest.ParameterComponent>(Parameter.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (PerformerType != null) { dest.PerformerType = (Hl7.Fhir.Model.CodeableConcept)PerformerType.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy()); } if (Insurance != null) { dest.Insurance = new List <Hl7.Fhir.Model.ResourceReference>(Insurance.DeepCopy()); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as CommunicationRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Topic != null) { dest.Topic = new List <Hl7.Fhir.Model.ResourceReference>(Topic.DeepCopy()); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.CommunicationRequest.PayloadComponent>(Payload.DeepCopy()); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.CommunicationRequest.RequesterComponent)Requester.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DeviceUseRequest; if (dest != null) { base.CopyTo(dest); if (BodySite != null) { dest.BodySite = (Hl7.Fhir.Model.Element)BodySite.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DeviceUseRequest.DeviceUseRequestStatus>)StatusElement.DeepCopy(); } if (Device != null) { dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Indication != null) { dest.Indication = new List <Hl7.Fhir.Model.CodeableConcept>(Indication.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = new List <Hl7.Fhir.Model.FhirString>(NotesElement.DeepCopy()); } if (PrnReason != null) { dest.PrnReason = new List <Hl7.Fhir.Model.CodeableConcept>(PrnReason.DeepCopy()); } if (OrderedOnElement != null) { dest.OrderedOnElement = (Hl7.Fhir.Model.FhirDateTime)OrderedOnElement.DeepCopy(); } if (RecordedOnElement != null) { dest.RecordedOnElement = (Hl7.Fhir.Model.FhirDateTime)RecordedOnElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Timing != null) { dest.Timing = (Hl7.Fhir.Model.Element)Timing.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.DeviceUseRequest.DeviceUseRequestPriority>)PriorityElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DiagnosticOrder; if (dest != null) { base.CopyTo(dest); if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Orderer != null) { dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy()); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } if (Specimen != null) { dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>)StatusElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderPriority>)PriorityElement.DeepCopy(); } if (Event != null) { dest.Event = new List <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderEventComponent>(Event.DeepCopy()); } if (Item != null) { dest.Item = new List <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderItemComponent>(Item.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ProcedureRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Definition != null) { dest.Definition = new List <Hl7.Fhir.Model.ResourceReference>(Definition.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (Requisition != null) { dest.Requisition = (Hl7.Fhir.Model.Identifier)Requisition.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (IntentElement != null) { dest.IntentElement = (Code <Hl7.Fhir.Model.RequestIntent>)IntentElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (DoNotPerformElement != null) { dest.DoNotPerformElement = (Hl7.Fhir.Model.FhirBoolean)DoNotPerformElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (AsNeeded != null) { dest.AsNeeded = (Hl7.Fhir.Model.DataType)AsNeeded.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ProcedureRequest.RequesterComponent)Requester.DeepCopy(); } if (PerformerType != null) { dest.PerformerType = (Hl7.Fhir.Model.CodeableConcept)PerformerType.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Specimen != null) { dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy()); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }
public bool Beats(PriorityElement p) { return(this.priority < p.priority); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ProcedureRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.Element)Reason.DeepCopy(); } if (Scheduled != null) { dest.Scheduled = (Hl7.Fhir.Model.Element)Scheduled.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestStatus>)StatusElement.DeepCopy(); } if (Notes != null) { dest.Notes = new List <Hl7.Fhir.Model.Annotation>(Notes.DeepCopy()); } if (AsNeeded != null) { dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy(); } if (OrderedOnElement != null) { dest.OrderedOnElement = (Hl7.Fhir.Model.FhirDateTime)OrderedOnElement.DeepCopy(); } if (Orderer != null) { dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestPriority>)PriorityElement.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ReferralRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Definition != null) { dest.Definition = new List <Hl7.Fhir.Model.ResourceReference>(Definition.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (IntentElement != null) { dest.IntentElement = (Code <Hl7.Fhir.Model.RequestIntent>)IntentElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (ServiceRequested != null) { dest.ServiceRequested = new List <Hl7.Fhir.Model.CodeableConcept>(ServiceRequested.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ReferralRequest.RequesterComponent)Requester.DeepCopy(); } if (Specialty != null) { dest.Specialty = (Hl7.Fhir.Model.CodeableConcept)Specialty.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Communication; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (InstantiatesCanonicalElement != null) { dest.InstantiatesCanonicalElement = new List <Hl7.Fhir.Model.Canonical>(InstantiatesCanonicalElement.DeepCopy()); } if (InstantiatesUriElement != null) { dest.InstantiatesUriElement = new List <Hl7.Fhir.Model.FhirUri>(InstantiatesUriElement.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (InResponseTo != null) { dest.InResponseTo = new List <Hl7.Fhir.Model.ResourceReference>(InResponseTo.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = (Hl7.Fhir.Model.CodeableConcept)StatusReason.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Topic != null) { dest.Topic = (Hl7.Fhir.Model.CodeableConcept)Topic.DeepCopy(); } if (About != null) { dest.About = new List <Hl7.Fhir.Model.ResourceReference>(About.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (SentElement != null) { dest.SentElement = (Hl7.Fhir.Model.FhirDateTime)SentElement.DeepCopy(); } if (ReceivedElement != null) { dest.ReceivedElement = (Hl7.Fhir.Model.FhirDateTime)ReceivedElement.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.Communication.PayloadComponent>(Payload.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public bool Beats(PriorityElement p) { return (this.priority < p.priority); }