protected override void WriteXmlBase(XmlWriter writer) { base.WriteXmlBase(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(openEhrPrefix, "subject", RmXmlSerializer.OpenEhrNamespace); this.Subject.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString(openEhrPrefix, "is_queryable", RmXmlSerializer.OpenEhrNamespace, this.IsQueryable.ToString().ToLower()); writer.WriteElementString(openEhrPrefix, "is_modifiable", RmXmlSerializer.OpenEhrNamespace, this.IsModifiable.ToString().ToLower()); if (this.OtherDetails != null) { writer.WriteStartElement(openEhrPrefix, "other_details", RmXmlSerializer.OpenEhrNamespace); string otherDetailsType = ((IRmType)this.OtherDetails).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { otherDetailsType = openEhrPrefix + ":" + otherDetailsType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, otherDetailsType); this.OtherDetails.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { DvInterval <T> normalRange = NormalRange; if (this.NormalRange != null) { string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(prefix, "normal_range", RmXmlSerializer.OpenEhrNamespace); NormalRange.WriteXml(writer); writer.WriteEndElement(); } if (this.OtherReferenceRanges != null) { foreach (ReferenceRange <T> refRange in this.OtherReferenceRanges) { writer.WriteStartElement("other_reference_ranges", RmXmlSerializer.OpenEhrNamespace); refRange.WriteXml(writer); writer.WriteEndElement(); } } // CM: 06/03/08 if (this.NormalStatus != null) { writer.WriteStartElement("normal_status", RmXmlSerializer.OpenEhrNamespace); this.NormalStatus.WriteXml(writer); writer.WriteEndElement(); } }
internal void WriteXml(System.Xml.XmlWriter writer) { this.CheckInvariants(); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(openEhrPrefix, "current_state", RmXmlSerializer.OpenEhrNamespace); this.CurrentState.WriteXml(writer); writer.WriteEndElement(); if (this.Transition != null) { writer.WriteStartElement(openEhrPrefix, "transition", RmXmlSerializer.OpenEhrNamespace); this.Transition.WriteXml(writer); writer.WriteEndElement(); } if (this.CareflowStep != null) { writer.WriteStartElement(openEhrPrefix, "careflow_step", RmXmlSerializer.OpenEhrNamespace); this.CareflowStep.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteElementString(openEhrPrefix, "value", RmXmlSerializer.OpenEhrNamespace, this.Value.ToString().ToLower()); }
protected virtual void WriteXmlBase(System.Xml.XmlWriter writer) { string openEhrNamespace = RmXmlSerializer.OpenEhrNamespace; string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteElementString(prefix, "value", openEhrNamespace, this.Value); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (this.Folders != null && this.Folders.Count > 0) { foreach (Folder folder in this.Folders) { writer.WriteStartElement(openEhrPrefix, "folders", RmXmlSerializer.OpenEhrNamespace); folder.WriteXml(writer); writer.WriteEndElement(); } } if (this.Items != null && this.Items.Count > 0) { foreach (ObjectRef item in this.Items) { writer.WriteStartElement(openEhrPrefix, "items", RmXmlSerializer.OpenEhrNamespace); item.WriteXml(writer); writer.WriteEndElement(); } } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXml(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); if (this.AttestedView != null) { writer.WriteStartElement(openEhrPrefix, "attested_view", RmXmlSerializer.OpenEhrNamespace); this.AttestedView.WriteXml(writer); writer.WriteEndElement(); } if (this.Proof != null) { writer.WriteElementString(openEhrPrefix, "proof", RmXmlSerializer.OpenEhrNamespace, this.Proof); } if (this.Items != null) { foreach (DataTypes.Uri.DvEhrUri uri in this.Items) { writer.WriteStartElement(openEhrPrefix, "items", RmXmlSerializer.OpenEhrNamespace); uri.WriteXml(writer); writer.WriteEndElement(); } } writer.WriteStartElement(openEhrPrefix, "reason", RmXmlSerializer.OpenEhrNamespace); this.Reason.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString(openEhrPrefix, "is_pending", RmXmlSerializer.OpenEhrNamespace, this.IsPending.ToString().ToLower()); }
internal void WriteXml(System.Xml.XmlWriter writer) { this.CheckInvariants(); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(openEhrPrefix, "instruction_id", RmXmlSerializer.OpenEhrNamespace); this.InstructionId.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString(openEhrPrefix, "activity_id", RmXmlSerializer.OpenEhrNamespace, this.ActivityId); if (this.WfDetails != null) { writer.WriteStartElement(openEhrPrefix, "wf_details", RmXmlSerializer.OpenEhrNamespace); string wfDetailstype = ((IRmType)this.WfDetails).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { wfDetailstype = openEhrPrefix + ":" + wfDetailstype; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, wfDetailstype); this.WfDetails.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); writer.WriteStartElement(openEhrPrefix, "description", RmXmlSerializer.OpenEhrNamespace); string descriptionType = ((IRmType)this.Description).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { descriptionType = openEhrPrefix + ":" + descriptionType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, descriptionType); this.Description.WriteXml(writer); writer.WriteEndElement(); writer.WriteStartElement(openEhrPrefix, "timing", RmXmlSerializer.OpenEhrNamespace); this.Timing.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString(openEhrPrefix, "action_archetype_id", RmXmlSerializer.OpenEhrNamespace, this.ActionArchetypeId); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); writer.WriteStartElement(openEhrPrefix, "time", RmXmlSerializer.OpenEhrNamespace); this.Time.WriteXml(writer); writer.WriteEndElement(); writer.WriteStartElement(openEhrPrefix, "data", RmXmlSerializer.OpenEhrNamespace); string dataType = ((IRmType)this.Data).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { dataType = openEhrPrefix + ":" + dataType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, dataType); ((ItemStructure.ItemStructure)(this.data)).WriteXml(writer); writer.WriteEndElement(); if (this.State != null) { writer.WriteStartElement(openEhrPrefix, "state", RmXmlSerializer.OpenEhrNamespace); string stateType = ((IRmType)this.State).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { stateType = openEhrPrefix + ":" + stateType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, stateType); this.State.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (this.Value != null) { writer.WriteStartElement(openEhrPrefix, "value", RmXmlSerializer.OpenEhrNamespace); string valueType = ((IRmType)this.Value).GetXmlRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { valueType = openEhrPrefix + ":" + valueType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, valueType); this.Value.WriteXml(writer); writer.WriteEndElement(); } if (this.NullFlavour != null) { writer.WriteStartElement(openEhrPrefix, "null_flavour", RmXmlSerializer.OpenEhrNamespace); this.NullFlavour.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); base.WriteXmlBase(writer); writer.WriteStartElement(openEhrPrefix, "origin", RmXmlSerializer.OpenEhrNamespace); this.Origin.WriteXml(writer); writer.WriteEndElement(); if (this.Period != null) { writer.WriteStartElement(openEhrPrefix, "period", RmXmlSerializer.OpenEhrNamespace); this.Period.WriteXml(writer); writer.WriteEndElement(); } if (this.Duration != null) { writer.WriteStartElement(openEhrPrefix, "duration", RmXmlSerializer.OpenEhrNamespace); this.Duration.WriteXml(writer); writer.WriteEndElement(); } if (this.Events != null && this.Events.Count > 0) { foreach (Event <T> anEvent in this.Events) { writer.WriteStartElement(openEhrPrefix, "events", RmXmlSerializer.OpenEhrNamespace); string eventType = ((IRmType)anEvent).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { eventType = openEhrPrefix + ":" + eventType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, eventType); anEvent.WriteXml(writer); writer.WriteEndElement(); } } if (this.Summary != null) { writer.WriteStartElement(openEhrPrefix, "summary", RmXmlSerializer.OpenEhrNamespace); string summaryType = ((IRmType)this.Summary).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { summaryType = openEhrPrefix + ":" + summaryType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, summaryType); this.Summary.WriteXml(writer); writer.WriteEndElement(); } }
internal void WriteXml(System.Xml.XmlWriter writer) { Check.Require(this.OriginalAuthor != null, "OriginalAuthor must not be null."); Check.Require(!string.IsNullOrEmpty(this.LifecycleState), "ResourceDescription.LifecycleState must not be null or empty."); Check.Require(this.Details != null && !this.Details.IsEmpty(), "ResourceDescription.Details must not be null or empty."); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); foreach (string key in this.OriginalAuthor.Keys) { writer.WriteStartElement(openEhrPrefix, "original_author", RmXmlSerializer.OpenEhrNamespace); writer.WriteAttributeString("id", key); writer.WriteString(this.OriginalAuthor.Item(key)); writer.WriteEndElement(); } if (this.OtherContributors != null) { foreach (string contributor in this.OtherContributors) { writer.WriteElementString("other_contributors", RmXmlSerializer.OpenEhrNamespace, contributor); } } writer.WriteElementString("lifecycle_state", RmXmlSerializer.OpenEhrNamespace, this.LifecycleState); if (!string.IsNullOrEmpty(this.ResourcePackageUri)) { writer.WriteElementString("resource_package_uri", RmXmlSerializer.OpenEhrNamespace, this.ResourcePackageUri); } if (this.OtherDetails != null) { foreach (string id in this.OtherDetails.Keys) { writer.WriteStartElement(openEhrPrefix, "other_details", RmXmlSerializer.OpenEhrNamespace); writer.WriteAttributeString("id", id); writer.WriteString(this.OtherDetails.Item(id).ToString()); writer.WriteEndElement(); } } foreach (string id in this.Details.Keys) { writer.WriteStartElement(openEhrPrefix, "details", RmXmlSerializer.OpenEhrNamespace); this.Details.Item(id).WriteXml(writer); writer.WriteEndElement(); } if (this.ParentResource != null) { writer.WriteStartElement("parent_resource", RmXmlSerializer.OpenEhrNamespace); string parentResourcetype = ((IRmType)this.ParentResource).GetRmTypeName(); writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, parentResourcetype); this.ParentResource.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { DesignByContract.Check.Require(!string.IsNullOrEmpty(this.Value), "value must not be null or empty."); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteElementString(prefix, "value", RmXmlSerializer.OpenEhrNamespace, this.Value); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { this.CheckInvariants(); base.WriteXmlBase(writer); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteElementString(prefix, "magnitude", RmXmlSerializer.OpenEhrNamespace, this.Magnitude.ToString()); }
void WriteCArchetypeRoot(XmlWriter writer, CArchetypeRoot cArchetypeRoot) { Check.Require(cArchetypeRoot != null, string.Format(CommonStrings.XMustNotBeNull, "cArchetypeRoot")); Check.Require(cArchetypeRoot.ArchetypeId != null, string.Format(CommonStrings.XMustNotBeNull, "cArchetypeRoot.ArchetypeId")); string openEhrPrefix = UseOpenEhrPrefix(writer); WriteCComplexObject(writer, cArchetypeRoot); writer.WriteStartElement(RmXmlSerializer.UseOpenEhrPrefix(writer), "archetype_id", OpenEhrNamespace); cArchetypeRoot.ArchetypeId.WriteXml(writer); writer.WriteEndElement(); if (cArchetypeRoot.TemplateId != null) { writer.WriteStartElement(RmXmlSerializer.UseOpenEhrPrefix(writer), "template_id", OpenEhrNamespace); cArchetypeRoot.TemplateId.WriteXml(writer); writer.WriteEndElement(); } if (cArchetypeRoot.TermDefinitions != null && cArchetypeRoot.TermDefinitions.Count > 0) { foreach (System.Collections.Generic.KeyValuePair <string, ArchetypeTerm> item in cArchetypeRoot.TermDefinitions) { writer.WriteStartElement(openEhrPrefix, "term_definitions", OpenEhrNamespace); amSerializer.WriteArchetypeTerm(writer, item.Value); writer.WriteEndElement(); } } if (cArchetypeRoot.TermBindings != null && cArchetypeRoot.TermBindings.Count > 0) { foreach (string terminology in cArchetypeRoot.TermBindings.Keys) { writer.WriteStartElement(openEhrPrefix, "term_bindings", OpenEhrNamespace); writer.WriteAttributeString("terminology", terminology); AssumedTypes.Hash <CodePhrase, string> eachTermBindingItem = cArchetypeRoot.TermBindings.Item(terminology); foreach (string code in eachTermBindingItem.Keys) { writer.WriteStartElement(openEhrPrefix, "items", OpenEhrNamespace); writer.WriteAttributeString("code", code); writer.WriteStartElement(openEhrPrefix, "value", OpenEhrNamespace); eachTermBindingItem.Item(code).WriteXml(writer); writer.WriteEndElement(); writer.WriteEndElement(); } writer.WriteEndElement(); } } }
internal void WriteXml(System.Xml.XmlWriter writer) { Check.Require(this.StartTime != null, "startTime must not be null."); Check.Require(this.Setting != null, "setting must not be null."); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(openEhrPrefix, "start_time", RmXmlSerializer.OpenEhrNamespace); this.StartTime.WriteXml(writer); writer.WriteEndElement(); if (this.EndTime != null) { writer.WriteStartElement(openEhrPrefix, "end_time", RmXmlSerializer.OpenEhrNamespace); this.EndTime.WriteXml(writer); writer.WriteEndElement(); } if (this.Location != null) { writer.WriteElementString(openEhrPrefix, "location", RmXmlSerializer.OpenEhrNamespace, this.Location); } writer.WriteStartElement(openEhrPrefix, "setting", RmXmlSerializer.OpenEhrNamespace); this.Setting.WriteXml(writer); writer.WriteEndElement(); if (this.OtherContext != null) { writer.WriteStartElement(openEhrPrefix, "other_context", RmXmlSerializer.OpenEhrNamespace); string otherContextType = ((IRmType)this.OtherContext).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { otherContextType = openEhrPrefix + ":" + otherContextType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, otherContextType); this.OtherContext.WriteXml(writer); writer.WriteEndElement(); } if (this.HealthCareFacility != null) { writer.WriteStartElement(openEhrPrefix, "health_care_facility", RmXmlSerializer.OpenEhrNamespace); this.HealthCareFacility.WriteXml(writer); writer.WriteEndElement(); } if (this.Participations != null) { foreach (OpenEhr.RM.Common.Generic.Participation p in this.Participations) { writer.WriteStartElement(openEhrPrefix, "participations", RmXmlSerializer.OpenEhrNamespace); p.WriteXml(writer); writer.WriteEndElement(); } } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string openEhrNamespace = RmXmlSerializer.OpenEhrNamespace; string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteElementString(prefix, "scheme", openEhrNamespace, this.Scheme); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { this.CheckInvariants(); string openEhrNamespace = RmXmlSerializer.OpenEhrNamespace; string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string xsiType = RmXmlSerializer.UseXsiPrefix(writer); if (this.Lower != null) { writer.WriteStartElement("lower", openEhrNamespace); string type = ((IRmType)this.Lower).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { type = openEhrPrefix + ":" + type; } writer.WriteAttributeString(xsiType, "type", RmXmlSerializer.XsiNamespace, type); this.Lower.WriteXml(writer); writer.WriteEndElement(); } if (this.Upper != null) { writer.WriteStartElement("upper", openEhrNamespace); string type = ((IRmType)this.Upper).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { type = openEhrPrefix + ":" + type; } writer.WriteAttributeString(xsiType, "type", RmXmlSerializer.XsiNamespace, type); this.Upper.WriteXml(writer); writer.WriteEndElement(); } if (this.Lower != null && this.lowerIncludedSet) { writer.WriteElementString(openEhrPrefix, "lower_included", openEhrNamespace, this.LowerIncluded.ToString().ToLower()); } if (this.Upper != null && this.upperIncludedSet) { writer.WriteElementString(openEhrPrefix, "upper_included", openEhrNamespace, this.UpperIncluded.ToString().ToLower()); } writer.WriteElementString(openEhrPrefix, "lower_unbounded", openEhrNamespace, this.LowerUnbounded.ToString().ToLower()); writer.WriteElementString(openEhrPrefix, "upper_unbounded", openEhrNamespace, this.UpperUnbounded.ToString().ToLower()); }
internal virtual void WriteXml(System.Xml.XmlWriter writer) { string openEhrNamespace = RmXmlSerializer.OpenEhrNamespace; string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement("terminology_id", openEhrNamespace); this.TerminologyId.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString(prefix, "code_string", openEhrNamespace, this.CodeString); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); writer.WriteStartElement(prefix, "relationship", RmXmlSerializer.OpenEhrNamespace); this.Relationship.WriteXml(writer); writer.WriteEndElement(); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { Check.Require(this.Value != null, "value must not be null."); Check.Require(this.Formalism != null, "formalism must not be null."); base.WriteXmlBase(writer); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteElementString(prefix, "value", RmXmlSerializer.OpenEhrNamespace, this.Value); writer.WriteElementString(prefix, "formalism", RmXmlSerializer.OpenEhrNamespace, this.Formalism); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(openEhrPrefix, "language", RmXmlSerializer.OpenEhrNamespace); this.Language.WriteXml(writer); writer.WriteEndElement(); writer.WriteStartElement(openEhrPrefix, "territory", RmXmlSerializer.OpenEhrNamespace); this.Territory.WriteXml(writer); writer.WriteEndElement(); writer.WriteStartElement(openEhrPrefix, "category", RmXmlSerializer.OpenEhrNamespace); this.Category.WriteXml(writer); writer.WriteEndElement(); writer.WriteStartElement(openEhrPrefix, "composer", RmXmlSerializer.OpenEhrNamespace); string composerType = ((IRmType)this.Composer).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { composerType = openEhrPrefix + ":" + composerType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, composerType); this.Composer.WriteXml(writer); writer.WriteEndElement(); if (this.Context != null) { writer.WriteStartElement(openEhrPrefix, "context", RmXmlSerializer.OpenEhrNamespace); this.Context.WriteXml(writer); writer.WriteEndElement(); } if (this.Content != null && this.Content.Count > 0) { foreach (ContentItem contentItem in this.Content) { writer.WriteStartElement(openEhrPrefix, "content", RmXmlSerializer.OpenEhrNamespace); string contentType = ((IRmType)contentItem).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { contentType = openEhrPrefix + ":" + contentType; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, contentType); contentItem.WriteXml(writer); writer.WriteEndElement(); } } }
void WriteXmlBase(XmlWriter writer, ExtractEntityContent content, string typeName) { string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string oePrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (!string.IsNullOrEmpty(oePrefix)) { typeName = oePrefix + ":" + typeName; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, typeName); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (!this.AccuracyUnknown()) { writer.WriteElementString(prefix, "accuracy", RmXmlSerializer.OpenEhrNamespace, this.Accuracy.ToString()); writer.WriteElementString(prefix, "accuracy_is_percent", RmXmlSerializer.OpenEhrNamespace, this.AccuracyIsPercent.ToString().ToLower()); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { DesignByContract.Check.Require(this.Value != null, "Value must not be null."); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); writer.WriteStartElement(openEhrPrefix, "value", RmXmlSerializer.OpenEhrNamespace); this.Value.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString("is_terminal", RmXmlSerializer.OpenEhrNamespace, this.IsTerminal.ToString().ToLower()); }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (this.Accuracy != null) { writer.WriteStartElement(prefix, "accuracy", RmXmlSerializer.OpenEhrNamespace); this.Accuracy.WriteXml(writer); writer.WriteEndElement(); } }
protected override void WriteXmlBase(System.Xml.XmlWriter writer) { base.WriteXmlBase(writer); string prefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (this.MagnitudeStatus != null) { writer.WriteElementString(prefix, "magnitude_status", RmXmlSerializer.OpenEhrNamespace, this.MagnitudeStatus); } }
public void WriteXml(XmlWriter writer, Extract extract) { RmXmlSerializer.UseOpenEhrPrefix(writer); RmXmlSerializer.UseXsiPrefix(writer); // <xs:extension base="LOCATABLE"> this.WriteXmlBase(writer, extract as ExtractLocatable); // <xs:element name="request_id" type="OBJECT_REF" minOccurs="0"/> if (extract.RequestId != null) { writer.WriteStartElement("request_id", RmXmlSerializer.OpenEhrNamespace); ((System.Xml.Serialization.IXmlSerializable)extract.RequestId).WriteXml(writer); writer.WriteEndElement(); } // <xs:element name="time_created" type="DV_DATE_TIME"/> writer.WriteStartElement("time_created", RmXmlSerializer.OpenEhrNamespace); ((System.Xml.Serialization.IXmlSerializable)extract.TimeCreated).WriteXml(writer); writer.WriteEndElement(); // <xs:element name="system_id" type="HIER_OBJECT_ID"/> writer.WriteStartElement("system_id", RmXmlSerializer.OpenEhrNamespace); ((System.Xml.Serialization.IXmlSerializable)extract.SystemId).WriteXml(writer); writer.WriteEndElement(); // <xs:element name="participations" type="PARTICIPATION" minOccurs="0" maxOccurs="unbounded"/> if (extract.Participations != null) { foreach (Participation participation in extract.Participations) { writer.WriteStartElement("participations", RmXmlSerializer.OpenEhrNamespace); ((System.Xml.Serialization.IXmlSerializable)participation).WriteXml(writer); writer.WriteEndElement(); } } // <xs:element name="sequence_nr" type="xs:long"/> writer.WriteStartElement("sequence_nr", RmXmlSerializer.OpenEhrNamespace); writer.WriteValue(extract.SequenceNr); writer.WriteEndElement(); // <xs:element name="chapters" type="EXTRACT_CHAPTER" minOccurs="0" maxOccurs="unbounded"/> foreach (ExtractChapter chapter in extract.Chapters) { writer.WriteStartElement("chapters", RmXmlSerializer.OpenEhrNamespace); this.WriteXml(writer, chapter); writer.WriteEndElement(); } // TODO: <xs:element name="specification" type="EXTRACT_SPEC" minOccurs="0"/> }
internal void WriteXml(System.Xml.XmlWriter writer) { string xsiPrefix = RmXmlSerializer.UseXsiPrefix(writer); string openEhrPrefix = RmXmlSerializer.UseOpenEhrPrefix(writer); if (this.OriginatingSystemItemIds != null && OriginatingSystemItemIds.Count > 0) { foreach (DvIdentifier id in this.OriginatingSystemItemIds) { writer.WriteStartElement(openEhrPrefix, "originating_system_item_ids", RmXmlSerializer.OpenEhrNamespace); id.WriteXml(writer); writer.WriteEndElement(); } } if (this.FeederSystemItemIds != null && OriginatingSystemItemIds.Count > 0) { foreach (DvIdentifier id in this.FeederSystemItemIds) { writer.WriteStartElement(openEhrPrefix, "feeder_system_item_ids", RmXmlSerializer.OpenEhrNamespace); id.WriteXml(writer); writer.WriteEndElement(); } } if (this.OriginalContent != null) { writer.WriteStartElement(openEhrPrefix, "original_content", RmXmlSerializer.OpenEhrNamespace); string type = ((IRmType)(this.originalContent)).GetRmTypeName(); if (!string.IsNullOrEmpty(openEhrPrefix)) { type = openEhrPrefix + ":" + type; } writer.WriteAttributeString(xsiPrefix, "type", RmXmlSerializer.XsiNamespace, type); this.OriginalContent.WriteXml(writer); writer.WriteEndElement(); } Check.Assert(this.OriginatingSystemAudit != null, "originatingSystemAudit must not be null."); writer.WriteStartElement(openEhrPrefix, "originating_system_audit", RmXmlSerializer.OpenEhrNamespace); this.OriginatingSystemAudit.WriteXml(writer); writer.WriteEndElement(); if (this.FeederSystemAudit != null) { writer.WriteStartElement(openEhrPrefix, "feeder_system_audit", RmXmlSerializer.OpenEhrNamespace); this.FeederSystemAudit.WriteXml(writer); writer.WriteEndElement(); } }