示例#1
0
 protected CAttribute(string rmAttributeName, AssumedTypes.Interval<int> existence,
     AssumedTypes.List<CObject> children)
 {
     this.RmAttributeName = rmAttributeName;
     this.Existence = existence;
     this.Children = children;
 }
示例#2
0
 public CDvQuantity(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
     CAttribute parent, object assumedValue, List<CQuantityItem> list, CodePhrase property)
     : base(rmTypeName, nodeId, occurrences, parent, assumedValue)
 {
     this.List = list;
     this.Property = property;
 }
示例#3
0
 public CCodePhrase(TerminologyId terminologyId, List<string> codeList, string rmTypeName, string nodeId, 
     AssumedTypes.Interval<int> occurrences, CAttribute parent, object assumedValue)
     : base(rmTypeName, nodeId, occurrences, parent, assumedValue)
 {
     this.TerminologyId = terminologyId;
     this.CodeList = codeList;
 }
示例#4
0
 public ArchetypeSlot(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
   CAttribute parent, AssumedTypes.Set<Assertion.Assertion> includes, 
     AssumedTypes.Set<Assertion.Assertion> excludes)
     : base(rmTypeName, nodeId, occurrences, parent)
 {
     this.Includes = includes;
     this.Excludes = excludes;
 }
示例#5
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="items">The items in this history in most-recent-last order.</param>
 public RevisionHistory(AssumedTypes.List<RevisionHistoryItem> items)
 {
     DesignByContract.Check.Require(items!= null, "items must not be null.");
     // %HYYKA%
     // TODO: need to sort the order according to the spec
     //this.items = SortItemsInMostRecentLastOrder(items);
     this.items = items;
 }
示例#6
0
        public RevisionHistoryItem(AssumedTypes.List<AuditDetails> audits,
            OpenEhr.RM.Support.Identification.ObjectVersionId versionId)
        {
            Check.Require(versionId != null, "version_id must not be null");

            this.audits = audits;
            this.versionId = versionId;
        }
示例#7
0
 protected CObject(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences, 
     CAttribute parent)
 {
     this.RmTypeName = rmTypeName;
     this.Occurrences = occurrences;
     this.NodeId = nodeId;
     this.Parent = parent;
 }
示例#8
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="language">Language of translation</param>
 /// <param name="author">Translator name and other demographic details</param>
 /// <param name="accreditation">Accreditation of translator, usually a national translator’s association id</param>
 /// <param name="otherDetails">Any other meta-data</param>
 public TranslationDetails(CodePhrase language, AssumedTypes.Hash<string, string> author,
     string accreditation, AssumedTypes.Hash<string, string> otherDetails)
 {
     this.language = language;
     this.author = author;
     this.accreditation = accreditation;
     this.otherDetails = otherDetails;
 }
示例#9
0
 public FeederAudit(FeederAuditDetails originatingSystemAudit,
     AssumedTypes.List<DataTypes.Basic.DvIdentifier> originatingSystemItemIds,            
     DataTypes.Encapsulated.DvEncapsulated originalContent)
     : this()
 {
     Check.Require(originatingSystemAudit != null);
     this.originatingSystemAudit = originatingSystemAudit;
     this.originatingSystemItemIds = originatingSystemItemIds;
     this.originalContent = originalContent;
 }
示例#10
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="originalAuthor">Original author of this resource, with all relevant details, including organisation.</param>
 /// <param name="lifecycleState">Lifecycle state of the resource, typically including states such as: initial, submitted, experimental,
 /// awaiting_approval, approved, superseded, obsolete.</param>
 /// <param name="details">Details of all parts of resource description that are natural language-dependent, keyed by language code.</param>
 /// <param name="resourcePackageUri">URI of package to which this resource belongs.</param>
 /// <param name="otherContributors">Other contributors to the resource, probably listed in “name <email>” form.</param>
 /// <param name="otherDetails">Additional non language-senstive resource meta-data, as a list of name/value pairs.</param>
 /// <param name="parentResource">Reference to owning resource.</param>
 public ResourceDescription(AssumedTypes.Hash<string, string> originalAuthor, string lifecycleState,
     AssumedTypes.Hash<ResourceDescriptionItem, string> details, string resourcePackageUri, 
     AssumedTypes.List<string> otherContributors, AssumedTypes.Hash<string, string> otherDetails, 
     AuthoredResource parentResource)
     : this(originalAuthor, lifecycleState, details)
 {
     this.resourcePackageUri = resourcePackageUri;
     this.otherContributors = otherContributors;
     this.otherDetails = otherDetails;
     this.parentResource = parentResource;
 }
