示例#1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as PredictionComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Outcome != null)
                    {
                        dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
                    }
                    if (Probability != null)
                    {
                        dest.Probability = (Hl7.Fhir.Model.Element)Probability.DeepCopy();
                    }
                    if (RelativeRiskElement != null)
                    {
                        dest.RelativeRiskElement = (Hl7.Fhir.Model.FhirDecimal)RelativeRiskElement.DeepCopy();
                    }
                    if (When != null)
                    {
                        dest.When = (Hl7.Fhir.Model.Element)When.DeepCopy();
                    }
                    if (RationaleElement != null)
                    {
                        dest.RationaleElement = (Hl7.Fhir.Model.FhirString)RationaleElement.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 FamilyMemberHistoryConditionComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Type != null)
                    {
                        dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
                    }
                    if (Outcome != null)
                    {
                        dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
                    }
                    if (Onset != null)
                    {
                        dest.Onset = (Hl7.Fhir.Model.Element)Onset.DeepCopy();
                    }
                    if (NoteElement != null)
                    {
                        dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.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 ConditionComponent;

                if (dest == null)
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }

                base.CopyTo(dest);
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (Outcome != null)
                {
                    dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
                }
                if (Onset != null)
                {
                    dest.Onset = (Hl7.Fhir.Model.DataType)Onset.DeepCopy();
                }
                if (Note != null)
                {
                    dest.Note = (Hl7.Fhir.Model.Annotation)Note.DeepCopy();
                }
                return(dest);
            }
        public void DiscardsDuplicateOutcomesWhenAdded()
        {
            Outcome outcomeOne = NewOutcome();
            Outcome outcomeTwo = outcomeOne.DeepCopy();

            _job.AddOutcome(outcomeOne);
            _job.AddOutcome(outcomeTwo);

            _job.Outcomes
            .Should()
            .BeEquivalentTo(new object[]
            {
                outcomeOne
            });
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as EnrollmentResponse;

            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.FinancialResourceStatusCodes>)StatusElement.DeepCopy();
            }
            if (Request != null)
            {
                dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
            }
            if (Outcome != null)
            {
                dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
            }
            if (DispositionElement != null)
            {
                dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy();
            }
            if (CreatedElement != null)
            {
                dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy();
            }
            if (Organization != null)
            {
                dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy();
            }
            if (RequestProvider != null)
            {
                dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy();
            }
            if (RequestOrganization != null)
            {
                dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.DeepCopy();
            }
            return(dest);
        }
      public override IDeepCopyable CopyTo(IDeepCopyable other)
      {
        var dest = other as ConditionComponent;

        if (dest == null)
        {
          throw new ArgumentException("Can only copy to an object of the same type", "other");
        }

        base.CopyTo(dest);
        if(Code != null) dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
        if(Outcome != null) dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
        if(ContributedToDeathElement != null) dest.ContributedToDeathElement = (Hl7.Fhir.Model.FhirBoolean)ContributedToDeathElement.DeepCopy();
        if(Onset != null) dest.Onset = (Hl7.Fhir.Model.Element)Onset.DeepCopy();
        if(Note != null) dest.Note = new List<Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
        return dest;
      }
