/// <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(); }
public EventContext(DvDateTime startTime, DvDateTime endTime, DvCodedText setting, string location, PartyIdentified healthCareFacility, ItemStructure otherContext, Participation[] participations) : this() { Check.Require(startTime != null, "start_time must not be null"); Check.Require(setting != null, "setting must not be null"); this.startTime = startTime; this.endTime = endTime; this.setting = setting; this.location = location; this.healthCareFacility = healthCareFacility; this.otherContext = otherContext; if (this.otherContext != null) this.otherContext.Parent = this; if (participations != null) this.participations = new OpenEhr.AssumedTypes.List<Participation>(participations); SetAttributeDictionary(); this.CheckInvariants(); }
internal void ReadXml(XmlReader reader) { reader.ReadStartElement(); reader.MoveToContent(); DesignByContract.Check.Assert(reader.LocalName == "start_time", "Expected LocalName is 'start_time', but it is " + reader.LocalName); this.startTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.startTime.ReadXml(reader); if (reader.LocalName == "end_time") { this.endTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.endTime.ReadXml(reader); } if (reader.LocalName == "location") { this.location = reader.ReadElementString("location", RmXmlSerializer.OpenEhrNamespace); } DesignByContract.Check.Assert(reader.LocalName == "setting", "Expected LocalName is 'setting', but it is " + reader.LocalName); this.setting = new OpenEhr.RM.DataTypes.Text.DvCodedText(); this.setting.ReadXml(reader); if (reader.LocalName == "other_context") { string otherContextType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); this.otherContext = OpenEhr.RM.Common.Archetyped.Impl.Locatable.GetLocatableObjectByType(otherContextType) as ItemStructure; if (this.otherContext == null) { throw new InvalidOperationException("otherContextType must be subtype of ItemStructure " + otherContextType); } this.otherContext.ReadXml(reader); this.otherContext.Parent = this; } if (reader.LocalName == "health_care_facility") { this.healthCareFacility = new OpenEhr.RM.Common.Generic.PartyIdentified(); this.healthCareFacility.ReadXml(reader); } if (reader.LocalName == "participations") { this.participations = new OpenEhr.AssumedTypes.List <OpenEhr.RM.Common.Generic.Participation>(); do { OpenEhr.RM.Common.Generic.Participation p = new OpenEhr.RM.Common.Generic.Participation(); p.ReadXml(reader); this.participations.Add(p); } while (reader.LocalName == "participations"); } Check.Assert(reader.NodeType == System.Xml.XmlNodeType.EndElement, "Expected endElement of EventContext."); reader.ReadEndElement(); reader.MoveToContent(); this.SetAttributeDictionary(); }
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(); }
internal void ReadXml(XmlReader reader) { reader.ReadStartElement(); reader.MoveToContent(); DesignByContract.Check.Assert(reader.LocalName == "start_time", "Expected LocalName is 'start_time', but it is " + reader.LocalName); this.startTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.startTime.ReadXml(reader); if (reader.LocalName == "end_time") { this.endTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.endTime.ReadXml(reader); } if (reader.LocalName == "location") { this.location = reader.ReadElementString("location", RmXmlSerializer.OpenEhrNamespace); } DesignByContract.Check.Assert(reader.LocalName == "setting", "Expected LocalName is 'setting', but it is " + reader.LocalName); this.setting = new OpenEhr.RM.DataTypes.Text.DvCodedText(); this.setting.ReadXml(reader); if (reader.LocalName == "other_context") { string otherContextType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); this.otherContext = OpenEhr.RM.Common.Archetyped.Impl.Locatable.GetLocatableObjectByType(otherContextType) as ItemStructure; if (this.otherContext == null) throw new InvalidOperationException("otherContextType must be subtype of ItemStructure " + otherContextType); this.otherContext.ReadXml(reader); this.otherContext.Parent = this; } if (reader.LocalName == "health_care_facility") { this.healthCareFacility = new OpenEhr.RM.Common.Generic.PartyIdentified(); this.healthCareFacility.ReadXml(reader); } if (reader.LocalName == "participations") { this.participations = new OpenEhr.AssumedTypes.List<OpenEhr.RM.Common.Generic.Participation>(); do { OpenEhr.RM.Common.Generic.Participation p = new OpenEhr.RM.Common.Generic.Participation(); p.ReadXml(reader); this.participations.Add(p); } while (reader.LocalName == "participations"); } Check.Assert(reader.NodeType == System.Xml.XmlNodeType.EndElement, "Expected endElement of EventContext."); reader.ReadEndElement(); reader.MoveToContent(); this.SetAttributeDictionary(); }