本文整理汇总了C#中IFhirWriter.WriteStartElement方法的典型用法代码示例。如果您正苦于以下问题:C# IFhirWriter.WriteStartElement方法的具体用法?C# IFhirWriter.WriteStartElement怎么用?C# IFhirWriter.WriteStartElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFhirWriter
的用法示例。
在下文中一共展示了IFhirWriter.WriteStartElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SerializeProduct
public static void SerializeProduct(Product value, IFhirWriter writer)
{
writer.WriteStartRootObject("Product");
writer.WriteStartComplexContent();
// Serialize element's localId attribute
if( value.InternalId != null && !String.IsNullOrEmpty(value.InternalId.Contents) )
writer.WriteRefIdContents(value.InternalId.Contents);
// 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");
CodeSerializer.SerializeCode(value.Language, writer);
writer.WriteEndElement();
}
// Serialize element text
if(value.Text != null)
{
writer.WriteStartElement("text");
NarrativeSerializer.SerializeNarrative(value.Text, writer);
writer.WriteEndElement();
}
// Serialize element contained
if(value.Contained != null && value.Contained.Count > 0)
{
writer.WriteStartArrayElement("contained");
foreach(var item in value.Contained)
{
writer.WriteStartArrayMember("contained");
FhirSerializer.SerializeResource(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例2: SerializeInterestOfCare
public static void SerializeInterestOfCare(Hl7.Fhir.Model.InterestOfCare value, IFhirWriter writer, bool summary)
{
writer.WriteStartRootObject("InterestOfCare");
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 language
if(value.LanguageElement != null && !summary)
{
writer.WriteStartElement("language");
CodeSerializer.SerializeCode(value.LanguageElement, writer, summary);
writer.WriteEndElement();
}
// 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();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例3: 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();
}
示例4: SerializeAnimalComponent
public static void SerializeAnimalComponent(Hl7.Fhir.Model.Patient.AnimalComponent 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 species
if(value.Species != null)
{
writer.WriteStartElement("species");
CodeableConceptSerializer.SerializeCodeableConcept(value.Species, writer, summary);
writer.WriteEndElement();
}
// Serialize element breed
if(value.Breed != null)
{
writer.WriteStartElement("breed");
CodeableConceptSerializer.SerializeCodeableConcept(value.Breed, writer, summary);
writer.WriteEndElement();
}
// Serialize element genderStatus
if(value.GenderStatus != null)
{
writer.WriteStartElement("genderStatus");
CodeableConceptSerializer.SerializeCodeableConcept(value.GenderStatus, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例5: SerializeExtension
public static void SerializeExtension(Hl7.Fhir.Model.Extension 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 url
if(value.UrlElement != null)
{
writer.WriteStartElement("url");
FhirUriSerializer.SerializeFhirUri(value.UrlElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element isModifier
if(value.IsModifierElement != null)
{
writer.WriteStartElement("isModifier");
FhirBooleanSerializer.SerializeFhirBoolean(value.IsModifierElement, 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();
}
writer.WriteEndComplexContent();
}
示例6: SerializeCoding
public static void SerializeCoding(Hl7.Fhir.Model.Coding 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 system
if(value.SystemElement != null)
{
writer.WriteStartElement("system");
FhirUriSerializer.SerializeFhirUri(value.SystemElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element code
if(value.CodeElement != null)
{
writer.WriteStartElement("code");
CodeSerializer.SerializeCode(value.CodeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element display
if(value.DisplayElement != null)
{
writer.WriteStartElement("display");
FhirStringSerializer.SerializeFhirString(value.DisplayElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例7: SerializeChoice
public static void SerializeChoice(Hl7.Fhir.Model.Choice 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 code
if(value.CodeElement != null)
{
writer.WriteStartElement("code");
CodeSerializer.SerializeCode(value.CodeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element option
if(value.Option != null && value.Option.Count > 0)
{
writer.WriteStartArrayElement("option");
foreach(var item in value.Option)
{
writer.WriteStartArrayMember("option");
ChoiceSerializer.SerializeChoiceOptionComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element isOrdered
if(value.IsOrderedElement != null)
{
writer.WriteStartElement("isOrdered");
FhirBooleanSerializer.SerializeFhirBoolean(value.IsOrderedElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例8: SerializeRange
public static void SerializeRange(Hl7.Fhir.Model.Range 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 low
if(value.Low != null)
{
writer.WriteStartElement("low");
QuantitySerializer.SerializeQuantity(value.Low, writer, summary);
writer.WriteEndElement();
}
// Serialize element high
if(value.High != null)
{
writer.WriteStartElement("high");
QuantitySerializer.SerializeQuantity(value.High, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例9: SerializeRatio
public static void SerializeRatio(Hl7.Fhir.Model.Ratio 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 numerator
if(value.Numerator != null)
{
writer.WriteStartElement("numerator");
QuantitySerializer.SerializeQuantity(value.Numerator, writer, summary);
writer.WriteEndElement();
}
// Serialize element denominator
if(value.Denominator != null)
{
writer.WriteStartElement("denominator");
QuantitySerializer.SerializeQuantity(value.Denominator, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例10: 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();
}
示例11: SerializeCoverage
public static void SerializeCoverage(Hl7.Fhir.Model.Coverage value, IFhirWriter writer, bool summary)
{
writer.WriteStartRootObject("Coverage");
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 language
if(value.LanguageElement != null && !summary)
{
writer.WriteStartElement("language");
CodeSerializer.SerializeCode(value.LanguageElement, writer, summary);
writer.WriteEndElement();
}
// 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 issuer
if(value.Issuer != null && !summary)
{
writer.WriteStartElement("issuer");
ResourceReferenceSerializer.SerializeResourceReference(value.Issuer, writer, summary);
writer.WriteEndElement();
}
// Serialize element period
if(value.Period != null && !summary)
{
writer.WriteStartElement("period");
PeriodSerializer.SerializePeriod(value.Period, writer, summary);
writer.WriteEndElement();
}
// Serialize element type
if(value.Type != null && !summary)
{
writer.WriteStartElement("type");
CodingSerializer.SerializeCoding(value.Type, writer, summary);
writer.WriteEndElement();
}
// Serialize element identifier
if(value.Identifier != null && !summary)
{
writer.WriteStartElement("identifier");
IdentifierSerializer.SerializeIdentifier(value.Identifier, writer, summary);
writer.WriteEndElement();
}
// Serialize element group
if(value.Group != null && !summary)
{
writer.WriteStartElement("group");
IdentifierSerializer.SerializeIdentifier(value.Group, writer, summary);
writer.WriteEndElement();
}
// Serialize element plan
if(value.Plan != null && !summary)
{
writer.WriteStartElement("plan");
IdentifierSerializer.SerializeIdentifier(value.Plan, writer, summary);
writer.WriteEndElement();
}
// Serialize element subplan
//.........这里部分代码省略.........
示例12: SerializeCarePlan
public static void SerializeCarePlan(Hl7.Fhir.Model.CarePlan value, IFhirWriter writer, bool summary)
{
writer.WriteStartRootObject("CarePlan");
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 language
if(value.LanguageElement != null && !summary)
{
writer.WriteStartElement("language");
CodeSerializer.SerializeCode(value.LanguageElement, writer, summary);
writer.WriteEndElement();
}
// 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 && !summary)
{
writer.WriteStartElement("identifier");
IdentifierSerializer.SerializeIdentifier(value.Identifier, writer, summary);
writer.WriteEndElement();
}
// Serialize element patient
if(value.Patient != null && !summary)
{
writer.WriteStartElement("patient");
ResourceReferenceSerializer.SerializeResourceReference(value.Patient, writer, summary);
writer.WriteEndElement();
}
// Serialize element status
if(value.StatusElement != null && !summary)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.CarePlan.CarePlanStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element period
if(value.Period != null && !summary)
{
writer.WriteStartElement("period");
PeriodSerializer.SerializePeriod(value.Period, writer, summary);
writer.WriteEndElement();
}
// Serialize element modified
if(value.ModifiedElement != null && !summary)
{
writer.WriteStartElement("modified");
FhirDateTimeSerializer.SerializeFhirDateTime(value.ModifiedElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element concern
if(value.Concern != null && !summary && value.Concern.Count > 0)
{
writer.WriteStartArrayElement("concern");
foreach(var item in value.Concern)
{
writer.WriteStartArrayMember("concern");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
//.........这里部分代码省略.........
示例13: SerializeCarePlanGoalComponent
public static void SerializeCarePlanGoalComponent(Hl7.Fhir.Model.CarePlan.CarePlanGoalComponent 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 description
if(value.DescriptionElement != null)
{
writer.WriteStartElement("description");
FhirStringSerializer.SerializeFhirString(value.DescriptionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element status
if(value.StatusElement != null)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.CarePlan.CarePlanGoalStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element notes
if(value.NotesElement != null)
{
writer.WriteStartElement("notes");
FhirStringSerializer.SerializeFhirString(value.NotesElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
示例14: SerializeImagingStudy
public static void SerializeImagingStudy(Hl7.Fhir.Model.ImagingStudy value, IFhirWriter writer, bool summary)
{
writer.WriteStartRootObject("ImagingStudy");
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 language
if(value.LanguageElement != null && !summary)
{
writer.WriteStartElement("language");
CodeSerializer.SerializeCode(value.LanguageElement, writer, summary);
writer.WriteEndElement();
}
// 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 dateTime
if(value.DateTimeElement != null && !summary)
{
writer.WriteStartElement("dateTime");
FhirDateTimeSerializer.SerializeFhirDateTime(value.DateTimeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element subject
if(value.Subject != null && !summary)
{
writer.WriteStartElement("subject");
ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer, summary);
writer.WriteEndElement();
}
// Serialize element uid
if(value.UidElement != null && !summary)
{
writer.WriteStartElement("uid");
OidSerializer.SerializeOid(value.UidElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element accessionNo
if(value.AccessionNo != null && !summary)
{
writer.WriteStartElement("accessionNo");
IdentifierSerializer.SerializeIdentifier(value.AccessionNo, 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 modality
if(value.Modality_Element != null && !summary && value.Modality_Element.Count > 0)
{
writer.WriteStartArrayElement("modality");
//.........这里部分代码省略.........
示例15: SerializeImagingStudySeriesComponent
public static void SerializeImagingStudySeriesComponent(Hl7.Fhir.Model.ImagingStudy.ImagingStudySeriesComponent 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 modality
if(value.ModalityElement != null)
{
writer.WriteStartElement("modality");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ImagingStudy.Modality>(value.ModalityElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element uid
if(value.UidElement != null)
{
writer.WriteStartElement("uid");
OidSerializer.SerializeOid(value.UidElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element description
if(value.DescriptionElement != null)
{
writer.WriteStartElement("description");
FhirStringSerializer.SerializeFhirString(value.DescriptionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element numberOfInstances
if(value.NumberOfInstancesElement != null)
{
writer.WriteStartElement("numberOfInstances");
IntegerSerializer.SerializeInteger(value.NumberOfInstancesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element availability
if(value.AvailabilityElement != null)
{
writer.WriteStartElement("availability");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ImagingStudy.InstanceAvailability>(value.AvailabilityElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element url
if(value.UrlElement != null)
{
writer.WriteStartElement("url");
FhirUriSerializer.SerializeFhirUri(value.UrlElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element bodySite
if(value.BodySite != null)
{
writer.WriteStartElement("bodySite");
CodingSerializer.SerializeCoding(value.BodySite, writer, summary);
writer.WriteEndElement();
}
// Serialize element dateTime
if(value.DateTimeElement != null)
{
writer.WriteStartElement("dateTime");
FhirDateTimeSerializer.SerializeFhirDateTime(value.DateTimeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element instance
if(value.Instance != null && value.Instance.Count > 0)
{
writer.WriteStartArrayElement("instance");
foreach(var item in value.Instance)
{
writer.WriteStartArrayMember("instance");
//.........这里部分代码省略.........