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(); } }
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) { 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.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, "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(); } }
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 ReadXmlBase(System.Xml.XmlReader reader) { base.ReadXmlBase(reader); Check.Assert(reader.LocalName == "language", "Expected LocalName is 'language' rather than " + reader.LocalName); this.language = new OpenEhr.RM.DataTypes.Text.CodePhrase(); this.language.ReadXml(reader); Check.Assert(reader.LocalName == "encoding", "Expected LocalName is 'encoding' rather than " + reader.LocalName); this.encoding = new OpenEhr.RM.DataTypes.Text.CodePhrase(); this.encoding.ReadXml(reader); Check.Assert(reader.LocalName == "subject", "Expected LocalName is 'subject' rather than " + reader.LocalName); string subjectType = RmXmlSerializer.ReadXsiType(reader); this.subject = RmFactory.PartyProxy(subjectType); this.subject.ReadXml(reader); if (reader.LocalName == "provider") { string providerType = RmXmlSerializer.ReadXsiType(reader); this.provider = RmFactory.PartyProxy(providerType); this.provider.ReadXml(reader); } if (reader.LocalName == "other_participations") { this.otherParticipations = new OpenEhr.AssumedTypes.List <Participation>(); do { Participation p = new Participation(); p.ReadXml(reader); this.otherParticipations.Add(p); } while (reader.LocalName == "other_participations"); } if (reader.LocalName == "work_flow_id") { string workFlowIdType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); // CM: 06/09/10 when workFlowIdType is null or empty, it's type of OBJECT_REF if (string.IsNullOrEmpty(workFlowIdType)) { this.workflowId = new ObjectRef(); } else { this.workflowId = ObjectRef.GetObjectRefByType(workFlowIdType); } this.workflowId.ReadXml(reader); } }
static void LoadOperationalTemplateSchemas(System.Xml.Schema.XmlSchemaSet xs) { if (!xs.Contains(RmXmlSerializer.OpenEhrNamespace)) { System.Xml.Schema.XmlSchema baseTypesSchema = RmXmlSerializer.GetOpenEhrSchema("BaseTypes"); System.Xml.Schema.XmlSchema resourceSchema = RmXmlSerializer.GetOpenEhrSchema("Resource"); resourceSchema.Includes.Clear(); System.Xml.Schema.XmlSchemaInclude include = new System.Xml.Schema.XmlSchemaInclude(); include.Schema = baseTypesSchema; resourceSchema.Includes.Add(include); System.Xml.Schema.XmlSchema archetypeSchema = RmXmlSerializer.GetOpenEhrSchema("Archetype"); archetypeSchema.Includes.Clear(); include = new System.Xml.Schema.XmlSchemaInclude(); include.Schema = resourceSchema; archetypeSchema.Includes.Add(include); System.Xml.Schema.XmlSchema openEhrProfileSchema = RmXmlSerializer.GetOpenEhrSchema("OpenehrProfile"); openEhrProfileSchema.Includes.Clear(); include = new System.Xml.Schema.XmlSchemaInclude(); include.Schema = archetypeSchema; openEhrProfileSchema.Includes.Add(include); System.Xml.Schema.XmlSchema templateSchema = RmXmlSerializer.GetOpenEhrSchema("Template"); templateSchema.Includes.Clear(); include = new System.Xml.Schema.XmlSchemaInclude(); include.Schema = openEhrProfileSchema; templateSchema.Includes.Add(include); xs.Add(templateSchema); xs.Compile(); } }
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 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 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(); } }
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) { 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(); } }
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()); }
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); }
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(); } } }
protected override void ReadXmlBase(System.Xml.XmlReader reader) { base.ReadXmlBase(reader); DesignByContract.Check.Assert(reader.LocalName == "language", "Expected LocalName is 'language', but it is " + reader.LocalName); this.language = new OpenEhr.RM.DataTypes.Text.CodePhrase(); this.language.ReadXml(reader); DesignByContract.Check.Assert(reader.LocalName == "territory", "Expected LocalName is 'territory', but it is " + reader.LocalName); this.territory = new OpenEhr.RM.DataTypes.Text.CodePhrase(); this.territory.ReadXml(reader); DesignByContract.Check.Assert(reader.LocalName == "category", "Expected LocalName is 'category', but it is " + reader.LocalName); this.category = new OpenEhr.RM.DataTypes.Text.DvCodedText(); this.category.ReadXml(reader); DesignByContract.Check.Assert(reader.LocalName == "composer", "Expected LocalName is 'composer', but it is " + reader.LocalName); string composerType = RmXmlSerializer.ReadXsiType(reader); this.composer = RmFactory.PartyProxy(composerType); this.composer.ReadXml(reader); if (reader.LocalName == "context") { this.context = new EventContext(); this.context.ReadXml(reader); this.context.Parent = this; } if (reader.LocalName == "content") { OpenEhr.AssumedTypes.Impl.LocatableList <ContentItem> contents = new OpenEhr.AssumedTypes.Impl.LocatableList <ContentItem>(); do { string contentType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); Check.Assert(!string.IsNullOrEmpty(contentType), "content type must not be null or empty."); ContentItem aContentItem = ContentItem.GetLocatableObjectByType(contentType) as ContentItem; if (aContentItem == null) { throw new InvalidOperationException("Composition contentType must be type of ContentItem: " + contentType); } aContentItem.ReadXml(reader); aContentItem.Parent = this; contents.Add(aContentItem); } while (reader.LocalName == "content" && reader.NodeType == System.Xml.XmlNodeType.Element); this.content = contents; } }
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); }
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) { 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()); }
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(); }
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 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) { 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); } }
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()); }