示例#7
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Procedure;

            if (dest != null)
            {
                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 (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.Procedure.ProcedureStatus>)StatusElement.DeepCopy();
                }
                if (Category != null)
                {
                    dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy();
                }
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (NotPerformedElement != null)
                {
                    dest.NotPerformedElement = (Hl7.Fhir.Model.FhirBoolean)NotPerformedElement.DeepCopy();
                }
                if (ReasonNotPerformed != null)
                {
                    dest.ReasonNotPerformed = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonNotPerformed.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 (Performer != null)
                {
                    dest.Performer = new List <Hl7.Fhir.Model.Procedure.PerformerComponent>(Performer.DeepCopy());
                }
                if (Performed != null)
                {
                    dest.Performed = (Hl7.Fhir.Model.Element)Performed.DeepCopy();
                }
                if (Encounter != null)
                {
                    dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
                }
                if (Location != null)
                {
                    dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy();
                }
                if (Outcome != null)
                {
                    dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
                }
                if (Report != null)
                {
                    dest.Report = new List <Hl7.Fhir.Model.ResourceReference>(Report.DeepCopy());
                }
                if (Complication != null)
                {
                    dest.Complication = new List <Hl7.Fhir.Model.CodeableConcept>(Complication.DeepCopy());
                }
                if (FollowUp != null)
                {
                    dest.FollowUp = new List <Hl7.Fhir.Model.CodeableConcept>(FollowUp.DeepCopy());
                }
                if (Request != null)
                {
                    dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
                }
                if (Notes != null)
                {
                    dest.Notes = new List <Hl7.Fhir.Model.Annotation>(Notes.DeepCopy());
                }
                if (FocalDevice != null)
                {
                    dest.FocalDevice = new List <Hl7.Fhir.Model.Procedure.FocalDeviceComponent>(FocalDevice.DeepCopy());
                }
                if (Used != null)
                {
                    dest.Used = new List <Hl7.Fhir.Model.ResourceReference>(Used.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 PaymentReconciliation;

            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.FinancialResourceStatusCodes>)StatusElement.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (CreatedElement != null)
            {
                dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy();
            }
            if (Organization != null)
            {
                dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy();
            }
            if (Request != null)
            {
                dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
            }
            if (Outcome != null)
            {
                dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
            }
            if (DispositionElement != null)
            {
                dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy();
            }
            if (RequestProvider != null)
            {
                dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy();
            }
            if (RequestOrganization != null)
            {
                dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.DeepCopy();
            }
            if (Detail != null)
            {
                dest.Detail = new List <Hl7.Fhir.Model.PaymentReconciliation.DetailsComponent>(Detail.DeepCopy());
            }
            if (Form != null)
            {
                dest.Form = (Hl7.Fhir.Model.CodeableConcept)Form.DeepCopy();
            }
            if (Total != null)
            {
                dest.Total = (Hl7.Fhir.Model.Money)Total.DeepCopy();
            }
            if (ProcessNote != null)
            {
                dest.ProcessNote = new List <Hl7.Fhir.Model.PaymentReconciliation.NotesComponent>(ProcessNote.DeepCopy());
            }
            return(dest);
        }
示例#9
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ProcessResponse;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Request != null)
                {
                    dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
                }
                if (Outcome != null)
                {
                    dest.Outcome = (Hl7.Fhir.Model.Coding)Outcome.DeepCopy();
                }
                if (DispositionElement != null)
                {
                    dest.DispositionElement = (Hl7.Fhir.Model.FhirString)DispositionElement.DeepCopy();
                }
                if (Ruleset != null)
                {
                    dest.Ruleset = (Hl7.Fhir.Model.Coding)Ruleset.DeepCopy();
                }
                if (OriginalRuleset != null)
                {
                    dest.OriginalRuleset = (Hl7.Fhir.Model.Coding)OriginalRuleset.DeepCopy();
                }
                if (CreatedElement != null)
                {
                    dest.CreatedElement = (Hl7.Fhir.Model.FhirDateTime)CreatedElement.DeepCopy();
                }
                if (Organization != null)
                {
                    dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy();
                }
                if (RequestProvider != null)
                {
                    dest.RequestProvider = (Hl7.Fhir.Model.ResourceReference)RequestProvider.DeepCopy();
                }
                if (RequestOrganization != null)
                {
                    dest.RequestOrganization = (Hl7.Fhir.Model.ResourceReference)RequestOrganization.DeepCopy();
                }
                if (Form != null)
                {
                    dest.Form = (Hl7.Fhir.Model.Coding)Form.DeepCopy();
                }
                if (Notes != null)
                {
                    dest.Notes = new List <Hl7.Fhir.Model.ProcessResponse.NotesComponent>(Notes.DeepCopy());
                }
                if (Error != null)
                {
                    dest.Error = new List <Hl7.Fhir.Model.Coding>(Error.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 AdverseEvent;

            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 (CategoryElement != null)
            {
                dest.CategoryElement = (Code <Hl7.Fhir.Model.AdverseEvent.AdverseEventCategory>)CategoryElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (Reaction != null)
            {
                dest.Reaction = new List <Hl7.Fhir.Model.ResourceReference>(Reaction.DeepCopy());
            }
            if (Location != null)
            {
                dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy();
            }
            if (Seriousness != null)
            {
                dest.Seriousness = (Hl7.Fhir.Model.CodeableConcept)Seriousness.DeepCopy();
            }
            if (Outcome != null)
            {
                dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
            }
            if (Recorder != null)
            {
                dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy();
            }
            if (EventParticipant != null)
            {
                dest.EventParticipant = (Hl7.Fhir.Model.ResourceReference)EventParticipant.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (SuspectEntity != null)
            {
                dest.SuspectEntity = new List <Hl7.Fhir.Model.AdverseEvent.SuspectEntityComponent>(SuspectEntity.DeepCopy());
            }
            if (SubjectMedicalHistory != null)
            {
                dest.SubjectMedicalHistory = new List <Hl7.Fhir.Model.ResourceReference>(SubjectMedicalHistory.DeepCopy());
            }
            if (ReferenceDocument != null)
            {
                dest.ReferenceDocument = new List <Hl7.Fhir.Model.ResourceReference>(ReferenceDocument.DeepCopy());
            }
            if (Study != null)
            {
                dest.Study = new List <Hl7.Fhir.Model.ResourceReference>(Study.DeepCopy());
            }
            return(dest);
        }
示例#11
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Procedure;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.Procedure.ProcedureStatus>)StatusElement.DeepCopy();
                }
                if (Category != null)
                {
                    dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy();
                }
                if (Type != null)
                {
                    dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
                }
                if (BodySite != null)
                {
                    dest.BodySite = new List <Hl7.Fhir.Model.Procedure.ProcedureBodySiteComponent>(BodySite.DeepCopy());
                }
                if (Indication != null)
                {
                    dest.Indication = new List <Hl7.Fhir.Model.CodeableConcept>(Indication.DeepCopy());
                }
                if (Performer != null)
                {
                    dest.Performer = new List <Hl7.Fhir.Model.Procedure.ProcedurePerformerComponent>(Performer.DeepCopy());
                }
                if (Performed != null)
                {
                    dest.Performed = (Hl7.Fhir.Model.Element)Performed.DeepCopy();
                }
                if (Encounter != null)
                {
                    dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
                }
                if (Location != null)
                {
                    dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy();
                }
                if (Outcome != null)
                {
                    dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
                }
                if (Report != null)
                {
                    dest.Report = new List <Hl7.Fhir.Model.ResourceReference>(Report.DeepCopy());
                }
                if (Complication != null)
                {
                    dest.Complication = new List <Hl7.Fhir.Model.CodeableConcept>(Complication.DeepCopy());
                }
                if (FollowUp != null)
                {
                    dest.FollowUp = new List <Hl7.Fhir.Model.CodeableConcept>(FollowUp.DeepCopy());
                }
                if (RelatedItem != null)
                {
                    dest.RelatedItem = new List <Hl7.Fhir.Model.Procedure.ProcedureRelatedItemComponent>(RelatedItem.DeepCopy());
                }
                if (NotesElement != null)
                {
                    dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy();
                }
                if (Device != null)
                {
                    dest.Device = new List <Hl7.Fhir.Model.Procedure.ProcedureDeviceComponent>(Device.DeepCopy());
                }
                if (Used != null)
                {
                    dest.Used = new List <Hl7.Fhir.Model.ResourceReference>(Used.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }