FHIR Chat · v2 and FHIRPath · implementers

Stream: implementers

Topic: v2 and FHIRPath


view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:26):

I need to standardise the use of fluentpath against v2 content. With that in mind, I'd like to ask anyone interested in that to check this UML class diagram:

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:26):

v2-class.png

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:27):

this would allow fluent path statements like these:

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:27):

Message.segment.where(code = 'PID').field[3].repeat.first.simple()
Message.segment[2].elements(3).simple()
Message.segment.where(code = 'PID').field[3].repeat.where(component[4].value = 'MR').simple()
Message.segment.where(code = 'PID').elements(3).where(component[4].value = 'MR').component[1].text

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:27):

@Jared Davison - finishing our discussion here

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:28):

Comments welcome...

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:32):

@Paul Knapp @Dale Nelson @Andy Stechishin Maybe worth adding a v2 appendix to FHIRPath for this little content

view this post on Zulip James Agnew (Nov 08 2016 at 02:34):

My mental map for v2 content has always been Message > Group > Segment > Component > Subcomponent

What's element? And you're missing group. And is it better to model component and subcomponent separately, since they are not able to be nested arbitrarily deep as this implies.

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:37):

I don't care about Group. There's a theoretical abstract message syntax, but you can't rely on anyone actually following it. That's been a problem with the v2.xml

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:37):

field/element is for repeats

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:38):

in my earlier models, I treated component and subcomponent separately, but when you start profiling this for v2 versions, you find that there's only one data type, whether it's used on an element or a component.

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:38):

this way, the meta model matches more closely, and you can generate profiles for these things.

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:39):

if I was only interested in fhirpath, I probably would've gone with component and subcomponent separately, but I'm also interested in profiling...

view this post on Zulip James Agnew (Nov 08 2016 at 02:39):

For some types of messages I don't see how you could ever get away without group.

ORU^R01 messages often have sequences like ORC OBR OBX OBX ORC OBR OBX OBX and it's nearly useless to know you have the 3rd OBX without knowing it's the first in the econd group

view this post on Zulip James Agnew (Nov 08 2016 at 02:40):

"you find that there's only one data type, whether it's used on an element or a component." My goodness is that part a pain in the ass sometimes. :)

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:41):

back in a few, but it might be worth adding accessors for selecting subgroups following segments or something....

view this post on Zulip Grahame Grieve (Nov 08 2016 at 02:41):

improve on iterating logic

view this post on Zulip Grahame Grieve (Nov 08 2016 at 04:07):

.subset(start, end) - select all the segments after start, and before end

view this post on Zulip Grahame Grieve (Nov 08 2016 at 04:07):

alternatively, we could present a grouping struture as an optional way to iterate the content

view this post on Zulip Grahame Grieve (Nov 08 2016 at 04:20):

v2-class.png


Last updated: Apr 12 2022 at 19:14 UTC