Esempio n. 1
0
        public void Set(aECGAuthor author)
        {
            if (author == null)
            {
                return;
            }

            if ((author.Device != null) &&
                (this.Device != null) &&
                (author.Organization != null) &&
                (this.Organization != null) &&
                (author.AssignedAuthorType == null) &&
                (this.AssignedAuthorType == null))
            {
                Id.Extension = author.Id.Extension;
                Id.Root      = author.Id.Root;

                Device.Code.Code           = author.Device.Code.Code;
                Device.Code.CodeSystem     = author.Device.Code.CodeSystem;
                Device.Code.CodeSystemName = author.Device.Code.CodeSystemName;
                Device.Code.DisplayName    = author.Device.Code.DisplayName;

                Device.Id.Extension = author.Device.Id.Extension;
                Device.Id.Root      = author.Device.Id.Root;

                Device.manufacturerModelName = author.Device.manufacturerModelName;
                Device.softwareName          = author.Device.softwareName;

                Organization.Id.Extension = author.Organization.Id.Extension;
                Organization.Id.Root      = author.Organization.Id.Root;

                Organization.name = author.Organization.name;
            }
            else if ((author.Device == null) &&
                     (this.Device == null) &&
                     (author.Organization != null) &&
                     (this.Organization != null) &&
                     (author.AssignedAuthorType != null) &&
                     (this.AssignedAuthorType != null))
            {
                Id.Extension = author.Id.Extension;
                Id.Root      = author.Id.Root;

                AssignedAuthorType.Set(author.AssignedAuthorType);

                Organization.Set(author.Organization);
            }
        }