public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ContactDetail;

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

            base.CopyTo(dest);
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (Telecom != null)
            {
                dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 2
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Identifier != null)
            {
                result.AddRange(Identifier.Validate());
            }
            if (TypeElement != null)
            {
                result.AddRange(TypeElement.Validate());
            }
            if (ActualElement != null)
            {
                result.AddRange(ActualElement.Validate());
            }
            if (Code != null)
            {
                result.AddRange(Code.Validate());
            }
            if (NameElement != null)
            {
                result.AddRange(NameElement.Validate());
            }
            if (QuantityElement != null)
            {
                result.AddRange(QuantityElement.Validate());
            }
            if (Characteristic != null)
            {
                Characteristic.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Member != null)
            {
                Member.ForEach(elem => result.AddRange(elem.Validate()));
            }

            return(result);
        }
Ejemplo n.º 3
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Identifier != null)
            {
                Identifier.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (NameElement != null)
            {
                result.AddRange(NameElement.Validate());
            }
            if (Type != null)
            {
                result.AddRange(Type.Validate());
            }
            if (Telecom != null)
            {
                Telecom.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (Address != null)
            {
                Address.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (PartOf != null)
            {
                result.AddRange(PartOf.Validate());
            }
            if (Contact != null)
            {
                Contact.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (ActiveElement != null)
            {
                result.AddRange(ActiveElement.Validate());
            }

            return(result);
        }
Ejemplo n.º 4
0
 public static void RenderNames(
     Interpreter interpreter,
     IFormatting?formatting,
     string[] variables,
     TermName?[] terms,
     string?subsequentAuthorSubstitute,
     SubsequentAuthorSubstituteRules?subsequentAuthorSubstituteRule,
     NameElement name,
     EtAlElement?etAl,
     LabelElement?label,
     Func <NameElement?, EtAlElement?, LabelElement?, bool>[] substitutes)
 {
     if (!RenderNameGroups(interpreter, formatting, variables, terms, false, subsequentAuthorSubstitute, subsequentAuthorSubstituteRule, name, etAl, label))
     {
         int i = 0;
         while (i < substitutes.Length && !substitutes[i].Invoke(name, etAl, label))
         {
             i++;
         }
     }
 }
Ejemplo n.º 5
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (NameElement != null)
                {
                    result.AddRange(NameElement.Validate());
                }
                if (Target != null)
                {
                    result.AddRange(Target.Validate());
                }
                if (EndpointElement != null)
                {
                    result.AddRange(EndpointElement.Validate());
                }

                return(result);
            }
Ejemplo n.º 6
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ParameterDefinition;

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

            base.CopyTo(dest);
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.Code)NameElement.DeepCopy();
            }
            if (UseElement != null)
            {
                dest.UseElement = (Code <Hl7.Fhir.Model.OperationParameterUse>)UseElement.DeepCopy();
            }
            if (MinElement != null)
            {
                dest.MinElement = (Hl7.Fhir.Model.Integer)MinElement.DeepCopy();
            }
            if (MaxElement != null)
            {
                dest.MaxElement = (Hl7.Fhir.Model.FhirString)MaxElement.DeepCopy();
            }
            if (DocumentationElement != null)
            {
                dest.DocumentationElement = (Hl7.Fhir.Model.FhirString)DocumentationElement.DeepCopy();
            }
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.FHIRAllTypes>)TypeElement.DeepCopy();
            }
            if (ProfileElement != null)
            {
                dest.ProfileElement = (Hl7.Fhir.Model.Canonical)ProfileElement.DeepCopy();
            }
            return(dest);
        }
Ejemplo n.º 7
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as DocumentReferenceServiceParameterComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (NameElement != null)
                    {
                        dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                    }
                    if (ValueElement != null)
                    {
                        dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Ejemplo n.º 8
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");
                }
            }
Ejemplo n.º 9
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (NameElement != null)
            {
                result.AddRange(NameElement.Validate());
            }
            if (Code != null)
            {
                result.AddRange(Code.Validate());
            }
            if (IsBrandElement != null)
            {
                result.AddRange(IsBrandElement.Validate());
            }
            if (Manufacturer != null)
            {
                result.AddRange(Manufacturer.Validate());
            }
            if (KindElement != null)
            {
                result.AddRange(KindElement.Validate());
            }
            if (Product != null)
            {
                result.AddRange(Product.Validate());
            }
            if (Package != null)
            {
                result.AddRange(Package.Validate());
            }

            return(result);
        }
Ejemplo n.º 10
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Contributor;

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

            base.CopyTo(dest);
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.Contributor.ContributorType>)TypeElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 11
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ArmComponent;

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

                base.CopyTo(dest);
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                return(dest);
            }
Ejemplo n.º 12
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as MessageDestinationComponent;

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

                base.CopyTo(dest);
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (Target != null)
                {
                    dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy();
                }
                if (EndpointElement != null)
                {
                    dest.EndpointElement = (Hl7.Fhir.Model.FhirUri)EndpointElement.DeepCopy();
                }
                return(dest);
            }
