本文整理汇总了C#中IFhirWriter.WriteEndRootObject方法的典型用法代码示例。如果您正苦于以下问题:C# IFhirWriter.WriteEndRootObject方法的具体用法?C# IFhirWriter.WriteEndRootObject怎么用?C# IFhirWriter.WriteEndRootObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFhirWriter
的用法示例。
在下文中一共展示了IFhirWriter.WriteEndRootObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SerializePatient
//.........这里部分代码省略.........
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element maritalStatus
if(value.MaritalStatus != null)
{
writer.WriteStartElement("maritalStatus");
CodeableConceptSerializer.SerializeCodeableConcept(value.MaritalStatus, writer, summary);
writer.WriteEndElement();
}
// Serialize element multipleBirth
if(value.MultipleBirth != null)
{
writer.WriteStartElement( SerializationUtil.BuildPolymorphicName("multipleBirth", value.MultipleBirth.GetType()) );
FhirSerializer.SerializeElement(value.MultipleBirth, writer, summary);
writer.WriteEndElement();
}
// Serialize element photo
if(value.Photo != null && !summary && value.Photo.Count > 0)
{
writer.WriteStartArrayElement("photo");
foreach(var item in value.Photo)
{
writer.WriteStartArrayMember("photo");
AttachmentSerializer.SerializeAttachment(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element contact
if(value.Contact != null && !summary && value.Contact.Count > 0)
{
writer.WriteStartArrayElement("contact");
foreach(var item in value.Contact)
{
writer.WriteStartArrayMember("contact");
PatientSerializer.SerializeContactComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element animal
if(value.Animal != null)
{
writer.WriteStartElement("animal");
PatientSerializer.SerializeAnimalComponent(value.Animal, writer, summary);
writer.WriteEndElement();
}
// Serialize element communication
if(value.Communication != null && !summary && value.Communication.Count > 0)
{
writer.WriteStartArrayElement("communication");
foreach(var item in value.Communication)
{
writer.WriteStartArrayMember("communication");
CodeableConceptSerializer.SerializeCodeableConcept(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element provider
if(value.Provider != null)
{
writer.WriteStartElement("provider");
ResourceReferenceSerializer.SerializeResourceReference(value.Provider, writer, summary);
writer.WriteEndElement();
}
// Serialize element link
if(value.Link != null && value.Link.Count > 0)
{
writer.WriteStartArrayElement("link");
foreach(var item in value.Link)
{
writer.WriteStartArrayMember("link");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element active
if(value.ActiveElement != null)
{
writer.WriteStartElement("active");
FhirBooleanSerializer.SerializeFhirBoolean(value.ActiveElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例2: SerializeImagingStudy
//.........这里部分代码省略.........
writer.WriteStartArrayMember("modality");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ImagingStudy.ImagingModality>(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element referrer
if(value.Referrer != null && !summary)
{
writer.WriteStartElement("referrer");
ResourceReferenceSerializer.SerializeResourceReference(value.Referrer, writer, summary);
writer.WriteEndElement();
}
// Serialize element availability
if(value.AvailabilityElement != null && !summary)
{
writer.WriteStartElement("availability");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ImagingStudy.InstanceAvailability>(value.AvailabilityElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element url
if(value.UrlElement != null && !summary)
{
writer.WriteStartElement("url");
FhirUriSerializer.SerializeFhirUri(value.UrlElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element numberOfSeries
if(value.NumberOfSeriesElement != null && !summary)
{
writer.WriteStartElement("numberOfSeries");
IntegerSerializer.SerializeInteger(value.NumberOfSeriesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element numberOfInstances
if(value.NumberOfInstancesElement != null && !summary)
{
writer.WriteStartElement("numberOfInstances");
IntegerSerializer.SerializeInteger(value.NumberOfInstancesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element clinicalInformation
if(value.ClinicalInformationElement != null && !summary)
{
writer.WriteStartElement("clinicalInformation");
FhirStringSerializer.SerializeFhirString(value.ClinicalInformationElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element procedure
if(value.Procedure != null && !summary && value.Procedure.Count > 0)
{
writer.WriteStartArrayElement("procedure");
foreach(var item in value.Procedure)
{
writer.WriteStartArrayMember("procedure");
CodingSerializer.SerializeCoding(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element interpreter
if(value.Interpreter != null && !summary)
{
writer.WriteStartElement("interpreter");
ResourceReferenceSerializer.SerializeResourceReference(value.Interpreter, writer, summary);
writer.WriteEndElement();
}
// Serialize element description
if(value.DescriptionElement != null && !summary)
{
writer.WriteStartElement("description");
FhirStringSerializer.SerializeFhirString(value.DescriptionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element series
if(value.Series != null && !summary && value.Series.Count > 0)
{
writer.WriteStartArrayElement("series");
foreach(var item in value.Series)
{
writer.WriteStartArrayMember("series");
ImagingStudySerializer.SerializeImagingStudySeriesComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例3: SerializeCoverage
//.........这里部分代码省略.........
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
if(value.Subplan != null && !summary)
{
writer.WriteStartElement("subplan");
IdentifierSerializer.SerializeIdentifier(value.Subplan, writer, summary);
writer.WriteEndElement();
}
// Serialize element dependent
if(value.DependentElement != null && !summary)
{
writer.WriteStartElement("dependent");
IntegerSerializer.SerializeInteger(value.DependentElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element sequence
if(value.SequenceElement != null && !summary)
{
writer.WriteStartElement("sequence");
IntegerSerializer.SerializeInteger(value.SequenceElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element subscriber
if(value.Subscriber != null && !summary)
{
writer.WriteStartElement("subscriber");
CoverageSerializer.SerializeCoverageSubscriberComponent(value.Subscriber, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例4: 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();
}
示例5: SerializeFamilyHistory
public static void SerializeFamilyHistory(Hl7.Fhir.Model.FamilyHistory value, IFhirWriter writer, bool summary)
{
writer.WriteStartRootObject("FamilyHistory");
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 subject
if(value.Subject != null)
{
writer.WriteStartElement("subject");
ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer, summary);
writer.WriteEndElement();
}
// Serialize element note
if(value.NoteElement != null && !summary)
{
writer.WriteStartElement("note");
FhirStringSerializer.SerializeFhirString(value.NoteElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element relation
if(value.Relation != null && !summary && value.Relation.Count > 0)
{
writer.WriteStartArrayElement("relation");
foreach(var item in value.Relation)
{
writer.WriteStartArrayMember("relation");
FamilyHistorySerializer.SerializeFamilyHistoryRelationComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例6: 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();
}
示例7: SerializeObservation
//.........这里部分代码省略.........
if(value.Applies != null && !summary)
{
writer.WriteStartElement( SerializationUtil.BuildPolymorphicName("applies", value.Applies.GetType()) );
FhirSerializer.SerializeElement(value.Applies, writer, summary);
writer.WriteEndElement();
}
// Serialize element issued
if(value.IssuedElement != null && !summary)
{
writer.WriteStartElement("issued");
InstantSerializer.SerializeInstant(value.IssuedElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element status
if(value.StatusElement != null && !summary)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ObservationStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element reliability
if(value.ReliabilityElement != null && !summary)
{
writer.WriteStartElement("reliability");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.Observation.ObservationReliability>(value.ReliabilityElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element bodySite
if(value.BodySite != null && !summary)
{
writer.WriteStartElement("bodySite");
CodeableConceptSerializer.SerializeCodeableConcept(value.BodySite, writer, summary);
writer.WriteEndElement();
}
// Serialize element method
if(value.Method != null && !summary)
{
writer.WriteStartElement("method");
CodeableConceptSerializer.SerializeCodeableConcept(value.Method, 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 subject
if(value.Subject != null && !summary)
{
writer.WriteStartElement("subject");
ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer, summary);
writer.WriteEndElement();
}
// Serialize element performer
if(value.Performer != null && !summary)
{
writer.WriteStartElement("performer");
ResourceReferenceSerializer.SerializeResourceReference(value.Performer, writer, summary);
writer.WriteEndElement();
}
// Serialize element referenceRange
if(value.ReferenceRange != null && !summary && value.ReferenceRange.Count > 0)
{
writer.WriteStartArrayElement("referenceRange");
foreach(var item in value.ReferenceRange)
{
writer.WriteStartArrayMember("referenceRange");
ObservationSerializer.SerializeObservationReferenceRangeComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element component
if(value.Component != null && !summary && value.Component.Count > 0)
{
writer.WriteStartArrayElement("component");
foreach(var item in value.Component)
{
writer.WriteStartArrayMember("component");
ObservationSerializer.SerializeObservationComponentComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例8: SerializeProvenance
//.........这里部分代码省略.........
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element target
if(value.Target != null && !summary && value.Target.Count > 0)
{
writer.WriteStartArrayElement("target");
foreach(var item in value.Target)
{
writer.WriteStartArrayMember("target");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element period
if(value.Period != null && !summary)
{
writer.WriteStartElement("period");
PeriodSerializer.SerializePeriod(value.Period, writer, summary);
writer.WriteEndElement();
}
// Serialize element recorded
if(value.RecordedElement != null && !summary)
{
writer.WriteStartElement("recorded");
InstantSerializer.SerializeInstant(value.RecordedElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element reason
if(value.Reason != null && !summary)
{
writer.WriteStartElement("reason");
CodeableConceptSerializer.SerializeCodeableConcept(value.Reason, writer, summary);
writer.WriteEndElement();
}
// Serialize element location
if(value.Location != null && !summary)
{
writer.WriteStartElement("location");
ResourceReferenceSerializer.SerializeResourceReference(value.Location, writer, summary);
writer.WriteEndElement();
}
// Serialize element policy
if(value.PolicyElement != null && !summary && value.PolicyElement.Count > 0)
{
writer.WriteStartArrayElement("policy");
foreach(var item in value.PolicyElement)
{
writer.WriteStartArrayMember("policy");
FhirUriSerializer.SerializeFhirUri(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element agent
if(value.Agent != null && !summary && value.Agent.Count > 0)
{
writer.WriteStartArrayElement("agent");
foreach(var item in value.Agent)
{
writer.WriteStartArrayMember("agent");
ProvenanceSerializer.SerializeProvenanceAgentComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element entity
if(value.Entity != null && !summary && value.Entity.Count > 0)
{
writer.WriteStartArrayElement("entity");
foreach(var item in value.Entity)
{
writer.WriteStartArrayMember("entity");
ProvenanceSerializer.SerializeProvenanceEntityComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element signature
if(value.SignatureElement != null && !summary)
{
writer.WriteStartElement("signature");
FhirStringSerializer.SerializeFhirString(value.SignatureElement, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例9: SerializeQuery
public static void SerializeQuery(Hl7.Fhir.Model.Query value, IFhirWriter writer, bool summary)
{
writer.WriteStartRootObject("Query");
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.IdentifierElement != null && !summary)
{
writer.WriteStartElement("identifier");
FhirUriSerializer.SerializeFhirUri(value.IdentifierElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element parameter
if(value.Parameter != null && !summary && value.Parameter.Count > 0)
{
writer.WriteStartArrayElement("parameter");
foreach(var item in value.Parameter)
{
writer.WriteStartArrayMember("parameter");
ExtensionSerializer.SerializeExtension(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element response
if(value.Response != null && !summary)
{
writer.WriteStartElement("response");
QuerySerializer.SerializeQueryResponseComponent(value.Response, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例10: SerializeOrderResponse
//.........这里部分代码省略.........
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 request
if(value.Request != null && !summary)
{
writer.WriteStartElement("request");
ResourceReferenceSerializer.SerializeResourceReference(value.Request, writer, summary);
writer.WriteEndElement();
}
// Serialize element date
if(value.DateElement != null && !summary)
{
writer.WriteStartElement("date");
FhirDateTimeSerializer.SerializeFhirDateTime(value.DateElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element who
if(value.Who != null && !summary)
{
writer.WriteStartElement("who");
ResourceReferenceSerializer.SerializeResourceReference(value.Who, writer, summary);
writer.WriteEndElement();
}
// Serialize element authority
if(value.Authority != null && !summary)
{
writer.WriteStartElement("authority");
ResourceReferenceSerializer.SerializeResourceReference(value.Authority, writer, summary);
writer.WriteEndElement();
}
// Serialize element cost
if(value.Cost != null && !summary)
{
writer.WriteStartElement("cost");
QuantitySerializer.SerializeQuantity(value.Cost, writer, summary);
writer.WriteEndElement();
}
// Serialize element code
if(value.CodeElement != null && !summary)
{
writer.WriteStartElement("code");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.OrderResponse.OrderOutcomeCode>(value.CodeElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element description
if(value.DescriptionElement != null && !summary)
{
writer.WriteStartElement("description");
FhirStringSerializer.SerializeFhirString(value.DescriptionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element fulfillment
if(value.Fulfillment != null && !summary && value.Fulfillment.Count > 0)
{
writer.WriteStartArrayElement("fulfillment");
foreach(var item in value.Fulfillment)
{
writer.WriteStartArrayMember("fulfillment");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例11: SerializeMedication
//.........这里部分代码省略.........
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 name
if(value.NameElement != null)
{
writer.WriteStartElement("name");
FhirStringSerializer.SerializeFhirString(value.NameElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element code
if(value.Code != null)
{
writer.WriteStartElement("code");
CodeableConceptSerializer.SerializeCodeableConcept(value.Code, writer, summary);
writer.WriteEndElement();
}
// Serialize element isBrand
if(value.IsBrandElement != null)
{
writer.WriteStartElement("isBrand");
FhirBooleanSerializer.SerializeFhirBoolean(value.IsBrandElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element manufacturer
if(value.Manufacturer != null)
{
writer.WriteStartElement("manufacturer");
ResourceReferenceSerializer.SerializeResourceReference(value.Manufacturer, writer, summary);
writer.WriteEndElement();
}
// Serialize element kind
if(value.KindElement != null)
{
writer.WriteStartElement("kind");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.Medication.MedicationKind>(value.KindElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element product
if(value.Product != null && !summary)
{
writer.WriteStartElement("product");
MedicationSerializer.SerializeMedicationProductComponent(value.Product, writer, summary);
writer.WriteEndElement();
}
// Serialize element package
if(value.Package != null && !summary)
{
writer.WriteStartElement("package");
MedicationSerializer.SerializeMedicationPackageComponent(value.Package, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例12: SerializeValueSet
//.........这里部分代码省略.........
FhirStringSerializer.SerializeFhirString(value.VersionElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element name
if(value.NameElement != null)
{
writer.WriteStartElement("name");
FhirStringSerializer.SerializeFhirString(value.NameElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element publisher
if(value.PublisherElement != null)
{
writer.WriteStartElement("publisher");
FhirStringSerializer.SerializeFhirString(value.PublisherElement, writer, summary);
writer.WriteEndElement();
}
// 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, 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 copyright
if(value.CopyrightElement != null && !summary)
{
writer.WriteStartElement("copyright");
FhirStringSerializer.SerializeFhirString(value.CopyrightElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element status
if(value.StatusElement != null)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ValueSet.ValueSetStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element experimental
if(value.ExperimentalElement != null)
{
writer.WriteStartElement("experimental");
FhirBooleanSerializer.SerializeFhirBoolean(value.ExperimentalElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element date
if(value.DateElement != null)
{
writer.WriteStartElement("date");
FhirDateTimeSerializer.SerializeFhirDateTime(value.DateElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element define
if(value.Define != null && !summary)
{
writer.WriteStartElement("define");
ValueSetSerializer.SerializeValueSetDefineComponent(value.Define, writer, summary);
writer.WriteEndElement();
}
// Serialize element compose
if(value.Compose != null && !summary)
{
writer.WriteStartElement("compose");
ValueSetSerializer.SerializeValueSetComposeComponent(value.Compose, writer, summary);
writer.WriteEndElement();
}
// Serialize element expansion
if(value.Expansion != null && !summary)
{
writer.WriteStartElement("expansion");
ValueSetSerializer.SerializeValueSetExpansionComponent(value.Expansion, writer, summary);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例13: SerializeDocument
//.........这里部分代码省略.........
writer.WriteStartArrayElement("author");
foreach(var item in value.Author)
{
writer.WriteStartArrayMember("author");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element attester
if(value.Attester != null && value.Attester.Count > 0)
{
writer.WriteStartArrayElement("attester");
foreach(var item in value.Attester)
{
writer.WriteStartArrayMember("attester");
DocumentSerializer.SerializeDocumentAttesterComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element custodian
if(value.Custodian != null)
{
writer.WriteStartElement("custodian");
ResourceReferenceSerializer.SerializeResourceReference(value.Custodian, writer, summary);
writer.WriteEndElement();
}
// Serialize element event
if(value.Event != null)
{
writer.WriteStartElement("event");
DocumentSerializer.SerializeDocumentEventComponent(value.Event, writer, summary);
writer.WriteEndElement();
}
// Serialize element encounter
if(value.Encounter != null)
{
writer.WriteStartElement("encounter");
ResourceReferenceSerializer.SerializeResourceReference(value.Encounter, writer, summary);
writer.WriteEndElement();
}
// Serialize element replaces
if(value.ReplacesElement != null)
{
writer.WriteStartElement("replaces");
IdSerializer.SerializeId(value.ReplacesElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element provenance
if(value.Provenance != null && !summary && value.Provenance.Count > 0)
{
writer.WriteStartArrayElement("provenance");
foreach(var item in value.Provenance)
{
writer.WriteStartArrayMember("provenance");
ResourceReferenceSerializer.SerializeResourceReference(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element stylesheet
if(value.Stylesheet != null && !summary)
{
writer.WriteStartElement("stylesheet");
AttachmentSerializer.SerializeAttachment(value.Stylesheet, writer, summary);
writer.WriteEndElement();
}
// Serialize element representation
if(value.Representation != null && !summary)
{
writer.WriteStartElement("representation");
AttachmentSerializer.SerializeAttachment(value.Representation, writer, summary);
writer.WriteEndElement();
}
// Serialize element section
if(value.Section != null && !summary && value.Section.Count > 0)
{
writer.WriteStartArrayElement("section");
foreach(var item in value.Section)
{
writer.WriteStartArrayMember("section");
DocumentSerializer.SerializeSectionComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例14: SerializeXdsFolder
public static void SerializeXdsFolder(XdsFolder value, IFhirWriter writer)
{
writer.WriteStartRootObject("XdsFolder");
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();
}
// Serialize element code
if(value.Code != null && value.Code.Count > 0)
{
writer.WriteStartArrayElement("code");
foreach(var item in value.Code)
{
writer.WriteStartArrayMember("code");
CodingSerializer.SerializeCoding(item, writer);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element title
if(value.Title != null)
{
writer.WriteStartElement("title");
FhirStringSerializer.SerializeFhirString(value.Title, writer);
writer.WriteEndElement();
}
// Serialize element patientId
if(value.PatientId != null)
{
writer.WriteStartElement("patientId");
IdentifierSerializer.SerializeIdentifier(value.PatientId, writer);
writer.WriteEndElement();
}
// Serialize element homeCommunity
if(value.HomeCommunity != null)
{
writer.WriteStartElement("homeCommunity");
FhirStringSerializer.SerializeFhirString(value.HomeCommunity, writer);
writer.WriteEndElement();
}
// Serialize element comments
if(value.Comments != null)
{
writer.WriteStartElement("comments");
FhirStringSerializer.SerializeFhirString(value.Comments, writer);
writer.WriteEndElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}
示例15: SerializeQuestionnaire
//.........这里部分代码省略.........
writer.WriteStartArrayMember("contained");
FhirSerializer.SerializeResource(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element status
if(value.StatusElement != null)
{
writer.WriteStartElement("status");
CodeSerializer.SerializeCode<Hl7.Fhir.Model.ObservationStatus>(value.StatusElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element authored
if(value.AuthoredElement != null)
{
writer.WriteStartElement("authored");
FhirDateTimeSerializer.SerializeFhirDateTime(value.AuthoredElement, writer, summary);
writer.WriteEndElement();
}
// Serialize element subject
if(value.Subject != null)
{
writer.WriteStartElement("subject");
ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer, summary);
writer.WriteEndElement();
}
// Serialize element author
if(value.Author != null)
{
writer.WriteStartElement("author");
ResourceReferenceSerializer.SerializeResourceReference(value.Author, writer, summary);
writer.WriteEndElement();
}
// Serialize element source
if(value.Source != null)
{
writer.WriteStartElement("source");
ResourceReferenceSerializer.SerializeResourceReference(value.Source, writer, summary);
writer.WriteEndElement();
}
// Serialize element name
if(value.Name != null)
{
writer.WriteStartElement("name");
CodeableConceptSerializer.SerializeCodeableConcept(value.Name, writer, summary);
writer.WriteEndElement();
}
// Serialize element identifier
if(value.Identifier != null)
{
writer.WriteStartElement("identifier");
IdentifierSerializer.SerializeIdentifier(value.Identifier, writer, summary);
writer.WriteEndElement();
}
// Serialize element encounter
if(value.Encounter != null)
{
writer.WriteStartElement("encounter");
ResourceReferenceSerializer.SerializeResourceReference(value.Encounter, writer, summary);
writer.WriteEndElement();
}
// Serialize element question
if(value.Question != null && !summary && value.Question.Count > 0)
{
writer.WriteStartArrayElement("question");
foreach(var item in value.Question)
{
writer.WriteStartArrayMember("question");
QuestionnaireSerializer.SerializeQuestionComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
// Serialize element group
if(value.Group != null && !summary && value.Group.Count > 0)
{
writer.WriteStartArrayElement("group");
foreach(var item in value.Group)
{
writer.WriteStartArrayMember("group");
QuestionnaireSerializer.SerializeGroupComponent(item, writer, summary);
writer.WriteEndArrayMember();
}
writer.WriteEndArrayElement();
}
writer.WriteEndComplexContent();
writer.WriteEndRootObject();
}