FHIR Chat · When to validate a resource with its profile? · implementers

Stream: implementers

Topic: When to validate a resource with its profile?


view this post on Zulip Muhammad Abubakar Ikram (Mar 27 2019 at 09:30):

I just need to know when to validate a resource with its profile?

what could be the use cases? before every create and update?

any help would be highly aprreciable

view this post on Zulip Grahame Grieve (Mar 27 2019 at 11:50):

well, what are your use cases? and your trading partners needs?

view this post on Zulip Muhammad Abubakar Ikram (Mar 27 2019 at 11:52):

Actually, This is what we don't know yet :speechless:

view this post on Zulip Muhammad Abubakar Ikram (Mar 27 2019 at 12:40):

@Grahame Grieve So let me simplify my question.

Is there any process which should/could/must not be started or done without validating a resource?

An exemplary use case or hint so that I can understand that, on this point, I have to validate the resource with its profiles. Your help is highly appreciable.

view this post on Zulip Michele Mottini (Mar 27 2019 at 12:48):

No, there are no processes that require validating resources against a profile.

view this post on Zulip John Moehrke (Mar 27 2019 at 12:55):

Are you asking for use-cases of validating against a profile in production? The validation would tend to be focused on pre-production testing, setup, certification. Once partners have proven to each-other that they are going to behave, the validation overhead can be turned off. This said, there are import functions where the source is unknown, these would benefit from production use of validation. In these cases, the validation results might simply route the object to a specific data ingesting algorithm, or might be used to mark the imported data with quality indicators.

view this post on Zulip Muhammad Abubakar Ikram (Mar 27 2019 at 13:20):

@Michele Mottini Alright.

@John Moehrke I see, Oh Yes I am talking about production. So the profile validation only applies when data receiver/fetcher/viewer doesn't know from where or by whom this data is coming?

Or when the data is reaching from some arbitrary sources to the receiver?

Am I right?

view this post on Zulip Michel Rutten (Mar 27 2019 at 13:37):

Validating profiles allows you to detect business rule violations early in the process, before accepting the data into the server, log them on the server and report back to the sender. Basically profile validation can improve the robustness and reliability of the interface, at the cost of some CPU cycles, I/O and memory pressure. Depending on the use case, this may be useful and worth the effort.

view this post on Zulip John Moehrke (Mar 27 2019 at 13:50):

You can certianly validate every transaction. Nothing wrong with that. But realistically it is not necessary once you have established a pattern. That is all I am saying. You are free to validate everything.

view this post on Zulip René Spronk (Mar 27 2019 at 15:00):

Indeed - once you've received a 1000 resources of type X from hospital A, all of which were valid, you'd just switch of validation. Trust has to be earned.

view this post on Zulip Muhammad Abubakar Ikram (Mar 27 2019 at 15:11):

Alright, I think I have understood very much.

Thank you all of you much much appreciated :+1:

view this post on Zulip Lloyd McKenzie (Mar 27 2019 at 15:39):

There's no requirement to check inbound data for conformance. You're free to accept whatever your internal business processes will allow. However, if you expose data to others, you're responsible for making sure that the outbound data is valid. (And if you expose data that's been provided to you, generally the most effective way to ensure that is to keep bad data from getting in.) Checking data is a mixture of internal business logic, validation checking and pre-production conformance testing/certification. Validation can be real-time or passive in the background. The right mix will very much be driven by performance requirements and implementation environment.


Last updated: Apr 12 2022 at 19:14 UTC