コード例 #1
0
ファイル: OasisAssert.cs プロジェクト: haboustak/XdsKit
 public static void Classification(Classification classification, string scheme, string objectId, string nodeId, string nodeRepresentation)
 {
     Assert.AreEqual(scheme ?? "", classification.ClassificationScheme ?? "");
     Assert.AreEqual(objectId ?? "", classification.ClassifiedObject ?? "");
     Assert.AreEqual(nodeId ?? "", classification.ClassificationNode ?? "");
     Assert.AreEqual(nodeRepresentation ?? "", classification.NodeRepresentation ?? "");
 }
コード例 #2
0
ファイル: Author.cs プロジェクト: haboustak/XdsKit
        // Telecom??
        public Classification ToClassification(string scheme, string parent)
        {
            var authorAttribute = new Classification
            {
                ClassificationScheme = scheme,
                ClassifiedObject = parent,
                ObjectType = ObjectType.Classification
            };

            if (Person != null)
            {
                authorAttribute.Slots.Add(new Slot
                {
                    Name = "authorPerson",
                    Values = new List<string> { Person.Hl7Person.Encode() }
                });
            }

            if (Institution != null && Institution.Any())
            {
                authorAttribute.Slots.Add(new Slot
                {
                    Name = "authorInstitution",
                    Values = Institution.Select(i => i.Hl7Organization.Encode()).ToList()
                });
            }

            if (Role!=null && Role.Any(r => !string.IsNullOrEmpty(r)))
            {
                authorAttribute.Slots.Add(new Slot
                {
                    Name = "authorRole",
                    Values = Role.Where(r => !string.IsNullOrEmpty(r)).ToList()
                });
            }

            if (Specialty != null && Specialty.Any(s => !string.IsNullOrEmpty(s)))
            {
                authorAttribute.Slots.Add(new Slot
                {
                    Name = "authorSpecialty",
                    Values = Specialty.Where(s => !string.IsNullOrEmpty(s)).ToList()
                });
            }
            return authorAttribute;
        }
コード例 #3
0
ファイル: Code.cs プロジェクト: haboustak/XdsKit
        public virtual Classification ToClassification(string parent)
        {
            var attribute = new Classification
            {
                ClassificationScheme = Scheme,
                ClassifiedObject = parent,
                ObjectType = ObjectType.Classification,
                NodeRepresentation = Value,
                Name = XmlUtil.LocalString(DisplayName)
            };
            if (!string.IsNullOrEmpty(CodeSystemId))
            {
                attribute.Slots.Add(new Slot
                {
                    Name = "codingScheme",
                    Values = new List<string>
                    {
                        CodeSystemId
                    }
                });
            }

            return attribute;
        }