public Contribution(HierObjectId uid, AuditDetails audit) : this(uid) { Check.Require(audit != null, "audit must not be null"); this.audit = audit; }
public XmlSerializableExtract(string archetypeNodeId, DvText name, HierObjectId systemId, ExtractChapter[] chapters) : base(archetypeNodeId, name, systemId) { foreach (ExtractChapter chapter in chapters) { this.Chapters.Add(chapter); } }
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 VersionedObject(ObjectRef ownerId, HierObjectId uid) : this() { Check.Require(ownerId != null, "ownerId must not be null"); Check.Require(uid != null, "uid must not be null"); this.ownerId = ownerId; this.uid = uid; }
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); }
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; }
/// <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 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); } }
static public ObjectRef ObjectRef(VersionedFolder directory, HierObjectId systemId) { return(RmFactory.ObjectRef(directory.Uid, systemId.Value, typeof(Folder))); }
public Contribution() : this(HierObjectId.NewObjectId()) { Check.Invariant(this.Uid != null, "uid must not be null"); }
Contribution(HierObjectId uid) { Check.Require(uid != null, "uid must not be null"); this.uid = uid; }
protected void RemoveVersion(ObjectVersionId uid, HierObjectId ehrId, string rmTypeName) { ObjectRef version = new ObjectRef(uid, ehrId.Value, rmTypeName); versions.Remove(version); }
public XmlSerializableExtract(string archetypeNodeId, DvText name, HierObjectId systemId) : base(archetypeNodeId, name, systemId) { }
public void ReadOperationalTemplate(XmlReader reader, OperationalTemplate template) { Check.Require(reader != null, string.Format(CommonStrings.XMustNotBeNull, "reader")); Check.Require(template != null, string.Format(CommonStrings.XMustNotBeNull, "template")); reader.ReadStartElement(); //template reader.MoveToContent(); CodePhrase language = new CodePhrase(); language.ReadXml(reader); template.Language = language; if (reader.LocalName == "is_controlled") { reader.ReadElementContentAsBoolean("is_controlled", RmXmlSerializer.OpenEhrNamespace); reader.MoveToContent(); } if (reader.LocalName == "description") { ResourceDescription description = new ResourceDescription(); description.ReadXml(reader); template.Description = description; } if (reader.LocalName == "revision_history") { RevisionHistory revisionHistory = new RevisionHistory(); revisionHistory.ReadXml(reader); template.RevisionHistory = revisionHistory; } if (reader.LocalName == "uid") { HierObjectId uid = new HierObjectId(); uid.ReadXml(reader); template.Uid = uid; } TemplateId templateId = new TemplateId(); templateId.ReadXml(reader); template.TemplateId = templateId; template.Concept = reader.ReadElementContentAsString("concept", RmXmlSerializer.OpenEhrNamespace); reader.MoveToContent(); CArchetypeRoot definition = new CArchetypeRoot(); ReadCArchetypeRoot(reader, definition); template.Definition = definition; // LMT added 12 May 2010 for TMP-1252 if (reader.LocalName == "annotations") { template.Annotations = new List <OpenEhr.RM.Common.Resource.Annotation>(); OpenEhr.RM.Common.Resource.Annotation currentAnnotation; while (reader.LocalName == "annotations") { currentAnnotation = ReadAnnotation(reader); template.Annotations.Add(currentAnnotation); reader.MoveToContent(); } } if (reader.LocalName == "constraints") { TConstraint constraints = new TConstraint(); ReadTConstraint(reader, constraints); template.Constraints = constraints; } if (reader.LocalName == "view") { TView view = new TView(); ReadTView(reader, view); template.View = view; } reader.ReadEndElement(); // template reader.MoveToContent(); }
public UidBasedId UidBasedId(string value) { UidBasedId uid; if (value.Contains("::")) uid = new ObjectVersionId(value); else uid = new HierObjectId(value); return uid; }
static public ObjectRef ObjectRef(HierObjectId contributionUid, HierObjectId systemId) { return(new ObjectRef(contributionUid, systemId.Value, RmFactory.GetRmTypeName(typeof(Contribution)))); }
public VersionedFolder(ObjectRef ownerId, HierObjectId uid) : base(ownerId, uid) { }
public ExtractEntityIdentifier(HierObjectId entityId, PartyIdentified subject) { this.entityId = entityId; this.subject = subject; }
static public ObjectRef ObjectRef(Contribution contribution, HierObjectId systemId) { return(new ObjectRef(contribution.Uid, systemId.Value, contribution.RmTypeName)); }