FHIR Chat · Validating appointments · implementers

Stream: implementers

Topic: Validating appointments


view this post on Zulip David Ranvig (Sep 24 2019 at 11:31):

Hi, I'm trying to validate an Appointment resource using the R4 base profile. However, I keep getting the error "Cancelation reason is only used for appointments that have been cancelled, or no-show", even though the appointments don't deal with cancellations or any of the mentioned statuses.
Looking at the profiles-resources.xml, I notice that the expression currently is:

Appointment.cancelationReason.exists() implies (Appointment.status='no-show' or Appointment.status='cancelled')

should perhaps this have been written as:

cancelationReason.exists() implies (status='no-show' or status='cancelled')

view this post on Zulip Grahame Grieve (Sep 24 2019 at 12:16):

It could be written that way, but that’s not the source of whatever the problem is, since it has the same meaning. Can you post an example here?

view this post on Zulip David Ranvig (Sep 24 2019 at 13:06):

I attached a file containing the resource in question. Trying to validate this resource results in the following warnings and errors:

[WARNING] Evaluation of FhirPath for constraint 'app-4' failed: Invocation of 'binary.implies' failed: Invocation of 'exists' failed: Invocation of 'builtin.children' failed: Resource type name may only appear at the root of a document (at Bundle.entry[1].resource[0])
[ERROR] Instance failed constraint app-4 "Cancelation reason is only used for appointments that have been cancelled, or no-show" (at Bundle.entry[1].resource[0])

Currently we're using the .c# .NET Fhir 1.2.0-beta2 packages to do the validation.

bundle.json

view this post on Zulip David Ranvig (Sep 24 2019 at 13:18):

I noticed that the bundle.json uploaded in the previous comment, contains references to Norwegian profiles as well. The below attached bundle does not reference any other profiles, while still displaying the same validation error.

bundle2.json

view this post on Zulip Brian Postlethwaite (Sep 24 2019 at 21:23):

I'd switch up to the dotnet 1.3 validator, there have been some known issues in it. Though not sure this is one of them.

view this post on Zulip Ewout Kramer (Sep 25 2019 at 09:19):

@David Ranvig - Hi David, looks like something that's worth reporting to the API issue tracker at https://github.com/FirelyTeam/fhir-net-api/issues.

view this post on Zulip Ewout Kramer (Sep 25 2019 at 09:20):

(though yes, we keep on fixing validator bugs, so moving up to the latest is always a good idea)

view this post on Zulip Ewout Kramer (Sep 25 2019 at 09:21):

Lastly - we've a dedicated "dotnet" stream that you might want to subscribe to - many of our .net developers hang around there!

view this post on Zulip David Ranvig (Sep 26 2019 at 13:03):

@Ewout Kramer Thank you, I have reported the issue with fhir-net-api repository (https://github.com/FirelyTeam/fhir-net-api/issues/1125) and subscribed to the dotnet stream :-)


Last updated: Apr 12 2022 at 19:14 UTC