public EhrStatus(ArchetypeId archetypeId, DvText name, ObjectVersionId uid, PartySelf subject, bool isQueryable, bool isModifiable, ItemStructure otherDetails) { if (uid != null) this.Uid = uid; this.subject = subject; this.isQueryable = isQueryable; this.isQueryableSet = true; this.isModifiable = isModifiable; this.isModifiableSet = true; this.otherDetails = otherDetails; base.SetBaseData(archetypeId.Value, name); }
/// <summary> /// Create new ObjectVersionId that is the next trunk version of the precedingVersionUid /// with the same CreatingSystemId /// </summary> /// <param name="precedingVersionUid">Preceding version UID</param> /// <returns>Next trunk object version of the preceding version UID</returns> public static ObjectVersionId CreateNew(ObjectVersionId precedingVersionUid) { long trunkVersion; if (!long.TryParse(precedingVersionUid.VersionTreeId.Value, out trunkVersion)) { throw new NotSupportedException("Branched version tree IDs not supported"); } trunkVersion++; ObjectVersionId result = new ObjectVersionId(precedingVersionUid.ObjectId, precedingVersionUid.CreatingSystemId, new VersionTreeId(trunkVersion.ToString())); Check.Ensure(precedingVersionUid.ObjectId.Equals(result.ObjectId), "result objectId must equal preceding objectId"); Check.Ensure(precedingVersionUid.CreatingSystemId == result.CreatingSystemId, "result creatingSystemId must equal preceding creatingSystemId"); Check.Ensure(long.Parse(result.VersionTreeId.Value) > long.Parse(precedingVersionUid.VersionTreeId.Value), "result VersionTreeId must be greater than preceding versionTreeId"); return(result); }
public static void SetVersionUid(Party party, ObjectVersionId versionUid) { Check.Require(party != null, "party must not be null"); party.VersionUid = versionUid; }
protected void RemoveVersion(ObjectVersionId uid, HierObjectId ehrId, string rmTypeName) { ObjectRef version = new ObjectRef(uid, ehrId.Value, rmTypeName); versions.Remove(version); }
/// <summary> /// Create new ObjectVersionId that is the next trunk version of the precedingVersionUid /// with the same CreatingSystemId /// </summary> /// <param name="precedingVersionUid">Preceding version UID</param> /// <returns>Next trunk object version of the preceding version UID</returns> public static ObjectVersionId CreateNew(ObjectVersionId precedingVersionUid) { long trunkVersion; if (!long.TryParse(precedingVersionUid.VersionTreeId.Value, out trunkVersion)) throw new NotSupportedException("Branched version tree IDs not supported"); trunkVersion++; ObjectVersionId result = new ObjectVersionId(precedingVersionUid.ObjectId, precedingVersionUid.CreatingSystemId, new VersionTreeId(trunkVersion.ToString())); Check.Ensure(precedingVersionUid.ObjectId.Equals(result.ObjectId), "result objectId must equal preceding objectId"); Check.Ensure(precedingVersionUid.CreatingSystemId == result.CreatingSystemId, "result creatingSystemId must equal preceding creatingSystemId"); Check.Ensure(long.Parse(result.VersionTreeId.Value) > long.Parse(precedingVersionUid.VersionTreeId.Value), "result VersionTreeId must be greater than preceding versionTreeId"); return result; }
public EhrStatus(ObjectVersionId uid, PartySelf subject, bool isQueryable, bool isModifiable, ItemStructure otherDetails) : this(new ArchetypeId(defaultArchetypeId), new DvText(defaultName), uid, subject, isQueryable, isModifiable, otherDetails) { }