示例#11
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="originalAuthor">Original author of this resource, with all relevant details, including organisation.</param>
        /// <param name="lifecycleState">Lifecycle state of the resource, typically including states such as: initial, submitted, experimental,
        /// awaiting_approval, approved, superseded, obsolete.</param>
        /// <param name="details">Details of all parts of resource description that are natural language-dependent, keyed by language code.</param>
        public ResourceDescription(AssumedTypes.Hash<string, string> originalAuthor, string lifecycleState, 
            AssumedTypes.Hash<ResourceDescriptionItem, string> details)
        {
            Check.Require(originalAuthor!=null && !originalAuthor.IsEmpty(), "originalAuthor must not be null or empty.");
            Check.Require(!string.IsNullOrEmpty(lifecycleState), "lifecycleState must not be null or empty.");
            Check.Require(details!=null && !details.IsEmpty(), "details must not be null or empty.");

            this.originalAuthor = originalAuthor;
            this.lifecycleState = lifecycleState;
            this.details = details;
        }
示例#12
0
        protected AuthoredResource(CodePhrase originalLanguage, AssumedTypes.Hash<TranslationDetails, string> translations,
           ResourceDescription description, Generic.RevisionHistory revisionHistory, bool isControlled)
            : this(originalLanguage, revisionHistory, isControlled)
        {
            DesignByContract.Check.Require(translations == null ^
                (translations.Keys.Count>0 && !translations.HasKey(this.originalLanguage.CodeString)),
                "translations is not null means it must not be empty and it must not contains original language.");
            DesignByContract.Check.Require(translations == null ^ (description != null && translations != null),
               "if translations !=null, descriptions must not be null");

            this.translations = translations;
            this.description = description;
        }
示例#13
0
        protected Locatable(DvText name, string archetypeNodeId, Support.Identification.UidBasedId uid,
            AssumedTypes.List<Link> links, Archetyped archetypeDetails, FeederAudit feederAudit)
            : this()
        {
            Check.Require(name != null, "name must not be null");
            Check.Require(!string.IsNullOrEmpty(archetypeNodeId), "archetype_node_id must not be null or empty");

            this.name = name;
            this.archetypeNodeId = archetypeNodeId;
            this.uid = uid;
            this.links = links;
            this.archetypeDetails = archetypeDetails;
            this.feederAudit = feederAudit;
        }
示例#14
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();
        }
示例#15
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="language">The localised language in which the items in this description item are written. Coded from
        /// openEHR Code Set “languages”.</param>
        /// <param name="purpose">Purpose of the resource.</param>
        /// <param name="keywords">Keywords which characterise this resource, used e.g. for indexing and searching.</param>
        /// <param name="use">Description of the uses of the resource, i.e. contexts in which it could be used.</param>
        /// <param name="misuse">Description of any misuses of the resource, i.e. contexts in which it should not be used.</param>
        /// <param name="copyright">Optional copyright statement for the resource as a knowledge resource.</param>
        /// <param name="originalResourceUri">URIs of original clinical document(s) or description of which resource is a formalisation,
        /// in the language of this description item; keyed by meaning.</param>
        /// <param name="otherDetails">Additional language-senstive resource metadata, as a list of name/value pairs.</param>
        public ResourceDescriptionItem(CodePhrase language, string purpose, AssumedTypes.List<string> keywords,
            string use, string misuse, string copyright, AssumedTypes.Hash<string, string> originalResourceUri,
            AssumedTypes.Hash<string, string> otherDetails)
            : this(language, purpose)
        {
            Check.Require(use == null || use != string.Empty, "if use is not null, it must not be empty");
            Check.Require(misuse == null || misuse != string.Empty, "if misuse is not null, it must not be empty");
            Check.Require(copyright == null || copyright != string.Empty, "if copyright is not null, it must not be empty");

            this.language = language;
            this.purpose = purpose;
            this.purpose = purpose;
            this.keywords = keywords;
            this.use = use;
            this.misuse = misuse;
            this.copyright = copyright;
            this.originalResourceUri = originalResourceUri;
            this.otherDetails = otherDetails;
        }
示例#16
0
 protected CDomainType(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
     CAttribute parent, object assumedValue)
     : base(rmTypeName, nodeId, occurrences, parent, assumedValue)
 {
 }
示例#17
0
 public Cardinality(bool isOrdered, bool isUnique, AssumedTypes.Interval<int> interval)
 {
     this.IsOrdered = isOrdered;
     this.IsUnique = isUnique;
     this.Interval = interval;
 }
