当前位置: 首页>>代码示例>>C#>>正文


C# IFhirWriter.WriteRefIdContents方法代码示例

本文整理汇总了C#中IFhirWriter.WriteRefIdContents方法的典型用法代码示例。如果您正苦于以下问题:C# IFhirWriter.WriteRefIdContents方法的具体用法?C# IFhirWriter.WriteRefIdContents怎么用?C# IFhirWriter.WriteRefIdContents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IFhirWriter的用法示例。


在下文中一共展示了IFhirWriter.WriteRefIdContents方法的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();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:54,代码来源:ProductSerializer.cs

示例2: SerializeXdsEntryServiceComponent

        public static void SerializeXdsEntryServiceComponent(XdsEntry.XdsEntryServiceComponent value, IFhirWriter writer)
        {
            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 start
            if(value.Start != null)
            {
                writer.WriteStartElement("start");
                FhirDateTimeSerializer.SerializeFhirDateTime(value.Start, writer);
                writer.WriteEndElement();
            }

            // Serialize element stop
            if(value.Stop != null)
            {
                writer.WriteStartElement("stop");
                FhirDateTimeSerializer.SerializeFhirDateTime(value.Stop, writer);
                writer.WriteEndElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:39,代码来源:XdsEntrySerializer.cs

示例3: SerializeXdsEntryAuthorInstitutionComponent

        public static void SerializeXdsEntryAuthorInstitutionComponent(XdsEntry.XdsEntryAuthorInstitutionComponent value, IFhirWriter writer)
        {
            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 id
            if(value.Id != null)
            {
                writer.WriteStartElement("id");
                IdentifierSerializer.SerializeIdentifier(value.Id, writer);
                writer.WriteEndElement();
            }

            // Serialize element name
            if(value.Name != null)
            {
                writer.WriteStartElement("name");
                FhirStringSerializer.SerializeFhirString(value.Name, writer);
                writer.WriteEndElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:39,代码来源:XdsEntrySerializer.cs

示例4: 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();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:99,代码来源:XdsFolderSerializer.cs

示例5: SerializeIssueReportIssueComponent

        public static void SerializeIssueReportIssueComponent(IssueReport.IssueReportIssueComponent value, IFhirWriter writer)
        {
            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 severity
            if(value.Severity != null)
            {
                writer.WriteStartElement("severity");
                CodeSerializer.SerializeCode<IssueReport.IssueSeverity>(value.Severity, writer);
                writer.WriteEndElement();
            }

            // Serialize element type
            if(value.Type != null)
            {
                writer.WriteStartElement("type");
                CodeableConceptSerializer.SerializeCodeableConcept(value.Type, writer);
                writer.WriteEndElement();
            }

            // Serialize element details
            if(value.Details != null)
            {
                writer.WriteStartElement("details");
                FhirStringSerializer.SerializeFhirString(value.Details, writer);
                writer.WriteEndElement();
            }

            // Serialize element location
            if(value.Location != null && value.Location.Count > 0)
            {
                writer.WriteStartArrayElement("location");
                foreach(var item in value.Location)
                {
                    writer.WriteStartArrayMember("location");
                    FhirStringSerializer.SerializeFhirString(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:60,代码来源:IssueReportSerializer.cs

示例6: SerializePrescription

        public static void SerializePrescription(Prescription value, IFhirWriter writer)
        {
            writer.WriteStartRootObject("Prescription");
            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 identifier
            if(value.Identifier != null && value.Identifier.Count > 0)
            {
                writer.WriteStartArrayElement("identifier");
                foreach(var item in value.Identifier)
                {
                    writer.WriteStartArrayMember("identifier");
                    IdentifierSerializer.SerializeIdentifier(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            // Serialize element status
            if(value.Status != null)
            {
                writer.WriteStartElement("status");
                CodeSerializer.SerializeCode<Prescription.PrescriptionStatus>(value.Status, writer);
                writer.WriteEndElement();
            }

            // Serialize element patient
            if(value.Patient != null)
            {
                writer.WriteStartElement("patient");
                ResourceReferenceSerializer.SerializeResourceReference(value.Patient, writer);
                writer.WriteEndElement();
            }

            // Serialize element prescriber
            if(value.Prescriber != null)
            {
                writer.WriteStartElement("prescriber");
                ResourceReferenceSerializer.SerializeResourceReference(value.Prescriber, writer);
                writer.WriteEndElement();
            }

            // Serialize element prescribed
            if(value.Prescribed != null)
            {
                writer.WriteStartElement("prescribed");
                FhirDateTimeSerializer.SerializeFhirDateTime(value.Prescribed, writer);
                writer.WriteEndElement();
            }

            // Serialize element dispense
            if(value.Dispense != null)
            {
                writer.WriteStartElement("dispense");
//.........这里部分代码省略.........
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:101,代码来源:PrescriptionSerializer.cs

示例7: SerializePrescriptionMedicineInactiveIngredientComponent

        public static void SerializePrescriptionMedicineInactiveIngredientComponent(Prescription.PrescriptionMedicineInactiveIngredientComponent value, IFhirWriter writer)
        {
            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 identification
            if(value.Identification != null)
            {
                writer.WriteStartElement("identification");
                CodeableConceptSerializer.SerializeCodeableConcept(value.Identification, writer);
                writer.WriteEndElement();
            }

            // Serialize element quantity
            if(value.Quantity != null)
            {
                writer.WriteStartElement( SerializationUtil.BuildPolymorphicName("quantity", value.Quantity.GetType()) );
                FhirSerializer.SerializeElement(value.Quantity, writer);
                writer.WriteEndElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:39,代码来源:PrescriptionSerializer.cs

示例8: SerializeXdsEntry2

        public static void SerializeXdsEntry2(XdsEntry2 value, IFhirWriter writer)
        {
            writer.WriteStartRootObject("XdsEntry2");
            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 id
            if(value.Id != null)
            {
                writer.WriteStartElement("id");
                IdentifierSerializer.SerializeIdentifier(value.Id, writer);
                writer.WriteEndElement();
            }

            // Serialize element information
            if(value.Information != null)
            {
                writer.WriteStartElement("information");
                DocumentInformationSerializer.SerializeDocumentInformation(value.Information, writer);
                writer.WriteEndElement();
            }

            // Serialize element format
            if(value.Format != null)
            {
                writer.WriteStartElement("format");
                CodingSerializer.SerializeCoding(value.Format, writer);
                writer.WriteEndElement();
            }

            // Serialize element availability
            if(value.Availability != null)
            {
                writer.WriteStartElement("availability");
                CodeSerializer.SerializeCode(value.Availability, writer);
                writer.WriteEndElement();
            }

            // Serialize element folder
            if(value.Folder != null && value.Folder.Count > 0)
            {
                writer.WriteStartArrayElement("folder");
                foreach(var item in value.Folder)
                {
                    writer.WriteStartArrayMember("folder");
                    ResourceReferenceSerializer.SerializeResourceReference(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            // Serialize element subject
            if(value.Subject != null)
            {
                writer.WriteStartElement("subject");
//.........这里部分代码省略.........
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:101,代码来源:XdsEntry2Serializer.cs

示例9: SerializePrescriptionDispenseComponent

        public static void SerializePrescriptionDispenseComponent(Prescription.PrescriptionDispenseComponent value, IFhirWriter writer)
        {
            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 repeats
            if(value.Repeats != null)
            {
                writer.WriteStartElement("repeats");
                IntegerSerializer.SerializeInteger(value.Repeats, writer);
                writer.WriteEndElement();
            }

            // Serialize element quantity
            if(value.Quantity != null)
            {
                writer.WriteStartElement("quantity");
                QuantitySerializer.SerializeQuantity(value.Quantity, writer);
                writer.WriteEndElement();
            }

            // Serialize element dispenser
            if(value.Dispenser != null)
            {
                writer.WriteStartElement("dispenser");
                ResourceReferenceSerializer.SerializeResourceReference(value.Dispenser, writer);
                writer.WriteEndElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:47,代码来源:PrescriptionSerializer.cs

示例10: SerializePrescriptionAdministrationRequestDosageInstructionComponent

        public static void SerializePrescriptionAdministrationRequestDosageInstructionComponent(Prescription.PrescriptionAdministrationRequestDosageInstructionComponent value, IFhirWriter writer)
        {
            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 precondition
            if(value.Precondition != null && value.Precondition.Count > 0)
            {
                writer.WriteStartArrayElement("precondition");
                foreach(var item in value.Precondition)
                {
                    writer.WriteStartArrayMember("precondition");
                    CodeableConceptSerializer.SerializeCodeableConcept(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            // Serialize element prn
            if(value.Prn != null)
            {
                writer.WriteStartElement("prn");
                FhirBooleanSerializer.SerializeFhirBoolean(value.Prn, writer);
                writer.WriteEndElement();
            }

            // Serialize element additionalInstruction
            if(value.AdditionalInstruction != null && value.AdditionalInstruction.Count > 0)
            {
                writer.WriteStartArrayElement("additionalInstruction");
                foreach(var item in value.AdditionalInstruction)
                {
                    writer.WriteStartArrayMember("additionalInstruction");
                    CodeableConceptSerializer.SerializeCodeableConcept(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            // Serialize element route
            if(value.Route != null)
            {
                writer.WriteStartElement("route");
                CodeableConceptSerializer.SerializeCodeableConcept(value.Route, writer);
                writer.WriteEndElement();
            }

            // Serialize element dose
            if(value.Dose != null)
            {
                writer.WriteStartElement( SerializationUtil.BuildPolymorphicName("dose", value.Dose.GetType()) );
                FhirSerializer.SerializeElement(value.Dose, writer);
                writer.WriteEndElement();
            }

            // Serialize element rate
            if(value.Rate != null)
            {
                writer.WriteStartElement("rate");
                QuantitySerializer.SerializeQuantity(value.Rate, writer);
                writer.WriteEndElement();
            }

            // Serialize element schedule
            if(value.Schedule != null && value.Schedule.Count > 0)
            {
                writer.WriteStartArrayElement("schedule");
                foreach(var item in value.Schedule)
                {
                    writer.WriteStartArrayMember("schedule");
                    ScheduleSerializer.SerializeSchedule(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:94,代码来源:PrescriptionSerializer.cs

示例11: SerializePrescriptionAdministrationRequestComponent

        public static void SerializePrescriptionAdministrationRequestComponent(Prescription.PrescriptionAdministrationRequestComponent value, IFhirWriter writer)
        {
            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 description
            if(value.Description != null)
            {
                writer.WriteStartElement("description");
                FhirStringSerializer.SerializeFhirString(value.Description, writer);
                writer.WriteEndElement();
            }

            // Serialize element totalPeriodicDose
            if(value.TotalPeriodicDose != null)
            {
                writer.WriteStartElement("totalPeriodicDose");
                RatioSerializer.SerializeRatio(value.TotalPeriodicDose, writer);
                writer.WriteEndElement();
            }

            // Serialize element start
            if(value.Start != null)
            {
                writer.WriteStartElement("start");
                FhirDateTimeSerializer.SerializeFhirDateTime(value.Start, writer);
                writer.WriteEndElement();
            }

            // Serialize element end
            if(value.End != null)
            {
                writer.WriteStartElement("end");
                FhirDateTimeSerializer.SerializeFhirDateTime(value.End, writer);
                writer.WriteEndElement();
            }

            // Serialize element duration
            if(value.Duration != null)
            {
                writer.WriteStartElement("duration");
                QuantitySerializer.SerializeQuantity(value.Duration, writer);
                writer.WriteEndElement();
            }

            // Serialize element numberOfAdministrations
            if(value.NumberOfAdministrations != null)
            {
                writer.WriteStartElement("numberOfAdministrations");
                IntegerSerializer.SerializeInteger(value.NumberOfAdministrations, writer);
                writer.WriteEndElement();
            }

            // Serialize element dosageInstruction
            if(value.DosageInstruction != null && value.DosageInstruction.Count > 0)
            {
                writer.WriteStartArrayElement("dosageInstruction");
                foreach(var item in value.DosageInstruction)
                {
                    writer.WriteStartArrayMember("dosageInstruction");
                    PrescriptionSerializer.SerializePrescriptionAdministrationRequestDosageInstructionComponent(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:84,代码来源:PrescriptionSerializer.cs

示例12: SerializeDocumentInformation

        public static void SerializeDocumentInformation(DocumentInformation value, IFhirWriter writer)
        {
            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 id
            if(value.Id != null)
            {
                writer.WriteStartElement("id");
                IdentifierSerializer.SerializeIdentifier(value.Id, writer);
                writer.WriteEndElement();
            }

            // Serialize element versionId
            if(value.VersionId != null)
            {
                writer.WriteStartElement("versionId");
                IdentifierSerializer.SerializeIdentifier(value.VersionId, writer);
                writer.WriteEndElement();
            }

            // Serialize element created
            if(value.Created != null)
            {
                writer.WriteStartElement("created");
                InstantSerializer.SerializeInstant(value.Created, writer);
                writer.WriteEndElement();
            }

            // Serialize element class
            if(value.Class != null)
            {
                writer.WriteStartElement("class");
                CodingSerializer.SerializeCoding(value.Class, writer);
                writer.WriteEndElement();
            }

            // Serialize element type
            if(value.Type != null)
            {
                writer.WriteStartElement("type");
                CodeableConceptSerializer.SerializeCodeableConcept(value.Type, writer);
                writer.WriteEndElement();
            }

            // Serialize element title
            if(value.Title != null)
            {
                writer.WriteStartElement("title");
                FhirStringSerializer.SerializeFhirString(value.Title, writer);
                writer.WriteEndElement();
            }

            // Serialize element confidentiality
            if(value.Confidentiality != null)
            {
                writer.WriteStartElement("confidentiality");
                CodingSerializer.SerializeCoding(value.Confidentiality, writer);
                writer.WriteEndElement();
            }

            // Serialize element subject
            if(value.Subject != null)
            {
                writer.WriteStartElement("subject");
                ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer);
                writer.WriteEndElement();
            }

            // Serialize element author
            if(value.Author != null && value.Author.Count > 0)
            {
                writer.WriteStartArrayElement("author");
                foreach(var item in value.Author)
                {
                    writer.WriteStartArrayMember("author");
                    ResourceReferenceSerializer.SerializeResourceReference(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            // Serialize element attester
            if(value.Attester != null && value.Attester.Count > 0)
//.........这里部分代码省略.........
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:101,代码来源:DocumentInformationSerializer.cs

示例13: SerializeDocumentInformationEventComponent

        public static void SerializeDocumentInformationEventComponent(DocumentInformation.DocumentInformationEventComponent value, IFhirWriter writer)
        {
            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 code
            if(value.Code != null && value.Code.Count > 0)
            {
                writer.WriteStartArrayElement("code");
                foreach(var item in value.Code)
                {
                    writer.WriteStartArrayMember("code");
                    CodeableConceptSerializer.SerializeCodeableConcept(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            // Serialize element period
            if(value.Period != null)
            {
                writer.WriteStartElement("period");
                PeriodSerializer.SerializePeriod(value.Period, writer);
                writer.WriteEndElement();
            }

            // Serialize element detail
            if(value.Detail != null && value.Detail.Count > 0)
            {
                writer.WriteStartArrayElement("detail");
                foreach(var item in value.Detail)
                {
                    writer.WriteStartArrayMember("detail");
                    ResourceReferenceSerializer.SerializeResourceReference(item, writer);
                    writer.WriteEndArrayMember();
                }
                writer.WriteEndArrayElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:57,代码来源:DocumentInformationSerializer.cs

示例14: SerializeDocumentInformationAttesterComponent

        public static void SerializeDocumentInformationAttesterComponent(DocumentInformation.DocumentInformationAttesterComponent value, IFhirWriter writer)
        {
            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 mode
            if(value.Mode != null)
            {
                writer.WriteStartElement("mode");
                CodeSerializer.SerializeCode<DocumentInformation.DocumentAttestationMode>(value.Mode, writer);
                writer.WriteEndElement();
            }

            // Serialize element time
            if(value.Time != null)
            {
                writer.WriteStartElement("time");
                FhirDateTimeSerializer.SerializeFhirDateTime(value.Time, writer);
                writer.WriteEndElement();
            }

            // Serialize element party
            if(value.Party != null)
            {
                writer.WriteStartElement("party");
                ResourceReferenceSerializer.SerializeResourceReference(value.Party, writer);
                writer.WriteEndElement();
            }

            writer.WriteEndComplexContent();
        }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:47,代码来源:DocumentInformationSerializer.cs

示例15: SerializeXdsEntry

        public static void SerializeXdsEntry(XdsEntry value, IFhirWriter writer)
        {
            writer.WriteStartRootObject("XdsEntry");
            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 url
            if(value.Url != null)
            {
                writer.WriteStartElement("url");
                FhirUriSerializer.SerializeFhirUri(value.Url, writer);
                writer.WriteEndElement();
            }

            // Serialize element repositoryId
            if(value.RepositoryId != null)
            {
                writer.WriteStartElement("repositoryId");
                FhirUriSerializer.SerializeFhirUri(value.RepositoryId, writer);
                writer.WriteEndElement();
            }

            // Serialize element mimeType
            if(value.MimeType != null)
            {
                writer.WriteStartElement("mimeType");
                FhirStringSerializer.SerializeFhirString(value.MimeType, writer);
                writer.WriteEndElement();
            }

            // Serialize element format
            if(value.Format != null)
            {
                writer.WriteStartElement("format");
                CodingSerializer.SerializeCoding(value.Format, writer);
                writer.WriteEndElement();
            }

            // Serialize element class
            if(value.Class != null)
            {
                writer.WriteStartElement("class");
                CodingSerializer.SerializeCoding(value.Class, writer);
                writer.WriteEndElement();
            }

            // Serialize element type
            if(value.Type != null)
            {
                writer.WriteStartElement("type");
                CodingSerializer.SerializeCoding(value.Type, writer);
                writer.WriteEndElement();
            }

            // Serialize element title
//.........这里部分代码省略.........
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:101,代码来源:XdsEntrySerializer.cs


注:本文中的IFhirWriter.WriteRefIdContents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。