Beispiel #1
0
 public TemplateConstraintTable(IGSettingsManager igSettings, List <Template> templates, TableCollection tables, List <string> selectedCategories)
 {
     this.igSettings         = igSettings;
     this.templates          = templates;
     this.tables             = tables;
     this.selectedCategories = selectedCategories;
 }
Beispiel #2
0
        public CodeSystemTable(IObjectRepository tdb, Body documentBody, List <Template> templates, TableCollection tables)
        {
            this.tdb          = tdb;
            this.documentBody = documentBody;
            this.templates    = templates;
            this.tables       = tables;

            this.codeSystems = (from t1 in this.templates
                                join tc in this.tdb.TemplateConstraints on t1.Id equals tc.TemplateId
                                where tc.CodeSystemId != null
                                select tc.CodeSystem).Union(
                (from t2 in this.templates
                 join tc in this.tdb.TemplateConstraints on t2.Id equals tc.TemplateId
                 join vs in this.tdb.ValueSets on tc.ValueSetId equals vs.Id
                 join vsm in this.tdb.ValueSetMembers on vs.Id equals vsm.ValueSetId
                 select vsm.CodeSystem))
                               .Distinct()
                               .OrderBy(y => y.Name);
        }
        public static void AddTable(IObjectRepository tdb, TableCollection tables, Body documentBody, Template template, List <Template> exportedTemplates)
        {
            TemplateContextTable cot = new TemplateContextTable(tdb, tables, documentBody, template, exportedTemplates);

            cot.AddTemplateContextTable();
        }
Beispiel #4
0
        public void BuildImplementationGuide(ExportSettings aModel)
        {
            this._exportSettings = aModel;

            this._docStream = new MemoryStream();
            this._document  = WordprocessingDocument.Create(this._docStream, WordprocessingDocumentType.Document);
            this._document.AddMainDocumentPart();

            this.SetupStyles();

            this._document.MainDocumentPart.Document =
                new Document(
                    new Body());

            this.tables = new TableCollection(this._document.MainDocumentPart.Document.Body);
            this.constraintTableGenerator = new TemplateConstraintTable(this._settings, this._templates, this.tables, _exportSettings.SelectedCategories);
            this.figures = new FigureCollection(this._document.MainDocumentPart.Document.Body);
            this.valueSetsExport
                = new ValueSetsExport(
                      this._document.MainDocumentPart,
                      this.tables,
                      _exportSettings.GenerateValueSetAppendix,
                      _exportSettings.DefaultValueSetMaxMembers,
                      _exportSettings.ValueSetMaxMembers);
            this.wikiParser      = new WIKIParser(this._tdb, this._document.MainDocumentPart);
            this.codeSystemTable = new CodeSystemTable(this._tdb, this._document.MainDocumentPart.Document.Body, this._templates, this.tables);

            this.AddTitlePage();

            this.AddTableOfContents();

            this.AddTemplates();

            if (_exportSettings.GenerateDocTemplateListTable || _exportSettings.GenerateDocContainmentTable)
            {
                Paragraph entryLevelHeading = new Paragraph(
                    new ParagraphProperties(
                        new ParagraphStyleId()
                {
                    Val = Properties.Settings.Default.TemplateTypeHeadingStyle
                }),
                    new Run(
                        new Text("Template Ids in This Guide")));
                this._document.MainDocumentPart.Document.Body.AppendChild(entryLevelHeading);

                if (_exportSettings.GenerateDocTemplateListTable)
                {
                    // Add used template table
                    this.AddDocumentTemplateListTable();
                }

                if (_exportSettings.GenerateDocContainmentTable)
                {
                    TemplateContainmentGenerator.AddTable(this._tdb, this._document, this._templates, this.tables);
                }
            }

            this.valueSetsExport.AddValueSetsAppendix();

            this.codeSystemTable.AddCodeSystemAppendix();

            this.AddRetiredTemplatesAppendix();

            if (_exportSettings.IncludeChangeList)
            {
                this.LoadChangesAppendix();
            }
        }