コード例 #1
0
ファイル: DvText.cs プロジェクト: nickvane/OpenEHR
        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();
        }
コード例 #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;
        }
コード例 #3
0
ファイル: DvCodedText.cs プロジェクト: nickvane/OpenEHR
        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();
        }
コード例 #4
0
ファイル: ExprLeaf.cs プロジェクト: nickvane/OpenEHR
        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));
            }
        }
コード例 #5
0
ファイル: DvText.cs プロジェクト: nickvane/OpenEHR
        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;
        }
コード例 #6
0
ファイル: CodeSetAccess.cs プロジェクト: nickvane/OpenEHR
 /// <summary>
 /// 
 /// </summary>
 /// <param name="lang"></param>
 /// <returns></returns>
 public bool HasLang(OpenEhr.RM.DataTypes.Text.CodePhrase lang)
 {
     return CodesetData.HasLanguage(lang.CodeString);
 }
コード例 #7
0
ファイル: CodeSetAccess.cs プロジェクト: nickvane/OpenEHR
 /// <summary>
 /// 
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public bool HasCode(OpenEhr.RM.DataTypes.Text.CodePhrase code)
 {
     return CodesetData.HasCode(_name, code.CodeString);
 }
コード例 #8
0
ファイル: PartyIdentified.cs プロジェクト: nickvane/OpenEHR
 protected void SetBaseData(string name, List<DvIdentifier> identifiers,
     OpenEhr.RM.Support.Identification.PartyRef externalRef)
 {
     base.SetBaseData(externalRef);
     this.name = name;
     this.identifiers = identifiers;
 }
コード例 #9
0
ファイル: ExprUnaryOperator.cs プロジェクト: nickvane/OpenEHR
 internal override OpenEhr.Paths.AssertionContext Evaluate(OpenEhr.Paths.AssertionContext contextObj)
 {
     throw new Exception("The method or operation is not implemented.");
 }
コード例 #10
0
ファイル: Contact.cs プロジェクト: nickvane/OpenEHR
 protected Contact(string archetypeNodeId, DvText name, OpenEhr.RM.Demographic.Address[] addresses)
     : base(archetypeNodeId, name)
 {
     Addresses = new PathableList<Address>(this, addresses);
 }
コード例 #11
0
        // 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();
        }
コード例 #12
0
ファイル: Contact.cs プロジェクト: nickvane/OpenEHR
 public Contact(string archetypeNodeId, DvText name, OpenEhr.RM.Demographic.Address[] addresses)
     : base(archetypeNodeId, name, addresses)
 {
 }
コード例 #13
0
ファイル: ValidationUtility.cs プロジェクト: nickvane/OpenEHR
        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.");
        }
コード例 #14
0
ファイル: PartySelf.cs プロジェクト: nickvane/OpenEHR
 public PartySelf(OpenEhr.RM.Support.Identification.PartyRef externalRef)
     : this()
 {
     this.SetBaseData(externalRef);
 }
コード例 #15
0
ファイル: ExprItem.cs プロジェクト: nickvane/OpenEHR
 internal abstract OpenEhr.Paths.AssertionContext Evaluate(OpenEhr.Paths.AssertionContext contextObj);