FHIR Chat · missing Appointment invariant? · conformance

Stream: conformance

Topic: missing Appointment invariant?


view this post on Zulip Jens Villadsen (Sep 18 2020 at 11:03):

Shouldn't there be an invariant on Appointments that doesn't allow end to be before start?

view this post on Zulip Jens Villadsen (Sep 18 2020 at 12:08):

@Grahame Grieve is that a thing for PA WG?

view this post on Zulip Brian Postlethwaite (Sep 18 2020 at 12:09):

Yes it would be, feel free to log it in jira

view this post on Zulip Jens Villadsen (Sep 18 2020 at 12:10):

its actually messing up some queries/indexes as I've seen some clients actually violate this physically implicit constraint

view this post on Zulip Jens Villadsen (Sep 18 2020 at 12:15):

done - see https://jira.hl7.org/browse/FHIR-28578

view this post on Zulip Grahame Grieve (Sep 18 2020 at 12:16):

I have some vague memory that there's some workflows where the end is before the start transiently, but I can't remember why. But is a resource like that technically invalid? I'm not convinced

view this post on Zulip Jens Villadsen (Sep 18 2020 at 12:19):

i would say yes - it is technically invalid. One could probably argument that start and end can be equal (in some universe), but i cannot see how an end could be before a start

view this post on Zulip Lloyd McKenzie (Sep 18 2020 at 12:58):

The precision could be different, so the invariant will need to take that into account

view this post on Zulip Jens Villadsen (Sep 18 2020 at 19:39):

@Lloyd McKenzie the datatype is an instant ... so I can't see precision as a problem

view this post on Zulip Jens Villadsen (Sep 18 2020 at 19:43):

@Grahame Grieve image.png is that your case?

view this post on Zulip Lloyd McKenzie (Sep 18 2020 at 20:06):

Instant seems inappropriate - precision is way too high. @Brian Postlethwaite ?

view this post on Zulip Jens Villadsen (Sep 18 2020 at 20:07):

its been like that since at least DSTU2

view this post on Zulip Jens Villadsen (Sep 18 2020 at 21:05):

@Lloyd McKenzie change the datatype and I might as well start handing out the pitchforks and torches ;)

view this post on Zulip Brian Postlethwaite (Sep 19 2020 at 03:51):

You can have your imprecise appointments Lloyd... The rest of us will know when we are expected to arrive.

view this post on Zulip Jens Villadsen (Sep 19 2020 at 13:14):

This should do it: Appointment.start.exists() and Appointment.end.exists() implies Appointment.start <= Appointment.end

view this post on Zulip Grahame Grieve (Sep 19 2020 at 21:37):

@Brian Postlethwaite PA doesn't think that patients record appointments for themselves as just the day?

view this post on Zulip Jens Villadsen (Sep 19 2020 at 21:39):

that sounds like a presentation thingy

view this post on Zulip Grahame Grieve (Sep 19 2020 at 21:40):

oh? They have to record a full date/time but it isn't shown to them?

view this post on Zulip Jens Villadsen (Sep 19 2020 at 21:41):

well as long as the field is of type instant I can't see they can get around such precision

view this post on Zulip Grahame Grieve (Sep 19 2020 at 21:42):

so I think that use case is about more then just presentation

view this post on Zulip Jens Villadsen (Sep 19 2020 at 21:43):

that might be true - but that goes beyond the issue reported

view this post on Zulip Jens Villadsen (Sep 19 2020 at 21:44):

in respect to the current model - I would say there is a missing invariant

view this post on Zulip Jens Villadsen (Sep 19 2020 at 21:44):

if the current model is subject to be changed ... well thats another case then

view this post on Zulip Brian Postlethwaite (Sep 19 2020 at 23:22):

You can pencil one in using the requestedperiod which can be as fluffy as you like, or put start and end of the day in the values, and set the minutesduration to be 15 mins, which indicates that there's a slot sometime in that range.


Last updated: Apr 12 2022 at 19:14 UTC