示例#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
        // System ID is not set here, expecting it top be set by the server
        public AuditDetails(DataTypes.Text.DvCodedText changeType, PartyProxy committer)
            : this()
        {
            DesignByContract.Check.Require(changeType != null, "changeType must not be null");
            DesignByContract.Check.Require(committer != null, "committer must not be null");

            this.changeType = changeType;
            this.committer = committer;

            this.CheckDefaultInvariants();
        }
示例#3
0
        // System ID is not set here, expecting it top be set by the server
        public AuditDetails(DataTypes.Text.DvCodedText changeType, PartyProxy committer)
            : this()
        {
            DesignByContract.Check.Require(changeType != null, "changeType must not be null");
            DesignByContract.Check.Require(committer != null, "committer must not be null");

            this.changeType = changeType;
            this.committer  = committer;

            this.CheckDefaultInvariants();
        }
示例#4
0
        public Participation(DataTypes.Text.DvText function,
                             DataTypes.Quantity.DvInterval <DataTypes.Quantity.DateTime.DvDateTime> time,
                             DataTypes.Text.DvCodedText mode, PartyProxy performer)
            : this()
        {
            Check.Require(function != null, "function must not be null.");
            Check.Require(mode != null, "mode must not be null");
            Check.Require(performer != null, "performer must not be null");

            this.function  = function;
            this.time      = time;
            this.mode      = mode;
            this.performer = performer;

            this.CheckStrictInvariants();
        }
示例#5
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();
        }
示例#6
0
        public Participation(DataTypes.Text.DvText function,
            DataTypes.Quantity.DvInterval<DataTypes.Quantity.DateTime.DvDateTime> time,
            DataTypes.Text.DvCodedText mode, PartyProxy performer)
            : this()
        {
            Check.Require(function != null, "function must not be null.");
            Check.Require(mode != null, "mode must not be null");
            Check.Require(performer != null, "performer must not be null");

            this.function = function;
            this.time = time;
            this.mode = mode;
            this.performer = performer;

            this.CheckStrictInvariants();
        }
示例#7
0
        public AuditDetails(string systemId, DataTypes.Quantity.DateTime.DvDateTime timeCommitted, 
            DataTypes.Text.DvCodedText changeType, PartyProxy committer, DataTypes.Text.DvText description)
            : this()
        {
            DesignByContract.Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty");
            DesignByContract.Check.Require(timeCommitted != null, "timeCommitted must not be null");
            DesignByContract.Check.Require(changeType != null, "changeType must not be null");
            DesignByContract.Check.Require(committer != null, "committer must not be null");

            this.systemId = systemId;
            this.timeCommitted = timeCommitted;
            this.changeType = changeType;
            this.committer = committer;
            this.description = description;

            this.CheckDefaultInvariants();
        }
示例#8
0
        public AuditDetails(string systemId, DataTypes.Quantity.DateTime.DvDateTime timeCommitted,
                            DataTypes.Text.DvCodedText changeType, PartyProxy committer, DataTypes.Text.DvText description)
            : this()
        {
            DesignByContract.Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty");
            DesignByContract.Check.Require(timeCommitted != null, "timeCommitted must not be null");
            DesignByContract.Check.Require(changeType != null, "changeType must not be null");
            DesignByContract.Check.Require(committer != null, "committer must not be null");

            this.systemId      = systemId;
            this.timeCommitted = timeCommitted;
            this.changeType    = changeType;
            this.committer     = committer;
            this.description   = description;

            this.CheckDefaultInvariants();
        }
示例#9
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;
        }
示例#10
0
        public Attestation(string systemId, DataTypes.Quantity.DateTime.DvDateTime timeCommitted, 
            DataTypes.Text.DvCodedText changedType, PartyProxy committer, DataTypes.Text.DvText description,
            DataTypes.Encapsulated.DvMultimedia attestedView, string proof, 
            AssumedTypes.List<DataTypes.Uri.DvEhrUri> items, DataTypes.Text.DvText reason, bool isPending)
            : base(systemId, timeCommitted, changedType, committer, description)
        {
            Check.Require(items == null | items.Count >0, "if items is not null, it must not be empty.");
            Check.Require(reason != null, "reason must not be null.");

            this.attestedView = attestedView;
            this.proof = proof;
            this.items = items;
            this.reason = reason;
            this.isPending = isPending;
            this.isPendingSet = true;

            this.CheckDefaultInvariants();
        }
