예제 #1
0
        public bool Equals(ObjectRef objectRef)
        {
            // If parameter is null return false:
            if ((object)objectRef == null)
            {
                return(false);
            }

            if (this.GetType() != objectRef.GetType())
            {
                return(false);
            }

            // Return true if the attribute values match
            if (!this.Id.Equals(objectRef.Id))
            {
                return(false);
            }

            if (!this.Namespace.Equals(objectRef.Namespace))
            {
                return(false);
            }

            return(this.Type.Equals(objectRef.Type));
        }
예제 #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
        public override bool Equals(object obj)
        {
            ObjectRef objectRef = obj as ObjectRef;

            if (objectRef == null)
            {
                return(false);
            }

            return(this.Equals(objectRef));
        }
예제 #4
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();
        }
예제 #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
파일: EHR.cs 프로젝트: nickvane/OpenEHR
        public EHR(string systemId, HierObjectId ehrId, DvDateTime timeCreated, ObjectRef ehrAccess, ObjectRef ehrStatus, 
            ObjectRef directory, List<ObjectRef> compositions, List<ObjectRef> contributions)
        {
            Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty");
            Check.Require(ehrId != null, "ehrId must not be null");
            Check.Require(timeCreated != null, "timeCreated must not be null");
            Check.Require(ehrAccess != null, "ehrAccess must not be null");
            Check.Require(ehrStatus != null, "ehrStatus must not be null");

            this.systemId = systemId;
            this.ehrId = ehrId;
            this.timeCreated = timeCreated;
            this.ehrAccess = ehrAccess;
            this.ehrStatus = ehrStatus;
            this.directory = directory;
            this.compositions = compositions;
            this.contributions = contributions;
        }
예제 #7
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();
        }
예제 #8
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();
        }
예제 #9
0
        public bool Equals(ObjectRef objectRef)
        {
            // If parameter is null return false:
            if ((object)objectRef == null)
                return false;

            if (this.GetType() != objectRef.GetType())
                return false;

            // Return true if the attribute values match
            if (!this.Id.Equals(objectRef.Id))
                return false;

            if (!this.Namespace.Equals(objectRef.Namespace))
                return false;

            return this.Type.Equals(objectRef.Type);
        }
예제 #10
0
 protected void RemoveVersion(ObjectVersionId uid, HierObjectId ehrId, string rmTypeName)
 {
     ObjectRef version = new ObjectRef(uid, ehrId.Value, rmTypeName);
     versions.Remove(version);
 }
예제 #11
0
파일: Folder.cs 프로젝트: nickvane/OpenEHR
        protected override void ReadXmlBase(System.Xml.XmlReader reader)
        {
            base.ReadXmlBase(reader);

            if (reader.NodeType == System.Xml.XmlNodeType.Element && reader.LocalName == "folders")
            {
                LocatableList<Folder> folders = new LocatableList<Folder>();
                do
                {
                    Folder folder = new Folder();

                    folder.ReadXml(reader);

                    folder.Parent = this;
                    folders.Add(folder);
                } while (reader.LocalName == "folders" && reader.NodeType == System.Xml.XmlNodeType.Element);

                this.folders = folders;
            }

            if (reader.LocalName == "items")
            {
                AssumedTypes.List<ObjectRef> items = new AssumedTypes.List<ObjectRef>();
                do
                {
                    ObjectRef item = new ObjectRef();

                    item.ReadXml(reader);
                    items.Add(item);
                } while (reader.LocalName == "items" && reader.NodeType == System.Xml.XmlNodeType.Element);

                this.items = items;
            }
        }