Example #1
0
        public DvText(string value, OpenEhr.RM.DataTypes.Uri.DvUri hyperlink, string formatting,
            List<TermMapping> mappings, CodePhrase language, CodePhrase encoding)
            : this()
        {
            this.SetBaseData(value, hyperlink, formatting, mappings, language, encoding);

            this.CheckInvariants();
        }
Example #2
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;
        }
Example #3
0
        public DvCodedText(string value, OpenEhr.RM.DataTypes.Uri.DvUri hyperlink, string formatting,
            List<TermMapping> mappings, CodePhrase language, CodePhrase encoding, string codeString, 
            string terminologyId)
            : this()
        {
            this.SetBaseData(value, hyperlink, formatting, mappings, language, encoding);
            this.definingCode = new CodePhrase(codeString, terminologyId);

            this.CheckInvariants();
        }
Example #4
0
        internal override OpenEhr.Paths.AssertionContext Evaluate(OpenEhr.Paths.AssertionContext obj)
        {
            switch (this.ReferenceType.ToLower(System.Globalization.CultureInfo.InvariantCulture))
            {
                case "constraint":
                case "pattern":
                    return new OpenEhr.Paths.AssertionContext(this.Item, obj);
                case "path":
                    string path = this.item.ToString();
                    Path pathProcessor = new Path(path);
                    object objectAtPath = pathProcessor.ItemAtPath(obj.Data);
                    return new OpenEhr.Paths.AssertionContext(objectAtPath, obj);

                default:
                    throw new ApplicationException(string.Format(
                        AmValidationStrings.UnsupportedExprLeafReferenceType, this.ReferenceType));
            }
        }
Example #5
0
        protected void SetBaseData(string value, OpenEhr.RM.DataTypes.Uri.DvUri hyperlink, string formatting,
            List<TermMapping> mappings, CodePhrase language, CodePhrase encoding)
        {
            this.value = value;
            this.hyperlink = hyperlink;
            this.formatting = formatting;

            if (mappings != null && mappings.Count > 0)
            {
                if (this.mappings == null)
                    this.mappings = new OpenEhr.AssumedTypes.List<TermMapping>();
                foreach (TermMapping mapping in mappings)
                {
                    this.mappings.Add(mapping);
                }
            }
            this.language = language;
            this.encoding = encoding;
        }
Example #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="lang"></param>
 /// <returns></returns>
 public bool HasLang(OpenEhr.RM.DataTypes.Text.CodePhrase lang)
 {
     return CodesetData.HasLanguage(lang.CodeString);
 }
Example #7
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public bool HasCode(OpenEhr.RM.DataTypes.Text.CodePhrase code)
 {
     return CodesetData.HasCode(_name, code.CodeString);
 }
Example #8
0
 protected void SetBaseData(string name, List<DvIdentifier> identifiers,
     OpenEhr.RM.Support.Identification.PartyRef externalRef)
 {
     base.SetBaseData(externalRef);
     this.name = name;
     this.identifiers = identifiers;
 }
Example #9
0
 internal override OpenEhr.Paths.AssertionContext Evaluate(OpenEhr.Paths.AssertionContext contextObj)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Example #10
0
 protected Contact(string archetypeNodeId, DvText name, OpenEhr.RM.Demographic.Address[] addresses)
     : base(archetypeNodeId, name)
 {
     Addresses = new PathableList<Address>(this, addresses);
 }
        // LMT added 12 May 2010 for TMP-1252
        private static void WriteAnnotation(XmlWriter writer, string openEhrPrefix,
            OpenEhr.RM.Common.Resource.Annotation annotation)
        {
            writer.WriteStartElement(openEhrPrefix, "annotations", OpenEhrNamespace);
            writer.WriteAttributeString("path", annotation.Path);

            foreach (string key in annotation.Items.Keys)
            {
                writer.WriteStartElement(openEhrPrefix, "items", OpenEhrNamespace);
                writer.WriteAttributeString("id", key);
                writer.WriteElementString("value", annotation.Items.Item(key));
                writer.WriteEndElement();
            }
            writer.WriteEndElement();
        }
Example #12
0
 public Contact(string archetypeNodeId, DvText name, OpenEhr.RM.Demographic.Address[] addresses)
     : base(archetypeNodeId, name, addresses)
 {
 }
Example #13
0
        internal static void PopulateLocatableAttributes(CComplexObject cComplexObject, OpenEhr.RM.Common.Archetyped.Impl.Locatable locatable)
        {
            Check.Require(locatable != null, "locatable must not be null.");
            Check.Require(cComplexObject != null, "cComplexObject must not be null.");

            string codeString = null;

            if (string.IsNullOrEmpty(locatable.ArchetypeNodeId))
            {
                CArchetypeRoot archetypeRoot = cComplexObject as CArchetypeRoot;

                if (archetypeRoot != null)
                {
                    locatable.ArchetypeNodeId = archetypeRoot.ArchetypeId.Value;
                    codeString = cComplexObject.NodeId;
                }
                else
                {
                    locatable.ArchetypeNodeId = cComplexObject.NodeId;
                    codeString = cComplexObject.NodeId;
                }
            }

            if (locatable.Name == null || string.IsNullOrEmpty(locatable.Name.Value))
            {
                if (string.IsNullOrEmpty(codeString))
                    codeString = cComplexObject.NodeId;
                locatable.Name = new DvText(LocalTermDefText(codeString, cComplexObject));
            }

            Check.Ensure(!string.IsNullOrEmpty(locatable.ArchetypeNodeId), "ArchetypeId must not be null or empty.");
            Check.Ensure(locatable.Name != null && !string.IsNullOrEmpty(locatable.Name.Value), "name must not be null.");
        }
Example #14
0
 public PartySelf(OpenEhr.RM.Support.Identification.PartyRef externalRef)
     : this()
 {
     this.SetBaseData(externalRef);
 }
Example #15
0
 internal abstract OpenEhr.Paths.AssertionContext Evaluate(OpenEhr.Paths.AssertionContext contextObj);