本文整理汇总了C#中IFhirWriter.WriteEndComplexContent方法的典型用法代码示例。如果您正苦于以下问题:C# IFhirWriter.WriteEndComplexContent方法的具体用法?C# IFhirWriter.WriteEndComplexContent怎么用?C# IFhirWriter.WriteEndComplexContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFhirWriter
的用法示例。
在下文中一共展示了IFhirWriter.WriteEndComplexContent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SerializeFhirDecimal
public static void SerializeFhirDecimal(Hl7.Fhir.Model.FhirDecimal value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element value
if(value.Value != null)
writer.WritePrimitiveContents("value", value, XmlSerializationHint.Attribute);
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
}
示例2: SerializeNarrative
public static void SerializeNarrative(Hl7.Fhir.Model.Narrative value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element status
if(value.StatusElement != null)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.Narrative.NarrativeStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element div
if(value.DivElement != null)
writer.WritePrimitiveContents("div", value.DivElement, XmlSerializationHint.XhtmlElement);
writer.WriteEndComplexContent();
}
示例3: SerializeImmunizationVaccinationProtocolComponent
public static void SerializeImmunizationVaccinationProtocolComponent(Hl7.Fhir.Model.Immunization.ImmunizationVaccinationProtocolComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element doseSequence
if(value.DoseSequenceElement != null)
{
writer.WriteStartElement("doseSequence");
IntegerSerializer.SerializeInteger(value.DoseSequenceElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element description
if(value.DescriptionElement != null)
{
writer.WriteStartElement("description");
FhirStringSerializer.SerializeFhirString(value.DescriptionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element authority
if(value.Authority != null)
{
writer.WriteStartElement("authority");
ResourceReferenceSerializer.SerializeResourceReference(value.Authority, writer, summary);
writer.WriteEndElement();
}
// Serialize element series
if(value.SeriesElement != null)
{
writer.WriteStartElement("series");
FhirStringSerializer.SerializeFhirString(value.SeriesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element seriesDoses
if(value.SeriesDosesElement != null)
{
writer.WriteStartElement("seriesDoses");
IntegerSerializer.SerializeInteger(value.SeriesDosesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element doseTarget
if(value.DoseTarget != null)
{
writer.WriteStartElement("doseTarget");
CodeableConceptSerializer.SerializeCodeableConcept(value.DoseTarget, writer, summary);
writer.WriteEndElement();
}
// Serialize element doseStatus
if(value.DoseStatus != null)
{
writer.WriteStartElement("doseStatus");
CodeableConceptSerializer.SerializeCodeableConcept(value.DoseStatus, writer, summary);
writer.WriteEndElement();
}
// Serialize element doseStatusReason
if(value.DoseStatusReason != null)
{
writer.WriteStartElement("doseStatusReason");
CodeableConceptSerializer.SerializeCodeableConcept(value.DoseStatusReason, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例4: SerializeImmunizationExplanationComponent
public static void SerializeImmunizationExplanationComponent(Hl7.Fhir.Model.Immunization.ImmunizationExplanationComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element reason
if(value.Reason != null && value.Reason.Count > 0)
{
writer.WriteStartArrayElement("reason");
foreach(var item in value.Reason)
{
writer.WriteStartArrayMember("reason");
CodeableConceptSerializer.SerializeCodeableConcept(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element refusalReason
if(value.RefusalReason != null && value.RefusalReason.Count > 0)
{
writer.WriteStartArrayElement("refusalReason");
foreach(var item in value.RefusalReason)
{
writer.WriteStartArrayMember("refusalReason");
CodeableConceptSerializer.SerializeCodeableConcept(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
}
示例5: SerializeCoverageSubscriberComponent
public static void SerializeCoverageSubscriberComponent(Hl7.Fhir.Model.Coverage.CoverageSubscriberComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element name
if(value.Name != null)
{
writer.WriteStartElement("name");
HumanNameSerializer.SerializeHumanName(value.Name, writer, summary);
writer.WriteEndElement();
}
// Serialize element address
if(value.Address != null)
{
writer.WriteStartElement("address");
AddressSerializer.SerializeAddress(value.Address, writer, summary);
writer.WriteEndElement();
}
// Serialize element birthdate
if(value.BirthdateElement != null)
{
writer.WriteStartElement("birthdate");
DateSerializer.SerializeDate(value.BirthdateElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例6: SerializeCarePlanParticipantComponent
public static void SerializeCarePlanParticipantComponent(Hl7.Fhir.Model.CarePlan.CarePlanParticipantComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element role
if(value.Role != null)
{
writer.WriteStartElement("role");
CodeableConceptSerializer.SerializeCodeableConcept(value.Role, writer, summary);
writer.WriteEndElement();
}
// Serialize element member
if(value.Member != null)
{
writer.WriteStartElement("member");
ResourceReferenceSerializer.SerializeResourceReference(value.Member, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例7: SerializeCarePlanActivityComponent
//.........这里部分代码省略.........
// Serialize element status
if(value.StatusElement != null)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.CarePlan.CarePlanActivityStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element prohibited
if(value.ProhibitedElement != null)
{
writer.WriteStartElement("prohibited");
FhirBooleanSerializer.SerializeFhirBoolean(value.ProhibitedElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element timing
if(value.Timing != null)
{
writer.WriteStartElement( SerializationUtil.BuildPolymorphicName("timing", value.Timing.GetType()) );
FhirSerializer.SerializeElement(value.Timing, writer, summary);
writer.WriteEndElement();
}
// Serialize element location
if(value.Location != null)
{
writer.WriteStartElement("location");
ResourceReferenceSerializer.SerializeResourceReference(value.Location, writer, summary);
writer.WriteEndElement();
}
// Serialize element performer
if(value.Performer != null && value.Performer.Count > 0)
{
writer.WriteStartArrayElement("performer");
foreach(var item in value.Performer)
{
writer.WriteStartArrayMember("performer");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element product
if(value.Product != null)
{
writer.WriteStartElement("product");
ResourceReferenceSerializer.SerializeResourceReference(value.Product, writer, summary);
writer.WriteEndElement();
}
// Serialize element dailyAmount
if(value.DailyAmount != null)
{
writer.WriteStartElement("dailyAmount");
QuantitySerializer.SerializeQuantity(value.DailyAmount, writer, summary);
writer.WriteEndElement();
}
// Serialize element quantity
if(value.Quantity != null)
{
writer.WriteStartElement("quantity");
QuantitySerializer.SerializeQuantity(value.Quantity, writer, summary);
writer.WriteEndElement();
}
// Serialize element details
if(value.DetailsElement != null)
{
writer.WriteStartElement("details");
FhirStringSerializer.SerializeFhirString(value.DetailsElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element actionTaken
if(value.ActionTaken != null && value.ActionTaken.Count > 0)
{
writer.WriteStartArrayElement("actionTaken");
foreach(var item in value.ActionTaken)
{
writer.WriteStartArrayMember("actionTaken");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element notes
if(value.NotesElement != null)
{
writer.WriteStartElement("notes");
FhirStringSerializer.SerializeFhirString(value.NotesElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例8: SerializeImagingStudySeriesInstanceComponent
public static void SerializeImagingStudySeriesInstanceComponent(Hl7.Fhir.Model.ImagingStudy.ImagingStudySeriesInstanceComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element number
if(value.NumberElement != null)
{
writer.WriteStartElement("number");
IntegerSerializer.SerializeInteger(value.NumberElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element uid
if(value.UidElement != null)
{
writer.WriteStartElement("uid");
OidSerializer.SerializeOid(value.UidElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element sopclass
if(value.SopclassElement != null)
{
writer.WriteStartElement("sopclass");
OidSerializer.SerializeOid(value.SopclassElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element type
if(value.TypeElement != null)
{
writer.WriteStartElement("type");
FhirStringSerializer.SerializeFhirString(value.TypeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element title
if(value.TitleElement != null)
{
writer.WriteStartElement("title");
FhirStringSerializer.SerializeFhirString(value.TitleElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element url
if(value.UrlElement != null)
{
writer.WriteStartElement("url");
FhirUriSerializer.SerializeFhirUri(value.UrlElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element attachment
if(value.Attachment != null)
{
writer.WriteStartElement("attachment");
ResourceReferenceSerializer.SerializeResourceReference(value.Attachment, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例9: SerializeSecurityEventObjectComponent
public static void SerializeSecurityEventObjectComponent(Hl7.Fhir.Model.SecurityEvent.SecurityEventObjectComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element identifier
if(value.Identifier != null)
{
writer.WriteStartElement("identifier");
IdentifierSerializer.SerializeIdentifier(value.Identifier, writer, summary);
writer.WriteEndElement();
}
// Serialize element reference
if(value.Reference != null)
{
writer.WriteStartElement("reference");
ResourceReferenceSerializer.SerializeResourceReference(value.Reference, writer, summary);
writer.WriteEndElement();
}
// Serialize element type
if(value.TypeElement != null)
{
writer.WriteStartElement("type");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.SecurityEvent.SecurityEventObjectType>(value.TypeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element role
if(value.RoleElement != null)
{
writer.WriteStartElement("role");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.SecurityEvent.SecurityEventObjectRole>(value.RoleElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element lifecycle
if(value.LifecycleElement != null)
{
writer.WriteStartElement("lifecycle");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.SecurityEvent.SecurityEventObjectLifecycle>(value.LifecycleElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element sensitivity
if(value.Sensitivity != null)
{
writer.WriteStartElement("sensitivity");
CodeableConceptSerializer.SerializeCodeableConcept(value.Sensitivity, writer, summary);
writer.WriteEndElement();
}
// Serialize element name
if(value.NameElement != null)
{
writer.WriteStartElement("name");
FhirStringSerializer.SerializeFhirString(value.NameElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element query
if(value.QueryElement != null)
{
writer.WriteStartElement("query");
Base64BinarySerializer.SerializeBase64Binary(value.QueryElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element detail
if(value.Detail != null && value.Detail.Count > 0)
{
writer.WriteStartArrayElement("detail");
foreach(var item in value.Detail)
{
writer.WriteStartArrayMember("detail");
SecurityEventSerializer.SerializeSecurityEventObjectDetailComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
}
示例10: SerializeSecurityEventEventComponent
public static void SerializeSecurityEventEventComponent(Hl7.Fhir.Model.SecurityEvent.SecurityEventEventComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element type
if(value.Type != null)
{
writer.WriteStartElement("type");
CodeableConceptSerializer.SerializeCodeableConcept(value.Type, writer, summary);
writer.WriteEndElement();
}
// Serialize element subtype
if(value.Subtype != null && value.Subtype.Count > 0)
{
writer.WriteStartArrayElement("subtype");
foreach(var item in value.Subtype)
{
writer.WriteStartArrayMember("subtype");
CodeableConceptSerializer.SerializeCodeableConcept(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element action
if(value.ActionElement != null)
{
writer.WriteStartElement("action");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.SecurityEvent.SecurityEventAction>(value.ActionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element dateTime
if(value.DateTimeElement != null)
{
writer.WriteStartElement("dateTime");
InstantSerializer.SerializeInstant(value.DateTimeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element outcome
if(value.OutcomeElement != null)
{
writer.WriteStartElement("outcome");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.SecurityEvent.SecurityEventOutcome>(value.OutcomeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element outcomeDesc
if(value.OutcomeDescElement != null)
{
writer.WriteStartElement("outcomeDesc");
FhirStringSerializer.SerializeFhirString(value.OutcomeDescElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例11: SerializeGroup
//.........这里部分代码省略.........
}
// Serialize element text
if(value.Text != null && !summary)
{
writer.WriteStartElement("text");
NarrativeSerializer.SerializeNarrative(value.Text, writer, summary);
writer.WriteEndElement();
}
// Serialize element contained
if(value.Contained != null && !summary && value.Contained.Count > 0)
{
writer.WriteStartArrayElement("contained");
foreach(var item in value.Contained)
{
writer.WriteStartArrayMember("contained");
FhirSerializer.SerializeResource(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element identifier
if(value.Identifier != null)
{
writer.WriteStartElement("identifier");
IdentifierSerializer.SerializeIdentifier(value.Identifier, writer, summary);
writer.WriteEndElement();
}
// Serialize element type
if(value.TypeElement != null)
{
writer.WriteStartElement("type");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.Group.GroupType>(value.TypeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element actual
if(value.ActualElement != null)
{
writer.WriteStartElement("actual");
FhirBooleanSerializer.SerializeFhirBoolean(value.ActualElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element code
if(value.Code != null)
{
writer.WriteStartElement("code");
CodeableConceptSerializer.SerializeCodeableConcept(value.Code, writer, summary);
writer.WriteEndElement();
}
// Serialize element name
if(value.NameElement != null)
{
writer.WriteStartElement("name");
FhirStringSerializer.SerializeFhirString(value.NameElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element quantity
if(value.QuantityElement != null)
{
writer.WriteStartElement("quantity");
IntegerSerializer.SerializeInteger(value.QuantityElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element characteristic
if(value.Characteristic != null && !summary && value.Characteristic.Count > 0)
{
writer.WriteStartArrayElement("characteristic");
foreach(var item in value.Characteristic)
{
writer.WriteStartArrayMember("characteristic");
GroupSerializer.SerializeGroupCharacteristicComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element member
if(value.Member != null && !summary && value.Member.Count > 0)
{
writer.WriteStartArrayElement("member");
foreach(var item in value.Member)
{
writer.WriteStartArrayMember("member");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例12: SerializeGroupCharacteristicComponent
public static void SerializeGroupCharacteristicComponent(Hl7.Fhir.Model.Group.GroupCharacteristicComponent value, IFhirWriter writer, bool summary)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalIdElement != null)
writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && !summary && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element type
if(value.Type != null)
{
writer.WriteStartElement("type");
CodeableConceptSerializer.SerializeCodeableConcept(value.Type, writer, summary);
writer.WriteEndElement();
}
// Serialize element value
if(value.Value != null)
{
writer.WriteStartElement( SerializationUtil.BuildPolymorphicName("value", value.Value.GetType()) );
FhirSerializer.SerializeElement(value.Value, writer, summary);
writer.WriteEndElement();
}
// Serialize element exclude
if(value.ExcludeElement != null)
{
writer.WriteStartElement("exclude");
FhirBooleanSerializer.SerializeFhirBoolean(value.ExcludeElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例13: SerializeDemographics
//.........这里部分代码省略.........
// Serialize element name
if(value.Name != null && value.Name.Count > 0)
{
writer.WriteStartArrayElement("name");
foreach(var item in value.Name)
{
writer.WriteStartArrayMember("name");
HumanNameSerializer.SerializeHumanName(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element telecom
if(value.Telecom != null && value.Telecom.Count > 0)
{
writer.WriteStartArrayElement("telecom");
foreach(var item in value.Telecom)
{
writer.WriteStartArrayMember("telecom");
ContactSerializer.SerializeContact(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element gender
if(value.Gender != null)
{
writer.WriteStartElement("gender");
CodeableConceptSerializer.SerializeCodeableConcept(value.Gender, writer);
writer.WriteEndElement();
}
// Serialize element birthDate
if(value.BirthDate != null)
{
writer.WriteStartElement("birthDate");
FhirDateTimeSerializer.SerializeFhirDateTime(value.BirthDate, writer);
writer.WriteEndElement();
}
// Serialize element deceased
if(value.Deceased != null)
{
writer.WriteStartElement("deceased");
FhirBooleanSerializer.SerializeFhirBoolean(value.Deceased, writer);
writer.WriteEndElement();
}
// Serialize element address
if(value.Address != null && value.Address.Count > 0)
{
writer.WriteStartArrayElement("address");
foreach(var item in value.Address)
{
writer.WriteStartArrayMember("address");
AddressSerializer.SerializeAddress(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element photo
if(value.Photo != null && value.Photo.Count > 0)
{
writer.WriteStartArrayElement("photo");
foreach(var item in value.Photo)
{
writer.WriteStartArrayMember("photo");
AttachmentSerializer.SerializeAttachment(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element maritalStatus
if(value.MaritalStatus != null)
{
writer.WriteStartElement("maritalStatus");
CodeableConceptSerializer.SerializeCodeableConcept(value.MaritalStatus, writer);
writer.WriteEndElement();
}
// Serialize element language
if(value.Language != null && value.Language.Count > 0)
{
writer.WriteStartArrayElement("language");
foreach(var item in value.Language)
{
writer.WriteStartArrayMember("language");
DemographicsSerializer.SerializeDemographicsLanguageComponent(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
}
示例14: SerializeDemographicsLanguageComponent
public static void SerializeDemographicsLanguageComponent(Hl7.Fhir.Model.Demographics.DemographicsLanguageComponent value, IFhirWriter writer)
{
writer.WriteStartComplexContent();
// Serialize element _id
if(value.LocalId != null)
writer.WritePrimitiveContents("_id", value.LocalId, XmlSerializationHint.Attribute);
// Serialize element extension
if(value.Extension != null && value.Extension.Count > 0)
{
writer.WriteStartArrayElement("extension");
foreach(var item in value.Extension)
{
writer.WriteStartArrayMember("extension");
ExtensionSerializer.SerializeExtension(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element language
if(value.Language != null)
{
writer.WriteStartElement("language");
CodeableConceptSerializer.SerializeCodeableConcept(value.Language, writer);
writer.WriteEndElement();
}
// Serialize element mode
if(value.Mode != null && value.Mode.Count > 0)
{
writer.WriteStartArrayElement("mode");
foreach(var item in value.Mode)
{
writer.WriteStartArrayMember("mode");
CodeableConceptSerializer.SerializeCodeableConcept(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element proficiencyLevel
if(value.ProficiencyLevel != null)
{
writer.WriteStartElement("proficiencyLevel");
CodeableConceptSerializer.SerializeCodeableConcept(value.ProficiencyLevel, writer);
writer.WriteEndElement();
}
// Serialize element preference
if(value.Preference != null)
{
writer.WriteStartElement("preference");
FhirBooleanSerializer.SerializeFhirBoolean(value.Preference, writer);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例15: SerializeDiagnosticOrder
//.........这里部分代码省略.........
writer.WriteStartElement("subject");
ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer, summary);
writer.WriteEndElement();
}
// Serialize element orderer
if(value.Orderer != null && !summary)
{
writer.WriteStartElement("orderer");
ResourceReferenceSerializer.SerializeResourceReference(value.Orderer, writer, summary);
writer.WriteEndElement();
}
// Serialize element identifier
if(value.Identifier != null && !summary && value.Identifier.Count > 0)
{
writer.WriteStartArrayElement("identifier");
foreach(var item in value.Identifier)
{
writer.WriteStartArrayMember("identifier");
IdentifierSerializer.SerializeIdentifier(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element encounter
if(value.Encounter != null && !summary)
{
writer.WriteStartElement("encounter");
ResourceReferenceSerializer.SerializeResourceReference(value.Encounter, writer, summary);
writer.WriteEndElement();
}
// Serialize element clinicalNotes
if(value.ClinicalNotesElement != null && !summary)
{
writer.WriteStartElement("clinicalNotes");
FhirStringSerializer.SerializeFhirString(value.ClinicalNotesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element specimen
if(value.Specimen != null && !summary && value.Specimen.Count > 0)
{
writer.WriteStartArrayElement("specimen");
foreach(var item in value.Specimen)
{
writer.WriteStartArrayMember("specimen");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element status
if(value.StatusElement != null && !summary)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element priority
if(value.PriorityElement != null && !summary)
{
writer.WriteStartElement("priority");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderPriority>(value.PriorityElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element event
if(value.Event != null && !summary && value.Event.Count > 0)
{
writer.WriteStartArrayElement("event");
foreach(var item in value.Event)
{
writer.WriteStartArrayMember("event");
DiagnosticOrderSerializer.SerializeDiagnosticOrderEventComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element item
if(value.Item != null && !summary && value.Item.Count > 0)
{
writer.WriteStartArrayElement("item");
foreach(var item in value.Item)
{
writer.WriteStartArrayMember("item");
DiagnosticOrderSerializer.SerializeDiagnosticOrderItemComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}