Class FhirConstraint
A FHIR constraint.
Inheritance
Namespace: Microsoft.Health.Fhir.CodeGenCommon.Models
Assembly: Microsoft.Health.Fhir.CodeGenCommon.dll
Syntax
public class FhirConstraint : ICloneable
Constructors
| Improve this Doc View SourceFhirConstraint(FhirConstraint)
Initializes a new instance of the FhirConstraint class.
Declaration
public FhirConstraint(FhirConstraint source)
Parameters
| Type | Name | Description |
|---|---|---|
| FhirConstraint | source | Source for the. |
FhirConstraint(String, String, String, Nullable<Boolean>, String, String, String, Boolean, String, String, String)
Initializes a new instance of the FhirConstraint class.
Declaration
public FhirConstraint(string key, string requirements, string severity, bool? suppress, string description, string expression, string xPath, bool isBestPractice, string bestPracticeExplanation, string sourceCanonical, string contextPath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | The constraint key (id). |
| System.String | requirements | Why this constraint is necessary or appropriate. |
| System.String | severity | The severity for violating the constraint. |
| System.Nullable<System.Boolean> | suppress | True to suppress warning or hint in profile. |
| System.String | description | The human-readable description of the constraint. |
| System.String | expression | The FHIR Query-style validation expression. |
| System.String | xPath | The XPath-style validation expression. |
| System.Boolean | isBestPractice | A value indicating whether this constraint is a best practice. |
| System.String | bestPracticeExplanation | A value indicating why this constraint is a best practice. |
| System.String | sourceCanonical | Reference to original source of constraint. |
| System.String | contextPath | Context of this constraint. |
Properties
| Improve this Doc View SourceBestPracticeExplanation
Gets a value indicating why this constraint is a best practice.
Declaration
public string BestPracticeExplanation { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ContextPath
Gets the full pathname of the context file.
Declaration
public string ContextPath { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Description
Gets the human-readable description of the constraint.
Declaration
public string Description { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Expression
Gets the FHIR Query-style validation expression.
Declaration
public string Expression { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
IsBestPractice
Gets a value indicating whether this constraint is a best practice.
Declaration
public bool IsBestPractice { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsInherited
Gets a value indicating whether this object is inherited.
Declaration
public bool IsInherited { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Key
Gets the constraint key (id).
Declaration
public string Key { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Requirements
Gets why this constraint is necessary or appropriate.
Declaration
public string Requirements { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Severity
Gets the severity for violating the constraint.
Declaration
public string Severity { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
SourceCanonical
Gets source canonical.
Declaration
public string SourceCanonical { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Suppress
Gets a flag to suppress warning or hint in profile.
Declaration
public bool? Suppress { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
XPath
Gets the XPath-style validation expression.
Declaration
public string XPath { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceClone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new object that is a copy of this instance. |