Esempio n. 1
0
 public void GetWordsTest()
 {
     string[] words = SharedHelper.GetWords("valueCodeableConcept");
     Assert.AreEqual(3, words.Length);
     Assert.AreEqual("value", words[0]);
     Assert.AreEqual("Codeable", words[1]);
     Assert.AreEqual("Concept", words[2]);
 }
Esempio n. 2
0
        public void FindCommonWordTest_Found()
        {
            List <string[]> words = new List <string[]>();

            words.Add(SharedHelper.GetWords("valueCodeableConcept"));
            words.Add(SharedHelper.GetWords("valueString"));
            words.Add(SharedHelper.GetWords("valueCoding"));
            words.Add(SharedHelper.GetWords("valueReference"));

            string actual = SharedHelper.FindCommonWord(words);

            Assert.AreEqual("value", actual);
        }
Esempio n. 3
0
        private void AddValuesetListTable()
        {
            string[] headers = new string[] { "Name", "OID", "URL" };
            Table    t       = this.tables.AddTable("Value Sets", headers);

            foreach (ValueSet cValueSet in this.appendixValueSets.Keys.OrderBy(y => y.Name))
            {
                string         valueSetIdentifier = cValueSet.GetIdentifier(this.igTypePlugin);
                string         cAnchor            = Helper.GetCleanName(cValueSet.Name, 39);
                OpenXmlElement urlRun             = DocHelper.CreateRun("N/A");

                if (!string.IsNullOrEmpty(cValueSet.Source))
                {
                    urlRun = this.hyperlinkTracker.CreateUrlHyperlink(this.mainPart, cValueSet.Source, cValueSet.Source, Properties.Settings.Default.TableLinkStyle);
                }

                TableRow newRow = new TableRow(
                    new TableCell(
                        new Paragraph(
                            new ParagraphProperties(
                                new ParagraphStyleId()
                {
                    Val = Properties.Settings.Default.TableContentStyle
                }),
                            this.hyperlinkTracker.CreateHyperlink(cValueSet.Name, cAnchor, Properties.Settings.Default.TableLinkStyle))),
                    new TableCell(
                        new Paragraph(
                            new ParagraphProperties(
                                new ParagraphStyleId()
                {
                    Val = Properties.Settings.Default.TableContentStyle
                }),
                            DocHelper.CreateRun(valueSetIdentifier))),
                    new TableCell(
                        new Paragraph(
                            new ParagraphProperties(
                                new ParagraphStyleId()
                {
                    Val = Properties.Settings.Default.TableContentStyle
                }),
                            urlRun)));
                t.Append(newRow);
            }
        }
Esempio n. 4
0
 public string GetValueSetBookmark(ValueSet valueSet)
 {
     return(Helper.GetCleanName(valueSet.Name, 39));
 }