FHIR Chat · Network constraints · implementers

Stream: implementers

Topic: Network constraints


view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:41):

Something I hear often from 'architects' of 'large enterprise systems' is that FHIR is problematic because there's no way to prevent record corruption associated with resources having inconsistent relationships between them

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:42):

a typical issue is if a Patient Condition references an observation for evidence, but the observation references a different patient

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:43):

the problem here is that 99.999% of the time, that would be an error, but the other 0.001%, that would be correct

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:43):

....life is never as simple as we would like it to be....

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:43):

however, lets say that you were a clinical model type of person, and you wanted to comment about this - how would you say something about this in FHIR?

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:44):

right now, there's only one way, to use FluentPath

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:47):

so, I have a profile on Condition, and it says there might be an evidence observation, and that evidence has to be on the same patient. So, using an informal short hand for a profile:

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:50):

Condition Profile ([some uri])
  Subject 1..1 Reference(Patient) - there must be a subject, and it must be a patient
  Evidence 1..1 - there must be one piece of evidence
    Detail 1..1 Reference(Observation) - there must be one observation for evidence
      Profile = [some url] - the profile on observation that says what code it 
          must have, and that there must be a subject, a patient
      constraint = resolve().subject = %resource.subject - the 
          subject of the target must have the same subject as the Condition resource

view this post on Zulip Grahame Grieve (Sep 25 2016 at 14:52):

fluentpath is a general purpose language that can solve all the problems you might imagine in this space.. but it's very generality means that it's not the easiest to interpret other than when validating. Is there a bounded set of problems in this space for which it would be useful to define a more specific language that would be easier to interpret?

view this post on Zulip Bryn Rhodes (Sep 29 2016 at 16:39):

So, an easy way to express reference constraints? A construct that allowed you to express paths to the source and target reference elements and the constraint asserts they are the same?

view this post on Zulip Bryn Rhodes (Sep 29 2016 at 16:41):

Condition.detail.ofType(Observation).subject.ofType(Patient) -> Condition.subject.ofType(Patient)

view this post on Zulip Bryn Rhodes (Sep 29 2016 at 16:41):

Doesn't capture the cardinality constraints, and assumes resolution through references, but something like that?

view this post on Zulip Grahame Grieve (Sep 29 2016 at 16:48):

yes. A syntax that's a lot easier to process than fluentpath (since that's the default fall back position).


Last updated: Apr 12 2022 at 19:14 UTC