示例#18
0
        private void ReadXml(AssumedTypes.Interval<Iso8601Duration> interval)
        {
            Check.Require(interval != null, "interval must not be null.");

            reader.ReadStartElement();
            reader.MoveToContent();

            if (reader.LocalName == "lower_included")
            {
                interval.LowerIncluded = reader.ReadElementContentAsBoolean("lower_included", OpenEhrNamespace);
                reader.MoveToContent();
            }

            if (reader.LocalName == "upper_included")
            {
                interval.UpperIncluded = reader.ReadElementContentAsBoolean("upper_included", OpenEhrNamespace);
                reader.MoveToContent();
            }

            if (reader.LocalName != "lower_unbounded")
                throw new ValidationException("expected node name is 'lower_unbounded', not " + reader.LocalName);
            interval.LowerUnbounded = reader.ReadElementContentAsBoolean("lower_unbounded", OpenEhrNamespace);
            reader.MoveToContent();

            if (reader.LocalName != "upper_unbounded")
                throw new ValidationException("expected node name is 'upper_unbounded', not " + reader.LocalName);
            interval.UpperUnbounded = reader.ReadElementContentAsBoolean("upper_unbounded", OpenEhrNamespace);
            reader.MoveToContent();

            if (reader.LocalName == "lower")
            {
                interval.Lower = new Iso8601Duration(reader.ReadElementContentAsString("lower", OpenEhrNamespace));
                reader.MoveToContent();
            }

            if (reader.LocalName == "upper")
            {
                interval.Upper = new Iso8601Duration(reader.ReadElementContentAsString("upper", OpenEhrNamespace));
                reader.MoveToContent();
            }

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

            reader.MoveToContent();
        }
示例#19
0
 public void ReadExistence(XmlReader reader, AssumedTypes.Interval<int> interval)
 {
     this.reader = reader;
     ReadXml(interval);
 }
示例#20
0
 public ArchetypeInternalRef(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
   CAttribute parent, string targetPath)
     : base(rmTypeName, nodeId, occurrences, parent)
 {
     this.TargetPath = targetPath;
 }
示例#21
0
 protected CDefinedObject(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences, 
     CAttribute parent, object assumedValue)
     : base(rmTypeName, nodeId, occurrences, parent)
 {
     this.AssumedValue = assumedValue;
 }
示例#22
0
 public CDvOrdinal(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
     CAttribute parent, object assumedValue, Set<DvOrdinal> list)
     : base(rmTypeName, nodeId, occurrences, parent, assumedValue)
 {
     this.List = list;
 }
示例#23
0
 public void WriteExistence(XmlWriter writer, AssumedTypes.Interval<int> interval)
 {
     this.writer = writer;
     WriteXml(interval);
 }
示例#24
0
 public CComplexObject(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences, 
     CAttribute parent, object assumedValue, AssumedTypes.Set<CAttribute> attributes)
     : base(rmTypeName, nodeId, occurrences, parent, assumedValue)
 {
     this.Attributes = attributes;
 }
示例#25
0
 public ArchetypeTerm(string aCode, AssumedTypes.Hash<string, string> items)
 {
     this.Code = aCode;
     this.Items = items;
 }
示例#26
0
 public ConstraintRef(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
   CAttribute parent, string reference)
     : base(rmTypeName, nodeId, occurrences, parent)
 {
     this.Reference = Reference;
 }
示例#27
0
        private object GetAttributeObject(string attributeName, AssumedTypes.IList list)
        {
            if (list == null || list.Count == 0)
                return null;

            AssumedTypes.List<object> attrObjects = new OpenEhr.AssumedTypes.List<object>();
            foreach (object obj in list)
            {
                object attributeObj = CallGetAttributeObject(attributeName, obj);
                if (attributeObj != null)
                    attrObjects.Add(attributeObj);
            }

            if (attrObjects.Count > 1)
                return attrObjects;
            if (attrObjects.Count == 1)
                return attrObjects[0];

            return null;
        }
示例#28
0
 protected CReferenceObject(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
   CAttribute parent)
     : base(rmTypeName, nodeId, occurrences, parent)
 {
 }
示例#29
0
 public CPrimitiveObject(string rmTypeName, string nodeId, AssumedTypes.Interval<int> occurrences,
     CAttribute parent, object assumedValue)
     : base(rmTypeName, nodeId, occurrences, parent, assumedValue)
 {
 }
示例#30
0
        private void WriteXml(AssumedTypes.Interval<Iso8601Duration> interval)
        {
            Check.Require(interval != null, string.Format(CommonStrings.XMustNotBeNull, "interval"));

            string openEhrPrefix = UseOpenEhrPrefix(writer);
            if (interval.lowerIncludedSet)
                writer.WriteElementString(openEhrPrefix, "lower_included", OpenEhrNamespace, interval.LowerIncluded.ToString().ToLower());

            if (interval.upperIncludedSet)
                writer.WriteElementString(openEhrPrefix, "upper_included", OpenEhrNamespace, interval.UpperIncluded.ToString().ToLower());

            writer.WriteElementString(openEhrPrefix, "lower_unbounded", OpenEhrNamespace, interval.LowerUnbounded.ToString().ToLower());
            writer.WriteElementString(openEhrPrefix, "upper_unbounded", OpenEhrNamespace, interval.UpperUnbounded.ToString().ToLower());

            if (!interval.LowerUnbounded)
                writer.WriteElementString(openEhrPrefix, "lower", OpenEhrNamespace, interval.Lower.ToString());

            if (!interval.UpperUnbounded)
                writer.WriteElementString(openEhrPrefix, "upper", OpenEhrNamespace, interval.Upper.ToString());
        }