示例#11
0
        public Attestation(string systemId, DataTypes.Quantity.DateTime.DvDateTime timeCommitted,
                           DataTypes.Text.DvCodedText changedType, PartyProxy committer, DataTypes.Text.DvText description,
                           DataTypes.Encapsulated.DvMultimedia attestedView, string proof,
                           AssumedTypes.List <DataTypes.Uri.DvEhrUri> items, DataTypes.Text.DvText reason, bool isPending)
            : base(systemId, timeCommitted, changedType, committer, description)
        {
            Check.Require(items == null | items.Count > 0, "if items is not null, it must not be empty.");
            Check.Require(reason != null, "reason must not be null.");

            this.attestedView = attestedView;
            this.proof        = proof;
            this.items        = items;
            this.reason       = reason;
            this.isPending    = isPending;
            this.isPendingSet = true;

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

            Check.Assert(reader.LocalName == "function",
                         "Expected LocalName is 'function' not " + reader.LocalName);
            string functionType = RmXmlSerializer.ReadXsiType(reader);

            if (!string.IsNullOrEmpty(functionType))
            {
                this.function = RmFactory.DataValue(functionType) as DataTypes.Text.DvText;
            }
            else
            {
                this.function = new OpenEhr.RM.DataTypes.Text.DvText();
            }
            this.function.ReadXml(reader);
            reader.MoveToContent();

            Check.Assert(reader.LocalName == "performer",
                         "Expected LocalName is 'performer' not " + reader.LocalName);
            string performerType = RmXmlSerializer.ReadXsiType(reader);

            this.performer = RmFactory.PartyProxy(performerType);

            this.performer.ReadXml(reader);

            if (reader.LocalName == "time")
            {
                this.time = new OpenEhr.RM.DataTypes.Quantity.DvInterval <OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime>();
                this.time.ReadXml(reader);
            }

            Check.Assert(reader.LocalName == "mode", "Expected LocalName is 'mode' not " + reader.LocalName);
            this.mode = new OpenEhr.RM.DataTypes.Text.DvCodedText();
            this.mode.ReadXml(reader);

            DesignByContract.Check.Assert(reader.NodeType == System.Xml.XmlNodeType.EndElement,
                                          "Expected endElement of PartyIdentified.");
            reader.ReadEndElement();
            reader.MoveToContent();
        }
示例#13
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();
        }
示例#14
0
        protected virtual void ReadXmlBase(System.Xml.XmlReader reader)
        {
            Check.Assert(reader.LocalName == "system_id",
                         "Expected LocalName is 'system_id' not " + reader.LocalName);
            this.systemId = reader.ReadElementString("system_id", RmXmlSerializer.OpenEhrNamespace);
            reader.MoveToContent();

            Check.Assert(reader.LocalName == "committer",
                         "Expected LocalName is 'committer' not " + reader.LocalName);
            string committerType = RmXmlSerializer.ReadXsiType(reader);

            this.committer = RmFactory.PartyProxy(committerType);

            this.committer.ReadXml(reader);

            Check.Assert(reader.LocalName == "time_committed",
                         "Expected LocalName is 'time_committed' not " + reader.LocalName);
            this.timeCommitted = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
            this.timeCommitted.ReadXml(reader);

            Check.Assert(reader.LocalName == "change_type",
                         "Expected LocalName is 'change_type' not " + reader.LocalName);
            this.changeType = new OpenEhr.RM.DataTypes.Text.DvCodedText();
            this.changeType.ReadXml(reader);

            if (reader.LocalName == "description")
            {
                string descriptionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);
                if (descriptionType == null)
                {
                    this.description = new OpenEhr.RM.DataTypes.Text.DvText();
                }
                else
                {
                    this.description = new OpenEhr.RM.DataTypes.Text.DvCodedText();
                }

                this.description.ReadXml(reader);
            }
        }
示例#15
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();
        }
示例#16
0
        protected virtual void ReadXmlBase(System.Xml.XmlReader reader)
        {
            Check.Assert(reader.LocalName == "system_id",
                "Expected LocalName is 'system_id' not " + reader.LocalName);
            this.systemId = reader.ReadElementString("system_id", RmXmlSerializer.OpenEhrNamespace);
            reader.MoveToContent();

            Check.Assert(reader.LocalName == "committer",
                "Expected LocalName is 'committer' not " + reader.LocalName);
            string committerType = RmXmlSerializer.ReadXsiType(reader);
            this.committer = RmFactory.PartyProxy(committerType);

            this.committer.ReadXml(reader);

            Check.Assert(reader.LocalName == "time_committed",
                "Expected LocalName is 'time_committed' not " + reader.LocalName);
            this.timeCommitted = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
            this.timeCommitted.ReadXml(reader);

            Check.Assert(reader.LocalName == "change_type",
                            "Expected LocalName is 'change_type' not " + reader.LocalName);
            this.changeType = new OpenEhr.RM.DataTypes.Text.DvCodedText();
            this.changeType.ReadXml(reader);

            if (reader.LocalName == "description")
            {
                string descriptionType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);
                if (descriptionType == null)
                    this.description = new OpenEhr.RM.DataTypes.Text.DvText();
                else
                    this.description = new OpenEhr.RM.DataTypes.Text.DvCodedText();

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

            Check.Assert(reader.LocalName == "function",
                "Expected LocalName is 'function' not " + reader.LocalName);
            string functionType = RmXmlSerializer.ReadXsiType(reader);
            if (!string.IsNullOrEmpty(functionType))
            {
                this.function = RmFactory.DataValue(functionType) as DataTypes.Text.DvText;
            }
            else
                this.function = new OpenEhr.RM.DataTypes.Text.DvText();
            this.function.ReadXml(reader);
            reader.MoveToContent();

            Check.Assert(reader.LocalName == "performer",
                "Expected LocalName is 'performer' not " + reader.LocalName);
            string performerType = RmXmlSerializer.ReadXsiType(reader);
            this.performer = RmFactory.PartyProxy(performerType);

            this.performer.ReadXml(reader);

            if (reader.LocalName == "time")
            {
                this.time = new OpenEhr.RM.DataTypes.Quantity.DvInterval<OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime>();
                this.time.ReadXml(reader);
            }

            Check.Assert(reader.LocalName == "mode", "Expected LocalName is 'mode' not " + reader.LocalName);
            this.mode = new OpenEhr.RM.DataTypes.Text.DvCodedText();
            this.mode.ReadXml(reader);

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