private Model.Statements TranslateLibrary(SQLTranslationContext context, String localName, Library library)
		{
			var result = new Model.Statements();

			if (!translatedLibraries.ContainsKey(library.Name))
			{
				context.StartArtifact(localName);
				try
				{
					// Libraries
					foreach (LibraryRef libraryRef in library.Libraries)
					{
						TranslateLibrary(context, libraryRef.Name, LibraryFactory.ResolveLibrary(libraryRef, null));
					}

					// TODO: CodeSystems
					// TODO: ValueSets
					// TODO: Parameters
				
					// ExpressionDefs
					foreach (ExpressionDef expressionDef in library.Expressions)
					{
						result.Add(TranslateExpressionDef(context, localName, expressionDef));
					}

					// TODO: Functions
				}
				finally
				{
					context.EndArtifact();
				}
			}

			return result;
		}
Example #2
0
        private Model.Statements TranslateLibrary(SQLTranslationContext context, String localName, Library library)
        {
            var result = new Model.Statements();

            if (!translatedLibraries.ContainsKey(library.Name))
            {
                context.StartArtifact(localName);
                try
                {
                    // Libraries
                    foreach (LibraryRef libraryRef in library.Libraries)
                    {
                        TranslateLibrary(context, libraryRef.Name, LibraryFactory.ResolveLibrary(libraryRef, null));
                    }

                    // TODO: CodeSystems
                    // TODO: ValueSets
                    // TODO: Parameters

                    // ExpressionDefs
                    foreach (ExpressionDef expressionDef in library.Expressions)
                    {
                        result.Add(TranslateExpressionDef(context, localName, expressionDef));
                    }

                    // TODO: Functions
                }
                finally
                {
                    context.EndArtifact();
                }
            }

            return(result);
        }