FHIR Chat · Example Parameters with Parts · implementers

Stream: implementers

Topic: Example Parameters with Parts


view this post on Zulip Tim Dunnington (May 24 2018 at 16:07):

Hey all, I'm trying to make sense of the Parameters "Part" field. I'm not clear on what that's supposed to hold. I have a custom operation that I want to build that will return a set of tuples for my consumer. I think I need the part field, but the documentation is thin on that field and there are no examples that I could find. Here's what I think I can do, can someone confirm that this is correct or not?

<Parameters>
<parameter>
<name value="tuple"/>
<part>
<name value="room"/>
<valueString value="21"/>
</part>
<part>
<name value="nurse"/>
<valueString value"Jones"/>
</part>
</parameter>
<parameter>
<name value="tuple"/>
<part>
<valueString value="88"/>
<name value="room"/>
</part>
....

You get the idea: each parameter is a "tuple" with one part for each field in the tuple. Am I on the right track?

view this post on Zulip Grahame Grieve (May 24 2018 at 17:53):

you don't need part for a response (or request) that is a tuple - just list the fields as parameters. but if you parameters have entries that are tuples, then you need parts

view this post on Zulip Tim Dunnington (May 24 2018 at 18:30):

Well, yeah if I were returning one tuple. But I am wanting to return multiple tuples...a table, in essence.

view this post on Zulip Grahame Grieve (May 24 2018 at 18:36):

that's why it nests - you can have tuples of tuples. The parameter list is itself a tuple

view this post on Zulip Tim Dunnington (May 24 2018 at 18:47):

Okay, so, let me try and restate my question. I want to express a table. Each row will consist of 4 columns, let's say for argument's sake the fields are "lastname", "firstname" and "room number". Really doesn't matter what the fields are. I want to format that as a Parameters object. How do I do that?

view this post on Zulip Grahame Grieve (May 24 2018 at 19:26):

well, let's assume it's organised by row. So you'll ave a Parameters resource where each parameter has the name 'row' and it has 4 parts, with names "lastname", "firstname" and "room number"


Last updated: Apr 12 2022 at 19:14 UTC