Ejemplo n.º 13
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as SugarComponent;

                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 (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (ResidueSiteElement != null)
                {
                    dest.ResidueSiteElement = (Hl7.Fhir.Model.FhirString)ResidueSiteElement.DeepCopy();
                }
                return(dest);
            }
Ejemplo n.º 14
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as CatalogEntry;

            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 (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.CatalogEntry.CatalogEntryType>)TypeElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.CatalogEntry.CatalogEntryStatus>)StatusElement.DeepCopy();
            }
            if (EffectivePeriod != null)
            {
                dest.EffectivePeriod = (Hl7.Fhir.Model.Period)EffectivePeriod.DeepCopy();
            }
            if (OrderableElement != null)
            {
                dest.OrderableElement = (Hl7.Fhir.Model.FhirBoolean)OrderableElement.DeepCopy();
            }
            if (ReferencedItem != null)
            {
                dest.ReferencedItem = (Hl7.Fhir.Model.ResourceReference)ReferencedItem.DeepCopy();
            }
            if (RelatedEntry != null)
            {
                dest.RelatedEntry = new List <Hl7.Fhir.Model.CatalogEntry.RelatedEntryComponent>(RelatedEntry.DeepCopy());
            }
            if (UpdatedBy != null)
            {
                dest.UpdatedBy = (Hl7.Fhir.Model.ResourceReference)UpdatedBy.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (EstimatedDuration != null)
            {
                dest.EstimatedDuration = (Hl7.Fhir.Model.Duration)EstimatedDuration.DeepCopy();
            }
            if (BillingCode != null)
            {
                dest.BillingCode = new List <Hl7.Fhir.Model.CodeableConcept>(BillingCode.DeepCopy());
            }
            if (BillingSummaryElement != null)
            {
                dest.BillingSummaryElement = (Hl7.Fhir.Model.FhirString)BillingSummaryElement.DeepCopy();
            }
            if (ScheduleSummaryElement != null)
            {
                dest.ScheduleSummaryElement = (Hl7.Fhir.Model.FhirString)ScheduleSummaryElement.DeepCopy();
            }
            if (LimitationSummaryElement != null)
            {
                dest.LimitationSummaryElement = (Hl7.Fhir.Model.FhirString)LimitationSummaryElement.DeepCopy();
            }
            if (RegulatorySummaryElement != null)
            {
                dest.RegulatorySummaryElement = (Hl7.Fhir.Model.FhirString)RegulatorySummaryElement.DeepCopy();
            }
            return(dest);
        }
