Exemple #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();
        }
Exemple #2
0
        public Activity(DvText name, string archetypeNodeId, UidBasedId uid,
                        Link[] links, Archetyped archetypeDetails, FeederAudit feederAudit,
                        ItemStructure description, DvParsable timing, string actionArchetypeId)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit)
        {
            Check.Require(description != null, "description must not be null");
            Check.Require(timing != null, "timing must not be null");
            Check.Require(!string.IsNullOrEmpty(actionArchetypeId), "action_archetype_id must not be null or empty");

            this.description        = description;
            this.description.Parent = this;
            this.timing             = timing;
            this.actionArchetypeId  = actionArchetypeId;

            SetAttributeDictionary();
            CheckInvariants();
        }
Exemple #3
0
        public Folder(DvText name, string archetypeNodeId, UidBasedId uid,
                      List <Link> links, Archetyped.Impl.Archetyped archetypeDetails, FeederAudit feederAudit,
                      List <Folder> folders, List <ObjectRef> items)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit)
        {
            LocatableList <Folder> locatableList = folders as LocatableList <Folder>;

            // LocatableList can not be constructed without a parent, hence will not have a parent of this object is it is yet to be constructed
            Check.Require(locatableList == null, "folders must not be of type LocatableList with another parent");

            if (folders != null)
            {
                this.folders = RmFactory.List <Folder>(this, folders) as LocatableList <Folder>;
            }
            this.items = items;

            SetAttributeDictionary();
        }
Exemple #4
0
        public Folder(DvText name, string archetypeNodeId, UidBasedId uid,
                      List <Link> links,
                      Archetyped.Impl.Archetyped archetypeDetails, FeederAudit feederAudit,
                      System.Collections.Generic.IEnumerable <Folder> folders,
                      System.Collections.Generic.IEnumerable <ObjectRef> items)
            : base(name, archetypeNodeId, uid, links, archetypeDetails, feederAudit)
        {
            if (folders != null)
            {
                this.folders = RmFactory.List <Folder>(this, folders) as LocatableList <Folder>;
            }
            if (items != null)
            {
                this.items = new List <ObjectRef>(items);
            }

            SetAttributeDictionary();
        }
Exemple #5
0
        public Evaluation(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, ItemStructure data)
            : 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;
            }

            SetAttributeDictionary();
            CheckInvariants();
        }
Exemple #6
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();
        }
Exemple #7
0
        protected virtual void ReadXmlBase(System.Xml.XmlReader reader)
        {
            Check.Assert(reader.LocalName == "name", "Expected LocalName is 'name' rather than " + reader.LocalName);

            // %HYYKA%
            // CM: 12/11/09 need to take into account prefix
            //string nameType = reader.GetAttribute("type", XmlSerializer.XsiNamespace);
            string nameType = RmXmlSerializer.ReadXsiType(reader);

            if (nameType != null && nameType == "DV_CODED_TEXT")
            {
                this.name = new DvCodedText();
            }
            else
            {
                this.name = new DvText();
            }
            this.name.ReadXml(reader);

            if (reader.LocalName == "uid")
            {
                string uidType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace);
                int    i       = uidType.IndexOf(":");
                if (i > 0)
                {
                    uidType = uidType.Substring(i + 1);
                }
                if (uidType == "OBJECT_VERSION_ID")
                {
                    this.uid = new ObjectVersionId();
                }
                else if (uidType == "HIER_OBJECT_ID")
                {
                    this.uid = new HierObjectId();
                }

                this.uid.ReadXml(reader);
            }
            if (reader.LocalName == "links")
            {
                this.links = new OpenEhr.AssumedTypes.List <Link>();
                do
                {
                    Link aLink = new Link();
                    aLink.ReadXml(reader);
                    this.links.Add(aLink);
                } while (reader.LocalName == "links" && reader.NodeType == System.Xml.XmlNodeType.Element);
            }

            if (reader.LocalName == "archetype_details")
            {
                this.archetypeDetails = new Archetyped();
                this.archetypeDetails.ReadXml(reader);
            }

            if (reader.LocalName == "feeder_audit")
            {
                this.feederAudit = new FeederAudit();
                this.feederAudit.ReadXml(reader);
            }
        }