Class FromFhirExpando
Load models from a core package. This class cannot be inherited.
Inheritance
Implements
Namespace: Microsoft.Health.Fhir.SpecManager.Converters
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public sealed class FromFhirExpando : object, IFhirConverter
Constructors
| Improve this Doc View SourceFromFhirExpando()
Initializes a new instance of the From
Declaration
public FromFhirExpando()
Methods
| Improve this Doc View SourceProcessMetadata(Object, out FhirCapabiltyStatement, String, IPackageImportable, SmartConfiguration)
Process a FHIR capabilities resource (CapabilityStatement or Conformance).
Declaration
public static void ProcessMetadata(object metadata, out FhirCapabiltyStatement capabilityStatement, string serverUrl = "", IPackageImportable info = null, SmartConfiguration smartConfig = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
metadata | The metadata resource object (e.g., r4.CapabilitiesStatement). |
Fhir |
capabilityStatement | [out] The capability statement. |
System. |
serverUrl | (Optional) URL of the server. |
IPackage |
info | (Optional) The information. |
Smart |
smartConfig | (Optional) The smart configuration. |
ProcessMetadata(Object, String, SmartConfiguration, out FhirCapabiltyStatement)
Process a FHIR metadata resource into Server Information.
Declaration
public void ProcessMetadata(object metadata, string serverUrl, SmartConfiguration smartConfig, out FhirCapabiltyStatement capabilities)
Parameters
Type | Name | Description |
---|---|---|
System. |
metadata | The metadata resource object (e.g., r4.CapabilitiesStatement). |
System. |
serverUrl | URL of the server. |
Smart |
smartConfig | The smart configuration. |
Fhir |
capabilities | [out] Information describing the server. |
ProcessResource(Object, IPackageImportable)
Attempts to process resource.
Declaration
public void ProcessResource(object resourceToParse, IPackageImportable fhirVersionInfo)
Parameters
Type | Name | Description |
---|---|---|
System. |
resourceToParse | The resource object. |
IPackage |
fhirVersionInfo | Information describing the FHIR version. |
ProcessResource(Object, IPackageImportable, out String, out FhirArtifactClassEnum)
Attempts to process resource.
Declaration
public void ProcessResource(object resourceToParse, IPackageImportable fhirVersionInfo, out string resourceCanonical, out FhirArtifactClassEnum artifactClass)
Parameters
Type | Name | Description |
---|---|---|
System. |
resourceToParse | The resource object. |
IPackage |
fhirVersionInfo | Information describing the FHIR version. |
System. |
resourceCanonical | Canonical URL of the processed resource, or string.Empty if not processed. |
Fhir |
artifactClass | Class of the resource parsed |
ReplaceValue(Object, String[], Object)
Replace a value in a parsed but not-yet processed resource
Declaration
public void ReplaceValue(object resource, string[] path, object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
resource | |
System. |
path | |
System. |
value |
Explicit Interface Implementations
| Improve this Doc View SourceIFhirConverter.DisplayIssues()
Displays the issues.
Declaration
void IFhirConverter.DisplayIssues()
IFhirConverter.HasIssues(out Int32, out Int32)
Query if 'errorCount' has issues.
Declaration
bool IFhirConverter.HasIssues(out int errorCount, out int warningCount)
Parameters
Type | Name | Description |
---|---|---|
System. |
errorCount | [out] Number of errors. |
System. |
warningCount | [out] Number of warnings. |
Returns
Type | Description |
---|---|
System. |
True if issues, false if not. |
IFhirConverter.TryGetFirstFromBundle(String, out Object, out String)
Attempts to get the first resource from a bundle.
Declaration
bool IFhirConverter.TryGetFirstFromBundle(string json, out object resource, out string resourceType)
Parameters
Type | Name | Description |
---|---|---|
System. |
json | The JSON. |
System. |
resource | [out]. |
System. |
resourceType | [out] Type of the resource. |
Returns
Type | Description |
---|---|
System. |
True if it succeeds, false if it fails. |
IFhirConverter.TryParseResource(String, out Object, out String)
Try to parse a resource object from the given string.
Declaration
bool IFhirConverter.TryParseResource(string json, out object resource, out string resourceType)
Parameters
Type | Name | Description |
---|---|---|
System. |
json | The JSON. |
System. |
resource | [out]. |
System. |
resourceType | [out] Type of the resource. |
Returns
Type | Description |
---|---|
System. |
A typed Resource object. |