You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/validation-against-profiles.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,18 @@ Per specification, Mode can be specified with `$validate`, such as create and up
19
19
-`update`: Checks that the profile is an update against the nominated existing resource (that is no changes are made to the immutable fields).
20
20
21
21
There are different ways provided for you to validate resource:
22
-
- Validate an existing resource with validate operation.
23
-
- Validate a new resource with validate operation.
24
-
- Validate on resource CREATE/ UPDATE using header.
22
+
- Option 1: Validate an existing resource with validate operation.
23
+
- Option 2: Validate a new resource with validate operation.
24
+
- Option 3: Validate on resource CREATE/ UPDATE using header.
25
+
26
+
On the successful validation of an existing/ new resource with the validate operation, resource is not persisted into the FHIR service. Use Option 3: Validate on resource CREATE/ UPDATE using header, to persist successfully validated resource to the FHIR service.
25
27
26
28
FHIR Service will always return an `OperationOutcome` as the validation results for $validate operation. FHIR service does two step validation, once a resource is passed into $validate endpoint - the first step is a basic validation to ensure resource can be parsed. During resource parsing, individual errors need to be fixed before proceeding further to next step. Once resource is successfully parsed, full validation is conducted as second step.
27
29
28
30
> [!NOTE]
29
31
> Any valuesets that are to be used for validation must be uploaded to the FHIR server. This includes any Valuesets which are part of the FHIR specification, as well as any ValueSets defined in Implementation Guides. Only fully expanded Valuesets which contain a full list of all codes are supported. Any ValueSet definitions which reference external sources are not supported.
30
32
31
-
## Validating an existing resource
33
+
## Option 1: Validating an existing resource
32
34
33
35
To validate an existing resource, use `$validate` in a `GET` request:
34
36
@@ -100,7 +102,7 @@ If you'd like to specify a profile as a parameter, you can specify the canonical
If you'd like to validate a new resource that you're uploading to the server, you can do a `POST` request:
106
108
@@ -113,7 +115,7 @@ For example:
113
115
This request will first validate the resource. New resource you're specifying in the request will be created after validation.
114
116
The server will always return an `OperationOutcome` as the result.
115
117
116
-
## Validate on resource CREATE/UPDATE using header
118
+
## Option 3: Validate on resource CREATE/UPDATE using header
117
119
118
120
You can choose when you'd like to validate your resource, such as on resource `CREATE` or `UPDATE`. By default, the FHIR service is configured to opt out of validation on resource `Create/Update`. This capability allows to validate on `Create/Update`, using the `x-ms-profile-validation` header. Set `x-ms-profile-validation' to true for validation.
119
121
@@ -130,6 +132,7 @@ You can choose when you'd like to validate your resource, such as on resource `C
130
132
}
131
133
}
132
134
```
135
+
To enable strict validation, use 'Prefer: handling' header with value strict. By setting this header, validation warning will be reported as an error.
0 commit comments