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); }
public EhrStatus(PartySelf subject, bool isQueryable, bool isModifiable, ItemStructure otherDetails) : this(null, subject, isQueryable, isModifiable, otherDetails) { }
public EhrStatus(ObjectVersionId uid, PartySelf subject, bool isQueryable, bool isModifiable, ItemStructure otherDetails) : this(new ArchetypeId(defaultArchetypeId), new DvText(defaultName), uid, subject, isQueryable, isModifiable, otherDetails) { }
protected override void ReadXmlBase(XmlReader reader) { base.ReadXmlBase(reader); DesignByContract.Check.Assert(reader.LocalName == "subject", "Expected LocalName is 'subject', but it is " + reader.LocalName); this.subject = new PartySelf(); this.subject.ReadXml(reader); DesignByContract.Check.Assert(reader.LocalName == "is_queryable", "Expected LocalName is 'is_queryable', but it is " + reader.LocalName); this.isQueryable = reader.ReadElementContentAsBoolean("is_queryable", RmXmlSerializer.OpenEhrNamespace); //this.isQueryableSet = true; reader.MoveToContent(); DesignByContract.Check.Assert(reader.LocalName == "is_modifiable", "Expected LocalName is 'is_modifiable', but it is " + reader.LocalName); this.isModifiable = reader.ReadElementContentAsBoolean("is_modifiable", RmXmlSerializer.OpenEhrNamespace); //this.isModifiableSet = true; reader.MoveToContent(); if (reader.LocalName == "other_details") { string otherDetailsType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); DesignByContract.Check.Assert(!string.IsNullOrEmpty(otherDetailsType), "otherDetailsType must not be null or empty."); this.otherDetails = Locatable.GetLocatableObjectByType(otherDetailsType) as ItemStructure; this.otherDetails.ReadXml(reader); } }