Ejemplo n.º 15
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as CompartmentDefinition;

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

            base.CopyTo(dest);
            if (UrlElement != null)
            {
                dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (TitleElement != null)
            {
                dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.PublicationStatus>)StatusElement.DeepCopy();
            }
            if (ExperimentalElement != null)
            {
                dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (PublisherElement != null)
            {
                dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy());
            }
            if (Description != null)
            {
                dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
            }
            if (Purpose != null)
            {
                dest.Purpose = (Hl7.Fhir.Model.Markdown)Purpose.DeepCopy();
            }
            if (UseContext != null)
            {
                dest.UseContext = new List <Hl7.Fhir.Model.UsageContext>(UseContext.DeepCopy());
            }
            if (Jurisdiction != null)
            {
                dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy());
            }
            if (CodeElement != null)
            {
                dest.CodeElement = (Code <Hl7.Fhir.Model.CompartmentType>)CodeElement.DeepCopy();
            }
            if (SearchElement != null)
            {
                dest.SearchElement = (Hl7.Fhir.Model.FhirBoolean)SearchElement.DeepCopy();
            }
            if (Resource != null)
            {
                dest.Resource = new List <Hl7.Fhir.Model.CompartmentDefinition.ResourceComponent>(Resource.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 16
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as EventDefinition;

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

            base.CopyTo(dest);
            if (UrlElement != null)
            {
                dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (VersionElement != null)
            {
                dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (TitleElement != null)
            {
                dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
            }
            if (SubtitleElement != null)
            {
                dest.SubtitleElement = (Hl7.Fhir.Model.FhirString)SubtitleElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.PublicationStatus>)StatusElement.DeepCopy();
            }
            if (ExperimentalElement != null)
            {
                dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.DataType)Subject.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (PublisherElement != null)
            {
                dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy());
            }
            if (Description != null)
            {
                dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
            }
            if (UseContext != null)
            {
                dest.UseContext = new List <Hl7.Fhir.Model.UsageContext>(UseContext.DeepCopy());
            }
            if (Jurisdiction != null)
            {
                dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy());
            }
            if (Purpose != null)
            {
                dest.Purpose = (Hl7.Fhir.Model.Markdown)Purpose.DeepCopy();
            }
            if (UsageElement != null)
            {
                dest.UsageElement = (Hl7.Fhir.Model.FhirString)UsageElement.DeepCopy();
            }
            if (Copyright != null)
            {
                dest.Copyright = (Hl7.Fhir.Model.Markdown)Copyright.DeepCopy();
            }
            if (ApprovalDateElement != null)
            {
                dest.ApprovalDateElement = (Hl7.Fhir.Model.Date)ApprovalDateElement.DeepCopy();
            }
            if (LastReviewDateElement != null)
            {
                dest.LastReviewDateElement = (Hl7.Fhir.Model.Date)LastReviewDateElement.DeepCopy();
            }
            if (EffectivePeriod != null)
            {
                dest.EffectivePeriod = (Hl7.Fhir.Model.Period)EffectivePeriod.DeepCopy();
            }
            if (Topic != null)
            {
                dest.Topic = new List <Hl7.Fhir.Model.CodeableConcept>(Topic.DeepCopy());
            }
            if (Author != null)
            {
                dest.Author = new List <Hl7.Fhir.Model.ContactDetail>(Author.DeepCopy());
            }
            if (Editor != null)
            {
                dest.Editor = new List <Hl7.Fhir.Model.ContactDetail>(Editor.DeepCopy());
            }
            if (Reviewer != null)
            {
                dest.Reviewer = new List <Hl7.Fhir.Model.ContactDetail>(Reviewer.DeepCopy());
            }
            if (Endorser != null)
            {
                dest.Endorser = new List <Hl7.Fhir.Model.ContactDetail>(Endorser.DeepCopy());
            }
            if (RelatedArtifact != null)
            {
                dest.RelatedArtifact = new List <Hl7.Fhir.Model.RelatedArtifact>(RelatedArtifact.DeepCopy());
            }
            if (Trigger != null)
            {
                dest.Trigger = new List <Hl7.Fhir.Model.TriggerDefinition>(Trigger.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 17
0
        public ICollection <NameElement> GetNameElements(string typeName)
        {
            List <NameElement> nameElementsList = new List <NameElement>();

            if (typeName == "NameElement")
            {
                XmlNodeList innerElement = GetChildNodesByName("NameElement");

                for (int i = 0; i < innerElement.Count; i++)
                {
                    NameElement nameElement = new NameElement();
                    var         items       = innerElement.Item(i);
                    var         nodes       = items.Cast <XmlNode>();
                    foreach (XmlNode node in nodes)
                    {
                        switch (node.Name)
                        {
                        case "Tattoo":
                        {
                            nameElement.Tattoo = Convert.ToInt32(node.InnerText);
                            break;
                        }

                        case "ElementNo":
                        {
                            nameElement.ElementNo = Convert.ToInt32(node.InnerText);
                            break;
                        }

                        case "LastName":
                        {
                            nameElement.LastName = node.InnerText;
                            break;
                        }

                        case "FirstName":
                        {
                            nameElement.FirstName = node.InnerText;
                            break;
                        }

                        case "Title":
                        {
                            nameElement.Title = node.InnerText;
                            break;
                        }

                        default:
                        {
                            //Console.WriteLine($"Property {node.Name} not assign!");
                            break;
                        }
                        }
                    }

                    List <SsrDocs> ssrDocsList     = new List <SsrDocs>();
                    XmlNodeList    ssrDocsElements = GetChildNodesByName("SsrDocs");
                    for (int j = 0; j < ssrDocsElements.Count; j++)
                    {
                        SsrDocs ssrDocs = new SsrDocs();
                        items = ssrDocsElements.Item(j);
                        nodes = items.Cast <XmlNode>();
                        foreach (XmlNode node in nodes)
                        {
                            switch (node.Name)
                            {
                            case "AirlineCode":
                            {
                                ssrDocs.AirlineCode = node.InnerText;
                                break;
                            }

                            case "DocType":
                            {
                                ssrDocs.DocType = node.InnerText;
                                break;
                            }

                            case "DocCountry":
                            {
                                ssrDocs.DocCountry = node.InnerText;
                                break;
                            }

                            case "DocNumber":
                            {
                                ssrDocs.DocNumber = node.InnerText;
                                break;
                            }

                            case "PaxCountry":
                            {
                                ssrDocs.PaxCountry = node.InnerText;
                                break;
                            }

                            case "BirthDate":
                            {
                                ssrDocs.BirthDate = node.InnerText;
                                break;
                            }

                            case "Gender":
                            {
                                ssrDocs.Gender = node.InnerText;
                                break;
                            }

                            case "ExpiryDate":
                            {
                                ssrDocs.ExpiryDate = node.InnerText;
                                break;
                            }

                            case "LastName":
                            {
                                ssrDocs.LastName = node.InnerText;
                                break;
                            }

                            case "FirstName":
                            {
                                ssrDocs.FirstName = node.InnerText;
                                break;
                            }

                            default:
                            {
                                break;
                            }
                            }
                        }
                        ssrDocsList.Add(ssrDocs);
                    }
                    ;
                    nameElement.SsrDocs = ssrDocsList;

                    List <Ticket> ticketsList     = new List <Ticket>();
                    XmlNodeList   ticketsElements = GetChildNodesByName("Ticket");
                    for (int k = 0; k < ticketsElements.Count; k++)
                    {
                        Ticket ticket      = new Ticket();
                        var    ticketNodes = ticketsElements.Item(k).Cast <XmlNode>();
                        foreach (XmlNode node in ticketNodes)
                        {
                            switch (node.Name)
                            {
                            case "OfficeidTicketing":
                            {
                                ticket.OfficeidTicketing = node.InnerText;
                                break;
                            }

                            case "Status":
                            {
                                ticket.Status = node.InnerText;
                                break;
                            }

                            case "No":
                            {
                                ticket.No = node.InnerText;
                                break;
                            }

                            case "IataAgencyCode":
                            {
                                ticket.IataAgencyCode = node.InnerText;
                                break;
                            }

                            case "ValidatingCarrier":
                            {
                                ticket.ValidatingCarrier = node.InnerText;
                                break;
                            }

                            case "DocCurrency":
                            {
                                ticket.DocCurrency = node.InnerText;
                                break;
                            }

                            case "FareCurrency":
                            {
                                ticket.FareCurrency = node.InnerText;
                                break;
                            }

                            case "Fare":
                            {
                                ticket.Fare = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "FareEquiv":
                            {
                                ticket.FareEquiv = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "FareRate":
                            {
                                ticket.FareRate = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "DocTotal":
                            {
                                ticket.DocTotal = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "DocGrandTotal":
                            {
                                ticket.DocGrandTotal = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "MiscellaneousFeesTotal":
                            {
                                ticket.MiscellaneousFeesTotal = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "MiscellaneousFeesVatTotal":
                            {
                                ticket.MiscellaneousFeesVatTotal = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "TaxTotal":
                            {
                                ticket.TaxTotal = Convert.ToDouble(node.InnerText);
                                break;
                            }

                            case "Commission":
                            {
                                ticket.Commission = node.InnerText;
                                break;
                            }

                            case "TourCode":
                            {
                                ticket.TourCode = node.InnerText;
                                break;
                            }

                            case "Endorsement":
                            {
                                ticket.Endorsement = node.InnerText;
                                break;
                            }

                            case "Type":
                            {
                                ticket.Type = node.InnerText;
                                break;
                            }

                            case "Ttype":
                            {
                                ticket.Ttype = node.InnerText;
                                break;
                            }

                            case "FlightClass":
                            {
                                ticket.FlightClass = node.InnerText;
                                break;
                            }

                            case "OrigCity":
                            {
                                ticket.OrigCity = node.InnerText;
                                break;
                            }

                            case "DestCity":
                            {
                                ticket.DestCity = node.InnerText;
                                break;
                            }

                            default:
                            {
                                break;
                            }
                            }
                        }


                        // Парсим сегменты авиа маршрутов
                        List <AirSegment> airSegmentList      = new List <AirSegment>();
                        XmlNodeList       airSegmentsElements = GetChildNodesByName("AirSegment");
                        for (int m = 0; m < airSegmentsElements.Count; m++)
                        {
                            AirSegment airSegment = new AirSegment();
                            var        airNodes   = airSegmentsElements.Item(m).Cast <XmlNode>();
                            foreach (XmlNode node in airNodes)
                            {
                                switch (node.Name)
                                {
                                case "No":
                                {
                                    airSegment.No = Convert.ToInt32(node.InnerText);
                                    break;
                                }

                                case "ServiceCarrier":
                                {
                                    airSegment.ServiceCarrier = node.InnerText;
                                    break;
                                }

                                case "FlightNo":
                                {
                                    airSegment.FlightNo = node.InnerText;
                                    break;
                                }

                                case "AirClass":
                                {
                                    airSegment.AirClass = node.InnerText;
                                    break;
                                }

                                case "BkgClass":
                                {
                                    airSegment.BkgClass = node.InnerText;
                                    break;
                                }

                                case "DepartureDate":
                                {
                                    airSegment.DepartureDate = node.InnerText;
                                    break;
                                }

                                case "DepartureTime":
                                {
                                    airSegment.DepartureTime = node.InnerText;
                                    break;
                                }

                                case "ArrivalDate":
                                {
                                    airSegment.ArrivalDate = node.InnerText;
                                    break;
                                }

                                case "ArrivalTime":
                                {
                                    airSegment.ArrivalTime = node.InnerText;
                                    break;
                                }

                                case "FareBasis":
                                {
                                    airSegment.FareBasis = node.InnerText;
                                    break;
                                }

                                case "BaggageAllow":
                                {
                                    airSegment.BaggageAllow = node.InnerText;
                                    break;
                                }

                                case "Meal":
                                {
                                    airSegment.Meal = node.InnerText;
                                    break;
                                }

                                case "TerminalArrival":
                                {
                                    airSegment.TerminalArrival = node.InnerText;
                                    break;
                                }

                                case "FlightDurationTime":
                                {
                                    airSegment.FlightDurationTime = node.InnerText;
                                    break;
                                }

                                case "Mileage":
                                {
                                    airSegment.Mileage = node.InnerText;
                                    break;
                                }

                                case "Equipment":
                                {
                                    airSegment.Equipment = node.InnerText;
                                    break;
                                }

                                case "AcRecLoc":
                                {
                                    airSegment.AcRecLoc = node.InnerText;
                                    break;
                                }

                                default:
                                {
                                    break;
                                }
                                }
                            }

                            // Парсим аэропорты
                            Airport origAirport = new Airport();
                            var     origNodes   = GetChildNodesByName("OrigAirport").Cast <XmlNode>();
                            foreach (XmlNode node in origNodes)
                            {
                                switch (node.Name)
                                {
                                case "Code":
                                {
                                    origAirport.Code = node.InnerText;
                                    break;
                                }

                                case "AmaName":
                                {
                                    origAirport.AmaName = node.InnerText;
                                    break;
                                }

                                default:
                                {
                                    Console.WriteLine($"Property {node.Name} not assign!");
                                    break;
                                }
                                }
                            }
                            airSegment.OrigAirport = origAirport;
                            Airport destAirport = new Airport();
                            var     destNodes   = GetChildNodesByName("DestAirport").Cast <XmlNode>();
                            foreach (XmlNode node in destNodes)
                            {
                                switch (node.Name)
                                {
                                case "Code":
                                {
                                    destAirport.Code = node.InnerText;
                                    break;
                                }

                                case "AmaName":
                                {
                                    destAirport.AmaName = node.InnerText;
                                    break;
                                }

                                default:
                                {
                                    Console.WriteLine($"Property {node.Name} not assign!");
                                    break;
                                }
                                }
                            }
                            airSegment.DestAirport = destAirport;

                            airSegmentList.Add(airSegment);
                        }
                        ;
                        // Парсим таксы билетов
                        List <Tax>  taxesList     = new List <Tax>();
                        XmlNodeList taxesElements = GetChildNodesByName("Tax");
                        for (int n = 0; n < taxesElements.Count; n++)
                        {
                            Tax tax     = new Tax();
                            var taxNode = taxesElements.Item(n).Cast <XmlNode>();
                            foreach (XmlNode node in taxNode)
                            {
                                switch (node.Name)
                                {
                                case "Amount":
                                {
                                    tax.Amount = Convert.ToDouble(node.InnerText);
                                    break;
                                }

                                case "TaxCode":
                                {
                                    tax.TaxCode = node.InnerText;
                                    break;
                                }

                                case "NatureCode":
                                {
                                    tax.NatureCode = node.InnerText;
                                    break;
                                }

                                default:
                                {
                                    Console.WriteLine($"Property {node.Name} not assign!");
                                    break;
                                }
                                }
                            }
                            taxesList.Add(tax);
                        }
                        ;

                        // Получаем иформацию об истории
                        List <History> historyList     = new List <History>();
                        XmlNodeList    historyElements = GetChildNodesByName("History");
                        for (int q = 0; q < historyElements.Count; q++)
                        {
                            History history      = new History();
                            var     historyNodes = historyElements.Item(q).Cast <XmlNode>();
                            foreach (XmlNode node in historyNodes)
                            {
                                switch (node.Name)
                                {
                                case "Action":
                                {
                                    history.Action = node.InnerText;
                                    break;
                                }

                                case "ActionDate":
                                {
                                    history.ActionDate = node.InnerText;
                                    break;
                                }

                                case "AirFile":
                                {
                                    history.AirFile = node.InnerText;
                                    break;
                                }

                                case "AgentSign":
                                {
                                    history.AgentSign = node.InnerText;
                                    break;
                                }

                                case "Amount":
                                {
                                    history.Amount = node.InnerText;
                                    break;
                                }

                                case "NationalAmount":
                                {
                                    history.NationalAmount = node.InnerText;
                                    break;
                                }

                                case "NationalCurrency":
                                {
                                    history.NationalCurrency = node.InnerText;
                                    break;
                                }

                                case "FormOfPayment":
                                {
                                    history.FormOfPayment = node.InnerText;
                                    break;
                                }

                                default:
                                {
                                    Console.WriteLine($"Property {node.Name} not assign!");
                                    break;
                                }
                                }
                            }
                            historyList.Add(history);
                        }
                        ticket.History    = historyList;
                        ticket.AirSegment = airSegmentList;
                        ticket.Tax        = taxesList;
                        ticketsList.Add(ticket);
                    }

                    nameElement.Ticket = ticketsList;   // Add ticket to name collection
                    nameElementsList.Add(nameElement);  // Add nameElem to collection
                }
            }
            return(nameElementsList);
        }
Ejemplo n.º 18
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as CareTeam;

            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.CareTeam.CareTeamStatus>)StatusElement.DeepCopy();
            }
            if (Category != null)
            {
                dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy());
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Encounter != null)
            {
                dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Participant != null)
            {
                dest.Participant = new List <Hl7.Fhir.Model.CareTeam.ParticipantComponent>(Participant.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 (ManagingOrganization != null)
            {
                dest.ManagingOrganization = new List <Hl7.Fhir.Model.ResourceReference>(ManagingOrganization.DeepCopy());
            }
            if (Telecom != null)
            {
                dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 19
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ConceptMap;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (IdentifierElement != null)
                {
                    dest.IdentifierElement = (Hl7.Fhir.Model.FhirString)IdentifierElement.DeepCopy();
                }
                if (VersionElement != null)
                {
                    dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy();
                }
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (PublisherElement != null)
                {
                    dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
                }
                if (Telecom != null)
                {
                    dest.Telecom = new List <Hl7.Fhir.Model.Contact>(Telecom.DeepCopy());
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (CopyrightElement != null)
                {
                    dest.CopyrightElement = (Hl7.Fhir.Model.FhirString)CopyrightElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Hl7.Fhir.Model.Code)StatusElement.DeepCopy();
                }
                if (ExperimentalElement != null)
                {
                    dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (Source != null)
                {
                    dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy();
                }
                if (Target != null)
                {
                    dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy();
                }
                if (Concept != null)
                {
                    dest.Concept = new List <Hl7.Fhir.Model.ConceptMap.ConceptMapConceptComponent>(Concept.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
 public void Init()
 {
     name = new NameElement("Doe", "John");
 }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as SearchParameter;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (UrlElement != null)
                {
                    dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy();
                }
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (PublisherElement != null)
                {
                    dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
                }
                if (Contact != null)
                {
                    dest.Contact = new List <Hl7.Fhir.Model.SearchParameter.SearchParameterContactComponent>(Contact.DeepCopy());
                }
                if (RequirementsElement != null)
                {
                    dest.RequirementsElement = (Hl7.Fhir.Model.FhirString)RequirementsElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.ConformanceResourceStatus>)StatusElement.DeepCopy();
                }
                if (ExperimentalElement != null)
                {
                    dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (BaseElement != null)
                {
                    dest.BaseElement = (Hl7.Fhir.Model.Code)BaseElement.DeepCopy();
                }
                if (TypeElement != null)
                {
                    dest.TypeElement = (Hl7.Fhir.Model.Code)TypeElement.DeepCopy();
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (XpathElement != null)
                {
                    dest.XpathElement = (Hl7.Fhir.Model.FhirString)XpathElement.DeepCopy();
                }
                if (TargetElement != null)
                {
                    dest.TargetElement = new List <Hl7.Fhir.Model.Code>(TargetElement.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 22
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 (Definition != null)
            {
                dest.Definition = new List <Hl7.Fhir.Model.ResourceReference>(Definition.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.FamilyMemberHistory.FamilyHistoryStatus>)StatusElement.DeepCopy();
            }
            if (NotDoneElement != null)
            {
                dest.NotDoneElement = (Hl7.Fhir.Model.FhirBoolean)NotDoneElement.DeepCopy();
            }
            if (NotDoneReason != null)
            {
                dest.NotDoneReason = (Hl7.Fhir.Model.CodeableConcept)NotDoneReason.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 (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 (EstimatedAgeElement != null)
            {
                dest.EstimatedAgeElement = (Hl7.Fhir.Model.FhirBoolean)EstimatedAgeElement.DeepCopy();
            }
            if (Deceased != null)
            {
                dest.Deceased = (Hl7.Fhir.Model.DataType)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);
        }
Ejemplo n.º 23
0
        public void ReadNameTable()
        {
            tokenParser.ExpectTag("NAMES");
            var size = tokenParser.ReadInteger();

            var table = new List<int>();
            for (int i=1; i<=size; i++) {
                var parentNameIndex = tokenParser.ReadInteger();
                var symbolIndex = tokenParser.ReadInteger();
                var parentCanonIndex = parentNameIndex==0 ? 0 : table[parentNameIndex-1];
                var symbolCanonIndex = symbolIndexTable[symbolIndex-1];
                var nameElement = new NameElement(parentCanonIndex, symbolCanonIndex);
                var symbol = context.SymbolTable.Lookup(symbolCanonIndex);

                var canonNameIndex = context.NameTable.GetIndex(nameElement);
                Console.WriteLine("Name #"+i+"="+parentNameIndex+"."+symbolIndex+"("+symbol+") ~> "+canonNameIndex);
                table.Add(canonNameIndex);
            }
        }
Ejemplo n.º 24
0
        private static bool RenderNameGroups(
            Interpreter interpreter,
            IFormatting?formatting,
            string[] variables,
            TermName?[] terms,
            bool suppress,
            string?subsequentAuthorSubstitute,
            SubsequentAuthorSubstituteRules?subsequentAuthorSubstituteRule,
            NameElement name,
            EtAlElement?etAl,
            LabelElement?label)
        {
            var groups = new List <NameGroup>();

            for (int i = 0; i < terms.Length; i++)
            {
                var variable = variables[i];
                var names    = interpreter.Variable(variable);
                if (names is INamesVariable namesVariable)
                {
                    var group = new NameGroup(variable, terms[i], namesVariable);
                    groups.Add(group);
                }
            }

            if (suppress)
            {
                foreach (var variable in variables)
                {
                    interpreter.SuppressVariable(variable);
                }
            }

            var editors     = groups.SingleOrDefault(x => x.Term.HasValue && x.Term.Value == TermName.Editor);
            var translators = groups.SingleOrDefault(x => x.Term.HasValue && x.Term.Value == TermName.Translator);

            if (editors != null && translators != null)
            {
                // identical?
                if (editors.Names.Select(x => x.ToString()).SequenceEqual(translators.Names.Select(x => x.ToString())))
                {
                    // insert
                    groups.Insert(groups.IndexOf(editors), new NameGroup(null, TermName.EditorTranslator, editors.Names));
                    groups.Remove(editors);
                    groups.Remove(translators);
                }
            }

            // create results
            if (name.Format == NameFormat.Count)
            {
                // count
                var count = groups
                            .Select(x => x.Names.Count >= name.EtAlMin ? Math.Max(name.EtAlUseFirst, interpreter.DisambiguationContext.MinAddNames) : x.Names.Count)
                            .Sum();

                interpreter.Push(count > 0 ? count.ToString() : string.Empty, formatting);
                return(true);
            }
            else
            {
                bool result = false;

                for (int i = 0; i < groups.Count; i++)
                {
                    var group = groups[i];

                    NameGroup?previousGroup = null;

                    // subsequent author substitution?
                    if (subsequentAuthorSubstituteRule.HasValue)
                    {
                        // todo
                        // find match from previous entry in bibliography
                        previousGroup = interpreter.Previous == null || interpreter.Previous.FirstBibliographyNameGroups.Count <= i ? null : interpreter.Previous.FirstBibliographyNameGroups[i];
                    }

                    // render name group
                    var groupResult = RenderNameGroup(interpreter, formatting, group, previousGroup, subsequentAuthorSubstitute, subsequentAuthorSubstituteRule, name, etAl, label);

                    if (groupResult)
                    {
                        result = true;
                    }
                }
                // set result
                if (subsequentAuthorSubstituteRule.HasValue)
                {
                    interpreter.FirstBibliographyNameGroups = groups.ToArray();
                }

                return(result);
            }
        }
Ejemplo n.º 25
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Subscription;

            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 (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.SubscriptionState>)StatusElement.DeepCopy();
            }
            if (Topic != null)
            {
                dest.Topic = (Hl7.Fhir.Model.ResourceReference)Topic.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactPoint>(Contact.DeepCopy());
            }
            if (EndElement != null)
            {
                dest.EndElement = (Hl7.Fhir.Model.Instant)EndElement.DeepCopy();
            }
            if (ReasonElement != null)
            {
                dest.ReasonElement = (Hl7.Fhir.Model.FhirString)ReasonElement.DeepCopy();
            }
            if (FilterBy != null)
            {
                dest.FilterBy = new List <Hl7.Fhir.Model.Subscription.FilterByComponent>(FilterBy.DeepCopy());
            }
            if (Error != null)
            {
                dest.Error = new List <Hl7.Fhir.Model.CodeableConcept>(Error.DeepCopy());
            }
            if (ChannelType != null)
            {
                dest.ChannelType = (Hl7.Fhir.Model.Coding)ChannelType.DeepCopy();
            }
            if (EndpointElement != null)
            {
                dest.EndpointElement = (Hl7.Fhir.Model.FhirUrl)EndpointElement.DeepCopy();
            }
            if (HeaderElement != null)
            {
                dest.HeaderElement = new List <Hl7.Fhir.Model.FhirString>(HeaderElement.DeepCopy());
            }
            if (HeartbeatPeriodElement != null)
            {
                dest.HeartbeatPeriodElement = (Hl7.Fhir.Model.UnsignedInt)HeartbeatPeriodElement.DeepCopy();
            }
            if (TimeoutElement != null)
            {
                dest.TimeoutElement = (Hl7.Fhir.Model.UnsignedInt)TimeoutElement.DeepCopy();
            }
            if (ContentTypeElement != null)
            {
                dest.ContentTypeElement = (Hl7.Fhir.Model.Code)ContentTypeElement.DeepCopy();
            }
            if (ContentElement != null)
            {
                dest.ContentElement = (Code <Hl7.Fhir.Model.Subscription.SubscriptionPayloadContent>)ContentElement.DeepCopy();
            }
            return(dest);
        }
Ejemplo n.º 26
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (IdentifierElement != null)
            {
                result.AddRange(IdentifierElement.Validate());
            }
            if (VersionElement != null)
            {
                result.AddRange(VersionElement.Validate());
            }
            if (NameElement != null)
            {
                result.AddRange(NameElement.Validate());
            }
            if (PublisherElement != null)
            {
                result.AddRange(PublisherElement.Validate());
            }
            if (Telecom != null)
            {
                Telecom.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (DescriptionElement != null)
            {
                result.AddRange(DescriptionElement.Validate());
            }
            if (CopyrightElement != null)
            {
                result.AddRange(CopyrightElement.Validate());
            }
            if (StatusElement != null)
            {
                result.AddRange(StatusElement.Validate());
            }
            if (ExperimentalElement != null)
            {
                result.AddRange(ExperimentalElement.Validate());
            }
            if (DateElement != null)
            {
                result.AddRange(DateElement.Validate());
            }
            if (Define != null)
            {
                result.AddRange(Define.Validate());
            }
            if (Compose != null)
            {
                result.AddRange(Compose.Validate());
            }
            if (Expansion != null)
            {
                result.AddRange(Expansion.Validate());
            }

            return(result);
        }
Ejemplo n.º 27
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as NamingSystem;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.ConformanceResourceStatus>)StatusElement.DeepCopy();
                }
                if (KindElement != null)
                {
                    dest.KindElement = (Code <Hl7.Fhir.Model.NamingSystem.NamingSystemType>)KindElement.DeepCopy();
                }
                if (PublisherElement != null)
                {
                    dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
                }
                if (Contact != null)
                {
                    dest.Contact = new List <Hl7.Fhir.Model.NamingSystem.ContactComponent>(Contact.DeepCopy());
                }
                if (ResponsibleElement != null)
                {
                    dest.ResponsibleElement = (Hl7.Fhir.Model.FhirString)ResponsibleElement.DeepCopy();
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (Type != null)
                {
                    dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (UseContext != null)
                {
                    dest.UseContext = new List <Hl7.Fhir.Model.CodeableConcept>(UseContext.DeepCopy());
                }
                if (UsageElement != null)
                {
                    dest.UsageElement = (Hl7.Fhir.Model.FhirString)UsageElement.DeepCopy();
                }
                if (UniqueId != null)
                {
                    dest.UniqueId = new List <Hl7.Fhir.Model.NamingSystem.UniqueIdComponent>(UniqueId.DeepCopy());
                }
                if (ReplacedBy != null)
                {
                    dest.ReplacedBy = (Hl7.Fhir.Model.ResourceReference)ReplacedBy.DeepCopy();
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 28
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as NamingSystem;

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

            base.CopyTo(dest);
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.PublicationStatus>)StatusElement.DeepCopy();
            }
            if (KindElement != null)
            {
                dest.KindElement = (Code <Hl7.Fhir.Model.NamingSystem.NamingSystemType>)KindElement.DeepCopy();
            }
            if (DateElement != null)
            {
                dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
            }
            if (PublisherElement != null)
            {
                dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
            }
            if (Contact != null)
            {
                dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy());
            }
            if (ResponsibleElement != null)
            {
                dest.ResponsibleElement = (Hl7.Fhir.Model.FhirString)ResponsibleElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Description != null)
            {
                dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
            }
            if (UseContext != null)
            {
                dest.UseContext = new List <Hl7.Fhir.Model.UsageContext>(UseContext.DeepCopy());
            }
            if (Jurisdiction != null)
            {
                dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy());
            }
            if (UsageElement != null)
            {
                dest.UsageElement = (Hl7.Fhir.Model.FhirString)UsageElement.DeepCopy();
            }
            if (UniqueId != null)
            {
                dest.UniqueId = new List <Hl7.Fhir.Model.NamingSystem.UniqueIdComponent>(UniqueId.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 29
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Location;

            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.Location.LocationStatus>)StatusElement.DeepCopy();
            }
            if (OperationalStatus != null)
            {
                dest.OperationalStatus = (Hl7.Fhir.Model.Coding)OperationalStatus.DeepCopy();
            }
            if (NameElement != null)
            {
                dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
            }
            if (AliasElement != null)
            {
                dest.AliasElement = new List <Hl7.Fhir.Model.FhirString>(AliasElement.DeepCopy());
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (ModeElement != null)
            {
                dest.ModeElement = (Code <Hl7.Fhir.Model.Location.LocationMode>)ModeElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Telecom != null)
            {
                dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy());
            }
            if (Address != null)
            {
                dest.Address = (Hl7.Fhir.Model.Address)Address.DeepCopy();
            }
            if (PhysicalType != null)
            {
                dest.PhysicalType = (Hl7.Fhir.Model.CodeableConcept)PhysicalType.DeepCopy();
            }
            if (Position != null)
            {
                dest.Position = (Hl7.Fhir.Model.Location.PositionComponent)Position.DeepCopy();
            }
            if (ManagingOrganization != null)
            {
                dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy();
            }
            if (PartOf != null)
            {
                dest.PartOf = (Hl7.Fhir.Model.ResourceReference)PartOf.DeepCopy();
            }
            if (Endpoint != null)
            {
                dest.Endpoint = new List <Hl7.Fhir.Model.ResourceReference>(Endpoint.DeepCopy());
            }
            return(dest);
        }
Ejemplo n.º 30
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as DataElement;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (UrlElement != null)
                {
                    dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy();
                }
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (VersionElement != null)
                {
                    dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy();
                }
                if (NameElement != null)
                {
                    dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.ConformanceResourceStatus>)StatusElement.DeepCopy();
                }
                if (ExperimentalElement != null)
                {
                    dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy();
                }
                if (PublisherElement != null)
                {
                    dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy();
                }
                if (Contact != null)
                {
                    dest.Contact = new List <Hl7.Fhir.Model.DataElement.ContactComponent>(Contact.DeepCopy());
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (UseContext != null)
                {
                    dest.UseContext = new List <Hl7.Fhir.Model.CodeableConcept>(UseContext.DeepCopy());
                }
                if (CopyrightElement != null)
                {
                    dest.CopyrightElement = (Hl7.Fhir.Model.FhirString)CopyrightElement.DeepCopy();
                }
                if (StringencyElement != null)
                {
                    dest.StringencyElement = (Code <Hl7.Fhir.Model.DataElement.DataElementStringency>)StringencyElement.DeepCopy();
                }
                if (Mapping != null)
                {
                    dest.Mapping = new List <Hl7.Fhir.Model.DataElement.MappingComponent>(Mapping.DeepCopy());
                }
                if (Element != null)
                {
                    dest.Element = new List <Hl7.Fhir.Model.ElementDefinition>(Element.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }