Exemplo n.º 1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as FamilyMemberHistory;

            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 (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.FamilyMemberHistory.FamilyHistoryStatus>)StatusElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (Relationship != null)
            {
                dest.Relationship = (Hl7.Fhir.Model.CodeableConcept)Relationship.DeepCopy();
            }
            if (GenderElement != null)
            {
                dest.GenderElement = (Code <Hl7.Fhir.Model.AdministrativeGender>)GenderElement.DeepCopy();
            }
            if (Born != null)
            {
                dest.Born = (Hl7.Fhir.Model.DataType)Born.DeepCopy();
            }
            if (Age != null)
            {
                dest.Age = (Hl7.Fhir.Model.DataType)Age.DeepCopy();
            }
            if (Deceased != null)
            {
                dest.Deceased = (Hl7.Fhir.Model.DataType)Deceased.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = (Hl7.Fhir.Model.Annotation)Note.DeepCopy();
            }
            if (Condition != null)
            {
                dest.Condition = new List <Hl7.Fhir.Model.FamilyMemberHistory.ConditionComponent>(Condition.DeepCopy());
            }
            return(dest);
        }
    public override IDeepCopyable CopyTo(IDeepCopyable other)
    {
      var dest = other as FamilyMemberHistory;

      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(StatusElement != null) dest.StatusElement = (Code<Hl7.Fhir.Model.FamilyMemberHistory.FamilyHistoryStatus>)StatusElement.DeepCopy();
      if(DataAbsentReason != null) dest.DataAbsentReason = (Hl7.Fhir.Model.CodeableConcept)DataAbsentReason.DeepCopy();
      if(Patient != null) dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
      if(DateElement != null) dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
      if(NameElement != null) dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
      if(Relationship != null) dest.Relationship = (Hl7.Fhir.Model.CodeableConcept)Relationship.DeepCopy();
      if(Sex != null) dest.Sex = (Hl7.Fhir.Model.CodeableConcept)Sex.DeepCopy();
      if(Born != null) dest.Born = (Hl7.Fhir.Model.Element)Born.DeepCopy();
      if(Age != null) dest.Age = (Hl7.Fhir.Model.Element)Age.DeepCopy();
      if(EstimatedAgeElement != null) dest.EstimatedAgeElement = (Hl7.Fhir.Model.FhirBoolean)EstimatedAgeElement.DeepCopy();
      if(Deceased != null) dest.Deceased = (Hl7.Fhir.Model.Element)Deceased.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());
      if(Condition != null) dest.Condition = new List<Hl7.Fhir.Model.FamilyMemberHistory.ConditionComponent>(Condition.DeepCopy());
      return dest;
    }
Exemplo n.º 3
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as FamilyHistoryRelationComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (NameElement != null)
                    {
                        dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                    }
                    if (Relationship != null)
                    {
                        dest.Relationship = (Hl7.Fhir.Model.CodeableConcept)Relationship.DeepCopy();
                    }
                    if (Born != null)
                    {
                        dest.Born = (Hl7.Fhir.Model.Element)Born.DeepCopy();
                    }
                    if (Deceased != null)
                    {
                        dest.Deceased = (Hl7.Fhir.Model.Element)Deceased.DeepCopy();
                    }
                    if (NoteElement != null)
                    {
                        dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.DeepCopy();
                    }
                    if (Condition != null)
                    {
                        dest.Condition = new List <Hl7.Fhir.Model.FamilyHistory.FamilyHistoryRelationConditionComponent>(Condition.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Exemplo n.º 4
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Patient;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Name != null)
                {
                    dest.Name = new List <Hl7.Fhir.Model.HumanName>(Name.DeepCopy());
                }
                if (Telecom != null)
                {
                    dest.Telecom = new List <Hl7.Fhir.Model.Contact>(Telecom.DeepCopy());
                }
                if (Gender != null)
                {
                    dest.Gender = (Hl7.Fhir.Model.CodeableConcept)Gender.DeepCopy();
                }
                if (BirthDateElement != null)
                {
                    dest.BirthDateElement = (Hl7.Fhir.Model.FhirDateTime)BirthDateElement.DeepCopy();
                }
                if (Deceased != null)
                {
                    dest.Deceased = (Hl7.Fhir.Model.Element)Deceased.DeepCopy();
                }
                if (Address != null)
                {
                    dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy());
                }
                if (MaritalStatus != null)
                {
                    dest.MaritalStatus = (Hl7.Fhir.Model.CodeableConcept)MaritalStatus.DeepCopy();
                }
                if (MultipleBirth != null)
                {
                    dest.MultipleBirth = (Hl7.Fhir.Model.Element)MultipleBirth.DeepCopy();
                }
                if (Photo != null)
                {
                    dest.Photo = new List <Hl7.Fhir.Model.Attachment>(Photo.DeepCopy());
                }
                if (Contact != null)
                {
                    dest.Contact = new List <Hl7.Fhir.Model.Patient.ContactComponent>(Contact.DeepCopy());
                }
                if (Animal != null)
                {
                    dest.Animal = (Hl7.Fhir.Model.Patient.AnimalComponent)Animal.DeepCopy();
                }
                if (Communication != null)
                {
                    dest.Communication = new List <Hl7.Fhir.Model.CodeableConcept>(Communication.DeepCopy());
                }
                if (CareProvider != null)
                {
                    dest.CareProvider = new List <Hl7.Fhir.Model.ResourceReference>(CareProvider.DeepCopy());
                }
                if (ManagingOrganization != null)
                {
                    dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy();
                }
                if (Link != null)
                {
                    dest.Link = new List <Hl7.Fhir.Model.Patient.PatientLinkComponent>(Link.DeepCopy());
                }
                if (ActiveElement != null)
                {
                    dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }