FHIR Chat · Validate profile with fhir-net-api · dotnet

Stream: dotnet

Topic: Validate profile with fhir-net-api


view this post on Zulip Jeff Chen (Feb 19 2020 at 09:48):

Hi all,
Is any function to validate the profile in fhir-net-api ?
Thanks

view this post on Zulip Mirjam Baltus (Feb 19 2020 at 09:54):

Yes. You will have to put your profile(s) in your DirectorySource folder. Then if you have the resource's meta.profile filled in, you can validate like you did before. Or you can use the overload on the Validate method to specify the profile you want to validate against.

view this post on Zulip Jeff Chen (Feb 19 2020 at 09:58):

Hi @Mirjam Baltus
Do you mean I put profile in DirectorySource and validate profile itself ?
(Because i have tried to put resource and validated it with my defined profile)
Any test cases/examples covered what you said in fhir-net-api ?
Thanks

view this post on Zulip Mirjam Baltus (Feb 19 2020 at 10:42):

@Jeff Chen : sorry, I might have misunderstood your initial question. What I described was validating a resource against a custom profile. Of course you can also validate the profile itself, since it is just a StructureDefinition. Validate it like you would any other resource.

view this post on Zulip Mirjam Baltus (Feb 19 2020 at 10:43):

The library has a bunch of tests in it, that you can take a look at. Just download the source code from https://github.com/FirelyTeam/fhir-net-api.

view this post on Zulip Jeff Chen (Feb 20 2020 at 10:08):

Hi @Mirjam Baltus
After I look around the repository, I still have no idea.
Any further hint to give ?
Thanks!

view this post on Zulip Mirjam Baltus (Feb 20 2020 at 10:23):

From your previous messages, it looks like you were able to validate an Observation resource. You can validate your profile (i.e. StructureDefinition) the same way.
If you're not wanting to validate your profile, please elaborate on what you are trying to do and what fails.


Last updated: Apr 12 2022 at 19:14 UTC