Skip to content

Commit

Permalink
Fix various formatting and view-related issues in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fongsean committed Sep 18, 2024
1 parent 24ad73b commit 0f49039
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Function: extractObservationBased()

> **extractObservationBased**(`questionnaire`, `questionnaireResponse`): `Observation`[]
Extract an array of Observations from a QuestionnaireResponse and its source Questionnaire.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `questionnaire` | `Questionnaire` |
| `questionnaireResponse` | `QuestionnaireResponse` |

## Returns

`Observation`[]

## See

https://build.fhir.org/ig/HL7/sdc/extraction.html#observation-based-extraction
1 change: 1 addition & 0 deletions documentation/docs/api/smart-forms-renderer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
| [SmartFormsRenderer](functions/SmartFormsRenderer.md) | A self-initialising wrapper around the BaseRenderer rendering engine. |
| [buildForm](functions/buildForm.md) | Build the form with an initial Questionnaire and an optional filled QuestionnaireResponse. |
| [destroyForm](functions/destroyForm.md) | Destroy the form to clean up the questionnaire and questionnaireResponse stores. |
| [extractObservationBased](functions/extractObservationBased.md) | Extract an array of Observations from a QuestionnaireResponse and its source Questionnaire. |
| [generateItemsToRepopulate](functions/generateItemsToRepopulate.md) | Compare latest data from the server with the current QuestionnaireResponse and decide items to re-populate |
| [getResponse](functions/getResponse.md) | Get the filled QuestionnaireResponse at its current state. |
| [initialiseQuestionnaireResponse](functions/initialiseQuestionnaireResponse.md) | Initialise a questionnaireResponse from a given questionnaire |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ const typedocSidebar = { items: [
"id": "api/smart-forms-renderer/functions/destroyForm",
"label": "destroyForm"
},
{
"type": "doc",
"id": "api/smart-forms-renderer/functions/extractObservationBased",
"label": "extractObservationBased"
},
{
"type": "doc",
"id": "api/smart-forms-renderer/functions/generateItemsToRepopulate",
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/components/boolean.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import IframeContainer from '../../src/react/IframeContainer';
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-boolean--boolean-calculation"
width="100%"
height="240"
height="270"
/>
</IframeContainer>

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/components/choice.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Questionnaire-only
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-choice--choice-answer-option-basic"
width="100%"
height="200"
height="270"
/>
</IframeContainer>

Expand All @@ -28,7 +28,7 @@ With Response
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-choice--choice-answer-option-basic-response"
width="100%"
height="200"
height="270"
/>
</IframeContainer>

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/components/date.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It uses the FHIR [date](https://hl7.org/fhir/r4/datatypes.html#date) data type,
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-date--date-basic"
width="100%"
height="110"
height="420"
/>
</IframeContainer>

Expand All @@ -28,7 +28,7 @@ It uses the FHIR [date](https://hl7.org/fhir/r4/datatypes.html#date) data type,
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-date--date-basic-response"
width="100%"
height="110"
height="420"
/>
</IframeContainer>

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/components/dateTime.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It uses the FHIR [dateTime](https://hl7.org/fhir/r4/datatypes.html#dateTime) dat
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-datetime--date-time-basic"
width="100%"
height="220"
height="420"
/>
</IframeContainer>

Expand All @@ -28,7 +28,7 @@ It uses the FHIR [dateTime](https://hl7.org/fhir/r4/datatypes.html#dateTime) dat
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-datetime--date-time-basic-response"
width="100%"
height="220"
height="420"
/>
</IframeContainer>

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/components/display.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import IframeContainer from '../../src/react/IframeContainer';
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-display--display-calculation"
width="100%"
height="240"
height="270"
/>
</IframeContainer>

Expand All @@ -36,7 +36,7 @@ import IframeContainer from '../../src/react/IframeContainer';
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-display--display-calculation-styled"
width="100%"
height="240"
height="270"
/>
</IframeContainer>

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/components/string.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import IframeContainer from '../../src/react/IframeContainer';
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-string--string-calculation"
width="100%"
height="240"
height="270"
/>
</IframeContainer>

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/components/text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import IframeContainer from '../../src/react/IframeContainer';
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-text--text-basic"
width="100%"
height="160"
height="220"
/>
</IframeContainer>

Expand All @@ -26,7 +26,7 @@ import IframeContainer from '../../src/react/IframeContainer';
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-text--text-basic-response"
width="100%"
height="160"
height="220"
/>
</IframeContainer>

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/components/time.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This component is not thoroughly tested yet. Please use it with caution.
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-time--time-basic"
width="100%"
height="100"
height="360"
/>
</IframeContainer>

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/dev/renderer-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ The button will look different in the output, but it still functions the same wa
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-testing-build-form-button-tester--build-form-button-tester"
width="100%"
height="130"
height="1100"
/>
</IframeContainer>
</TabItem>
Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/sdc/advanced/display.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ As this a custom (and has fairly complex usage requirements) extension, it might
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-2-advanced-control-appearance-item-control-display--custom-context-display"
width="100%"
height="250"
height="270"
/>
</IframeContainer>

Expand Down Expand Up @@ -177,7 +177,7 @@ For more information, refer to http://hl7.org/fhir/uv/sdc/rendering.html#renderi
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-display--display-calculation-styled"
width="100%"
height="240"
height="270"
/>
</IframeContainer>

Expand Down
8 changes: 0 additions & 8 deletions documentation/docs/sdc/advanced/fundamental.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ Most question items with `item.repeats = true` are presented in this manner. An
/>
</IframeContainer>

:::danger

There is currently a known issue which requires repeating items to have a parent group item, otherwise it will be rendered as a non-repeating item.

For more information, refer to https://github.com/aehrc/smart-forms/issues/788.

:::

#### Checkbox Usage

If a question is a checkbox and `item.repeats = true`, a different view is presented. Instead of having add and remove buttons, multiple selections can be made in the checkbox.
Expand Down
24 changes: 13 additions & 11 deletions documentation/docs/sdc/advanced/group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,21 @@ A group table provides the following controls:

#### Basic Usage

<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-8-1-2-advanced-control-appearance-item-control-group--gtable">
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-8-1-2-advanced-control-appearance-item-control-group--g-table-single">
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-2-advanced-control-appearance-item-control-group--gtable"
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-2-advanced-control-appearance-item-control-group--g-table-single"
width="100%"
height="580"
height="550"
/>
</IframeContainer>

#### Repeating Usage

<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-8-1-2-advanced-control-appearance-item-control-group--g-table-repeats">
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-2-advanced-control-appearance-item-control-group--g-table-repeats"
width="100%"
height="750"
/>
</IframeContainer>

Expand Down Expand Up @@ -70,14 +80,6 @@ Refer to the **grid** section in [Questionnaire Item UI Controls](https://hl7.or
/>
</IframeContainer>

:::danger

There is currently a known issue which requires group grids to have a parent group item, otherwise it will be rendered as a regular group.

For more information, refer to https://github.com/aehrc/smart-forms/issues/789.

:::

:::note

Similar to the group table, having too many columns in a group grid can make the form question difficult to read. It is recommended to have a maximum of 4-5 columns in a group table.
Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/sdc/advanced/question.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Drop down is only supported on **choice** items.
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-2-advanced-control-appearance-item-control-question--drop-down-choice-answer-option"
width="100%"
height="310"
height="270"
/>
</IframeContainer>

Expand All @@ -64,7 +64,7 @@ Drop down is only supported on **choice** items.
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-2-advanced-control-appearance-item-control-question--drop-down-choice-answer-value-set"
width="100%"
height="260"
height="270"
/>
</IframeContainer>

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/sdc/calculations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ At the moment, the only supported element/control is **text**.
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-itemtype-display--display-calculation"
width="100%"
height="240"
height="270"
/>
</IframeContainer>
2 changes: 1 addition & 1 deletion documentation/docs/sdc/population.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ This example is available in Storybook under **Repeat Group Usage**.
<iframe
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-12-form-population--item-population-context-home-address"
width="100%"
height="550"
height="800"
/>
</IframeContainer>

Expand Down

0 comments on commit 0f49039

Please sign in to comment.