예제 #1
0
        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);
        }
예제 #2
0
 public EhrStatus(PartySelf subject, bool isQueryable, bool isModifiable, ItemStructure otherDetails)
     : this(null, subject, isQueryable, isModifiable, otherDetails)
 {
 }
예제 #3
0
 public EhrStatus(ObjectVersionId uid, PartySelf subject, bool isQueryable, bool isModifiable, ItemStructure otherDetails)
     : this(new ArchetypeId(defaultArchetypeId), new DvText(defaultName), uid, subject, isQueryable, isModifiable, otherDetails)
 {
 }
예제 #4
0
        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);
            }
        }