示例#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
        public AdminEntry(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,
            ItemStructure data)
            : base(name, archetypeNodeId, uid, links, archetypeDetails,
            feederAudit, language, encoding, subject, proider, otherParticipations, workflowId)
        {
            Check.Require(data != null, "data must not be null");

            this.data = data;
            this.data.Parent = this;

            SetAttributeDictionary();
            this.CheckInvariants();
        }
示例#3
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;
        }
示例#4
0
        public Observation(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, ItemStructure protocol,
           ObjectRef guidelineId, History<ItemStructure> data, History<ItemStructure> state)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit, language,
            encoding, subject, proider, otherParticipations, workflowId, protocol, guidelineId)
        {
            Check.Require(data != null, "data must not be null");

            this.data = data;
            if (this.data != null)
                this.data.Parent = this;
            this.state = state;
            if (this.state != null)
                this.state.Parent = this;

            SetAttributeDictionary();
            CheckInvariants();
        }
示例#5
0
        public Instruction(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, DvText narrative, DvDateTime expiryTime,
         Activity[] activities, DvParsable wfDefinition)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit, language,
          encoding, subject, proider, otherParticipations, workflowId, protocol, guidelineId)
        {
            Check.Require(narrative != null, "narrative must not be null");

            this.narrative = narrative;
            this.expiryTime = expiryTime;
            if (activities != null)
            {
                this.activities = RmFactory.LocatableList<Activity>(this, activities);
            }
            this.wfDefinition = wfDefinition;

            SetAttributeDictionary();
            CheckInvariants();
        }
示例#6
0
        public EventContext(DvDateTime startTime, DvDateTime endTime,
            DvCodedText setting, string location, PartyIdentified healthCareFacility,
            ItemStructure otherContext, Participation[] participations)
            : this()
        {
            Check.Require(startTime != null, "start_time must not be null");
            Check.Require(setting != null, "setting must not be null");

            this.startTime = startTime;
            this.endTime = endTime;
            this.setting = setting;
            this.location = location;
            this.healthCareFacility = healthCareFacility;
            this.otherContext = otherContext;
            if (this.otherContext != null)
                this.otherContext.Parent = this;
            if (participations != null)
                this.participations = new OpenEhr.AssumedTypes.List<Participation>(participations);

            SetAttributeDictionary();
            this.CheckInvariants();
        }
示例#7
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);

            }
        }
示例#8
0
        internal void ReadXml(XmlReader reader)
        {
            reader.ReadStartElement();
            reader.MoveToContent();

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

            if (reader.LocalName == "end_time")
            {
                this.endTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
                this.endTime.ReadXml(reader);
            }

            if (reader.LocalName == "location")
            {
                this.location = reader.ReadElementString("location", RmXmlSerializer.OpenEhrNamespace);
            }

            DesignByContract.Check.Assert(reader.LocalName == "setting",
                                          "Expected LocalName is 'setting', but it is " + reader.LocalName);
            this.setting = new OpenEhr.RM.DataTypes.Text.DvCodedText();
            this.setting.ReadXml(reader);

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

            if (reader.LocalName == "health_care_facility")
            {
                this.healthCareFacility = new OpenEhr.RM.Common.Generic.PartyIdentified();
                this.healthCareFacility.ReadXml(reader);
            }

            if (reader.LocalName == "participations")
            {
                this.participations = new OpenEhr.AssumedTypes.List <OpenEhr.RM.Common.Generic.Participation>();
                do
                {
                    OpenEhr.RM.Common.Generic.Participation p = new OpenEhr.RM.Common.Generic.Participation();
                    p.ReadXml(reader);
                    this.participations.Add(p);
                } while (reader.LocalName == "participations");
            }


            Check.Assert(reader.NodeType == System.Xml.XmlNodeType.EndElement, "Expected endElement of EventContext.");
            reader.ReadEndElement();
            reader.MoveToContent();

            this.SetAttributeDictionary();
        }
示例#9
0
        internal void ReadXml(XmlReader reader)
        {
            reader.ReadStartElement();
            reader.MoveToContent();

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

            if (reader.LocalName == "end_time")
            {
                this.endTime = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
                this.endTime.ReadXml(reader);
            }

            if (reader.LocalName == "location")
            {
                this.location = reader.ReadElementString("location", RmXmlSerializer.OpenEhrNamespace);
            }

            DesignByContract.Check.Assert(reader.LocalName == "setting",
                "Expected LocalName is 'setting', but it is " + reader.LocalName);
            this.setting = new OpenEhr.RM.DataTypes.Text.DvCodedText();
            this.setting.ReadXml(reader);

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

            if (reader.LocalName == "health_care_facility")
            {
                this.healthCareFacility = new OpenEhr.RM.Common.Generic.PartyIdentified();
                this.healthCareFacility.ReadXml(reader);

            }

            if (reader.LocalName == "participations")
            {
                this.participations = new OpenEhr.AssumedTypes.List<OpenEhr.RM.Common.Generic.Participation>();
                do
                {
                    OpenEhr.RM.Common.Generic.Participation p = new OpenEhr.RM.Common.Generic.Participation();
                    p.ReadXml(reader);
                    this.participations.Add(p);

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

            Check.Assert(reader.NodeType == System.Xml.XmlNodeType.EndElement, "Expected endElement of EventContext.");
            reader.ReadEndElement();
            reader.MoveToContent();

            this.SetAttributeDictionary();
        }