Exemplo n.º 1
0
        public ResourcesMaker(FileCleaner fc,
                              String resourceDir,
                              String pageDir,
                              String cacheDir)
        {
            const String fcn = "ResourcesMaker";

            Self = this;

            this.fc          = fc;
            this.resourceDir = resourceDir;
            this.pageDir     = pageDir;

            if (Directory.Exists(this.resourceDir) == false)
            {
                Directory.CreateDirectory(this.resourceDir);
            }

            if (Directory.Exists(this.pageDir) == false)
            {
                Directory.CreateDirectory(this.pageDir);
            }

            if (FhirStructureDefinitions.Self == null)
            {
                this.ConversionInfo(this.GetType().Name, fcn, $"Init'g 'FhirStructureDefinitions'");
                FhirStructureDefinitions.Create(cacheDir);
            }
        }
Exemplo n.º 2
0
        public DirectFhirGenerator()
        {
            String sDefsPath = Path.Combine(this.OutputDir, "StructureDefinitions.json");
            String specPath  = Path.GetFullPath("specification.zip");

            sDefs      = new FhirStructureDefinitions();
            this.items = new Dictionary <string, SDefInfo>();
        }
Exemplo n.º 3
0
        public PreFhirGenerator(FileCleaner fc, String cacheDir)
        {
            const String fcn = "PreFhirGenerator";

            this.fc = fc;
            if (FhirStructureDefinitions.Self == null)
            {
                this.ConversionInfo(this.GetType().Name, fcn, $"Init'g 'FhirStructureDefinitions'");
                FhirStructureDefinitions.Create(Path.Combine(cacheDir, "DefinitionCache"));
            }
        }
Exemplo n.º 4
0
        private FhirStructureDefinitions(String bundleDir)
        {
            this.bundleDir = bundleDir;
            if (Directory.Exists(bundleDir) == false)
            {
                Directory.CreateDirectory(bundleDir);
            }

            String specPath = Path.GetFullPath("specification.zip");

            if (File.Exists(specPath) == false)
            {
                throw new Exception($"Missing {specPath}");
            }
            this.source = new ZipSource(specPath);
            FhirStructureDefinitions.Self = this;
        }
Exemplo n.º 5
0
        public void Dump()
        {
            String baseDir = DirHelper.FindParentDir("BreastRadiology.XUnitTests");
            String rDir    = Path.Combine(baseDir, "Resources");
            String path    = Path.Combine(rDir, "Template.html");

            String cacheDir = Path.Combine(baseDir, "Cache");

            FhirStructureDefinitions.Create(cacheDir);

            CodeEditor ce = new CodeEditor();

            ce.Load(path);
            CodeBlockNested b = ce.Blocks.Find("Body");

            this.Dump(b);
            ce.Save(Path.Combine(DirHelper.FindParentDir(BaseDirName), "IG", "Content", "Dump.html"));
        }
Exemplo n.º 6
0
 public static void Create(String bundleDir) => Self = new FhirStructureDefinitions(bundleDir);
Exemplo n.º 7
0
 public MakerGen(String outputDir)
 {
     this.outputDir = outputDir;
     sDefs          = new FhirStructureDefinitions();
 }