FHIR Chat · What table control should I use? · questionnaire

Stream: questionnaire

Topic: What table control should I use?


view this post on Zulip Yunwei Wang (Feb 20 2020 at 19:03):

I am trying to model this input table into questionnaire but kind confused by different types of table controls defined in itemControl value set. Should I used gtable or atable for this?
pasted image

view this post on Zulip Yunwei Wang (Feb 20 2020 at 19:06):

Here is the Questionnaire.item I have created:

{
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
      "valueCodeableConcept": ""
    }
  ],
  "linkId": "7.1",
  "type": "group",
  "text": "Accessory Order",
  "repeats": "true",
  "item": [
    {
      "linkId": "7.1.1",
      "text": "Item Description",
      "type": "string"
    },
    {
      "linkId": "7.1.2",
      "text": "Frequency",
      "type": "string"
    },
    {
      "linkId": "7.1.3",
      "text": "Duration",
      "type": "string"
    },
    {
      "linkId": "7.1.4",
      "text": "Quantity",
      "type": "string"
    },
    {
      "linkId": "7.1.5",
      "text": "Refills",
      "type": "string"
    }
  ]
}

view this post on Zulip Lloyd McKenzie (Feb 20 2020 at 21:12):

gtable. atable would be if each of the columns had a bunch of checkboxes for possible answers

view this post on Zulip Buminda Nawagamuwa (Feb 21 2020 at 01:46):

questionnaire-grid-control.json

Paste the json in

http://smartqedit4.azurewebsites.net/Questionnaire

pasted image

more details > https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/itemControl.20gtable

view this post on Zulip Paul Lynch (Feb 21 2020 at 14:56):

Lloyd McKenzie said:

gtable. atable would be if each of the columns had a bunch of checkboxes for possible answers

+1 for gtable, but atable is getting removed. (J#20944; @Lloyd McKenzie )

view this post on Zulip Yunwei Wang (Feb 21 2020 at 15:32):

@Buminda Nawagamuwa Thank you for the UI and JSON. Do I need to add a group for every row I need? Looks that is redundant since every answer row has the same group of items. Can I use repeats=true to indicate there would be multiple rows of answers

view this post on Zulip Lloyd McKenzie (Feb 21 2020 at 17:11):

repeats = true is what you need

view this post on Zulip Buminda Nawagamuwa (Feb 23 2020 at 23:47):

Yes, repeats=true should do.


Last updated: Apr 12 2022 at 19:14 UTC