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 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 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 XVersionedObject(HierObjectId uid, ObjectRef ownerId, DvDateTime timeCreated, int totalVersionCount, List <OriginalVersion <T> > versions) : this(uid, ownerId, timeCreated, totalVersionCount) { Check.Require(totalVersionCount >= 1, "totalVersionCount must not be less than 1"); this.versions = versions; }
public PointEvent(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, DvDateTime time, T data, ItemStructure.ItemStructure state) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit, time, data, state) { SetAttributeDictionary(); CheckInvariants(); }
public VersionedObject(HierObjectId uid, ObjectRef ownerId, DvDateTime timeCreated, System.Collections.Generic.IEnumerable <Version <T> > versions) { this.uid = uid; this.ownerId = ownerId; this.timeCreated = timeCreated; versions = new List <Version <T> >(versions); }
private void assertDateTimeValue(AttributeValue attr, string value) { Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock)); PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue(); Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(DateTimeValue)); DateTimeValue actual = (DateTimeValue)pob.getSimpleValue(); DvDateTime expected = new DvDateTime(value.ToString()); Assert.AreEqual(actual.getValue(), expected); }
private void assertDateTimeValue(AttributeValue attr, string value) { Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock)); PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue(); Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(DateTimeValue)); DateTimeValue actual = (DateTimeValue)pob.getSimpleValue(); DvDateTime expected = new DvDateTime(value.ToString()); Assert.AreEqual(actual.getValue(), expected); }
public VersionedObject(Extract.Common.XVersionedObject <T> xVersionedObject) { this.versions = new List <Version <T> >(); foreach (OriginalVersion <T> version in xVersionedObject.Versions) { this.versions.Add(version); } this.ownerId = xVersionedObject.OwnerId; this.timeCreated = xVersionedObject.TimeCreated; this.uid = xVersionedObject.Uid; }
protected XVersionedObject(HierObjectId uid, ObjectRef ownerId, DvDateTime timeCreated, int totalVersionCount) { Check.Require(uid != null, "uid must not be null"); Check.Require(ownerId != null, "ownerId must not be null"); Check.Require(timeCreated != null, "uid must not be null"); Check.Require(totalVersionCount >= 1, "totalVersionCount must not be less than 1"); this.uid = uid; this.ownerId = ownerId; this.timeCreated = timeCreated; this.totalVersionCount = totalVersionCount; }
internal static void MapDateTime(ref DvDateTime src, ref StringBuilder sb) { if (sb == null) { sb = new StringBuilder(); } else { sb.Clear(); } if (!src.IsNA) { sb.AppendFormat("\"{0:o}\"", (DateTime)src); } }
public EHR(string systemId, HierObjectId ehrId, DvDateTime timeCreated, ObjectRef ehrAccess, ObjectRef ehrStatus, ObjectRef directory, List<ObjectRef> compositions, List<ObjectRef> contributions) { Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty"); Check.Require(ehrId != null, "ehrId must not be null"); Check.Require(timeCreated != null, "timeCreated must not be null"); Check.Require(ehrAccess != null, "ehrAccess must not be null"); Check.Require(ehrStatus != null, "ehrStatus must not be null"); this.systemId = systemId; this.ehrId = ehrId; this.timeCreated = timeCreated; this.ehrAccess = ehrAccess; this.ehrStatus = ehrStatus; this.directory = directory; this.compositions = compositions; this.contributions = contributions; }
public EHR(string systemId, HierObjectId ehrId, DvDateTime timeCreated, ObjectRef ehrAccess, ObjectRef ehrStatus, ObjectRef directory, List <ObjectRef> compositions, List <ObjectRef> contributions) { Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty"); Check.Require(ehrId != null, "ehrId must not be null"); Check.Require(timeCreated != null, "timeCreated must not be null"); Check.Require(ehrAccess != null, "ehrAccess must not be null"); Check.Require(ehrStatus != null, "ehrStatus must not be null"); this.systemId = systemId; this.ehrId = ehrId; this.timeCreated = timeCreated; this.ehrAccess = ehrAccess; this.ehrStatus = ehrStatus; this.directory = directory; this.compositions = compositions; this.contributions = contributions; }
public XVersionedObject(ObjectRef ownerId, DvDateTime timeCreated, int totalVersionCount, OriginalVersion <T>[] versions) { Check.Require(versions != null, "versions must not be null"); Check.Require(versions.Length > 0, "versions must not be empty"); Check.Require(ownerId != null, "ownerId must not be null"); Check.Require(timeCreated != null, "uid must not be null"); Check.Require(totalVersionCount >= 1, "totalVersionCount must not be less than 1"); this.uid = new HierObjectId(versions[0].OwnerId.Value); this.ownerId = ownerId; this.timeCreated = timeCreated; this.totalVersionCount = totalVersionCount; foreach (OriginalVersion <T> version in versions) { this.Add(version); } }
/// <summary> /// Get the origin value based on the history.Events time or IntervalStartTime /// </summary> /// <typeparam name="T"></typeparam> /// <param name="history"></param> /// <returns></returns> static public DvDateTime CalculateOrigin(History <T> history) { Check.Require(history != null, "history must not be null"); DvDateTime originValue = null; if (history.Events != null && history.Events.Count > 0) { foreach (Event <T> anEvent in history.Events) { DvDateTime eventTime; IntervalEvent <T> intervalEvent = anEvent as IntervalEvent <T>; if (intervalEvent != null) { eventTime = intervalEvent.IntervalStartTime(); } else { eventTime = anEvent.Time; } CComplexObject constraint = ((IRmType)anEvent).Constraint as CComplexObject; if (constraint != null) { CAttribute offsetConstraint = constraint.GetAttribute("offset"); if (offsetConstraint != null && offsetConstraint.Children != null && offsetConstraint.Children.Count == 1) { CComplexObject offsetDuration = offsetConstraint.Children[0] as CComplexObject; eventTime = eventTime.Subtract((DvDuration)offsetDuration.DefaultValue); } } if (originValue == null || originValue > eventTime) { originValue = new DvDateTime(eventTime.Value); } } } Check.Ensure(originValue != null, "originValue must not be null"); return(originValue); }
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(); }
protected Event(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, DvDateTime time, T data, ItemStructure.ItemStructure state) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit) { Check.Require(time != null, "time must not be null"); this.time = time; this.data = data; if (this.data != null) { this.data.Parent = this; } this.state = state; if (this.state != null) { this.state.Parent = this; } }
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(); }
public History(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, DvDateTime origin, DvDuration period, DvDuration duration, Event <T>[] events, ItemStructure.ItemStructure summary) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit) { this.period = period; this.duration = duration; this.summary = summary; if (this.summary != null) { this.summary.Parent = this; } if (events != null) { this.events = RmFactory.LocatableList <Event <T> >(this, events); } this.origin = origin; SetAttributeDictionary(); CheckInvariants(); }
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 IntervalEvent(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid, Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit, DvDateTime time, T data, ItemStructure.ItemStructure state, DvDuration width, int?sampleCount, DvCodedText mathFunction) : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit, time, data, state) { Check.Require(width != null, "width must not be null"); Check.Require(mathFunction != null, "math_function must not be null"); this.width = width; if (sampleCount != null) { this.sampleCount = (int)sampleCount; this.sampleCountSet = true; } this.mathFunction = mathFunction; SetAttributeDictionary(); CheckInvariants(); }
public override DvDuration Offset() { History <T> parent = this.Parent as History <T>; if (parent == null) { throw new ApplicationException("parent must not be null."); } DataTypes.Quantity.DateTime.DvDuration offset; if (parent.Origin != null) { DvDateTime intervalStartTime = this.IntervalStartTime(); Check.Assert(intervalStartTime != null, "intervalStartTime must not be null."); offset = intervalStartTime.Diff(parent.Origin); Check.Ensure(offset != null, "offset must not be null"); return(offset); } else { return(base.Offset()); } }
protected void MapDateTime(ref DvDateTime src, ref StringBuilder sb) { TextSaverUtils.MapDateTime(ref src, ref sb); }
public Version <T> VersionAtTime(DvDateTime time) { throw new Exception("The method or operation is not implemented."); }
public VersionedObject() { this.timeCreated = new DvDateTime(); this.versions = new List <Version <T> >(); }
IVersion <T> IVersionedObject <T> .VersionAtTime(DvDateTime time) { return(VersionAtTime(time)); }