public Action(DvText name, string archetypeNodeId, UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, CodePhrase language, CodePhrase encoding, PartyProxy subject, PartyProxy proider, Participation[] otherParticipations, ObjectRef workflowId, ItemStructure protocol, ObjectRef guidelineId, DvDateTime time, ItemStructure description, IsmTransition ismTransition, InstructionDetails instructionDetails) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit, language, encoding, subject, proider, otherParticipations, workflowId, protocol, guidelineId) { Check.Require(time != null, "time must not be null"); Check.Require(description != null, "description must not be null"); Check.Require(ismTransition != null, "ismTransition must not be null"); this.time = time; this.description = description; if (this.description != null) this.description.Parent = this; this.ismTransition = ismTransition; if (this.ismTransition != null) this.ismTransition.Parent = this; this.instructionDetails = instructionDetails; if (this.instructionDetails != null) this.instructionDetails.Parent = this; SetAttributeDictionary(); CheckInvariants(); }
public AuditDetails(string systemId, DataTypes.Text.DvCodedText changeType) : this() { DesignByContract.Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty"); DesignByContract.Check.Require(changeType != null, "changeType must not be null"); this.systemId = systemId; this.timeCommitted = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.changeType = changeType; }
/// <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>Extract basic constructor</summary> /// <param name="systemId">System ID</param> protected Extract(string archetypeNodeId, DataTypes.Text.DvText name, HierObjectId systemId) : base(archetypeNodeId, name) { DesignByContract.Check.Require(systemId != null, "system ID must not be null"); this.systemId = systemId; base.Uid = new HierObjectId(Guid.NewGuid().ToString()); this.timeCreated = new DataTypes.Quantity.DateTime.DvDateTime(DateTime.Now); this.sequenceNr = 1; this.chapters = new List<ExtractChapter>(); // TODO: implement SetAttributeDictionary and CheckInvariant overrides SetAttributeDictionary(); CheckInvariants(); }
public AuditDetails(string systemId, DataTypes.Quantity.DateTime.DvDateTime timeCommitted, DataTypes.Text.DvCodedText changeType, PartyProxy committer, DataTypes.Text.DvText description) : this() { DesignByContract.Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty"); DesignByContract.Check.Require(timeCommitted != null, "timeCommitted must not be null"); DesignByContract.Check.Require(changeType != null, "changeType must not be null"); DesignByContract.Check.Require(committer != null, "committer must not be null"); this.systemId = systemId; this.timeCommitted = timeCommitted; this.changeType = changeType; this.committer = committer; this.description = description; this.CheckDefaultInvariants(); }
public Instruction(DvText name, string archetypeNodeId, UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, CodePhrase language, CodePhrase encoding, PartyProxy subject, PartyProxy proider, Participation[] otherParticipations, ObjectRef workflowId, ItemStructure protocol, ObjectRef guidelineId, DvText narrative, DvDateTime expiryTime, Activity[] activities, DvParsable wfDefinition) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit, language, encoding, subject, proider, otherParticipations, workflowId, protocol, guidelineId) { Check.Require(narrative != null, "narrative must not be null"); this.narrative = narrative; this.expiryTime = expiryTime; if (activities != null) { this.activities = RmFactory.LocatableList<Activity>(this, activities); } this.wfDefinition = wfDefinition; SetAttributeDictionary(); CheckInvariants(); }
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(); }
protected override void ReadXmlBase(System.Xml.XmlReader reader) { base.ReadXmlBase(reader); DesignByContract.Check.Assert(reader.LocalName == "narrative", "Expected LocalName is 'narrative', but it is " + reader.LocalName); string narrativeType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); if (narrativeType != null) this.narrative = new OpenEhr.RM.DataTypes.Text.DvCodedText(); else this.narrative = new OpenEhr.RM.DataTypes.Text.DvText(); this.narrative.ReadXml(reader); if (reader.LocalName == "expiry_time") { this.expiryTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.expiryTime.ReadXml(reader); } if (reader.LocalName == "wf_definition") { this.wfDefinition = new OpenEhr.RM.DataTypes.Encapsulated.DvParsable(); this.wfDefinition.ReadXml(reader); } if (reader.LocalName == "activities") { AssumedTypes.Impl.LocatableList<Activity> activities = new OpenEhr.AssumedTypes.Impl.LocatableList<Activity>(); do { Activity activity = new Activity(); activity.ReadXml(reader); activity.Parent = this; activities.Add(activity); } while (reader.LocalName == "activities" && reader.NodeType == System.Xml.XmlNodeType.Element); this.activities = activities; } }
protected override void ReadXmlBase(System.Xml.XmlReader reader) { base.ReadXmlBase(reader); DesignByContract.Check.Assert(reader.LocalName == "time", "Expected LocalName is 'time', but it is " + reader.LocalName); this.time = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.time.ReadXml(reader); DesignByContract.Check.Assert(reader.LocalName == "description", "Expected LocalName is 'description', but it is " + reader.LocalName); string descriptionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); this.description = OpenEhr.RM.Common.Archetyped.Impl.Locatable.GetLocatableObjectByType(descriptionType) as ItemStructure; if (this.description == null) throw new InvalidOperationException("descriptionType in Action must be type of ItemStructure: " + descriptionType); this.description.ReadXml(reader); this.description.Parent = this; if (reader.LocalName == "ism_transition") { this.ismTransition = new IsmTransition(); this.ismTransition.ReadXml(reader); } if (reader.LocalName == "instruction_details") { this.instructionDetails = new InstructionDetails(); this.instructionDetails.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(); }
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(); }
protected virtual void ReadXmlBase(System.Xml.XmlReader reader) { Check.Assert(reader.LocalName == "system_id", "Expected LocalName is 'system_id' not " + reader.LocalName); this.systemId = reader.ReadElementString("system_id", RmXmlSerializer.OpenEhrNamespace); reader.MoveToContent(); Check.Assert(reader.LocalName == "committer", "Expected LocalName is 'committer' not " + reader.LocalName); string committerType = RmXmlSerializer.ReadXsiType(reader); this.committer = RmFactory.PartyProxy(committerType); this.committer.ReadXml(reader); Check.Assert(reader.LocalName == "time_committed", "Expected LocalName is 'time_committed' not " + reader.LocalName); this.timeCommitted = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime(); this.timeCommitted.ReadXml(reader); Check.Assert(reader.LocalName == "change_type", "Expected LocalName is 'change_type' not " + reader.LocalName); this.changeType = new OpenEhr.RM.DataTypes.Text.DvCodedText(); this.changeType.ReadXml(reader); if (reader.LocalName == "description") { string descriptionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); if (descriptionType == null) this.description = new OpenEhr.RM.DataTypes.Text.DvText(); else this.description = new OpenEhr.RM.DataTypes.Text.DvCodedText(); this.description.ReadXml(reader); } }