-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #791 from aehrc/issue/692
Issue/692
- Loading branch information
Showing
35 changed files
with
1,161 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
apps/smart-forms-app/src/features/renderer/types/choice.enum.ts
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
apps/smart-forms-app/src/features/renderer/types/currentTabIndexContext.type.ts
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
apps/smart-forms-app/src/features/renderer/types/groupTable.interface.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
apps/smart-forms-app/src/features/renderer/types/renderer.interface.ts
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
apps/smart-forms-app/src/features/renderer/types/repeatGroup.interface.ts
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
apps/smart-forms-app/src/features/renderer/types/repeatItem.interface.ts
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
apps/smart-forms-app/src/features/renderer/types/tab.interface.ts
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
apps/smart-forms-app/src/features/renderer/types/table.interface.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
import IframeContainer from '../../../src/react/IframeContainer'; | ||
|
||
# Value Constraints | ||
|
||
This subsection consists of extensions related to value constraints and form validation. | ||
|
||
The elements/extensions that fall under this subsection are: | ||
|
||
**From Core Questionnaire** | ||
|
||
- [required](https://www.hl7.org/fhir/r4/questionnaire-definitions.html#Questionnaire.item.required) | ||
|
||
**From SDC** | ||
|
||
- [maxLength](http://hl7.org/fhir/uv/sdc/behavior.html#maxLength) | ||
- [minLength](http://hl7.org/fhir/uv/sdc/behavior.html#minLength) | ||
- [regex](http://hl7.org/fhir/uv/sdc/behavior.html#regex) | ||
- [minValue](http://hl7.org/fhir/uv/sdc/behavior.html#minValue) | ||
- [maxValue](http://hl7.org/fhir/uv/sdc/behavior.html#maxValue) | ||
- [maxDecimalPlaces](http://hl7.org/fhir/uv/sdc/behavior.html#maxDecimalPlaces) | ||
|
||
[//]: # 'FIXME dev docs reference' | ||
|
||
:::tip | ||
Elements/extensions in this subsection invokes form validation in the renderer. OperationOutcome resources are generated when the current state of the form does not meet the constraints defined in the Questionnaire. | ||
|
||
For more information, refer to developer usage. | ||
|
||
::: | ||
|
||
### Required | ||
|
||
An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. | ||
|
||
Also appears in the [Fundamental Elements](/smart-forms/docs/sdc/advanced/fundamental) subsection. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-8-1-4-advanced-other--required"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-8-1-4-advanced-other--required" | ||
width="100%" | ||
height="100" | ||
/> | ||
</IframeContainer> | ||
|
||
### MaxLength | ||
|
||
The maximum length of the string value of the answer to this question. | ||
|
||
MaxLength is only supported on **decimal**, **integer**, **string** and **text** "text-field"-based items. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-9-1-1-form-behavior-value-constraints--max-length"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-9-1-1-form-behavior-value-constraints--max-length" | ||
width="100%" | ||
height="240" | ||
/> | ||
</IframeContainer> | ||
|
||
### MinLength | ||
|
||
The minimum length of the string value of the answer to this question. | ||
|
||
MinLength is only supported on **decimal**, **integer**, **string** and **text** "text-field"-based items. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-9-1-1-form-behavior-value-constraints--min-length"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-9-1-1-form-behavior-value-constraints--min-length" | ||
width="100%" | ||
height="240" | ||
/> | ||
</IframeContainer> | ||
|
||
### Regex | ||
|
||
A [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) constraint for the string value of the answer to this question. | ||
|
||
Regex is only supported on **decimal**, **integer**, **string** and **text** "text-field"-based items. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-9-1-1-form-behavior-value-constraints--regex"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-9-1-1-form-behavior-value-constraints--regex" | ||
width="100%" | ||
height="240" | ||
/> | ||
</IframeContainer> | ||
|
||
### MinValue | ||
|
||
The minimum value of the quantifiable answer to this question. | ||
|
||
MinValue is only supported on **decimal**, **integer**, **string** and **text** "text-field"-based items. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-9-1-1-form-behavior-value-constraints--min-value"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-9-1-1-form-behavior-value-constraints--min-value" | ||
width="100%" | ||
height="240" | ||
/> | ||
</IframeContainer> | ||
|
||
### MaxValue | ||
|
||
The maximum value of the quantifiable answer to this question. | ||
|
||
MaxValue is only supported on **decimal**, **integer**, **string** and **text** "text-field"-based items. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-9-1-1-form-behavior-value-constraints--max-value"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-9-1-1-form-behavior-value-constraints--max-value" | ||
width="100%" | ||
height="240" | ||
/> | ||
</IframeContainer> | ||
|
||
### MaxDecimalPlaces | ||
|
||
The maximum number of decimal places allowed in the numeric answer to this question. | ||
|
||
MaxDecimalPlaces is only supported on **decimal** items. | ||
|
||
#### Basic Usage | ||
|
||
<IframeContainer storyUrl="https://smartforms.csiro.au/storybook/index.html?path=/story/component-sdc-9-1-1-form-behavior-value-constraints--max-decimal-places"> | ||
<iframe | ||
src="https://smartforms.csiro.au/storybook/iframe.html?args=&id=component-sdc-9-1-1-form-behavior-value-constraints--max-decimal-places" | ||
width="100%" | ||
height="240" | ||
/> | ||
</IframeContainer> |
Oops, something went wrong.