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); } }
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; } }
/// <summary> /// constructor /// </summary> /// <param name="systemId"></param> /// <param name="location"></param> /// <param name="provider"></param> /// <param name="subject"></param> /// <param name="time"></param> /// <param name="versionId"></param> public FeederAuditDetails(string systemId, Common.Generic.PartyIdentified location, Common.Generic.PartyIdentified provider, Common.Generic.PartyProxy subject, DataTypes.Quantity.DateTime.DvDateTime time, string versionId) : this() { this.systemId = systemId; this.location = location; this.provider = provider; this.subject = subject; this.time = time; this.versionId = versionId; }
/// <summary> /// constructor /// </summary> /// <param name="systemId"></param> /// <param name="location"></param> /// <param name="provider"></param> /// <param name="subject"></param> /// <param name="time"></param> /// <param name="versionId"></param> public FeederAuditDetails(string systemId, Common.Generic.PartyIdentified location, Common.Generic.PartyIdentified provider, Common.Generic.PartyProxy subject, DataTypes.Quantity.DateTime.DvDateTime time, string versionId) : this() { this.systemId = systemId; this.location = location; this.provider = provider; this.subject = subject; this.time = time; this.versionId = versionId; }
internal void ReadXml(System.Xml.XmlReader reader) { reader.ReadStartElement(); reader.MoveToContent(); Check.Require(reader.LocalName == "system_id", "Expected LocalName is 'system_id' rather than " + reader.LocalName); this.systemId = reader.ReadElementString("system_id", RmXmlSerializer.OpenEhrNamespace); if (reader.LocalName == "location") { this.location = new OpenEhr.RM.Common.Generic.PartyIdentified(); this.location.ReadXml(reader); } if (reader.LocalName == "provider") { this.provider = new OpenEhr.RM.Common.Generic.PartyIdentified(); this.provider.ReadXml(reader); } if (reader.LocalName == "subject") { string subjectType = RmXmlSerializer.ReadXsiType(reader); Check.Assert(!string.IsNullOrEmpty(subjectType), "the type of subject must not be null or empty."); this.subject = RmFactory.PartyProxy(subjectType); this.subject.ReadXml(reader); } if (reader.LocalName == "time") { this.time = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.time.ReadXml(reader); } if (reader.LocalName == "version_id") { this.versionId = reader.ReadElementString("version_id", RmXmlSerializer.OpenEhrNamespace); } if (!reader.IsStartElement()) { reader.ReadEndElement(); } reader.MoveToContent(); }
protected Entry(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, CodePhrase language, CodePhrase encoding, PartyProxy subject, PartyProxy proider, Participation[] otherParticipations, ObjectRef workflowId) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit) { Check.Require(language != null, "language must not be null"); Check.Require(encoding != null, "encoding must not be null"); Check.Require(subject != null, "subject must not be null"); this.language = language; this.encoding = encoding; this.subject = subject; this.provider = proider; if (otherParticipations != null) this.otherParticipations = new OpenEhr.AssumedTypes.List<Participation>(otherParticipations); this.workflowId = workflowId; }
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); } }
internal void ReadXml(System.Xml.XmlReader reader) { reader.ReadStartElement(); reader.MoveToContent(); Check.Require(reader.LocalName == "system_id", "Expected LocalName is 'system_id' rather than " + reader.LocalName); this.systemId = reader.ReadElementString("system_id", RmXmlSerializer.OpenEhrNamespace); if (reader.LocalName == "location") { this.location = new OpenEhr.RM.Common.Generic.PartyIdentified(); this.location.ReadXml(reader); } if (reader.LocalName == "provider") { this.provider = new OpenEhr.RM.Common.Generic.PartyIdentified(); this.provider.ReadXml(reader); } if (reader.LocalName == "subject") { string subjectType = RmXmlSerializer.ReadXsiType(reader); Check.Assert(!string.IsNullOrEmpty(subjectType), "the type of subject must not be null or empty."); this.subject = RmFactory.PartyProxy(subjectType); this.subject.ReadXml(reader); } if (reader.LocalName == "time") { this.time = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.time.ReadXml(reader); } if (reader.LocalName == "version_id") { this.versionId = reader.ReadElementString("version_id", RmXmlSerializer.OpenEhrNamespace); } if (!reader.IsStartElement()) { reader.ReadEndElement(); } reader.MoveToContent(); }