示例#1
0
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            Check.Assert(reader.LocalName == "language", "Expected LocalName is 'language' rather than " +
                         reader.LocalName);
            this.language = new OpenEhr.RM.DataTypes.Text.CodePhrase();
            this.language.ReadXml(reader);

            Check.Assert(reader.LocalName == "encoding", "Expected LocalName is 'encoding' rather than " +
                         reader.LocalName);
            this.encoding = new OpenEhr.RM.DataTypes.Text.CodePhrase();
            this.encoding.ReadXml(reader);

            Check.Assert(reader.LocalName == "subject", "Expected LocalName is 'subject' rather than " +
                         reader.LocalName);
            string subjectType = RmXmlSerializer.ReadXsiType(reader);

            this.subject = RmFactory.PartyProxy(subjectType);

            this.subject.ReadXml(reader);


            if (reader.LocalName == "provider")
            {
                string providerType = RmXmlSerializer.ReadXsiType(reader);
                this.provider = RmFactory.PartyProxy(providerType);

                this.provider.ReadXml(reader);
            }

            if (reader.LocalName == "other_participations")
            {
                this.otherParticipations = new OpenEhr.AssumedTypes.List <Participation>();
                do
                {
                    Participation p = new Participation();
                    p.ReadXml(reader);

                    this.otherParticipations.Add(p);
                } while (reader.LocalName == "other_participations");
            }

            if (reader.LocalName == "work_flow_id")
            {
                string workFlowIdType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);

                // CM: 06/09/10 when workFlowIdType is null or empty, it's type of OBJECT_REF
                if (string.IsNullOrEmpty(workFlowIdType))
                {
                    this.workflowId = new ObjectRef();
                }
                else
                {
                    this.workflowId = ObjectRef.GetObjectRefByType(workFlowIdType);
                }

                this.workflowId.ReadXml(reader);
            }
        }
示例#2
0
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            if (reader.LocalName == "protocol")
            {
                string protocolType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);
                this.protocol = OpenEhr.RM.Common.Archetyped.Impl.Locatable.GetLocatableObjectByType(protocolType)
                                as ItemStructure;
                if (this.protocol == null)
                {
                    throw new InvalidOperationException("otherContextType must be subtype of ItemStructure " + protocolType);
                }
                this.protocol.ReadXml(reader);
                this.protocol.Parent = this;
            }

            if (reader.LocalName == "guideline_id")
            {
                string guidelineIdType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);
                this.guidelineId = OpenEhr.RM.Support.Identification.ObjectRef.GetObjectRefByType(guidelineIdType);

                this.guidelineId.ReadXml(reader);
            }
        }
示例#3
0
        protected virtual void ReadXmlBase(System.Xml.XmlReader reader)
        {
            Check.Assert(reader.LocalName == "contribution",
                         "Expected LocalName is 'contribution' rather than " + reader.LocalName);
            string contributionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);

            if (contributionType != null)
            {
                this.contribution = OpenEhr.RM.Support.Identification.ObjectRef.GetObjectRefByType(contributionType);
            }
            else
            {
                this.contribution = new ObjectRef();
            }
            this.contribution.ReadXml(reader);

            Check.Assert(reader.LocalName == "commit_audit",
                         "Expected LocalName is 'commit_audit' rather than " + reader.LocalName);
            this.commitAudit = new OpenEhr.RM.Common.Generic.AuditDetails();
            this.commitAudit.ReadXml(reader);

            if (reader.LocalName == "signature")
            {
                this.signature = reader.ReadElementString("signature", RmXmlSerializer.OpenEhrNamespace);
            }
            reader.MoveToContent();
        }
示例#4
0
        public OriginalVersion(Support.Identification.ObjectVersionId uid,
                               Support.Identification.ObjectVersionId precedingVersionUid,
                               DataTypes.Text.DvCodedText lifecycleState, Common.Generic.AuditDetails commitAudit,
                               Support.Identification.ObjectRef contribution, T data)
            : base(commitAudit, contribution)
        {
            Check.Require(uid != null, "uid must not be null");
            Check.Require(data != null, "data must not be null");

            // set local data
            this.data = data;
            this.uid  = uid;
            this.precedingVersionUid = precedingVersionUid;
            this.lifecycleState      = lifecycleState;
        }
示例#5
0
文件: Entry.cs 项目: nickvane/OpenEHR
        protected Entry(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid,
           Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit,
            CodePhrase language, CodePhrase encoding, PartyProxy subject, PartyProxy proider,
            Participation[] otherParticipations, ObjectRef workflowId)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit)
        {
            Check.Require(language != null, "language must not be null");
            Check.Require(encoding != null, "encoding must not be null");
            Check.Require(subject != null, "subject must not be null");

            this.language = language;
            this.encoding = encoding;
            this.subject = subject;
            this.provider = proider;
            if (otherParticipations != null)
                this.otherParticipations = new OpenEhr.AssumedTypes.List<Participation>(otherParticipations);
            this.workflowId = workflowId;
        }
示例#6
0
文件: Entry.cs 项目: nickvane/OpenEHR
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            Check.Assert(reader.LocalName == "language", "Expected LocalName is 'language' rather than " +
                reader.LocalName);
            this.language = new OpenEhr.RM.DataTypes.Text.CodePhrase();
            this.language.ReadXml(reader);

            Check.Assert(reader.LocalName == "encoding", "Expected LocalName is 'encoding' rather than " +
                reader.LocalName);
            this.encoding = new OpenEhr.RM.DataTypes.Text.CodePhrase();
            this.encoding.ReadXml(reader);

            Check.Assert(reader.LocalName == "subject", "Expected LocalName is 'subject' rather than " +
                reader.LocalName);
            string subjectType = RmXmlSerializer.ReadXsiType(reader);
            this.subject = RmFactory.PartyProxy(subjectType);

            this.subject.ReadXml(reader);

            if (reader.LocalName == "provider")
            {
                string providerType = RmXmlSerializer.ReadXsiType(reader);
                this.provider = RmFactory.PartyProxy(providerType);

                this.provider.ReadXml(reader);
            }

            if (reader.LocalName == "other_participations")
            {
                this.otherParticipations = new OpenEhr.AssumedTypes.List<Participation>();
                do
                {
                    Participation p = new Participation();
                    p.ReadXml(reader);

                    this.otherParticipations.Add(p);

                } while (reader.LocalName == "other_participations");
            }

            if (reader.LocalName == "work_flow_id")
            {
                string workFlowIdType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);

                // CM: 06/09/10 when workFlowIdType is null or empty, it's type of OBJECT_REF
                if (string.IsNullOrEmpty(workFlowIdType))
                    this.workflowId = new ObjectRef();
                else
                    this.workflowId = ObjectRef.GetObjectRefByType(workFlowIdType);

                this.workflowId.ReadXml(reader);

            }
        }