Пример #1
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (Issuer != null)
            {
                result.AddRange(Issuer.Validate());
            }
            if (Period != null)
            {
                result.AddRange(Period.Validate());
            }
            if (Type != null)
            {
                result.AddRange(Type.Validate());
            }
            if (Identifier != null)
            {
                result.AddRange(Identifier.Validate());
            }
            if (Group != null)
            {
                result.AddRange(Group.Validate());
            }
            if (Plan != null)
            {
                result.AddRange(Plan.Validate());
            }
            if (Subplan != null)
            {
                result.AddRange(Subplan.Validate());
            }
            if (DependentElement != null)
            {
                result.AddRange(DependentElement.Validate());
            }
            if (SequenceElement != null)
            {
                result.AddRange(SequenceElement.Validate());
            }
            if (Subscriber != null)
            {
                result.AddRange(Subscriber.Validate());
            }

            return(result);
        }
Пример #2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coverage;

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

            base.CopyTo(dest);
            if (Issuer != null)
            {
                dest.Issuer = (Hl7.Fhir.Model.ResourceReference)Issuer.DeepCopy();
            }
            if (Bin != null)
            {
                dest.Bin = (Hl7.Fhir.Model.Identifier)Bin.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.Coding)Type.DeepCopy();
            }
            if (SubscriberId != null)
            {
                dest.SubscriberId = (Hl7.Fhir.Model.Identifier)SubscriberId.DeepCopy();
            }
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (GroupElement != null)
            {
                dest.GroupElement = (Hl7.Fhir.Model.FhirString)GroupElement.DeepCopy();
            }
            if (PlanElement != null)
            {
                dest.PlanElement = (Hl7.Fhir.Model.FhirString)PlanElement.DeepCopy();
            }
            if (SubPlanElement != null)
            {
                dest.SubPlanElement = (Hl7.Fhir.Model.FhirString)SubPlanElement.DeepCopy();
            }
            if (DependentElement != null)
            {
                dest.DependentElement = (Hl7.Fhir.Model.PositiveInt)DependentElement.DeepCopy();
            }
            if (SequenceElement != null)
            {
                dest.SequenceElement = (Hl7.Fhir.Model.PositiveInt)SequenceElement.DeepCopy();
            }
            if (Subscriber != null)
            {
                dest.Subscriber = (Hl7.Fhir.Model.ResourceReference)Subscriber.DeepCopy();
            }
            if (Network != null)
            {
                dest.Network = (Hl7.Fhir.Model.Identifier)Network.DeepCopy();
            }
            if (Contract != null)
            {
                dest.Contract = new List <Hl7.Fhir.Model.ResourceReference>(Contract.DeepCopy());
            }
            return(dest);
        }
Пример #3
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Coverage;

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

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.FinancialResourceStatusCodes>)StatusElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (PolicyHolder != null)
            {
                dest.PolicyHolder = (Hl7.Fhir.Model.ResourceReference)PolicyHolder.DeepCopy();
            }
            if (Subscriber != null)
            {
                dest.Subscriber = (Hl7.Fhir.Model.ResourceReference)Subscriber.DeepCopy();
            }
            if (SubscriberId != null)
            {
                dest.SubscriberId = (Hl7.Fhir.Model.Identifier)SubscriberId.DeepCopy();
            }
            if (Beneficiary != null)
            {
                dest.Beneficiary = (Hl7.Fhir.Model.ResourceReference)Beneficiary.DeepCopy();
            }
            if (DependentElement != null)
            {
                dest.DependentElement = (Hl7.Fhir.Model.FhirString)DependentElement.DeepCopy();
            }
            if (Relationship != null)
            {
                dest.Relationship = (Hl7.Fhir.Model.CodeableConcept)Relationship.DeepCopy();
            }
            if (Period != null)
            {
                dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy();
            }
            if (Payor != null)
            {
                dest.Payor = new List <Hl7.Fhir.Model.ResourceReference>(Payor.DeepCopy());
            }
            if (Class != null)
            {
                dest.Class = new List <Hl7.Fhir.Model.Coverage.ClassComponent>(Class.DeepCopy());
            }
            if (OrderElement != null)
            {
                dest.OrderElement = (Hl7.Fhir.Model.PositiveInt)OrderElement.DeepCopy();
            }
            if (NetworkElement != null)
            {
                dest.NetworkElement = (Hl7.Fhir.Model.FhirString)NetworkElement.DeepCopy();
            }
            if (CostToBeneficiary != null)
            {
                dest.CostToBeneficiary = new List <Hl7.Fhir.Model.Coverage.CostToBeneficiaryComponent>(CostToBeneficiary.DeepCopy());
            }
            if (SubrogationElement != null)
            {
                dest.SubrogationElement = (Hl7.Fhir.Model.FhirBoolean)SubrogationElement.DeepCopy();
            }
            if (Contract != null)
            {
                dest.Contract = new List <Hl7.Fhir.Model.ResourceReference>(Contract.DeepCopy());
            }
            return(dest);
        }