本文整理汇总了C#中IFhirWriter类的典型用法代码示例。如果您正苦于以下问题:C# IFhirWriter类的具体用法?C# IFhirWriter怎么用?C# IFhirWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IFhirWriter类属于命名空间,在下文中一共展示了IFhirWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:27,代码来源:FhirDecimalSerializer.cs
示例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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:35,代码来源:NarrativeSerializer.cs
示例3: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:54,代码来源:InterestOfCareSerializer.cs
示例4: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:54,代码来源:ProductSerializer.cs
示例5: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:52,代码来源:ChoiceSerializer.cs
示例6: SerializeCodeableConcept
public static void SerializeCodeableConcept(Hl7.Fhir.Model.CodeableConcept 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 coding
if(value.Coding != null && value.Coding.Count > 0)
{
writer.WriteStartArrayElement("coding");
foreach(var item in value.Coding)
{
writer.WriteStartArrayMember("coding");
CodingSerializer.SerializeCoding(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element text
if(value.TextElement != null)
{
writer.WriteStartElement("text");
FhirStringSerializer.SerializeFhirString(value.TextElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element primary
if(value.PrimaryElement != null)
{
writer.WriteStartElement("primary");
IdRefSerializer.SerializeIdRef(value.PrimaryElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:52,代码来源:CodeableConceptSerializer.cs
示例7: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:47,代码来源:PatientSerializer.cs
示例8: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:47,代码来源:ExtensionSerializer.cs
示例9: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:47,代码来源:CodingSerializer.cs
示例10: SerializeSchedule
public static void SerializeSchedule(Hl7.Fhir.Model.Schedule 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 event
if(value.Event != null && value.Event.Count > 0)
{
writer.WriteStartArrayElement("event");
foreach(var item in value.Event)
{
writer.WriteStartArrayMember("event");
PeriodSerializer.SerializePeriod(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element repeat
if(value.Repeat != null)
{
writer.WriteStartElement("repeat");
ScheduleSerializer.SerializeScheduleRepeatComponent(value.Repeat, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:44,代码来源:ScheduleSerializer.cs
示例11: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:39,代码来源:RangeSerializer.cs
示例12: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:39,代码来源:RatioSerializer.cs
示例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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:47,代码来源:CarePlanSerializer.cs
示例14: SerializeCarePlanActivityComponent
public static void SerializeCarePlanActivityComponent(Hl7.Fhir.Model.CarePlan.CarePlanActivityComponent 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 category
if(value.CategoryElement != null)
{
writer.WriteStartElement("category");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.CarePlan.CarePlanActivityCategory>(value.CategoryElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element code
if(value.Code != null)
{
writer.WriteStartElement("code");
CodeableConceptSerializer.SerializeCodeableConcept(value.Code, writer, summary);
writer.WriteEndElement();
}
// 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)
//.........这里部分代码省略.........
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:101,代码来源:CarePlanSerializer.cs
示例15: Serialize
internal static void Serialize(object instance, IFhirWriter writer, bool summary=false)
{
new ResourceWriter(writer).Serialize(instance, summary);
}
开发者ID:ranjancse26,项目名称:fhir-net-api,代码行数:4,代码来源:FhirSerializer.cs
示例16: 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");
//.........这里部分代码省略.........
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:101,代码来源:ImagingStudySerializer.cs
示例17: 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();
}
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:79,代码来源:ImagingStudySerializer.cs
示例18: 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();
}
|
请发表评论