コード例 #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as RelatedPerson;

            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 (ActiveElement != null)
            {
                dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (Relationship != null)
            {
                dest.Relationship = new List <Hl7.Fhir.Model.CodeableConcept>(Relationship.DeepCopy());
            }
            if (Name != null)
            {
                dest.Name = new List <Hl7.Fhir.Model.HumanName>(Name.DeepCopy());
            }
            if (Telecom != null)
            {
                dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
            }
            if (GenderElement != null)
            {
                dest.GenderElement = (Code <Hl7.Fhir.Model.AdministrativeGender>)GenderElement.DeepCopy();
            }
            if (BirthDateElement != null)
            {
                dest.BirthDateElement = (Hl7.Fhir.Model.Date)BirthDateElement.DeepCopy();
            }
            if (Address != null)
            {
                dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy());
            }
            if (Photo != null)
            {
                dest.Photo = new List <Hl7.Fhir.Model.Attachment>(Photo.DeepCopy());
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Communication != null)
            {
                dest.Communication = new List <Hl7.Fhir.Model.RelatedPerson.CommunicationComponent>(Communication.DeepCopy());
            }
            return(dest);
        }
コード例 #2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Practitioner;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (ActiveElement != null)
                {
                    dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy();
                }
                if (Name != null)
                {
                    dest.Name = (Hl7.Fhir.Model.HumanName)Name.DeepCopy();
                }
                if (Telecom != null)
                {
                    dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
                }
                if (Address != null)
                {
                    dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy());
                }
                if (GenderElement != null)
                {
                    dest.GenderElement = (Code <Hl7.Fhir.Model.AdministrativeGender>)GenderElement.DeepCopy();
                }
                if (BirthDateElement != null)
                {
                    dest.BirthDateElement = (Hl7.Fhir.Model.Date)BirthDateElement.DeepCopy();
                }
                if (Photo != null)
                {
                    dest.Photo = new List <Hl7.Fhir.Model.Attachment>(Photo.DeepCopy());
                }
                if (PractitionerRole != null)
                {
                    dest.PractitionerRole = new List <Hl7.Fhir.Model.Practitioner.PractitionerRoleComponent>(PractitionerRole.DeepCopy());
                }
                if (Qualification != null)
                {
                    dest.Qualification = new List <Hl7.Fhir.Model.Practitioner.QualificationComponent>(Qualification.DeepCopy());
                }
                if (Communication != null)
                {
                    dest.Communication = new List <Hl7.Fhir.Model.CodeableConcept>(Communication.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
コード例 #3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Person;

            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.ContactPoint>(Telecom.DeepCopy());
                }
                if (GenderElement != null)
                {
                    dest.GenderElement = (Code <Hl7.Fhir.Model.AdministrativeGender>)GenderElement.DeepCopy();
                }
                if (BirthDateElement != null)
                {
                    dest.BirthDateElement = (Hl7.Fhir.Model.Date)BirthDateElement.DeepCopy();
                }
                if (Address != null)
                {
                    dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy());
                }
                if (Photo != null)
                {
                    dest.Photo = (Hl7.Fhir.Model.Attachment)Photo.DeepCopy();
                }
                if (ManagingOrganization != null)
                {
                    dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy();
                }
                if (ActiveElement != null)
                {
                    dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy();
                }
                if (Link != null)
                {
                    dest.Link = new List <Hl7.Fhir.Model.Person.LinkComponent>(Link.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
コード例 #4
0
ファイル: Patient.cs プロジェクト: TonyAbell/fhir-net-api
        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");
            }
        }
コード例 #5
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Practitioner;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Name != null)
                {
                    dest.Name = (Hl7.Fhir.Model.HumanName)Name.DeepCopy();
                }
                if (Telecom != null)
                {
                    dest.Telecom = new List <Hl7.Fhir.Model.Contact>(Telecom.DeepCopy());
                }
                if (Address != null)
                {
                    dest.Address = (Hl7.Fhir.Model.Address)Address.DeepCopy();
                }
                if (Gender != null)
                {
                    dest.Gender = (Hl7.Fhir.Model.CodeableConcept)Gender.DeepCopy();
                }
                if (BirthDateElement != null)
                {
                    dest.BirthDateElement = (Hl7.Fhir.Model.FhirDateTime)BirthDateElement.DeepCopy();
                }
                if (Photo != null)
                {
                    dest.Photo = new List <Hl7.Fhir.Model.Attachment>(Photo.DeepCopy());
                }
                if (Organization != null)
                {
                    dest.Organization = (Hl7.Fhir.Model.ResourceReference)Organization.DeepCopy();
                }
                if (Role != null)
                {
                    dest.Role = new List <Hl7.Fhir.Model.CodeableConcept>(Role.DeepCopy());
                }
                if (Specialty != null)
                {
                    dest.Specialty = new List <Hl7.Fhir.Model.CodeableConcept>(Specialty.DeepCopy());
                }
                if (Period != null)
                {
                    dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
                }
                if (Location != null)
                {
                    dest.Location = new List <Hl7.Fhir.Model.ResourceReference>(Location.DeepCopy());
                }
                if (Qualification != null)
                {
                    dest.Qualification = new List <Hl7.Fhir.Model.Practitioner.PractitionerQualificationComponent>(Qualification.DeepCopy());
                }
                if (Communication != null)
                {
                    dest.Communication = new List <Hl7.Fhir.Model.CodeableConcept>(Communication.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
コード例 #6
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Identifier != null)
            {
                Identifier.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Name != null)
            {
                result.AddRange(Name.Validate());
            }
            if (Telecom != null)
            {
                Telecom.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Address != null)
            {
                result.AddRange(Address.Validate());
            }
            if (Gender != null)
            {
                result.AddRange(Gender.Validate());
            }
            if (BirthDateElement != null)
            {
                result.AddRange(BirthDateElement.Validate());
            }
            if (Photo != null)
            {
                Photo.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Organization != null)
            {
                result.AddRange(Organization.Validate());
            }
            if (Role != null)
            {
                Role.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Specialty != null)
            {
                Specialty.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Period != null)
            {
                result.AddRange(Period.Validate());
            }
            if (Qualification != null)
            {
                Qualification.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Communication != null)
            {
                Communication.ForEach(elem => result.AddRange(elem.Validate()));
            }

            return(result);
        }
コード例 #7
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Identifier != null)
            {
                Identifier.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Name != null)
            {
                Name.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Telecom != null)
            {
                Telecom.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Gender != null)
            {
                result.AddRange(Gender.Validate());
            }
            if (BirthDateElement != null)
            {
                result.AddRange(BirthDateElement.Validate());
            }
            if (Deceased != null)
            {
                result.AddRange(Deceased.Validate());
            }
            if (Address != null)
            {
                Address.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (MaritalStatus != null)
            {
                result.AddRange(MaritalStatus.Validate());
            }
            if (MultipleBirth != null)
            {
                result.AddRange(MultipleBirth.Validate());
            }
            if (Photo != null)
            {
                Photo.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Contact != null)
            {
                Contact.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Animal != null)
            {
                result.AddRange(Animal.Validate());
            }
            if (Communication != null)
            {
                Communication.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Provider != null)
            {
                result.AddRange(Provider.Validate());
            }
            if (Link != null)
            {
                Link.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (ActiveElement != null)
            {
                result.AddRange(ActiveElement.Validate());
            }

            return(result);
        }