예제 #1
0
        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();
        }
예제 #2
0
파일: Action.cs 프로젝트: nickvane/OpenEHR
        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();
        }
예제 #3
0
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            DesignByContract.Check.Assert(reader.LocalName == "time",
                                          "Expected LocalName is 'time', but it is " + reader.LocalName);
            this.time = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
            this.time.ReadXml(reader);

            DesignByContract.Check.Assert(reader.LocalName == "description",
                                          "Expected LocalName is 'description', but it is " + reader.LocalName);
            string descriptionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);

            this.description = OpenEhr.RM.Common.Archetyped.Impl.Locatable.GetLocatableObjectByType(descriptionType)
                               as ItemStructure;
            if (this.description == null)
            {
                throw new InvalidOperationException("descriptionType in Action must be type of ItemStructure: " + descriptionType);
            }
            this.description.ReadXml(reader);
            this.description.Parent = this;


            if (reader.LocalName == "ism_transition")
            {
                this.ismTransition = new IsmTransition();
                this.ismTransition.ReadXml(reader);
            }

            if (reader.LocalName == "instruction_details")
            {
                this.instructionDetails = new InstructionDetails();
                this.instructionDetails.ReadXml(reader);
            }
        }
예제 #4
0
파일: Action.cs 프로젝트: nickvane/OpenEHR
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            DesignByContract.Check.Assert(reader.LocalName == "time",
                "Expected LocalName is 'time', but it is " + reader.LocalName);
            this.time = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
            this.time.ReadXml(reader);

            DesignByContract.Check.Assert(reader.LocalName == "description",
               "Expected LocalName is 'description', but it is " + reader.LocalName);
            string descriptionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);
            this.description = OpenEhr.RM.Common.Archetyped.Impl.Locatable.GetLocatableObjectByType(descriptionType)
                as ItemStructure;
            if (this.description == null)
                throw new InvalidOperationException("descriptionType in Action must be type of ItemStructure: " + descriptionType);
            this.description.ReadXml(reader);
            this.description.Parent = this;

            if (reader.LocalName == "ism_transition")
            {
                this.ismTransition = new IsmTransition();
                this.ismTransition.ReadXml(reader);
            }

            if (reader.LocalName == "instruction_details")
            {
                this.instructionDetails = new InstructionDetails();
                this.instructionDetails.ReadXml(reader);
            }
        }