public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as QuestionnaireResponse; 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 (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (QuestionnaireElement != null) { dest.QuestionnaireElement = (Hl7.Fhir.Model.Canonical)QuestionnaireElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.QuestionnaireResponse.QuestionnaireResponseStatus>)StatusElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (AuthoredElement != null) { dest.AuthoredElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredElement.DeepCopy(); } if (Author != null) { dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy(); } if (Source != null) { dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy(); } if (Item != null) { dest.Item = new List <Hl7.Fhir.Model.QuestionnaireResponse.ItemComponent>(Item.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as SupplyDelivery; 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 (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.SupplyDelivery.SupplyDeliveryStatus>)StatusElement.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (SuppliedItem != null) { dest.SuppliedItem = (Hl7.Fhir.Model.SupplyDelivery.SuppliedItemComponent)SuppliedItem.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (Supplier != null) { dest.Supplier = (Hl7.Fhir.Model.ResourceReference)Supplier.DeepCopy(); } if (Destination != null) { dest.Destination = (Hl7.Fhir.Model.ResourceReference)Destination.DeepCopy(); } if (Receiver != null) { dest.Receiver = new List <Hl7.Fhir.Model.ResourceReference>(Receiver.DeepCopy()); } return(dest); }
public override int GetHashCode() { var hash = Name == null ? 0 : Name.GetHashCode(); hash += Acquired.GetHashCode(); hash += Category.GetHashCode(); hash += SubCategory == null ? 0 : SubCategory.GetHashCode(); hash += InUse.GetHashCode(); hash += Owner == null ? 0 : Owner.GetHashCode(); hash += PartOf == null ? 0 : PartOf.GetHashCode(); return(hash); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Organization; 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 (Type != null) { dest.Type = new List <Hl7.Fhir.Model.CodeableConcept>(Type.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 (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 (PartOf != null) { dest.PartOf = (Hl7.Fhir.Model.ResourceReference)PartOf.DeepCopy(); } if (Contact != null) { dest.Contact = new List <Hl7.Fhir.Model.Organization.ContactComponent>(Contact.DeepCopy()); } if (Endpoint != null) { dest.Endpoint = new List <Hl7.Fhir.Model.ResourceReference>(Endpoint.DeepCopy()); } return(dest); }
public override string ToString() { StringBuilder sb = new StringBuilder($"{Id}\t{Name,-20}\t\t{Acquired.ToString("D")}\t\t{Category.ToString()}\t{SubCategory}\t{InUse}"); if (PartOf != null) { sb.Append($"\r\nPart of :\r\n{PartOf.ToMiniString()}"); } if (Owner != null) { sb.Append($"\r\nOwner\r\n{Owner}"); } return(sb.ToString()); }
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); }
public override bool Equals(object obj) { var possession = obj as Possession; if (possession == null) { return(base.Equals(obj)); } bool ownersEqual; if (Owner != null) { ownersEqual = Owner.Equals(possession.Owner); } else { ownersEqual = possession.Owner == null; } bool possessionsEqual; if (PartOf != null) { possessionsEqual = PartOf.Equals(possession.PartOf); } else { possessionsEqual = possession.PartOf == null; } return(this.Name == possession.Name && this.Acquired == possession.Acquired && this.Category == possession.Category && this.SubCategory == possession.SubCategory && this.InUse == possession.InUse && ownersEqual && possessionsEqual); }
/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } if (!string.IsNullOrEmpty(ResourceType)) { writer.WriteString("resourceType", (string)ResourceType !); } ((Fhir.R4.Models.DomainResource) this).SerializeJson(writer, options, false); if ((Identifier != null) && (Identifier.Count != 0)) { writer.WritePropertyName("identifier"); writer.WriteStartArray(); foreach (Identifier valIdentifier in Identifier) { valIdentifier.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (!string.IsNullOrEmpty(Status)) { writer.WriteString("status", (string)Status !); } if (_Status != null) { writer.WritePropertyName("_status"); _Status.SerializeJson(writer, options); } if (Type != null) { writer.WritePropertyName("type"); Type.SerializeJson(writer, options); } if (!string.IsNullOrEmpty(Name)) { writer.WriteString("name", (string)Name !); } if (_Name != null) { writer.WritePropertyName("_name"); _Name.SerializeJson(writer, options); } if ((Subject != null) && (Subject.Count != 0)) { writer.WritePropertyName("subject"); writer.WriteStartArray(); foreach (Reference valSubject in Subject) { valSubject.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (ServicePeriod != null) { writer.WritePropertyName("servicePeriod"); ServicePeriod.SerializeJson(writer, options); } if ((Coverage != null) && (Coverage.Count != 0)) { writer.WritePropertyName("coverage"); writer.WriteStartArray(); foreach (AccountCoverage valCoverage in Coverage) { valCoverage.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (Owner != null) { writer.WritePropertyName("owner"); Owner.SerializeJson(writer, options); } if (!string.IsNullOrEmpty(Description)) { writer.WriteString("description", (string)Description !); } if (_Description != null) { writer.WritePropertyName("_description"); _Description.SerializeJson(writer, options); } if ((Guarantor != null) && (Guarantor.Count != 0)) { writer.WritePropertyName("guarantor"); writer.WriteStartArray(); foreach (AccountGuarantor valGuarantor in Guarantor) { valGuarantor.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (PartOf != null) { writer.WritePropertyName("partOf"); PartOf.SerializeJson(writer, options); } if (includeStartObject) { writer.WriteEndObject(); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Media; 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 (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Modality != null) { dest.Modality = (Hl7.Fhir.Model.CodeableConcept)Modality.DeepCopy(); } if (View != null) { dest.View = (Hl7.Fhir.Model.CodeableConcept)View.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Created != null) { dest.Created = (Hl7.Fhir.Model.DataType)Created.DeepCopy(); } if (IssuedElement != null) { dest.IssuedElement = (Hl7.Fhir.Model.Instant)IssuedElement.DeepCopy(); } if (Operator != null) { dest.Operator = (Hl7.Fhir.Model.ResourceReference)Operator.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (BodySite != null) { dest.BodySite = (Hl7.Fhir.Model.CodeableConcept)BodySite.DeepCopy(); } if (DeviceNameElement != null) { dest.DeviceNameElement = (Hl7.Fhir.Model.FhirString)DeviceNameElement.DeepCopy(); } if (Device != null) { dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy(); } if (HeightElement != null) { dest.HeightElement = (Hl7.Fhir.Model.PositiveInt)HeightElement.DeepCopy(); } if (WidthElement != null) { dest.WidthElement = (Hl7.Fhir.Model.PositiveInt)WidthElement.DeepCopy(); } if (FramesElement != null) { dest.FramesElement = (Hl7.Fhir.Model.PositiveInt)FramesElement.DeepCopy(); } if (DurationElement != null) { dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy(); } if (Content != null) { dest.Content = (Hl7.Fhir.Model.Attachment)Content.DeepCopy(); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicationStatement; 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 (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationStatement.MedicationStatusCodes>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = new List <Hl7.Fhir.Model.CodeableConcept>(StatusReason.DeepCopy()); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (Medication != null) { dest.Medication = (Hl7.Fhir.Model.Element)Medication.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Effective != null) { dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy(); } if (DateAssertedElement != null) { dest.DateAssertedElement = (Hl7.Fhir.Model.FhirDateTime)DateAssertedElement.DeepCopy(); } if (InformationSource != null) { dest.InformationSource = (Hl7.Fhir.Model.ResourceReference)InformationSource.DeepCopy(); } if (DerivedFrom != null) { dest.DerivedFrom = new List <Hl7.Fhir.Model.ResourceReference>(DerivedFrom.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 (Dosage != null) { dest.Dosage = new List <Hl7.Fhir.Model.Dosage>(Dosage.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ResearchStudy; 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 (TitleElement != null) { dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy(); } if (Protocol != null) { dest.Protocol = new List <Hl7.Fhir.Model.ResourceReference>(Protocol.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ResearchStudy.ResearchStudyStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Focus != null) { dest.Focus = new List <Hl7.Fhir.Model.CodeableConcept>(Focus.DeepCopy()); } if (Contact != null) { dest.Contact = new List <Hl7.Fhir.Model.ContactDetail>(Contact.DeepCopy()); } if (RelatedArtifact != null) { dest.RelatedArtifact = new List <Hl7.Fhir.Model.RelatedArtifact>(RelatedArtifact.DeepCopy()); } if (Keyword != null) { dest.Keyword = new List <Hl7.Fhir.Model.CodeableConcept>(Keyword.DeepCopy()); } if (Jurisdiction != null) { dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy()); } if (Description != null) { dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy(); } if (Enrollment != null) { dest.Enrollment = new List <Hl7.Fhir.Model.ResourceReference>(Enrollment.DeepCopy()); } if (Period != null) { dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy(); } if (Sponsor != null) { dest.Sponsor = (Hl7.Fhir.Model.ResourceReference)Sponsor.DeepCopy(); } if (PrincipalInvestigator != null) { dest.PrincipalInvestigator = (Hl7.Fhir.Model.ResourceReference)PrincipalInvestigator.DeepCopy(); } if (Site != null) { dest.Site = new List <Hl7.Fhir.Model.ResourceReference>(Site.DeepCopy()); } if (ReasonStopped != null) { dest.ReasonStopped = (Hl7.Fhir.Model.CodeableConcept)ReasonStopped.DeepCopy(); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (Arm != null) { dest.Arm = new List <Hl7.Fhir.Model.ResearchStudy.ArmComponent>(Arm.DeepCopy()); } return(dest); }
/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } if (!string.IsNullOrEmpty(ResourceType)) { writer.WriteString("resourceType", (string)ResourceType !); } ((Fhir.R4.Models.DomainResource) this).SerializeJson(writer, options, false); if ((Identifier != null) && (Identifier.Count != 0)) { writer.WritePropertyName("identifier"); writer.WriteStartArray(); foreach (Identifier valIdentifier in Identifier) { valIdentifier.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (!string.IsNullOrEmpty(Status)) { writer.WriteString("status", (string)Status !); } if (_Status != null) { writer.WritePropertyName("_status"); _Status.SerializeJson(writer, options); } if (OperationalStatus != null) { writer.WritePropertyName("operationalStatus"); OperationalStatus.SerializeJson(writer, options); } if (!string.IsNullOrEmpty(Name)) { writer.WriteString("name", (string)Name !); } if (_Name != null) { writer.WritePropertyName("_name"); _Name.SerializeJson(writer, options); } if ((Alias != null) && (Alias.Count != 0)) { writer.WritePropertyName("alias"); writer.WriteStartArray(); foreach (string valAlias in Alias) { writer.WriteStringValue(valAlias); } writer.WriteEndArray(); } if ((_Alias != null) && (_Alias.Count != 0)) { writer.WritePropertyName("_alias"); writer.WriteStartArray(); foreach (Element val_Alias in _Alias) { val_Alias.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (!string.IsNullOrEmpty(Description)) { writer.WriteString("description", (string)Description !); } if (_Description != null) { writer.WritePropertyName("_description"); _Description.SerializeJson(writer, options); } if (!string.IsNullOrEmpty(Mode)) { writer.WriteString("mode", (string)Mode !); } if (_Mode != null) { writer.WritePropertyName("_mode"); _Mode.SerializeJson(writer, options); } if ((Type != null) && (Type.Count != 0)) { writer.WritePropertyName("type"); writer.WriteStartArray(); foreach (CodeableConcept valType in Type) { valType.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if ((Telecom != null) && (Telecom.Count != 0)) { writer.WritePropertyName("telecom"); writer.WriteStartArray(); foreach (ContactPoint valTelecom in Telecom) { valTelecom.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (Address != null) { writer.WritePropertyName("address"); Address.SerializeJson(writer, options); } if (PhysicalType != null) { writer.WritePropertyName("physicalType"); PhysicalType.SerializeJson(writer, options); } if (Position != null) { writer.WritePropertyName("position"); Position.SerializeJson(writer, options); } if (ManagingOrganization != null) { writer.WritePropertyName("managingOrganization"); ManagingOrganization.SerializeJson(writer, options); } if (PartOf != null) { writer.WritePropertyName("partOf"); PartOf.SerializeJson(writer, options); } if ((HoursOfOperation != null) && (HoursOfOperation.Count != 0)) { writer.WritePropertyName("hoursOfOperation"); writer.WriteStartArray(); foreach (LocationHoursOfOperation valHoursOfOperation in HoursOfOperation) { valHoursOfOperation.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (!string.IsNullOrEmpty(AvailabilityExceptions)) { writer.WriteString("availabilityExceptions", (string)AvailabilityExceptions !); } if (_AvailabilityExceptions != null) { writer.WritePropertyName("_availabilityExceptions"); _AvailabilityExceptions.SerializeJson(writer, options); } if ((Endpoint != null) && (Endpoint.Count != 0)) { writer.WritePropertyName("endpoint"); writer.WriteStartArray(); foreach (Reference valEndpoint in Endpoint) { valEndpoint.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (includeStartObject) { writer.WriteEndObject(); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ChargeItem; 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 (DefinitionElement != null) { dest.DefinitionElement = new List <Hl7.Fhir.Model.FhirUri>(DefinitionElement.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ChargeItem.ChargeItemStatus>)StatusElement.DeepCopy(); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (Participant != null) { dest.Participant = new List <Hl7.Fhir.Model.ChargeItem.ParticipantComponent>(Participant.DeepCopy()); } if (PerformingOrganization != null) { dest.PerformingOrganization = (Hl7.Fhir.Model.ResourceReference)PerformingOrganization.DeepCopy(); } if (RequestingOrganization != null) { dest.RequestingOrganization = (Hl7.Fhir.Model.ResourceReference)RequestingOrganization.DeepCopy(); } if (Quantity != null) { dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy(); } if (Bodysite != null) { dest.Bodysite = new List <Hl7.Fhir.Model.CodeableConcept>(Bodysite.DeepCopy()); } if (FactorOverrideElement != null) { dest.FactorOverrideElement = (Hl7.Fhir.Model.FhirDecimal)FactorOverrideElement.DeepCopy(); } if (PriceOverride != null) { dest.PriceOverride = (Hl7.Fhir.Model.Money)PriceOverride.DeepCopy(); } if (OverrideReasonElement != null) { dest.OverrideReasonElement = (Hl7.Fhir.Model.FhirString)OverrideReasonElement.DeepCopy(); } if (Enterer != null) { dest.Enterer = (Hl7.Fhir.Model.ResourceReference)Enterer.DeepCopy(); } if (EnteredDateElement != null) { dest.EnteredDateElement = (Hl7.Fhir.Model.FhirDateTime)EnteredDateElement.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy()); } if (Service != null) { dest.Service = new List <Hl7.Fhir.Model.ResourceReference>(Service.DeepCopy()); } if (Account != null) { dest.Account = new List <Hl7.Fhir.Model.ResourceReference>(Account.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } return(dest); }
/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } if (!string.IsNullOrEmpty(ResourceType)) { writer.WriteString("resourceType", (string)ResourceType !); } ((fhirCsR4.Models.DomainResource) this).SerializeJson(writer, options, false); if ((Identifier != null) && (Identifier.Count != 0)) { writer.WritePropertyName("identifier"); writer.WriteStartArray(); foreach (Identifier valIdentifier in Identifier) { valIdentifier.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (Active != null) { writer.WriteBoolean("active", (bool)Active !); } if ((Type != null) && (Type.Count != 0)) { writer.WritePropertyName("type"); writer.WriteStartArray(); foreach (CodeableConcept valType in Type) { valType.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (!string.IsNullOrEmpty(Name)) { writer.WriteString("name", (string)Name !); } if (_Name != null) { writer.WritePropertyName("_name"); _Name.SerializeJson(writer, options); } if ((Alias != null) && (Alias.Count != 0)) { writer.WritePropertyName("alias"); writer.WriteStartArray(); foreach (string valAlias in Alias) { writer.WriteStringValue(valAlias); } writer.WriteEndArray(); } if ((_Alias != null) && (_Alias.Count != 0)) { writer.WritePropertyName("_alias"); writer.WriteStartArray(); foreach (Element val_Alias in _Alias) { val_Alias.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if ((Telecom != null) && (Telecom.Count != 0)) { writer.WritePropertyName("telecom"); writer.WriteStartArray(); foreach (ContactPoint valTelecom in Telecom) { valTelecom.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if ((Address != null) && (Address.Count != 0)) { writer.WritePropertyName("address"); writer.WriteStartArray(); foreach (Address valAddress in Address) { valAddress.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (PartOf != null) { writer.WritePropertyName("partOf"); PartOf.SerializeJson(writer, options); } if ((Contact != null) && (Contact.Count != 0)) { writer.WritePropertyName("contact"); writer.WriteStartArray(); foreach (OrganizationContact valContact in Contact) { valContact.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if ((Endpoint != null) && (Endpoint.Count != 0)) { writer.WritePropertyName("endpoint"); writer.WriteStartArray(); foreach (Reference valEndpoint in Endpoint) { valEndpoint.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (includeStartObject) { writer.WriteEndObject(); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Communication; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (InstantiatesCanonicalElement != null) { dest.InstantiatesCanonicalElement = new List <Hl7.Fhir.Model.Canonical>(InstantiatesCanonicalElement.DeepCopy()); } if (InstantiatesUriElement != null) { dest.InstantiatesUriElement = new List <Hl7.Fhir.Model.FhirUri>(InstantiatesUriElement.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (InResponseTo != null) { dest.InResponseTo = new List <Hl7.Fhir.Model.ResourceReference>(InResponseTo.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = (Hl7.Fhir.Model.CodeableConcept)StatusReason.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Topic != null) { dest.Topic = (Hl7.Fhir.Model.CodeableConcept)Topic.DeepCopy(); } if (About != null) { dest.About = new List <Hl7.Fhir.Model.ResourceReference>(About.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (SentElement != null) { dest.SentElement = (Hl7.Fhir.Model.FhirDateTime)SentElement.DeepCopy(); } if (ReceivedElement != null) { dest.ReceivedElement = (Hl7.Fhir.Model.FhirDateTime)ReceivedElement.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.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 (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.Communication.PayloadComponent>(Payload.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
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); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Communication; 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 (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)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 (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Topic != null) { dest.Topic = new List <Hl7.Fhir.Model.ResourceReference>(Topic.DeepCopy()); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (SentElement != null) { dest.SentElement = (Hl7.Fhir.Model.FhirDateTime)SentElement.DeepCopy(); } if (ReceivedElement != null) { dest.ReceivedElement = (Hl7.Fhir.Model.FhirDateTime)ReceivedElement.DeepCopy(); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.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 (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.Communication.PayloadComponent>(Payload.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }