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); } }