Class Program
FHIR CodeGen CLI.
Inheritance
Namespace: FhirCodegenCli
Assembly: fhir-codegen-cli.dll
Syntax
public static class Program : object
Methods
| Improve this Doc View SourceFindRelativeDir(String, String, String, Boolean)
Searches for the FHIR specification directory.
Declaration
public static string FindRelativeDir(string startingDir, string dirName, string directoryType, bool thowIfNotFound = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | startingDir | The starting dir. |
| System.String | dirName | The name of the directory we are searching for. |
| System.String | directoryType | The directory type (error hint). |
| System.Boolean | thowIfNotFound | (Optional) True to thow if not found. |
Returns
| Type | Description |
|---|---|
| System.String | The found FHIR directory. |
Main(String[])
Main entry-point for this application.
Declaration
public static async Task<int> Main(string[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | args | An array of command-line argument strings. |
Returns
| Type | Description |
|---|---|
| Task<System.Int32> | An asynchronous result that yields exit-code for the process - 0 for success, else an error code. |
ParseHttpHeaders(String)
Parse HTTP headers.
Declaration
public static Dictionary<string, IEnumerable<string>> ParseHttpHeaders(string headersArg)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | headersArg | The headers argument. |
Returns
| Type | Description |
|---|---|
| Dictionary<System.String, IEnumerable<System.String>> | A Dictionary<string,IEnumerable<string>>. |
Process(String, Boolean, Boolean, String, String, String, String, String, String, String, String, Boolean, String, String, Boolean, Boolean, String, String, Boolean, String, String, String, String, Boolean)
Command-line utility for processing the FHIR specification into other computer languages.
Declaration
public static int Process(string outputPath = "", bool verbose = false, bool offlineMode = false, string language = "", string exportKeys = "", string loadR2 = "", string loadR3 = "", string loadR4 = "", string loadR4B = "", string loadR5 = "", string languageOptions = "", bool officialExpansionsOnly = false, string fhirServerUrl = "", string fhirServerHeaders = "", bool resolveExternal = true, bool includeExperimental = false, string exportTypes = "", string extensionSupport = "", bool languageHelp = false, string packageDirectory = "", string packages = "", string ciBranch = "", string languageInputDir = "", bool showHelp = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | outputPath | File or directory to write output. |
| System.Boolean | verbose | Show verbose output. |
| System.Boolean | offlineMode | Offline mode (will not download missing specs). |
| System.String | language |
Info|TypeScript|CSharpBasic). |
| System.String | exportKeys | '|' separated list of items to export (not present to export everything). |
| System.String | loadR2 |
or latest). |
| System.String | loadR3 |
or latest). |
| System.String | loadR4 |
or latest). |
| System.String | loadR4B |
or latest). |
| System.String | loadR5 |
or latest). |
| System.String | languageOptions | Language specific options, see documentation for more details. Example: Lang1|opt=a|opt2=b|Lang2|opt=tt|opt3=oo. |
| System.Boolean | officialExpansionsOnly | True to restrict value-sets exported to only official expansions (default: false). |
| System.String | fhirServerUrl | FHIR Server URL to pull a CapabilityStatement (or Conformance) from. Requires application/fhir+json. |
| System.String | fhirServerHeaders | Headers to include when calling a FHIR server, format is key=value|key=value|... |
| System.Boolean | resolveExternal | Whether or not to try to resolve unknown canonicals at the given fhir server url. |
| System.Boolean | includeExperimental | If the output should include structures marked experimental (false|true). |
| System.String | exportTypes | Which FHIR classes types to export (primitive|complex|resource|interaction|enum), default is all. |
| System.String | extensionSupport | The level of extensions to include (none|official|officialNonPrimitive|nonPrimitive|all), default is nonPrimitive. |
| System.Boolean | languageHelp | Display languages and their options. |
| System.String | packageDirectory | The full path to a local directory for FHIR packages; e.g., profiles. (.../fhirPackages)). |
| System.String | packages |
(e.g., hl7.fhir.r4.core#4.0.1, hl7.fhir.us.core#latest). |
| System.String | ciBranch | If loading from the CI server, the name of the branch to use. |
| System.String | languageInputDir | The full path to a local directory to pass additional content to languages. |
| System.Boolean | showHelp | Show command-line help. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Exit-code for the process - 0 for success, else an error code. |